function headerAndSearchCode() { $defaultText = htmlentities($_GET['keywords']); echo ' <header id="main_header"> <div id="rightAlign"> '; topRightLinks(); echo "\n\t\t\t</div>\n\t\t\t<a href=\"index.php\"><img src=\"images/mainLogo.png\"></a>\n\t\t</header>\n\t\t\n\t\t<div id=\"top_search\">\n\t\t\t<form name=\"input\" action=\"search.php\" method=\"get\">\n\t\t\t\t<input type=\"text\" id=\"keywords\" name=\"keywords\" size=\"100\" class=\"searchBox\" value=\"{$defaultText}\"> \n\t\t\t\t<select id=\"category\" name=\"category\" class=\"searchBox\">\n\t"; createCategoryList(); echo ' </select> <input type="submit" value="Search" class="button" /> </form> </div> '; }
<!-- category view --> <div class="tab-page" id="tabCategory"> <h2 class="tab"><?php echo $_lang["element_categories"]; ?> </h2> <script type="text/javascript">tpResources.addTabPage( document.getElementById( "tabCategory" ) );</script> <div><?php echo $_lang['category_msg']; ?> </div> <br /> <ul> <?php echo createCategoryList(); ?> </ul> </div> </div> </div> <?php function createResourceList($resourceTable, $action, $nameField = 'name') { global $modx, $_lang; $tbl_elm = $modx->getFullTableName($resourceTable); $tbl_categories = $modx->getFullTableName('categories'); switch ($resourceTable) { case 'site_plugins': $add_field = "{$tbl_elm}.disabled,";
function add_category() { echo "<select id = 'category' name = 'add_category' >"; createCategoryList(); echo "</select>"; }