source: branches/1.4/content/plugins/category_manager/templates/cat_man_add.php @ 1919

Revision 1919, 4.3 KB checked in by shibuya246, 3 years ago (diff)

[Branch 1.4] urldecode($cat->category_name) added

Line 
1<?php
2/**
3 * Plugin name: Category Manager
4 * Template name: plugins/category_manager/cat_man_add.php
5 *
6 * PHP version 5
7 *
8 * LICENSE: Hotaru CMS is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation, either version 3 of
11 * the License, or (at your option) any later version.
12 *
13 * Hotaru CMS is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with Hotaru CMS. If not, see http://www.gnu.org/licenses/.
19 *
20 * @category  Content Management System
21 * @package   HotaruCMS
22 * @author    Nick Ramsay <admin@hotarucms.org>
23 * @copyright Copyright (c) 2009, Hotaru CMS
24 * @license   http://www.gnu.org/copyleft/gpl.html GNU General Public License
25 * @link      http://www.hotarucms.org/
26 */
27
28?>
29 
30    <h2><?php echo $h->lang["cat_man_add"]; ?></h2>
31
32    <table class="cat_man_table">
33    <tr><td class="cat_man_body">
34    <h3>1. <?php echo $h->lang["cat_man_add_main"]; ?></h3>
35    <form name='category_manager_add_parent_form' action='<?php echo BASEURL; ?>admin_index.php?page=plugin_settings&amp;plugin=category_manager&amp;action=add_save' method='post'>
36    <?php echo $h->lang["cat_man_add_top_level"]; ?> <input name="new_category" type="text" value=""> &nbsp;&nbsp;<input style='padding: 2px;' type='submit' name='save_new_category' value='<?php echo $h->lang["cat_man_save"]; ?>'><input type="hidden" name="type" value="1">
37    <input type='hidden' name='csrf' value='<?php echo $h->csrfToken; ?>' />
38    </form>
39
40    <h3>2. <?php echo $h->lang["cat_man_add_child_to_main"]; ?></h3>
41    <form name='category_manager_add_child_form' action='<?php echo BASEURL; ?>admin_index.php?page=plugin_settings&amp;plugin=category_manager&amp;action=add_save' method='post'>
42    <?php echo $h->lang["cat_man_add_add_to"]; ?>
43        <select name="parent">
44        <?php
45        foreach ($h->vars['the_cats'] as $cat) {
46            if ($cat->category_safe_name != "all") {
47                if ($cat->category_parent == 1) {
48                      echo "<option value='" . $cat->category_id . "'>" . urldecode($cat->category_name) . "</option>";
49                }
50            }
51          }
52          ?>
53          </select>
54    <?php echo $h->lang["cat_man_add_name_it"]; ?> <input name="new_category" type="text" value=""> &nbsp;&nbsp;<input style='padding: 2px;' type='submit' name='save_new_category' value='<?php echo $h->lang["cat_man_save"]; ?>'><input type="hidden" name="type" value="2">
55    <input type='hidden' name='csrf' value='<?php echo $h->csrfToken; ?>' />
56    </form>
57
58    <h3>3. <?php echo $h->lang["cat_man_add_child_to_child"]; ?></h3>
59    <form name='category_manager_add_child2_form' action='<?php echo BASEURL; ?>admin_index.php?page=plugin_settings&amp;plugin=category_manager&amp;action=add_save' method='post'>
60    <?php echo $h->lang["cat_man_add_add_to"]; ?>
61        <select name="parent">
62        <?php
63        foreach ($h->vars['the_cats'] as $cat) {
64            if ($cat->category_safe_name != "all") {
65                if ($cat->category_parent  > 1) {
66                      echo "<option value='" . $cat->category_id . "'>" . $cat->category_name . "</option>";
67                }   
68            }
69          }
70          ?>
71          </select>
72    <?php echo $h->lang["cat_man_add_name_it"]; ?> <input name="new_category" type="text" value=""> &nbsp;&nbsp;<input style='padding: 2px;' type='submit' name='save_new_category' value='<?php echo $h->lang["cat_man_save"]; ?>'><input type="hidden" name="type" value="3">
73    <input type='hidden' name='csrf' value='<?php echo $h->csrfToken; ?>' />
74    </form>
75    </td>
76   
77    <td class="cat_man_menu_holder">
78        <div>
79            <h3><?php echo $h->lang["cat_man_menu_title"]; ?></h3>
80            <?php $h->displayTemplate('cat_man_menu', 'category_manager'); ?>
81           
82            <h3><?php echo $h->lang["cat_man_category_tree"]; ?></h3>
83            <?php
84                $tree = new CategoryManagerSettings($h);
85                $tree->tree($h, $h->vars['the_cats']);
86            ?>
87
88        </div>
89    </td>
90    </tr></table>
Note: See TracBrowser for help on using the repository browser.