"<?php echo $_POST['service'] == $it['class'] ? ' selected' : ''; ?> ><?php echo $it['pseudonym']; ?> </option> <?php } ?> </select> <h3>Настройки</h3><div id="hr"></div> <?php for ($i = 0; $i < count($list); $i++) { $it = $list[$i]; $c = manage_spawn_service(-1, $it['class']); $vis = false; if ($_POST['service'] == $it['class']) { $vis = true; } else { if ($_POST['service'] == '' && $i == 0) { $vis = true; } } ?> <div id="service_settings_<?php echo $it['class']; ?> "<?php echo $vis ? '' : ' style="display: none;"'; ?>
/** * Gate - Wiki engine and web-interface for WebTester Server * * Service edtit form generator * * Copyright (c) 2008-2009 Sergey I. Sharybin <*****@*****.**> * * This program can be distributed under the terms of the GNU GPL. * See the file COPYING. */ if ($PHP_SELF != '') { print 'HACKERS?'; die; } global $id; $d = manage_spawn_service($id); formo('title=Информация о сервисе;'); ?> <script language="JavaScript" type="text/javascript"> function check (frm) { var name = getElementById ('name').value; if (qtrim (name) == '') { alert ('Нельзя сменить имя сервиса на пустое.'); return false; } frm.submit (); } </script>
function manage_service_create() { $c = manage_spawn_service(-1, $_POST['service']); $c->CreateReceived(); service_append($c); }