Exemplo n.º 1
0
 }
 if (!$errs) {
     $data['closetime'] = 0;
     // override close order time
     $accept = $data['autoaccept'];
     $strict = $data['strict'];
     $persons = $data['persons'];
     $num = 1;
     $nlab = eguide_form_options('label_persons');
     if ($nlab && isset($vals[$nlab])) {
         $num = intval($vals[$nlab]);
         if ($num < 1) {
             $num = 1;
         }
     }
     if (count_reserved($eid, $exid, $strict, $persons, $num)) {
         srand();
         $data['confirm'] = $conf = rand(10000, 99999);
         $email = param('email', '');
         $ml = $xoopsDB->quoteString($email);
         $operator = $xoopsUser->getVar('uid');
         $xoopsDB->query('INSERT INTO ' . RVTBL . " \n(eid,exid,uid,operator,rdate,email,status,confirm,info) VALUES\n({$eid},{$exid},{$uid},{$operator},{$now},{$ml}," . _RVSTAT_RESERVED . ",{$conf}," . $xoopsDB->quoteString($value) . ")");
         $data['rvid'] = $xoopsDB->getInsertId();
         $data['reserv_uid'] = $uid;
         if ($data['edate'] - $data['closetime'] > $now) {
             order_notify($data, $email, $value);
             // error ignore
         }
         redirect_header($url, 1, _MD_DBUPDATED);
         exit;
     } else {
Exemplo n.º 2
0
             //
             if ($xoopsModuleConfig['user_notify'] && param('notify', '')) {
                 $reg = $xoopsDB->query('SELECT * FROM ' . RVTBL . " WHERE email={$ml} AND eid=0");
                 if ($xoopsDB->getRowsNum($reg) == 0) {
                     $conf = rand(10000, 99999);
                     $xoopsDB->query('INSERT INTO ' . RVTBL . " \n(eid,exid,uid,rdate,email,status,confirm) VALUES (0,0,{$uid},{$now},{$ml},1,'{$conf}')");
                 } else {
                     echo "<div class='evnote'>" . _MD_DUP_REGISTER . "</div>\n";
                 }
             }
             echo "</div>\n";
         } else {
             echo "<div class='error'>" . _MD_SEND_ERR . "</div>\n";
             // delete failer record.
             $xoopsDB->query('DELETE FROM ' . RVTBL . " WHERE rvid={$rvid}");
             count_reserved($eid, $exid, $strict, $persons, -$num);
         }
     }
     if (empty($errs)) {
         break;
     }
 case 'confirm':
     $xoopsOption['template_main'] = EGPREFIX . '_confirm.html';
     $data = fetch_event($eid, $exid);
     $opts = $data['optfield'];
     if ($op != 'order') {
         $vals = get_opt_values($opts, $errs);
         check_prev_order($data, $vals, $errs);
     }
     $emhide = "";
     $num = 1;