Example #1
0
     if (empty($_POST['type_title'])) {
         check::AlertExit("错误:提交数据为空!", -1);
     }
     if (!empty($_POST['type_link'])) {
         $_POST['type_link'] = str_replace("http://", "", strtolower($_POST['type_link']));
     }
     $objWebInit->makeInsertType($_POST);
     break;
     // 删除类型
 // 删除类型
 case 'del':
     $id = intval($_GET['id']);
     if (empty($id)) {
         check::AlertExit("错误:提交数据为空!", -1);
     }
     $objWebInit->deleteType($id);
     break;
     // 编辑类型
 // 编辑类型
 case 'edit':
     $id = intval($_GET['id']);
     if (empty($id)) {
         check::AlertExit("错误:提交数据为空!", -1);
     }
     $arrTypeList = $objWebInit->getTypeList();
     $arrType = array();
     foreach ($arrTypeList as $k => $types) {
         if ($types['type_id'] == $id) {
             $arrType = $types;
         }
     }