Example #1
0
 public function view_contentModify()
 {
     $contentId = isset($_GET['id']) ? post_check($_GET['id']) : '';
     $content = '';
     if ($contentId != '') {
         $cntAct = new contentAct();
         $content = $cntAct->act_getContentList('*', "where id = '{$contentId}'");
         //print_r($content);
     }
     $this->smarty->assign('contentId', $contentId);
     $this->smarty->assign('content', $content[0]['content']);
     $this->smarty->display('contentModify.htm');
 }
Example #2
0
 function act_contentDel()
 {
     //调用model层获取数据
     $contentId = isset($_POST['contentId']) ? trim($_POST['contentId']) : '';
     if ($contentId == '') {
         self::$errCode = '001';
         self::$errMsg = "参数错误!";
         return false;
     }
     $ret = contentModel::delete(" where id = '{$contentId}'");
     if (!$ret) {
         self::$errCode = '003';
         self::$errMsg = "content插入失败!";
         return false;
     }
     return 'ok';
 }