示例#1
0
 function Editor_ManageScripts()
 {
     global $act;
     formo('title=Управление скрптами отображения списка публикаций;');
     if ($act == 'save') {
         $this->settings['script'] = manage_template_receive_from_selector($this->GetClassName() . '_list');
         $this->settings['itemScript'] = manage_template_receive_from_selector($this->GetClassName() . '_short');
         $this->settings['fullScript'] = manage_template_receive_from_selector($this->GetClassName() . '_full');
         $this->SaveSettings();
     }
     settings_formo(content_url_get_full() . '&act=save');
     println('Скрипт отображения списка публикаций:');
     manage_template_draw_selector_for_script($this->GetClassName() . '_list', $this->settings['script']);
     println('<div id="hr"></div>');
     println('Скрипт отображения публикации:');
     manage_template_draw_selector_for_script($this->GetClassName() . '_short', $this->settings['itemScript']);
     println('<div id="hr"></div>');
     if ($this->settings['detailed']) {
         println('Скрипт отображения подробной публикации:');
         manage_template_draw_selector_for_script($this->GetClassName() . '_full', $this->settings['fullScript']);
         println('<div id="hr"></div>');
     }
     settings_formc();
     formc();
 }
示例#2
0
文件: list.php 项目: Nazg-Gul/gate
/**
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Templates list displaying script
 *
 * 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;
}
formo('title=Список существующих хранилищ данных;');
?>
  <table class="list smb">
    <tr class="h">
      <th class="n first">№</th><th>Название</th><th width="48" class="last">&nbsp;</th></tr>
<?php 
for ($i = 0; $i < count($list); $i++) {
    $r = $list[$i];
    $d = $r->RefCount() == 0;
    ?>
    <tr<?php 
    echo $i < count($list) - 1 ? '' : ' class="last"';
    ?>
><td class="n"><?php 
    echo $i + 1;
    ?>
示例#3
0
文件: list.php 项目: Nazg-Gul/gate
/**
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Script for servicdes list generation
 *
 * 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;
}
formo('title=Список существующих сервисов;');
?>
  <table class="list smb">
    <tr class="h"><th class="n first">№</th><th width="40%">Название</th><th>Базовый класс</th><th width="48" class="last">&nbsp;</th></tr>
<?php 
$n = count($list);
$titles = array();
$classes = content_Registered_SClasses();
for ($i = 0; $i < count($classes); $i++) {
    $titles[$classes[$i]['class']] = $classes[$i]['pseudonym'];
}
for ($i = 0; $i < $n; $i++) {
    $it = $list[$i];
    $className = $titles[$it['sclass']];
    $d = true;
    ?>
示例#4
0
文件: edit.php 项目: Nazg-Gul/gate
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Edit group script
 *
 * 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 = group_get_by_id($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>

<form action=".?action=save&id=<?php 
echo $id;
?>
示例#5
0
文件: list.php 项目: Nazg-Gul/gate
/**
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Script for sections list generation
 *
 * 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;
}
formo('title=Список существующих разделов;');
$arr = content_Registered_CClasses();
$n = count($arr);
global $cclasses;
for ($i = 0; $i < $n; $i++) {
    $cclasses[$arr[$i]['class']] = $arr[$i]['pseudonym'];
}
?>

<script language="JavaScript" type="text/javascript">
  function update_element_parent (src, dst) {
    if (src!=1 && src!=dst)
      cnav ('Вы действительно хотите перетащить этот элемент?', '.?action=setparent&id='+src+'&pid='+dst);
  }
</script>
示例#6
0
 function Editor_Scripts()
 {
     global $act;
     if ($act == 'save') {
         $this->settings['script'] = manage_template_receive_from_selector('display');
         $this->SaveSettings();
     }
     $full = content_url_get_full();
     formo('title=Настройка скриптов');
     settings_formo($full . '&act=save');
     println('Скрипт отображения статьи:');
     manage_template_draw_selector_for_script('display', $this->settings['script']);
     settings_formc('');
     formc();
 }
示例#7
0
文件: edit.php 项目: Nazg-Gul/gate
 * 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>

<form action=".?action=save&id=<?php 
示例#8
0
文件: edit.php 项目: Nazg-Gul/gate
 *
 * This program can be distributed under the terms of the GNU GPL.
 * See the file COPYING.
 */
