JavaScript - Email Encryption Script, Link Not Showing
I am having trouble with a script that works with the link invisibly which you can see the cursor change to a pointer hand when hovering next to "Email:". If I copyed and pasted the script below
Code: <script language=JavaScript> <!-- var user = "name"; var host = "domain.com"; var link = user + "@" + host; document.write("<a hre" + "f=ma" + "ilto:" + user + "@" + host + ">" + link + "</a>"); //--> </script> It would show if you placed the script in the body portion of a blank HTML page. In my website below I can't figure out why the link doesn't show and is invisible. Any suggestions on how to fix this? This emailHide.html.txt file is below, to view in HTML remove the .txt extention and save and view in browser. Similar TutorialsHello, I want to use this script I got from he http://javascript.about.com/library/blencrypt.htm The examples there work fine for me. But what I cannot seem to do is use any other 'key' than one made by Code: hexToByteArray(genkey()); I've tried all the things I can think of, like Code: var key = stringToByteArray("mickeymouse"); for instance, doesn't work... The ciphertext just says 'undefined' when I try to display it. I really cannot see the problem here. I just want to be able to use a user supplied key, not a bloomin random one every time. This is really frustrating me, it's even invading my dream time! Does anyone know what's going wrong here? Please help. I am a blogger but not a programmer. However, I have an advertiser that wants to pay me for a link that only appears on my blog "home" page (or main landing URL), but not on any of the individual blog post pages. This is the code that I got from Typepad, my blog hosting company: Code: <div id="displayAdDiv" style="display:none;"> <a href="http://www.advertiserwebpage.com">Advertiser</a> </div> <script language="javascript"> var AdDiv = document.getElementById("displayAdDiv"); if ( window.location == "http://www.bloghomepage.com/" ) { AdDiv.style.display="block"; } else { AdDiv.style.display="none"; } </script> This works as expected (i.e., the link only appears on the main page). However, the advertiser now says that in addition to not having the link show up anywhere else but on the home page, they don't want the advertiser link page URL appearing in the source code for any other page of my blog but the home page. I'm assuming that this whole thing has something to do with SEO, but I can't say for sure. Anyway, I'm not even sure this is possible using javascript, but I was wondering if there is a way to: a) read or "call" the link from another file (e.g., txt, js, xml), or possibly even concatenate two or more variables on the fly so that it only shows up in the source code associated with the home page URL; and, b) only display the link to visitors to the home page URL. As a point of reference, the advertiser did show me how the coding was done for another blogging platform, Wordpress: Code: <?php if ($_SERVER["REQUEST_URI"] == "/" || $_SERVER["REQUEST_URI"] == "/index.php") { ?> Advertising link goes here... <?php } ?> OR the following widget: It is called the widget-context plugin. Go to plugins -> add new searched for - widget context - and install it. Again, I am not a programmer, but I get the distinct impression that this approach would not work with Typepad (because they don't use PHP and/or allow users to do things that affect code on the server side?). Any help would be appreciated! Not sure if I'm in the right category, apologies if I am not.. I have a small flash/javascript streaming mp3 player on my site that works fine in Chrome and Safari, but doesn't show up at all in Firefox, IE, or Opera. the site is he www.thehordeandtheharem.com/index2.html the player is in the top left corner. I don't even know where to begin troubleshooting this as I didn't write the player myself, but copied it from another site. If anyone could shed any light on this for me I would be very grateful, thanks! I want to send a simple email with just email & subject only when the user clicks a link that opens a pdf. I'm thinking javascript is the best way to do this but I have no idea how. I have googled it a bunch but most information is about getting an email when someone clicks a link you send in an email. I don't want that. This is on a website. I'm not sure if php would be better to use. Any help would be most appreciated!
So far I have what is below, it sends and replies to emails like it is supposed to however I can not get it to show error messages in the area provided... It seems not to show the error messages of confirmation... if it is of help give it a go at www.erbimages.com/contact.php just use demo demo demo etc in the fields... PLEASE HELP... heres the script... PHP Code: <?php if(isset($_POST['send'])){ $to = $_REQUEST['sendto'] ; // change all the following to $_POST $from = $_REQUEST['Email'] ; $name = $_REQUEST['Name'] ; $headers = "From: $from"; $subject = "Web Contact Data"; $fields = array(); $fields{"Name"} = "Name"; $fields{"Company"} = "Company"; $fields{"Email"} = "Email"; $fields{"Message"} = "Message"; $body = "We have received the following information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); } $headers2 = "From: noreply@erbimages.com"; $subject2 = "Thank you for contacting us."; $autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible, usually within 48 hours."; $send=false; if($from == '') {$error= "You have not entered an email, please go back and try again";} else { if($name == '') {$error= "You have not entered a name, please go back and try again";} else { $send = mail($to, $subject, $body, $headers); $send2 = mail($from, $subject2, $autoreply, $headers2); } if(!isset($error) && !$send) $error= "We encountered an error sending your mail, please notify service@erbimages.com"; } }// end of if(isset($_POST['send'])) ?> <?php include("http://www.erbimages.com/php/head.php"); ?> <?php include("http://www.erbimages.com/php/start.php"); ?> <?php include("http://www.erbimages.com/php/topline/return.php"); ?> <div class="section_right"> <ul id="section_contact"> <li> <span id="section_header_right_contact">CONTACT</span> </li> <li> <span id="section_txt"> <?php if(isset($error)) echo '<span id="section_error">'.$error.'</span>'; if(isset($send) && $send== true){ echo 'Your message has been send. Thank you.'; } if(!isset($_POST['send']) || isset($error)) ?> <form method="post" action="contact.php"> <p>Your Details</p> <p><select name="sendto"><option value="info@erbimages.com">Information</option> <option value="hire@erbimages.com">Hire</option> <option value="rf@erbimages.com">Royalty Free</option> <option value="service@erbimages.com">Technical</option></select></p> <p><font color=red>*</font> <font style="padding-right: 2em;">Name:</font><input size=25 name="Name"></p> <p><font color=red>*</font> <font style="padding-right: 2em;">Email:</font><input size=25 name="Email"></p> <p><font style="padding-right: 2em;">Company / Event:</font><input size=25 name="Company"></p> <p>Message</p> <p><textarea name="Message" rows=5 cols=35></textarea></p> <p><input type=submit name="send" value="Submit"></p> </form> </span> </li> </ul> </div> <?php include("http://www.erbimages.com/php/quiet_footer.php"); ?> <?php include("http://www.erbimages.com/php/end.php"); ?> PLEASE HELP, I REALLY NEED YOU... I have a validate script for my form. It is jquery. On the form I have added $#contact_form .validate(); but I think that maybe this is not going to work, should it be: jquery/javascript/jquery.validate.pack.js as this is the link for it. I know little js Code: <script src="../javascript/jquery.validate.pack.js" type="text/javascript"></script> <link href="../styles/mainstyle.css" rel="stylesheet" type="text/css" /> <link href="../styles/navigation.css" rel="stylesheet" type="text/css" /> <link href="../styles/layout.css" rel="stylesheet" type="text/css" /> <link href="http://fonts.googleapis.com/css?family=Cabin|Ubuntu" rel="stylesheet" type="text/css" /> <link href="../styles/form.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> $(document).ready(function(){ $("#contactform").validate(); }); </script> I would like top use this excellent script on my website, but I am not sure how to enhance the function of it. I mean I would like to use it for more than just one navigation menu. The script assigns the "current" id for the active link on the page through the "nav" menu. What needs to be added to, or modify if I would like to use it also for "nav2" on the same page? Thank you, Peter window.onload=function() { setPage(); } function extractPageName(hrefString) { var arr = hrefString.split('/'); return (arr.length < 2) ? hrefString : arr[arr.length-2].toLowerCase() + arr[arr.length-1].toLowerCase(); } function setActiveMenu(arr, crtPage) { for (var i=0; i < arr.length; i++) { if(extractPageName(arr[i].href) == crtPage) { if (arr[i].parentNode.tagName != "DIV") { arr[i].className = "current"; arr[i].parentNode.className = "current"; } } } } function setPage() { hrefString = document.location.href ? document.location.href : document.location; if (document.getElementById("nav") !=null ) setActiveMenu(document.getElementById("nav").getElementsByTagName("a"), extractPageName(hrefString)); } I was going around few websites and found this: abitofextra dot com their source encryption is different and i have never really seen one like this. any ideas how they encrypted the source?! i work as freelancer and would be a great help if i could encrypt my codes too. Hi there, I have a menu with 4 links and 4 images associated with them. By default, the image from link 1 is displayed on the page. I would like to change the image with its corresponding one, each time i mouseover one of the other three links. I'm trying to make the following code work unsuccesfully, i might be missing something. Any help will be appreciated. In the <head> section i have this: <script type="text/javascript"> img1 = new Image(); img1.src = "images/party/party.jpg"; img2 = new Image(); img2.src = "images/party/icecream.jpg"; img3 = new Image(); img3.src = "images/party/juice.jpg"; img4 = new Image(); img4.src = "images/party/videogames.jpg"; function change(num){ document.images["linkpic"].src = "img" + num } </script> </head> In the <body> i have: That's my default image <table> <tr> <td width="100"> <img src="images/party/balloon1.jpg" name="linkpic"> </td> <td width="260" valign="top" align="left"> <table> <tr><td><a href="Party1.html" onmouseover="change('1')">Party and Fun</a></td></tr> <tr><td><a href="Party2.html" onmouseover="change('2')">Icecream </a></td></tr> <tr><td><a href="Party3.html" onmouseover="change('3')">Juice </a></td></tr> <tr><td><a href="Party4.html" onmouseover="change('4')">Video Games </a></td></tr> </table> </tr> </table> </body> I would like when i point to Icecream, the picture on the left to change to the Icecream picture and so on. Any hints and help are appreciated! Thanks! I've been working on RSA encryption using javascript and php for quite some time but i'm not able to do it properly. i'm using the standard RSA.js,BigInt.js and Barrett.js javascript files for the javascript part but the thing that i have noticed is the public exponent is always 10001 or 3 . only then the function works. but the problem is the php file generates a comparatively larger public key exponent. if i use that in the javascript function it crashes. is there anyway out of this ?
can i write the encryption type in javascript?? i am writing like this in my javascript function, but not able to getting it work...... document.form_name.enctype ="multipart/form-data" I'm using a image of the day script and my pictures will not be located at the site where the code will be. Code: images[0] = "<img src='yourimage.jpg'>" Do I/can I use the link such as <a href="http://www.sample.com/mphases.htm"> right where (yourimage) is, in between the quotes to link to an offsite picture? Could someone retype this snippet of code showing how it would look for me? Thanks Hi, I've been looking for a client-side form validation script which will check each field before submitting the form. Can anyone point me to a good one that looks professional. I want it to make a nice presentation of any errors as well, perhaps, as showing a 'tick' sign when the field is correctly filled in . bazz I have a need of a Java Script function to encrypt passwords into Salted SHA in a format similar to the way LDAP stores it. Does anyone know if this has ever been done? Hello guys, You were all very kind to help me a few months ago when I was trying to create the code which is posted below. it is a table of banner ads that will rotate on my website and the appropriate link follows the appropraite ad when they rotate. everything is working fine except that when you click on one of the ads ( which is a link), the link works but the page displays an error at the bottom as soon as any link is clicked. Since this type of hyperlink is associated with the javascript, im not sure how to correct the issue. maybe it is a simple thing. can anyone take a look at this and help me figure out the issue? thanks. Code: <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>.</title> <script type="text/javascript"> var ImageArray = [ // add paths, if needed ['randoms/0.jpg','http://0.com'], ['randoms/1.jpg','http://1.com'], ['randoms/2.jpg','http://2.com'], ['randoms/3.jpg','http://3.com'], ['randoms/4.jpg','http://4.com'], ['randoms/5.jpg','http://5.com'], ['randoms/6.jpg','http://6.com'], ['randoms/7.jpg','http://7.com'], ['randoms/8.jpg','http://8.com'], ['randoms/9.jpg','http://9.com'], ['randoms/10.jpg','http://10.com'], ['randoms/11.jpg','http://11.com'], ['randoms/12.jpg','http://12.com'], ['randoms/13.jpg','http://13.com'], ['randoms/14.jpg','http://14.com'], ['randoms/15.jpg','http://15.com'] // No comma after last entry ]; function randOrd() { return (Math.round(Math.random())-0.5); } function ChangeImages() { var ImgPtr = new Array(); for (var i=0; i<ImageArray.length; i++) { ImgPtr[i] = i; } ImgPtr = ImgPtr.sort(randOrd); var tmp = ''; for (var i=0; i<ImgPtr.length; i++) { tmp = 'tImg'+i; document.getElementById(tmp).src = ImageArray[ImgPtr[i]][0]; document.getElementById(tmp).alt = ImageArray[ImgPtr[i]][1]; tmp = 'lImg'+i; document.getElementById(tmp).href = ImageArray[ImgPtr[i]][1]; } } var TimerAction = 0; function startTimer() { TimerAction = setInterval('ChangeImages()',3000); } function stopTimer() { clearTimeout(TimerAction); } </script> <style type="text/css">body { background-color: #000000; margin: 0; } </style></head> <body onLoad="startTimer();ChangeImages()" > <table width="250" border="0" cellpadding="0" id="ads"> <tr><td> <a href="" id="lImg0" onclick="return gotoLink(this.id,0)"target="_blank"> <img id="tImg0" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg1" onclick="return gotoLink(this.id,1)"target="_blank"> <img id="tImg1" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg2" onclick="return gotoLink(this.id,2)"target="_blank"> <img id="tImg2" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg3" onclick="return gotoLink(this.id,3)"target="_blank"> <img id="tImg3" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg4" onclick="return gotoLink(this.id,4)"target="_blank"> <img id="tImg4" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg5" onclick="return gotoLink(this.id,5)"target="_blank"> <img id="tImg5" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg6" onclick="return gotoLink(this.id,6)"target="_blank"> <img id="tImg6" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg7" onclick="return gotoLink(this.id,7)"target="_blank"> <img id="tImg7" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg8" onclick="return gotoLink(this.id,8)"target="_blank"> <img id="tImg8" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg9" onclick="return gotoLink(this.id,9)"target="_blank"> <img id="tImg9" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg10" onclick="return gotoLink(this.id,10)"target="_blank"> <img id="tImg10" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg11" onclick="return gotoLink(this.id,11)"target="_blank"> <img id="tImg11" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg12" onclick="return gotoLink(this.id,12)"target="_blank"> <img id="tImg12" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg13" onclick="return gotoLink(this.id,13)"target="_blank"> <img id="tImg13" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg14" onclick="return gotoLink(this.id,14)"target="_blank"> <img id="tImg14" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> <tr><td> <a href="" id="lImg15" onclick="return gotoLink(this.id,15)"target="_blank"> <img id="tImg15" src="" alt="" width="250" height="166"> </a> </td></tr> <tr> <td> </td> </tr> </table> </body> </html> Hi guys. I'm a mediocre website designer i know html , at JS i'm to noob to actualy make something of my own just Edit, i'm still learning and atm i'm working on a web project and I'm struggling to find a way to Filter email addresses to redirect my New Members to their e-mail provider, for example if they would register newmmember@hotmail.com to be forwarded to www.hotmail.com so they would login and activate their account, or if they enter @yahoo.com to be forwarded there . Can you please point out a few things i'm eager to learn how to Forward User to email provider after he creates his account . Or how can i forward email to URL inside my webpage , this could help me with another ideea i have, again this would have to be filtered @yahoo.com , @hotmail.com etc , to be forwarded to a local URL inside the site depending on what Email Provider they enter . I know this is a lot to ask but if you could point me out on the right path i would really appreciate all your help . Cheers
Hi, Im using the old nopcard scripts on my site. It does every thing right except it does not send a Email to my to my email adres. I dont know how to correct this because i dont know Javascript. I include the script if anybody know how to alter it so that it will send the info to my email adres as well. Thank you very much for your previous help. Kees Meyer Oudtshoorn South Africa. The checkout.pl script : #!/usr/bin/perl #=====================================================================|| # NOP Design JavaScript Shopping Cart || # PERL CGI Checkout Module || # || # For more information on SmartSystems, or how NOPDesign can help you || # Please visit us on the WWW at http://www.nopdesign.com || # || # Javascript portions of this shopping cart software are available as || # freeware from NOP Design. You must keep this comment unchanged in || # your code. For more information contact FreeCart@NopDesign.com. || # || # JavaScript Shop Module, V.4.4.0 || #=====================================================================|| # || # Function: Writes available form elements from the NOP || # Free Cart (http://www.nopdesign.com/freecart) || # and other form elements to an email file, and || # send user confirmation || # || #=====================================================================|| require 5.001; ######################################################################## # # # User defined variables: # # $header - string value containing the complete # # path of the HTML page header # # $footer - string value containing the complete # # path of the HTML page footer # # $mailprogram - string value containing the complete path to # # the sendmail binary on the system. # # $youremail - string value containing the email address to # # send catalog orders in EMAIL or BOTH modes # # **Don't forget to put a \ before the @ in your # # email address. ie. spam\@nopdesign.com*** # # $returnpage - URL to send user when checkout is complete # # $csvfilename - string value containing the complete # # path of the user database. # # $csvquote - string value containing what to use for quotes # # in the csv file (typically "" or \") # # $mode - string value containing 'EMAIL', 'FILE' or # # 'BOTH' to determine if the script should send # # an email to you with the new order, write the # # order to a CSV file, or do both. # ######################################################################## $header = "header.html"; $footer = "footer.html"; $mailprogram = "/usr/lib/sendmail -t"; $returnpage = "/"; $youremail = "support\@ebookstore.co.za"; $csvfilename = "orders.csv"; $csvquote = "\"\""; $mode = "BOTH"; #These are required fields. I recommend enforcing these by javascript, #but let's just make sure here as well. @required = ( 'b_first', 'b_last', 'b_addr', 'b_city', 'b_state', 'b_zip', 'b_phone', 'b_email' ); ############################################################## #FUNCTION: urlDecode # #RETURNS: The decoded string. # #PARAMETERS: An encoded string. # #PURPOSE: Decodes a URL encoded string. # ############################################################## sub urlDecode { my ($string) = @_; $string =~ tr/+/ /; $string =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex($1))/eg; $string =~ s/['"]/\'/g; return ($string); } ############################################################## #FUNCTION: processCGI # #RETURNS: # #PARAMETERS: # #PURPOSE: Retrieves form data submitted via the 'GET' # # method and decodes it. You may then access # # the passed in variables via calls to $[name] # # where [name] is the name of the form element. # ############################################################## sub processCGI { local ($cgiData, $key, $value, $pair, @pairs); if ($ENV{'REQUEST_METHOD'} eq 'GET') { $cgiData = $ENV{'QUERY_STRING'}; } else { $cgiData = <STDIN>; } @pairs = split (/&/, $cgiData); foreach $pair (@pairs) { ($key, $value) = split (/\=/, $pair); $key = &urlDecode($key); $value = &urlDecode($value); if(defined ${$key}){ ${$key} .= ", ".$value; }else{ ${$key} = $value; } } } ############################################################## #FUNCTION: doFormError # #RETURNS: # #PARAMETERS: A error message string. # #PURPOSE: Generates an HTML page indicating a form # # submission error occurred. # ############################################################## sub doFormError { my ($errString) = @_; open (HEAD, $header); @LINES = <HEAD>; close HEAD; print "Content-type: text/html\n\n"; print @LINES; print "<FONT SIZE=+2>The form you submitted was not complete.<BR><BR></FONT>"; print "$errString<BR><BR>\n"; print "<INPUT TYPE=BUTTON ONCLICK='history.back()' VALUE=' Return to the checkout page '><HR>"; open (FOOT, $footer); @LINES = <FOOT>; close FOOT; print @LINES; exit; } ############################################################## #FUNCTION: doError # #RETURNS: # #PARAMETERS: A error message string. # #PURPOSE: Generates an HTML page indicating an error # # occurred. # ############################################################## sub doError { my ($errString) = @_; print "Content-type: text/html\n\n"; open (HEAD, $header); @LINES = <HEAD>; close HEAD; print @LINES; print "$errString<BR><BR>\n"; open (FOOT, $footer); @LINES = <FOOT>; close FOOT; print @LINES; exit; } ############################################################## #FUNCTION: invalidE # #RETURNS: 1 if invalid, 0 if valid. # #PARAMETERS: An email address variable. # #PURPOSE: Checks to see if a submitted email address is # # of the valid form 'x@y'. # ############################################################## sub invalidE { my ($szEmail) = @_; my ($user, $host); $szEmail =~ tr/A-Z/a-z/; if ($szEmail =~ /\s/) { return 1; } ($user, $host) = split (/\@/, $szEmail); if ($host =~ /compuserve/i) { ; } else { if (! $user =~ /\D/) { return 1; } if (! $host =~ /\D/) { return 1; } if (substr ($user,0,1) !~ /[a-z]/) { return 1; } } if ($szEmail =~ /\w+\@[\w|\.]/) { return 0; } else { return 1; } } sub populateDateVar { (Taken out because Text to long for email) "===================================================================== \n"; print MAIL "$QUANTITY_1 \R$PRICE_1 $ID_1 - $NAME_1 $ADDTLINFO_1 \n"; if( $NAME_2 ) {print MAIL "$QUANTITY_2 \R$PRICE_2 $ID_2 - $NAME_2 $ADDTLINFO_2 \n";} if( $NAME_3 ) {print MAIL "$QUANTITY_3 \R$PRICE_3 $ID_3 - $NAME_3 $ADDTLINFO_3 \n";} if( $NAME_4 ) {print MAIL "$QUANTITY_4 \R$PRICE_4 $ID_4 - $NAME_4 $ADDTLINFO_4 \n";} if( $NAME_5 ) {print MAIL "$QUANTITY_5 \R$PRICE_5 $ID_5 - $NAME_5 $ADDTLINFO_5 \n";} if( $NAME_6 ) {print MAIL "$QUANTITY_6 \R$PRICE_6 $ID_6 - $NAME_6 $ADDTLINFO_6 \n";} if( $NAME_7 ) {print MAIL "$QUANTITY_7 \R$PRICE_7 $ID_7 - $NAME_7 $ADDTLINFO_7 \n";} if( $NAME_8 ) {print MAIL "$QUANTITY_8 \R$PRICE_8 $ID_8 - $NAME_8 $ADDTLINFO_8 \n";} if( $NAME_9 ) {print MAIL "$QUANTITY_9 \R$PRICE_9 $ID_9 - $NAME_9 $ADDTLINFO_9 \n";} if( $NAME_10 ){print MAIL "$QUANTITY_10 \R$PRICE_10 $ID_10 - $NAME_10 $ADDTLINFO_10 \n";} if( $NAME_11 ){print MAIL "$QUANTITY_11 \R$PRICE_11 $ID_11 - $NAME_11 $ADDTLINFO_11 \n";} if( $NAME_12 ){print MAIL "$QUANTITY_12 \R$PRICE_12 $ID_12 - $NAME_12 $ADDTLINFO_12 \n";} if( $NAME_13 ){print MAIL "$QUANTITY_13 \R$PRICE_13 $ID_13 - $NAME_13 $ADDTLINFO_13 \n";} print MAIL "===================================================================== \n"; print MAIL "SUBTOTAL: $SUBTOTAL \n"; print MAIL "TOTAL: $TOTAL \n"; print MAIL "\n"; print MAIL "\n\n"; print MAIL "Comments: \n"; print MAIL "--------- \n"; print MAIL "$comment \n"; print MAIL " \n"; close MAIL; } if( $mode eq "BOTH" || $mode eq "FILE") { $csvcomments = $comment; #$csvcomments =~ s/\"/$csvquote/ig; open (CSVF,">>$csvfilename"); print CSVF "\""; print CSVF "$months[$month] $day, $year $hour:$min:$sec"; print CSVF "\",\""; print CSVF "$b_first"; print CSVF "\",\""; print CSVF "$b_last"; print CSVF "\",\""; print CSVF "$b_addr"; print CSVF "\",\""; print CSVF "$b_addr2"; print CSVF "\",\""; print CSVF "$b_city"; print CSVF "\",\""; print CSVF "$b_state"; print CSVF "\",\""; print CSVF "$b_zip"; print CSVF "\",\""; print CSVF "$b_phone"; print CSVF "\",\""; print CSVF "$b_fax"; print CSVF "\",\""; print CSVF "$b_email"; print CSVF "\",\""; print CSVF "$s_first"; print CSVF "\",\""; print CSVF "$s_last"; print CSVF "\",\""; print CSVF "$s_addr"; print CSVF "\",\""; print CSVF "$s_addr2"; print CSVF "\",\""; print CSVF "$s_city"; print CSVF "\",\""; print CSVF "$s_state"; print CSVF "\",\""; print CSVF "$s_zip"; print CSVF "\",\""; print CSVF "$s_phone"; print CSVF "\",\""; print CSVF "$QUANTITY_1"; print CSVF "\",\""; print CSVF "\R$PRICE_1"; print CSVF "\",\""; print CSVF "$ID_1"; print CSVF "\",\""; print CSVF "$NAME_1"; print CSVF "\",\""; print CSVF "$ADDTLINFO_1"; print CSVF "\",\""; print CSVF "$QUANTITY_2"; print CSVF "\",\""; print CSVF "\R$PRICE_2"; print CSVF "\",\""; print CSVF "$ID_2"; print CSVF "\",\""; print CSVF "$NAME_2"; print CSVF "\",\""; print CSVF "$ADDTLINFO_2"; print CSVF "\",\""; print CSVF "$QUANTITY_3"; print CSVF "\",\""; print CSVF "\R$PRICE_3"; print CSVF "\",\""; print CSVF "$ID_3"; print CSVF "\",\""; print CSVF "$NAME_3"; print CSVF "\",\""; print CSVF "$ADDTLINFO_3"; print CSVF "\",\""; print CSVF "$QUANTITY_4"; print CSVF "\",\""; print CSVF "\R$PRICE_4"; print CSVF "\",\""; print CSVF "$ID_4"; print CSVF "\",\""; print CSVF "$NAME_4"; print CSVF "\",\""; print CSVF "$ADDTLINFO_4"; print CSVF "\",\""; print CSVF "$QUANTITY_5"; print CSVF "\",\""; print CSVF "\R$PRICE_5"; print CSVF "\",\""; print CSVF "$ID_5"; print CSVF "\",\""; print CSVF "$NAME_5"; print CSVF "\",\""; print CSVF "$ADDTLINFO_5"; print CSVF "\",\""; print CSVF "$QUANTITY_6"; print CSVF "\",\""; print CSVF "\R$PRICE_6"; print CSVF "\",\""; print CSVF "$ID_6"; print CSVF "\",\""; print CSVF "$NAME_6"; print CSVF "\",\""; print CSVF "$ADDTLINFO_6"; print CSVF "\",\""; print CSVF "$QUANTITY_7"; print CSVF "\",\""; print CSVF "\R$PRICE_7"; print CSVF "\",\""; print CSVF "$ID_7"; print CSVF "\",\""; print CSVF "$NAME_7"; print CSVF "\",\""; print CSVF "$ADDTLINFO_7"; print CSVF "\",\""; print CSVF "$QUANTITY_8"; print CSVF "\",\""; print CSVF "\R$PRICE_8"; print CSVF "\",\""; print CSVF "$ID_8"; print CSVF "\",\""; print CSVF "$NAME_8"; print CSVF "\",\""; print CSVF "$ADDTLINFO_8"; print CSVF "\",\""; print CSVF "$QUANTITY_9"; print CSVF "\",\""; print CSVF "\R$PRICE_9"; print CSVF "\",\""; print CSVF "$ID_9"; print CSVF "\",\""; print CSVF "$NAME_9"; print CSVF "\",\""; print CSVF "$ADDTLINFO_9"; print CSVF "\",\""; print CSVF "$QUANTITY_10"; print CSVF "\",\""; print CSVF "\R$PRICE_10"; print CSVF "\",\""; print CSVF "$ID_10"; print CSVF "\",\""; print CSVF "$NAME_10"; print CSVF "\",\""; print CSVF "$ADDTLINFO_10"; print CSVF "\",\""; print CSVF "$QUANTITY_11"; print CSVF "\",\""; print CSVF "\R$PRICE_11"; print CSVF "\",\""; print CSVF "$ID_11"; print CSVF "\",\""; print CSVF "$NAME_11"; print CSVF "\",\""; print CSVF "$ADDTLINFO_11"; print CSVF "\",\""; print CSVF "$QUANTITY_12"; print CSVF "\",\""; print CSVF "\R$PRICE_12"; print CSVF "\",\""; print CSVF "$ID_12"; print CSVF "\",\""; print CSVF "$NAME_12"; print CSVF "\",\""; print CSVF "$ADDTLINFO_12"; print CSVF "\",\""; print CSVF "$QUANTITY_13"; print CSVF "\",\""; print CSVF "\R$PRICE_13"; print CSVF "\",\""; print CSVF "$ID_13"; print CSVF "\",\""; print CSVF "$NAME_13"; print CSVF "\",\""; print CSVF "$ADDTLINFO_13"; print CSVF "\",\""; print CSVF "$SUBTOTAL"; print CSVF "\",\""; print CSVF "$TOTAL"; print CSVF "\",\""; print CSVF "$SHIPPING"; print CSVF "\",\""; print CSVF "$comment"; print CSVF "\"\n"; close CSVF; } # Send email conformation to the customer..... open (MAIL,"|$mailprogram"); print MAIL "To: $b_email\n"; print MAIL "From: $youremail\n"; print MAIL "Subject: Order Confirmation\n"; print MAIL "\n\n"; print MAIL "A new order has been received. A summary of this order appears below.\n"; print MAIL "\n"; print MAIL "Order Date: $months[$month] $day, $year $hour:$min:$sec \n"; print MAIL " \n"; print MAIL "Bill To: \n"; print MAIL "-------- \n"; print MAIL " $b_first $b_last \n"; print MAIL " $b_addr \n"; print MAIL " $b_addr2 \n"; print MAIL " $b_city, $b_state $b_zip \n"; print MAIL " $b_phone \n"; print MAIL " $b_fax \n"; print MAIL " $b_email \n"; print MAIL " \n"; print MAIL " \n"; print MAIL "-------- \n"; if ( $s_addr eq "" ) { print MAIL " Use Billing Address\n"; } else { print MAIL " $s_first $s_last \n"; print MAIL " $s_addr \n"; print MAIL " $s_addr2 \n"; print MAIL " $s_city, $s_state $s_zip \n"; print MAIL " $s_phone \n"; } print MAIL " \n"; print MAIL " \n"; print MAIL "Qty Price(\R) Product ID - Product Name\n"; print MAIL "===================================================================== \n"; print MAIL "$QUANTITY_1 \R$PRICE_1 $ID_1 - $NAME_1 $ADDTLINFO_1 \n"; if( $NAME_2 ) {print MAIL "$QUANTITY_2 \R$PRICE_2 $ID_2 - $NAME_2 $ADDTLINFO_2 \n";} if( $NAME_3 ) {print MAIL "$QUANTITY_3 \R$PRICE_3 $ID_3 - $NAME_3 $ADDTLINFO_3 \n";} if( $NAME_4 ) {print MAIL "$QUANTITY_4 \R$PRICE_4 $ID_4 - $NAME_4 $ADDTLINFO_4 \n";} if( $NAME_5 ) {print MAIL "$QUANTITY_5 \R$PRICE_5 $ID_5 - $NAME_5 $ADDTLINFO_5 \n";} if( $NAME_6 ) {print MAIL "$QUANTITY_6 \R$PRICE_6 $ID_6 - $NAME_6 $ADDTLINFO_6 \n";} if( $NAME_7 ) {print MAIL "$QUANTITY_7 \R$PRICE_7 $ID_7 - $NAME_7 $ADDTLINFO_7 \n";} if( $NAME_8 ) {print MAIL "$QUANTITY_8 \R$PRICE_8 $ID_8 - $NAME_8 $ADDTLINFO_8 \n";} if( $NAME_9 ) {print MAIL "$QUANTITY_9 \R$PRICE_9 $ID_9 - $NAME_9 $ADDTLINFO_9 \n";} if( $NAME_10 ){print MAIL "$QUANTITY_10 \R$PRICE_10 $ID_10 - $NAME_10 $ADDTLINFO_10 \n";} if( $NAME_11 ){print MAIL "$QUANTITY_11 \R$PRICE_11 $ID_11 - $NAME_11 $ADDTLINFO_11 \n";} if( $NAME_12 ){print MAIL "$QUANTITY_12 \R$PRICE_12 $ID_12 - $NAME_12 $ADDTLINFO_12 \n";} if( $NAME_13 ){print MAIL "$QUANTITY_13 \R$PRICE_13 $ID_13 - $NAME_13 $ADDTLINFO_13 \n";} print MAIL "===================================================================== \n"; print MAIL "SUBTOTAL: $SUBTOTAL \n"; print MAIL "TOTAL: $TOTAL \n"; print MAIL "\n"; print MAIL "\n\n"; print MAIL "Comments: \n"; print MAIL "--------- \n"; print MAIL "$comment \n"; print MAIL " \n"; close MAIL; print "Content-type: text/html\n\n"; open (HEAD, $header); @LINES = <HEAD>; close HEAD; print @LINES; print "<h2>Thank you</h2>"; print "Thank you for your order."; print "Please contact us at $youremail if you have any problems questions or concerns. Thank U again for your support Kees Meyer."; print "<P>"; print "<A HREF=\"$returnpage\" rel="nofollow" target=_top>Return Home</A>"; print "<P>"; open (FOOT, $footer); @LINES = <FOOT>; close FOOT; print @LINES; exit; |