本文整理汇总了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 . "' ");