예제 #1
0
파일: dataset.php 프로젝트: Nazg-Gul/gate
 function RefCount()
 {
     return manage_dataset_refcount($this->id);
 }
예제 #2
0
파일: edit.php 프로젝트: Nazg-Gul/gate
 *
 * Datatype edit 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, $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>
예제 #3
0
파일: field.php 프로젝트: Nazg-Gul/gate
 function Destroy()
 {
     $dataset = db_field_value('dataset_assoc', 'dataset', "`id`=" . $this->id);
     if (manage_dataset_refcount($dataset) > 0) {
         return;
     }
     $datatype = db_field_value('dataset_assoc', 'datatype', "`id`=" . $this->id);
     manage_datatype_refcount_dec($datatype);
     db_query('DELETE FROM `dataset_assoc` WHERE `id`=' . $this->id);
 }
예제 #4
0
파일: fields.php 프로젝트: Nazg-Gul/gate
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Script for fields list displaying
 *
 * 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, $eid;
formo('title=Поля набора данных;');
$d = manage_dataset_refcount($id);
redirector_add_skipvar('act', 'togimp');
?>
  <table class="list smb">
    <tr class="h">
      <th class="n first">№</th><th width="40%">Название</th><th>Поле</th><th>Тип</th><th width="118" class="last">&nbsp;</th>
    </tr>
<?php 
for ($i = 0; $i < count($list); $i++) {
    $r = $list[$i];
    $s = unserialize($r['settings']);
    $class = manage_spawn_datatype($r['datatype']);
    $imp = $s['important'];
    $invis = $s['invisible'];
    ?>
    <tr<?php