if ($PHP_SELF != '') {
    print 'HACKERS?';
    die;
}
global $id, $viewelement;
$d = new CDataSet();
$d->Init($id);
$refCount = manage_dataset_refcount($id);
if ($viewelement != '') {
    include 'field.php';
} else {
    formo('title=Информация о наборе данных;');
    ?>
<script language="JavaScript" type="text/javascript">
  function check (frm) {
    var className = getElementById ('className').value;
    if (qtrim (className) == '') {
      alert ('Нельзя сменить имя набора данных на пустое.');
      return false;
    }
    frm.submit ();
  }
</script>

<form action=".?action=save&id=<?php 
    echo $id;
    ?>
示例#9
0
文件: data.php 项目: Nazg-Gul/gate
  return true;
}
</script>
<?php 
            global $action;
            $f = new CVCForm();
            $f->Init('', 'action=.?id\\=' . $id . '&hash\\=' . $hash . '&action\\=save;method=POST;add_check_func=check;caption=Сменить пароль;');
            $f->AppendCustomField(array('src' => '<table class="clear" width="100%"><tr><td width="30%">Пароль</td><td style="padding: 2px;"><input type="password" class="txt block" id="passwd" name="passwd" onkeyup="check_passwd ();" onchange="check_passwd ();"></td></tr>' . '<tr><td>Подтверждение</td><td style="padding: 2px;"><input type="password" class="txt block" id="passwd_confirm" name="passwd_confirm"  onkeyup="check_passwd ();" onchange="check_passwd ();"><div id="passwd_msg"></div></td></tr>' . '</table>'));
            $draw = true;
            if ($action == 'save') {
                global $passwd, $passwd_confirm;
                $passwd = stripslashes($passwd);
                $passwd_confirm = stripslashes($passwd_confirm);
                if ($passwd != $passwd_confirm) {
                    add_info('Ошибка подьверждения пароля.');
                } else {
                    $draw = false;
                    unset($s['restore_hash']);
                    unset($s['restore_timestamp']);
                    db_update('user', array('password' => 'MD5(' . db_string(user_password_hash($r['login'], $passwd)) . ')', 'settings' => db_string(serialize($s))), '`id`=' . $r['id']);
                    add_info('Ваш пароль был успешно поменян.');
                }
            }
            if ($draw) {
                formo('title=Форма смены пароля');
                $f->Draw();
                formc();
            }
        }
    }
}
示例#10
0
 function Editor_ManageScripts()
 {
     global $act;
     formo('title=Управление скрптами отображения раздела;');
     if ($act == 'save') {
         $this->settings['script'] = manage_template_receive_from_selector($this->GetClassName() . '_display');
         $this->SaveSettings();
     }
     settings_formo(content_url_get_full() . '&act=save');
     println('Скрипт отображения статьи:');
     manage_template_draw_selector_for_script($this->GetClassName() . '_display', $this->settings['script']);
     settings_formc();
     formc();
 }
示例#11
0
        function Editor_LogManage()
        {
            global $active, $act, $CORE;
            $CORE->AddStyle('log');
            if (isset($active)) {
                if ($active == '0') {
                    $this->settings['active'] = false;
                } else {
                    $this->settings['active'] = true;
                }
                $this->UpdateSettings();
            }
            if ($act == 'free') {
                $this->FreeLogs();
            }
            redirector_add_skipvar('act', 'free');
            $url = content_url_get_full();
            $update_active = 'nav (\'' . $url . '&active=' . ($this->settings['active'] ? '0' : '1') . '\');';
            $free_logs = 'cnav (\'Вы уверены что хотите очистить все файлы журналов?\', \'' . $url . '&act=free\');';
            formo('title=Управление сервисом');
            ?>
  <input type="checkbox" class="cb" onclick="<?php 
            echo $update_active;
            ?>
" value="1"<?php 
            echo $this->settings['active'] ? ' checked' : '';
            ?>
>&nbsp;Вести журналирование <i>(если данная опция неактивна, то сервис журналирования продолжит существовать, однако все журналирование будет отключено)</i><div id="hr"></div>
  <button class="block" onclick="<?php 
            echo $free_logs;
            ?>
">Очистить файлы журналов</button>
<?php 
            formc();
        }
