Exemple #1
0
         }
     }
     if (!empty($backtime)) {
         $backtime = $backtime;
     } else {
         $backtime = $backtime;
     }
     $info = array('backcontent' => $backcontent, 'backtime' => $backtime, 'isok' => $isok, 'isplay' => $isplay);
     if (isset($id)) {
         if ($books->Update($info, ' id =' . $id)) {
             errorinfo('编辑成功', '');
         } else {
             errorinfo('编辑失败', '');
         }
     } else {
         if ($books->Add($info)) {
             errorinfo('添加成功', '');
         } else {
             errorinfo('添加失败', '');
         }
     }
 } else {
     $info = array();
     $time = time();
     if (isset($id)) {
         $id = intval($id);
         if ($id <= 0) {
             errorinfo('变量错误', '');
         }
         $info = $books->GetInfo('', ' id = ' . $id);
         if (empty($info)) {