Редакция 554 | К новейшей редакции | Только различия | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 554 | Редакция 568 | ||
---|---|---|---|
1 | <?php
|
1 | <?php
|
2 | /**
|
2 | /**
|
3 | *
|
3 | *
|
4 | * Codename: ant-ng - generator of sources.list for apt-distributives
|
4 | * Codename: ant-ng - generator of sources.list for apt-distributives
|
5 | * http://alex-w.org.ru/p/antng/
|
5 | * http://alex-w.org.ru/p/antng/
|
6 | *
|
6 | *
|
7 | * Copyright (c) 2009 Alexander Wolf
|
7 | * Copyright (c) 2009 Alexander Wolf
|
8 | * Dual licensed under the MIT and GNU LGPL licenses.
|
8 | * Dual licensed under the MIT and GNU LGPL licenses.
|
9 | * http://alex-w.org.ru/p/antng/license
|
9 | * http://alex-w.org.ru/p/antng/license
|
10 | *
|
10 | *
|
11 | */
|
11 | */
|
12 | 12 | ||
13 | require_once dirname(__FILE__)."/init.php"; |
13 | require_once dirname(__FILE__)."/init.php"; |
14 | 14 | ||
15 | if(!empty($_GET["action"])) { |
15 | if(!empty($_GET["action"])) { |
16 | $action = $_GET["action"]; |
16 | $action = $_GET["action"]; |
17 | } else { |
17 | } else { |
18 | $action = "view"; |
18 | $action = "view"; |
19 | }
|
19 | }
|
20 | if(!empty($_GET["mode"])) { |
20 | if(!empty($_GET["mode"])) { |
21 | $mode = $_GET["mode"]; |
21 | $mode = $_GET["mode"]; |
22 | } else { |
22 | } else { |
23 | $mode = "empty"; |
23 | $mode = "empty"; |
24 | }
|
24 | }
|
25 | 25 | ||
26 | $uuid = $secure->checkInt($_GET["uuid"]); |
26 | $uuid = $secure->checkInt($_GET["uuid"]); |
27 | 27 | ||
28 | $valid = $core->checkCookieSign($_COOKIE[$cookie]); |
28 | $valid = $core->checkCookieSign($_COOKIE[$cookie]); |
29 | 29 | ||
30 | $scripts = ""; |
30 | $scripts = ""; |
31 | 31 | ||
32 | $menu = "<fieldset><legend>Меню</legend>\n"; |
32 | $menu = "<fieldset><legend>Меню</legend>\n"; |
33 | $menu .= "<div id='rmenu'></div>\n"; |
33 | $menu .= "<div id='rmenu'></div>\n"; |
34 | $menu .= "<ul class='vfix'><li><a href='".$manager."?mode=distributions'>Дистрибутивы</a></li>"; |
34 | $menu .= "<ul class='vfix'><li><a href='".$manager."?mode=distributions'>Дистрибутивы</a></li>"; |
35 | $menu .= "<li><a href='".$manager."?mode=versions'>Версии</a></li>"; |
35 | $menu .= "<li><a href='".$manager."?mode=versions'>Версии</a></li>"; |
36 | $menu .= "<li><a href='".$manager."?mode=sections'>Секции</a></li>"; |
36 | $menu .= "<li><a href='".$manager."?mode=sections'>Секции</a></li>"; |
37 | $menu .= "<li><a href='".$manager."?mode=signs'>Подписи</a></li>"; |
37 | $menu .= "<li><a href='".$manager."?mode=signs'>Подписи</a></li>"; |
38 | $menu .= "<li><a href='".$manager."?mode=repositories'>Репозитории</a></li>"; |
38 | $menu .= "<li><a href='".$manager."?mode=repositories'>Репозитории</a></li>"; |
- | 39 | $menu .= "<li><a href='".$manager."?mode=archs'>Архитектуры</a></li>"; |
|
39 | $menu .= "<li><a href='".$manager."?mode=settings'>Настройки</a></li>"; |
40 | $menu .= "<li><a href='".$manager."?mode=settings'>Настройки</a></li>"; |
40 | $menu .= "<li><a href='".$manager."?mode=exit'>Выход</a></li></ul>"; |
41 | $menu .= "<li><a href='".$manager."?mode=exit'>Выход</a></li></ul>"; |
41 | $menu .=" </fieldset>\n"; |
42 | $menu .=" </fieldset>\n"; |
42 | 43 | ||
43 | $tmpl->assign('scripts', $scripts); |
44 | $tmpl->assign('scripts', $scripts); |
44 | $tmpl->assign('menu', $menu); |
45 | $tmpl->assign('menu', $menu); |
45 | 46 | ||
46 | switch ($mode) { |
47 | switch ($mode) { |
47 | case 'empty': |
48 | case 'empty': |
48 | if ($valid["ERR"]==1) { |
49 | if ($valid["ERR"]==1) { |
49 | $tmpl->assign('header', "Вход"); |
50 | $tmpl->assign('header', "Вход"); |
50 | $tmpl->assign('description', "Вход в панель управления генератором"); |
51 | $tmpl->assign('description', "Вход в панель управления генератором"); |
51 | $tmpl->assign('body', $core->showSigninForm()); |
52 | $tmpl->assign('body', $core->showSigninForm()); |
52 | $tmpl->display('default.tpl'); |
53 | $tmpl->display('default.tpl'); |
53 | } else { |
54 | } else { |
54 | $tmpl->assign('header', "CPanel"); |
55 | $tmpl->assign('header', "CPanel"); |
55 | $tmpl->assign('description', "Панель управления генератором"); |
56 | $tmpl->assign('description', "Панель управления генератором"); |
56 | $tmpl->assign('body', $body); |
57 | $tmpl->assign('body', $body); |
57 | $tmpl->display('manager.tpl'); |
58 | $tmpl->display('manager.tpl'); |
58 | }
|
59 | }
|
59 | break; |
60 | break; |
60 | case 'exit': |
61 | case 'exit': |
61 | setcookie($cookie, '', time()-10); |
62 | setcookie($cookie, '', time()-10); |
62 | header("Location: ./\n\n"); |
63 | header("Location: ./\n\n"); |
63 | break; |
64 | break; |
64 | case 'distributions': |
65 | case 'distributions': |
65 | // Управление дистрибутивами
|
66 | // Управление дистрибутивами
|
66 | $body = "<h3>Управление дистрибутивами</h3>"; |
67 | $body = "<h3>Управление дистрибутивами</h3>"; |
67 | switch ($action) { |
68 | switch ($action) { |
68 | case 'view': |
69 | case 'view': |
69 | $body .= "<p><a href='".$manager."?mode=distributions&action=new'>Добавить новый дистрибутив</a></p>"; |
70 | $body .= "<p><a href='".$manager."?mode=distributions&action=new'>Добавить новый дистрибутив</a></p>"; |
70 | $body .= $core->showDistributionList("distributions", $maganer, "", "list"); |
71 | $body .= $core->showDistributionList("distributions", $maganer, "", "list"); |
71 | break; |
72 | break; |
72 | case 'new': |
73 | case 'new': |
73 | $body .= "<form action='".$process."' method='post' enctype='multipart/form-data'>\n"; |
74 | $body .= "<form action='".$process."' method='post' enctype='multipart/form-data'>\n"; |
74 | $body .= "<input type='hidden' name='mode' value='distributive-add'>\n"; |
75 | $body .= "<input type='hidden' name='mode' value='distributive-add'>\n"; |
75 | $body .= $core->showDistributionForm(0,"Добавление информации о новом дистрибутиве"); |
76 | $body .= $core->showDistributionForm(0,"Добавление информации о новом дистрибутиве"); |
76 | $body .= "</form>"; |
77 | $body .= "</form>"; |
77 | break; |
78 | break; |
78 | case 'edit': |
79 | case 'edit': |
79 | $body .= "<form action='".$process."' method='post' enctype='multipart/form-data'>\n"; |
80 | $body .= "<form action='".$process."' method='post' enctype='multipart/form-data'>\n"; |
80 | $body .= "<input type='hidden' name='mode' value='distributive-edit'>\n"; |
81 | $body .= "<input type='hidden' name='mode' value='distributive-edit'>\n"; |
81 | $body .= "<input type='hidden' name='distID' value='".$uuid."'>\n"; |
82 | $body .= "<input type='hidden' name='distID' value='".$uuid."'>\n"; |
82 | $body .= $core->showDistributionForm($uuid, "Редактирование информации о дистрибутиве"); |
83 | $body .= $core->showDistributionForm($uuid, "Редактирование информации о дистрибутиве"); |
83 | $body .= "</form>"; |
84 | $body .= "</form>"; |
84 | break; |
85 | break; |
85 | case 'delete': |
86 | case 'delete': |
86 | $body .= "<form action='".$process."' method='post'>\n"; |
87 | $body .= "<form action='".$process."' method='post'>\n"; |
87 | $body .= "<input type='hidden' name='mode' value='distributive-delete'>\n"; |
88 | $body .= "<input type='hidden' name='mode' value='distributive-delete'>\n"; |
88 | $body .= "<input type='hidden' name='distID' value='".$uuid."'>\n"; |
89 | $body .= "<input type='hidden' name='distID' value='".$uuid."'>\n"; |
89 | $body .= $core->showDistributionForm($uuid, "Удаление информации о дистрибутиве"); |
90 | $body .= $core->showDistributionForm($uuid, "Удаление информации о дистрибутиве"); |
90 | $body .= "</form>"; |
91 | $body .= "</form>"; |
91 | break; |
92 | break; |
92 | }
|
93 | }
|
93 | $tmpl->assign('header', "CPanel"); |
94 | $tmpl->assign('header', "CPanel"); |
94 | $tmpl->assign('description', "Панель управления генератором"); |
95 | $tmpl->assign('description', "Панель управления генератором"); |
95 | $tmpl->assign('body', $body); |
96 | $tmpl->assign('body', $body); |
96 | $tmpl->display('manager.tpl'); |
97 | $tmpl->display('manager.tpl'); |
97 | break; |
98 | break; |
98 | case 'versions': |
99 | case 'versions': |
99 | // Управление версиями
|
100 | // Управление версиями
|
100 | $body = "<h3>Управление версиями</h3>"; |
101 | $body = "<h3>Управление версиями</h3>"; |
101 | switch ($action) { |
102 | switch ($action) { |
102 | case 'view': |
103 | case 'view': |
103 | $body .= "<p><a href='".$manager."?mode=versions&action=new'>Добавить новую версию дистрибутива</a></p>"; |
104 | $body .= "<p><a href='".$manager."?mode=versions&action=new'>Добавить новую версию дистрибутива</a></p>"; |
104 | $body .= $core->showDistVersionsList("versions", 0, "list", $manager); |
105 | $body .= $core->showDistVersionsList("versions", 0, "list", $manager); |
105 | break; |
106 | break; |
106 | case 'edit': |
107 | case 'edit': |
107 | $body .= "<form action='".$process."' method='post'>\n"; |
108 | $body .= "<form action='".$process."' method='post'>\n"; |
108 | $body .= "<input type='hidden' name='mode' value='version-edit'>\n"; |
109 | $body .= "<input type='hidden' name='mode' value='version-edit'>\n"; |
109 | $body .= "<input type='hidden' name='versionID' value='".$uuid."'>\n"; |
110 | $body .= "<input type='hidden' name='versionID' value='".$uuid."'>\n"; |
110 | $body .= $core->showDistVersionsForm($uuid, "Редактирование информации о версии дистрибутива"); |
111 | $body .= $core->showDistVersionsForm($uuid, "Редактирование информации о версии дистрибутива"); |
111 | $body .= "</form>"; |
112 | $body .= "</form>"; |
112 | break; |
113 | break; |
113 | case 'delete': |
114 | case 'delete': |
114 | $body .= "<form action='".$process."' method='post'>\n"; |
115 | $body .= "<form action='".$process."' method='post'>\n"; |
115 | $body .= "<input type='hidden' name='mode' value='version-delete'>\n"; |
116 | $body .= "<input type='hidden' name='mode' value='version-delete'>\n"; |
116 | $body .= "<input type='hidden' name='versionID' value='".$uuid."'>\n"; |
117 | $body .= "<input type='hidden' name='versionID' value='".$uuid."'>\n"; |
117 | $body .= $core->showDistVersionsForm($uuid, "Удаление информации о версии дистрибутива"); |
118 | $body .= $core->showDistVersionsForm($uuid, "Удаление информации о версии дистрибутива"); |
118 | $body .= "</form>"; |
119 | $body .= "</form>"; |
119 | break; |
120 | break; |
120 | case 'new': |
121 | case 'new': |
121 | $body .= "<form action='".$process."' method='post'>\n"; |
122 | $body .= "<form action='".$process."' method='post'>\n"; |
122 | $body .= "<input type='hidden' name='mode' value='version-add'>\n"; |
123 | $body .= "<input type='hidden' name='mode' value='version-add'>\n"; |
123 | $body .= $core->showDistVersionsForm(0, "Добавление новой версии дистрибутива"); |
124 | $body .= $core->showDistVersionsForm(0, "Добавление новой версии дистрибутива"); |
124 | $body .= "</form>"; |
125 | $body .= "</form>"; |
125 | break; |
126 | break; |
126 | }
|
127 | }
|
127 | $tmpl->assign('header', "CPanel"); |
128 | $tmpl->assign('header', "CPanel"); |
128 | $tmpl->assign('description', "Панель управления генератором"); |
129 | $tmpl->assign('description', "Панель управления генератором"); |
129 | $tmpl->assign('body', $body); |
130 | $tmpl->assign('body', $body); |
130 | $tmpl->display('manager.tpl'); |
131 | $tmpl->display('manager.tpl'); |
131 | break; |
132 | break; |
132 | case 'sections': |
133 | case 'sections': |
133 | // Управление секциями (deb)
|
134 | // Управление секциями (deb)
|
134 | $body = "<h3>Управление секциями репозиториев</h3>"; |
135 | $body = "<h3>Управление секциями репозиториев</h3>"; |
135 | switch ($action) { |
136 | switch ($action) { |
136 | case 'view': |
137 | case 'view': |
137 | $body .= "<p><a href='".$manager."?mode=sections&action=new'>Добавить новую секцию репозитория</a></p>"; |
138 | $body .= "<p><a href='".$manager."?mode=sections&action=new'>Добавить новую секцию репозитория</a></p>"; |
138 | $body .= $core->showSectionsList("sections", $manager); |
139 | $body .= $core->showSectionsList("sections", $manager); |
139 | break; |
140 | break; |
140 | case 'edit': |
141 | case 'edit': |
141 | $body .= "<form action='".$process."' method='post'>\n"; |
142 | $body .= "<form action='".$process."' method='post'>\n"; |
142 | $body .= "<input type='hidden' name='mode' value='section-edit'>\n"; |
143 | $body .= "<input type='hidden' name='mode' value='section-edit'>\n"; |
143 | $body .= "<input type='hidden' name='sectionID' value='".$uuid."'>\n"; |
144 | $body .= "<input type='hidden' name='sectionID' value='".$uuid."'>\n"; |
144 | $body .= $core->showSectionsForm($uuid, "Редактирование информации о секции"); |
145 | $body .= $core->showSectionsForm($uuid, "Редактирование информации о секции"); |
145 | $body .= "</form>"; |
146 | $body .= "</form>"; |
146 | break; |
147 | break; |
147 | case 'delete': |
148 | case 'delete': |
148 | $body .= "<form action='".$process."' method='post'>\n"; |
149 | $body .= "<form action='".$process."' method='post'>\n"; |
149 | $body .= "<input type='hidden' name='mode' value='section-delete'>\n"; |
150 | $body .= "<input type='hidden' name='mode' value='section-delete'>\n"; |
150 | $body .= "<input type='hidden' name='sectionID' value='".$uuid."'>\n"; |
151 | $body .= "<input type='hidden' name='sectionID' value='".$uuid."'>\n"; |
151 | $body .= $core->showSectionsForm($uuid, "Удаление информации о секции"); |
152 | $body .= $core->showSectionsForm($uuid, "Удаление информации о секции"); |
152 | $body .= "</form>"; |
153 | $body .= "</form>"; |
153 | break; |
154 | break; |
154 | case 'new': |
155 | case 'new': |
155 | $body .= "<form action='".$process."' method='post'>\n"; |
156 | $body .= "<form action='".$process."' method='post'>\n"; |
156 | $body .= "<input type='hidden' name='mode' value='section-add'>\n"; |
157 | $body .= "<input type='hidden' name='mode' value='section-add'>\n"; |
157 | $body .= $core->showSectionsForm(0, "Добавление новой секции"); |
158 | $body .= $core->showSectionsForm(0, "Добавление новой секции"); |
158 | $body .= "</form>"; |
159 | $body .= "</form>"; |
159 | break; |
160 | break; |
160 | }
|
161 | }
|
161 | $tmpl->assign('header', "CPanel"); |
162 | $tmpl->assign('header', "CPanel"); |
162 | $tmpl->assign('description', "Панель управления генератором"); |
163 | $tmpl->assign('description', "Панель управления генератором"); |
163 | $tmpl->assign('body', $body); |
164 | $tmpl->assign('body', $body); |
164 | $tmpl->display('manager.tpl'); |
165 | $tmpl->display('manager.tpl'); |
165 | break; |
166 | break; |
166 | case 'signs': |
167 | case 'signs': |
167 | // Управление подписями (rpm)
|
168 | // Управление подписями (rpm)
|
168 | $body = "<h3>Управление подписями репозиториев</h3>"; |
169 | $body = "<h3>Управление подписями репозиториев</h3>"; |
169 | switch ($action) { |
170 | switch ($action) { |
170 | case 'view': |
171 | case 'view': |
171 | $body .= "<p><a href='".$manager."?mode=signs&action=new'>Добавить новую подпись репозитория</a></p>"; |
172 | $body .= "<p><a href='".$manager."?mode=signs&action=new'>Добавить новую подпись репозитория</a></p>"; |
172 | $body .= $core->showSignsList("signs", $manager); |
173 | $body .= $core->showSignsList("signs", $manager); |
173 | break; |
174 | break; |
174 | case 'edit': |
175 | case 'edit': |
175 | $body .= "<form action='".$process."' method='post'>\n"; |
176 | $body .= "<form action='".$process."' method='post'>\n"; |
176 | $body .= "<input type='hidden' name='mode' value='sign-edit'>\n"; |
177 | $body .= "<input type='hidden' name='mode' value='sign-edit'>\n"; |
177 | $body .= "<input type='hidden' name='signID' value='".$uuid."'>\n"; |
178 | $body .= "<input type='hidden' name='signID' value='".$uuid."'>\n"; |
178 | $body .= $core->showSignsForm($uuid, "Редактирование информации о подписи"); |
179 | $body .= $core->showSignsForm($uuid, "Редактирование информации о подписи"); |
179 | $body .= "</form>"; |
180 | $body .= "</form>"; |
180 | break; |
181 | break; |
181 | case 'delete': |
182 | case 'delete': |
182 | $body .= "<form action='".$process."' method='post'>\n"; |
183 | $body .= "<form action='".$process."' method='post'>\n"; |
183 | $body .= "<input type='hidden' name='mode' value='sign-delete'>\n"; |
184 | $body .= "<input type='hidden' name='mode' value='sign-delete'>\n"; |
184 | $body .= "<input type='hidden' name='signID' value='".$uuid."'>\n"; |
185 | $body .= "<input type='hidden' name='signID' value='".$uuid."'>\n"; |
185 | $body .= $core->showSignsForm($uuid, "Удаление информации о подписи"); |
186 | $body .= $core->showSignsForm($uuid, "Удаление информации о подписи"); |
186 | $body .= "</form>"; |
187 | $body .= "</form>"; |
187 | break; |
188 | break; |
188 | case 'new': |
189 | case 'new': |
189 | $body .= "<form action='".$process."' method='post'>\n"; |
190 | $body .= "<form action='".$process."' method='post'>\n"; |
190 | $body .= "<input type='hidden' name='mode' value='sign-add'>\n"; |
191 | $body .= "<input type='hidden' name='mode' value='sign-add'>\n"; |
191 | $body .= $core->showSignsForm(0, "Добавление новой подписи"); |
192 | $body .= $core->showSignsForm(0, "Добавление новой подписи"); |
192 | $body .= "</form>"; |
193 | $body .= "</form>"; |
- | 194 | break; |
|
- | 195 | }
|
|
- | 196 | $tmpl->assign('header', "CPanel"); |
|
- | 197 | $tmpl->assign('description', "Панель управления генератором"); |
|
- | 198 | $tmpl->assign('body', $body); |
|
- | 199 | $tmpl->display('manager.tpl'); |
|
- | 200 | break; |
|
- | 201 | case 'archs': |
|
- | 202 | // Управление архитектурами
|
|
- | 203 | $body = "<h3>Управление архитектурами</h3>"; |
|
- | 204 | switch ($action) { |
|
- | 205 | case 'view': |
|
- | 206 | $body .= "<p><a href='".$manager."?mode=archs&action=new'>Добавить новую архитектуру</a></p>"; |
|
- | 207 | $body .= $core->showArchList("archs", $manager, "list"); |
|
- | 208 | break; |
|
- | 209 | case 'edit': |
|
- | 210 | $body .= "<form action='".$process."' method='post'>\n"; |
|
- | 211 | $body .= "<input type='hidden' name='mode' value='arch-edit'>\n"; |
|
- | 212 | $body .= "<input type='hidden' name='archID' value='".$uuid."'>\n"; |
|
- | 213 | $body .= $core->showArchForm($uuid, "Редактирование информации об архитектуре"); |
|
- | 214 | $body .= "</form>"; |
|
- | 215 | break; |
|
- | 216 | case 'delete': |
|
- | 217 | $body .= "<form action='".$process."' method='post'>\n"; |
|
- | 218 | $body .= "<input type='hidden' name='mode' value='arch-delete'>\n"; |
|
- | 219 | $body .= "<input type='hidden' name='archID' value='".$uuid."'>\n"; |
|
- | 220 | $body .= $core->showArchForm($uuid, "Удаление информации об архитектуре"); |
|
- | 221 | $body .= "</form>"; |
|
- | 222 | break; |
|
- | 223 | case 'new': |
|
- | 224 | $body .= "<form action='".$process."' method='post'>\n"; |
|
- | 225 | $body .= "<input type='hidden' name='mode' value='arch-add'>\n"; |
|
- | 226 | $body .= $core->showArchForm(0, "Добавление новой архитектуре"); |
|
- | 227 | $body .= "</form>"; |
|
193 | break; |
228 | break; |
194 | }
|
229 | }
|
195 | $tmpl->assign('header', "CPanel"); |
230 | $tmpl->assign('header', "CPanel"); |
196 | $tmpl->assign('description', "Панель управления генератором"); |
231 | $tmpl->assign('description', "Панель управления генератором"); |
197 | $tmpl->assign('body', $body); |
232 | $tmpl->assign('body', $body); |
198 | $tmpl->display('manager.tpl'); |
233 | $tmpl->display('manager.tpl'); |
199 | break; |
234 | break; |
200 | case 'repositories': |
235 | case 'repositories': |
201 | // Управление репозиториями
|
236 | // Управление репозиториями
|
202 | $body = "<h3>Управление репозиториями</h3>"; |
237 | $body = "<h3>Управление репозиториями</h3>"; |
203 | switch ($action) { |
238 | switch ($action) { |
204 | case 'view': |
239 | case 'view': |
205 | $body .= "<ul><li><a href='".$manager."?mode=repositories&action=new-rpm'>Добавить новый rpm-репозиторий (мастер)</a></li>"; |
240 | $body .= "<ul><li><a href='".$manager."?mode=repositories&action=new-rpm'>Добавить новый rpm-репозиторий (мастер)</a></li>"; |
206 | $body .= "<li><a href='".$manager."?mode=repositories&action=new-deb'>Добавить новый deb-репозиторий (мастер)</a></li>"; |
241 | $body .= "<li><a href='".$manager."?mode=repositories&action=new-deb'>Добавить новый deb-репозиторий (мастер)</a></li>"; |
207 | $body .= "<li><a href='".$manager."?mode=repositories&action=new'>Добавить новый репозиторий (“хакерский” способ)</a></li></ul>"; |
242 | $body .= "<li><a href='".$manager."?mode=repositories&action=new'>Добавить новый репозиторий (“хакерский” способ)</a></li></ul>"; |
208 | $body .= $core->showRepositoriesList("repositories", $manager, "list"); |
243 | $body .= $core->showRepositoriesList("repositories", $manager, "list"); |
209 | break; |
244 | break; |
210 | case 'edit': |
245 | case 'edit': |
211 | $body .= "<form action='".$process."' method='post'>\n"; |
246 | $body .= "<form action='".$process."' method='post'>\n"; |
212 | $body .= "<input type='hidden' name='mode' value='repositories-edit'>\n"; |
247 | $body .= "<input type='hidden' name='mode' value='repositories-edit'>\n"; |
213 | $body .= "<input type='hidden' name='repositoriesID' value='".$uuid."'>\n"; |
248 | $body .= "<input type='hidden' name='repositoriesID' value='".$uuid."'>\n"; |
214 | $body .= $core->showRepositoriesForm($uuid, "Редактирование информации о репозитории"); |
249 | $body .= $core->showRepositoriesForm($uuid, "Редактирование информации о репозитории"); |
215 | $body .= "</form>"; |
250 | $body .= "</form>"; |
216 | break; |
251 | break; |
217 | case 'delete': |
252 | case 'delete': |
218 | $body .= "<form action='".$process."' method='post'>\n"; |
253 | $body .= "<form action='".$process."' method='post'>\n"; |
219 | $body .= "<input type='hidden' name='mode' value='repositories-delete'>\n"; |
254 | $body .= "<input type='hidden' name='mode' value='repositories-delete'>\n"; |
220 | $body .= "<input type='hidden' name='repositoriesID' value='".$uuid."'>\n"; |
255 | $body .= "<input type='hidden' name='repositoriesID' value='".$uuid."'>\n"; |
221 | $body .= $core->showRepositoriesForm($uuid, "Удаление информации о репозитории"); |
256 | $body .= $core->showRepositoriesForm($uuid, "Удаление информации о репозитории"); |
222 | $body .= "</form>"; |
257 | $body .= "</form>"; |
223 | break; |
258 | break; |
224 | case 'new-rpm': |
259 | case 'new-rpm': |
225 | $body .= "<form action='".$process."' method='post'>\n"; |
260 | $body .= "<form action='".$process."' method='post'>\n"; |
226 | $body .= "<input type='hidden' name='mode' value='repositories-add-rpm'>\n"; |
261 | $body .= "<input type='hidden' name='mode' value='repositories-add-rpm'>\n"; |
227 | $body .= $core->showRepositoriesForm(0, "Добавление нового rpm-репозитория", "rpm"); |
262 | $body .= $core->showRepositoriesForm(0, "Добавление нового rpm-репозитория", "rpm"); |
228 | $body .= "</form>"; |
263 | $body .= "</form>"; |
229 | break; |
264 | break; |
230 | case 'new-deb': |
265 | case 'new-deb': |
231 | $body .= "<form action='".$process."' method='post'>\n"; |
266 | $body .= "<form action='".$process."' method='post'>\n"; |
232 | $body .= "<input type='hidden' name='mode' value='repositories-add-deb'>\n"; |
267 | $body .= "<input type='hidden' name='mode' value='repositories-add-deb'>\n"; |
233 | $body .= $core->showRepositoriesForm(0, "Добавление нового deb-репозитория", "deb"); |
268 | $body .= $core->showRepositoriesForm(0, "Добавление нового deb-репозитория", "deb"); |
234 | $body .= "</form>"; |
269 | $body .= "</form>"; |
235 | break; |
270 | break; |
236 | case 'new': |
271 | case 'new': |
237 | $body .= "<form action='".$process."' method='post'>\n"; |
272 | $body .= "<form action='".$process."' method='post'>\n"; |
238 | $body .= "<input type='hidden' name='mode' value='repositories-add'>\n"; |
273 | $body .= "<input type='hidden' name='mode' value='repositories-add'>\n"; |
239 | $body .= "<fieldset><legend>Добавление нового репозитория</legend>\n"; |
274 | $body .= "<fieldset><legend>Добавление нового репозитория</legend>\n"; |
240 | $body .= "<div class='inputbox'><label for='repscheme'>Строка sources.list:</label> <input type='text' id='repscheme' name='repscheme' value=''></div>\n"; |
275 | $body .= "<div class='inputbox'><label for='repscheme'>Строка sources.list:</label> <input type='text' id='repscheme' name='repscheme' value=''></div>\n"; |
241 | $body .= "<div class='inputbox'><input type='submit' value=' Обработать строку '></div>\n"; |
276 | $body .= "<div class='inputbox'><input type='submit' value=' Обработать строку '></div>\n"; |
242 | $body .= "</fieldset></form>"; |
277 | $body .= "</fieldset></form>"; |
243 | break; |
278 | break; |
244 | }
|
279 | }
|
245 | 280 | ||
246 | $tmpl->assign('header', "CPanel"); |
281 | $tmpl->assign('header', "CPanel"); |
247 | $tmpl->assign('description', "Панель управления генератором"); |
282 | $tmpl->assign('description', "Панель управления генератором"); |
248 | $tmpl->assign('body', $body); |
283 | $tmpl->assign('body', $body); |
249 | $tmpl->display('manager.tpl'); |
284 | $tmpl->display('manager.tpl'); |
250 | break; |
285 | break; |
251 | case 'settings': |
286 | case 'settings': |
252 | // Настройки генератора
|
287 | // Настройки генератора
|
253 | $body = "Функционал еще не готов"; |
288 | $body = "Функционал еще не готов"; |
254 | 289 | ||
255 | $tmpl->assign('header', "CPanel"); |
290 | $tmpl->assign('header', "CPanel"); |
256 | $tmpl->assign('description', "Панель управления генератором"); |
291 | $tmpl->assign('description', "Панель управления генератором"); |
257 | $tmpl->assign('body', $body); |
292 | $tmpl->assign('body', $body); |
258 | $tmpl->display('manager.tpl'); |
293 | $tmpl->display('manager.tpl'); |
259 | break; |
294 | break; |
260 | }
|
295 | }
|
261 | 296 | ||
262 | ?>
|
297 | ?>
|
263 | 298 |