$(function() { $("#select_city").change(function() { var list = $("#select_city").children(); list.each(function() { if(this.selected == true){ $("#location_find").val(this.text); } }); }); }); $(function() { $( "#incident_title" ).focus(); $( "#incident_title" ).autocomplete({ source: <?php echo category::getCategories($categories); ?> , minLength: 2, select: function( event, ui ) { // $( '#incident_category' ).val(ui.item.incident_category); $('input[name=incident_category]').val(ui.item.incident_category); // $('input[name=incident_category[]]').val('Array ( [0] => '+ui.item.incident_category+')'); $( '#incident_title' ).val(ui.item.label); } }); }); </script> <!-- HTML -->
<?php // Includng configuration file include 'config/config.php'; //Check user is already login or not checkAuthentication(); $id = $_SESSION['adminid']; $category = new category(); $categories = $category->getCategories($id); $smarty->assign('action', 'category'); $smarty->assign('toolbar', $smarty->fetch('toolbar.tpl')); if (isset($_GET['action']) && $_GET['action'] == 'new') { $smarty->assign('content', $smarty->fetch('addcategory.tpl')); } elseif (isset($_GET['action']) && $_GET['action'] == 'edit') { $id = $_GET['id']; $categories = $category->getCategory($id); $smarty->assign('category', $categories); $smarty->assign('content', $smarty->fetch('editcategory.tpl')); } elseif (isset($_POST['action']) && $_POST['action'] == 'add') { $data = $_POST; if ($category->addCategory($data)) { header('Location: ' . FRONTEND . 'category.php'); exit; } } elseif (isset($_POST['action']) && $_POST['action'] == 'update') { $data = $_POST; if ($category->updateCategory($data)) { header('Location: ' . FRONTEND . 'category.php'); exit; } } elseif (isset($_GET['action']) && $_GET['action'] == 'search') {
<?php // Includng configuration file include 'config/config.php'; //Check user is already login or not checkAuthentication(); $product = new product(); $category = new category(); $smarty->assign('categories', $category->getCategories()); if (isset($_GET['action']) && $_GET['action'] == 'new') { $smarty->assign('content', $smarty->fetch('additem.tpl')); } elseif (isset($_GET['action']) && $_GET['action'] == 'edit') { $id = $_GET['id']; $producted = $product->getProduct($id); $smarty->assign('product', $producted); $smarty->assign('content', $smarty->fetch('edititem.tpl')); } elseif (isset($_POST['action']) && $_POST['action'] == 'add') { $file = $_FILES; $data = $_POST['data']['Item']; $data['image'] = $file['name']; if ($product->checkProduct($data)) { $_SESSION['message'] = 'Product with catalog no already exist. Please search with product sku and update details.'; header('Location: ' . FRONTEND . 'inventory.php'); exit; } else { if ($product->addProduct($data)) { header('Location: ' . FRONTEND . 'inventory.php'); exit; } } } elseif (isset($_POST['action']) && $_POST['action'] == 'update') {
require_once 'api/Twig/Autoloader.php'; require_once 'api/class_question.php'; require_once 'api/class_category.php'; require_once 'api/class_mysql.php'; require_once 'api/class_user.php'; require_once 'conf/mysql.php'; require_once 'site/module/category/category.php'; # TWIG Config Twig_Autoloader::register(); $loader = new Twig_Loader_Filesystem('site/templates'); $twig = new Twig_Environment($loader); #Basic Layout laden $template = $twig->loadTemplate('index.html'); # Kategorien $c1 = new category(); $categories = $c1->getCategories(); $q1 = new class_question(); $questionCount = $q1->getQuestionCount(); $u1 = new class_user(); $regions = $u1->getRegionList(); # Frage $favorite_indexCardCount = $q1->getIndexCardFavoriteCount(); $question = $q1->getRandomQuestion(); #Lernkartei $indexCards = $q1->getIndexCardCounts(); #Fragenkatalog $level = 1; $questions = $q1->getQuestionsByLevel($level); $logged_in = true; echo $template->render(array('logged_in' => $logged_in, 'questionCount' => $questionCount, 'question' => $question, 'categories' => $categories, 'indexCards' => $indexCards, 'questions' => $questions, 'regions' => $regions));
* Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. */ if (!defined('IS_VALID_PHPMYFAQ_ADMIN')) { header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME'])); exit; } if ($permission["editcateg"]) { $id = $_GET['cat']; $parent_id = $_GET['parent_id']; $cat = new category(); $categories = $cat->getAllCategories(); unset($cat->categories); $cat->getCategories($parent_id, false); $cat->buildTree($parent_id); print "<h2>" . $PMF_LANG["ad_categ_edit_1"] . " <em>" . $categories[$id]["name"] . "</em> " . $PMF_LANG["ad_categ_edit_2"] . "</h2>\n"; ?> <form action="<?php print $_SERVER["PHP_SELF"] . $linkext; ?> " method="post"> <fieldset> <legend><?php print $PMF_LANG["ad_categ_edit_1"]; ?> </legend> <input type="hidden" name="aktion" value="changecategory" /> <input type="hidden" name="cat" value="<?php print $id;