예제 #1
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>

<?php 
예제 #2
0
<form action=".?action=create" method="POST" onsubmit="check (this); return false;">
  Название раздела:
  <input type="text" id="name" name="name" value="<?php 
echo htmlspecialchars(stripslashes($_POST['name']));
?>
" class="txt block"><div id="hr"></div>
  Название виртуальной папки:
  <input type="text" id="path" name="path" value="<?php 
echo htmlspecialchars(stripslashes($_POST['path']));
?>
" class="txt block">
  <button class="block" type="button" onclick="check_path ();" style="margin-top: 4px;">Проверить</button>
  <div id="path_check_res" style="display: none;"></div><div id="hr"></div>
  Класс:
<?php 
$cclasses = content_Registered_CClasses();
?>
  <select name="class" id="class" class="block" onchange="update_settings_form ();">
<?php 
for ($i = 0; $i < count($cclasses); $i++) {
    $t = $cclasses[$i];
    $c = new $t['class']();
    ?>
    <option value="<?php 
    echo $c->GetClassName();
    ?>
"<?php 
    echo $c->GetClassName() == $_POST['class'] ? ' selected' : '';
    ?>
><?php 
    echo $t['pseudonym'];