コード例 #1
0
ファイル: builtin.php プロジェクト: Nazg-Gul/gate
 function atoi($s)
 {
     if (isnumber($s)) {
         return $s;
     }
     return 0;
 }
コード例 #2
0
ファイル: problem_add_tag.php プロジェクト: Nazg-Gul/gate
 function WT_ProblemAddTag()
 {
     $id = $_POST['id'];
     $tag = trim($_POST['tag']);
     if (!isnumber($id) || $tag == '') {
         print '-ERR';
         return;
     }
     $gw = WT_spawn_new_gateway();
     if ($gw->current_lib->IPC_Problem_AddTag($id, $tag)) {
         print '+OK';
     } else {
         print '-ERR';
     }
 }
コード例 #3
0
ファイル: link.php プロジェクト: AaEzha/agus-aetra
</label>
						<?php 
            }
            ?>
							
						</p>
					  </div>
					  <div class="col s4">
						<div class="input-field col s12">
							<input id="urutan" name="urutan" type="text" class="validate" maxlength="3" length="3" value="<?php 
            if ($a == 'ubah') {
                echo $d['urutan'];
            }
            ?>
" required <?php 
            echo isnumber();
            ?>
>
							<label for="urutan">Urutan</label>
						</div>
					  </div>
					</div>
					<button type="submit" class="btn waves-effect waves-light">Simpan</button>
				</form>
			</div>
<?php 
            break;
        case 'hapus':
            if (!isset($_GET['i']) or $_GET['i'] == '') {
                eksyen('', '?hal=link');
            }
コード例 #4
0
ファイル: 01CGMInformatics.php プロジェクト: Nazg-Gul/e-marsa
 function RemoveTagFromProblem($problem_id, $tag)
 {
     $tag_id = db_field_value('tester_tags_dict', 'id', '`tag`="' . addslashes($tag) . '"');
     if (isnumber($tag_id)) {
         db_delete('tester_problem_tags', "`problem_id`={$problem_id} AND `tag_id`={$tag_id}");
         return true;
     } else {
         return false;
     }
 }
コード例 #5
0
ファイル: xpfs.php プロジェクト: Nazg-Gul/gate
 function setNodeAccess($node, $access)
 {
     if (!isnumber($access)) {
         $access = 0;
     }
     if ($access < 0) {
         $access = 0;
     }
     if ($access > 7) {
         $access = 7;
     }
     return $this->setNodeField($node, 'access', $access);
 }
コード例 #6
0
ファイル: funct.php プロジェクト: playaer/IceCash
function create_query_insert_text($table, $data, $fd)
{
    global $_POST;
    $fields = implode(',', $fd);
    $x = '';
    $r = array();
    $t = 0;
    foreach ($fd as $field) {
        if (array_key_exists($field, $_POST)) {
            $t = 1;
        }
        $v = array_key_exists($field, $_POST) ? $_POST[$field] : $data[$field];
        #echo "$field:${_POST[$field]}:${data[$field]}\n<br/>";
        if (!isnumber($v)) {
            $v = "\"{$v}\"";
        }
        $r[] = $v;
    }
    if (!$t) {
        return $t;
    }
    $values = implode(',', $r);
    $r = "insert into {$table} ({$fields}) values({$values})";
    return $r;
}
コード例 #7
0
ファイル: 02CCPublication.php プロジェクト: Nazg-Gul/gate
 function Editor_SavePublication($formname = '')
 {
     global $id, $uid, $redirect;
     if ($id == '') {
         $id = $this->dbids[$this->uids[$uid]];
     }
     if (!isnumber($id)) {
         return;
     }
     if (!$this->GetAllowed('EDITINFO')) {
         return;
     }
     $r = db_row_value($this->settings['content'], '`id`=' . $id);
     $this->dataset->ReceiveData($formname);
     $cid = db_max($this->settings['content'], 'id', '`uid`=' . $uid);
     if ($this->CheckExistment($cid)) {
         if ($redirect != '') {
             redirect();
         }
         return;
     }
     $arr = $this->dataset->GetFieldValues(true);
     $arr['uid'] = $r['uid'];
     $arr['order'] = $r['order'];
     $arr['timestamp'] = time();
     $arr['user_id'] = '"' . user_id() . '"';
     $arr['ip'] = '"' . get_real_ip() . '"';
     db_insert($this->settings['content'], $arr);
     $this->dataset->FreeValues();
     $this->ReceiveContent();
     if ($redirect != '') {
         redirect();
     }
 }
コード例 #8
0
ファイル: 07CDCFile.php プロジェクト: Nazg-Gul/gate
 function UpdateLimitSetting($arr, $title, $field, $sfield, $suff)
 {
     if ($_POST['cntset_' . $field . '_' . $suff]) {
         if (!isnumber($_POST['cntset_' . $field . '_' . $suff . '_val'])) {
             add_info('Некорректное ограничение файла в поле &laquo;' . $title . '&raquo;');
             return false;
         } else {
             $arr[$sfield] = $_POST['cntset_' . $field . '_' . $suff] . $_POST['cntset_' . $field . '_' . $suff . '_val'];
         }
     }
     return true;
 }
コード例 #9
0
ファイル: data.php プロジェクト: Nazg-Gul/gate
 */
if ($PHP_SELF != '') {
    print 'HACKERS?';
    die;
}
?>
<div id="navigator"><a href="<?php 
echo config_get('document-root');
?>
/login">Вход в систему</a><a href="<?php 
echo config_get('document-root');
?>
/login/registration">Регистрация</a>Активация пользователя</div>
${information}
<?php 
global $id, $hash;
if (!isset($id) || !isnumber($id) || !isset($hash)) {
    add_info('Пропущен обязательный параметр.');
} else {
    $r = db_row_value('user', '`id`=' . $id);
    if ($r['authorized']) {
        add_info('Ошибка активации пользователя.');
    } else {
        if (md5($r['login'] . '##VERY_RANDOM_SEED##' . $r['email'] . '##' . $r['id']) != $hash) {
            add_info('Ошибка активации пользователя.');
        } else {
            add_info('Пользователь успешно активирован. Вход в систему с логином ' . $r['login'] . ' разрешен.');
            db_update('user', array('authorized' => 1));
        }
    }
}
コード例 #10
0
ファイル: settings.php プロジェクト: Nazg-Gul/gate
 function SetValue($v)
 {
     if (isnumber($v, true)) {
         $this->settings['value'] = $v;
     } else {
         $this->settings['value'] = 0;
     }
 }
コード例 #11
0
ファイル: template.php プロジェクト: Nazg-Gul/gate
 function manage_template_receive_from_selector($name)
 {
     $res = $_POST[$name . '_script_selector'];
     if (!isnumber($res)) {
         $res = -1;
     }
     return $res;
 }