Exemplo n.º 1
0
 function SpawnStorage()
 {
     if ($this->storage != nil && $this->storage->GetID() == $this->settings['storage']) {
         return;
     }
     $this->storage = manage_spawn_storage($this->settings['storage']);
 }
Exemplo n.º 2
0
    $value = '';
    ?>
    <script language="JavaScript" tyle="text/javascript">window.parent.CDCImage_OnImageUpload ('<?php 
    echo $field;
    ?>
', '<?php 
    echo $formname;
    ?>
', '', '');</script>
<?php 
} else {
    if (isset($_FILES['uploading'])) {
        $data = $_FILES['uploading'];
        $err = validate_image($data, $size, $hlimit, $vlimit);
        if ($err == '') {
            $s = manage_spawn_storage($storage);
            $fn = $s->Put($data, $user_id);
            $value = $fn;
            $full = $s->GetFullURL($fn);
            $p = $s->GetFileParams($value);
            ?>
    <script language="JavaScript" type="text/javascript">window.parent.CDCImage_OnImageUpload ('<?php 
            echo $field;
            ?>
', '<?php 
            echo $formname;
            ?>
', '<?php 
            echo $full;
            ?>
', '<?php 
Exemplo n.º 3
0
 function manage_storage_get_list()
 {
     global $manage_storage_cache;
     $q = db_select('storage', array('*'), '', 'ORDER BY `name`');
     while ($r = db_row($q)) {
         $manage_storage_cache[$r['id']] = $r;
         $arr[] = manage_spawn_storage($r['id']);
     }
     return $arr;
 }
Exemplo n.º 4
0
/**
 * 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