Jump to content

jhollin1138

Members
  • Posts

    142
  • Joined

  • Last visited

Everything posted by jhollin1138

  1. I spoke to soon. I forgot to change "Web Service Extensions".
  2. That is what I thought too. After I make the necessary changes and restart IIS, I can't get any php pages to load until I change everything back to point to php4. Any ideas on what I am missing? Is there something else that could be pointing to php4?
  3. Now that the TCH's servers I am hosting my accounts on have both been updated, I need to update my own Windows 2003 server to PHP5 from PHP4. This is the server I have at work for file storage and hosting a few web based applications, so I need to avoid downtime if possible. I am trying to find the best method or procedure possible to do this update. I found this procedure on another website. h**p://www.geekpedia.com/tutorial88_How-to-upgrade-from-PHP-4.x-to-PHP-5.x-on-Windows.html But since it involves uninstalling PHP4 I am weary of trying it in case it doesn't work. Does anyone have any suggestions or comments to get me going? I guess on a side note, instead of creating another thread I need to update MySQL to v5 also, any suggestions or comments about that too?
  4. Well if you want to stay with Gallery, I am not sure what you can use. If you consider switching to SPGM, I wrote a mod for it that adds video support. Information on my SPGM-Vid mod for SPGM can be found on my site here.
  5. Being a long time hotmail and yahoo user myself, I think I can answer this. I believe Hotmail doesn't have a a true spam filter like yahoo and the others use. When a hotmail user turns on spam filtering, basically if the email isn't from an address in the address book or the safe list, hotmail will assume the email is spam. The people receiving your email on their hotmail account need to have your email or "@solabroad.com" in their safe list. I believe because of this, there is nothing you can do with formating your email to get around this with hotmail.
  6. To be honest I am not sure why I did that either. Some of the code on php.net had them, and others didn't. I am not planning on hosting on a MAC or even Windows so I will never know if I needed them or not.
  7. I had a project a month ago or so to add a form to my company's website. My goal was to have the email in both html and plain text as well as include an attachment. I read all the posts on sending mail on php.net and combined the best of the information to build a function for handling mail. Here is the function I came up with, of course there is a little bit of nearly every post in it. >function send_mail($fromname, $emailaddress, $fromaddress, $emailsubject, $body, $fileattach = false) { # Is the OS Windows or Mac or Linux if (strtoupper(substr(PHP_OS,0,3)=='WIN')) $eol="\r\n"; elseif (strtoupper(substr(PHP_OS,0,3)=='MAC')) $eol="\r"; else $eol="\n"; $mime_boundary_1 = md5(time()); $mime_boundary_2 = "1_".$mime_boundary_1; $mail_sent = false; # Common Headers $headers = ""; $headers .= 'From: '.$fromname.'<'.$fromaddress.'>'.$eol; $headers .= 'Reply-To: '.$fromname.'<'.$fromaddress.'>'.$eol; $headers .= 'Return-Path: '.$fromname.'<'.$fromaddress.'>'.$eol; // these two to set reply address $headers .= "Message-ID: <".$now."webmaster@".$_SERVER['SERVER_NAME'].">".$eol; $headers .= "X-Mailer: PHP v".phpversion().$eol; // These two to help avoid spam-filters # Boundry for marking the split & Multitype Headers $headers .= 'MIME-Version: 1.0'.$eol; $headers .= "Content-Type: multipart/mixed;".$eol; $headers .= " boundary=\"".$mime_boundary_1."\"".$eol; $msg = ""; # Building Message Body $msg .= "--".$mime_boundary_1.$eol; $msg .= "Content-Type: multipart/alternative;".$eol; $msg .= " boundary=\"".$mime_boundary_2."\"".$eol.$eol; # Text Version $msg .= "--".$mime_boundary_2.$eol; $msg .= "Content-Type: text/plain; charset=iso-8859-1".$eol; $msg .= "Content-Transfer-Encoding: 8bit".$eol; $msg .= strip_tags(str_replace("<br>", $eol, $body)).$eol.$eol; # HTML Version $msg .= "--".$mime_boundary_2.$eol; $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol; $msg .= "Content-Transfer-Encoding: 8bit".$eol; $msg .= str_replace($eol, "<br>", $body).$eol.$eol; # Finished Message Body $msg .= "--".$mime_boundary_2."--".$eol.$eol; # Begin Adding Attachments if ($fileattach) { for($i=0; $i < count($fileattach); $i++) { if (is_file($fileattach[$i]["file"])) { # File for Attachment $file_name = substr($fileattach[$i]["file"], (strrpos($fileattach[$i]["file"], "/")+1)); $handle=fopen($fileattach[$i]["file"], 'rb'); $f_contents=fread($handle, filesize($fileattach[$i]["file"])); $f_contents=chunk_split(base64_encode($f_contents)); //Encode The Data For Transition using base64_encode(); //Remove file unlink($fileattach[$i]["file"]); # Attachment $msg .= "--".$mime_boundary_1.$eol; $msg .= "Content-Type: ".$fileattach[$i]["content_type"].";".$eol; $msg .= " name=\"".$file_name."\"".$eol; $msg .= "Content-Transfer-Encoding: base64".$eol; $msg .= "Content-Disposition: attachment;".$eol; $msg .= " filename=\"".$file_name."\"".$eol.$eol; // !! This line needs TWO end of lines !! IMPORTANT !! $msg .= $f_contents.$eol.$eol; } } } # Finished $msg .= "--".$mime_boundary_1."--".$eol.$eol; // finish with two eol's for better security. see Injection. # SEND THE EMAIL ini_set(sendmail_from, $fromaddress); // the INI lines are to force the From Address to be used ! if (mail($emailaddress, $emailsubject, $msg, $headers)) $mail_sent = true; ini_restore(sendmail_from); return $mail_sent; } I realize this is more then the original post asked for, but I figured it might be useful.
  8. I finally got everything working. The solution came to me when I was giving the kids a bath. Instead of trying to figure out which radio button was picked and set a variable, just set a variable. This is what I came up with for the html section: ><div id="box" class="dialog"> <form method="post" name="printDialog" action="printWin('./print.php?id=4306&PrintSheet=');"> <table align="center"> <tr><td colspan="2">Print Sheet: </td></tr> <tr><td colspan="2"><input type="radio" name="PrintSheet" onclick="printPage='order'" /> Order</td></tr> <tr><td colspan="2"><input type="radio" name="PrintSheet" onclick="printPage='spec'" /> Specification</td></tr> <tr><td colspan="2"><input type="radio" name="PrintSheet" onclick="printPage='est'" /> Estimate</td></tr> <tr> <td> <input type="submit" name="submit" value="OK" onclick="hm('box');" /> </td> <td> <input type="reset" value="Cancel" onclick="hm('box');" /> </td> </tr> </table> </form> </div> Here is the java script: >MyPrintWin=null; function printWin(linkName) { if(MyPrintWin != null) MyPrintWin.close(); printPageLink = linkName + printPage; MyPrintWin = window.open(printPageLink, "printWindow", "width=700,height=500,menubar=no,resizable,toolbar=no,scrollbars"); }
  9. Unfortunately, the only thing I know about cookies is how to eat them.
  10. Here is an update. I tried the following javascript code, still no luck. >MyPrintWin=null; function printWin(linkName, printPageDefault) { if(MyPrintWin != null) MyPrintWin.close(); var printPage = printPageDefault; for (var i=0; i < document.printDialog.PrintSheet.length; i++) { if (document.printDialog.PrintSheet[i].checked) { printPage = document.printDialog.PrintSheet[i].value; } } printPageLink = linkName + printPage; MyPrintWin = window.open(printPageLink, "printWindow", "width=700,height=500,menubar=no,resizable,toolbar=no,scrollbars"); } I also tried using onsubmit instead of action in my html form, no luck. ><div id="box" class="dialog"> <form method="post" name="printDialog" onsubmit="printWin('./print.php?id=4306&PrintSheet=', 'spec');return false;"> <table align="center"> <tr><td colspan="2">Print Sheet: </td></tr> <tr><td colspan="2"><input type="radio" name="PrintSheet" value="order" checked="checked" /> Order</td></tr> <tr><td colspan="2"><input type="radio" name="PrintSheet" value="spec" /> Specification</td></tr> <tr><td colspan="2"><input type="radio" name="PrintSheet" value="est" /> Estimate</td></tr> <tr> <td> <input type="submit" name="submit" value="OK" onclick="java script:hm('box');" /> </td> <td> <input type="reset" value="Cancel" onclick="java script:hm('box');" /> </td> </tr> </table> </form> </div> Any help would be appreciated.
  11. I feel like a javascript knucklehead here. I am trying to implement the "Modal Dialog Box" script found here h**p://javascript.about.com/b/a/256836.htm. I have been able to get the front end of things working fine; it is the back end of things that isn't working. I am working on a script, in PHP, that is pulling information together and generates one of three different reports. I am using the "Modal Dialog Box" to generate an interface for the user to select which of the reports they want to generate. When the user clicks 'OK', I want to pop-up a new window with their report. Here is my HTML code for the "Modal Dialog Box". ><div id="box" class="dialog"> <form method="post" name="printDialog" action="printWin('./print.php?id=4306&PrintSheet=', 'order');"> <table align="center"> <tr><td colspan="2">Print Sheet: </td></tr> <tr><td colspan="2"><input type="radio" name="PrintSheet" value="order" checked="checked" /> Order</td></tr> <tr><td colspan="2"><input type="radio" name="PrintSheet" value="spec" /> Specification</td></tr> <tr><td colspan="2"><input type="radio" name="PrintSheet" value="est" /> Estimate</td></tr> <tr> <td> <input type="submit" name="submit" value="OK" onclick="hm('box');" /> </td> <td> <input type="reset" value="Cancel" onclick="hm('box');" /> </td> </tr> </table> </form> </div> Here is my javascript that is handling the pop-up window. >MyPrintWin=null; function printWin(linkName, printPageDefault) { if(MyPrintWin != null) MyPrintWin.close(); for (var i=0; i < document.printDialog.PrintSheet.length; i++) { if (document.printDialog.PrintSheet[i].checked) { var printPage = document.printDialog.PrintSheet[i].value; } } printPageLink = linkName + printPage; MyPrintWin = window.open(printPageLink, "printWindow", "width=700,height=500,menubar=no,resizable,toolbar=no,scrollbars"); } When I click 'OK', the "Modal Dialog Box" is disappearing, but the pop-up isn't showing up. If I change my javascript to: >MyPrintWin=null; function printWin(linkName, printPageDefault) { if(MyPrintWin != null) MyPrintWin.close(); printPageLink = linkName + printPageDefault; MyPrintWin = window.open(printPageLink, "printWindow", "width=700,height=500,menubar=no,resizable,toolbar=no,scrollbars"); } Everything works the way I would like, although obviously the value for the radio button is not being used. Am I missing something here?
  12. :oops:I found my problem. Replacing the similar section of code in my first post with the code below, fixes the it. >for ($i=0; $i<count($arr_Multiplier); $i++) { $arr_EstimateTotal[$i]['ItemType'] = $arr_Multiplier[$i]['ItemType']; $arr_EstimateTotal[$i]['Multiplier'] = 1 + $arr_Multiplier[$i]['Multiplier']; for ($j=0; $j<count($arr_Estimate); $j++) { if ($arr_Multiplier[$i]['ItemTypeID'] == $arr_Estimate[$j]['ItemTypeID']) { $arr_EstimateTotal[$i]['ItemTotal'] = $arr_EstimateTotal[$i]['ItemTotal'] + $arr_Estimate[$j]['Total']; $arr_EstimateTotal[$i]['MultTotal'] = ceil($arr_EstimateTotal[$i]['ItemTotal'] * $arr_EstimateTotal[$i]['Multiplier']); } } $OverallTotal = $OverallTotal + $arr_EstimateTotal[$i]['MultTotal']; }
  13. I am working on script and I am having the addition problems with PHP. Here is a sample piece of code that I am having a problem with. ><?php $OverallTotal = 0; for ($i=0; $i<count($arr_Multiplier); $i++) { $arr_EstimateTotal[$i]['ItemType'] = $arr_Multiplier[$i]['ItemType']; $arr_EstimateTotal[$i]['Multiplier'] = 1 + $arr_Multiplier[$i]['Multiplier']; for ($j=0; $j<count($arr_Estimate); $j++) { if ($arr_Multiplier[$i]['ItemTypeID'] == $arr_Estimate[$j]['ItemTypeID']) { $arr_EstimateTotal[$i]['ItemTotal'] = $arr_EstimateTotal[$i]['ItemTotal'] + $arr_Estimate[$j]['Total']; $arr_EstimateTotal[$i]['MultTotal'] = ceil($arr_EstimateTotal[$i]['ItemTotal'] * $arr_EstimateTotal[$i]['Multiplier']); $OverallTotal = $OverallTotal + $arr_EstimateTotal[$i]['MultTotal']; } } } for ($i=0; $i<count($arr_LaborMultiplier); $i++) { $arr_LaborTotal[$i]['LaborType'] = $arr_LaborMultiplier[$i]['LaborType']; $arr_LaborTotal[$i]['LaborTotal'] = ceil($int_LaborTotal * $arr_LaborMultiplier[$i]['LaborMultiplier']); $OverallTotal = $OverallTotal + $arr_LaborTotal[$i]['LaborTotal']; } // Building Table echo '<table class="estimate">'."\n"; for ($i=0; $i<count($arr_EstimateTotal); $i++) { echo ' <tr>'."\n"; echo ' <td align="right" colspan="8">'; echo str_replace($cfg['lang']['tag_total'],$arr_EstimateTotal[$i]['ItemType'],money_format($cfg['lang']['est_Material'], $arr_EstimateTotal[$i]['ItemTotal'])); echo ':</td>'."\n"; echo estimate_box('ETotal'.'_'.$arr_EstimateTotal[$i]['ItemTypeID'], $arr_EstimateTotal[$i]['MultTotal'], 50, 'Text', 7, 'right', 0, 0); echo ' </tr>'."\n"; } for ($i=0; $i<count($arr_LaborMultiplier); $i++) { echo ' <tr>'."\n"; echo ' <td align="right" colspan="8">Total '.$arr_LaborTotal[$i]['LaborType'].':</td>'."\n"; echo estimate_box('LTotal'.'_'.$arr_LaborTotal[$i]['LaborTypeID'], $arr_LaborTotal[$i]['LaborTotal'], 50, 'Text', 7, 'right', 0, 0); echo ' </tr>'."\n"; } echo ' <tr>'."\n"; echo ' <td align="right" colspan="8">Total:</td>'."\n"; echo estimate_box('OTotal'.'_'.'T', $OverallTotal, 50, 'Text', 7, 'right', 0, 0); echo ' </tr>'."\n"; echo '</form>'."\n"; ?> I am pulling data into the arrays "$arr_Multiplier", "$arr_Estimate" & "$arr_LaborMultiplier" and variable "$int_LaborTotal" from a MySQL database. The data is all correct. The problem is the value for "$OverallTotal" is incorrect. PHP is saying 4193, but when I add the values I get 4075 (791+269+810+585+1620=4075). See this link to the stripped down source code of the output (I have a screen-shot of the output but I couldn't get it to attach it). Some items don't have the problem, while others do. Does anyone have any ideas?
  14. It shouldn't be hard to do. I will see if I have some time this evening.
  15. I just stumbled across this thread. Did you try using FTP functions built into php?
  16. Thanks Bruce and Rick, now I remember the "rm" command.
  17. I admit it, I use Windows XP and not Linux. Although I do have some past UNIX experience (HP-UX) from when I was a system admin several years ago, so I know I can do what I want to do. I just can't remember how. I host some RSS feeds for a friend. When the feeds run into a problem, the write to an error log. I would like to setup a cron job that will delete the error log once a week. I know how to do the cron side. I am just unsure about the actual delete command structure to run. Any help?
  18. I think I figured out were the problem is coming from. "CalendarControl.js" has the following lines at the bottom: >document.write("<iframe id='CalendarControlIFrame' src='java script:false;' frameBorder='0' scrolling='no'></iframe>"); document.write("<div id='CalendarControl'></div>"); When I remark them, everything works the way it should. I think I might just leave things the way the are and load "CalendarControl.js" only when I need it.
  19. I installed the Web Dev Plugin too and see the same thing. I found the "Popup Calender Control" at this url: hxxps://engineering.purdue.edu/ECN/Support/KnowledgeBase/Docs/20040414131404. Here is the complete CSS, as you can see there isn't a "java script:false;" at the bottom of it. >/*Reference from https://engineering.purdue.edu/ECN/Resources/KnowledgeBase/Docs/20040414131404*/ #CalendarControlIFrame { display: none; left: 0px; position: absolute; top: 0px; height: 250px; width: 250px; z-index: 99; } #CalendarControl { position:absolute; background-color:#FFF; margin:0; padding:0; display:none; z-index: 100; } #CalendarControl table { font-family: arial, verdana, helvetica, sans-serif; font-size: 8pt; border-left: 1px solid #336; border-right: 1px solid #336; } #CalendarControl th { font-weight: normal; } #CalendarControl th a { font-weight: normal; text-decoration: none; color: #FFF; padding: 1px; } #CalendarControl td { text-align: center; } #CalendarControl .header { background-color: #336; } #CalendarControl .weekday { background-color: #DDD; color: #000; } #CalendarControl .weekend { background-color: #FFC; color: #000; } #CalendarControl .current { border: 1px solid #339; background-color: #336; color: #FFF; } #CalendarControl .weekday, #CalendarControl .weekend, #CalendarControl .current { display: block; text-decoration: none; border: 1px solid #FFF; width: 2em; } #CalendarControl .weekday:hover, #CalendarControl .weekend:hover, #CalendarControl .current:hover { color: #FFF; background-color: #336; border: 1px solid #999; } #CalendarControl .previous { text-align: left; } #CalendarControl .next { text-align: right; } #CalendarControl .previous, #CalendarControl .next { padding: 1px 3px 1px 3px; font-size: 1.4em; } #CalendarControl .previous a, #CalendarControl .next a { color: #FFF; text-decoration: none; font-weight: bold; } #CalendarControl .title { text-align: center; font-weight: bold; color: #FFF; } #CalendarControl .empty { background-color: #CCC; border: 1px solid #FFF; } Maybe someone can see something I am missing.
  20. Thanks for the help. Instead of go through the trail-and-error method, I just modified my script not to load the java and css until it is actually needed. Sure enough, both issues are gone. Although I still get the "false" when everything is loaded (i.e. after logged in and loading the information). I'll look at things more closely this evening and see if I can nail done what is going on. As for the "java script:false;" you found with "CalendarControl.css", when I actually look at it I don't see that statement.
  21. I haven't tried it with IE7. Besides, I am not even sure I want to even go there.
  22. As some of you may be aware, I have been working on a large PHP script for work during the evenings at home. I have already made several post about it when I have stumbled onto a problem during its development. Now that I have the input and interface part of it almost done, I have found an annoying issue with my script and IE. Although with Firefox, everything is fine. The first issue I am having is when the script is first loaded with IE. You can see the word "false" displayed for a brief moment in the upper-left corner. Then, when the page is loaded in IE, the background color only displays to the bottom of the main table/div. If you minimize and restore the browsers window, the background renders fine. Neither of the problems I am having are major, they are just annoying to me. I am trying to determine why as well as how, if possible, to prevent them. Here is a link to a stripped down version, I have made some minor alterations to hide my company name, on my site. http://oms.jhollin1138.com
  23. I found another problem with ><body onblur="self.focus();"> If you have a form in the pop-up window, you can't change anything. It looks like I found a solution that should work with both IE and Firefox. I found it here. I still have to try everything out on my application, but judging from the examples on the page it should work.
  24. I just tried this and was going to post something to find some one already posted something. It seems to work with IE fine. With Firefox, it only works the first time you try to change windows. After that, it doesn't work.
×
×
  • Create New...