Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. Hmm, are they really good though. I was assuming (You know what happens when we assume, so I could be wrong) that those were bad. The reason I htought that, was if you change server's can't that mess everything up with your email, or no. Is there something I am specifically missing, I don't fully understand the nature behind that. I know shared and managed hosts have email service with it as well.
  2. I can't keep using hot mail I don't think. I like it, and it's tied to everything I do, but I have clients that email me and I don't recieve them or vice versa sometimes. Is there someone who knows of a VERY trustworthy email provided that is very useful?
  3. Is there a way to take a word (1 word only) and have the first letter of that word appear as uppercase. strtolower and strtoupper isn't going to help me. I need just the first letter of the word. I am hoping for something quick without regular expressions, but I don't know of any functions that do that. Any advice?
  4. Ok, I understand why you would want to offer advice. It's just from now on I have been really careful about asking for advice. I don't ask for advice anymore if I don't want to hear it, or can't handle it without snapping. in this situation all the feedback in the last 2-3 were unasked for, I marked solved earlier (if it where here), so instead I abandoned it. I know everyone makes mistakes, so do I. Except I am willing to correct them. My website, as well as pp assistant will be entirely recreated shortly using a custom template I am getting the image for and coding myself. I just have to get some together and get sometime. Even my framework, no matter what anyone thinks of it, I am proud of it. Lately, I decided to believe in myself. I am getting more projects, completing them a lot better. I relaunched my entire business www.freelancebusinessman.com/generalpricing.php using those pricing guidelines, when I chose them I decided to believe in myself, and my abilities. It's allowing me to pick up things I never knew before and start getting things done with them in a few hours. IT's allowed me to get my business life organized and everything. The reason I am tired of this is one mistake I made was asking for advice when I didn't want to hear it, or didn't need to hear it. So I stopped, just any post I made asking for advice is null and void unless it's a new one. I won't ask for advice unless I am ready to take the criticism without getting pissed. That is just one (among many) things I have changes to make things better for me, and other people around me. As far as the open source project I am working on, I am releasing another version (already have a start date appended to it). It will hopefully be something that will start to be able to equal cake and code ignitor. It will take some time to develop. I have a huge list of features that I am building in, involving an entire rewrite and the birth of tools/programs. I intend to revolutionize it after this next release. Given 1-2 more good releases, it will start being able to hold it's own among the most powerful frameworks out there (hopefully) I will never give up on it. If I wasn't interested in developing it into something powerful I would have never created it in the first place on a side note I found a really powerful extension that performs spell checking as you type in text areas. Google dictionary firefox extensions, not sure which one this was, but it's powerful.
  5. Advice appreciated, but I never really asked anyone's advice on that. Thanks again. I plan on changing out the layout in less than a week, if the original person who created the template has a problem with it, let him message me, and I will take the damn thing down. Can someone lock this thread, I stopped asking for advice on this a long time ago. Thank you for the attempt. no hard feelings...
  6. It is, it's under credits. I already spoke to the person about it, I am awaiting a response. These designs on this site, as well as freelancebusinessman.com are placeholders. I have a new graphic designer (one that is better than I had hoped), that was actually looking for a graphic design/programming tradeoff. So, she is working up a new layout image of my site, and ppassistant that will give me something i can code. Then the design will be changed over to the custom one, instead of one from styleshout.
  7. problem is now solved, I called the host. Just in case if anyone ever has problem sending mail from header from header mail header mail problem mail from problem mail header problem header mail problem header problem mail problem header mail from from mail header Put those there so if people search using the forum search, they can have an easier time finding it. if someone ever has this problem again, all you have to do is create an email address. Some servers you can have it change from to anything, some hosts require you actually make an email address on the server, before it will actively change the header to something. so hopefully that will help someone else in the future.
  8. I have everything working. I have the reply to working, it's sending html emails, and everything is fully functional. The only one problem is it's ignoring my commands on setting the damn from header. It's not setting it at all, it's not even attempting to. W hen I send header it adjusts, and changes everything else but just ignores when I tell it to change from, I don't understand.
  9. Just to give you more info, I have done everything I can to change the from address. It's something like 3jassk@ninksafe.box13.subsec12.server121.com Something like that, it's really long, and annoying, and untrustworthy looking. I was able to change the reply-to email address, but for some reason it's not changing. I tried 1. Changing it in the ini file 2. Changing it with ini set 3. Setting it manually but nothing is seeming to work to get the header to change, thanks for any advice that is offered, I was just putting the above clarification.
  10. Just to retell, I went ahead and tried iniset, I tried putting it in the ini file. (The ini file is read because it affects other settings. But no matter what I seem to do, it's not changing to the from address I am wanting it to send from.
  11. I have had this work before, but I don't use it much $headers = "From: donot-reply@localhost"; // send mail to admins mail($to, $subject, $message, $headers); That is not working ot send the header as shown. is there something I am doing wrong.?
  12. I know the mail function for standard emails backwards and forwards. What do I need to do different to send it as an xhtml instead, and if I do this, will it default back to text if there email does not support html.
  13. I tried altering that, but nothing else is seeming to work, I am going to get rid of this stupid editor, and use something usable. Maybe there is a way I can make one of hte other 2, allow me to paste word document text directly in there, without those stupid popups, but nothing is worth fighting with this dumb text editor over. Thank you all for all the help.
  14. Where do you suggest I look to try to fix the rnrn problem It either appears at the very beginning like this rnrnhello This is some test text Or it appears at the bottom (sometimes) westtest 'test' "test" te st rnrnrn At the very, very bottom of it, never in between, just at the top/bottom. Trim successfully always removes the ones at the top, but not at the bottom lines. Let me know what you think, I am really confused here.
  15. That is ALL that is in the blank.htm file.
  16. <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="keywords" content="Keywords Here"> <meta name="description" content="Description Here"> <script type="text/javascript" src="/master/javascript/global.js"></script><!-- Global Javascript --> <script type="text/javascript" src="/master/ajax/global.js"></script><!-- Global Ajax --> <link rel="stylesheet" type="text/css" href="/master/css/global.css"><!-- Global CSS --><title>9ksafety</title> <script language="JavaScript" type="text/javascript" src="../rte/html2xhtml.js"></script> <script language="JavaScript" type="text/javascript" src="../rte/richtext_compressed.js"></script> <script language="JavaScript" type="text/javascript"> function toggleoff(offtarget1, offtarget2) { document.getElementById(offtarget1).style.display='none'; document.getElementById(offtarget2).style.background='#FFFFFF'; } function toggleon(ontarget1, ontarget2) { document.getElementById(ontarget1).style.display='inline'; document.getElementById(ontarget2).style.background='#CCCC99'; } //--> </script> <script language="JavaScript" type="text/javascript"> <!-- function submitForm() { //make sure hidden and iframe values are in sync for all rtes before submitting form updateRTEs(); //change the following line to true to submit form alert("rte1 = " + htmlDecode(document.RTEDemo.rte1.value)); return false; } //Usage: initRTE(imagesPath, includesPath, cssFile, genXHTML, encHTML) initRTE("../rte/images/", "./", "", true); //--> </script><style type="text/css">@import "./rte.css";</style></head><noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript><body id="safety"><iframe id="cp" src="./palette.htm" marginwidth="0" marginheight="0" style="visibility: hidden; position: absolute;" frameborder="0" height="100" scrolling="no" width="150"></iframe> <div id="logo"><p>Reaa</p></div> <div id="safetydiv"> <div id="box"> <p> website text goes here generally. </p> <hr> <form action="index2.php" method="post" name="submitform" id="submitform" onsubmit="return submitForm();"> <ul> <li><input name="status" onclick="toggleon('hide1', 'name'); toggleon('hide2', 'title'); toggleon('hide3', 'phone'); toggleon('hide4', 'email');" id="fullidentity" value="fullidentity" checked="checked" type="radio"><label for="status"><span class="bold">Full Identity</span> - <span class="smalltext">I wish to receive feedback and correspond with Safety about this report.</span></label></li> <li><input name="status" onclick="toggleon('hide1', 'name'); toggleon('hide2', 'title'); toggleon('hide3', 'phone'); toggleon('hide4', 'email');" id="confidential" value="confidential" type="radio"><label for="status"><span class="bold">Confidential</span> - <span class="smalltext">I would like this report to be confidential but also get feedback.</span></label></li> <li><input name="status" onclick="toggleoff('hide1', 'name'); toggleoff('hide2', 'title'); toggleoff('hide3', 'phone'); toggleoff('hide4','email');" id="anonymous" value="anonymous" type="radio"><label for="status"><span class="bold">Anonymous</span> - <span class="smalltext">I wish to remain anonymous and only receive acknowledgement of submission.<br> (email address must be provided for acknowledgement)</span></label></li> </ul> <br><br> <table align="center"> <tbody><tr> <td class="left"><label for="name">Name:</label></td> <td></td> <td class="right"><span class="red" id="hide1">*</span> <input name="name" id="name" class="require" maxlength="200" value="" type="text"></td> </tr> <tr> <td class="left"><label for="title">Job Title/Description:</label></td> <td></td> <td class="right"><span class="red" id="hide2">*</span> <input name="title" id="title" class="require" maxlength="200" value="" type="text"></td> </tr> <tr> <td class="left"><label for="phone">Phone:</label></td> <td></td> <td class="right"><span class="red" id="hide3">*</span> <input name="phone" id="phone" class="require" maxlength="200" value="" type="text"></td> </tr> <tr> <td class="left"><label for="email">Email Address:</label></td> <td></td> <td class="right"><span class="red" id="hide4">*</span> <input name="email" id="email" class="require" maxlength="200" value="" type="text"></td> </tr> <tr> <td class="left"><label for="dateoccured">Date Occurred:</label></td> <td class="left"><input name="dateoccured_na" id="dateoccured_na" value="Not Applicable" type="checkbox"><label for="dateoccured_na">N/A</label></td> <td class="right"> <select class="safetydate" name="dateoccured1" id="dateoccured1"> <option value="01">January</option> <option value="02" selected="selected">February</option> <option value="03">March</option> <option value="04">April</option> <option value="05">May</option> <option value="06">June</option> <option value="07">July</option> <option value="08">August</option> <option value="09">September</option> <option value="10">October</option> <option value="11">November</option> <option value="12">December</option> </select> <select class="safetydate" name="dateoccured2" id="dateoccured2"> <option>01</option> <option>02</option> <option>03</option> <option>04</option> <option>05</option> <option>06</option> <option>07</option> <option>08</option> <option>09</option> <option>10</option> <option>11</option> <option>12</option> <option>13</option> <option>14</option> <option>15</option> <option>16</option> <option>17</option> <option>18</option> <option>19</option> <option>20</option> <option>21</option> <option>22</option> <option>23</option> <option>24</option> <option>25</option> <option>26</option> <option selected="selected">27</option> <option>28</option> <option>29</option> <option>30</option> <option>31</option> <option>32</option> </select> <select class="safetydate" name="dateoccured3" id="dateoccured3"> <option>2000</option> <option>2001</option> <option>2002</option> <option>2003</option> <option>2004</option> <option>2005</option> <option>2006</option> <option selected="selected">2007</option> <option>2008</option> <option>2009</option> <option>2010</option> </select></td> </tr> <tr> <td></td> <td></td> <td></td> </tr> <tr> <td class="left"><label for="approxtime">Approximate Time:</label><span class="small"> (0000)</span></td> <td class="left"><input name="approxtime_na" id="approxtime_na" value="Not Applicable" type="checkbox"><label for="approxtime_na">N/A</label></td> <td class="right"><input name="approxtime" id="approxtime" maxlength="4" value="" type="text"></td> </tr> <tr> <td class="left"><label for="location">Location:</label></td> <td class="left"><input name="location_na" id="location_na" value="Not Applicable" type="checkbox"><label for="location_na">N/A</label></td> <td class="right"><input name="location" id="location" maxlength="200" value="" type="text"></td> </tr> <tr> <td colspan="3"></td> </tr> <tr> <td colspan="3"><br></td> </tr> <tr> <td class="left"><label for="description">Description of occurrence or suggestion:</label></td> <td></td> <td></td> </tr> <tr> <td colspan="3"> <script language="JavaScript" type="text/javascript"> <!-- //build new richTextEditor var rte1 = new richTextEditor('description'); rte1.html = ''; rte1.toggleSrc = false; rte1.build(); //--> </script><table style="border: 1px solid rgb(0, 0, 0);" cellpadding="0" cellspacing="0" width="500"> <tbody><tr> <td> <table class="rteBack" id="toolbar1_description" cellpadding="2" cellspacing="0" width="100%"> <tbody><tr> <td> <select id="formatblock_description" onchange="selectFont('description', this.id);"> <option value="">[style]</option> <option value="<p>">Paragraph <p></option> <option value="<h1>">Heading 1 <h1></option> <option value="<h2>">Heading 2 <h2></option> <option value="<h3>">Heading 3 <h3></option> <option value="<h4>">Heading 4 <h4></option> <option value="<h5>">Heading 5 <h5></option> <option value="<h6>">Heading 6 <h6></option> <option value="<address>">Address <ADDR></option> <option value="<pre>">Formatted <pre></option> </select> </td> <td> <select id="fontname_description" onchange="selectFont('description', this.id)"> <option value="Font" selected="selected">[Font]</option> <option value="Arial, Helvetica, sans-serif">Arial</option> <option value="Courier New, Courier, mono">Courier New</option> <option value="Times New Roman, Times, serif">Times New Roman</option> <option value="Verdana, Arial, Helvetica, sans-serif">Verdana</option> </select> </td> <td> <select id="fontsize_description" onchange="selectFont('description', this.id);"> <option value="Size">[size]</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> </select> </td> <td width="100%"></td> </tr> </tbody></table> <table class="rteBack" id="toolbar2_description" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr> <td><img class="rteImage" src="../rte/images/bold.gif" alt="Bold" title="Bold" onmousedown="rteCommand('description', 'bold')" height="24" width="25"></td> <td><img class="rteImage" src="../rte/images/italic.gif" alt="Italic" title="Italic" onmousedown="rteCommand('description', 'italic')" height="24" width="25"></td> <td><img class="rteImage" src="../rte/images/underline.gif" alt="Underline" title="Underline" onmousedown="rteCommand('description', 'underline')" height="24" width="25"></td> <td><img class="rteImage" src="../rte/images/left_just.gif" alt="Align Left" title="Align Left" onmousedown="rteCommand('description', 'justifyleft')" height="24" width="25"></td> <td><img class="rteImage" src="../rte/images/centre.gif" alt="Center" title="Center" onmousedown="rteCommand('description', 'justifycenter')" height="24" width="25"></td> <td><img class="rteImage" src="../rte/images/right_just.gif" alt="Align Right" title="Align Right" onmousedown="rteCommand('description', 'justifyright')" height="24" width="25"></td> <td><img class="rteImage" src="../rte/images/hr.gif" alt="Horizontal Rule" title="Horizontal Rule" onmousedown="rteCommand('description', 'inserthorizontalrule')" height="24" width="25"></td> <td><img class="rteImage" src="../rte/images/numbered_list.gif" alt="Ordered List" title="Ordered List" onmousedown="rteCommand('description', 'insertorderedlist')" height="24" width="25"></td> <td><img class="rteImage" src="../rte/images/list.gif" alt="Unordered List" title="Unordered List" onmousedown="rteCommand('description', 'insertunorderedlist')" height="24" width="25"></td> <td><img class="rteImage" src="../rte/images/outdent.gif" alt="Outdent" title="Outdent" onmousedown="rteCommand('description', 'outdent')" height="24" width="25"></td> <td><img class="rteImage" src="../rte/images/indent.gif" alt="Indent" title="Indent" onmousedown="rteCommand('description', 'indent')" height="24" width="25"></td> <td><div id="forecolor_description"><img class="rteImage" src="../rte/images/textcolor.gif" alt="Text Color" title="Text Color" onmousedown="dlgColorPalette('description', 'forecolor', ''); return false;" height="24" width="25"></div></td> <td><div id="hilitecolor_description"><img class="rteImage" src="../rte/images/bgcolor.gif" alt="Background Color" title="Background Color" onmousedown="dlgColorPalette('description', 'hilitecolor', ''); return false;" height="24" width="25"></div></td> <td><img class="rteImage" src="../rte/images/hyperlink.gif" alt="Insert Link" title="Insert Link" onmousedown="dlgInsertLink('description')" height="24" width="25"></td> <td><img class="rteImage" src="../rte/images/image.gif" alt="Add Image" title="Add Image" onmousedown="addImage('description')" height="24" width="25"></td> <td><img class="rteImage" src="../rte/images/special_chars.gif" alt="Insert Special Character" title="Insert Special Character" onmousedown="dlgInsertSpecialChar('description')" height="24" width="25"></td> <td><div id="table_description"><img class="rteImage" src="../rte/images/insert_table.gif" alt="Insert Table" title="Insert Table" onmousedown="dlgInsertTable('description')" height="24" width="25"></div></td> <td width="100%"></td> </tr> </tbody></table> <iframe id="description" name="description" src="./blank.htm" style="margin: 0pt; padding: 0pt; width: 100%; height: 200px;" frameborder="0"></iframe> </td> </tr> </tbody></table> <div style="margin: 0pt; padding: 0pt;"> <input id="hdndescription" name="description" value="" type="hidden"> </div> </td> </tr> <tr> <td colspan="3"></td> </tr> <tr> <td colspan="3"><input name="submit" id="submit" maxlength="200" value="Submit" type="submit"></td> </tr> </tbody></table> </form> </div> </div> </body></html> Here is the generated source code (also just for the future thanks for pointing out that, it will help I never new about generated source code, I always just went to source code, that might help me in the future) That is the generated source code of the form, using the "generated source code" as you showed me.
  17. Uh, actually I can't even find the "build" function so I can see how this thing is created.
  18. Source for the "form" page Source for the output I just noticed, it doesn't always do it. Only sometimes. That above is the output, I have been scouring google for an answer, the only reason I am not using tinyMCE or FCKEditor is because this time I need somthing that you can paste word document text straight into it. The other 2 come up with a popup and you have to paste it in there, if you paste it directly you get other popups. He wants that setup where you can directly paste word documents in there. Also it's strange but there is not text area. I don't even see one in the output. But I didn't see anythin gin the instructions on using one. I was using the demo pages, and what information I could scrape up off there dead forum.
  19. No offense, but don't get sending topics out to people, it's just goign to piss people off. Post what you need help about, and if someone know's they will help, do go sending your topic off to people. I don't know enough about Soap to help with this anyway.
  20. Ok, something really bad is going on here. When I do this // $_SESSION['temp']['description'] = strip_tags($_SESSION['temp']['description'], $allowedtags); // $_SESSION['temp']['description'] = mysql_real_escape_string($_SESSION['temp']['description']); // $_SESSION['temp']['description'] = trim($_SESSION['temp']['description']); $_SESSION['temp']['description'] = $_SESSION['temp']['description']; It goes to a blank page instead of doing anything(not a syntax error, I mean the layout is there but nothing outputs) when I don't then it just has the trims. What is going on, this is the most confusing problem I have ever faced.
  21. Ok, the last problem I am having are the random line feeds, can someone help me figure out what is going on, based on the above code. Or some form of solution to atleast get rid of all the linefeeds, why are they there, where do they come from, this is very confusing?
  22. Form Page <?php require_once(".@@@####")?> <?php if ($_SESSION['controller'] == true) { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php require_once($docroot . "/master/includes/meta.inc.php"); ?> <script language="JavaScript" type="text/javascript" src="../rte/html2xhtml.js"></script> <script language="JavaScript" type="text/javascript" src="../rte/richtext_compressed.js"></script> <script language="JavaScript" type="text/javascript"> function toggleoff(offtarget1, offtarget2) { document.getElementById(offtarget1).style.display='none'; document.getElementById(offtarget2).style.background='#FFFFFF'; } function toggleon(ontarget1, ontarget2) { document.getElementById(ontarget1).style.display='inline'; document.getElementById(ontarget2).style.background='#CCCC99'; } //--> </script> <script language="JavaScript" type="text/javascript"> <!-- function submitForm() { //make sure hidden and iframe values are in sync for all rtes before submitting form updateRTEs(); //change the following line to true to submit form alert("rte1 = " + htmlDecode(document.RTEDemo.rte1.value)); return false; } //Usage: initRTE(imagesPath, includesPath, cssFile, genXHTML, encHTML) initRTE("../rte/images/", "./", "", true); //--> </script> <noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript> <?php // this function is part of RTE function rteSafe($strText) { //returns safe code for preloading in the RTE $tmpString = $strText; //convert all types of single quotes $tmpString = str_replace(chr(145), chr(39), $tmpString); $tmpString = str_replace(chr(146), chr(39), $tmpString); $tmpString = str_replace("'", "&#39;", $tmpString); //convert all types of double quotes $tmpString = str_replace(chr(147), chr(34), $tmpString); $tmpString = str_replace(chr(148), chr(34), $tmpString); // $tmpString = str_replace("\"", "\"", $tmpString); //replace carriage returns & line feeds $tmpString = str_replace(chr(10), " ", $tmpString); $tmpString = str_replace(chr(13), " ", $tmpString); return $tmpString; }// End of the RTE related function ?> </head> <body id="safety"> <div id="logo"><p>Employee Safety Report</p></div> <div id="safetydiv"> <div id="box"> Just text from the website goes here,. </p> <hr /> <form action="index2.php" method="post" name="submitform" id="submitform" onsubmit="return submitForm();"> <ul> <li><input name="status" <?php if ($_SESSION['temp']['status'] == "fullidentity") { echo "checked=\"checked\""; } ?> onclick="toggleon('hide1', 'name'); toggleon('hide2', 'title'); toggleon('hide3', 'phone'); toggleon('hide4', 'email');" id="fullidentity" value="fullidentity" type="radio" checked="checked" /><label for="status"><span class="bold">Full Identity</span> - <span class="smalltext">I wish to receive feedback and correspond with Safety about this report.</span></label></li> <li><input name="status" <?php if ($_SESSION['temp']['status'] == "confidential") { echo "checked=\"checked\""; } ?> onclick="toggleon('hide1', 'name'); toggleon('hide2', 'title'); toggleon('hide3', 'phone'); toggleon('hide4', 'email');" id="confidential" value="confidential" type="radio" /><label for="status"><span class="bold">Confidential</span> - <span class="smalltext">I would like this report to be confidential but also get feedback.</span></label></li> <li><input name="status" <?php if ($_SESSION['temp']['status'] == "anonymous") { echo "checked=\"checked\""; } ?> onclick="toggleoff('hide1', 'name'); toggleoff('hide2', 'title'); toggleoff('hide3', 'phone'); toggleoff('hide4','email');"id="anonymous" value="anonymous" type="radio" /><label for="status"><span class="bold">Anonymous</span> - <span class="smalltext">I wish to remain anonymous and only receive acknowledgement of submission.<br /> (email address must be provided for acknowledgement)</span></label></li> </ul> <br /><br /> <table align="center"> <tr> <td class="left"><label for="name">Name:</label></td> <td></td> <td class="right"><span class="red" id="hide1">*</span> <input name="name" id="name" class="require" type="text" maxlength="200" value="<?php echo $_SESSION['temp']['name']; ?>" /></td> </tr> <tr> <td class="left"><label for="title">Job Title/Description:</label></td> <td></td> <td class="right"><span class="red" id="hide2">*</span> <input name="title" id="title" class="require" type="text" maxlength="200" value="<?php echo $_SESSION['temp']['title']; ?>" /></td> </tr> <tr> <td class="left"><label for="phone">Phone:</label></td> <td></td> <td class="right"><span class="red" id="hide3">*</span> <input name="phone" id="phone" class="require" type="text" maxlength="200" value="<?php echo $_SESSION['temp']['phone']; ?>" /></td> </tr> <tr> <td class="left"><label for="email">Email Address:</label></td> <td></td> <td class="right"><span class="red" id="hide4">*</span> <input name="email" id="email" class="require" type="text" maxlength="200" value="<?php echo $_SESSION['temp']['email']; ?>" /></td> </tr> <tr> <td class="left"><label for="dateoccured">Date Occurred:</label></td> <td class="left"><input name="dateoccured_na" <?php if ($_SESSION['temp']['dateoccured_na'] == "Not Applicable") { echo "checked=\"checked\""; } ?> id="dateoccured_na" type="checkbox" value="Not Applicable" /><label for="dateoccured_na">N/A</label></td> <td class="right"><?php $month = date("m"); // this traps the 2 digit day of the month in a variable ?> <select class="safetydate" name="dateoccured1" id="dateoccured1"> <option value="01" <?php if (isset($_SESSION['temp']['dateoccured1'])) { tempvar($_SESSION['temp']['dateoccured1'], "01"); }else { tempvar($month, "01"); } ?>>January</option> <option value="02" <?php if (isset($_SESSION['temp']['dateoccured1'])) { tempvar($_SESSION['temp']['dateoccured1'], "02"); }else { tempvar($month, "02"); } ?>>February</option> <option value="03" <?php if (isset($_SESSION['temp']['dateoccured1'])) { tempvar($_SESSION['temp']['dateoccured1'], "03"); }else { tempvar($month, "03"); } ?>>March</option> <option value="04" <?php if (isset($_SESSION['temp']['dateoccured1'])) { tempvar($_SESSION['temp']['dateoccured1'], "04"); }else { tempvar($month, "04"); } ?>>April</option> <option value="05" <?php if (isset($_SESSION['temp']['dateoccured1'])) { tempvar($_SESSION['temp']['dateoccured1'], "05"); }else { tempvar($month, "05"); } ?>>May</option> <option value="06" <?php if (isset($_SESSION['temp']['dateoccured1'])) { tempvar($_SESSION['temp']['dateoccured1'], "06"); }else { tempvar($month, "06"); } ?>>June</option> <option value="07" <?php if (isset($_SESSION['temp']['dateoccured1'])) { tempvar($_SESSION['temp']['dateoccured1'], "07"); }else { tempvar($month, "07"); } ?>>July</option> <option value="08" <?php if (isset($_SESSION['temp']['dateoccured1'])) { tempvar($_SESSION['temp']['dateoccured1'], "08"); }else { tempvar($month, "08"); } ?>>August</option> <option value="09" <?php if (isset($_SESSION['temp']['dateoccured1'])) { tempvar($_SESSION['temp']['dateoccured1'], "09"); }else { tempvar($month, "09"); } ?>>September</option> <option value="10" <?php if (isset($_SESSION['temp']['dateoccured1'])) { tempvar($_SESSION['temp']['dateoccured1'], "10"); }else { tempvar($month, "10"); } ?>>October</option> <option value="11" <?php if (isset($_SESSION['temp']['dateoccured1'])) { tempvar($_SESSION['temp']['dateoccured1'], "11"); }else { tempvar($month, "11"); } ?>>November</option> <option value="12" <?php if (isset($_SESSION['temp']['dateoccured1'])) { tempvar($_SESSION['temp']['dateoccured1'], "12"); }else { tempvar($month, "12"); } ?>>December</option> </select> <?php // now that above is taken care of, it's time to do the date of the month $day = date("d"); ?> <select class="safetydate" name="dateoccured2" id="dateoccured2"> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "01"); }else { tempvar($day, "01"); } ?>>01</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "02"); }else { tempvar($day, "02"); } ?>>02</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "03"); }else { tempvar($day, "03"); } ?>>03</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "04"); }else { tempvar($day, "04"); } ?>>04</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "05"); }else { tempvar($day, "05"); } ?>>05</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "06"); }else { tempvar($day, "06"); } ?>>06</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "07"); }else { tempvar($day, "07"); } ?>>07</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "08"); }else { tempvar($day, "08"); } ?>>08</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "09"); }else { tempvar($day, "09"); } ?>>09</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "10"); }else { tempvar($day, "10"); } ?>>10</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "11"); }else { tempvar($day, "11"); } ?>>11</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "12"); }else { tempvar($day, "12"); } ?>>12</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "13"); }else { tempvar($day, "13"); } ?>>13</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "14"); }else { tempvar($day, "14"); } ?>>14</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "15"); }else { tempvar($day, "15"); } ?>>15</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "16"); }else { tempvar($day, "16"); } ?>>16</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "17"); }else { tempvar($day, "17"); } ?>>17</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "18"); }else { tempvar($day, "18"); } ?>>18</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "19"); }else { tempvar($day, "19"); } ?>>19</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "20"); }else { tempvar($day, "20"); } ?>>20</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "21"); }else { tempvar($day, "21"); } ?>>21</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "22"); }else { tempvar($day, "22"); } ?>>22</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "23"); }else { tempvar($day, "23"); } ?>>23</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "24"); }else { tempvar($day, "24"); } ?>>24</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "25"); }else { tempvar($day, "25"); } ?>>25</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "26"); }else { tempvar($day, "26"); } ?>>26</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "27"); }else { tempvar($day, "27"); } ?>>27</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "28"); }else { tempvar($day, "28"); } ?>>28</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "29"); }else { tempvar($day, "29"); } ?>>29</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "30"); }else { tempvar($day, "30"); } ?>>30</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "31"); }else { tempvar($day, "31"); } ?>>31</option> <option <?php if (isset($_SESSION['temp']['dateoccured2'])) { tempvar($_SESSION['temp']['dateoccured2'], "32"); }else { tempvar($day, "32"); } ?>>32</option> </select> <?php // The month and the day are done. Now let's get this year things situated. $year = date("Y"); ?> <select class="safetydate" name="dateoccured3" id="dateoccured3"> <option <?php if (isset($_SESSION['temp']['dateoccured3'])) { tempvar($_SESSION['temp']['dateoccured3'], "2000"); }else { tempvar($year, "2000"); } ?>>2000</option> <option <?php if (isset($_SESSION['temp']['dateoccured3'])) { tempvar($_SESSION['temp']['dateoccured3'], "2001"); }else { tempvar($year, "2001"); } ?>>2001</option> <option <?php if (isset($_SESSION['temp']['dateoccured3'])) { tempvar($_SESSION['temp']['dateoccured3'], "2002"); }else { tempvar($year, "2002"); } ?>>2002</option> <option <?php if (isset($_SESSION['temp']['dateoccured3'])) { tempvar($_SESSION['temp']['dateoccured3'], "2003"); }else { tempvar($year, "2003"); } ?>>2003</option> <option <?php if (isset($_SESSION['temp']['dateoccured3'])) { tempvar($_SESSION['temp']['dateoccured3'], "2004"); }else { tempvar($year, "2004"); } ?>>2004</option> <option <?php if (isset($_SESSION['temp']['dateoccured3'])) { tempvar($_SESSION['temp']['dateoccured3'], "2005"); }else { tempvar($year, "2005"); } ?>>2005</option> <option <?php if (isset($_SESSION['temp']['dateoccured3'])) { tempvar($_SESSION['temp']['dateoccured3'], "2006"); }else { tempvar($year, "2006"); } ?>>2006</option> <option <?php if (isset($_SESSION['temp']['dateoccured3'])) { tempvar($_SESSION['temp']['dateoccured3'], "2007"); }else { tempvar($year, "2007"); } ?>>2007</option> <option <?php if (isset($_SESSION['temp']['dateoccured3'])) { tempvar($_SESSION['temp']['dateoccured3'], "2008"); }else { tempvar($year, "2008"); } ?>>2008</option> <option <?php if (isset($_SESSION['temp']['dateoccured3'])) { tempvar($_SESSION['temp']['dateoccured3'], "2009"); }else { tempvar($year, "2009"); } ?>>2009</option> <option <?php if (isset($_SESSION['temp']['temp']['dateoccured3'])) { tempvar($_SESSION['temp']['dateoccured3'], "2010"); }else { tempvar($year, "2010"); } ?>>2010</option> </select></td> </tr> <tr> <td></td> <td></td> <td></td> </tr> <tr> <td class="left"><label for="approxtime">Approximate Time:</label><span class="small"> (0000)</span></td> <td class="left"><input name="approxtime_na" id="approxtime_na" type="checkbox" <?php if ($_SESSION['temp']['approxtime_na'] == "Not Applicable") { echo "checked=\"checked\""; } ?> value="Not Applicable" /><label for="approxtime_na">N/A</label></td> <td class="right"><input name="approxtime" id="approxtime" maxlength="4" type="text" value="<?php echo $_SESSION['temp']['approxtime']; ?>" /></td> </tr> <tr> <td class="left"><label for="location">Location:</label></td> <td class="left"><input name="location_na" id="location_na" type="checkbox" <?php if ($_SESSION['temp']['location_na'] == "Not Applicable") { echo "checked=\"checked\""; } ?> value="Not Applicable" /><label for="location_na">N/A</label></td> <td class="right"><input name="location" id="location" maxlength="200" type="text" value="<?php echo $_SESSION['temp']['location']; ?>" /></td> </tr> <tr> <td colspan="3"></td> </tr> <tr> <td colspan="3"><br /></td> </tr> <tr> <td class="left"><label for="description">Description of occurrence or suggestion:</label></td> <td></td> <td></td> </tr> <tr> <td colspan="3"> <script language="JavaScript" type="text/javascript"> <!-- //build new richTextEditor var rte1 = new richTextEditor('description'); <?php $content = rteSafe($_SESSION['temp']['description']); ?> rte1.html = '<?php echo $content; ?>'; rte1.toggleSrc = false; rte1.build(); //--> </script> </td> </tr> <tr> <td colspan="3"></td> </tr> <tr> <td colspan="3"><input name="submit" id="submit" type="submit" maxlength="200" value="Submit" /></td> </tr> </table> </form> </div> </div> </body> </html> <?php }else { header("Location: /index.php"); } ?> Processor Text <?php require_once(".#######")?> <?php if ($_SESSION['controller'] == true) { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php require_once($docroot . "#######"); ?> </head> <body id="safety"> <div id="logo"><p>@@#####</p></div> <div id="safetydiv"> <div id="box" style="text-align:left;"> <br /> <?php $errorhandler = ""; // errorhandling here if needed if (isset($_POST['submit'])) { $errorhandler = ""; $todaysdate = date("m/d/Y"); $todaysdate = strtotime($todaysdate); $_SESSION['temp']['todaysdate'] = $todaysdate; $_SESSION['temp']['status'] = $_POST['status']; $_SESSION['temp']['name'] = $_POST['name']; $_SESSION['temp']['title'] = $_POST['title']; $_SESSION['temp']['phone'] = $_POST['phone']; $_SESSION['temp']['email'] = $_POST['email']; $_SESSION['temp']['dateoccured_na'] = $_POST['dateoccured_na']; $_SESSION['temp']['dateoccured1'] = $_POST['dateoccured1']; $_SESSION['temp']['dateoccured2'] = $_POST['dateoccured2']; $_SESSION['temp']['dateoccured3'] = $_POST['dateoccured3']; $_SESSION['temp']['approxtime_na'] = $_POST['approxtime_na']; $_SESSION['temp']['approxtime'] = $_POST['approxtime']; $_SESSION['temp']['location_na'] = $_POST['location_na']; $_SESSION['temp']['location'] = $_POST['location']; $_SESSION['temp']['description'] = $_POST['description']; switch($_SESSION['temp']['status']) { case "fullidentity": if (($_SESSION['temp']['name'] == "") || ($_SESSION['temp']['title'] == "") || ($_SESSION['temp']['phone'] == "") || ($_SESSION['temp']['email'] == "")) { $errorhandler .= " <br /> You selected Full Identity. The following fields are required: <br /><br /> Name<br /> Phone<br /> Email Address <br /><br />"; } break; case "confidential": if (($_SESSION['temp']['name'] == "") || ($_SESSION['temp']['title'] == "") || ($_SESSION['temp']['phone'] == "") || ($_SESSION['temp']['email'] == "")) { $errorhandler .= " <br /> You selected Confidential. The following fields are required: <br /><br /> Name<br /> Phone<br /> Email Address <br /><br />"; } break; } if ($_SESSION['temp']['approxtime_na'] != "Not Applicable") if ($_SESSION['temp']['approxtime'] == "") { $errorhandler .= "If Not Applicable is not selected then Approximate "; $errorhandler .= "Time is required.<br />"; } } if ($_SESSION['temp']['location_na'] != "Not Applicable") { if ($_SESSION['temp']['location'] == "") { $errorhandler .= "If Not Applicable is not selected then Location is required.<br />"; } } if ($_SESSION['temp']['description'] == "") { $errorhandler .= "The description is required and it was left blank.<br />"; } if ($errorhandler != "") { echo "<span style=\"color:red\">"; echo "The following errors have occurred:"; echo "<br />"; echo "<br />"; echo $errorhandler; echo "</span>"; echo "<br />"; echo "<br />"; echo "<form action=\"index.php\" method=\"post\">"; echo "<input name=\"return\" id=\"return\" type=\"submit\" value=\"Return To Form\" />"; echo "</form>"; } if ($errorhandler == "") { // get date, status, and personal information $_SESSION['temp']['todaysdate'] = $todaysdate; $_SESSION['temp']['status'] = deepclean($_SESSION['temp']['status']); $_SESSION['temp']['name'] = deepclean($_SESSION['temp']['name']); $_SESSION['temp']['title'] = deepclean($_SESSION['temp']['title']); $_SESSION['temp']['phone'] = deepclean($_SESSION['temp']['phone']); $_SESSION['temp']['email'] = deepclean($_SESSION['temp']['email']); // if na get not applicable, if not format date properly if ($_SESSION['temp']['dateoccured_na'] == "Not Applicable") { $_SESSION['temp']['dateoccured'] = "Not Applicable"; }else { $_SESSION['temp']['dateoccured'] = $_SESSION['temp']['dateoccured1'] . "/" . $_SESSION['temp']['dateoccured2'] . "/" . $_SESSION['temp']['dateoccured3']; } // if na get not applicable, if not get approximate time if ($_SESSION['temp']['approxtime_na'] == "Not Applicable") { $_SESSION['temp']['approxtime'] = "Not Applicable"; }else { $_SESSION['temp']['approxtime'] = deepclean($_SESSION['temp']['approxtime']); } // if na get not applicable, if not get Location if ($_SESSION['temp']['location_na'] == "Not Applicable") { $_SESSION['temp']['location'] = "Not Applicable"; }else { $_SESSION['temp']['location'] = deepclean($_SESSION['temp']['location']); } // get the allowed tags, and thouroughly clean the description of // anything that might be dangerous. $allowedtags = "<br>, <ul>, <li>, <ol>, <b>, <strong>, <u>"; $_SESSION['temp']['description'] = strip_tags($_SESSION['temp']['description'], $allowedtags); $_SESSION['temp']['description'] = mysql_real_escape_string($_SESSION['temp']['description']); $_SESSION['temp']['description'] = trim($_SESSION['temp']['description']); // at this point where going to go ahead and say that all variables are // properly prepared and cleaned. // This is where we do our database work and send an email to the person. $insert = "INSERT INTO safetyreport (todaysdate, dateoccured, time, location, description, status, name, jobtitle, phone, email) VALUES ('" . $_SESSION['temp']['todaysdate'] . "', '" .$_SESSION['temp']['dateoccured'] . "', '" . $_SESSION['temp']['approxtime'] . "', '" . $_SESSION['temp']['location'] . "', '" . $_SESSION['temp']['description'] . "', '" . $_SESSION['temp']['status'] . "', '" . $_SESSION['temp']['name'] . "', '" . $_SESSION['temp']['title'] . "', '" . $_SESSION['temp']['phone'] . "', '" . $_SESSION['temp']['email'] . "');"; // perform query in an if, so I can send some emails if it's successfull. if (mysql_query($insert)) { // if the query was successful it's time to send some emails. // start review form ?> <h1>Review Information</h1> <?php echo "<br />"; echo "<strong>Status:</strong> " . $_SESSION['temp']['status']; echo "<br />"; echo "<strong>Name:</strong> " . stripslashes($_SESSION['temp']['name']); echo "<br />"; echo "<strong>Job Title:</strong> " . stripslashes($_SESSION['temp']['title']); echo "<br />"; echo "<strong>Phone:</strong> " . stripslashes($_SESSION['temp']['phone']); echo "<br />"; echo "<strong>Email:</strong> " . stripslashes($_SESSION['temp']['email']); echo "<br />"; $dateoccured = $_SESSION['temp']['dateoccured1'] . "/" . $_SESSION['temp']['dateoccured2'] . "/" . $_SESSION['temp']['dateoccured3']; echo "<strong>Date Occured:</strong> " . $dateoccured; echo "<br />"; echo "<strong>Approximate Time:</strong> " . stripslashes($_SESSION['temp']['approxtime']); echo "<br />"; echo "<strong>Location:</strong> " . stripslashes($_SESSION['temp']['location']); echo "<br />"; echo "<strong>Description:</strong> "; echo "<br />"; echo stripslashes($_SESSION['temp']['description']); echo "<br />"; echo "<br />"; ?> <form name="sendoff" id="sendoff" action="index3.php" method="post"> <input type="Button" name="printit" value="Print a Copy for your Records" onclick="javascript:window.print();"> </form> <?php // end review form. // now that everything is done, and the review form has been shown, if they supplied an email // address we need to send them a copy of that email address, as well as sending an email // address to the administrators, as they requested to have new reports emailed to them // upon entry #Admin Email $message = "-New Safety Report Entry- Current Date: " . $_SESSION['temp']['todaysdate'] . "Approximate Time: " . $_SESSION['temp']['approxtime'] . "Location: " . $_SESSION['temp']['location'] . "Description: " . $_SESSION['temp']['description'] . "Status: " . $_SESSION['temp']['status']; // based on there status, the user information can look different to admins if ($_SESSION['temp']['status'] == "fullidentity" || $_SESSION['temp']['status'] == "confidential") { $message .= "Name: " . $_SESSION['temp']['name']; $message .= "Job Title: " . $_SESSION['temp']['title']; $message .= "Phone: " . $_SESSION['temp']['phone']; $message .= "Email: " . $_SESSION['temp']['email']; }elseif ($_SESSION['temp']['status'] == "anonymous") { $message .= "Name: Masked"; $message .= "Job Title: Masked"; $message .= "Phone: Masked"; $message .= "Email: Masked"; } $to = "businessman332211@hotmail.com"; $subject = "New Safety Report Entry"; $headers = "From: donot-reply@9ksafety.com"; // send mail to admins mail($to, $subject, $message, $headers); // Now that sending the mail to admins is completely finished it's time to perform the final act // which is sending an email to the user's as well # User Email // first we have to check if there is a provided email, if so send one if ($_SESSION['temp']['email'] != "") { $userto = $_SESSION['temp']['email']; $usermessage = "-New Safety Report Entry-"; $usermessage .= "Current Date: " . $_SESSION['temp']['todaysdate']; $usermessage .= "Approximate Time: " . $_SESSION['temp']['approxtime']; $usermessage .= "Location: " . $_SESSION['temp']['location']; $usermessage .= "Description: " . $_SESSION['temp']['description']; $usermessage .= "Status: " . $_SESSION['temp']['status']; $usermessage .= "Name: " . $_SESSION['temp']['name']; $usermessage .= "Job Title: " . $_SESSION['temp']['title']; $usermessage .= "Phone: " . $_SESSION['temp']['phone']; $usermessage .= "Email: " . $_SESSION['temp']['email']; $usersubject = "Notification From 9kSafety, safety report entry"; $userheaders = "From: donotreply@9ksafety.com"; // send user mail mail($userto, $usersubject, $usermessage, $userheaders); }// ends if mail unset($_SESSION['temp']); // sessions emptied }// ends mysql query }// end the entire process, and close the script out // script finished. ?> </div> <!-- End centering box --> </div> </body> </html> <?php }else { header("Location: /index.php"); } ?> Well that is all the code on those 2 pages. I have tried the following 1. Echoing out the description on the next page, just echoing it out. It ends up working fine here. but on the second time it doesn't. 2. Trying to let the script run. When it does it adds the rnrn at the top and bottom (trim removes it from the top) On top of that (I could of sworn it wasn't doing that at first), it has been inserting a bunch of tag's in the test emails, I am really wondering what is going on. With the full script if someone can help me figure out what is causing this problme, it would be greatly appreciated, because as of right now, I am totally confused.
×
×
  • 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.