[ Index ] |
|
Code source de WebCalendar 1.0.5 |
1 <?php 2 include_once 'includes/init.php'; 3 4 if ( empty ( $login) || $login == "__public__" ) { 5 // do not allow public access 6 do_redirect ( empty ( $STARTVIEW ) ? "month.php" : "$STARTVIEW" ); 7 exit; 8 } 9 10 if ($user != $login) 11 $user = (($is_admin || $is_nonuser_admin) && $user) ? $user : $login; 12 13 if ( $groups_enabled == "Y" ) { 14 $INC = array('js/assistant_edit.php'); 15 } else { 16 $INC = ''; 17 } 18 print_header($INC); 19 ?> 20 21 <form action="assistant_edit_handler.php" method="post" name="assistanteditform"> 22 <?php 23 if ($user) echo "<input type=\"hidden\" name=\"user\" value=\"$user\" />\n"; 24 if ( $is_nonuser_admin ) { 25 nonuser_load_variables ( $user, "nonuser" ); 26 echo "<h2>" . $nonuserfullname . " " . translate("Assistants") 27 ."<br />\n-- " . translate("Admin mode") . " --</h2>\n"; 28 } else { 29 echo "<h2>" . translate("Your assistants") . "</h2>\n"; 30 } 31 ?> 32 <a title="<?php etranslate("Admin") ?>" class="nav" href="adminhome.php">« <?php etranslate("Admin") ?></a><br /><br /> 33 34 <table style="border-width:0px;"> 35 <tr><td style="vertical-align:top;"> 36 <label for="users"><?php etranslate("Assistants"); ?>:</label></td><td> 37 <select name="users[]" id="users" size="10" multiple="multiple"> 38 <?php 39 // get list of all users 40 $users = get_my_users (); 41 // get list of users for this view 42 $sql = "SELECT cal_boss, cal_assistant FROM webcal_asst WHERE cal_boss = '$user'"; 43 $res = dbi_query ( $sql ); 44 if ( $res ) { 45 while ( $row = dbi_fetch_row ( $res ) ) { 46 $assistantuser[$row[1]] = 1; 47 } 48 dbi_free_result ( $res ); 49 } 50 for ( $i = 0; $i < count ( $users ); $i++ ) { 51 $u = $users[$i]['cal_login']; 52 if ($u == $login ) continue; 53 if ($u == '__public__' ) continue; 54 echo "<option value=\"$u\""; 55 if ( ! empty ( $assistantuser[$u] ) ) { 56 echo " selected=\"selected\""; 57 } 58 echo ">" . $users[$i]['cal_fullname'] . "</option>\n"; 59 } 60 ?> 61 </select> 62 <?php 63 if ( $groups_enabled == "Y" ) { 64 echo "<input type=\"button\" onclick=\"selectUsers()\" value=\"" . 65 translate("Select") . "...\" />\n"; 66 } 67 ?> 68 </td></tr> 69 <tr><td colspan="2" style="text-align:center;"> 70 <br /> 71 <input type="submit" name="action" value="<?php etranslate("Save"); ?>" /> 72 </td></tr> 73 </table> 74 </form> 75 76 <?php print_trailer(); ?> 77 </body> 78 </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 |
![]() |