Got this from Lunarpages:
-------------------------
Note: If this is the first time you recieved this mail, it contains the history for the entire month so far.
Below are the recently upload scripts that contain code to send email. You may wish to inspect them to ensure they are not sending out SPAM.
public_html/admin/include/incStockNewsletter.php:190: //exit;
public_html/admin/include/incStockNewsletter.php:191: mail($to, $subject, $message, $headers);
public_html/admin/include/incStockNewsletter.php:192: */
-------------------------
Then I follow the link to locate the document (incStockNewsletter.php). I do not reconized any of the URL appeared on the code. Can someone tell me what is this file and code do? Our site is a local business review website, not online retail. Here is the code: THANKS.
------------------------
<?
function getHeader(){
$strHeader="";
$strHeader = $strHeader . "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>";
$strHeader = $strHeader . "<link href='
http://ebaby.infordomain.net/styles.css' rel='stylesheet' type='text/css'>";
$strHeader = $strHeader . "<script language='JavaScript' type='text/JavaScript'>";
$strHeader = $strHeader . "<!--";
$strHeader = $strHeader . "//-->";
$strHeader = $strHeader . "</script>";
$strHeader = $strHeader . "<table width='600' border='0' align='center' cellpadding='0' cellspacing='0'>";
$strHeader = $strHeader . "<tr>";
$strHeader = $strHeader . "<td background='
http://ebaby.infordomain.net/images/bg_grad.gif'><img src='
http://ebaby.infordomain.net/images/admin_logo.gif' width='600' height='100'></td>";
$strHeader = $strHeader . "</tr>";
$strHeader = $strHeader . "<tr>";
$strHeader = $strHeader . "<td height='1' bgcolor='686868'><img src='
http://ebaby.infordomain.net/images/paper.gif' width='1' height='1'></td>";
$strHeader = $strHeader . "</tr>";
$strHeader = $strHeader . "<tr>";
$strHeader = $strHeader . "<td valign='top'><table width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'>";
$strHeader = $strHeader . "<tr>";
$strHeader = $strHeader . "<td><table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>";
$strHeader = $strHeader . "<tr>";
$strHeader = $strHeader . "<td width='8' height='6'><img src='
http://ebaby.infordomain.net/images/table_t_l_corner.gif' width='8' height='6'></td>";
$strHeader = $strHeader . "<td height='6' background='
http://ebaby.infordomain.net/images/tabletope_bg.gif'><img src='../images/paper.gif' width='1' height='1'></td>";
$strHeader = $strHeader . "<td width='8' height='6'><img src='
http://ebaby.infordomain.net/images/table_t_r_corner.gif' width='8' height='6'></td>";
$strHeader = $strHeader . "</tr>";
$strHeader = $strHeader . "</table></td>";
$strHeader = $strHeader . "</tr>";
$strHeader = $strHeader . "<tr>";
$strHeader = $strHeader . "<td height='100%'> <table width='100%' height='100%' border='0' align='center' cellpadding='0' cellspacing='0'>";
$strHeader = $strHeader . "<tr>";
$strHeader = $strHeader . "<td width='8' background='
http://ebaby.infordomain.net/images/tableleft_bg.gif'><img src='../images/paper.gif' width='1' height='1'></td>";
$strHeader = $strHeader . "<td align='center' bgcolor='F2E2CC'> <table width='100%' height='100%' border='0' align='center' cellpadding='0' cellspacing='0'>";
$strHeader = $strHeader . "<tr>";
$strHeader = $strHeader . "<td height='100%' valign='top'> <table width='100%' height='100%' border='0' align='center' cellpadding='0' cellspacing='0'>";
$strHeader = $strHeader . "<tr>";
$strHeader = $strHeader . "<td valign='top'> <table width='100%' height='100%' border='0' align='left' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>";
$strHeader = $strHeader . "<tr>";
$strHeader = $strHeader . "<td height='100%' valign='top'> <table width='100%' height='100%' border='0' align='center' cellpadding='0' cellspacing='8'>";
$strHeader = $strHeader . "<tr>";
$strHeader = $strHeader . "<td valign='top' class='var11spacing16'>";
$strHeader = $strHeader . "<table width='100%' border='0' cellpadding='0' cellspacing='0'>";
//$strHeader = $strHeader . "<tr>";
// $strHeader = $strHeader . "<td height='19'><img src='../images/outofstock_tit.gif'></td>";
//$strHeader = $strHeader . "</tr>";
$strHeader = $strHeader . "<tr>";
$strHeader = $strHeader . "<td class='var11spacing16'><br>";
return $strHeader;
}
function getFooter(){
$strFooter = "";
$strFooter = $strFooter . "</td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "</table></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "</table></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "<tr>";
$strFooter = $strFooter . "<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
$strFooter = $strFooter . "<tr>";
$strFooter = $strFooter . "<td width='9' height='9'><img src='
http://ebaby.infordomain.net/images/inner_l_corner.gif' width='9' height='9'></td>";
$strFooter = $strFooter . "<td height='9'><img src='
http://ebaby.infordomain.net/images/paper.gif' width='1' height='1'></td>";
$strFooter = $strFooter . "<td width='9' height='9'><img src='
http://ebaby.infordomain.net/images/inner_r_corner.gif' width='9' height='9'></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "</table></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "</table></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "</table></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "</table></td>";
$strFooter = $strFooter . "<td width='8' background='
http://ebaby.infordomain.net/images/tableright_bg.gif'><img src='../images/paper.gif' width='1' height='1'></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "</table></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "<tr>";
$strFooter = $strFooter . "<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>";
$strFooter = $strFooter . "<tr>";
$strFooter = $strFooter . "<td><table width='100%' border='0' cellpadding='0' cellspacing='0' bgcolor='FAFBE9'>";
$strFooter = $strFooter . "<tr>";
$strFooter = $strFooter . " <td width='8' background='
http://ebaby.infordomain.net/images/tableleft_bg.gif'><img src='../images/paper.gif' width='1' height='1'></td>";
$strFooter = $strFooter . "<td height='37'> <div align='center'>";
$strFooter = $strFooter . "<p><!-- a href='javascript: window.close()' class='var11sp16redbold'>Close</a--> </p>";
$strFooter = $strFooter . "</div></td>";
$strFooter = $strFooter . "<td width='8' background='
http://ebaby.infordomain.net/images/tableright_bg.gif'><img src='../images/paper.gif' width='1' height='1'></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "</table></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "<tr>";
$strFooter = $strFooter . "<td><table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>";
$strFooter = $strFooter . "<tr>";
$strFooter = $strFooter . "<td width='12' height='12'><img src='
http://ebaby.infordomain.net/images/table_b_l_corner2.gif' width='12' height='12'></td>";
$strFooter = $strFooter . "<td height='12' background='
http://ebaby.infordomain.net/images/tablebottom_bg2.gif'><img src='../images/paper.gif' width='1' height='1'></td>";
$strFooter = $strFooter . "<td width='12' height='12'><img src='
http://ebaby.infordomain.net/images/table_b_r_corner2.gif' width='12' height='12'></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "</table></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "</table></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "</table></td>";
$strFooter = $strFooter . "</tr>";
$strFooter = $strFooter . "</table>";
return $strFooter;
}
function getBody(){
$strBody="";
$strBody = $strBody . "<p>The following table is showing details about out of stock. </p>";
$strBody = $strBody . "<p><table width='537' border='2' align='center' cellpadding='1' cellspacing='1'>";
$strBody = $strBody . "<caption class='var12sp16boldred'>Out of Stock Data Details</caption>";
$strBody = $strBody . "<tr class='var12sp16bold'>";
$strBody = $strBody . "<th width='61' scope='row'><div align='center'>Code</div></th>";
$strBody = $strBody . "<td width='140'><div align='center'>Category</div></td>";
$strBody = $strBody . "<td width='231'><div align='center'>Name</div></td>";
$strBody = $strBody . "<td width='80'><div align='center'>Status</div></td></tr>";
$strdata="";
$reproducts=mysql_query("select c.cat_name,c.parent_id,d.cat_id,d.item_id,d.item_code,d.item_name,d.item_rol,d.stock_status from ebaby_categories c,ebaby_item_details d where c.cat_id=d.cat_id and d.stock_status='Out-Stock' and d.item_isactive=1 and d.item_qoh<=d.item_rol and d.item_mail_status=0");
$recount=mysql_num_rows($reproducts);
if($recount!=0){
while($rsproducts=mysql_fetch_array($reproducts)){
//mysql_query("update ebaby_item_details set item_mail_status=1 where item_id=".$rsproducts["item_id"]);
$strdata = $strdata . "<tr class='var10'>";
$strdata = $strdata . "<td><div align='center'>".$rsproducts["item_code"]."</div></td>";
$strdata = $strdata . "<td>".$rsproducts["cat_name"]."</td>";
$strdata = $strdata . "<td><div align='left'>".$rsproducts["item_name"]."</div></td>";
$strdata = $strdata . "<td><div align='center'>".$rsproducts["stock_status"]."</div></td>";
$strdata = $strdata . "</tr>";
}
$strdata = $strdata . "</table>";
$strBody = $strBody . $strdata;
}
return $strBody;
}
function getBody1($rolcodes){
$strBody="";
$strBody = $strBody . "<p>The following table is showing details about out of stock. </p>";
$strBody = $strBody . "<p><table width='537' border='2' align='center' cellpadding='1' cellspacing='1'>";
$strBody = $strBody . "<caption class='var12sp16boldred'>Out of Stock Data Details</caption>";
$strBody = $strBody . "<tr class='var12sp16bold'>";
$strBody = $strBody . "<th width='61' scope='row'><div align='center'>Code</div></th>";
$strBody = $strBody . "<td width='140'><div align='center'>Category</div></td>";
$strBody = $strBody . "<td width='231'><div align='center'>Name</div></td>";
$strBody = $strBody . "<td width='80'><div align='center'>Status</div></td></tr>";
$strdata="";
// $reproducts=mysql_query("select c.cat_name,c.parent_id,d.cat_id,d.item_id,d.item_code,d.item_name,d.item_rol,d.stock_status from ebaby_categories c,ebaby_item_details d where c.cat_id=d.cat_id and d.stock_status='Out-Stock' and d.item_isactive=1 and d.item_qoh<=d.item_rol and d.item_mail_status=0");
$rolcodes=str_replace(",,",",",$rolcodes);
$rolcodes1=str_replace(",","','",$rolcodes);
$reproducts=mysql_query("select c.cat_name,c.parent_id,d.cat_id,d.item_id,d.item_code,d.item_name,d.item_rol,d.stock_status from ebaby_categories c,ebaby_item_details d where c.cat_id=d.cat_id and d.item_isactive=1 and d.item_mail_status=0 and d.item_code in('".$rolcodes1."')");
//echo $reproducts;
//exit;
$recount=mysql_num_rows($reproducts);
if($recount!=0){
while($rsproducts=mysql_fetch_array($reproducts)){
mysql_query("update ebaby_item_details set item_mail_status=1,stock_status='Out-Stock' where item_id=".$rsproducts["item_id"]);
$strdata = $strdata . "<tr class='var10'>";
$strdata = $strdata . "<td><div align='center'>".$rsproducts["item_code"]."</div></td>";
$strdata = $strdata . "<td>".$rsproducts["cat_name"]."</td>";
$strdata = $strdata . "<td><div align='left'>".$rsproducts["item_name"]."</div></td>";
$strdata = $strdata . "<td><div align='center'>".$rsproducts["stock_status"]."</div></td>";
$strdata = $strdata . "</tr>";
}
} $strdata = $strdata . "</table>";
$strBody = $strBody . $strdata;
return $strBody;
}
/*
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From:
www.mrslinskitchen.com<
www.mrslinskitchen.com>\r\n";
//$headers .= "Cc:
birthdayarchive@example.com\r\n";
//$headers .= "Bcc:
birthdaycheck@example.com\r\n";
$to = "
admin@mrslinskitchen.com";
$subject = "Out of Stock Details.";
$message = getHeader() . getBody() . getFooter();
//echo $message;
//exit;
mail($to, $subject, $message, $headers);
*/
?>
Francis Y.