コード例 #1
0
ファイル: form_secure_submit.php プロジェクト: wycus/darmedic
 function WasSubmitted(&$form, $input)
 {
     $name = $form->WasSubmitted($this->focus_input);
     if (strcmp($name, $this->focus_input) || strcmp(strtoupper($form->METHOD), Getenv('REQUEST_METHOD'))) {
         return '';
     }
     $encoded = $form->GetSubmittedValue($this->validation);
     $decrypted = $this->DecryptValidation($encoded);
     if (strlen($decrypted) == 0) {
         return '';
     }
     $remaining_time = intval($decrypted) + $this->expiry_time - time();
     if ($remaining_time < 0) {
         $this->expired = 1;
         return '';
     }
     return $this->input;
 }
コード例 #2
0
function my_func($getname, $tp)
{
    global $rny, $rnn;
    $out = $tp == 1 ? @get_cfg_var($getname) : ($tp == 2 ? @function_exists($getname) : ($tp == 3 ? @get_magic_quotes_gpc($getname) : ($tp == 4 ? @get_magic_quotes_runtime($getname) : ($tp == 5 ? @Getenv($getname) : "error!"))));
    return $out == 1 ? $rny : ($out == 0 ? $rnn : $out);
}