".$sSQL); while($row = mysql_fetch_assoc($result)){$category_forum=$row['category_forum'];} } $sSQL="INSERT INTO blog (dateCreated, fname, email, comment, productsID, category_forum, parentID, main_parentID, approved) VALUES (NOW(), '".toSQL($_POST['fname'])."', '".toSQL($_POST['email'])."', '".toSQL($_POST['comment'])."', '".toSQL($_POST['productsID'])."', '".toSQL($category_forum)."', '".toSQL($parentID)."', '".toSQL($parentID)."', '1')"; mysql_query($sSQL) or die("err: " . mysql_error().$sSQL); $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "From: ".stripslashes($_POST['fname'])." <".stripslashes($_POST['email'])."> \n"; $mailbody=""; if(!empty($parentID)){$mailbody.="";} $mailbody.=""; $mailbody.=""; $mailbody.=""; $mailbody.=""; $mailbody.=""; $mailbody.="
Reply to Post # ".$parentID."
Name ".stripslashes($_POST['fname'])."
Email: ".stripslashes($_POST['email'])."
Product: ".stripslashes($_POST['email'])."
Category: ".stripslashes($arr_category_forum[$category_forum])."
Message: ".stripslashes(nl2br($_POST['comment']))."
"; $sSubject="Message from KimTech Web"; mail("admin@kimtech.ca", $sSubject, $mailbody, $headers); mail("info@kimtech.ca", $sSubject, $mailbody, $headers); $_POST['fname']=""; $_POST['comment']=""; $_POST['email']=""; $parentID=""; $productsID=""; //print $mailbody."
".$headers; //exit(); /* ?>

Email has been sent successfully

close x  
Message has been sent successfully
"; } $_SESSION["secureNumber"]=0; } else{$mess="
Wrong number
";} } ?>
Message board
Forum:   Product:
New message
".$sSQL); $arr_product=array(); while($row = mysql_fetch_assoc($result)){ $arr_product[$row['productsID']]=$row['title']." - ".$row['m_title'];} $sSQL="SELECT blogID, dateCreated, fname, email, comment, productsID, parentID, category_forum FROM blog WHERE approved='1' AND parentID=0 "; if(!empty($_SESSION['productsID_forum_sess'])){ $sSQL.=" AND productsID='".toSQL($_SESSION['productsID_forum_sess'])."'";} if(!empty($_SESSION['category_forum_view_sess'])){ $sSQL.=" AND category_forum='".toSQL($_SESSION['category_forum_view_sess'])."'";} $sSQL.=" ORDER BY dateCreated DESC"; $result = mysql_query($sSQL) or die("err: " . mysql_error().$sSQL); $pageItems=20; $pageNum=empty($_REQUEST['pageNum'])?'1':$_REQUEST['pageNum']; $total=mysql_num_rows($result); if($pageItems*($pageNum-1)>$total)$pageNum=0; if($total>0)$rr=mysql_data_seek($result, $pageItems*($pageNum-1)); $s_blogID=""; $ii=0; while($row = mysql_fetch_assoc($result)){$ii++; if($ii>$pageItems)break; $s_blogID.=$row['blogID'].","; } $arr_replays=array(); if(!empty($s_blogID)){ $s_blogID=substr($s_blogID, 0, -1); $sSQL="SELECT * FROM blog WHERE parentID IN ($s_blogID)"; $result1 = mysql_query($sSQL) or die("err: " . mysql_error().$sSQL); while($row1 = mysql_fetch_assoc($result1)){ $arr_replays[$row1['parentID']][$row1['blogID']]['fname']=$row1['fname']; $arr_replays[$row1['parentID']][$row1['blogID']]['email']=$row1['email']; $arr_replays[$row1['parentID']][$row1['blogID']]['dateCreated']=$row1['dateCreated']; $arr_replays[$row1['parentID']][$row1['blogID']]['comment']=$row1['comment']; $arr_replays[$row1['parentID']][$row1['blogID']]['productsID']=$row1['productsID']; } } if($pageItems*($pageNum-1)>$total)$pageNum=0; if($total>0)$rr=mysql_data_seek($result, $pageItems*($pageNum-1)); ?>