Jump to content

jimlawrnc

Members
  • Posts

    55
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jimlawrnc's Achievements

Member

Member (2/5)

0

Reputation

  1. I was looking to build a tool that would obtain the dns servers and mx record by domain name. I found a tool that does this but i would like to do this from my own linux server. the site that has this is http://software77.net/DNS/ anyone ever build anything like this?
  2. Guess I wont need this after all thank you all anyway
  3. If you hit this http://74.42.245.172/~jim/mailer.php the mail fucntion works perfect on this box as well as on my home server
  4. im running this off my own server or my work server either way i have root access
  5. No errors are printed nor anything else go to http://jplawrence.us/wof.php I copied the files to my home pc to work on
  6. yes it gets sent in a email and also printed to the screen so it can be printed out
  7. I have a 2 page setup that was given to me. 1 is a form with a submit button 2 is the form printed to the page but also emailed. these pages were originally asp pages that someone converted to php i cannot get the page to print and second get emailed wof.php <html> <head> <script language="javascript" src="choosedate.js"></script> <link type="text/css" rel="stylesheet" href="calendar.css"> </head> <title>Work Order Form</title> <body> <form name="frm" method="post" action="wof2.php"> <table border="0" cellpadding="2" cellspacing="0" style="BORDER-COLLAPSE: collapse" width="100%" height="557"> <tr> <td width="100%" colspan="10" bgcolor="#c0c0c0" height="19" bordercolor="#000000"> <b>Part 1: Client Information</b></td> </tr> <tr> <td width="100%" colspan="10" height="22"> <font size="2" face="Times New Roman">Name: </font> <font face="Times New Roman"> <input name="Client_Name" size="88" tabindex="1" ></font></td> </tr> <tr> <td width="100%" colspan="10" height="22"> <font size="2" face="Times New Roman">Street Address: </font> <font face="Times New Roman"> <input name="Street_address" size="80" tabindex="2" ></font></td> </tr> <tr> <td width="24%" height="22"><font size="2" face="Times New Roman">City: </font><font face="Times New Roman"> <input name="City" size="16" tabindex="3" ></font></td> <td width="9%" colspan="2" height="22"> <font size="2" face="Times New Roman">State: </font> <font face="Times New Roman"><select size="1" name="State" tabindex="4"> <option selected>NY</option> </select></font></td> <td width="16%" colspan="3" height="22"> <font size="2" face="Times New Roman">Zip: </font> <font face="Times New Roman"> <input name="Zip" size="9" tabindex="5" ></font></td> <td width="51%" colspan="4" height="22"> <font size="2" face="Times New Roman">Email: </font> <font face="Times New Roman"> <input name="Email" size="34" tabindex="6" ></font></td> </tr> <tr> <td width="39%" colspan="2" height="22"> <font size="2" face="Times New Roman">Phone: </font> <font face="Times New Roman"> <input name="Phone" tabindex="7" ></font></td> <td width="25%" colspan="5" height="22"> <font size="2" face="Times New Roman">Fax: </font> <font face="Times New Roman"> <input name="Fax" tabindex="8" ></font></td> <td width="36%" colspan="3" height="22"> <font size="2" face="Times New Roman">Cell: </font> <font face="Times New Roman"> <input name="Cell_Phone" tabindex="9" ></font></td> </tr> <tr> <td width="100%" colspan="10" bgcolor="#c0c0c0" height="19" bordercolor="#000000"> <b>Part 2: System Information</b></td> </tr> <tr> <td width="100%" height="22" colspan="10"><font size="2" face="Times New Roman"> Operating System:</font><font face="Times New Roman"> <select size="1" name="Operating_System" tabindex="10"> <option>Windows 2003 Server</option> <option selected>- Choose One -</option> <option>Windows 2003 Small Business Server</option> <option>Windows 2000 Server</option> <option>Windows 2000 Small Business Server</option> <option>Windows 2000</option> <option>Windows XP Pro</option> <option>Windows XP Home</option> <option>Windows 98</option> <option>Windows ME</option> <option>Linux</option> <option>MAC OS 9</option> <option>MAC OS X</option> </select></font></td> </tr> <tr> <td width="60%" colspan="4" height="22"> <font size="2" face="Times New Roman">Machine Name: </font> <font face="Times New Roman"> <input name="Machine_Name" size="27" tabindex="11" ></font></td> <td width="40%" colspan="6" height="22"> <font size="2" face="Times New Roman">IP Number: </font> <font face="Times New Roman"> <input name="IP_Number" size="37" tabindex="12" ></font></td> </tr> <tr> <td width="100%" height="22" colspan="10"><font size="2" face="Times New Roman">Internet Access Type:</font><font face="Times New Roman"> <select size="1" name="Internet_Type" tabindex="13"> <option>Dial-Up</option> <option selected>- Choose One -</option> <option>Frontier DSL</option> <option>Time Warner Cable</option> <option>T1</option> <option>Other</option> </select></font><font size="2" face="Times New Roman"> </font><font face="Times New Roman"> <input name="Internet_Other_Type" tabindex="14" ></font></td> </tr> <tr> <td width="24%" height="22"><font size="2" face="Times New Roman">Ram: </font><font face="Times New Roman"> <select size="1" name="Ram" tabindex="15"> <option>128 Mb</option> <option selected>- Choose One -</option> <option>256 Mb</option> <option>512 Mb</option> <option>1.0 Gb</option> <option>2.0 Gb</option> </select></font></td> <td width="35%" colspan="5" height="22"> <font size="2" face="Times New Roman">HD 1:</font><font face="Times New Roman"><select size="1" name="Hard_Drive_1" tabindex="16"> <option>18.6Gb</option> <option selected>- Choose -</option> <option>36.7 Gb</option> <option>40 Gb</option> <option>72.5 gb</option> <option>80 Gb</option> <option>100 Gb</option> <option>120 Gb</option> <option>160 Gb</option> <option>200 Gb</option> <option>250 Gb</option> <option>300 Gb</option> <option>400 Gb</option> </select></font></td> <td width="17%" colspan="2" height="22"> <font size="2" face="Times New Roman">HD 2: </font> <font face="Times New Roman"> <select size="1" name="Hard_Drive_2" tabindex="17"> <option>18.6Gb</option> <option selected>- Choose -</option> <option>36.7 Gb</option> <option>40 Gb</option> <option>72.5 gb</option> <option>80 Gb</option> <option>100 Gb</option> <option>120 Gb</option> <option>160 Gb</option> <option>200 Gb</option> <option>250 Gb</option> <option>300 Gb</option> <option>400 Gb</option> </select></font></td> <td width="24%" colspan="2" height="22"> <font size="2" face="Times New Roman">Raid: </font> <font face="Times New Roman"><select size="1" name="Raid" tabindex="18"> <option>None</option> <option selected>- Choose One -</option> <option>Raid 0</option> <option>Raid 1</option> <option>Raid 5</option> </select></font></td> </tr> <tr> <td width="50%" height="19" colspan="5"><font face="Times New Roman" size="2">Network Type:</font><font face="Times New Roman"> <select size="1" name="Network_Type" tabindex="19"> <option>Novel</option> <option selected>- Choose One -</option> <option>Windows Domain</option> <option>Windows Peer-to-Peer</option> <option>None</option> </select></font></td> <td width="50%" height="19" colspan="5"><font size="2" face="Times New Roman">Backup: </font><font face="Times New Roman"> <select size="1" name="Backup" tabindex="20"> <option>Yes</option> <option selected>- Choose -</option> <option>No</option> </select></font></td> </tr> <tr> <td width="24%" height="17"><font size="2" face="Times New Roman"> Firewall: </font><font face="Times New Roman"> <select size="1" name="Firewall" tabindex="21"> <option value="Yes">Yes</option> <option selected>- Choose -</option> <option>No</option> </select></font></td> <td width="58%" height="17" colspan="8"> <font size="2" face="Times New Roman">Antivirus: </font> <font face="Times New Roman"> <select size="1" name="Antivirus" tabindex="22"> <option>Yes</option> <option selected>- Choose -</option> <option>No</option> </select></font><font size="2" face="Times New Roman">Version: </font> <font face="Times New Roman"> <input name="Antivirus_Version" size="21" tabindex="23" ></font></td> <td width="18%" height="17"></td> </tr> <tr> <td width="33%" height="19" colspan="3"> <font size="2" face="Times New Roman">System Performance: </font> <font face="Times New Roman"> <select size="1" name="System_Performance" tabindex="24"> <option>Very Slow</option> <option>Slow</option> <option>Average</option> <option selected>Fast</option> <option>Very Fast</option> </select></font></td> <td width="67%" height="19" colspan="7"> <font size="2" face="Times New Roman">Hard drive Free Space: c:\ </font> <font face="Times New Roman"> <input name="C_Drive_Free_Space" size="8" tabindex="25" ><select size="1" name="C_Freespace_Type" tabindex="26"> <option selected>Mb</option> <option>Gb</option> </select></font><font size="2" face="Times New Roman"> d:\ </font> <font face="Times New Roman"> <input name="D_Drive_Free_Space" size="8" tabindex="27" ><select size="1" name="D_Freespace_Type" tabindex="28"> <option selected>Mb</option> <option>Gb</option> </select></font><font size="2" face="Times New Roman"> </font></td> </tr> <tr> <td width="100%" height="19" colspan="10" bgcolor="#c0c0c0" bordercolor="#000000"> <b>Part 3: On-Site Support Description</b></td> </tr> <tr> <td width="690" height="19" colspan="10"><TEXTAREA tabIndex=29 name=Onsite_Work_Description rows=3 cols=82></TEXTAREA></td> </tr> <tr> <td width="100%" height="19" colspan="10" bgcolor="#c0c0c0" bordercolor="#000000"> <b>Part 4: Parts to Invoice</b></td> </tr> <tr> <td width="100%" height="4" colspan="10"><TEXTAREA tabIndex=30 name=Parts_to_Invoice rows=3 cols=82></TEXTAREA></td> </tr> <tr> <td width="100%" height="19" colspan="10" bgcolor="#c0c0c0"> <b>Part 5: Technician Suggestions</b></td> </tr> <tr> <td width="100%" height="19" colspan="10"><TEXTAREA tabIndex=31 name=Tech_Suggestions cols=82></TEXTAREA></td> </tr> <tr> <td width="100%" height="19" colspan="10" bgcolor="#c0c0c0"> <b>Part 6: Follow Up / Sales Notes</b></td> </tr> <tr> <td width="100%" height="19" colspan="10"><TEXTAREA tabIndex=32 name=Followup_Sales cols=82></TEXTAREA></td> </tr> <tr> <td width="39%" height="19" colspan="2">Start Time: <input name="Start_Time" size="9" tabindex="33" ><select size="1" name="Start_Time_AP" tabindex="34"> <option selected>AM</option> <option>PM</option> </select></td> <td width="25%" height="19" colspan="5">End Time: <input name="End_Time" size="9" tabindex="35" ><select size="1" name="End_Time_AP" tabindex="36"> <option selected>AM</option> <option>PM</option> </select></td> <td width="36%" height="19" colspan="3">Total Time: <input name="Total_Time" size="10" tabindex="37" > Hours</td> </tr> <tr> <td width="100%" height="19" colspan="10">Billing Rate: <select size="1" name="Billing_Rate" tabindex="38"> <option>Remote Support</option> <option>Bench Support - $55/hr</option> <option>Web Developement</option> <option>$80/hr + $65 Travel</option> <option>$115/hr + $65 Travel</option> <option>$150/hr</option> <option>Contract</option> <option selected>- Choose One -</option> <option>Other</option> </select> Other Notes:<input name="Billing_Rate_Other" size="47" tabindex="38" ></td> </tr> <tr> <td width="39%" height="19" colspan="2">Technician:<select size="1" name="Technician" tabindex="40"> <option>Elixir - Designer</option> <option>Elixir - Developer</option> <option>Jim Lawrence</option> <option>Chris Smith</option> <option>Tim Conner</option> <option>Doug Merritt</option> <option>Scott Provvidenza</option> <option selected>- Choose One -</option> </select></td> <td width="9%" height="19" colspan="4">Date: <input name="Date" size="14" tabindex="41" ><script language=javascript> var basicCal = new calendar("FIELD:document.frm.Date"); basicCal.writeCalendar(); </script></td> <td width="52%" height="19" colspan="4">Additional work required: <select size="1" name="Additional_Work_Needed" tabindex="42"> <option selected>No</option> <option>Yes</option> </select></td> </tr> <tr> <td width="100%" height="19" colspan="10"> <p class="MsoNormal"><span style="FONT-SIZE: 10pt" >I have reviewed the statements regarding system operation and components and hereby agree to all the Terms and Conditions set forth by Point-N-Click. I fully understand the time and materials pricing and confirm the total amount of time spent working on my system today as indicated by my signature below.<br> </span></p></td> </tr> <tr> <td width="64%" height="40" valign="bottom" colspan="7">Customer Signature:_________________________________</td> <td width="36%" height="40" valign="bottom" colspan="3">Date:__________________</td> </tr> </table> <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p> </form> </body> </html> wof2.php <?php // Option $Explicit; // $CDO is of type "CDONTS.NewMail" mail(,$TestMode=false,$If$TestMode,"From: ".$Subject="Point-N-Click On-Site Work Order Form"); ; } mail(,,,"From: ".$CC="") or die(); mail($msgBody="Client Name: ".EmailVal("Client_Name")."\r\n",$msgBody=$msgBody."Street Address: ".EmailVal("Street_address")."\r\n",$msgBody=$msgBody."City: ".EmailVal("City")."\r\n","From: ".="lou@experiencethemedia.com"); mail($msgBody=$msgBody."State: ".EmailVal("State")."\r\n",$msgBody=$msgBody."Zip: ".EmailVal("Zip")."\r\n",$msgBody=$msgBody."Email: ".EmailVal("Email")."\r\n","From: ".$CC="jim@pointnclickpcs.com; danika@pointnclickpcs.com"); mail($msgBody=$msgBody."Phone: ".EmailVal("Phone")."\r\n",$msgBody=$msgBody."Fax: ".EmailVal("Fax")."\r\n",$msgBody=$msgBody."Cell Phone: ".EmailVal("Cell_Phone")."\r\n","From: ".="jim@pointnclickpcs.com"); mail($msgBody=$msgBody."Operationg System: ".EmailVal("Operating_System")."\r\n",$msgBody=$msgBody."Machine Name: ".EmailVal("Machine_Name")."\r\n",$msgBody=$msgBody."IP Number: ".EmailVal("IP_Number")."\r\n","From: ".$From="scott@pointnclickpcs.com"); $msgBody=$msgBody."Internet Type: ".EmailVal("Internet_Type")."\r\n"; $msgBody=$msgBody."Internet Other Type: ".EmailVal("Internet_Other_Type")."\r\n"; $msgBody=$msgBody."RAM: ".EmailVal("Ram")."\r\n"; $msgBody=$msgBody."HD1: ".EmailVal("Hard_Drive_1")."\r\n"; $msgBody=$msgBody."HD2: ".EmailVal("Hard_Drive_2")."\r\n"; $msgBody=$msgBody."RAID: ".EmailVal("Raid")."\r\n"; $msgBody=$msgBody."Network Type: ".EmailVal("Network_Type")."\r\n"; $msgBody=$msgBody."Backup: ".EmailVal("Backup")."\r\n"; $msgBody=$msgBody."Firewall: ".EmailVal("Firewall")."\r\n"; $msgBody=$msgBody."Antivirus: ".EmailVal("Antivirus")."\r\n"; $msgBody=$msgBody."Antivirus Version: ".EmailVal("Antivirus_Version")."\r\n"; $msgBody=$msgBody."System Performance: ".EmailVal("System_Performance")."\r\n"; $msgBody=$msgBody."C Drive Free Space: ".EmailVal("C_Drive_Free_Space")." ".EmailVal("C_Freespace_Type")."\r\n"; $msgBody=$msgBody."D Drive Free Space: ".EmailVal("D_Drive_Free_Space")." ".EmailVal("D_Freespace_Type")."\r\n"."\r\n"; $msgBody=$msgBody."Onsite Work Description:"."\r\n"; $msgBody=$msgBody."------------------------"."\r\n"; $msgBody=$msgBody.EmailVal("Onsite_Work_Description")."\r\n"."\r\n"; $msgBody=$msgBody."Parts to Invoice:"."\r\n"; $msgBody=$msgBody."-----------------"."\r\n"; $msgBody=$msgBody.EmailVal("Parts_to_Invoice")."\r\n"."\r\n"; $msgBody=$msgBody."Technician Suggestions:"."\r\n"; $msgBody=$msgBody."-----------------------"."\r\n"; $msgBody=$msgBody.EmailVal("Tech_Suggestions")."\r\n"."\r\n"; $msgBody=$msgBody."Follow Up / Sales:"."\r\n"; $msgBody=$msgBody."------------------"."\r\n"; $msgBody=$msgBody.EmailVal("Followup_Sales")."\r\n"."\r\n"; $msgBody=$msgBody."Start Time: ".EmailVal("Start_Time")." ".EmailVal("Start_Time_AP")."\r\n"; $msgBody=$msgBody."End Time: ".EmailVal("End_Time")." ".EmailVal("End_Time_AP")."\r\n"; $msgBody=$msgBody."Total Time: ".EmailVal("Total_Time")." Hours"."\r\n"; $msgBody=$msgBody."Billing Rate: ".EmailVal("Billing_Rate")."\r\n"; $msgBody=$msgBody."Billing Rate Other: ".EmailVal("Billing_Rate_Other")."\r\n"; $msgBody=$msgBody."Technician: ".EmailVal("Technician")."\r\n"; $msgBody=$msgBody."Date: ".EmailVal("Date")."\r\n"; $msgBody=$msgBody."Additional Work Needed: ".EmailVal("Additional_Work_Needed")."\r\n"; mail(,$FunctionEmailVal($Key),$Dim$Val,"From: ".$Send); mail($Val=$_POST[$Key],$If$Val="- Choose One -"|$Val="- Choose -",$Val=" ","From: ".$Body=$msgBody); EmailVal = Val End Function Function FormVal(Key) Dim Val Val = Request.Form(key) If Val = "- Choose One -" Or Val = "- Choose -" Then Val = "" End If FormVal = Server.HTMLEncode(Val) End Function ?> <html> <head> <title>Title here</title> </head> <body> <table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" width="680"> <tr> <td colspan="2" bordercolor="#000000"> <b>Point-N-Click<br> 320 North Washington Street<br> Rochester, NY 14625<br> (585) 248-3820</b></td> <td colspan="2" bordercolor="#000000" align="right" valign="top"><b><font size="5">On-Site Work Order Form</font></b></td> </tr> <tr> <td width="690" colspan="4" bgcolor="#C0C0C0" height="19" bordercolor="#000000"> <b>Part 1: Client Information</b></td> </tr> <tr> <td width="690" colspan="4" height="22"> <font size="2" face="Times New Roman">Name: </font> <font face="Times New Roman"> <? if () { echo FormVal("Client_Name"); } ?></font></td> </tr> <tr> <td width="690" colspan="4" height="22"> <font size="2" face="Times New Roman">Street Address: </font> <font face="Times New Roman"> <? echo FormVal("Street_address");?></font></td> </tr> <tr> <td width="24%" height="22"><font size="2" face="Times New Roman">City: </font><font face="Times New Roman"> <? echo FormVal("City");?></font></td> <td width="9%" height="22"> <font size="2" face="Times New Roman">State: </font> <font face="Times New Roman"><? echo FormVal("State");?></font></td> <td width="16%" height="22"> <font size="2" face="Times New Roman">Zip: </font> <font face="Times New Roman"> <? echo FormVal("Zip");?></font></td> <td width="51%" height="22"> <font size="2" face="Times New Roman">Email: </font> <font face="Times New Roman"> <? echo FormVal("Email");?></font></td> </tr> <tr> <td width="39%" height="22"> <font size="2" face="Times New Roman">Phone: </font> <font face="Times New Roman"> <? echo FormVal("Phone");?></font></td> <td width="25%" colspan="2" height="22"> <font size="2" face="Times New Roman">Fax: </font> <font face="Times New Roman"> <? echo FormVal("Fax");?></font></td> <td width="36%" height="22"> <font size="2" face="Times New Roman">Cell: </font> <font face="Times New Roman"> <? echo FormVal("Cell_phone");?></font></td> </tr> <tr> <td width="690" colspan="4" bgcolor="#C0C0C0" height="19" bordercolor="#000000"> <b>Part 2: System Information</b></td> </tr> <tr> <td width="690" height="22"><font size="2" face="Times New Roman"> Operating System:</font><font face="Times New Roman"> <? echo FormVal("Operating_System");?></font></td> </tr> <tr> <td width="60%" colspan="2" height="22"> <font size="2" face="Times New Roman">Machine Name: </font> <font face="Times New Roman"> <? echo FormVal("Machine_Name");?></font></td> <td width="40%" colspan="2" height="22"> <font size="2" face="Times New Roman">IP Number: </font> <font face="Times New Roman"> <? echo FormVal("IP_Number");?></font></td> </tr> <tr> <td width="690" height="22"><font size="2" face="Times New Roman">Internet Access Type:</font><font face="Times New Roman"> <? echo FormVal("Internet_Type");?></font><font size="2" face="Times New Roman"> </font><font face="Times New Roman"> <? echo FormVal("Internet_Other_Type");?> </font></td> </tr> <tr> <td width="24%" height="22"><font size="2" face="Times New Roman">Ram: </font><font face="Times New Roman"> <? echo FormVal("Ram");?></font></td> <td width="35%" height="22"> <font size="2" face="Times New Roman">HD 1:</font><font face="Times New Roman"> <? echo FormVal("Hard_Drive_1");?> </select></font></td> <td width="17%" height="22"> <font size="2" face="Times New Roman">HD 2: </font> <font face="Times New Roman"> <? echo FormVal("Hard_Drive_2");?> </font></td> <td width="24%" height="22"> <font size="2" face="Times New Roman">Raid: </font> <font face="Times New Roman"> <? echo FormVal("Raid");?> </font></td> </tr> <tr> <td width="50%" height="19"><font face="Times New Roman" size="2">Network Type:</font><font face="Times New Roman"> <? echo FormVal("Network_Type");?> </font></td> </tr> <tr> <td width="24%" height="17" colspan="2"><font size="2" face="Times New Roman"> Firewall: </font><font face="Times New Roman"> <? echo FormVal("Firewall");?> </font></td> <td width="58%" height="17" colspan="2"> <font size="2" face="Times New Roman">Antivirus: </font> <font face="Times New Roman"> <? echo FormVal("Antivirus");?> </font><font size="2" face="Times New Roman">Version: </font> <font face="Times New Roman"> <? echo FormVal("Antivirus_Version");?> </font></td> <td width="18%" height="17"></td> </tr> <tr> <td width="33%" height="19" colspan="2"> <font size="2" face="Times New Roman">System Performance: </font> <font face="Times New Roman"> <? echo FormVal("System_Performance");?> </font></td> <td width="67%" height="19" colspan="2"> <font size="2" face="Times New Roman">Hard drive Free Space: c:\ </font> <font face="Times New Roman"> <? echo FormVal("C_Drive_Free_Space");?> </font><font size="2" face="Times New Roman"> d:\ </font> <font face="Times New Roman"> <? echo FormVal("D_Drive_Free_Space");?> </font><font size="2" face="Times New Roman"> </font></td> </tr> <tr> <td colspan="4" height="19" bgcolor="#C0C0C0" bordercolor="#000000"> <b>Part 3: On-Site Support Description</b></td> </tr> <tr> <td width="690" height="19" colspan="4"> <? echo FormVal("Onsite_Work_Description");?> </td> </tr> <tr> <td width="690" height="19" colspan="10" bgcolor="#C0C0C0" bordercolor="#000000"> <b>Part 4: Parts to Invoice</b></td> </tr> <tr> <td height="4" colspan="4"> <? echo FormVal("Parts_to_Invoice");?> </td> </tr> <tr> <td width="690" height="19" colspan="4" bgcolor="#C0C0C0"> <b>Part 5: Technician Suggestions</b></td> </tr> <tr> <td width="690" height="19" colspan="4"> <? echo FormVal("Tech_Suggestions");?> </td> </tr> <tr> <td width="690" height="19" colspan="4" bgcolor="#C0C0C0"> <b>Part 6: Follow Up / Sales Notes</b></td> </tr> <tr> <td width="690" height="19" colspan="4"> <? echo FormVal("Followup_Sales");?> </td> </tr> <tr> <td width="39%" height="19">Start Time: <? echo FormVal("Start_Time");?> <? echo FormVal("Start_Time_AP");?> </td> <td width="25%" height="19">End Time: <? echo FormVal("End_Time");?> <? echo FormVal("End_Time_AP");?> </td> <td width="36%" height="19" colspan="2">Total Time: <? echo FormVal("Total_Time");?> Hours</td> </tr> <tr> <td width="690" height="19" colspan="4">Billing Rate: <? echo FormVal("Billing_Rate");?> Other Notes: <? echo FormVal("Billing_Rate_Other");?> </td> </tr> <tr> <td width="39%" height="19" colspan="2">Technician: <? echo FormVal("Technician");?> </td> <td width="9%" height="19">Date: <? echo FormVal("Date");?></td> <td width="52%" height="19">Additional work required: <? echo FormVal("Additional_Work_Needed");?> </td> </tr> <tr> <td width="690" height="19" colspan="4"> <p class="MsoNormal"><span style="font-size:10.0pt">I have reviewed the statements regarding system operation and components and hereby agree to all the Terms and Conditions set forth by Point-N-Click. I fully understand the time and materials pricing and confirm the total amount of time spent working on my system today as indicated by my signature below.<br> </span></td> </tr> <tr> <td width="64%" height="40" valign="bottom" colspan="2">Customer Signature:_________________________________</td> <td width="36%" height="40" valign="bottom" colspan="2">Date:__________________</td> </tr> </table> </body> </html>
  8. I cant change the field type on phpmyadmin ALTER TABLE `tblhours` CHANGE `billable` `billable` BOOL( 1 ) NULL DEFAULT NULL MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(1) NULL DEFAULT NULL' at line 1 if you would like to see it in action send me a message and i'll give you a login this is the form i use webtime.php <?php // Start a session session_start(); // Sends the user to the login-page if not logged in if(!session_is_registered('member_ID')) : header('Location: login.php?msg=requires_login'); endif; // Include database information and connectivity include ('config/opendb.php'); // We store all our functions in one file include ('config/functions.php'); //Links include 'links.php'; ?> <html> <title>Technician Hours Submission Form</title> <head> <link rel=StyleSheet href="stylesheet.css" type="text/css"> <script language="javascript" src="choosedate.js"></script> <link type="text/css" rel="stylesheet" href="calendar.css"> </head> <body> <!--- style="background-color: silver;">---> <p>Welcome <?php print user_info('username'); ?></p> <form name="frm" method="post" action="submittime.php"> <div style="text-align: center;"><span style="font-family: Verdana;">Technician Hours Entry Form<br> </span> <hr style="width: 100%; height: 2px;"><span style="font-family: Verdana;"><br style="font-family: Verdana;"> </span></div> <br> <table> <tbody> <input type="hidden" name="tech" value="$username"> <tr id="0"> <td><input type="hidden" name="technician"></td> <td>Client:</td> <td> <input size="20" name="Client"></td> <td>Hours:</td> <td><input size="5" name="Hours"></td> <td>Mileage:</td> <td><input size="5" name="Mileage"> </td> <td>Billable:</td> <td> <input name="Billable" value="Yes" type="checkbox"></td> <td>Non-Billable:</td> <td> <input name="NoBillable" value="Yes" type="checkbox"> </td> <td>Remote/Bench:</td> <td> <input name="remotebench" value="Yes" type="checkbox"> </td> <td>Date:</td> <td><input type="text" name="datBegin" size="7"> <script language=javascript> var basicCal = new calendar("FIELD:document.frm.datBegin"); basicCal.writeCalendar(); </script></td> </tr> <!--- Add a few more rows here ---> <tr id="1"> <td><input type="hidden" name="technician1"></td> <td>Client:</td> <td> <input size="20" name="Client1"></td> <td>Hours:</td> <td><input size="5" name="Hours1"></td> <td>Mileage:</td> <td><input size="5" name="Mileage1"> </td> <td>Billable:</td> <td> <input name="Billable1" value="Yes" type="checkbox"></td> <td>Non-Billable:</td> <td> <input name="NoBillable1" value="Yes" type="checkbox"> </td> <td>Remote/Bench:</td> <td> <input name="remotebench1" value="Yes" type="checkbox"> </td> <td>Date:</td> <td><input type="text" name="datBegin1" size="7"> <script language=javascript> var basicCal = new calendar("FIELD:document.frm.datBegin1"); basicCal.writeCalendar(); </script></td></tr> <tr id="2"> <td><input type="hidden" name="technician2"></td> <td>Client:</td> <td> <input size="20" name="Client2"></td> <td>Hours:</td> <td><input size="5" name="Hours2"></td> <td>Mileage:</td> <td><input size="5" name="Mileage2"> </td> <td>Billable:</td> <td> <input name="Billable2" value="Yes" type="checkbox"></td> <td>Non-Billable:</td> <td> <input name="NoBillable2" value="Yes" type="checkbox"> </td> <td>Remote/Bench:</td> <td> <input name="remotebench2" value="Yes" type="checkbox"> </td> <td>Date:</td> <td><input type="text" name="datBegin2" size="7"> <script language=javascript> var basicCal = new calendar("FIELD:document.frm.datBegin2"); basicCal.writeCalendar(); </script></td></tr> <tr id="3"> <td><input type="hidden" name="technician3"></td> <td>Client:</td> <td> <input size="20" name="Client3"></td> <td>Hours:</td> <td><input size="5" name="Hours3"></td> <td>Mileage:</td> <td><input size="5" name="Mileage3"> </td> <td>Billable:</td> <td> <input name="Billable3" value="Yes" type="checkbox"></td> <td>Non-Billable:</td> <td> <input name="NoBillable3" value="Yes" type="checkbox"> </td> <td>Remote/Bench:</td> <td> <input name="remotebench3" value="Yes" type="checkbox"> </td> <td>Date:</td> <td><input type="text" name="datBegin3" size="7"> <script language=javascript> var basicCal = new calendar("FIELD:document.frm.datBegin3"); basicCal.writeCalendar(); </script></td> </tr> <tr id="4"> <td><input type="hidden" name="technician4"></td> <td>Client:</td> <td> <input size="20" name="Client4"></td> <td>Hours:</td> <td><input size="5" name="Hours4"></td> <td>Mileage:</td> <td><input size="5" name="Mileage4"> </td> <td>Billable:</td> <td> <input name="Billable4" value="Yes" type="checkbox"></td> <td>Non-Billable:</td> <td> <input name="NoBillable4" value="Yes" type="checkbox"> </td> <td>Remote/Bench:</td> <td> <input name="remotebench4" value="Yes" type="checkbox"> </td> <td>Date:</td> <td><input type="text" name="datBegin4" size="7"> <script language=javascript> var basicCal = new calendar("FIELD:document.frm.datBegin4"); basicCal.writeCalendar(); </script></td> </tr> </tbody> </table> <p style="text-align: right;"><input name="submit" value="Submit" type="submit"></p> <p></p> </form> </body> </html> This is the form that submits the entries to the DB submittime.php <?php // Start a session session_start(); include 'config/config.php'; include 'config/opendb.php'; include 'config/functions.php'; include 'links.php'; // Sends the user to the login-page if not logged in if(!session_is_registered('member_ID')) : header('Location: login.php?msg=requires_login'); endif; //echo user_info('username'); $tech = user_info('username'); $client = htmlspecialchars($_POST['Client']); $Hours = htmlspecialchars($_POST['Hours']); $Mileage = htmlspecialchars($_POST['Mileage']); $Billable = htmlspecialchars($_POST['Billable']); $NoBillable = htmlspecialchars($_POST['NoBillable']); $RemoteBench = htmlspecialchars($_POST['remotebench']); $serviceDate = htmlspecialchars($_POST['datBegin']); //Build sql insert command $addTimequery = "INSERT into tblhours (technician, client, hours, mileage, billable, nobillable, remote_bench, serviceDate) VALUES('$tech', '$client', '$Hours', '$Mileage', '$Billable', '$NoBillable', '$RemoteBench', '$serviceDate')"; //second row $tech = user_info('username'); $client = htmlspecialchars($_POST['Client1']); $Hours = htmlspecialchars($_POST['Hours1']); $Mileage = htmlspecialchars($_POST['Mileage1']); $Billable = htmlspecialchars($_POST['Billable1']); $NoBillable = htmlspecialchars($_POST['NoBillable1']); $RemoteBench = htmlspecialchars($_POST['remotebench1']); $serviceDate = htmlspecialchars($_POST['datBegin1']); //Build sql insert command $addTimequery1 = "INSERT into tblhours (technician, client, hours, mileage, billable, nobillable, remote_bench, serviceDate) VALUES('$tech', '$client', '$Hours', '$Mileage', '$Billable', '$NoBillable', '$RemoteBench', '$serviceDate')"; //Third row $tech = user_info('username'); $client2 = htmlspecialchars($_POST['Client2']); $Hours2 = htmlspecialchars($_POST['Hours2']); $Mileage2 = htmlspecialchars($_POST['Mileage2']); $Billable2 = htmlspecialchars($_POST['Billable2']); $NoBillable2 = htmlspecialchars($_POST['NoBillable2']); $RemoteBench2 = htmlspecialchars($_POST['remotebench2']); $serviceDate2 = htmlspecialchars($_POST['datBegin2']); //Build sql insert command $addTimequery2 = "INSERT into tblhours (technician, client, hours, mileage, billable, nobillable, remote_bench, serviceDate) VALUES('$tech', '$client2', '$Hours2', '$Mileage2', '$Billable2', '$NoBillable2', '$RemoteBench2', '$serviceDate2')"; //Forth row $tech = user_info('username'); $client = htmlspecialchars($_POST['Client3']); $Hours = htmlspecialchars($_POST['Hours3']); $Mileage = htmlspecialchars($_POST['Mileage3']); $Billable = htmlspecialchars($_POST['Billable3']); $NoBillable = htmlspecialchars($_POST['NoBillable3']); $RemoteBench = htmlspecialchars($_POST['remotebench3']); $serviceDate = htmlspecialchars($_POST['datBegin3']); //Build sql insert command $addTimequery3 = "INSERT into tblhours (technician, client, hours, mileage, billable, nobillable, remote_bench, serviceDate) VALUES('$tech', '$client', '$Hours', '$Mileage', '$Billable', '$NoBillable', '$RemoteBench', '$serviceDate')"; //Fifth row $tech = user_info('username'); $client = htmlspecialchars($_POST['Client4']); $Hours = htmlspecialchars($_POST['Hours4']); $Mileage = htmlspecialchars($_POST['Mileage4']); $Billable = htmlspecialchars($_POST['Billable4']); $NoBillable = htmlspecialchars($_POST['NoBillable4']); $RemoteBench = htmlspecialchars($_POST['remotebench4']); $serviceDate = htmlspecialchars($_POST['datBegin4']); //Build sql insert command $addTimequery4 = "INSERT into tblhours (technician, client, hours, mileage, billable, nobillable, remote_bench, serviceDate) VALUES('$tech', '$client', '$Hours', '$Mileage', '$Billable', '$NoBillable', '$RemoteBench', '$serviceDate')"; //execute sql query mysql_query($addTimequery) or die (mysql_error()); mysql_query($addTimequery1) or die (mysql_error()); mysql_query($addTimequery2) or die (mysql_error()); // mysql_query($addTimequery3) or die (mysql_error()); // mysql_query($addTimequery4) or die (mysql_error()); include 'closedb.php'; echo "Your Time was added sucessfully"; ?> <html> <head> <link rel=StyleSheet href="stylesheet.css" type="text/css"> </head> <body> </body> </html> what im trying to accomplish is to combind 2 results into 1 page e.g i have a report page that asks for name start date and end date i need it to spit out the results in a table format and total the colums the code posted by sasa works by its self but i cannot get the 2 results on one page formatted nicely.
  9. Bumpy bump I was able to do the following but the table layout looks horrible <?php session_start(); if(!session_is_registered('member_ID')) : header('Location: index.php?msg=requires_login'); endif; // Include database information and connectivity include ('config/opendb.php'); // We store all our functions in one file include ('config/functions.php'); $tech = htmlspecialchars($_POST['technician']); $startdate = htmlspecialchars($_POST['datBegin']); $enddate = htmlspecialchars($_POST['datBegin1']); $sql = "SELECT sum( hours ) hr, sum( mileage ) ml, IF( billable = '', 'no', billable ) bill, IF( remote_bench = '', 'no', remote_bench ) rb FROM `tblhours` WHERE technician = '$tech' AND servicedate >= '$startdate' AND servicedate <= '$enddate' GROUP BY bill, rb"; $result = mysql_query($sql); print $result; if (mysql_num_rows($result)) { print "<center><TABLE> <face='verdana, arial, helvetica' size='2' align='center'><TR><TD>Hours Report For: $tech From: $startdate - $enddate </TD></TR></table></center><center><TABLE BORDER=\"3\"><TR STYLE=\"font-weight: bold;\"><TD>Total Hours</TD><TD>Mileage</TD><TD>Billable</TD><TD>Remote/Bench</TD></TR>"; while($row = mysql_fetch_assoc($result)) { extract($row); print "<TR><TD>$hr</TD><TD>$ml</TD><TD>$rb</TD></TR>"; } print "</TABLE></center>"; } //print $result; ?> [attachment deleted by admin]
  10. Is this mod specific to this forum software or can it be used in say vBulletin  ?  I'm a comm manager at a forum that uses vBulletin  and would love to see this make its way there. 
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.