Exemplo n.º 1
0
 $db->Execute($sql);
 $t_r = $db->GetArray();
 //print_r($t_r);
 if ($t_r) {
     $preinfo = $t_r[0];
 }
 $sql = " select * from  {tablepre}articles where classid = {$classid} and id > " . $info['id'] . " order by id asc limit 0,1 ";
 //echo $sql;
 $db->Execute($sql);
 $t_r = $db->GetArray();
 if ($t_r) {
     $nextinfo = $t_r[0];
 }
 //点击统计 待添加
 $clicks = $info['clicks'] + 1;
 $articles->Update(array('clicks' => $clicks), $where);
 //信息审核
 if ($info['isplay'] == '0') {
     $errorInfo = '该信息未审核';
     errorinfo($errorInfo, '');
 }
 //转连接
 if (!empty($info['linkurl'])) {
     header("Location: " . $info['linkurl'] . "");
     exit;
 }
 $topTitle = $info['title'];
 //seo新增 20120409
 if (!empty($info['seotitle'])) {
     $topTitle = $info['seotitle'];
 }
Exemplo n.º 2
0
         $addtime = $addtime;
     }
     if (!empty($authortime)) {
         $authortime = $authortime;
     } else {
         $authortime = $authortime;
     }
     if (!empty($filename) && (isset($id) && $filename != $infoold['filename'])) {
         $namea = $articles->GetInfo('', " `filename` = '" . $filename . "' ");
         if (!empty($namea)) {
             errorinfo('对不起,自定义name已经使用过了,请更换自定义name', '');
         }
     }
     $info = array('classid' => $classid, 'title' => $title, 'seotitle' => $seotitle, 'seokeyword' => $seokeyword, 'seointro' => $seointro, 'filename' => $filename, 'fromtitle' => $fromtitle, 'fromlinkurl' => $fromlinkurl, 'titlecolor' => $titlecolor, 'thumb' => $thumb, 'intro' => $intro, 'author' => $author, 'content' => $content, 'addtime' => $addtime, 'authortime' => $authortime, 'template' => $template, 'linkurl' => $linkurl, 'clicks' => $clicks, 'isplay' => $isplay, 'ishot' => $ishot, 'istop' => $istop, 'isgood' => $isgood);
     if (isset($id)) {
         if ($articles->Update($info, ' id =' . $id)) {
             errorinfo('编辑成功', '');
         } else {
             errorinfo('编辑失败', '');
         }
     } else {
         if ($articles->Add($info)) {
             errorinfo('添加成功', '');
         } else {
             errorinfo('添加失败', '');
         }
     }
 } else {
     $info = array();
     $time = time();
     if (isset($id)) {