Редакция 578 | К новейшей редакции | Только различия | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 578 | Редакция 582 | ||
---|---|---|---|
1 | <?php
|
1 | <?php
|
2 | 2 | ||
3 | /**
|
3 | /**
|
4 | *
|
4 | *
|
5 | * Codename: ant-ng - generator of sources.list for apt-distributives
|
5 | * Codename: ant-ng - generator of sources.list for apt-distributives
|
6 | * http://alex-w.org.ru/p/antng/
|
6 | * http://alex-w.org.ru/p/antng/
|
7 | *
|
7 | *
|
8 | * Copyright (c) 2009 Alexander Wolf
|
8 | * Copyright (c) 2009 Alexander Wolf
|
9 | * Dual licensed under the MIT and GNU LGPL licenses.
|
9 | * Dual licensed under the MIT and GNU LGPL licenses.
|
10 | * http://alex-w.org.ru/p/antng/license
|
10 | * http://alex-w.org.ru/p/antng/license
|
11 | *
|
11 | *
|
12 | */
|
12 | */
|
13 | 13 | ||
14 | require_once dirname(__FILE__)."/init.php"; |
14 | require_once dirname(__FILE__)."/init.php"; |
15 | 15 | ||
16 | $mode = $_POST["mode"]; |
16 | $mode = $_POST["mode"]; |
17 | 17 | ||
18 | switch ($mode) { |
18 | switch ($mode) { |
19 | case 'authorize': |
19 | case 'authorize': |
20 | $r = $core->checkSign($_POST["word"]); |
20 | $r = $core->checkSign($_POST["word"]); |
21 | header("Location: ".$r["Location"]."\n\n"); |
21 | header("Location: ".$r["Location"]."\n\n"); |
22 | break; |
22 | break; |
23 | case 'distributive-add': |
23 | case 'distributive-add': |
24 | // Добавление нового дистрибутива
|
24 | // Добавление нового дистрибутива
|
25 | $DName = $secure->checkStr($_POST["dname"],1); |
25 | $DName = $secure->checkStr($_POST["dname"],1); |
26 | $DUA = $secure->checkStr($_POST["dua"],1); |
26 | $DUA = $secure->checkStr($_POST["dua"],1); |
27 | $DType = $secure->checkInt($_POST["dtype"]); |
27 | $DType = $secure->checkInt($_POST["dtype"]); |
28 | $DLogo = 0; |
28 | $DLogo = 0; |
29 | 29 | ||
30 | if ($_FILES["distlogo"]["type"]!="") { |
30 | if ($_FILES["distlogo"]["type"]!="") { |
31 | $DLogo = $core->uploadPicture($picture, $DUA, $_FILES); |
31 | $DLogo = $core->uploadPicture($picture, $DUA, $_FILES); |
32 | }
|
32 | }
|
33 | 33 | ||
34 | $r = $core->addDistribution($DName, $DType, $DUA, $DLogo); |
34 | $r = $core->addDistribution($DName, $DType, $DUA, $DLogo); |
35 | if ($r["ERR"]==0) { |
35 | if ($r["ERR"]==0) { |
36 | header("Location: ".$manager."\n\n"); |
36 | header("Location: ".$manager."\n\n"); |
37 | } else { |
37 | } else { |
38 | echo $r["ERRINFO"]; |
38 | echo $r["ERRINFO"]; |
39 | }
|
39 | }
|
40 | 40 | ||
41 | break; |
41 | break; |
42 | case 'distributive-edit': |
42 | case 'distributive-edit': |
43 | // Редактирование информации о дистрибутиве
|
43 | // Редактирование информации о дистрибутиве
|
44 | $ID = $secure->checkInt($_POST["distID"]); |
44 | $ID = $secure->checkInt($_POST["distID"]); |
45 | $DName = $secure->checkStr($_POST["dname"],1); |
45 | $DName = $secure->checkStr($_POST["dname"],1); |
46 | $DUA = $secure->checkStr($_POST["dua"],1); |
46 | $DUA = $secure->checkStr($_POST["dua"],1); |
47 | $DType = $secure->checkInt($_POST["dtype"]); |
47 | $DType = $secure->checkInt($_POST["dtype"]); |
48 | 48 | ||
49 | 49 | ||
50 | if ($_FILES["distlogo"]["type"]!="") { |
50 | if ($_FILES["distlogo"]["type"]!="") { |
51 | $DLogo = $core->uploadPicture($picture, $DUA, $_FILES); |
51 | $DLogo = $core->uploadPicture($picture, $DUA, $_FILES); |
52 | $r = $core->updateDistribution($ID, $DName, $DType, $DUA, $DLogo); |
52 | $r = $core->updateDistribution($ID, $DName, $DType, $DUA, $DLogo); |
53 | }
|
53 | }
|
54 | 54 | ||
55 | $r = $core->updateDistribution($ID, $DName, $DType, $DUA); |
55 | $r = $core->updateDistribution($ID, $DName, $DType, $DUA); |
56 | if ($r["ERR"]==0) { |
56 | if ($r["ERR"]==0) { |
57 | header("Location: ".$manager."\n\n"); |
57 | header("Location: ".$manager."\n\n"); |
58 | } else { |
58 | } else { |
59 | echo $r["ERRINFO"]; |
59 | echo $r["ERRINFO"]; |
60 | }
|
60 | }
|
61 | 61 | ||
62 | break; |
62 | break; |
63 | case 'distributive-delete': |
63 | case 'distributive-delete': |
64 | // Удаление информации о дистрибутиве
|
64 | // Удаление информации о дистрибутиве
|
65 | $ID = $secure->checkInt($_POST["distID"]); |
65 | $ID = $secure->checkInt($_POST["distID"]); |
66 | 66 | ||
67 | $r = $core->dropDistribution($ID); |
67 | $r = $core->dropDistribution($ID); |
68 | if ($r["ERR"]==0) { |
68 | if ($r["ERR"]==0) { |
69 | header("Location: ".$manager."\n\n"); |
69 | header("Location: ".$manager."\n\n"); |
70 | } else { |
70 | } else { |
71 | echo $r["ERRINFO"]; |
71 | echo $r["ERRINFO"]; |
72 | }
|
72 | }
|
73 | 73 | ||
74 | break; |
74 | break; |
75 | case 'version-add': |
75 | case 'version-add': |
76 | // Добавление новой версии дистрибутива
|
76 | // Добавление новой версии дистрибутива
|
77 | $DistID = $secure->checkInt($_POST["distname"]); |
77 | $DistID = $secure->checkInt($_POST["distname"]); |
78 | $VName = $secure->checkStr($_POST["vname"],1); |
78 | $VName = $secure->checkStr($_POST["vname"],1); |
79 | $VNmbr = $secure->checkStr($_POST["version"],1); |
79 | $VNmbr = $secure->checkStr($_POST["version"],1); |
80 | $VCNme = $secure->checkStr($_POST["vcodename"],1); |
80 | $VCNme = $secure->checkStr($_POST["vcodename"],1); |
81 | 81 | ||
82 | $r = $core->addDistVersion($DistID, $VNmbr, $VName, $VCNme); |
82 | $r = $core->addDistVersion($DistID, $VNmbr, $VName, $VCNme); |
83 | if ($r["ERR"]==0) { |
83 | if ($r["ERR"]==0) { |
84 | header("Location: ".$manager."\n\n"); |
84 | header("Location: ".$manager."\n\n"); |
85 | } else { |
85 | } else { |
86 | echo $r["ERRINFO"]; |
86 | echo $r["ERRINFO"]; |
87 | }
|
87 | }
|
88 | 88 | ||
89 | break; |
89 | break; |
90 | case 'version-edit': |
90 | case 'version-edit': |
91 | // Редактирование версии дистрибутива
|
91 | // Редактирование версии дистрибутива
|
92 | $versID = $secure->checkInt($_POST["versionID"]); |
92 | $versID = $secure->checkInt($_POST["versionID"]); |
93 | $VName = $secure->checkStr($_POST["vname"],1); |
93 | $VName = $secure->checkStr($_POST["vname"],1); |
94 | $VNmbr = $secure->checkStr($_POST["version"],1); |
94 | $VNmbr = $secure->checkStr($_POST["version"],1); |
95 | $VCNme = $secure->checkStr($_POST["vcodename"],1); |
95 | $VCNme = $secure->checkStr($_POST["vcodename"],1); |
96 | 96 | ||
97 | $r = $core->updateDistVersion($versID, $VNmbr, $VName, $VCNme); |
97 | $r = $core->updateDistVersion($versID, $VNmbr, $VName, $VCNme); |
98 | if ($r["ERR"]==0) { |
98 | if ($r["ERR"]==0) { |
99 | header("Location: ".$manager."\n\n"); |
99 | header("Location: ".$manager."\n\n"); |
100 | } else { |
100 | } else { |
101 | echo $r["ERRINFO"]; |
101 | echo $r["ERRINFO"]; |
102 | }
|
102 | }
|
103 | 103 | ||
104 | break; |
104 | break; |
105 | case 'version-delete': |
105 | case 'version-delete': |
106 | // Удаление версии дистрибутива
|
106 | // Удаление версии дистрибутива
|
107 | $versID = $secure->checkInt($_POST["versionID"]); |
107 | $versID = $secure->checkInt($_POST["versionID"]); |
108 | 108 | ||
109 | $r = $core->dropDistVersion($versID); |
109 | $r = $core->dropDistVersion($versID); |
110 | if ($r["ERR"]==0) { |
110 | if ($r["ERR"]==0) { |
111 | header("Location: ".$manager."\n\n"); |
111 | header("Location: ".$manager."\n\n"); |
112 | } else { |
112 | } else { |
113 | echo $r["ERRINFO"]; |
113 | echo $r["ERRINFO"]; |
114 | }
|
114 | }
|
115 | 115 | ||
116 | break; |
116 | break; |
117 | case 'section-add': |
117 | case 'section-add': |
118 | // Добавление новой секции
|
118 | // Добавление новой секции
|
119 | $SName = $secure->checkStr($_POST["sname"],1); |
119 | $SName = $secure->checkStr($_POST["sname"],1); |
120 | $SInfo = $secure->checkStr($_POST["sinfo"],1); |
120 | $SInfo = $secure->checkStr($_POST["sinfo"],1); |
121 | 121 | ||
122 | $r = $core->addSection($SName, $SInfo); |
122 | $r = $core->addSection($SName, $SInfo); |
123 | if ($r["ERR"]==0) { |
123 | if ($r["ERR"]==0) { |
124 | header("Location: ".$manager."\n\n"); |
124 | header("Location: ".$manager."\n\n"); |
125 | } else { |
125 | } else { |
126 | echo $r["ERRINFO"]; |
126 | echo $r["ERRINFO"]; |
127 | }
|
127 | }
|
128 | 128 | ||
129 | break; |
129 | break; |
130 | case 'section-edit': |
130 | case 'section-edit': |
131 | // Редактирование информации о секции
|
131 | // Редактирование информации о секции
|
132 | $sectID = $secure->checkInt($_POST["sectionID"]); |
132 | $sectID = $secure->checkInt($_POST["sectionID"]); |
133 | $SName = $secure->checkStr($_POST["sname"],1); |
133 | $SName = $secure->checkStr($_POST["sname"],1); |
134 | $SInfo = $secure->checkStr($_POST["sinfo"],1); |
134 | $SInfo = $secure->checkStr($_POST["sinfo"],1); |
135 | 135 | ||
136 | $r = $core->updateSection($sectID, $SName, $SInfo); |
136 | $r = $core->updateSection($sectID, $SName, $SInfo); |
137 | if ($r["ERR"]==0) { |
137 | if ($r["ERR"]==0) { |
138 | header("Location: ".$manager."\n\n"); |
138 | header("Location: ".$manager."\n\n"); |
139 | } else { |
139 | } else { |
140 | echo $r["ERRINFO"]; |
140 | echo $r["ERRINFO"]; |
141 | }
|
141 | }
|
142 | 142 | ||
143 | break; |
143 | break; |
144 | case 'section-delete': |
144 | case 'section-delete': |
145 | // Удаление информации о секции
|
145 | // Удаление информации о секции
|
146 | $sectID = $secure->checkInt($_POST["sectionID"]); |
146 | $sectID = $secure->checkInt($_POST["sectionID"]); |
147 | 147 | ||
148 | $r = $core->dropSection($sectID); |
148 | $r = $core->dropSection($sectID); |
149 | if ($r["ERR"]==0) { |
149 | if ($r["ERR"]==0) { |
150 | header("Location: ".$manager."\n\n"); |
150 | header("Location: ".$manager."\n\n"); |
151 | } else { |
151 | } else { |
152 | echo $r["ERRINFO"]; |
152 | echo $r["ERRINFO"]; |
153 | }
|
153 | }
|
154 | 154 | ||
155 | break; |
155 | break; |
156 | case 'sign-add': |
156 | case 'sign-add': |
157 | // Добавление новой подписи
|
157 | // Добавление новой подписи
|
158 | $SName = $secure->checkStr($_POST["sname"],1); |
158 | $SName = $secure->checkStr($_POST["sname"],1); |
159 | $SInfo = $secure->checkStr($_POST["sinfo"],1); |
159 | $SInfo = $secure->checkStr($_POST["sinfo"],1); |
160 | 160 | ||
161 | $r = $core->addSign($SName, $SInfo); |
161 | $r = $core->addSign($SName, $SInfo); |
162 | if ($r["ERR"]==0) { |
162 | if ($r["ERR"]==0) { |
163 | header("Location: ".$manager."\n\n"); |
163 | header("Location: ".$manager."\n\n"); |
164 | } else { |
164 | } else { |
165 | echo $r["ERRINFO"]; |
165 | echo $r["ERRINFO"]; |
166 | }
|
166 | }
|
167 | 167 | ||
168 | break; |
168 | break; |
169 | case 'sign-edit': |
169 | case 'sign-edit': |
170 | // Редактирование информации о подписи
|
170 | // Редактирование информации о подписи
|
171 | $signID = $secure->checkInt($_POST["signID"]); |
171 | $signID = $secure->checkInt($_POST["signID"]); |
172 | $SName = $secure->checkStr($_POST["sname"],1); |
172 | $SName = $secure->checkStr($_POST["sname"],1); |
173 | $SInfo = $secure->checkStr($_POST["sinfo"],1); |
173 | $SInfo = $secure->checkStr($_POST["sinfo"],1); |
174 | 174 | ||
175 | $r = $core->updateSign($signID, $SName, $SInfo); |
175 | $r = $core->updateSign($signID, $SName, $SInfo); |
176 | if ($r["ERR"]==0) { |
176 | if ($r["ERR"]==0) { |
177 | header("Location: ".$manager."\n\n"); |
177 | header("Location: ".$manager."\n\n"); |
178 | } else { |
178 | } else { |
179 | echo $r["ERRINFO"]; |
179 | echo $r["ERRINFO"]; |
180 | }
|
180 | }
|
181 | 181 | ||
182 | break; |
182 | break; |
183 | case 'sign-delete': |
183 | case 'sign-delete': |
184 | // Удаление информации о подписи
|
184 | // Удаление информации о подписи
|
185 | $signID = $secure->checkInt($_POST["signID"]); |
185 | $signID = $secure->checkInt($_POST["signID"]); |
186 | 186 | ||
187 | $r = $core->dropSign($signID); |
187 | $r = $core->dropSign($signID); |
188 | if ($r["ERR"]==0) { |
188 | if ($r["ERR"]==0) { |
189 | header("Location: ".$manager."\n\n"); |
189 | header("Location: ".$manager."\n\n"); |
190 | } else { |
190 | } else { |
191 | echo $r["ERRINFO"]; |
191 | echo $r["ERRINFO"]; |
192 | }
|
192 | }
|
193 | 193 | ||
194 | break; |
194 | break; |
195 | case 'arch-add': |
195 | case 'arch-add': |
196 | // Добавление новой архитектуры
|
196 | // Добавление новой архитектуры
|
197 | $arch = $secure->checkStr($_POST["arch"],1); |
197 | $arch = $secure->checkStr($_POST["arch"],1); |
198 | 198 | ||
199 | $r = $core->addArch($arch); |
199 | $r = $core->addArch($arch); |
200 | if ($r["ERR"]==0) { |
200 | if ($r["ERR"]==0) { |
201 | header("Location: ".$manager."\n\n"); |
201 | header("Location: ".$manager."\n\n"); |
202 | } else { |
202 | } else { |
203 | echo $r["ERRINFO"]; |
203 | echo $r["ERRINFO"]; |
204 | }
|
204 | }
|
205 | 205 | ||
206 | break; |
206 | break; |
207 | case 'arch-edit': |
207 | case 'arch-edit': |
208 | // Редактирование архитектуры
|
208 | // Редактирование архитектуры
|
209 | $archID = $secure->checkInt($_POST["archID"]); |
209 | $archID = $secure->checkInt($_POST["archID"]); |
210 | $arch = $secure->checkStr($_POST["arch"],1); |
210 | $arch = $secure->checkStr($_POST["arch"],1); |
211 | 211 | ||
212 | $r = $core->updateArch($archID, $arch); |
212 | $r = $core->updateArch($archID, $arch); |
213 | if ($r["ERR"]==0) { |
213 | if ($r["ERR"]==0) { |
214 | header("Location: ".$manager."\n\n"); |
214 | header("Location: ".$manager."\n\n"); |
215 | } else { |
215 | } else { |
216 | echo $r["ERRINFO"]; |
216 | echo $r["ERRINFO"]; |
217 | }
|
217 | }
|
218 | 218 | ||
219 | break; |
219 | break; |
220 | case 'arch-delete': |
220 | case 'arch-delete': |
221 | // Удаление архитектуры
|
221 | // Удаление архитектуры
|
222 | $archID = $secure->checkInt($_POST["archID"]); |
222 | $archID = $secure->checkInt($_POST["archID"]); |
223 | 223 | ||
224 | $r = $core->dropArch($archID); |
224 | $r = $core->dropArch($archID); |
225 | if ($r["ERR"]==0) { |
225 | if ($r["ERR"]==0) { |
226 | header("Location: ".$manager."\n\n"); |
226 | header("Location: ".$manager."\n\n"); |
227 | } else { |
227 | } else { |
228 | echo $r["ERRINFO"]; |
228 | echo $r["ERRINFO"]; |
229 | }
|
229 | }
|
230 | 230 | ||
231 | break; |
231 | break; |
232 | case 'scheme-add': |
232 | case 'scheme-add': |
233 | // Добавление новой схемы репозитория
|
233 | // Добавление новой схемы репозитория
|
234 | $scheme = $secure->checkStr($_POST["scheme"],1); |
234 | $scheme = $secure->checkStr($_POST["scheme"],1); |
235 | 235 | ||
236 | $r = $core->addScheme($scheme); |
236 | $r = $core->addScheme($scheme); |
237 | if ($r["ERR"]==0) { |
237 | if ($r["ERR"]==0) { |
238 | header("Location: ".$manager."\n\n"); |
238 | header("Location: ".$manager."\n\n"); |
239 | } else { |
239 | } else { |
240 | echo $r["ERRINFO"]; |
240 | echo $r["ERRINFO"]; |
241 | }
|
241 | }
|
242 | 242 | ||
243 | break; |
243 | break; |
244 | case 'scheme-edit': |
244 | case 'scheme-edit': |
245 | // Редактирование схемы репозитория
|
245 | // Редактирование схемы репозитория
|
246 | $schemeID = $secure->checkInt($_POST["schemeID"]); |
246 | $schemeID = $secure->checkInt($_POST["schemeID"]); |
247 | $scheme = $secure->checkStr($_POST["scheme"],1); |
247 | $scheme = $secure->checkStr($_POST["scheme"],1); |
248 | 248 | ||
249 | $r = $core->updateScheme($schemeID, $scheme); |
249 | $r = $core->updateScheme($schemeID, $scheme); |
250 | if ($r["ERR"]==0) { |
250 | if ($r["ERR"]==0) { |
251 | header("Location: ".$manager."\n\n"); |
251 | header("Location: ".$manager."\n\n"); |
252 | } else { |
252 | } else { |
253 | echo $r["ERRINFO"]; |
253 | echo $r["ERRINFO"]; |
254 | }
|
254 | }
|
255 | 255 | ||
256 | break; |
256 | break; |
257 | case 'scheme-delete': |
257 | case 'scheme-delete': |
258 | // Удаление схемы репозитория
|
258 | // Удаление схемы репозитория
|
259 | $schemeID = $secure->checkInt($_POST["schemeID"]); |
259 | $schemeID = $secure->checkInt($_POST["schemeID"]); |
260 | 260 | ||
261 | $r = $core->dropScheme($schemeID); |
261 | $r = $core->dropScheme($schemeID); |
262 | if ($r["ERR"]==0) { |
262 | if ($r["ERR"]==0) { |
263 | header("Location: ".$manager."\n\n"); |
263 | header("Location: ".$manager."\n\n"); |
264 | } else { |
264 | } else { |
265 | echo $r["ERRINFO"]; |
265 | echo $r["ERRINFO"]; |
266 | }
|
266 | }
|
267 | 267 | ||
268 | break; |
268 | break; |
269 | case 'proto-add': |
269 | case 'proto-add': |
270 | // Добавление протокола доступа
|
270 | // Добавление протокола доступа
|
271 | $proto = $secure->checkStr($_POST["proto"],1); |
271 | $proto = $secure->checkStr($_POST["proto"],1); |
272 | 272 | ||
273 | $r = $core->addProto($proto); |
273 | $r = $core->addProto($proto); |
274 | if ($r["ERR"]==0) { |
274 | if ($r["ERR"]==0) { |
275 | header("Location: ".$manager."\n\n"); |
275 | header("Location: ".$manager."\n\n"); |
276 | } else { |
276 | } else { |
277 | echo $r["ERRINFO"]; |
277 | echo $r["ERRINFO"]; |
278 | }
|
278 | }
|
279 | 279 | ||
280 | break; |
280 | break; |
281 | case 'proto-edit': |
281 | case 'proto-edit': |
282 | // Редактирование протокола доступа
|
282 | // Редактирование протокола доступа
|
283 | $protoID = $secure->checkInt($_POST["protoID"]); |
283 | $protoID = $secure->checkInt($_POST["protoID"]); |
284 | $proto = $secure->checkStr($_POST["proto"],1); |
284 | $proto = $secure->checkStr($_POST["proto"],1); |
285 | 285 | ||
286 | $r = $core->updateProto($protoID, $proto); |
286 | $r = $core->updateProto($protoID, $proto); |
287 | if ($r["ERR"]==0) { |
287 | if ($r["ERR"]==0) { |
288 | header("Location: ".$manager."\n\n"); |
288 | header("Location: ".$manager."\n\n"); |
289 | } else { |
289 | } else { |
290 | echo $r["ERRINFO"]; |
290 | echo $r["ERRINFO"]; |
291 | }
|
291 | }
|
292 | 292 | ||
293 | break; |
293 | break; |
294 | case 'proto-delete': |
294 | case 'proto-delete': |
295 | // Удаление протокола доступа
|
295 | // Удаление протокола доступа
|
296 | $protoID = $secure->checkInt($_POST["protoID"]); |
296 | $protoID = $secure->checkInt($_POST["protoID"]); |
297 | 297 | ||
298 | $r = $core->dropProto($protoID); |
298 | $r = $core->dropProto($protoID); |
299 | if ($r["ERR"]==0) { |
299 | if ($r["ERR"]==0) { |
300 | header("Location: ".$manager."\n\n"); |
300 | header("Location: ".$manager."\n\n"); |
301 | } else { |
301 | } else { |
302 | echo $r["ERRINFO"]; |
302 | echo $r["ERRINFO"]; |
303 | }
|
303 | }
|
304 | 304 | ||
305 | break; |
305 | break; |
- | 306 | case 'host-add': |
|
- | 307 | // Добавление хоста репозитория
|
|
- | 308 | $host = $secure->checkStr($_POST["host"],1); |
|
- | 309 | ||
- | 310 | $r = $core->addHost($host); |
|
- | 311 | if ($r["ERR"]==0) { |
|
- | 312 | header("Location: ".$manager."\n\n"); |
|
- | 313 | } else { |
|
- | 314 | echo $r["ERRINFO"]; |
|
- | 315 | }
|
|
- | 316 | ||
- | 317 | break; |
|
- | 318 | case 'host-edit': |
|
- | 319 | // Редактирование хоста репозитория
|
|
- | 320 | $hostID = $secure->checkInt($_POST["hostID"]); |
|
- | 321 | $host = $secure->checkStr($_POST["host"],1); |
|
- | 322 | ||
- | 323 | $r = $core->updateHost($hostID, $host); |
|
- | 324 | if ($r["ERR"]==0) { |
|
- | 325 | header("Location: ".$manager."\n\n"); |
|
- | 326 | } else { |
|
- | 327 | echo $r["ERRINFO"]; |
|
- | 328 | }
|
|
- | 329 | ||
- | 330 | break; |
|
- | 331 | case 'host-delete': |
|
- | 332 | // Удаление хоста репозитория
|
|
- | 333 | $hostID = $secure->checkInt($_POST["hostID"]); |
|
- | 334 | ||
- | 335 | $r = $core->dropHost($hostID); |
|
- | 336 | if ($r["ERR"]==0) { |
|
- | 337 | header("Location: ".$manager."\n\n"); |
|
- | 338 | } else { |
|
- | 339 | echo $r["ERRINFO"]; |
|
- | 340 | }
|
|
- | 341 | ||
- | 342 | break; |
|
306 | }
|
343 | }
|
307 | 344 | ||
308 | ?>
|
345 | ?>
|
309 | 346 |