jam0886 Posted November 26, 2007 Share Posted November 26, 2007 Hi y’all there kindhearted people. I’m new to PHP and also new to Macromedia Dreamweaver 8. I’ve done li’l readings on it but I still don’t get some functions of it. The following are the codes for our Customer Service Report which is sent to an e-mail. It carries the function of sending the CSR. The problem of this codes shows in the image I posted below. As you can see, the left margin is off and the texts don’t have the same font sizes. Can somebody help me with this? Please? Please try to check where the codes went wrong. I mean, please give me the appropriate codes to arrange the format: the left margin and the texts which will have the same font sizes. Please? Please… Please… Please… Thank you so so so much guys! Sorry for being so dumb. Please help me. sendcsr.php <?php session_start(); require("config2.php"); if (!session_is_registered("user")) { echo "<script>window.location=\"csr_login.php\"</script>"; exit; } ?> <?php $result = mysql_query( "select * from user WHERE username='$user'" ) ; $count = mysql_num_rows($result) ; if ($count!= 0) { $row=mysql_fetch_array($result) ; $email=$row["email"]; } ?> <html> <head> <title>S e n d i n g C.S.R</title> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 18px; color: #0000FF; } .style7 { color: #0000FF; font-weight: bold; text-decoration: blink; } .style8 { color: #0000FF; font-family: Verdana, Arial, Helvetica, sans-serif; } .style10 {color: #33FF00; font-weight: bold; text-decoration: blink; } .style5 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; } .style6 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; } --> </style> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <div> <table width="110%" height="2%" border="1" cellpadding="0" cellspacing="0"> <tr> <th height="19" align="left" valign="middle" bgcolor="#333333" class="header1 style8">Mail Status:</th> </tr> <tr> <td height="112" align="left" valign="top" class="style5"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" align="center" valign="middle" bgcolor="#999999"><table width="100%" height="100%" border="0" cellpadding="1" cellspacing="2" > <tr> <td height="22" align="center" bgcolor="#999999"><?php $fsename_val = $HTTP_GET_VARS['fsename']; $installation_val = $HTTP_GET_VARS['installation']; $service_val = $HTTP_GET_VARS['service']; $training_val = $HTTP_GET_VARS['training']; $servicecontract_val = $HTTP_GET_VARS['servicecontract']; $underwarranty_val = $HTTP_GET_VARS['underwarranty']; $expired_val = $HTTP_GET_VARS['expired']; $chargeable_val = $HTTP_GET_VARS['chargeable']; $notchargeable_val = $HTTP_GET_VARS['notchargeable']; $completed_val = $HTTP_GET_VARS['completed']; $pending_val = $HTTP_GET_VARS['pending']; $datestarted_val = $HTTP_GET_VARS['datestarted']; $datefinished_val = $HTTP_GET_VARS['datefinished']; $timestarted_val = $HTTP_GET_VARS['timestarted']; $timefinished_val = $HTTP_GET_VARS['timefinished']; $systemmodel_val = $HTTP_GET_VARS['systemmodel']; $custname_val = $HTTP_GET_VARS['custname']; $custadd_val = $HTTP_GET_VARS['custadd']; $ackname_val = $HTTP_GET_VARS['ackname']; $ackdept_val = $HTTP_GET_VARS['ackdept']; $background_val = $HTTP_GET_VARS['background']; $analysis_val = $HTTP_GET_VARS['analysis']; $machinestatus_val = $HTTP_GET_VARS['machinestatus']; $recomm_val = $HTTP_GET_VARS['recomm']; $sparepart_val = $HTTP_GET_VARS['sparepart']; //$email_val = $HTTP_GET_VARS['email']; // Read old entries //$FP = fopen($TextFile, "r"); //$Counter=fgets($FP, 4096); //fclose ($FP); //settype($Counter, "double"); $Counter++; if ($FP = fopen ($TextFile, "w")){ fwrite ($FP, $Counter); fclose ($FP); } $counter="$counter"; $msg= <<<EOF <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 18px; color: #0000FF; } .style7 { color: #0000FF; font-weight: bold; text-decoration: blink; } .style8 { color: #0000FF; font-family: Verdana, Arial, Helvetica, sans-serif; } .style10 {color: #33FF00; font-weight: bold; text-decoration: blink; } .style5 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; } .style6 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; } --> </style> </head> <body> <div align="center"><img src="http://www.inzpect.com/inzpect header.jpg" alt="inzpect" width="350" height="68" /> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th scope="col"><div align="left" class="style1">Customer Service Report <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th scope="col"> </th> </tr> </table> </div></th> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" scope="col"><div align="left"><span class="style6">Field Service Engineer Name:</span></div></th> <th width="584" scope="col"><div align="left" class="style5"> $fsename_val</div></th> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" scope="col"><div align="left" class="style6">Type of Service: </div></th> <td width="584" scope="col"><div align="left" class="style5"> $installation_val $service_val $training_val $servicecontract_val</div></td> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" class="style6" scope="col"><div align="left">Warranty:</div></th> <td width="584" class="style5" scope="col"> $underwarranty_val $expired_val</td> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" scope="col"><div align="left" class="style6">Charge:</div></th> <td width="584" scope="col"><div align="left" class="style5"> $chargeable_val $notchargeable_val</div></td> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" scope="col"><div align="left" class="style6">Status:</div></th> <td width="584" scope="col"><div align="left" class="style5"> $completed_val $pending_val</div></td> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" scope="col"><div align="left" class="style6">Working Days & Hours:</div></th> <td width="220" scope="col"><div align="left" class="style5"></div> </td><tr> <tr> <th width="216" scope="col"><div align="right" class="style6">Date Started: </div></th> <td width="220" scope="col"><div align="left" class="style5"> $datestarted_val</div></td> <th width="108" scope="col"><div align="right" class="style6">Date Finished: </div></th> <td width="256" scope="col"><div align="left" class="style5"> $datefinished_val</div></td> </tr> <tr> <th class="style6"><div align="right">Time Started: </div></th> <td class="style5"> $timestarted_val</td> <th class="style6"><div align="right">Time Finished: </div></th> <td><div align="left" class="style5"> $timefinished_val</div></td> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="287" scope="col"><div align="left" class="style6">System Model / SN / Project Name / CPO Number: </div></th> <td width="513" class="style5" scope="col"><div align="left"> $systemmodel_val</div></td> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" scope="col"><div align="left"><span class="style6">Customer Information: </span></div></th> <th width="220" scope="col"><div align="left" class="style5"></div></th> <th width="52" scope="col"> </th> <th width="312" scope="col"> </th> </tr> <tr> <th class="style6"><div align="right">Name:</div></th> <td class="style5"><div align="left"> $custname_val</div></td> <th class="style6"><div align="left">Address:</div></th> <td class="style5"> $custadd_val</td> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" class="style6" scope="col"><div align="left">Customer Acknowledgement: </div></th> <th width="220" scope="col"><div align="left"></div></th> <th width="151" scope="col"> </th> <th width="213" scope="col"> </th> </tr> <tr> <th><div align="right" class="style6">Name:</div></th> <td class="style5"> $ackname_val</td> <th class="style6"><div align="left">Department/Designation:</div></th> <td class="style5"> $ackdept_val</td> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" scope="col"><div align="left" class="style6">Background:</div></th> <td width="584" scope="col"><div align="left" class="style5"> $background_val</div></td> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" scope="col"><div align="left"><span class="style6">Analysis/Troubleshooting:</span></div></th> <td width="584" scope="col"><div align="left" class="style5"> $analysis_val</div></td> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" scope="col"><div align="left"><span class="style6">Machine Status: </span></div></th> <td width="584" class="style5" scope="col"><div align="left"> $machinestatus_val</div></td> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" scope="col"><div align="left"><span class="style6">Recommendations:</span></div></th> <td width="584" scope="col"><div align="left" class="style5"> $recomm_val</div></td> </tr> </table> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="216" scope="col"><div align="left"><span class="style6">Spare Part Used: </span></div></th> <td width="584" class="style5" scope="col"><div align="left"> $sparepart_val</div></td> </tr> </table> </div> EOF; EOF; $headers = "From: $fsename_val's CSR...\r\n"; $headers .= 'Cc: cristensen.gonzaga@inzpect.com,joysie.sarangena@inzpect.com,' . "\r\n"; $headers .= "Content-type: text/html\r\n"; $subject = "[$systemmodel_val][Date Started:$datestarted_val][status:$completed_val $pending_val]"; $sent = mail($mailto."jrsumalabe@inzpect.com,rolando_laya@inzpect.com,service-inz@inzpect.com, ",$subject, $msg, $headers); if ($sent){ ?> <span class="style190"><span class="style10">Customer Service Report Successfully Sent ! ! !</span> <? }else{ ?> </span><span class="style10">Message Sending failed!</span><span class="style190"> <? } ?> </span></td> </tr> </table></td> </tr> <tr> <td width="5%" bgcolor="#999999"> </td> <td width="47%" align="right" valign="middle" bgcolor="#999999"><form name="form1" method="post" action="csrlogout.php"> <input name="logout" type=submit class="header1" id="logout" value= logout> </form></td> <td width="48%" align="left" valign="middle" bgcolor="#999999"><form name="form2" method="post" action=""> <input name="back" type="button" class="header1" id="back" value=" back " onClick="history.back()"> </form></td> </tr> </table></td> </tr> </table> </div> </body> </html> CSR Sent to E-mail Link to comment Share on other sites More sharing options...
kenrbnsn Posted November 26, 2007 Share Posted November 26, 2007 Please don't double post. Topic locked Link to comment Share on other sites More sharing options...
Recommended Posts