case 'show': // $where = ''; if (isset($id) && !empty($id)) { $where = ' id = ' . $id . ' '; } if (isset($filename) && !empty($filename)) { $where = " `filename` = '" . $filename . "' "; } if (empty($where)) { $errorInfo = '变量错误'; errorinfo($errorInfo, ''); } //echo $where; $info = array(); $info = $downloads->GetInfo(array('id', 'classid', 'title', 'seotitle', 'seokeyword', 'seointro', 'filename', 'dlink', 'dlinkname', 'fromlinkurl', 'fromtitle', 'content', 'author', 'addtime', 'clicks', 'linkurl', 'isplay', 'thumb', 'titlecolor'), $where); if (empty($info)) { $errorInfo = '变量错误'; errorinfo($errorInfo, ''); } $classid = $info['classid']; $classinfo = $downloads_class->GetInfo(array('id', 'title', 'filename', 'linkurl'), " id = {$classid} "); //点击统计 待添加 $clicks = $info['clicks'] + 1; $downloads->Update(array('clicks' => $clicks), $where); //信息审核 if ($info['isplay'] == '0') { $errorInfo = '该信息未审核'; errorinfo($errorInfo, ''); } //转连接
} else { $tpl_in_module = 1; $templatefile = $moduleRoot . WEB_APP . 'templates/' . 'downloads_list.tpl.php'; } break; case 'edit': // if (isset($submit)) { $info = array(); $time = time(); if (isset($id)) { $id = intval($id); if ($id <= 0) { errorinfo('变量错误', ''); } $infoold = $downloads->GetInfo('', ' id = ' . $id); } //20120719 checkClassPower('downloads', $classid); if (!empty($addtime)) { $addtime = strtotime($addtime); } else { $addtime = $addtime; } if (!empty($authortime)) { $authortime = $authortime; } else { $authortime = $authortime; } if (!empty($filename) && (isset($id) && $filename != $infoold['filename'])) { $namea = $downloads->GetInfo('', " `filename` = '" . $filename . "' ");