Beispiel #1
0
function delete_item($table, $inp, $gname)
{
    $my = new mysql_class();
    $my->ex_sqlx("update `{$table}` set `tarikh` = now() - interval (`timeout` + 1) minute where `id` in ({$inp})");
    ticket_class::clearTickets();
    return TRUE;
}
Beispiel #2
0
 public function is_authonticated($enc_pass, $user_name = "")
 {
     ticket_class::clearTickets();
     $out = FALSE;
     $conf = new conf();
     $webSault = $conf->webSault != '' ? $conf->webSault : '_1';
     $fpass = encrypt_class::decrypt($enc_pass) . $webSault;
     //echo "enc_pass = '******',dec_pass = '******'";
     $mysql = new mysql_class();
     //echo "select pass from `user` where `user` = '$user_name'";
     $mysql->ex_sql("select pass from `user` where `user` = '{$user_name}'", $q);
     if (isset($q[0])) {
         $pass = $q[0]['pass'];
         $out = md5($fpass) == $pass;
     }
     return $out;
 }
Beispiel #3
0
<?php

session_start();
include_once "../kernel.php";
$pass = isset($_REQUEST['pass']) ? $_REQUEST['pass'] : "";
$user = isset($_REQUEST['user']) ? $_REQUEST['user'] : "";
ticket_class::clearTickets();
if (isset($_SESSION['user_id']) && isset($_SESSION['typ'])) {
    //	 die("<script>window.location='login.php';</script>");
}
date_default_timezone_set("Asia/Tehran");
$firstVisit = isset($_SESSION["login"]) && $_SESSION["login"] == 1 && isset($_REQUEST["user"]);
if ($firstVisit || isset($_SESSION["user_id"])) {
    function loadUserById($id)
    {
        $out = 'تعریف نشده';
        mysql_class::ex_sql("select fname,lname from user where id={$id}", $qq);
        if ($r = mysql_fetch_array($qq, MYSQL_ASSOC)) {
            $out = $r["fname"] . " " . $r["lname"];
        }
        return $out;
    }
    function isOdd($inp)
    {
        $out = TRUE;
        if ((int) $inp % 2 == 0) {
            $out = FALSE;
        }
        return $out;
    }
    function selectParvaz($inp)
} else {
    if ($_REQUEST["mod"] == "save" && $msg == "") {
        $empty_tickets = 0;
        $sanad_record_id = 200;
        $tmp_id = explode(",", $_REQUEST["tmp_id"]);
        mysql_class::ex_sql("select `id` from `reserve_tmp` where `id` = " . $tmp_id[0], $qqq);
        if (!($rrr = mysql_fetch_array($qqq))) {
            die('<script>window.location = "index.php";</script>');
        }
        mysql_class::ex_sql("select MAX(`sanad_record_id`) as `sss` from `customer_daryaft`", $q);
        if ($r = mysql_fetch_array($q)) {
            $sanad_record_id = (int) $r["sss"] > 199 ? (int) $r["sss"] : 199;
            $sanad_record_id++;
        }
        $ticket = new ticket_class();
        $ticket->clearTickets();
        $ok = TRUE;
        $jam_ghimat1 = 0;
        $index = 0;
        $domasire_ast = FALSE;
        if (count($selectedParvaz) == 2 && parvaz_det_class::check_raft_bargasht($selectedParvaz[0]->getId(), $selectedParvaz[1]->getId())) {
            $domasire_ast = TRUE;
        }
        $p_i = 0;
        $adl_last = array();
        $chd_last = array();
        $inf_last = array();
        foreach ($selectedParvaz as $parvaz) {
            for ($i = 0; $i < $adl; $i++) {
                //$ticket->fname = $_REQUEST["adl_fname_$i"];
                $ticket->lname = $_REQUEST["adl_lname_{$i}"];