home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 May / INTERNET103.ISO / pc / software / windows / building / php_nuke / html / modules / webmail / contactbook.php < prev    next >
Encoding:
PHP Script  |  2002-09-16  |  19.3 KB  |  396 lines

  1. <?php
  2.  
  3. /*************************************************************************/
  4.  #  Mailbox 0.9.2a   by Sivaprasad R.L (http://netlogger.net)             #
  5.  #  eMailBox 0.9.3   by Don Grabowski  (http://ecomjunk.com)              #
  6.  #          --  A pop3 client addon for phpnuked websites --              #
  7.  #                                                                        #
  8.  # This program is distributed in the hope that it will be useful,        #
  9.  # but WITHOUT ANY WARRANTY; without even the implied warranty of         #
  10.  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          #
  11.  # GNU General Public License for more details.                           #
  12.  #                                                                        #
  13.  # You should have received a copy of the GNU General Public License      #
  14.  # along with this program; if not, write to the Free Software            #
  15.  # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.              #
  16.  #                                                                        #
  17.  #             Copyright (C) by Sivaprasad R.L                            #
  18.  #            Script completed by Ecomjunk.com 2001                       #
  19. /*************************************************************************/
  20.  
  21. if(!$user) {
  22.     header ("Location: modules.php?name=Your_Account");
  23.     exit();
  24. }
  25.  
  26. require_once("mainfile.php");
  27. $module_name = basename(dirname(__FILE__));
  28. get_lang($module_name);
  29.  
  30. $pagetitle = "- "._ADDRESSBOOK."";
  31.  
  32. include ("header.php");
  33. include ("modules/$module_name/mailheader.php");
  34.  
  35. $nav_bar = "<p>[ <a href=\"modules.php?name=$module_name&file=contactbook&op=listall\">"._LISTALL."</a> | <a href=\"modules.php?name=$module_name&file=contactbook&op=addnew\">"._ADDNEW."</a> | <a href=\"modules.php?name=$module_name&file=contactbook&op=search\">"._SEARCH."</a> ]</p>";
  36. title(""._ADDRESSBOOK."<br>$nav_bar");
  37. $auser = base64_decode($user);
  38. $userdata = explode(":", $auser);
  39. $userid = $userdata[0];
  40.  
  41. if ($op=="addnew") {
  42.     addnew();
  43. } elseif ($op == "search") {
  44.     search();
  45. } elseif ($op == "view") {
  46.     view();
  47. } elseif ($op == "delete") {
  48.     del();
  49. } elseif ($op == "edit") {
  50.     edit();
  51. } else {
  52.    listall();
  53. }
  54.  
  55. include ("modules/$module_name/mailfooter.php");
  56.  
  57. function listall() {
  58.     global $userid, $cb_index, $imgpath, $prefix, $bgcolor1, $bgcolor2, $bgcolor3, $dbi, $email_send, $module_name;
  59.     OpenTable();
  60.     $countlimit = 20;
  61.     $query = "select * from ".$prefix."_contactbook where uid='$userid' order by firstname";
  62.     $res = sql_query($query, $dbi);
  63.     echo "<form name=\"listform\" method=\"post\" action=\"modules.php?name=$module_name&file=contactbook\">
  64.     <input type=\"hidden\" name=\"op\" value=\"delete\">
  65.     <table width=\"100%\" align=\"center\" border=\"0\"><tr bgcolor=\"$bgcolor2\"><td width=\"3%\" align=\"center\"><b>"._VIEW."</b></td><td width=\"3%\" align=\"center\"><b>"._EDIT."</b></td><td width=\"3%\"> </td><td width=\"28%\"><b>"._NAME."</b></td><td width=\"30%\"><b>"._EMAIL."</b></td><td width=\"15%\"><b>"._PHONERES."</b></td><td width=\"15%\"><b>"._PHONEWORK."</b></td></tr>";
  66.     $numrows = sql_num_rows($res, $dbi);
  67.     if($numrows == 0) {
  68.     echo "<tr><td colspan=\"7\" align=\"center\">"._NORECORDSFOUND."</td></tr>";
  69.     }
  70.     $color = "$bgcolor1";
  71.     $count = 0;
  72.     if(isset($cb_index)) {
  73.     $skipcount = $cb_index * $countlimit;
  74.         mysql_data_seek($res,$skipcount);
  75.     }
  76.     while($count < $countlimit && $row = sql_fetch_array($res, $dbi)) {
  77.     $contactid = $row[contactid];
  78.     $firstname = $row[firstname];
  79.         $lastname = $row[lastname];
  80.     $email = $row[email];
  81.     $homephone = $row[homephone];
  82.     $workphone = $row[workphone];
  83.     if ($email_send == 1) {
  84.         $esend = "modules.php?name=$module_name&file=compose&to=$email";
  85.     } else {
  86.         $esend = "mailto:$email";
  87.     }
  88.     echo "<tr bgcolor=\"$bgcolor2\"><td align=\"center\"><a href=\"modules.php?name=$module_name&file=contactbook&op=view&cid=$contactid\"><img src=\"$imgpath/view.gif\" alt=\""._VIEWPROFILE."\" title=\""._VIEWPROFILE."\" border=\"0\" width=\"16\" height=\"12\"></a></td><td align=\"center\"><a href=\"modules.php?name=$module_name&file=contactbook&op=edit&cid=$contactid\"><img src=\"$imgpath/edit.gif\" border=\"0\" alt=\""._EDITCONTACT."\" title=\""._EDITCONTACT."\" width=\"16\" height=\"16\"></a></td><td><input type=\"checkbox\" name=\"del[]\" value=\"$contactid\"></td><td>$firstname, $lastname</td><td><a href=\"$esend\">$email</a></td><td>$homephone</td><td>$workphone</td></tr>";
  89.     if($color == "$bgcolor1") {
  90.         $color = "$bgcolor2";
  91.     } else {
  92.         $color = "$bgcolor1";
  93.     }
  94.     $count++;
  95.     }
  96.     echo "</table><br><input type=\"submit\" name=\"deleteall\" value=\""._DELETESELECTED."\"></form>";
  97.     echo "<center>";
  98.     if($cb_index > 0) {
  99.     $ind = $cb_index-1;
  100.     echo "<a href=\"modules.php?name=$module_name&file=contactbook&op=listall&index=$ind\">½ "._PREVIOUS."</a>     ";
  101.     }
  102.     $limit = $numrows/$countlimit;
  103.     if($limit > 1) {
  104.     for($i=0; $i < $limit; $i++) {
  105.         $ind = $i+1;
  106.         if($cb_index == $i) echo "$ind ";
  107.             else echo "<a href=\"modules.php?name=$module_name&file=contactbook&op=listall&index=$i\">$ind</a> ";
  108.     }
  109.     }
  110.     echo "    ";
  111.     if (($skipcount + $count) < $numrows) {
  112.     $ind = $cb_index + 1;
  113.     echo "<a href=\"modules.php?name=$module_name&file=contactbook&op=listall&index=$ind\">"._NEXT." ╗</a></center>";
  114.     }
  115.     CloseTable();
  116. }
  117.  
  118. function addnew() {
  119.     global $userid, $save, $userid, $firstname, $lastname, $email, $company, $homeaddress, $homepage, $city, $bgcolor1, $bgcolor2, $bgcolor3, $prefix, $homephone, $workphone, $IM, $events, $reminders, $notes, $imgpath, $dbi, $module_name;
  120.     OpenTable();
  121.     if(isset($save)) {
  122.     $query = "insert into ".$prefix."_contactbook (uid,firstname,lastname,email,company,homeaddress,city,homepage,homephone,workphone,IM,events,reminders,notes) values($userid,'$firstname','$lastname','$email','$company','$homeaddress','$city','$homepage','$homephone','$workphone','$IM','$events','$reminders','$notes');";
  123.     $res = sql_query($query, $dbi);
  124.     listall();
  125.     } else {
  126.     echo "<form name=\"addnew\" method=\"post\" action=\"modules.php?name=$module_name&file=contactbook\">
  127.         <b>"._ADDNEWCONTACT."</b><br><br>
  128.         <table border=\"0\">
  129.         <tr><td width=\"25%\">"._FIRSTNAME.":</td><td><input type=\"text\" name=\"firstname\"></td></tr>
  130.         <tr><td>"._LASTNAME.":</td><td><input type=\"text\" name=\"lastname\"></td></tr>
  131.         <tr><td>"._EMAIL.":</td><td><input type=\"text\" name=\"email\"></td></tr>
  132.         <tr><td>"._PHONEWORK.":</td><td><input type=\"text\" name=\"homephone\"></td></tr>
  133.         <tr><td>"._PHONERES.":</td><td><input type=\"text\" name=\"workphone\"></td></tr>
  134.         <tr><td>"._ADDRESS.":</td><td><textarea name=\"address\" rows=\"4\" cols=\"25\"></textarea></td></tr>
  135.         <tr><td>"._CITY.":</td><td><input type=\"text\" name=\"city\"></td></tr>
  136.         <tr><td>"._COMPANY.":</td><td><input type=\"text\" name=\"company\" size=\"40\"></td></tr>
  137.         <tr><td>"._HOMEPAGE.":</td><td><input type=\"text\" name=\"homepage\" size=\"40\" value=\"http://\"></td></tr>
  138.         <tr><td><br><br></td></tr>
  139.         <tr><td valign=top>"._IMIDS."</td><td>"._IMIDSMSG."<br><textarea name=IM rows=4 cols=25>
  140. Yahoo: 
  141. MSN: 
  142. ICQ: 
  143. AIM: 
  144.         </textarea></td></tr>
  145.         <tr><td><br><br></td></tr>
  146.         <tr><td valign=top>"._RELATEDEVENTS.":</td><td>"._RELATEDEVENTSMSG."<br>
  147.         <textarea name=events rows=4 cols=40></textarea></td></tr>
  148.         <tr><td>"._REMINDME.":</td><td><input type=text name=reminders size=3 value=1> "._DAYSBEFORE."</td></tr>
  149.         <tr><td><br><br></td></tr>
  150.         <tr><td>"._NOTES.":</td><td><textarea name=notes rows=4 cols=40></textarea></td></tr></table>
  151.         <input type=hidden name=save value='true'>
  152.         <input type=hidden name=op value='addnew'>
  153.         <input type=submit name=add value=\""._SUBMIT."\"></form>";
  154.     }
  155.     CloseTable();
  156. }
  157.  
  158. function search() {
  159.     global $userid, $q, $searchdb, $searchfield, $cb_index, $bgcolor1, $bgcolor2, $bgcolor3, $imgpath, $prefix, $dbi, $module_name;
  160.     OpenTable();
  161.     echo "<center><b>"._SEARCHCONTACT."</b></center><br>";
  162.     echo "<form method=post action=\"modules.php?name=$module_name&file=contactbook\" name=searchform>
  163.     <input type=\"hidden\" name=\"op\" value=\"delete\">
  164.     <input type=hidden name=op value=search>
  165.     <table align=center><tr><Td>"._SEARCH.": </td><td><input type=text name=q value='$q'></td>
  166.     <td> "._IN." </td><td>
  167.     <select name=searchfield>
  168.     <option value='all'>"._ALL."</option>
  169.         <option value='firstname'>"._FIRSTNAME."</option>
  170.         <option value='lastname'>"._LASTNAME."</option>
  171.         <option value='email'>"._EMAIL."</option>
  172.         <option value='homeaddress'>"._ADDRESS."</option>
  173.     <option value='city'>"._CITY."</option>
  174.     <option value='company'>"._COMPANY."</option>
  175.     <option value='notes'>"._NOTES."</option>
  176.     </select>
  177.         </td><td> <input type=submit name=searchdb value='"._SEARCH."'></td></tr></table></form>";
  178.     if($searchdb == ""._SEARCH."") {
  179.     $query = "Select * from $prefix"._contactbook." where uid = $userid and ( ";
  180.     if($searchfield != "all") {
  181.         $words = explode(" ",$q);
  182.         foreach($words as $w) {
  183.         $condition = " ($searchfield like '%$w%') ||";
  184.         }
  185.         $condition = substr($condition,0,-2) . ")";
  186.     } else {
  187.         $searchfield = array ("firstname","lastname","email","homeaddress","city","company","notes");
  188.         foreach($searchfield as $sf) {
  189.         $words = explode(" ",$q);
  190.         foreach($words as $w) {
  191.             $condition .= " ($sf like '%$w%') ||";
  192.                 }
  193.             }
  194.         $condition = substr($condition,0,-2) . ")";
  195.     }
  196.     $query .= $condition;
  197.     $res = sql_query($query, $dbi);
  198.     $numrows = sql_num_rows($res, $dbi);
  199.     echo "<form method=post action=\"modules.php?name=$module_name&file=contactbook\" name=searchform>
  200.         <input type=\"hidden\" name=\"op\" value=\"delete\">";
  201.     echo "<Br><center>$numrows "._RESULTSFOUND."</center><br>
  202.         <table width=\"100%\" align=\"center\" border=\"0\"><tr bgcolor=\"$bgcolor2\"><td width=\"3%\" align=\"center\"><b>"._VIEW."</b></td><td width=\"3%\" align=\"center\"><b>"._EDIT."</b></td><td width=\"3%\"> </td><td width=\"28%\"><b>"._NAME."</b></td><td width=\"30%\"><b>"._EMAIL."</b></td><td width=\"15%\"><b>"._PHONERES."</b></td><td width=\"15%\"><b>"._PHONEWORK."</b></td></tr>";
  203.     $skipcount = 0; $count = 0; $countlimit = 20;
  204.     if(isset($cb_index)) {
  205.         $skipcount = $cb_index * $countlimit;
  206.         mysql_data_seek($res,$skipcount);
  207.     }
  208.     while($count < $countlimit && $row = sql_fetch_array($res, $dbi)) {
  209.         $contactid = $row[contactid];
  210.         $firstname = $row[firstname];
  211.             $lastname = $row[lastname];
  212.             $email = $row[email];
  213.             $homephone = $row[homephone];
  214.             $workphone = $row[workphone];
  215.             echo "<tr bgcolor=\"$bgcolor2\"><td align=\"center\"><a href=\"modules.php?name=$module_name&file=contactbook&op=view&cid=$contactid\"><img src=\"$imgpath/view.gif\" alt=\""._VIEWPROFILE."\" title=\""._VIEWPROFILE."\" border=\"0\" width=\"16\" height=\"12\"></a></td><td align=\"center\"><a href=\"modules.php?name=$module_name&file=contactbook&op=edit&cid=$contactid\"><img src=\"$imgpath/edit.gif\" border=\"0\" alt=\""._EDITCONTACT."\" title=\""._EDITCONTACT."\" width=\"16\" height=\"16\"></a></td><td><input type=\"checkbox\" name=\"del[]\" value=\"$contactid\"></td><td>$firstname, $lastname</td><td><a href=\"modules.php?name=$module_name&file=compose&to=$email\">$email</a></td><td>$homephone</td><td>$workphone</td></tr>";
  216.             if($color== "$bgcolor1") $color = "$bgcolor2"; else $color = "$bgcolor1";
  217.             $count++;
  218.     }
  219.     echo "</table><br><input type=\"submit\" name=\"deleteall\" value=\""._DELETESELECTED."\"></form>    ";
  220.     echo "<center>";
  221.     if($cb_index > 0) {
  222.         $ind = $cb_index-1;
  223.         echo "<a href='modules.php?name=$module_name&file=contactbook&op=search&index=$ind'>½ "._PREVIOUS."</a>     ";
  224.     }
  225.     $limit = $numrows/$countlimit;
  226.     if($limit > 1) {
  227.         for($i=0; $i < $limit; $i++) {
  228.         $ind = $i+1;
  229.         if($cb_index == $i) echo "$ind ";
  230.         else echo "<a href='modules.php?name=$module_name&file=contactbook&op=search&index=$i'>$ind</a> ";
  231.         }
  232.     }
  233.     echo "    ";
  234.     if(($skipcount + $count) < $numrows) {
  235.         $ind = $cb_index + 1;
  236.         echo "<a href='modules.php?name=$module_name&file=contactbook&op=search&index=$ind'>"._NEXT." ╗</a></center>";
  237.     }
  238.     }
  239.     CloseTable();
  240. }
  241.  
  242. function view() {
  243.     global $userid, $cid, $domain, $imgpath, $bgcolor1, $bgcolor2, $bgcolor3, $prefix, $dbi, $module_name;
  244.     OpenTable();
  245.     $query = "Select * from ".$prefix."_contactbook where uid='$userid' and contactid='$cid'";
  246.     $res = sql_query($query);
  247.     if(sql_num_rows($res, $dbi) == 0) {
  248.     echo "<center>"._NORECORDSFOUND."</center>";
  249.     }
  250.     if($row = sql_fetch_array($res, $dbi)) {
  251.     $contactid = $row[contactid];
  252.     $uid = $row[uid];
  253.     if($uid != $userid) {
  254.         echo "<center><b>Error : Permission Denied</b></center>";
  255.             return;
  256.     }
  257.     $firstname = $row[firstname];
  258.     $lastname = $row[lastname];
  259.     $email = $row[email];
  260.     $homephone = $row[homephone];
  261.         $workphone = $row[workphone];
  262.     $homeaddress = $row[homeaddress];
  263.         $city = $row[city];
  264.     $company = $row[company];
  265.         $homepage = $row[homepage];
  266.     $IM = $row[IM];
  267.         $events = $row[events];
  268.     $reminders = $row[reminders];
  269.         $notes = $row[notes];
  270.     }
  271.     if ($homepage == "" OR $homepage == "http://") {
  272.     $homepage = "";
  273.     } else {
  274.     $homepage = "<a href=\"$homepage\" target=\"new\">$homepage</a>";
  275.     }
  276.     if ($email != "") {
  277.     $email = "<a href=\"modules.php?name=$module_name&file=compose&to=$email\">$email</a>";
  278.     }
  279.     echo "<center><b>"._VIEWPROFILE."</b></center><br>
  280.     <table width=90% align=center>
  281.     <tr><td width=20%><b>"._FIRSTNAME.":</b></td><td>$firstname</td></tr>
  282.     <tr><td><b>"._LASTNAME.":</b></td><td>$lastname</td></tr>
  283.     <tr><td><b>"._EMAIL.":</b></td><td>$email</td></tr>
  284.     <tr><td><b>"._PHONEWORK.":</b></td><td>$homephone</td></tr>
  285.     <tr><td><b>"._PHONERES.":</b></td><td>$workphone</td></tr>
  286.     <tr><td><b>"._ADDRESS.":</b></td><td>$homeaddress</td></tr>
  287.     <tr><td><b>"._CITY.":</b></td><td>$city</td></tr>
  288.     <tr><td><b>"._COMPANY.":</b></td><td>$company</td></tr>
  289.     <tr><td><b>"._HOMEPAGE.":</b></td><td>$homepage</td></tr>
  290.     <tr><td colspan=2><hr width=100% noshade size=1></td></tr>
  291.     <tr><td valign=top colspan=2><b>"._IMIDS.":</b></td></tr>";
  292.     echo "<tr><td colspan=2><table width=80% align=center>";
  293.     $listim = explode("\n",$IM);
  294.     foreach($listim as $item) {
  295.     $array = explode(":",$item);
  296.     if ($array[1] != "") {
  297.             echo "<tr><td><b>$array[0]:</b></td><td width=100%>$array[1]</td></tr>";
  298.     }
  299.     }
  300.     echo "</table></td></tr>
  301.     <tr><td colspan=2><hr width=100% size=1 noshade></td></tr>
  302.     <tr><td colspan=2 valign=top><b>"._RELATEDEVENTS.":</b></td></tr>";
  303.     echo "<tr><td colspan=2><table width=80% align=center>";
  304.     $listevents = explode("\n",$events);
  305.     foreach($listevents as $ev) {
  306.     $array = explode(":",$ev);
  307.     if ($array[1] != "") {
  308.             echo "<tr><td><b>$array[0]:</b></td><td width=100%>$array[1]</td></tr>";
  309.     }
  310.     }
  311.     echo "</table></td></tr>
  312.     <tr><td colspan=2><hr width=100% size=1 noshade></td></tr>
  313.     <tr><td><b>"._NOTES.":</b></td><td>$notes</td></tr></table><br><br>";
  314.     CloseTable();
  315. }
  316.  
  317. function del() {
  318.     global $userid, $del, $prefix, $dbi;
  319.     if(is_array($del)) {
  320.     foreach ($del as $d) {
  321.         $q = "select * from ".$prefix."_contactbook where uid='$userid' and contactid='$d'";
  322.             $r = sql_query($q, $dbi);
  323.             if(sql_num_rows($r, $dbi) > 0) {
  324.             $query = "delete from ".$prefix."_contactbook where contactid='$d'";
  325.                 $res = sql_query($query, $dbi);
  326.             }
  327.     }
  328.     } else {
  329.         $q = "select * from ".$prefix."_contactbook where uid='$userid' and contactid='$del'";
  330.         $r = sql_query($q, $dbi);
  331.         if(sql_num_rows($r, $dbi) > 0) {
  332.             $query = "delete from ".$prefix."_contactbook where contactid='$del'";
  333.             $res = sql_query($query, $dbi);
  334.         }
  335.     }
  336.     listall();
  337. }
  338.  
  339. function edit() {
  340.     global $dbi, $userid, $cid, $save, $userid, $firstname, $lastname, $email, $company, $homeaddress, $homepage, $city, $homephone, $workphone, $IM, $events, $reminders, $notes, $bgcolor1, $bgcolor2, $bgcolor3, $imgpath, $prefix, $module_name;
  341.     OpenTable();
  342.     if($save == "true") {
  343.     $query = "update ".$prefix."_contactbook set firstname='$firstname', lastname='$lastname', email='$email', homephone = '$homephone', workphone ='$workphone', homeaddress= '$homeaddress', city = '$city', company = '$company', homepage= '$homepage',IM = '$IM', events = '$events', reminders = '$reminders',notes = '$notes' where contactid = $cid";
  344.     $res = sql_query($query, $dbi);
  345.     listall();
  346.     return;
  347.     }
  348.     $query = "Select * from ".$prefix."_contactbook where uid='$userid' and contactid='$cid'";
  349.     $res = sql_query($query, $dbi);
  350.     if($row = sql_fetch_array($res, $dbi)) {
  351.     $uid = $row[uid];
  352.     if($uid != $userid) {
  353.         echo "<center><b>Error: Permission Denied</b></center>";
  354.         return;
  355.     }
  356.     $firstname = $row[firstname];
  357.         $lastname = $row[lastname];
  358.         $email = $row[email];
  359.         $homephone = $row[homephone];
  360.         $workphone = $row[workphone];
  361.         $homeaddress = $row[homeaddress];
  362.         $city = $row[city];
  363.         $company = $row[company];
  364.         $homepage = $row[homepage];
  365.         $IM = $row[IM];
  366.         $events = $row[events];
  367.         $reminders = $row[reminders];
  368.         $notes = $row[notes];
  369.     }
  370.     echo "<form name=editform method=post action=\"modules.php?name=$module_name&file=contactbook\">
  371.     <b>"._EDITCONTACTS."</b></font><br><br>
  372.     <table border=0 width=90%>
  373.     <tr><td width=25%>"._FIRSTNAME.":</td><td><input type=text name=firstname value='$firstname'></td></tr>
  374.     <tr><td>"._LASTNAME.":</td><td><input type=text name=lastname value='$lastname'></td></tr>
  375.     <tr><td>"._EMAIL.":</td><td><input type=text name=email value='$email'></td></tr>
  376.     <tr><td>"._PHONEWORK.":</td><td><input type=text name=homephone value='$homephone'></td></tr>
  377.     <tr><td>"._PHONERES.":</td><td><input type=text name=workphone value='$workphone'></td></tr>
  378.     <tr><td>"._ADDRESS.":</td><td><textarea name=homeaddress rows=4 cols=25>$homeaddress</textarea></td></tr>
  379.     <tr><td>"._CITY.":</td><td><input type=text name=city value='$city'></td></tr>
  380.     <tr><td>"._COMPANY.":</td><td><input type=text name=company size=40 value='$company'></td></tr>
  381.     <tr><td>"._HOMEPAGE.":</td><td><input type=text name=homepage size=40 value='$homepage'></td></tr>
  382.     <tr><td><br><br></td></tr>
  383.     <tr><td valign=top>"._IMIDS.":</td><td>"._IMIDSMSG."<br><textarea name=IM rows=4 cols=25>$IM</textarea></td></tr>
  384.     <tr><td colspan=2><br><br></td></tr>
  385.     <tr><td valign=top>"._RELATEDEVENTS.":</td><td>"._RELATEDEVENTSMSG."<br><textarea name=events rows=4 cols=40>$events</textarea></td></tr>
  386.     <tr><td>"._REMINDME.":</td><td><input type=text name=reminders value='$reminders'size=3 value=1> "._DAYSBEFORE."</td></tr>
  387.     <tr><td><br><br></td></tr>
  388.     <tr><td>"._NOTES.":</td><td><textarea name=notes rows=4 cols=40>$notes</textarea></td></tr></table>
  389.     <input type=hidden name=save value='true'>
  390.     <input type=hidden name=op value='edit'>
  391.     <input type=hidden name=cid value='$cid'>
  392.     <input type=submit name=add value=\""._SUBMIT."\"></form>";
  393.     CloseTable();
  394. }
  395.  
  396. ?>