<?php /** * [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved. * The contents of this file are subject to the License; you may not use this file except in compliance with the License. * * @version $Revision: 2075 $ */ require "../libraries/common.inc.php"; uses("helptype"); require LIB_PATH . 'page.class.php'; require "session_cp.inc.php"; $helptype = new Helptypes(); $page = new Pages(); $tpl_file = "helptype"; $conditions = array(); if (isset($_POST['del']) && is_array($_POST['id'])) { $deleted = $helptype->del($_POST['id']); if (!$deleted) { flash(); } } if (isset($_GET['do'])) { $do = trim($_GET['do']); if ($do == "search" && !empty($_GET['q'])) { $conditions[] = "title like '%" . trim($_GET['q']) . "%'"; } if ($do == "del" && !empty($_GET['id'])) { $helptype->del($_GET['id']); } if ($do == "edit") {
<?php /** * [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved. * The contents of this file are subject to the License; you may not use this file except in compliance with the License. * * @version $Revision: 2075 $ */ require "../libraries/common.inc.php"; uses("helptype", "help"); require PHPB2B_ROOT . 'libraries/page.class.php'; require "session_cp.inc.php"; $help = new Helps(); $page = new Pages(); $helptype = new Helptypes(); $tpl_file = "help"; setvar("HelpTypes", $helptype->data); if (isset($_GET['do'])) { $do = trim($_GET['do']); if (!empty($_GET['id'])) { $id = intval($_GET['id']); } if ($do == "search") { if (!empty($_GET['help']['title'])) { $search_title = $_GET['help']['title']; $conditions = "title like '%" . $search_title . "%'"; } } if ($do == "edit") { setvar("HelptypeOptions", $helptype_option = $helptype->getTypeOptions('', 3)); if (!empty($id)) {
<?php /** * [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved. * The contents of this file are subject to the License; you may not use this file except in compliance with the License. * * @version $Revision: 2048 $ */ uses("helptype", "help"); $helptype = new Helptypes(); $help = new Helps(); $conditions = array(); $helptype_result = $helptype->findAll("id,title", null, "parent_id=0", "display_order ASC,id DESC"); if (!empty($helptype_result)) { foreach ($helptype_result as $key => $val) { $helptype_result[$val['id']]['id'] = $val['id']; $helptype_result[$val['id']]['name'] = $val['title']; $sub_result = $pdb->GetArray("SELECT id,title FROM {$tb_prefix}helptypes WHERE parent_id='" . $val['id'] . "'"); if (!empty($sub_result)) { foreach ($sub_result as $key1 => $val1) { $helptype_result[$val['id']]['sub'][$val1['id']]['id'] = $val1['id']; $helptype_result[$val['id']]['sub'][$val1['id']]['name'] = $val1['title']; } } } setvar("Helptypes", $helptype_result); }