Exemplo n.º 1
0
 // set new cline and curcus
 $curcus = $inrec['cid'];
 if ($curcus != "") {
     $tprice = 0;
     // change the color on those we have contacted add customer tag to customers
     $fcolor = RCS_UNCONTACTED_COLOR;
     $checked = 1;
     // assume we'll send an email
     $new = 1;
     $skip = false;
     $sentdate = "";
     $beforeDate = RCS_CARTS_MATCH_ALL_DATES ? '0' : $inrect['bdate'];
     $customer = $inrec['fname'] . " " . $inrec['lname'];
     $status = "";
     $donequery = tep_db_query("select * from " . TABLE_SCART . " where customers_id = '" . $curcus . "'");
     $emailttl = seadate(RCS_EMAIL_TTL);
     if (mysql_num_rows($donequery) > 0) {
         $ttl = tep_db_fetch_array($donequery);
         if ($ttl) {
             if (tep_not_null($ttl['datemodified'])) {
                 // allow for older scarts that have no datemodified field data
                 $ttldate = $ttl['datemodified'];
             } else {
                 $ttldate = $ttl['dateadded'];
             }
             if ($emailttl <= $ttldate) {
                 $sentdate = $ttldate;
                 $fcolor = RCS_CONTACTED_COLOR;
                 $checked = 0;
                 $new = 0;
             }
    <td width="100%" valign="top">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
Working...
          <tr>
            <td colspan="6">
<!-- new header -->
              <table border="0" width="100%" cellspacing="0" cellpadding="2">
                <tr>
                  <td class="pageHeading" align="left"><?php 
echo HEADING_TITLE;
?>
</td>
                  <td class="pageHeading" align="right">
<?php 
$tdate = !empty($_POST['tdate']) ? $_POST['tdate'] : RCS_REPORT_DAYS;
$ndate = seadate($tdate);
?>

                    <form method=post action=<?php 
echo $_SERVER['PHP_SELF'];
?>
 >
                    <table align="right" width="100%">
                      <tr class="dataTableContent" align="right">
                        <td nowrap><?php 
echo DAYS_FIELD_PREFIX;
?>
<input type=text size=4 width=4 value=<?php 
echo $tdate;
?>
 name=tdate><?php 
 if ($curcus != "") {
     echo $cline;
 }
 // set new cline and curcus
 $curcus = $inrec['cid'];
 if ($curcus != "") {
     $tprice = 0;
     //
     // change the color on those we have contacted
     // add customer tag to customers
     //
     $fcolor = $UNCONTACTED_COLOR;
     $sentdate = "";
     $customer = "";
     $donequery = vam_db_query("select * from " . TABLE_SCART . " where customers_id = '" . $curcus . "' ORDER BY dateadded DESC");
     $emailttl = seadate($EMAIL_TTL);
     if (mysql_num_rows($donequery) > 0) {
         $ttl = vam_db_fetch_array($donequery);
         if ($emailttl <= $ttl['dateadded']) {
             $sentdate = $ttl['dateadded'];
             $fcolor = $CONTACTED_COLOR;
         }
     }
     $ccquery = vam_db_query("select * from " . TABLE_ORDERS . " where customers_id = '" . $curcus . "'");
     if (mysql_num_rows($ccquery) > 0) {
         $customer = '&nbsp;[<font color="' . $CURCUST_COLOR . '">' . TEXT_CURRENT_CUSTOMER . '</font>]';
     }
     $sentInfo = TEXT_NOT_CONTACTED;
     if ($sentdate != '') {
         $sentInfo = cart_date_short($sentdate);
     }