<<<<Restricted Area>>>>" . "
Sorry, you must Log In to view this Page

"); exit(); } $today = date(F j,Y); $dtnum = date(Ymd); $ID = $_POST['ID']; $invnum = $_POST['invnum']; $usrn = $_POST['usrn']; $newnotes = stripslashes($_POST['newnotes']); $notify = $_POST['notify']; $cu_email = $_POST['cu_email']; $rep = $_POST['rep']; $rep_email = $_POST['rep_email']; $first_Name = $_POST['first_Name']; $Name = $_POST['Name']; $Company = $_POST['Company']; $ponum = $_POST['ponum']; $comma_separated = $_POST['comma_separated']; $dueup = $_POST['dueup']; $chunk_dueup = chunk_split($dueup, 2, ':'); $chunk_arrdu = explode(":", $chunk_dueup); $doodat = $chunk_arrdu[2].'-'.$chunk_arrdu[3].'-'.$chunk_arrdu[0].$chunk_arrdu[1]; $dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1'); mysql_select_db('ecosmar_inv', $dbcnx); $ok = @mysql_query("UPDATE ecoinvoice SET dueup='$dueup' WHERE ID='$ID' LIMIT1"); if (!$ok) { $no_update = 'Problem Changing Invoice Due Date: ' . mysql_error(); }else{ $change_inv = 'yes'; } ?>
Close this Window

Eco-$mart Invoices
Change Invoice Due Date

"); }else{ $ok2 = @mysql_query("INSERT INTO inv_notes SET invnum='$invnum',Notes='$newnotes',dtnum='$dtnum'"); if (!$ok2) { echo ""; }else{ $note_inv = 'yes'; if($notify == 'yes'){ $recipient = $cu_email.","."kent@kwgrubbs.com"; $subject = "Eco-\$mart Invoice Due Date"; $message ="FROM: $rep, Eco-\$mart, Inc. <$rep_email>" . "\n" . "Dear $first_Name $Name," . "\n" . "Due to factors out of our control, we are forced to change" . "\n" . "the following delivery date from our original estimate." . "\n" . "\n" . "ECO-\$MART INVOICE NUMBER: $invnum" . "\n" . "P.O. NUMBER: $ponum" . "\n" . "PRODUCT(S): $comma_separated" . "\n" . "NEW DELIVERY DATE: $newdoo" . "\n" . "NOTE: $newnotes" . "\n" . "\n" . "We apologize for any inconvenience this change might cause." . "\n" . "Sincerely," . "\n" . "$rep, Your Eco-\$mart Representative" "\n" . "$rep_email" . "\n" . "www.ecosmartinc.com" . "\n"; if(@mail($recipient, $subject, $message, "From: $usrn <$rep_email>")){ $maildone = 'yes'; }else( $no_mail = "Error Sending Notification" . error(); } } if($change_inv == 'yes'){ echo(""); } if($maildone == 'yes'){ echo(""); } if($note_inv == 'yes'){ echo(""); } } } ?>
  Representative: Date:
  Invoice #:    Invoice Date:    Due Date:
  Customer:  ,    P.O.Number:
  Products:

$no_update

Problem Posting Notes: " . mysql_error() . "

Invoice Date Changed

Email Notification Sent

Notes added to Invoice

 Home   Administration 
Eco-$mart Products
©2006 - Data Base Interface - Custom Built at: kwgrubbs.com