[ Index ] |
|
Code source de WebCalendar 1.0.5 |
1 <?php 2 /* 3 $Id: adminhome.php,v 1.15 2005/01/19 13:54:13 cknudsen Exp $ 4 5 Page Description: 6 Serves as the home page for administrative functions. 7 Input Parameters: 8 None 9 Security: 10 Users will see different options available on this page. 11 */ 12 include_once 'includes/init.php'; 13 14 $COLUMNS = 3; 15 16 $style = "<style type=\"text/css\"> 17 table.admin { 18 padding: 5px; 19 border: 1px solid #000000; 20 "; 21 if ( function_exists ("imagepng") && 22 ( empty ($GLOBALS['enable_gradients']) || $GLOBALS['enable_gradients'] == 'Y' ) ) { 23 $style .= " background-image: url(\"gradient.php?height=300&base=ccc&percent=10\");\n"; 24 } else { 25 $style .= " background-color: #CCCCCC;\n"; 26 } 27 $style .= " 28 } 29 table.admin td { 30 padding: 20px; 31 text-align: center; 32 } 33 .admin td a { 34 padding: 10px; 35 width: 200px; 36 text-align: center; 37 background-color: #CCCCCC; 38 border-top: 1px solid #EEEEEE; 39 border-left: 1px solid #EEEEEE; 40 border-bottom: 1px solid #777777; 41 border-right: 1px solid #777777; 42 } 43 .admin td a:hover { 44 padding: 10px; 45 width: 200px; 46 text-align: center; 47 background-color: #AAAAAA; 48 border-top: 1px solid #777777; 49 border-left: 1px solid #777777; 50 border-bottom: 1px solid #EEEEEE; 51 border-right: 1px solid #EEEEEE; 52 } 53 </style> 54 "; 55 print_header('', $style); 56 57 $names = array (); 58 $links = array (); 59 60 if ($is_admin) { 61 $names[] = translate("System Settings"); 62 $links[] = "admin.php"; 63 } 64 65 $names[] = translate("Preferences"); 66 $links[] = "pref.php"; 67 68 if ( $is_admin ) { 69 $names[] = translate("Users"); 70 $links[] = "users.php"; 71 } else { 72 $names[] = translate("Account"); 73 $links[] = "users.php"; 74 } 75 76 if ( $single_user != 'Y' ) { 77 $names[] = translate("Assistants"); 78 $links[] = "assistant_edit.php"; 79 } 80 81 if ( $categories_enabled == 'Y' ) { 82 $names[] = translate("Categories"); 83 $links[] = "category.php"; 84 } 85 86 $names[] = translate("Views"); 87 $links[] = "views.php"; 88 89 $names[] = translate("Layers"); 90 $links[] = "layers.php"; 91 92 if ( $reports_enabled == 'Y' ) { 93 $names[] = translate("Reports"); 94 $links[] = "report.php"; 95 } 96 97 if ( $is_admin ) { 98 $names[] = translate("Delete Events"); 99 $links[] = "purge.php"; 100 101 $names[] = translate("Activity Log"); 102 $links[] = "activity_log.php"; 103 } 104 105 if ( $is_admin && ! empty ($public_access) && $public_access == 'Y' ) { 106 $names[] = translate("Public Preferences"); 107 $links[] = "pref.php?public=1"; 108 } 109 110 if ( $is_admin && ! empty ( $public_access ) && $public_access == 'Y' && 111 $public_access_can_add == 'Y' && $public_access_add_needs_approval == 'Y' ) { 112 $names[] = translate("Unapproved Public Events"); 113 $links[] = "list_unapproved.php?user=__public__"; 114 } 115 ?> 116 117 <h2><?php etranslate("Administrative Tools")?></h2> 118 119 <table class="admin"> 120 <?php 121 for ( $i = 0; $i < count ($names); $i++ ) { 122 if ( $i % $COLUMNS == 0 ) 123 echo "<tr>\n"; 124 echo "<td>"; 125 if ( ! empty ($links[$i]) ) 126 echo "<a href=\"$links[$i]\">"; 127 echo $names[$i]; 128 if ( ! empty ($links[$i]) ) 129 echo "</a>"; 130 echo "</td>\n"; 131 if ($i % $COLUMNS == $COLUMNS - 1) 132 echo "</tr>\n"; 133 } 134 if ( $i % $COLUMNS != 0 ) 135 echo "</tr>\n"; 136 ?> 137 </table> 138 139 <?php print_trailer(); ?> 140 </body> 141 </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 |
![]() |