Example #1
0
 function generate($id)
 {
     ticket::cleanup();
     mt_srand(time());
     $ticket = md5(mt_rand());
     $res = sql::query("\r\n\t\t\t\tINSERT INTO\r\n\t\t\t\t\t" . _TABLE_PREFIX_ . "tickets\r\n\t\t\t\tSET\r\n\t\t\t\t\t`ticket` = '" . addslashes($ticket) . "',\r\n\t\t\t\t\t`id` = '" . addslashes($id) . "',\r\n\t\t\t\t\t`generated` = NOW()\r\n\t\t\t");
     return $ticket;
 }