home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / administrator / users / register_form.inc < prev    next >
Text File  |  2004-03-08  |  13KB  |  462 lines

  1. <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" name="register">
  2. <table border="0" cellpadding="0" cellspacing="3">
  3. <tr>
  4.     <td colspan="2"><h1><?php echo $admin_new_user; ?></h1>
  5.     <?php if (isset($error)) echo $error; ?>
  6.     <?php echo $registration_text; ?><br /><br />
  7.     <h2><?php echo $registration_personal_info; ?></h2>
  8. </tr>
  9. <tr>
  10.     <td valign="top">
  11.     <table border="0" cellpadding="0" cellspacing="3">
  12.     <?php
  13.     if (isset($val->error["first_name"]))
  14.     {
  15.     ?>
  16.     <tr>
  17.         <td class="Error" colspan="2">
  18.             <?php echo $val->error["first_name"]; ?>
  19.         </td>
  20.     </tr>
  21.     <?php
  22.     }
  23.     ?>
  24.     <tr heigth="25">
  25.         <td align="right" nowrap><?php echo $strFirstName; ?>*: </td>
  26.         <td width="100%"><input type="text" class="textbox"  name="first_name" size="30" maxlength="50" value="<?php if(isset($_REQUEST['first_name'])) echo $_REQUEST['first_name']; ?>"></td>
  27.     </tr>
  28.     <tr heigth="25">
  29.         <td align="right" nowrap><?php echo $strMiddleName; ?>: </td>
  30.         <td width="100%"><input type="text" class="textbox"  name="middle_name" size="30" maxlength="50" value="<?php if(isset($_REQUEST['middle_name'])) echo $_REQUEST['middle_name']; ?>"></td>
  31.     </tr>
  32.         <?php
  33.         if (isset($val->error["last_name"]))
  34.         {
  35.         ?>
  36.         <tr>
  37.             <td class="Error" colspan="2">
  38.                 <?php echo $val->error["last_name"]; ?>
  39.             </td>
  40.         </tr>
  41.         <?php
  42.         }
  43.     ?>
  44.     <tr heigth="25">
  45.         <td align="right" nowrap><?php echo $strLastName; ?>*: </td>
  46.         <td width="100%"><input type="text" class="textbox"  name="last_name" size="30" maxlength="50" value="<?php if(isset($_REQUEST['last_name'])) echo $_REQUEST['last_name']; ?>"></td>
  47.     </tr>
  48.     <tr heigth="25">
  49.         <td align="right" nowrap><?php echo $strTitle; ?> / <?php echo $strInitials; ?>: </td>
  50.         <td width="100%"><input type="text" class="textbox"  name="title" size="10" maxlength="12" value="<?php if(isset($_REQUEST['title'])) echo $_REQUEST['title']; ?>"> / <input type="text" class="textbox"  name="initials" size="12" maxlength="50" value="<?php if(isset($_REQUEST['initials'])) echo $_REQUEST['initials']; ?>"></td>
  51.     </tr>
  52.     <tr>
  53.         <td align="right" nowrap><?php echo $strSex; ?>:</td>
  54.         <td>
  55.         <?php
  56.         $sex = isset($_REQUEST['sex']) ? $_REQUEST['sex'] : 'M';
  57.         $radiolist = new radio_list('sex', $sex);
  58.         $radiolist->add_option('M', 'M', $strSexes['M']);
  59.         echo ' ';
  60.         $radiolist->add_option('F', 'F', $strSexes['F']);
  61.         ?>
  62.         </td>
  63.     </tr>
  64.     <tr>
  65.         <td align="right" nowrap><?php echo $strBirthday; ?>:</td>
  66.         <td>
  67.         <?php
  68.         $birthday = isset($_REQUEST['birthday']) ? $_REQUEST['birthday'] : '';
  69.         $datepicker->print_date_picker('birthday', $_SESSION['GO_SESSION']['date_format'], $birthday);
  70.         ?>
  71.         </td>
  72.     </tr>
  73.     <tr><td colspan="2"> </td></tr>
  74.     <tr>
  75.         <td align="right" nowrap>
  76.         <?php echo $strAddress; ?>: 
  77.         </td>
  78.         <td>
  79.         <input type="text" class="textbox"  name="address" size="30" value="<?php  if(isset($_REQUEST['address'])) echo $_REQUEST['address']; ?>" maxlength="100">
  80.         </td>
  81.     </tr>
  82.  
  83.     <tr>
  84.         <td align="right" nowrap>
  85.         <?php echo $strZip; ?>: 
  86.         </td>
  87.         <td>
  88.         <input type="text" class="textbox"  name="zip" size="30" value="<?php if(isset($_REQUEST['zip'])) echo $_REQUEST['zip']; ?>" maxlength="20">
  89.         </td>
  90.     </tr>
  91.     <tr>
  92.         <td align="right" nowrap>
  93.         <?php echo $strCity; ?>: 
  94.         </td>
  95.         <td>
  96.         <input type="text" class="textbox"  name="city" size="30" value="<?php if(isset($_REQUEST['city'])) echo $_REQUEST['city']; ?>" maxlength="50">
  97.         </td>
  98.     </tr>
  99.  
  100.     <tr>
  101.         <td align="right" nowrap>
  102.         <?php echo $strState; ?>: 
  103.         </td>
  104.         <td>
  105.         <input type="text" class="textbox"  name="state" size="30" value="<?php if(isset($_REQUEST['state'])) echo $_REQUEST['state']; ?>" maxlength="50">
  106.         </td>
  107.     </tr>
  108.  
  109.     <tr>
  110.         <td align="right" nowrap>
  111.         <?php echo $strCountry; ?>: 
  112.         </td>
  113.         <td>
  114.         <input type="text" class="textbox"  name="country" size="30" value="<?php if(isset($_REQUEST['country'])) echo $_REQUEST['country']; ?>" maxlength="50">
  115.         </td>
  116.     </tr>
  117.     <tr>
  118.         <td colspan="2"> </td>
  119.     </tr>
  120.  
  121.     <tr>
  122.         <td align="right" nowrap>
  123.         <?php echo $strPhone; ?>: 
  124.         </td>
  125.         <td>
  126.         <input type="text" class="textbox"  name="home_phone" size="30" value="<?php if(isset($_REQUEST['home_phone'])) echo $_REQUEST['home_phone']; ?>" maxlength="20">
  127.         </td>
  128.     </tr>
  129.  
  130.  
  131.  
  132.     <tr>
  133.         <td align="right" nowrap>
  134.         <?php echo $strFax; ?>: 
  135.         </td>
  136.         <td>
  137.         <input type="text" class="textbox"  name="fax" size="30" value="<?php if(isset($_REQUEST['fax'])) echo $_REQUEST['fax']; ?>" maxlength="20">
  138.         </td>
  139.     </tr>
  140.  
  141.     <tr>
  142.         <td align="right" nowrap>
  143.         <?php echo $strCellular; ?>: 
  144.         </td>
  145.         <td>
  146.         <input type="text" class="textbox"  name="cellular" size="30" value="<?php if(isset($_REQUEST['cellular'])) echo $_REQUEST['cellular']; ?>" maxlength="20">
  147.         </td>
  148.     </tr>
  149.     <?php
  150.     if (isset($val->error["email"]))
  151.     {
  152.     ?>
  153.     <tr>
  154.         <td colspan="2" class="Error">
  155.             <?php echo $val->error["email"]; ?>
  156.         </td>
  157.     </tr>
  158.     <?php } ?>
  159.     <tr>
  160.         <td align="right" nowrap valign="top">
  161.         <?php echo $strEmail; ?>*: 
  162.         </td>
  163.         <td class="small">
  164.         <input type="text" class="textbox"  name="email" size="30" value="<?php if(isset($_REQUEST['email'])) echo $_REQUEST['email']; ?>" maxlength="75"><br />
  165.         <?php
  166.         if ($GO_CONFIG->enable_system_accounts)
  167.         {
  168.             echo $ml_email_only;
  169.         }
  170.         ?>
  171.         </td>
  172.     </tr>
  173.  
  174.  
  175.     </table>
  176.     </td>
  177.     <td valign="top">
  178.         <table border="0" cellpadding="0" cellspacing="3">
  179.         <tr>
  180.             <td align="right" nowrap>
  181.             <?php echo $strCompany; ?>: 
  182.             </td>
  183.             <td>
  184.             <input type="text" class="textbox"  name="company" size="30" value="<?php if(isset($_REQUEST['company'])) echo $_REQUEST['company']; ?>" maxlength="50">
  185.             </td>
  186.         </tr>
  187.         <tr>
  188.             <td align="right" nowrap>
  189.             <?php echo $strDepartment; ?>: 
  190.             </td>
  191.             <td>
  192.             <input type="text" class="textbox"  name="department" size="30" value="<?php if(isset($_REQUEST['department'])) echo $_REQUEST['department']; ?>" maxlength="50">
  193.             </td>
  194.         </tr>
  195.         <tr>
  196.             <td align="right" nowrap>
  197.             <?php echo $strFunction; ?>: 
  198.             </td>
  199.             <td>
  200.             <input type="text" class="textbox"  name="function" size="30" value="<?php if(isset($_REQUEST['function'])) echo $_REQUEST['function']; ?>" maxlength="50">
  201.             </td>
  202.         </tr>
  203.         <tr>
  204.             <td colspan="2"> </td>
  205.         </tr>
  206.         <tr>
  207.             <td align="right" nowrap>
  208.             <?php echo $strAddress; ?>: 
  209.             </td>
  210.             <td>
  211.             <input type="text" class="textbox"  name="work_address" size="30" value="<?php if(isset($_REQUEST['work_address'])) echo $_REQUEST['work_address']; ?>" maxlength="100">
  212.             </td>
  213.         </tr>
  214.  
  215.         <tr>
  216.             <td align="right" nowrap>
  217.             <?php echo $strZip; ?>: 
  218.             </td>
  219.             <td>
  220.             <input type="text" class="textbox"  name="work_zip" size="30" value="<?php if(isset($_REQUEST['work_zip'])) echo $_REQUEST['work_zip']; ?>" maxlength="20">
  221.             </td>
  222.         </tr>
  223.  
  224.         <tr>
  225.             <td align="right" nowrap>
  226.             <?php echo $strCity; ?>: 
  227.             </td>
  228.             <td>
  229.             <input type="text" class="textbox"  name="work_city" size="30" value="<?php if(isset($_REQUEST['work_city'])) echo $_REQUEST['work_city']; ?>" maxlength="50">
  230.             </td>
  231.         </tr>
  232.  
  233.  
  234.         <tr>
  235.             <td align="right" nowrap>
  236.             <?php echo $strState; ?>: 
  237.             </td>
  238.             <td>
  239.             <input type="text" class="textbox"  name="work_state" size="30" value="<?php if(isset($_REQUEST['work_state'])) echo $_REQUEST['work_state']; ?>" maxlength="50">
  240.             </td>
  241.         </tr>
  242.  
  243.         <tr>
  244.             <td align="right" nowrap>
  245.             <?php echo $strCountry; ?>: 
  246.             </td>
  247.             <td>
  248.             <input type="text" class="textbox"  name="work_country" size="30" value="<?php if(isset($_REQUEST['work_country'])) echo $_REQUEST['work_country']; ?>" maxlength="50">
  249.             </td>
  250.         </tr>
  251.         <tr>
  252.             <td colspan="2"> </td>
  253.         </tr>
  254.  
  255.         <tr>
  256.             <td align="right" nowrap>
  257.             <?php echo $strWorkphone; ?>: 
  258.             </td>
  259.             <td>
  260.             <input type="text" class="textbox"  name="work_phone" size="30" value="<?php if(isset($_REQUEST['work_phone'])) echo $_REQUEST['work_phone']; ?>" maxlength="20">
  261.             </td>
  262.         </tr>
  263.         <tr>
  264.             <td align="right" nowrap>
  265.             <?php echo $strWorkFax; ?>: 
  266.             </td>
  267.             <td>
  268.             <input type="text" class="textbox"  name="work_fax" size="30" value="<?php if(isset($_REQUEST['work_fax'])) echo $_REQUEST['work_fax']; ?>" maxlength="20">
  269.             </td>
  270.         </tr>
  271.         <tr>
  272.             <td align="right" nowrap>
  273.             <?php echo $strHomepage; ?>: 
  274.             </td>
  275.             <td>
  276.             <input type="text" class="textbox"  name="homepage" size="30" value="<?php if(isset($_REQUEST['homepage'])) echo $_REQUEST['homepage'] ?>" maxlength="100">
  277.             </td>
  278.         </tr>
  279.         </table>
  280.     </td>
  281. </tr>
  282. </table>
  283.  
  284. <table border="0" cellpadding="0" cellspacing="3" width="600">
  285. <tr height="30">
  286.     <td> </td>
  287. </tr>
  288. <tr>
  289.         <td colspan="2"><h2><?php echo $registration_account_info; ?></h2>
  290.         <?php echo $registartion_username_text; ?><br><br>
  291.         </td>
  292. </tr>
  293. <?php
  294. if (isset($val->error["username"]))
  295. {
  296. ?>
  297. <tr>
  298.         <td colspan="2" class="Error">
  299.                 <?php echo $val->error["username"]; ?>
  300.         </td>
  301. </tr>
  302. <?php } ?>
  303.  
  304. <tr>
  305.     <td align="right" nowrap>
  306.         <?php echo $strUsername; ?>*: 
  307.           </td>
  308.           <td width="100%">
  309.         <input type="text" class="textbox"  name="username" size="30" value="<?php if(isset($_REQUEST['username'])) echo $_REQUEST['username']; ?>" maxlength="20">
  310.        </td>
  311. </tr>
  312. <?php
  313. if (isset($val->error["pass1"]))
  314. {
  315. ?>
  316. <tr>
  317.         <td colspan="2" class="Error">
  318.                 <?php echo $val->error["pass1"]; ?>
  319.         </td>
  320. </tr>
  321. <?php } ?>
  322.  
  323. <tr>
  324.     <td align="right" nowrap>
  325.         <?php echo $strPassword; ?>*: 
  326.           </td>
  327.           <td>
  328.         <input type=password class="textbox" name=pass1 size="30" maxlength="20" value="<?php if(isset($_REQUEST['pass1'])) echo $_REQUEST['pass1']; ?>">
  329.         </td>
  330. </tr>
  331. <?php
  332. if (isset($val->error["pass2"]))
  333. {
  334. ?>
  335. <tr>
  336.         <td colspan="2" class="Error">
  337.                 <?php echo $val->error["pass2"]; ?>
  338.         </td>
  339. </tr>
  340. <?php } ?>
  341. <tr>
  342.     <td align="right" nowrap>
  343.         <?php echo $strPasswordConfirm; ?>*: 
  344.           </td>
  345.           <td>
  346.         <input type="password" class="textbox" name="pass2" size="30" maxlength="20" value="<?php if(isset($_REQUEST['pass2'])) echo $_REQUEST['pass2']; ?>">
  347.         </td>
  348. </tr>
  349. <tr>
  350.     <td > </td>
  351. </tr>
  352. <tr>
  353.     <td nowrap align="right">
  354.         <?php echo $reg_language; ?>: 
  355.     </td>
  356.     <td>
  357.         <?php
  358.         $language = isset($_REQUEST['language']) ? $_REQUEST['language'] : $GO_CONFIG->language;
  359.         $languages = $GO_LANGUAGE->get_languages();
  360.         $dropbox = new dropbox();
  361.         $dropbox->add_arrays($languages, $languages);
  362.         $dropbox->print_dropbox("language", $language);
  363.         ?>
  364.     </td>
  365. </tr>
  366. <tr>
  367.     <td nowrap align="right">
  368.         <?php echo $reg_theme; ?>: 
  369.     </td>
  370.     <td>
  371.         <?php
  372.         $theme = isset($_REQUEST['theme']) ? $_REQUEST['theme'] : $GO_CONFIG->theme;
  373.         $themes = $GO_THEME->get_themes();
  374.         $dropbox = new dropbox();
  375.         $dropbox->add_arrays($themes, $themes);
  376.         $dropbox->print_dropbox("theme", $theme);
  377.         ?>
  378.     </td>
  379. </tr>
  380.  
  381. <tr>
  382.         <td colspan="2">
  383.         <br/>
  384.         <?php
  385.         $vis_check = isset($_POST['visible']) ? $vis_check = 'checked' : '';
  386.         $create_check = isset($_POST['create_email']) ? $create_check = 'checked' : '';
  387.         $create_samba_check = isset($_POST['create_samba_user']) ? $create_samba_check = 'checked' : '';
  388.  
  389.         echo '<input type="checkbox" name="visible" value="true" '.$vis_check.' />'.$registration_visibility.'<br />';
  390.  
  391.         if ($GO_CONFIG->enable_system_accounts == true && $GO_CONFIG->inmail_host != '' && $GO_CONFIG->inmail_port != '' && $GO_CONFIG->local_email_host != '')
  392.         {
  393.             echo '<input type="checkbox" name="create_email" value="true" '.$create_check.' />'.$registration_email;
  394.         }
  395.         ?>
  396.         </td>
  397. </tr>
  398. <tr>
  399.         <td colspan="2">
  400.         <br />
  401.         <?php
  402.         echo $admin_module_access.'<br /><br />';
  403.  
  404.         echo '<table border="0" cellpadding="4" cellspacing="0">';
  405.  
  406.         $column_count = 0;
  407.         $columns=3;
  408.  
  409.         if ($GO_CONFIG->enable_samba_accounts == true)
  410.         {
  411.             $column_count++;
  412.             echo '<tr><td><table border="0" cellpadding="0" cellspacing="0"><tr><td><input type="checkbox" name="create_samba_user" value="true" '.$create_samba_check.' /></td><td>'.$registration_samba.'</td></tr></table></td>';
  413.         }
  414.         $module_count = $GO_MODULES->get_modules();
  415.         while($GO_MODULES->next_record())
  416.         {
  417.             if ($column_count == 0)
  418.             {
  419.                 echo '<tr>';
  420.                 $column_count++;
  421.             }
  422.  
  423.             $lang_var = isset($lang_modules[$GO_MODULES->f('id')]) ? $lang_modules[$GO_MODULES->f('id')] : $GO_MODULES->f('id');
  424.             $check = in_array($GO_MODULES->f('acl_read'), $module_acl) ? 'checked' : '';
  425.             echo '<td><table border="0" cellpadding="0" cellspacing="0"><tr><td><input type="checkbox" name="module_acl[]" value="'.$GO_MODULES->f('acl_read').'" '.$check.' /></td><td>'.$lang_var.'</td></tr></table></td>';
  426.  
  427.             if($column_count==$columns)
  428.             {
  429.                 $column_count=0;
  430.                 echo '</tr>';
  431.             }else
  432.             {
  433.                 $column_count++;
  434.             }
  435.         }
  436.  
  437.         if ($column_count != 0)
  438.         {
  439.             for ($i=$column_count;$i<=$columns;$i++)
  440.             {
  441.                 echo '<td> </td>';
  442.             }
  443.             echo '</tr>';
  444.         }
  445.         echo '</table>';
  446.         ?>
  447.         </td>
  448. </tr>
  449. <tr height="25" colspan="2">
  450.     <td> </td>
  451. </tr>
  452. <tr>
  453.         <td colspan="2">
  454.         <?php
  455.             $button = new button($cmdOk, 'javascript:document.forms[0].submit()');
  456.             echo '  ';
  457.             $button = new button($cmdCancel, 'javascript:document.location=\'index.php\';');
  458.             ?>
  459.         </td>
  460. </tr>
  461. </table>
  462.