Пример #1
0
             }
         }
     } else {
         $info = array();
         $time = time();
         if (isset($id)) {
             $id = intval($id);
             if ($id <= 0) {
                 errorinfo('变量错误', '');
             }
             $info = $links->GetInfo('', ' id = ' . $id);
             if (empty($info)) {
                 errorinfo('变量错误', '');
             }
         }
         $classList = $links_class->GetList();
         $templatefile = 'links_edit.tpl.php';
     }
     break;
 case 'search':
     //
     break;
 case 'show':
     //
     break;
 case 'del':
     //
     $ids = array();
     if (isset($id)) {
         if (is_array($id)) {
             $ids = $id;
Пример #2
0
$pagetitle = '链接分类管理';
$pagepower = 'links_class';
//基本部分
require 'checkpower.inc.php';
//功能部分
include WEB_MOD . 'links.class.php';
include WEB_MOD . 'links_class.class.php';
$links = new Links();
$links_class = new Links_class();
require_once WEB_INC . 'uclass.class.php';
$CL = new Uclass();
switch ($a) {
    case 'list':
    default:
        //list
        $List = $links_class->GetList(array('id', 'title'));
        //$List = $CL->arraySet($List,0);
        $templatefile = 'links_class_list.tpl.php';
        break;
    case 'edit':
        //
        if (isset($submit)) {
            $info = array();
            $time = time();
            if (isset($id)) {
                $id = intval($id);
                if ($id <= 0) {
                    errorinfo('变量错误', '');
                }
            }
            $info = array('title' => $title);