示例#12
0
文件: edit.php 项目: Nazg-Gul/gate
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Storage editing 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_storage($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>
<form action=".?action=save&id=<?php 
echo $id;
示例#13
0
文件: list.php 项目: Nazg-Gul/gate
/**
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Userlist generation script
 *
 * 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;
}
formo('title=Список существующих пользователей;');
$groups = group_list();
?>
  <script language="JavaScript" type="text/javascript">
    function update () {
      var group=getElementById ('showGroup').value;
      nav ('.?group='+group);
    }
  </script>
<?php 
if (count($list) > 0) {
    global $page, $group;
    $perPage = opt_get('user_count');
    if ($perPage <= 0) {
        $perpage = 10;
    }
示例#14
0
 function Draw()
 {
     global $CORE;
     if ($_GET['action'] != 'edit') {
         redirector_add_skipvar('file');
     }
     $CORE->AddStyle('xpfs-browser');
     $volumes = '';
     for ($i = 0, $n = count($this->volumes); $i < $n; ++$i) {
         $volumes .= prepare_arg('<option value="' . htmlspecialchars($this->volumes[$i]) . '"' . ($this->volume == $this->volumes[$i] ? ' selected' : '') . '>' . htmlspecialchars($this->volumes[$i]) . '</option>');
     }
     formo('title=<table width\\="100%"><tr><td>Браузер файловой системы' . '</td><td width\\="150px">Том:' . '<select style\\="margin-left: 6px\\; width: 100px" ' . 'onchange\\="nav (\'./?volume\\=\'+this.value)">' . $volumes . '</select></td></tr></table>');
     if ($this->volume == '') {
         println('<i>Нет томов для просмотра</i>');
     } else {
         if ($_GET['action'] == 'edit') {
             $this->drawEditForm($_GET['file']);
         } else {
             if ($_GET['action'] == 'save') {
                 $this->XPFS->writeVolumeBlock($this->volume, $this->getFullPath($_GET['file']), stripslashes($_POST['xpfs_content']));
             }
         }
         println('<table class="list xpfs_browser" width="100%">' . '<tr class="h"><th class="first">Путь: ' . htmlspecialchars($this->path) . '</th><th width="90">' . 'Время</th><th width="80">Доступ</th>' . '<th width="80" class="last">Атрибут</th></tr>' . "\n");
         $listing = $this->XPFS->lsVolumeDir($this->volume, $this->path);
         $this->drawUpLink(count($listing) == 0);
         for ($i = 0, $n = count($listing); $i < $n; ++$i) {
             $this->drawNode($listing[$i], $i == $n - 1);
         }
         println('</table>');
         println('<form action="' . $this->prepareURL() . '" method="post">');
         println('<div class="xpfs_cmdline"><table class="clear" ' . 'width="100%"><tr><td width="120px"><b>Командная строка:</b>' . '</td><td><input type="text" class="txt block" ' . 'name="xpfs_command"></td><td width="80px">' . '<button style="margin-left: 8px; width: 24px" ' . 'type="submit">»</button></td></tr></table></div>');
         println('</form>');
     }
     formc();
 }
示例#15
0
文件: edit.php 项目: Nazg-Gul/gate
 *
 * 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;
if ($id == 1) {
    include 'editroot.php';
} else {
    print '<div id="snavigator"><a href=".">Разделы</a>' . wiki_content_navigator($id, 'action=edit') . '</div>';
    formo('title=Редактирование раздела;');
    $c = wiki_spawn_content($id, 'security');
    $si = $c->GetSecurityInformation();
    $glist = security_groups();
    ?>

<script language="JavaScript" type="text/javascript">
  var gDesc=new Array ();
<?php 
    foreach ($glist as $k => $g) {
        ?>
  gDesc[<?php 
        echo $g['access'];
        ?>
]='<?php 
        echo addslashes($g['desc']);
示例#16
0
文件: data.php 项目: Nazg-Gul/gate
        return false;
    }
    return user_create_received(false);
}
$f = new CVCForm();
$f->Init('', 'action=.?action\\=register' . ($redirect != '' ? '&redirect\\=' . prepare_arg($redirect) : '') . ';method=POST;add_check_func=check;caption=Зарегистрироваться;backlink=' . prepare_arg($redirect));
$rn = new CVCCaptcha();
$rn->Init();
// Fields
$f->AppendCustomField(array('src' => '<table class="clear" width="100%"><tr><td width="30%">Код с картинки</td><td style="padding: 0 2px;"><div>' . $rn->OuterHTML() . '</div><input type="text" class="txt block" name="keystring" value=""></td></tr></table>'));
$f->AppendCustomField(array('src' => '<table class="clear" width="100%"><tr><td width="30%">Ваше имя</td><td style="padding: 0 2px;"><input type="text" class="txt block" id="name" name="name" value="' . htmlspecialchars(stripslashes($name)) . '"></td></tr></table>'));
$f->AppendCustomField(array('src' => '<table class="clear" width="100%"><tr><td width="30%">Логин</td><td style="padding: 0 2px;"><input type="text" class="txt block" id="login" name="login" value="' . htmlspecialchars(stripslashes($login)) . '"></td></tr>' . '</table>' . '<button class="block" type="button" onclick="check_login ();" style="margin-top: 4px;">Проверить</button>' . '<div id="login_check_res" style="display: none;"></div>'));
$f->AppendCustomField(array('src' => '<table class="clear" width="100%"><tr><td width="30%">Пароль</td><td style="padding: 2px;"><input type="password" class="txt block" id="passwd" name="passwd" onkeyup="check_passwd ();" onchange="check_passwd ();"></td></tr>' . '<tr><td>Подтверждение</td><td style="padding: 2px;"><input type="password" class="txt block" id="passwd_confirm" name="passwd_confirm"  onkeyup="check_passwd ();" onchange="check_passwd ();"><div id="passwd_msg"></div></td></tr>' . '</table>'));
$f->AppendCustomField(array('src' => '<table class="clear" width="100%"><tr><td width="30%">E-Mail</td><td style="padding: 0 2px;"><input type="text" class="txt block" id="email" name="email" value="' . htmlspecialchars(stripslashes($email)) . '"></td></tr></table>' . '<button class="block" type="button" onclick="check_frm_email ();" style="margin-top: 4px;">Проверить</button>' . '<div id="email_check_res" style="display: none;"></div>'));
$f->AppendCUstomField(array('src' => '<center><input type="checkbox" class="cb" value="1" name="agree" id="agree">Я согласен с <a href="' . config_get('document-root') . '/articles/rules" target="blank">правилами</a> этого ресурса</center>'));
if ($action == 'register') {
    if (!register()) {
        formo('title=Форма регистрации пользователя');
        $f->Draw();
        formc();
    } else {
        $id = user_id_by_login(stripslashes($login));
        $reglink = config_get('http-document-root') . '/login/registration/confirm/?id=' . $id . '&hash=' . md5(stripslashes($login) . '##VERY_RANDOM_SEED##' . stripslashes($email) . '##' . $id);
        sendmail_tpl(stripslashes($email), 'Регистрация в системе ' . config_get('site-name'), 'registration', array('login' => stripslashes($login), 'passwd' => stripslashes($passwd), 'reglink' => $reglink));
        add_info('Новый пользователь был успешно добавлен в базу, но в данный момент он неактивирован и вход в систему от его имени пока невозможен.' . 'Письмо с подробной информации об активации пользователя было выслано по электронному адресу ' . $email . ($redirect != '' ? '<br><br><a href="' . htmlspecialchars($redirect) . '">Вернуться в предыдущий раздел</a>' : ''));
    }
} else {
    formo('title=Форма регистрации пользователя');
    $f->Draw();
    formc();
}
示例#17
0
/**
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Script for root element editor form generation
 *
 * 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;
}
$id = 1;
formo('title=Редактирование корневого раздела;');
$c = wiki_spawn_content($id);
$si = $c->GetSecurityInformation();
$glist = security_groups();
?>
<script language="JavaScript" type="text/javascript">
  var gDesc = new Array ();
<?php 
foreach ($glist as $k => $g) {
    ?>
  gDesc[<?php 
    echo $g['access'];
    ?>
]='<?php 
    echo addslashes($g['desc']);
    ?>
示例#18
0
文件: edit.php 项目: Nazg-Gul/gate
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Datatype editing form generation script
 *
 * 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_datatype($id);
formo('title=Информация о типе данных;');
?>
<script language="JavaScript" type="text/javascript">
  function check (frm) {
    var className = getElementById ('className').value;

    if (qtrim (className) == '') {
      alert ('Нельзя сменить имя типа данных на пустое.');
      return false;
    }

    frm.submit ();
  }
</script>

<form action=".?action=save&id=<?php 
示例#19
0
文件: edit.php 项目: Nazg-Gul/gate
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Template editing 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;
$t = manage_spawn_template($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>

<form action=".?action=save&id=<?php 
示例#20
0
文件: section.php 项目: Nazg-Gul/gate
 * See the file COPYING.
 */
if ($PHP_SELF != '') {
    print 'HACKERS?';
    die;
}
global $section;
$items = manage_settings_get_section_elements($section);
$update_forms = array();
$check_scripts = array();
for ($i = 0; $i < count($items); $i++) {
    $it = $items[$i];
    $update_forms[] = manage_settings_get_config_form($it['class'], $it['ident'], $it['settings']);
    $check_scripts[] = manage_settings_get_check_script($it['class'], $it['ident'], $it['settings']);
}
formo('title=Список настроек в секции;');
?>
<script language="JavaScript" type="text/javascript">
  function update_check (frm) {
<?php 
for ($i = 0; $i < count($items); $i++) {
    if ($check_scripts[$i] != '') {
        print $check_scripts[$i] . "\n";
    }
}
?>
    frm.submit ();
  }
</script>

<form action=".?section=<?php 
示例#21
0
文件: list.php 项目: Nazg-Gul/gate
/**
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Script for displaying list of datatypes
 *
 * 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;
}
formo('title=Список существующих типов данных;');
$i = 1;
$n = db_affected();
?>
  <table class="list smb">
    <tr class="h"><th class="n first">№</th><th width="40%">Название</th><th>Базовый класс</th><th width="48" class="last">&nbsp;</th></tr>
<?php 
while ($r = db_row($q)) {
    $class = manage_datatype_get_by_name($r['class']);
    $d = $r['refcount'] == 0;
    ?>
    <tr<?php 
    echo $i < $n ? '' : ' class="last"';
    ?>
><td class="n"><?php 
    echo $i;
示例#22
0
文件: list.php 项目: Nazg-Gul/gate
/**
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Datatype list displaying script
 *
 * 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;
}
formo('title=Список существующих наборов данных');
?>
  <table class="list smb">
    <tr class="h"><th class="n first">№</th><th>Название</th><th width="48" class="last">&nbsp;</th></tr>
<?php 
for ($i = 0; $i < count($list); $i++) {
    $r = $list[$i];
    $d = $r->RefCount() == 0;
    ?>
    <tr<?php 
    echo $i < count($list) - 1 ? '' : ' class="last"';
    ?>
><td class="n"><?php 
    echo $i + 1;
    ?>
.</td><td><a href=".?action=edit&id=<?php 
示例#23
0
文件: field.php 项目: Nazg-Gul/gate
/**
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Datatype field editing form
 *
 * 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, $viewelement;
formo('title=Поле набора данных;');
$d = new CDataField();
$d->Init($viewelement);
?>
<script language="JavaScript" type="text/javascript">
  function check (frm) {
    var title = getElementById ('title').value;

    if (qtrim (title) == '') {
      alert ('Нельзя сменить имя поля набора данных на пустое.');
      return false;
    }

    frm.submit ();
  }
</script>
示例#24
0
 function Editor_ContentManage()
 {
     global $act;
     $list = wiki_content_get_list();
     if ($act == 'save') {
         $this->UpdateContentsLookup($list);
     }
     formo('title=Следить за разделами;');
     println('<form action="' . content_url_get_full() . '&act=save" method="post">');
     $this->PrintContents(1, $list);
     settings_form_buttons();
     println('</form>');
     formc();
 }
示例#25
0
文件: edit.php 项目: Nazg-Gul/gate
<?php

/**
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * 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, $page;
formo('title=Редактирование пользователя;');
$glist = security_groups();
$max_login_len = opt_get('max_user_login_len');
$max_name_len = opt_get('max_user_name_len');
$max_passwd_len = opt_get('max_user_passwd_len');
$user = user_get_by_id($id);
?>
<script language="JavaScript" type="text/javascript">
  var gDesc = new Array ();
<?php 
foreach ($glist as $k => $g) {
    ?>
  gDesc[<?php 
    echo $g['access'];
    ?>
]='<?php 
示例#26
0
文件: list.php 项目: Nazg-Gul/gate
/**
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Grouplist generation script
 *
 * 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;
}
formo('title=Список существующих групп;');
?>
  <table class="list smb">
    <tr class="h"><th width="24" class="n first">№</th><th width="40%">Имя</th><th>Группа `по умолчанию`</th><th width="48" class="last">&nbsp;</th></tr>
<?php 
for ($i = 0; $i < count($list); $i++) {
    $r = $list[$i];
    ?>
    <tr<?php 
    echo $i < count($list) - 1 ? '' : ' class="last"';
    ?>
><td class="n"><?php 
    echo $i + 1;
    ?>
.</td><td><a href=".?action=edit&id=<?php 
    echo $r['id'];
示例#27
0
文件: edit.php 项目: Nazg-Gul/gate
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Setting edit form generation
 *
 * 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, $section;
$d = manage_settings_get_section_element($id);
formo('title=Информация о настройке;');
?>
<script language="JavaScript" type="text/javascript">
  function check (frm) {
    var name     = getElementById ('name').value;
    var section = getElementById ('section').value;

    if (qtrim (section) == '') {
      alert ('Нельзя сменить секцию опции на пустую.');
      return false;
    }

    if (qtrim (name) == '') {
      alert ('Нельзя сменить имя опции на пустое.');
      return false;
    }
示例#28
0
文件: data.php 项目: Nazg-Gul/gate
    if ($s['restore_timestamp'] && time() - $s['restore_timestamp'] < config_get('restore-timeout')) {
        add_info('Вы не можете просить восстановку пароля так часто');
        return false;
    }
    $s['restore_hash'] = $hash;
    $s['restore_timestamp'] = time();
    db_update('user', array('settings' => db_string(serialize($s))), '`id`=' . $r['id']);
    $link = config_get('http-document-root') . '/login/restore/confirm/?id=' . $r['id'] . '&hash=' . $hash;
    sendmail_tpl(stripslashes($email), 'Восстановление пароля в системе ' . config_get('site-name'), 'restore', array('login' => stripslashes($login), 'email' => stripslashes($email), 'link' => $link));
    return true;
}
$f = new CVCForm();
$f->Init('', 'action=.?action\\=send' . ($redirect != '' ? '&redirect\\=' . prepare_arg($redirect) : '') . ';method=POST;add_check_func=check;caption=Послать заявку на восстановление;backlink=' . prepare_arg($redirect));
$rn = new CVCCaptcha();
$rn->Init();
$f->AppendCustomField(array('src' => '<table class="clear" width="100%"><tr><td width="30%">Код с картинки</td><td style="padding: 0 2px;"><div>' . $rn->OuterHTML() . '</div><input type="text" class="txt block" name="keystring" value=""></td></tr></table>'));
$f->AppendCustomField(array('src' => '<table class="clear" width="100%"><tr><td width="30%">Логин</td><td style="padding: 0 2px;"><input type="text" class="txt block" id="login" name="login" value="' . htmlspecialchars(stripslashes($login)) . '"></td></tr></table>'));
$f->AppendCustomField(array('src' => '<table class="clear" width="100%"><tr><td width="30%">E-Mail</td><td style="padding: 0 2px;"><input type="text" class="txt block" id="email" name="email" value="' . htmlspecialchars(stripslashes($email)) . '"></td></tr></table>'));
if ($action == 'send') {
    if (!send()) {
        formo('title=Форма восстановления пароля');
        $f->Draw();
        formc();
    } else {
        add_info('Письмо с подробной информации о дальнейших действиях для смены пароля было выслано по электронному адресу ' . $email . ($redirect != '' ? '<br><br><a href="' . htmlspecialchars($redirect) . '">Вернуться в предыдущий раздел</a>' : ''));
    }
} else {
    formo('title=Форма восстановления пароля');
    $f->Draw();
    formc();
}