} } } } if (!$_SESSION["user_id"]) { mysql_close($link); header("Location: " . $path . "login.php?return_to=" . $PHP_SELF); } else { include "includes/header.php"; $query = mysql_query("SELECT add_users from " . $table_prefix . "users where user_id = " . $_SESSION["user_id"] . " limit 1"); $row = mysql_fetch_row($query); if ($row[0] == 1) { $edit = true; } else { echo "<p class=\"warning\">" . $lang["not_authorzied_edit_users"] . "</p>\n"; } } if ($edit) { switch ($_REQUEST["mode"]) { case "edit_category": editCategory($id); break; case "delete_category": deleteCategory($id); break; default: showModules(); break; } } include "includes/footer.php";
break; case "editCSS": editCSS($cid[0], $option); break; case "remove": if (is_array($cid) && count($cid) > 1) { foreach ($cid as $delid) { removeMyMenu($delid, $option); } } else { $delid = $cid[0]; removeMyMenu($delid, $option); } break; default: showModules($option); break; } function showModules($option) { global $my, $mainframe, $absolute_path; //echo $absolute_path; $limit = intval(JRequest::getVar('limit', 10)); $limit = $limit ? $limit : 200; $limitstart = intval(JRequest::getVar('limitstart', 0)); $database =& JFactory::getDBO(); //$database=$mainframe->getDBO(); // get the total number of records $database->setQuery("SELECT count(*) FROM #__modules WHERE (module='mod_swmenupro') AND (params!='')"); $total = $database->loadResult(); echo $database->getErrorMsg();