本文整理匯總了PHP中Articles::GetInfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP Articles::GetInfo方法的具體用法?PHP Articles::GetInfo怎麽用?PHP Articles::GetInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Articles
的用法示例。
在下文中一共展示了Articles::GetInfo方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: errorinfo
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 = $articles->GetInfo(array('id', 'classid', 'title', 'seotitle', 'seokeyword', 'seointro', 'filename', 'fromlinkurl', 'fromtitle', 'content', 'author', 'addtime', 'clicks', 'linkurl', 'isplay', 'thumb', 'titlecolor', 'intro'), $where);
if (empty($info)) {
$errorInfo = '變量錯誤';
errorinfo($errorInfo, '');
}
$classid = $info['classid'];
$classinfo = $articles_class->GetInfo(array('id', 'title', 'filename', 'linkurl', 'rootid'), " id = {$classid} ");
//上一條 下一條信息
$preinfo = array();
$nextinfo = array();
$sql = " select * from {tablepre}articles where classid = {$classid} and id < " . $info['id'] . " order by id desc limit 0,1 ";
//echo $sql;
$db->Execute($sql);
$t_r = $db->GetArray();
//print_r($t_r);
if ($t_r) {
示例2: PageClass
//總頁數
$pages = new PageClass($page, $totalPage);
$showpage = $pages->showPage();
$templatefile = 'articles_list.tpl.php';
break;
case 'edit':
//
if (isset($submit)) {
$info = array();
$time = time();
if (isset($id)) {
$id = intval($id);
if ($id <= 0) {
errorinfo('變量錯誤', '');
}
$infoold = $articles->GetInfo('', ' id = ' . $id);
}
//20120719
checkClassPower('articles', $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 = $articles->GetInfo('', " `filename` = '" . $filename . "' ");