本文整理汇总了PHP中Products::CheckArticle方法的典型用法代码示例。如果您正苦于以下问题:PHP Products::CheckArticle方法的具体用法?PHP Products::CheckArticle怎么用?PHP Products::CheckArticle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products
的用法示例。
在下文中一共展示了Products::CheckArticle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Products
<?if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'){
// header('Content-Type: text/javascript; charset=utf-8');
$Products = new Products();
if(isset($_POST['action'])){
switch($_POST['action']){
case "decline":
$Products->SetModerationStatus($_POST['id'], $_POST['status'], nl2br($_POST['comment']));
break;
case "accept":
$_POST['art'] = $Products->CheckArticle($Products->GetLastArticle());
$id = $Products->AcceptProductModeration($_POST);
$Products->UpdateProductCategories($id, $_POST['category'], 1);
$Products->RecalcSitePrices(array($id));
$Products->SetModerationStatus($_POST['id'], $_POST['status']);
break;
default:
break;
}
}
exit();
}?>
示例2: Products
G::AddCSS('highslide.css');
G::AddJS('jquery-2.1.1.min.js');
G::AddJS('jquery.lazyload.min.js');
G::AddJS('jquery-ui.js');
G::AddJS('../plugins/js/jquery.cookie.js');
G::AddJS('bootstrap.min.js');
G::AddJS('../plugins/ckeditor/ckeditor.js');
G::AddJS('main.js');
G::AddJS('func.js');
$GLOBALS['__page_h1'] = ' ';
if ($GLOBALS['CurrentController'] != 'productedit') {
// G::AddCSS('adm.css');
}
if (isset($_GET['check_art'])) {
$Products = new Products();
echo "<!-- " . $Products->CheckArticle($_GET['check_art']) . "-->";
}
if (isset($_GET['img'])) {
$img = new Images();
$img->resize(false, false, strtotime($_GET['img']));
}
if (isset($_GET['clear_thumbs'])) {
$img = new Images();
$img->clearThumbs();
}
// if($_SESSION['member']['id_user'] == 8569){
// // $sql = "SELECT * FROM "._DB_PREFIX_."image";
// // $result = $db->GetArray($sql);
// // $xc = 0;
// // foreach($result as $image){
// // print_r('<pre>');
示例3: dbtree
$dbtree = new dbtree(_DB_PREFIX_ . 'category', 'category', $db);
$Products = new Products();
$Unit = new Unit();
$Images = new Images();
$segmentation = new Segmentation();
if (isset($_GET['upload']) == true) {
$res = $Images->upload($_FILES, $GLOBALS['PATH_product_img'] . 'original/' . date('Y') . '/' . date('m') . '/' . date('d') . '/');
echo str_replace($GLOBALS['PATH_global_root'], '/', $res);
exit(0);
}
$tpl->Assign('h1', 'Добавление товара');
if (isset($_POST['smb'])) {
if (isset($_POST['images_visible'])) {
$_POST['images_visible'][0] = 1;
}
$_POST['art'] = $Products->CheckArticle((int) $_POST['art']);
require_once $GLOBALS['PATH_block'] . 't_fnc.php';
// для ф-ции проверки формы
if (isset($_POST['price']) && $_POST['price'] == '') {
$_POST['price'] = 0;
}
list($err, $errm) = Product_form_validate();
if (!$err) {
if ($id = $Products->AddProduct($_POST)) {
//Добавление видео
if (!empty($_POST['video'])) {
$Products->UpdateVideo($id, $_POST['video']);
}
$to_resize = array();
//Добавление фото
$article = $Products->GetArtByID($id);