[ Index ] |
|
Code source de WebCalendar 1.0.5 |
1 <?php 2 include_once 'includes/init.php'; 3 print_header( '', '', '', true ); 4 5 if ( ! $is_admin ) { 6 echo "<h2>" . translate("Error") . "</h2>\n" . 7 translate("You are not authorized") . ".\n"; 8 echo "</body>\n</html>"; 9 exit; 10 } 11 if ( ! $NONUSER_PREFIX ) { 12 echo "<h2>" . translate("Error") . "</h2>\n" . 13 translate("NONUSER_PREFIX not set") . ".\n"; 14 echo "</body>\n</html>"; 15 exit; 16 } 17 $add = getValue ( "add" ); 18 $nid = getValue ( "nid" ); 19 20 // Adding/Editing nonuser calendar 21 if (( ($add == '1') || (! empty ($nid)) ) && empty ($error)) { 22 $userlist = get_my_users (); 23 $button = translate("Add"); 24 $nid = clean_html($nid); 25 ?> 26 27 <form action="edit_nonusers_handler.php" method="post"> 28 <?php 29 if ( ! empty ( $nid ) ) { 30 nonuser_load_variables ( $nid, 'nonusertemp_' ); 31 $id_display = "$nid <input type=\"hidden\" name=\"nid\" value=\"$nid\" />"; 32 $button = translate("Save"); 33 $nonusertemp_login = substr($nonusertemp_login, strlen($NONUSER_PREFIX)); 34 } else { 35 $id_display = "<input type=\"text\" name=\"nid\" id=\"calid\" size=\"20\" maxlength=\"20\" /> " . translate ("word characters only"); 36 } 37 ?> 38 <h2><?php 39 if ( ! empty ( $nid ) ) { 40 nonuser_load_variables ( $nid, 'nonusertemp_' ); 41 echo translate("Edit User"); 42 } else { 43 echo translate("Add User"); 44 } 45 ?></h2> 46 <table> 47 <tr><td> 48 <label for="calid"><?php etranslate("Calendar ID")?>:</label></td><td> 49 <?php echo $id_display ?> 50 </td></tr> 51 <tr><td> 52 <label for="nfirstname"><?php etranslate("First Name")?>:</label></td><td> 53 <input type="text" name="nfirstname" id="nfirstname" size="20" maxlength="25" value="<?php echo empty ( $nonusertemp_firstname ) ? '' : htmlspecialchars ( $nonusertemp_firstname ); ?>" /> 54 </td></tr> 55 <tr><td> 56 <label for="nlastname"><?php etranslate("Last Name")?>:</label></td><td> 57 <input type="text" name="nlastname" id="nlastname" size="20" maxlength="25" value="<?php echo empty ( $nonusertemp_lastname ) ? '' : htmlspecialchars ( $nonusertemp_lastname ); ?>" /> 58 </td></tr> 59 <tr><td> 60 <label for="nadmin"><?php etranslate("Admin")?>:</label></td><td> 61 <select name="nadmin" id="nadmin"> 62 <?php 63 for ( $i = 0; $i < count ( $userlist ); $i++ ) { 64 echo "<option value=\"".$userlist[$i]['cal_login']."\""; 65 if (! empty ( $nonusertemp_admin ) && 66 $nonusertemp_admin == $userlist[$i]['cal_login'] ) 67 echo " selected=\"selected\""; 68 echo ">".$userlist[$i]['cal_fullname']."</option>\n"; 69 } 70 ?> 71 </select> 72 </td></tr> 73 </table> 74 <br /> 75 <input type="submit" name="action" value="<?php echo $button;?>" /> 76 <?php if ( ! empty ( $nid ) ) { ?> 77 <input type="submit" name="action" value="<?php etranslate("Delete");?>" onclick="return confirm('<?php etranslate("Are you sure you want to delete this entry?"); ?>')" /> 78 <?php } ?> 79 </form> 80 <?php } ?> 81 <?php print_trailer ( false, true, true ); ?> 82 </body> 83 </html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Nov 30 19:09:19 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |