home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / configuration / account / profile.inc < prev    next >
Text File  |  2004-03-08  |  8KB  |  252 lines

  1. <?php
  2. /*
  3. Copyright Intermesh 2003
  4. Author: Merijn Schering <mschering@intermesh.nl>
  5. Version: 1.0 Release date: 08 July 2003
  6.  
  7. This program is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2 of the License, or (at your
  10. option) any later version.
  11. */
  12.  
  13. if (!$profile)
  14. {
  15.     echo "<p class=\"Error\">".$strDataError."</p>";
  16. }
  17. ?>
  18.  
  19. <table border="0" cellpadding="2" cellspacing="0">
  20.  
  21. <tr heigth="25">
  22.     <td colspan="2"><?php if (isset($feedback)) echo $feedback; ?>
  23.     <br />
  24.     <?php echo $acProfileText; ?><br /><br />
  25.     </td>
  26. </tr>
  27. <tr>
  28.     <td valign="top">
  29.     <table border="0" class="normal" cellpadding="2" cellspacing="0">
  30.  
  31.     <?php
  32.     if (isset($val->error["name"]))
  33.     {
  34.     ?>
  35.     <tr>
  36.         <td class="Error" colspan="2">
  37.             <?php echo $val->error["name"]; ?>
  38.         </td>
  39.     </tr>
  40.     <?php } ?>
  41.     <tr heigth="25">
  42.         <td align="right" nowrap><?php echo $strFirstName; ?>*: </td>
  43.         <td width="100%"><input type="text" class="textbox"  name="first_name" size="30" maxlength="50" value="<?php echo $profile["first_name"]; ?>"></td>
  44.     </tr>
  45.     <tr heigth="25">
  46.         <td align="right" nowrap><?php echo $strMiddleName; ?>: </td>
  47.         <td width="100%"><input type="text" class="textbox"  name="middle_name" size="30" maxlength="50" value="<?php echo $profile["middle_name"]; ?>"></td>
  48.     </tr>
  49.     <tr heigth="25">
  50.         <td align="right" nowrap><?php echo $strLastName; ?>*: </td>
  51.         <td width="100%"><input type="text" class="textbox"  name="last_name" size="30" maxlength="50" value="<?php echo $profile["last_name"]; ?>"></td>
  52.     </tr>
  53.     <tr heigth="25">
  54.             <td align="right" nowrap><?php echo $strTitle; ?> / <?php echo $strInitials; ?>: </td>
  55.             <td width="100%"><input type="text" class="textbox"  name="title" size="11" maxlength="12" value="<?php echo $profile['title']; ?>"> / <input type="text" class="textbox"  name="initials" size="11" maxlength="50" value="<?php echo $profile['initials']; ?>"></td>
  56.     </tr>
  57.     <tr>
  58.         <td align="right" nowrap><?php echo $strSex; ?>:</td>
  59.         <td>
  60.         <?php
  61.         $radiolist = new radio_list('sex', $profile['sex']);
  62.         $radiolist->add_option('M', 'M', $strSexes['M']);
  63.         echo ' ';
  64.         $radiolist->add_option('F', 'F', $strSexes['F']);
  65.         ?>
  66.         </td>
  67.     </tr>
  68.     <tr>
  69.         <td align="right" nowrap><?php echo $strBirthday; ?>:</td>
  70.         <td>
  71.         <?php
  72.         $birthday = db_date_to_date($profile['birthday']);
  73.         $datepicker->print_date_picker('birthday', $_SESSION['GO_SESSION']['date_format'], $birthday);
  74.         ?>
  75.         </td>
  76.     </tr>
  77.     <tr><td colspan="2"> </td></tr>
  78.     <tr heigth="25">
  79.         <td align="right" nowrap><?php echo $strAddress; ?>: </td>
  80.         <td width="100%"><input type="text" class="textbox"  name="address" size="30" maxlength="50" value="<?php echo $profile["address"]; ?>"></td>
  81.     </tr>
  82.  
  83.     <tr heigth="25">
  84.         <td align="right" nowrap><?php echo $strZip; ?>: </td>
  85.         <td width="100%"><input type="text" class="textbox"  name="zip" size="30" maxlength="20" value="<?php echo $profile["zip"]; ?>"></td>
  86.     </tr>
  87.     <tr heigth="25">
  88.         <td align="right" nowrap><?php echo $strCity; ?>: </td>
  89.         <td width="100%"><input type="text" class="textbox"  name="city" size="30" maxlength="50" value="<?php echo $profile["city"]; ?>">        </td>
  90.     </tr>
  91.     <tr heigth="25">
  92.         <td align="right" nowrap><?php echo $strState; ?>: </td>
  93.         <td width="100%"><input type="text" class="textbox"  name="state" size="30" maxlength="30" value="<?php echo $profile["state"]; ?>"></td>
  94.     </tr>
  95.  
  96.     <tr heigth="25">
  97.         <td align="right" nowrap><?php echo $strCountry; ?>: </td>
  98.         <td width="100%"><input type="text" class="textbox"  name="country" size="30" maxlength="30" value="<?php echo $profile["country"]; ?>"></td>
  99.     </tr>
  100.     <tr><td colspan="2"> </td></tr>
  101.     <?php
  102.     if (isset($val->error["email"]))
  103.     {
  104.     ?>
  105.     <tr>
  106.         <td class="Error" colspan="2">
  107.             <?php echo $val->error["email"]; ?>
  108.         </td>
  109.     </tr>
  110.     <?php } ?>
  111.  
  112.     <tr heigth="25">
  113.         <td align="right" nowrap><?php echo $strEmail; ?>*: </td>
  114.         <td><input type="text" class="textbox"  name="email" size="30" value="<?php echo $profile["email"]; ?>" maxlength="50"></td>
  115.     </tr>
  116.  
  117.     <tr heigth="25">
  118.         <td align="right" nowrap><?php echo $strPhone; ?>: </td>
  119.         <td><input type="text" class="textbox"  name="home_phone" size="30" value="<?php echo $profile["home_phone"]; ?>" maxlength="20"></td>
  120.     </tr>
  121.  
  122.     <tr heigth="25">
  123.         <td align="right" nowrap><?php echo $strFax; ?>: </td>
  124.         <td><input type="text" class="textbox"  name="fax" size="30" value="<?php echo $profile["fax"]; ?>" maxlength="20"></td>
  125.     </tr>
  126.  
  127.     <tr heigth="25">
  128.         <td align="right" nowrap><?php echo $strCellular; ?>: </td>
  129.         <td><input type="text" class="textbox"  name="cellular" size="30" value="<?php echo $profile["cellular"]; ?>" maxlength="20"></td>
  130.     </tr>
  131.  
  132.  
  133.     </table>
  134.     </td>
  135.     <td valign="top">
  136.     <table border="0" class="normal" cellpadding="2" cellspacing="0">
  137.  
  138.     <tr heigth="25">
  139.         <td align="right" nowrap><?php echo $strCompany; ?>: </td>
  140.         <td><input type="text" class="textbox"  name="company" size="30" value="<?php echo $profile["company"]; ?>" maxlength="50"></td>
  141.     </tr>
  142.     <tr heigth="25">
  143.         <td align="right" nowrap><?php echo $strDepartment; ?>: </td>
  144.         <td><input type="text" class="textbox"  name="department" size="30" value="<?php echo $profile["department"]; ?>" maxlength="50"></td>
  145.     </tr>
  146.  
  147.     <tr heigth="25">
  148.         <td align="right" nowrap><?php echo $strFunction; ?>: </td>
  149.         <td><input type="text" class="textbox" name="function" size="30" value="<?php echo $profile["function"]; ?>" maxlength="50"></td>
  150.     </tr>
  151.     <tr><td colspan="2"> </td></tr>
  152.     <tr>
  153.         <td align="right" nowrap>
  154.         <?php echo $strAddress; ?>: 
  155.         </td>
  156.         <td>
  157.         <input type="text" class="textbox"  name="work_address" size="30" value="<?php echo $profile["work_address"]; ?>" maxlength="100">
  158.         </td>
  159.     </tr>
  160.  
  161.     <tr>
  162.         <td align="right" nowrap>
  163.         <?php echo $strZip; ?>: 
  164.         </td>
  165.         <td>
  166.         <input type="text" class="textbox"  name="work_zip" size="30" value="<?php echo $profile["work_zip"]; ?>" maxlength="20">
  167.         </td>
  168.     </tr>
  169.     <tr>
  170.         <td align="right" nowrap>
  171.         <?php echo $strCity; ?>: 
  172.         </td>
  173.         <td>
  174.         <input type="text" class="textbox"  name="work_city" size="30" value="<?php echo $profile["work_city"]; ?>" maxlength="50">
  175.         </td>
  176.     </tr>
  177.  
  178.  
  179.     <tr>
  180.         <td align="right" nowrap>
  181.         <?php echo $strState; ?>: 
  182.         </td>
  183.         <td>
  184.         <input type="text" class="textbox"  name="work_state" size="30" value="<?php echo $profile["work_state"]; ?>" maxlength="50">
  185.         </td>
  186.     </tr>
  187.  
  188.     <tr>
  189.         <td align="right" nowrap>
  190.         <?php echo $strCountry; ?>: 
  191.         </td>
  192.         <td>
  193.         <input type="text" class="textbox"  name="work_country" size="30" value="<?php echo $profile["work_country"]; ?>" maxlength="50">
  194.         </td>
  195.     </tr>
  196.     <tr><td colspan="2"> </td></tr>
  197.     <tr>
  198.         <td align="right" nowrap>
  199.         <?php echo $strPhone; ?>: 
  200.         </td>
  201.         <td>
  202.         <input type="text" class="textbox"  name="work_phone" size="30" value="<?php echo $profile["work_phone"]; ?>" maxlength="20">
  203.         </td>
  204.     </tr>
  205.     <tr>
  206.         <td align="right" nowrap>
  207.         <?php echo $strFax; ?>: 
  208.         </td>
  209.         <td>
  210.         <input type="text" class="textbox"  name="work_fax" size="30" value="<?php echo $profile["work_fax"]; ?>" maxlength="20">
  211.         </td>
  212.     </tr>
  213.     <tr>
  214.         <td align="right" nowrap>
  215.         <?php echo $strHomepage; ?>: 
  216.         </td>
  217.         <td>
  218.         <input type="text" class="textbox"  name="homepage" size="30" value="<?php echo $profile["homepage"] ?>" maxlength="100">
  219.         </td>
  220.     </tr>
  221.  
  222.  
  223.     </table>
  224.  
  225.     </td>
  226. </tr>
  227. <tr heigth="25">
  228.     <td colspan="2">
  229.     <?php
  230.     $button = new button($cmdOk, "javascript:_save('save_profile', 'true')");
  231.     if ($_SESSION['GO_SESSION']['first_name'] != '' && $_SESSION['GO_SESSION']['last_name'] != '' && $_SESSION['GO_SESSION']['email'] != '')
  232.     {
  233.         echo '  ';
  234.         $button = new button($cmdApply, "javascript:_save('save_profile', 'false')");
  235.         echo '  ';
  236.         $button = new button($cmdClose, "javascript:document.location='".$return_to ."'");
  237.     }else
  238.     {
  239.         echo '<input type="hidden" name="load_frames" value="true" />';
  240.     }
  241.     ?></td>
  242. </tr>
  243. </table>
  244. <script type="text/javascript">
  245. function _save(task, close)
  246. {
  247.     document.forms[0].task.value = task;
  248.     document.forms[0].close.value = close;
  249.     document.forms[0].submit();
  250. }
  251. </script>
  252.