当前位置: 首页>>代码示例>>PHP>>正文


PHP Products::SetProductsList1方法代码示例

本文整理汇总了PHP中Products::SetProductsList1方法的典型用法代码示例。如果您正苦于以下问题:PHP Products::SetProductsList1方法的具体用法?PHP Products::SetProductsList1怎么用?PHP Products::SetProductsList1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Products的用法示例。


在下文中一共展示了Products::SetProductsList1方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: stripslashes

    }
    // если отправили комментарий
    if (isset($_POST['sub_com'])) {
        $put = $_POST['id_product'];
        $text = nl2br($_POST['feedback_text'], false);
        $text = stripslashes($text);
        $author = $_SESSION['member']['id_user'];
        $author_name = $_SESSION['member']['name'];
        $authors_email = $_SESSION['member']['email'];
        $related33 = $Products->SubmitProductComment($text, $author, $author_name, $authors_email, $put);
        header('Location: ' . _base_url . '/cabinet/assortment/');
        exit;
    }
    $price_products = $Products->GetPricelistProducts();
    $tpl->Assign('price_products', $price_products);
    $tpl->Assign('cal', $cal);
    $tpl->Assign('sidebar', $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_supplier_cab.tpl'));
    $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_supplier_cab.tpl'));
}
$tpl->Assign('header', $header);
$order = 'p.id_product ASC';
//экспорт в exel
if (substr(strrchr($_GET['q'], "/"), 1) == "export") {
    $Products->SetProductsList1($Supplier->fields['id_user'], $order, '');
    $Products->GenExcelAssortFile($Products->GetExportAssortRows($Products->list, $Supplier->fields['id_user']));
    exit(0);
} elseif (substr(strrchr($_GET['q'], "/"), 1) == "export_usd") {
    $Products->SetProductsList1($Supplier->fields['id_user'], $order, '');
    $Products->GenExcelAssortFile($Products->GetExportAssortRowsUSD($Products->list, $Supplier->fields['id_user']));
    exit(0);
}
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:cp_cab_supplier.php

示例2: date

    exit;
}
$arr['a.id_supplier'] = $id_supplier;
//Подключение/отключение поставщика
if (isset($_POST['suppliers_activity'])) {
    $update_supplier['active'] = $_POST['supplier_active'];
    $update_supplier['id_user'] = $id_supplier;
    $Supplier->UpdateSupplier($update_supplier, true);
    // if($_POST['supplier_active'] == 1){
    // 	$Products->UpdateActivityProducttSupplier($update_supplier['id_user']);
    // }
}
$Supplier->SetFieldsById($id_supplier, 1);
//экспорт в exel
if (isset($_GET['export'])) {
    $Products->SetProductsList1($id_supplier, $order, '', $arr);
    $Products->GenExcelAssortFile($Products->GetExportAssortRows($Products->list, $id_supplier), $Supplier->fields['article'] . ' ' . date('d.m'));
    exit(0);
} elseif (isset($_GET['export_usd'])) {
    $Products->SetProductsList1($id_supplier, $order, '', $arr);
    $Products->GenExcelAssortFile($Products->GetExportAssortRowsUSD($Products->list, $id_supplier), $Supplier->fields['article'] . ' ' . date('d.m') . ' usd');
    exit(0);
}
// Импорт
if (isset($_FILES['import_file'])) {
    // Проверяем загружен ли файл
    if (is_uploaded_file($_FILES['import_file']['tmp_name'])) {
        // Проверяе объем файла
        if ($_FILES['import_file']['size'] > 1024 * 3 * 1024) {
            $tpl->Assign('msg', "Размер файла превышает три мегабайта");
            $tpl->Assign('errm', 1);
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:assortment.php

示例3: elseif

            } else {
                $tpl->Assign('res_check', $res);
            }
        } elseif (isset($_POST['smb_import'])) {
            list($total_added, $total_updated) = $Products->ProcessProductsFile($_FILES["import_file"]["tmp_name"]);
            $tpl->Assign('total_added', $total_added);
            $tpl->Assign('total_updated', $total_updated);
        }
        //die("Обработан.");
        //move_uploaded_file($_FILES["filename"]["tmp_name"], "/path/to/file/".$_FILES["filename"]["name"]);
    } else {
        echo "Ошибка загрузки файла";
    }
}
if (isset($_POST['smb']) && isset($_POST['supl'])) {
    $Products->SetProductsList1($_POST['supl']);
    list($r, $cats_cols) = $Products->GetExportRows($Products->list);
    // Формирование заголовка
    $h = array('Артикул');
    for ($ii = 0; $ii < $cats_cols; $ii++) {
        $h[] = "Категория {$ii}";
    }
    $h = array_merge($h, array('Название', 'Сертификат', 'Фото 1', 'Фото 2', 'Фото 3', 'Макс кол-во поставщиков', 'Коэф опт', 'Коэф мелк опт', 'Описание', 'Страна', 'Кол-во в ящ', 'Минимальное количество по мелкому опту', 'Кратность', 'Видимость', 'транслит', 'Вес', 'Объем', 'Обяз прим', 'Ед. измерения'));
    $Products->GenExcelFile($h, $r, $cats_cols);
    exit(0);
}
$orderby = " sort ASC, ord ASC, name ASC";
$Products->SetProductsList(array('cp.id_category' => $id_category), null, array('order_by' => $orderby, 'administration' => '1'));
$arr = $dbtree->GetNodeFields($id_category, array('name', 'category_level'));
// --- --- --- subcats
$l = $arr['category_level'] + 1;
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:products.php


注:本文中的Products::SetProductsList1方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。