本文整理匯總了PHP中Products::GetInfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP Products::GetInfo方法的具體用法?PHP Products::GetInfo怎麽用?PHP Products::GetInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Products
的用法示例。
在下文中一共展示了Products::GetInfo方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$templatefile = $moduleRoot . WEB_APP . 'templates/' . 'products_photo_list.tpl.php';
}
break;
case 'edit':
//
if (isset($submit)) {
$info = array();
$time = time();
if (isset($id)) {
$id = intval($id);
if ($id <= 0) {
errorinfo('變量錯誤', '');
}
$infoold = $products_photo->GetInfo('', ' id = ' . $id);
}
$productinfo = $products->GetInfo('', ' id = ' . $productid);
//20120719
checkClassPower('products', $productinfo['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 = $products->GetInfo('', " `filename` = '" . $filename . "' ");
if (!empty($namea)) {
示例2: 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 = $products->GetInfo(array('id', 'classid', 'title', 'seotitle', 'seokeyword', 'seointro', 'filename', 'price', 'standard', 'fromlinkurl', 'fromtitle', 'content', 'author', 'addtime', 'clicks', 'linkurl', 'isplay', 'thumb', 'titlecolor'), $where);
if (empty($info)) {
$errorInfo = '變量錯誤';
errorinfo($errorInfo, '');
}
$classid = $info['classid'];
$classinfo = $products_class->GetInfo(array('id', 'title', 'filename', 'linkurl'), " id = {$classid} ");
$photoList = array();
$photoList = $products_photo->GetList(array('id', 'productid', 'thumb'), '', '', " productid = " . $info['id'] . " ", 'orders asc,id desc');
//點擊統計 待添加
$clicks = $info['clicks'] + 1;
$products->Update(array('clicks' => $clicks), $where);
//信息審核
if ($info['isplay'] == '0') {
$errorInfo = '該信息未審核';
errorinfo($errorInfo, '');
示例3: array
} else {
$tpl_in_module = 1;
$templatefile = $moduleRoot . WEB_APP . 'templates/' . 'products_list.tpl.php';
}
break;
case 'edit':
//
if (isset($submit)) {
$info = array();
$time = time();
if (isset($id)) {
$id = intval($id);
if ($id <= 0) {
errorinfo('變量錯誤', '');
}
$infoold = $products->GetInfo('', ' id = ' . $id);
}
//20120719
checkClassPower('products', $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 = $products->GetInfo('', " `filename` = '" . $filename . "' ");