$objects[] = array('id' => 'cat_' . $cat['categoryID'], 'name' => $cat['name'], 'uri' => $cat['uri'], 'isFolder' => 1); } } foreach ($products as $product) { $pName = !empty($product['sef']) ? $product['sef'] : $product['name']; $objects[] = array('id' => 'prod_' . $product['productID'], 'name' => $pName, 'uri' => $product['uri']); } break; case 'news': $items = @newsGetAllNews(null, $stub); foreach ($items as $item) { $objects[] = array('id' => 'news_' . $item['NID'], 'name' => $item['title'], 'uri' => $item['uri']); } break; case 'pages': $items = auxpgGetAllPageAttributes(); foreach ($items as $item) { $objects[] = array('id' => 'page_' . $item['aux_page_ID'], 'name' => $item['aux_page_name'], 'uri' => $item['uri']); } break; } // Strip item names $objects in array foreach ($objects as $i => $obj) { $objects[$i]['name'] = html_entity_decode($obj['name'], ENT_QUOTES); } // Set sub-department template $smarty->assign('admin_sub_dpt', 'url_rewriter.tpl'); $smarty->assign('categoryID', isset($categoryID) ? $categoryID : null); $smarty->assign('catTree', $catTree); $smarty->assign('objects', $objects); // debug($objects);
Redirect(ADMIN_FILE . "?dpt=custord&sub=aux_pages"); } $smarty->assign("add_new", 1); } else { if (isset($_GET["edit"])) { if (isset($_POST["save"])) { if (CONF_BACKEND_SAFEMODE) { Redirect(ADMIN_FILE . "?dpt=custord&sub=aux_pages&safemode=yes&edit=" . $_GET["edit"]); } $aux_page_text_type = 0; if (isset($_POST["aux_page_text_type"])) { $aux_page_text_type = 1; } auxpgUpdateAuxPage($_GET["edit"], $_POST["aux_page_name"], $_POST["aux_page_text"], $aux_page_text_type, $_POST["meta_keywords"], $_POST["meta_description"], $_POST["aux_page_title"]); Redirect(ADMIN_FILE . "?dpt=custord&sub=aux_pages"); } $aux_page = auxpgGetAuxPage($_GET["edit"]); if ($aux_page["aux_page_text_type"] == 1) { $aux_page["aux_page_text"] = html_spchars($aux_page["aux_page_text"]); } $smarty->assign("aux_page", $aux_page); $smarty->assign("edit", 1); } else { $aux_pages = auxpgGetAllPageAttributes(); $smarty->assign("aux_pages", $aux_pages); } } //set sub-department template $smarty->assign("admin_sub_dpt", "custord_aux_pages.tpl"); } }