} if ($template->is_blank() == FALSE) { $info = $template->encode(); } } $recs = $ds->ds->GetOne("SELECT count(*) AS cnt\n FROM requestip"); if ($recs > MAXREQUESTS) { $formerror .= my_("Maximum number of outstanding IP requests exceeded") . "\n"; } if (!$formerror) { $ds->DbfTransactionStart(); $result =& $ds->ds->Execute("INSERT INTO requestip\n (customer, requestdesc, userinf, location, descrip,\n hname, telno, macaddr, info)\n VALUES\n ({$cust},\n " . $ds->ds->qstr($request) . ",\n " . $ds->ds->qstr($user) . ",\n " . $ds->ds->qstr($location) . ",\n " . $ds->ds->qstr($descrip) . ",\n " . $ds->ds->qstr($hname) . ",\n " . $ds->ds->qstr($telno) . ",\n " . $ds->ds->qstr($newmacaddr) . ",\n " . $ds->ds->qstr($info) . ")") and $ds->AuditLog(array("event" => 200, "action" => "request ip", "descrip" => $descrip, "user" => getAuthUsername(), "userinf" => $user, "location" => $location, "hname" => $hname, "telno" => $telno, "macaddr" => $macaddr)); if ($result) { $ds->DbfTransactionEnd(); insert($w, textbr(my_("IP address request created"))); $custdescrip = $ds->GetCustomerDescrip($cust); //Send email notification that IP Request was entered require "../class.phpmailer.php"; $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->SetLanguage("en", "../"); $mail->Host = EMAILSERVER; // SMTP server $mail->From = HELPDESKEMAIL; $mail->IsHTML(false); $mail->FromName = "IP Plan"; $mail->AddAddress(HELPDESKEMAIL); $mail->Subject = "IP Request Submittal"; $mail->Body = "The following IP address request has been submitted and needs to be actioned.\n\n"; $mail->Body .= "IP Request Details\n\n";