X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fmember%2Fwhat-categories.php;h=c74bf25aa40a1c2044bec35b0733a6dee19cd252;hb=885637e9f61f315ba051500061ec193ebc937f7b;hp=1fb64f1e65c1c19957377e39688acaadd662f9a7;hpb=a090e351c49fe021fb3064325694da03402332e0;p=mailer.git diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 1fb64f1e65..c74bf25aa4 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -38,10 +38,10 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php[13~?module=index"); + redirectToUrl('modules.php?module=index'); } // Add description as navigation point @@ -56,7 +56,7 @@ $cats = SQL_NUMROWS($result); if ($cats > 0) { $LEAST = false; - if (IS_FORM_SENT()) { + if (isFormSent()) { $cnt = 0; foreach (REQUEST_POST('cat') as $cat => $joined) { if ($joined == 'N') $cnt++; @@ -68,13 +68,13 @@ if ($cats > 0) { } } - if (IS_FORM_SENT()) { + if (isFormSent()) { foreach (REQUEST_POST('cat') as $cat => $joined) { switch ($joined) { case 'Y': $sql = ''; - $result_user = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1", - array($UID, bigintval($cat)), __FILE__, __LINE__); + $result_user = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1", + array($UID, bigintval($cat)), __FILE__, __LINE__); if (SQL_NUMROWS($result_user) == 0) { $sql = "INSERT INTO `{!_MYSQL_PREFIX!}_user_cats` (userid, cat_id) VALUES ('%s','%s')"; @@ -113,21 +113,21 @@ if ($cats > 0) { $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Default he has not joined - $content['jn'] = ' chkecked="checked"'; + $content['jn'] = ' checked="checked"'; $content['jy'] = ''; // When we found an entry don't read it, just change the jx elements if (REQUEST_ISSET_POST(('cat'))) { // Form sent? if (REQUEST_POST('cat', $content['id']) =='Y') { - $content['jy'] = ' chkecked="checked"'; + $content['jy'] = ' checked="checked"'; $content['jn'] = ''; } } else { // Check if he has an entry - if (GET_TOTAL_DATA($UID, "user_cats", "id", 'userid', true, sprintf(" AND cat_id=%s", bigintval($content['id']))) == 1) { + if (GET_TOTAL_DATA($UID, "user_cats", 'id', 'userid', true, sprintf(" AND cat_id=%s", bigintval($content['id']))) == 1) { $content['jn'] = ''; - $content['jy'] = ' chkecked="checked"'; + $content['jy'] = ' checked="checked"'; } }