Esempio n. 1
0
 function InitFields()
 {
     $q = db_select('dataset_assoc', array('id'), '`dataset`=' . $this->id, 'ORDER BY `order`');
     $this->fields = array();
     while ($r = db_row($q)) {
         $c = new CDataField();
         $c->Init($r['id']);
         $c->UpdateDataSettings($this->settings['fields'][$c->GetField()]);
         $this->fields[] = $c;
     }
 }
Esempio n. 2
0
 * Gate - Wiki engine and web-interface for WebTester Server
 *
 * Datatype field editing form
 *
 * Copyright (c) 2008-2009 Sergey I. Sharybin <g.ulairi@gmail.com>
 *
 * 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>
Esempio n. 3
0
 function manage_spawn_datafield($id, $dataset = '', $type = '', $title = '', $field = '')
 {
     $c = new CDataField();
     $c->Init($id);
     if ($id < 0) {
         $c->SetDataset($dataset);
         $c->SetDatatype($type);
         $c->SetTitle($title);
         $c->SetField($field);
     }
     return $c;
 }