]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-categories.php
config.php partly solved, see #117
[mailer.git] / inc / modules / member / what-categories.php
index 8b8dbd80a449e1d5a990befd6b33acacd87deace..9f2f814446bd8e5722794bf15e0cfdf5b6d362a5 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
 } elseif (!IS_MEMBER()) {
-       LOAD_URL('modules.php?module=index');
+       redirectToUrl('modules.php?module=index');
 }
 
 // Add description as navigation point
@@ -73,7 +73,7 @@ if ($cats > 0) {
                        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",
+                                       $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) {
@@ -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) {
                                        $content['jn'] = '';
-                                       $content['jy'] = ' chkecked="checked"';
+                                       $content['jy'] = ' checked="checked"';
                                }
                        }