home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Komunik / sambar / sambar51p.exe / sysuser / webmail / replyto.stm < prev    next >
Encoding:
Text File  |  2002-03-01  |  8.9 KB  |  272 lines

  1. <RCif RCEloggedin ! true>
  2.     <HTML>
  3.     <HEAD>
  4.     <META HTTP-EQUIV="REFRESH" CONTENT="1; URL=index.htm"> 
  5.     </HEAD>
  6.     <BODY>
  7.     <FONT SIZE=+2 COLOR=#ff0000><B>Mail user not logged in!</B></FONT>
  8.     </BODY>
  9.     </HTML>
  10. <RCexit>
  11. <RCendif>
  12.  
  13. <RCXmailverify>
  14. <HTML>
  15. <HEAD>
  16. <TITLE>Mail to <RC$to></TITLE>
  17. <LINK REL="StyleSheet" HREF="<RCShome>/default.css" type="text/css">
  18.  
  19. <SCRIPT language="JavaScript">
  20. <!--
  21. function Form_Validator(theForm)
  22. {
  23.     if (theForm.to.value == "")
  24.     {
  25.         alert("Please enter a value for the \"To\" field.");
  26.         theForm.to.focus();
  27.         return (false);
  28.     }
  29.  
  30.     if (theForm.from.value == "")
  31.     {
  32.         alert("Please enter a value for the \"From\" field.");
  33.         theForm.to.focus();
  34.         return (false);
  35.     }
  36. }
  37.  
  38. var VAppend = '</TEXTAREA><BR><INPUT TYPE=text NAME=codeword Value="codeword" SIZE=40 MAXLENGTH=40><INPUT TYPE=button value="Decode" onClick="preTime(codeword.value,body.value,1);"></FORM></BODY></HTML>';
  39.  
  40. var VPrepend = '<HTML><BODY><SCRIPT LANGUAGE="JavaScript">var TID = 0; var longer = 0; var thirdwrite = ""; var alp = new Array("0@","1#","2$","3%","4^","5&","6*","7 = ","8-","9+","Aa","Bb","Cc","Dd","Ee","Ff","Gg","Hh","Ii","Jj","Kk","Ll","Mm","Nn","Oo","Pp","Qq","Rr","Ss","Tt","Uu","Vv","Ww","Xx","Yy","Zz"); function preTime(coco, uinput, qn) { longer = coco.length - 1; pl = 0; ref = 0 ; swr = ""; fwr = ""; twr = ""; code1(coco, uinput, longer, qn); } function findshift(letter) { for (i = 0; i < 36; i++) { if ((alp[i].substring(0,1) == letter) || (alp[i].substring(1,2) == letter)) { if (alp[i].substring(0,1) == letter) { x = 0; } if (alp[i].substring(1,2) == letter) { x = 1; } return i; }}} function check(letter) { bill = "no"; for (i = 0; i < 36; i++) { if ((alp[i].substring(0,1) == letter) || (alp[i].substring(1,2) == letter)) { bill = "yes"; }} if (bill == "yes") { return true; } else { return false; }} function fixoffset(takin) { if (takin > 35) { return (takin - 36); } else { return takin; }} function code1(inval1,inval2,inval3,sage) { if (check(inval2.charAt(pl))) { if (check(inval1.charAt(ref))) { if (sage == 0) { shift = findshift(inval1.charAt(ref)); } if (sage == 1) { shift = 36 - findshift(inval1.charAt(ref)); }} else { shift = 0; } orig = findshift(inval2.charAt(pl)); fwr = fwr+alp[fixoffset(orig+shift)].charAt(x); } else { fwr = fwr+inval2.charAt(pl); } swr = inval2.substring(pl+1,inval2.length+1); twr = fwr+swr; document.mailForm.body.value = twr; pl++; if (ref == inval3) { ref = 0 } else { ref++; } if (pl == (inval2.length)) { window.clearTimeout(TID); return false; } one = inval1; two = inval2; three = inval3; goer = sage; TID = window.setTimeout("code1(one, two, three, goer)", 0); } </SCRIPT><BODY> <FORM name="mailForm"><TEXTAREA NAME="body" ROWS="15" COLS="72" wrap="soft">';
  41.  
  42.  
  43.  
  44. var TID = 0;
  45. var longer = 0;
  46. var thirdwrite = "";
  47. var alphabet = new Array("0@","1#","2$","3%","4^","5&","6*","7 = ","8-","9+","Aa","Bb","Cc","Dd","Ee","Ff","Gg","Hh","Ii","Jj","Kk","Ll","Mm","Nn","Oo","Pp","Qq","Rr","Ss","Tt","Uu","Vv","Ww","Xx","Yy","Zz");
  48. function preTime(coco, uinput, question) 
  49. {
  50.     longer = coco.length - 1;
  51.     placement = 0;
  52.     ref = 0 ;
  53.     secondWrite = "";
  54.     firstWrite = "";
  55.     thirdWrite = "";
  56.     code1(coco, uinput, longer, question);
  57.     if (question == 0)
  58.     {
  59.         document.mailForm.prepend.value = VPrepend;
  60.         document.mailForm.append.value = VAppend;
  61.     }
  62.     else
  63.     {
  64.         document.mailForm.prepend.value = "";
  65.         document.mailForm.append.value = "";
  66.     }
  67. }
  68. function findshift(letter) 
  69. {
  70.     for (i = 0; i < 36; i++) 
  71.     {
  72.         if ((alphabet[i].substring(0,1) == letter) || (alphabet[i].substring(1,2) == letter)) 
  73.         {
  74.             if (alphabet[i].substring(0,1) == letter) 
  75.             {
  76.                 x = 0;
  77.             }
  78.             if (alphabet[i].substring(1,2) == letter) 
  79.             {
  80.                 x = 1;
  81.             }
  82.             return i;
  83.               }
  84.        }
  85. }
  86. function check(letter) 
  87. {
  88.     bill = "no";
  89.     for (i = 0; i < 36; i++) 
  90.     {
  91.         if ((alphabet[i].substring(0,1) == letter) || (alphabet[i].substring(1,2) == letter)) 
  92.         {
  93.             bill = "yes";
  94.            }
  95.     }
  96.     if (bill == "yes") 
  97.     {
  98.         return true;
  99.     }
  100.     else 
  101.     {
  102.         return false;
  103.     }
  104. }
  105. function fixoffset(takin) 
  106. {
  107.     if (takin > 35) 
  108.     {
  109.         return (takin - 36);
  110.     }
  111.     else 
  112.     {
  113.         return takin;
  114.        }
  115. }
  116. function code1(inval1,inval2,inval3,sage) 
  117. {
  118.     if (check(inval2.charAt(placement))) 
  119.     {
  120.         if (check(inval1.charAt(ref))) 
  121.         {
  122.             if (sage == 0) 
  123.             {
  124.                 shift = findshift(inval1.charAt(ref));
  125.             }
  126.             if (sage == 1) 
  127.             { 
  128.                 shift = 36 - findshift(inval1.charAt(ref));
  129.                }
  130.         }
  131.         else 
  132.         {
  133.             shift = 0;
  134.         }
  135.         orig = findshift(inval2.charAt(placement));
  136.         firstWrite = firstWrite+alphabet[fixoffset(orig+shift)].charAt(x);
  137.     }
  138.     else 
  139.     {
  140.         firstWrite = firstWrite+inval2.charAt(placement);
  141.     }
  142.     secondWrite = inval2.substring(placement+1,inval2.length+1);
  143.     thirdWrite = firstWrite+secondWrite;
  144.     document.mailForm.body.value = thirdWrite;
  145.     placement++;
  146.     if (ref == inval3) 
  147.     {
  148.         ref = 0
  149.     }
  150.     else 
  151.     {
  152.         ref++;
  153.     }
  154.     if (placement == (inval2.length)) 
  155.     {
  156.         window.clearTimeout(TID);
  157.         return false;
  158.     }
  159.     one = inval1;
  160.     two = inval2;
  161.     three = inval3;
  162.     goer = sage;
  163.     TID = window.setTimeout("code1(one, two, three, goer)", 0);
  164. }
  165. //-->
  166. </SCRIPT>
  167. </HEAD>
  168. <BODY BGCOLOR="#ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" onLoad="document.mailForm.body.focus()">
  169. <RCinclude RCShome/actions.stm>
  170. <table width=600>
  171.  <tr bgcolor="#336699" valign=top>
  172.   <TD WIDTH=80% class="folderlist" valign="top">
  173.     <FORM ENCTYPE="multipart/form-data" NAME=mailForm ACTION="sendmail.stm" METHOD="POST" onsubmit="return Form_Validator(this)">
  174.     <INPUT TYPE=hidden NAME="RCpage" VALUE="<RCShome>/webmail.stm">
  175.     <INPUT TYPE=hidden NAME="start" VALUE="<RC$start>">
  176.     <INPUT TYPE=hidden NAME="prepend">
  177.     <INPUT TYPE=hidden NAME="append">
  178.     <INPUT TYPE=hidden NAME="count" VALUE="25">
  179.     <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
  180.     <TR>
  181.         <TD align="right" class="lblmailto" valign="top">
  182.           <a href="#" onclick="window.addrField=document.mailForm.to;addr=window.open('<RCShome>/addrs.stm','addr','WIDTH=450,HEIGHT=275')">To</a></TD>
  183.         <TD width=395 class="lblmailto">
  184.             <!--- With reply(toall) the to field is filled in --->
  185.             <RCif RC$to_hdquot ! -1 AND RC$to_hsquot ! -1>
  186.                 <!--- Both a single and a double quote. Resort to a textarea --->
  187.             <TEXTAREA cols=60 rows=2 name="to" wrap="soft"><RC$to></textarea>
  188.             <RCelse>
  189.                 <!--- Not both quotes, so determin the quotemark to use --->
  190.                 <RCif RC$to_hdquot ! -1>
  191.                     <!--- A double quote, so use a single --->
  192.             <INPUT TYPE="text" NAME="to" VALUE='<RC$to>' SIZE="60" MAXLENGTH="300" onChange="updateHeader(this.value)">
  193.                 <RCelse>
  194.                     <!--- A single quote, so use a double --->
  195.             <INPUT TYPE="text" NAME="to" VALUE="<RC$to>" SIZE="60" MAXLENGTH="300" onChange="updateHeader(this.value)">
  196.                 <RCendif>
  197.             <RCendif>
  198.         </TD>
  199.     </TR>
  200.     
  201.     <TR>
  202.         <TD align="right" class="lblmailto" class="lblmailto">From </TD>                                                     
  203.         <TD class="lblmailto">
  204.             <RCif RCEusername ~ *@*>
  205.             <INPUT TYPE="text" NAME="from" VALUE=""<RCPname>" <<RCEusername>>" SIZE="78" MAXLENGTH="300"><BR>
  206.             <RCelse>
  207.             <INPUT TYPE="text" NAME="from" VALUE=""<RCPname>" <<RCEusername>@<RCEmailname>>" SIZE="78" MAXLENGTH="300"><BR>
  208.             <RCendif>
  209.         </TD>
  210.     </TR>
  211.  
  212.     <TR>
  213.         <TD align="right" class="lblmailto">
  214.           <a href="#" onclick="window.addrField=document.mailForm.cc;addr=window.open('<RCShome>/addrs.stm','addr','WIDTH=450,HEIGHT=275')">
  215.                CC</a>
  216.         </TD>
  217.         <TD width=395 class="lblmailto">
  218.         <INPUT TYPE="text" NAME="cc" VALUE='<RC$cc>' SIZE="78" MAXLENGTH="400">
  219.       </TD>
  220.     </TR>
  221.  
  222.     <TR>
  223.         <TD align="right" class="lblmailto">
  224.           <a href="#" onclick="window.addrField=document.mailForm.bcc;addr=window.open('<RCShome>/addrs.stm','addr','WIDTH=450,HEIGHT=275')">
  225.                BCC</a>
  226.         </TD>
  227.         <TD width=395 class="lblmailto">
  228.         <INPUT TYPE="text" NAME="bcc" value="" SIZE="78" MAXLENGTH="400">
  229.       </TD>
  230.     </TR>
  231.  
  232.     <TR>
  233.         <TD align="right" class="lblmailto" valign="top">Subject </TD>
  234.         <TD align="left" class="lblmailto" valign="top">
  235.           <RCif RC$subj ~ RE:* or RC$subj ~ FW:*>
  236.           <INPUT TYPE="text" NAME="subj" VALUE="<RC$subj>" SIZE="78" MAXLENGTH="300">
  237.         <RCelse>
  238.           <INPUT TYPE="text" NAME="subj" VALUE="RE: <RC$subj>" SIZE="78" MAXLENGTH="300">
  239.         <RCendif>
  240.     <INPUT TYPE="checkbox" NAME="sentbcc" checked><FONT size=-2>Save copy to "sent" folder.</FONT>
  241.         </TD>
  242.     </TR>
  243.  
  244. <tr bgcolor="#336699">
  245. <TD colspan="2" bgcolor="#336699">
  246. <TEXTAREA NAME="body" ROWS="20" COLS="70" wrap="<RC$wrap>">
  247.  
  248.  
  249. On <RC@txt2html(RC$date)>, <RC@txt2html(RC$from)> wrote:
  250. <RCXmailbody folder=RCSfolder msgno=RC$msgno style=RCSstyle textonly=true prepend="> ">
  251. </TEXTAREA>
  252. </TD>
  253. </TR>
  254.     <TR>
  255.     <TD VALIGN=TOP ALIGN=RIGHT class="lblmailto"><B>Attachment</B></TD>
  256.     <TD VALIGN=TOP class="lblmailto">
  257.     <input name="attach" type="file" size="46" value="">
  258.     <BR>
  259.     <FONT SIZE=-1><I>(<RCEmaxcontent> Byte Limit)</I></FONT>
  260.     <BR>
  261.     </TD>
  262.     </TR>
  263.     </TABLE>
  264.     </CENTER>
  265. </TD>
  266. </TR>
  267. </TABLE>
  268.     <INPUT TYPE="SUBMIT" NAME="send" VALUE="Send Message">
  269.     </FORM>
  270. </BODY>
  271. </HTML>
  272.