2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
23 * Navigation Link System
25 * A static class whose methods are called to generate the common navigation
26 * links for the Admin CP.
28 * @author Iris Studios, Inc.
29 * @copyright Copyright ©2002 - [#]year[#], Iris Studios, Inc.
36 // ###################################################################
38 * All the different locations under the "Options" tab
42 function optionsPages()
44 global $navigator, $lang;
46 $navigator->add_component('section', 'options-pages', 'options', $lang->string('Options'), null
);
47 $navigator->add_component('link', 'options-pages-home', 'options-pages', $lang->string('Home'), 'index.php');
48 $navigator->add_component('link', 'options-pages-settings', 'options-pages', $lang->string('Bugdar Settings'), 'setting.php');
49 $navigator->add_component('link', 'options-pages-languages', 'options-pages', $lang->string('Languages'), 'language.php');
50 $navigator->add_component('link', 'options-pages-userhelp', 'options-pages', $lang->string('User Help Items'), 'userhelp.php');
53 // ###################################################################
55 * Adding a new language
59 function languagesAdd()
61 global $navigator, $lang;
63 $navigator->add_component('section', 'options-languages', 'options', $lang->string('Languages'), null
);
64 $navigator->add_component('link', 'options-languages-add', 'options-languages', $lang->string('Add New Language'), 'language.php?do=add');
67 // ###################################################################
73 * @param integer Language ID
75 function languagesEdit($id)
77 global $navigator, $lang;
79 NavLinks
::languagesAdd();
80 $navigator->add_component('link', 'options-languages-edit', 'options-languages', $lang->string('Edit Language'), 'language.php?do=edit&languageid=' . $id);
81 $navigator->add_component('link', 'options-languages-reload', 'options-languages', $lang->string('Reload XML'), 'language.php?do=reload&languageid=' . $id);
82 $navigator->add_component('link', 'options-languages-delete', 'options-languages', $lang->string('Delete'), 'language.php?do=delete&languageid=' . $id);
85 // ###################################################################
87 * Adding a new user help item
91 function userhelpAdd()
93 global $navigator, $lang;
95 $navigator->add_component('section', 'options-userhelp', 'options', $lang->string('User Help Items'), null
);
96 $navigator->add_component('link', 'options-userhelp-add', 'options-userhelp', $lang->string('Add New Item'), 'userhelp.php?do=add');
99 // ###################################################################
101 * Adding a new product
105 function productsAdd()
107 global $navigator, $lang;
109 $navigator->add_component('section', 'products', 'products', $lang->string('Products'), null
);
110 $navigator->add_component('link', 'products-manage', 'products', $lang->string('Manage Products'), 'product.php');
111 $navigator->add_component('link', 'products-add', 'products', $lang->string('Add New Product'), 'product.php?do=addproduct');
114 // ###################################################################
120 * @param integer Product ID
122 function productsEdit($id)
124 global $navigator, $lang;
126 NavLinks
::productsAdd();
127 $navigator->add_component('section', 'products-edit', 'products', $lang->string('Edit Product'), null
);
128 $navigator->add_component('link', 'products-edit', 'products-edit', $lang->string('Edit Product'), 'product.php?do=editproduct&productid=' . $id);
129 $navigator->add_component('link', 'products-edit-version', 'products-edit', $lang->string('Add New Version'), 'product.php?do=addversion&productid=' . $id);
130 $navigator->add_component('link', 'products-edit-delete', 'products-edit', $lang->string('Delete Product'), 'product.php?do=deleteproduct&productid=' . $id);
134 /*=====================================================================*\
135 || ###################################################################
138 || ###################################################################
139 \*=====================================================================*/