Ejemplo n.º 1
0
Archivo: admin.php Proyecto: gblok/rsc
                    echo $_GET["productID"];
                    ?>
&amp;remove_from_app_cat=<?php 
                    echo $app_cat["categoryID"];
                    ?>
&amp;eaction=prod')"></td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            <?php 
                }
            } else {
                echo "<tr><td height=\"18\" align=\"center\" valign=\"middle\" colspan=\"2\">" . ADMIN_NO_CAT_NEW . "</td></tr>";
            }
            $cats = catGetCategoryCList();
            if (count($cats) >= 1) {
                ?>
                                            <tr class="liney">
                                                <td width="100%" align=right><b><?php 
                echo ADD_BUTTON;
                ?>
:</b> <select name='new_appended_category'>
                                                        <?php 
                for ($i = 0; $i < count($cats); $i++) {
                    echo "<option value=\"" . $cats[$i]["categoryID"] . "\">";
                    for ($j = 0; $j < $cats[$i]["level"]; $j++) {
                        echo "&nbsp;&nbsp;";
                    }
                    echo $cats[$i]["name"];
                    echo "</option>";
Ejemplo n.º 2
0
 if (!isset($_SESSION["expcat"])) {
     $_SESSION["expcat"] = array(1);
 }
 if (isset($_GET["expandCat"])) {
     catExpandCategory($_GET["expandCat"], "expcat");
 }
 if (isset($_GET["shrinkCat"])) {
     catShrinkCategory($_GET["shrinkCat"], "expcat");
 }
 if (isset($_GET["shrinkCatm"])) {
     catShrinkCategorym("expcat");
 }
 if (isset($_GET["expandCatp"])) {
     catExpandCategoryp("expcat");
 }
 $c = catGetCategoryCList($_SESSION["expcat"]);
 $smarty->assign("categories", $c);
 $add_comand = $_POST["add_command"];
 $add_comand_param = array('prod_off', 'prod_on', 'prod_dell', 'prod_move', 'set_currency');
 if (in_array($add_comand, $add_comand_param)) {
     if (CONF_BACKEND_SAFEMODE) {
         //this action is forbidden when SAFE MODE is ON
         Redirect(_getUrlToSubmit() . '&safemode=yes');
     }
     //save changes in current category
     $data = ScanPostVariableWithId(array('price', 'enable', 'left', 'sort_order', 'checkbox_products_id', 'currencyID', 'list_price', 'opt_margin'));
     foreach ($data as $k => $v) {
         unset($set);
         $price = number_format($v['price'], 2, '.', '');
         if ($price >= 0) {
             $set .= ',Price = "' . $price . '"';
Ejemplo n.º 3
0
        if (isset($_SESSION['selectedProductsIncSub'][$_POST['cIDForProducts']])) {
            $_SESSION['selectedProductsIncSub'][$_POST['cIDForProducts']] += -count($_SESSION['selectedProducts'][$_POST['cIDForProducts']]) + count($_POST['PRODUCTS']);
        }
        $_SESSION['selectedProducts'][$_POST['cIDForProducts']] = $_POST['PRODUCTS'];
        break;
}
/**
 * getting category tree
 */
$_t = array();
foreach ($_SESSION['explortExpandedIDs'] as $_ID => $_expanded) {
    if ($_expanded) {
        $_t[] = $_ID;
    }
}
$ProductCategories = catGetCategoryCList($_t, 'ASSOC', true);
/**
 * init first time
 */
if (1 && !count($_SESSION['checkedCategories'])) {
    $_t = array_keys($ProductCategories);
    $_tt = '';
    foreach ($_t as $_key) {
        $_SESSION['checkedCategories'][$_key] = 1;
        $_SESSION['selectedProductsIncSub'][$_key] = $ProductCategories[$_key]['products_count'];
        $Products = prdGetProductByCategory(array('categoryID' => $_key, 'fullFlag' => false), $_tT);
        $c = count($Products);
        for ($_tt = 0; $_tt < $c; $_tt++) {
            if ($Products[$_tt]['enabled']) {
                $_SESSION['selectedProducts'][$_key][$Products[$_tt]['productID']] = 1;
            }