Exemple #1
0
     } else {
         if (strstr($ext1, "ID:")) {
             $error = "The ID you provided is invalid, please makre sure you only write/copy the ID.";
         } else {
             if (preg_match("/\\d+([KIQGA])-[a-z0-9]+/", $ext1, $matches)) {
                 if (strstr($ext1, "]") || strstr($ext1, "[") || strstr($ext1, ":")) {
                     $error = "The ID you provided is invalid, please makre sure you only write/copy the ID.";
                 }
                 if (strstr($ext1, " ")) {
                     $error = "The ID you provided is invalid, please makre sure you only write/copy the ID with no trailing spaces.";
                 }
             }
         }
     }
 }
 if (isset($ext1) && !is_backup_running()) {
     custom_new_ticket_ext1_check($ext1);
 }
 if (!$isoper && defined("IRC_MODE")) {
     /* Don't let users open another ticket if they already have a pending one on the same team but let opers bypass it! */
     $query = squery("SELECT id,unick,open_time,rep_g FROM karnaf_tickets WHERE status!=0 AND rep_g='%s' AND ((unick='%s' AND unick!='Guest') OR uemail='%s' OR (opened_by='%s' AND opened_by!='Guest'))", $rep_g, $unick, $uemail, $unick);
     if ($result = sql_fetch_array($query)) {
         $error = "You already have an open ticket (#" . $result['id'] . ") for " . $rep_g . ".<br>";
         $error .= "Please do not open more than one ticket about the same issue.<br>";
         $error .= "If you need to send a reply or give more information please view your current ticket stauts and post a reply there.";
     }
     sql_free_result($query);
 }
 if (isset($error)) {
     echo "Error!<br><br>" . $error;
 } else {
Exemple #2
0
 else if(preg_match("/\[ID: (DM-\d+)\]/", $description, $matches)) $ext1 = $matches[1];
 else if(preg_match("/\[ID:(\d+[QGA]-[a-z0-9]+)\]/", $description, $matches)) $ext1 = $matches[1];
 else if(preg_match("/proxyinfo.php\?dnsbl=([a-z\.]+)&ip=/", $description, $matches)) $ext1 = $matches[1];
 else if(preg_match("/monitor.php\?dnsbl=([a-z\.]+)&ip=/", $description, $matches)) $ext1 = $matches[1];
 if(isset($ext1)) {
   /* Some sanity checks to make sure the user give us the correct AKILL ID */
   if(preg_match("/OS2\d+-\d+/", $ext1, $matches)) {
     $error = "We can't locate the OS2 ID you provided, please provide the other ID you got.";
   }
   else if(strstr($ext1,"ID:")) $error = "The ID you provided is invalid, please makre sure you only write/copy the ID.";
   else if(preg_match("/\d+([KIQGA])-[a-z0-9]+/", $ext1, $matches)) {
     if(strstr($ext1,"]") || strstr($ext1,"[") || strstr($ext1,":")) $error = "The ID you provided is invalid, please makre sure you only write/copy the ID.";
     if(strstr($ext1," ")) $error = "The ID you provided is invalid, please makre sure you only write/copy the ID with no trailing spaces.";
   }
 }
 if(isset($ext1) && !is_backup_running()) custom_new_ticket_ext1_check($ext1);
 if(!$isoper && defined("IRC_MODE")) {
   /* Don't let users open another ticket if they already have a pending one on the same team but let opers bypass it! */
   $query = squery("SELECT id,unick,open_time,rep_g FROM karnaf_tickets WHERE status!=0 AND rep_g='%s' AND ((unick='%s' AND unick!='Guest') OR uemail='%s' OR (opened_by='%s' AND opened_by!='Guest'))",
                   $rep_g, $unick, $uemail, $unick);
   if($result = sql_fetch_array($query)) {
     $error = "You already have an open ticket (#".$result['id'].") for ".$rep_g.".<br>";
     $error .= "Please do not open more than one ticket about the same issue.<br>";
     $error .= "If you need to send a reply or give more information please view your current ticket stauts and post a reply there.";
   }
   sql_free_result($query);
 }
 if(isset($error)) {
   echo "Error!<br><br>".$error;
 }
 else {