Exemplo n.º 1
0
     $admintpl->set("image_url", "{$STYLEURL}/images/categories/");
     break;
 case 'order':
     sortCategories('categories_list');
     break;
 case 'edit':
     if (isset($_GET["id"])) {
         // we should get only 1 style, selected with radio ...
         $id = max(0, $_GET["id"]);
         $cres = get_result("SELECT * FROM {$TABLE_PREFIX}categories WHERE id={$id}", true);
         $admintpl->set("category_add", true, true);
         $admintpl->set("language", $language);
         $admintpl->set("category_name", $cres[0]["name"]);
         $admintpl->set("frm_action", "index.php?page=admin&user="******"uid"] . "&code=" . $CURUSER["random"] . "&do=category&action=save&mode=edit&id={$id}");
         $admintpl->set("image_combo", image_combo($cres[0]["image"]));
         $admintpl->set("subcat_combo", sub_categories($cres[0]["sub"]));
         $admintpl->set("category_sort", $cres[0]["sort_index"]);
         $admintpl->set("category_porn", $cres[0]["p**n"]);
         if ($cres[0][p**n] == "yes") {
             $yes = 'checked="checked"';
             $admintpl->set("yep", $yes);
             $admintpl->set("nop", '');
         }
         if ($cres[0][p**n] == "no") {
             $no = 'checked="checked"';
             $admintpl->set("nop", $no);
             $admintpl->set("yep", '');
         }
         $admintpl->set("category_image", "{$STYLEURL}/images/categories/" . $cres[0]["image"]);
         $admintpl->set("image_url", "{$STYLEURL}/images/categories/");
     }
Exemplo n.º 2
0
                   <table class="lista" width="100%" align="center">
                   <tr>
                   <td><?php 
            echo NAME;
            ?>
</td><td><input type="text" name="name" value="<?php 
            echo security::html_safe(unesc($rescat["name"]));
            ?>
" size="40" maxlength="30" /></td>
                   </tr>
                   <tr>
                   <td><?php 
            echo SUB_CATEGORY;
            ?>
</td><td><?php 
            sub_categories($rescat["sub"]);
            ?>
</td>
                   </tr>
                   <tr>
                   <td><?php 
            echo CAT_SORT_INDEX;
            ?>
</td><td><input type="text" name="sort" value="<?php 
            echo (int) $rescat["sort_index"];
            ?>
" size="40" /></td>
                   </tr>
                   <tr>
                   <td><?php 
            echo CAT_IMAGE;