Пример #1
0
    $result = mysql_query($sql);
    include "err_msg.inc";
    list($en, $t, $fn, $mn, $ln) = mysql_fetch_array($result);
    $to = "{$en}@{$domain}";
    $mfrm = "{$email_name}@{$domain}";
    $extra = "From: {$email_name}@{$domain}\nReply-To: {$email_name}@{$domain}\nX-Mailer: {$PHPconst}/" . phpversion();
    $subject = "RE: Request for Order Receiving Confirmation(Order ID: {$order_id})";
    $message = "Dear {$fn}\n\n" . "Your {$bo}" . "order ({$company} Internal Order No: {$order_id}) " . "has been received according to our record. " . "Please verify your order from Intranet so I can process Invoice and close your order.\n\n" . "Regards\n\n" . "{$first_name} {$last_name}\n" . date("G:i F d, Y");
    if ($sendmail == "y" && $to != $mfrm) {
        //mail ($to, $subject, $message, $extra);
        $from = "{$email_name}\\@rla.com.au";
        $to = "{$en}\\@{$domain}";
        $cc = "";
        $msg = "{$message}";
        system("./_mail.pl \"{$from}\" \"{$to}\" \"{$cc}\" \"{$subject}\" \"{$msg}\"", $var);
        $mentry = ordermailentry("{$order_id}", "{$email_name}", "{$to}", 7);
    }
    $message = ereg_replace("\n", "<br>", $message);
    //echo "$to<br>$subject<br>$message<br>$extra<br>";
    echo "<h2> Mail has been sent to {$fn} {$ln} asking for order receiving confirmation.</h2>";
    exit;
}
//#######################################################################
//***********List All Order
$sql = "SELECT order_id, order_by, orderdate, updatestatus FROM rlafinance.orderid \n\t\tWHERE updatestatus='r' or updatestatus='s' or updatestatus='b'\n\t\tORDER BY order_id DESC";
$result = mysql_query($sql);
include "err_msg.inc";
$no = mysql_num_rows($result);
if ($no) {
    echo "<h2>RLA Order List ({$no})</h2>";
    echo "<table border=1>";
Пример #2
0
    if ($backorder) {
        $part = " partial";
    } else {
        $part = "";
    }
    $subject = "RE: Your Order {$order_id} has been{$part} received";
    $message = "Dear {$fname}\n\n" . "Your purchasing order ({$company} Internal Order No: {$rlaorderid}) " . "has been{$part} received.\n\n" . "To view your order go to \n" . "http://{$sername}/{$phpdir}/rla_fin_order_mod.php?{$info}\n\n" . "Regards\n\n" . "{$first_name}\n{$d}";
    if ($sendmail == "y" && $to != $mfrm) {
        //mail ($to, $subject, $message, $extra);
        $from = "{$email_name}\\@{$domain}";
        $to = "{$ename}\\@{$domain}";
        $cc = "";
        //$subject = "";
        $msg = "{$message}";
        system("./_mail.pl \"{$from}\" \"{$to}\" \"{$cc}\" \"{$subject}\" \"{$msg}\"", $var);
        $mentry = ordermailentry("{$rlaorderid}", "{$email_name}", "{$to}", 5);
    }
    $message = ereg_replace("\n", "<br>", $message);
    //echo "$to<br>$subject<br>$message<br>$extra<br>";
}
//#######################################################################
if ($action == "backorder") {
    $order_id = $bkorder_id;
    #echo "here<br>bkorder_id=$bkorder_id";
    #exit;
    include "rla_fin_display_order.inc";
    echo "<hr>";
}
//#######################################################################
if ($verifybackorder) {
    $debug = "n";
Пример #3
0
 //echo "To: $to<br>Subjuct: $subject<br>Message: $message<br>";
 //mail to purchasing officer
 $to = $po[0] . "@{$domain}";
 $subject = "RE: Purchasing Order {$rlaorderid} from {$frofn}";
 $info = "rlaorderid={$rlaorderid}&frommail={$frommail}&frofn={$frofn}&fromln={$fromln}";
 //echo $info."<br>";
 $info = base64_encode($info);
 $message = "Dear " . $po[1] . "\n\n" . "I have approved {$frofn}'s purchasing order ({$company} Internal Order No: {$rlaorderid}), " . "please print the order and fax it to supplier.\n\n" . "To print go to \n" . "http://{$sername}/{$phpdir}/rla_fin_order_process.php?{$info}\n\n" . "Regards\n\n" . "{$fa} {$la}\n{$d}";
 if ($sendmail == "y") {
     //mail ($to, $subject, $message, $extra);
     $from = "{$authperson}\\@{$domain}";
     $to = $po[0] . "\\@{$domain}";
     $cc = "";
     $msg = "{$message}";
     system("./_mail.pl \"{$from}\" \"{$to}\" \"{$cc}\" \"{$subject}\" \"{$msg}\"", $var);
     $mentry = ordermailentry("{$rlaorderid}", "{$authperson}", "{$to}", 3);
 }
 $message = ereg_replace("\n", "<br>", $message);
 //echo "To: $to<br>Subjuct: $subject<br>Message: $message<br>";
 /*
 	include("find_admin_ip.inc");
 	if (getenv("remote_addr") == $adminip) {
 		echo "<p><a href=\"http://$sername/$phpdir/rla_fin_order_process.php?$info\" target=\"_blank\">".
 			"Print $company Purchasing Order $rlaorderid.</a><br>";
 	}
 	//*/
 if ($purchoffice != $putorder) {
     echo "<h4>Order approval process completed. Mail has been sent to " . $po[1] . " and {$frofn} respectively.</h4>";
 } else {
     echo "<h4>Order approval process completed. Mail has been sent to " . $po[1] . ".</h4>";
 }
Пример #4
0
    $from = $OrderOfficer[0][0];
    $mfrm = "{$from}@{$domain}";
    $extra = "From: {$from}@{$domain}\nReply-To: {$from}@{$domain}\nX-Mailer: {$PHPconst}/" . phpversion();
    $to = "{$frommail}@{$domain}";
    $subject = "RE: {$company} Order {$rlaorderid} has been faxed to supplier";
    $sername = getenv("server_name");
    $d = date("G:i F d, Y");
    $message = "Dear {$frofn}\n\n" . "Your order on the Intranet ({$company} Internal Order No: {$rlaorderid}) " . "has been faxed to supplier.\n\n" . "Regards\n\n" . $OrderOfficer[0][1] . "\n{$d}";
    if ($sendmail == "y" && $mailtoini == "yes" && $to != $mfrm) {
        //mail ($to, $subject, $message, $extra);
        $from = "{$from}\\@rla.com.au";
        $to = "{$frommail}\\@{$domain}";
        $cc = "";
        $msg = "{$message}";
        system("./_mail.pl \"{$from}\" \"{$to}\" \"{$cc}\" \"{$subject}\" \"{$msg}\"", $var);
        $mentry = ordermailentry("{$rlaorderid}", "{$from}", "{$to}", 4);
    }
    $message = ereg_replace("\n", "<br>", $message);
    //echo "To: $to<br>Subjuct: $subject<br>Message: $message<br>";
}
//check payment method if pay by cheque present a page to enter cheque no.
$sql = "SELECT paymethod, card_cheque, updatestatus\n\tFROM rlafinance.orderid WHERE order_id='{$order_id}';";
$result = mysql_query($sql);
include "err_msg.inc";
list($paymethod, $card_cheque, $updatestatus) = mysql_fetch_array($result);
//echo "$paymethod, $card_cheque, $updatestatus<br>";
//cash=3; cheque=2; credit=1
if ($updatestatus == "p") {
    echo "<h2 align=center><a id=top>Processing Order</a>";
    echo "<a href=\"" . $PHP_SELF . "{$userstr}\"><font size=2>[Refresh]</font></a></h2><hr>";
    $action = "view";