From: <vb...@us...> - 2002-09-14 15:19:15
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv25899/core Modified Files: api.php css_inc.php html_api.php user_api.php Log Message: - Removed the admin page and integrated it into the admin menu. - Added a Manage Users page (still under development) - Changed the main page to be admin_pending.php - Added error message if login information is incorrect. - Movings towards using styles rather than hard-coded formatting. Index: api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/api.php,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- api.php 14 Sep 2002 06:22:03 -0000 1.20 +++ api.php 14 Sep 2002 15:19:12 -0000 1.21 @@ -32,12 +32,13 @@ $g_logout = $g_web_directory . 'logout' . $g_ext; $g_logout_redirect_page = $g_web_directory; - $g_admin_page = $g_web_directory . 'admin' . $g_ext; $g_admin_index_files = $g_web_directory . 'admin_index_files' . $g_ext; - $g_admin_manage_notes = $g_web_directory . 'admin_manage_notes' . $g_ext; $g_admin_view_queue = $g_web_directory . 'admin_view_queue' . $g_ext; + $g_admin_manage_notes = $g_web_directory . 'admin_manage_notes' . $g_ext; + $g_admin_manage_users = $g_web_directory . 'admin_manage_users' . $g_ext; $g_admin_pending = $g_web_directory . 'admin_pending' . $g_ext; $g_admin_change_password = $g_web_directory . 'admin_change_password' . $g_ext; + $g_admin_page = $g_admin_pending; $g_css_inc_file = $g_absolute_directory . 'core' . DIRECTORY_SEPARATOR . 'css_inc' . $g_ext; $g_meta_inc_file = $g_absolute_directory . 'core' . DIRECTORY_SEPARATOR . 'meta_inc' . $g_ext; Index: css_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/css_inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- css_inc.php 14 Sep 2002 06:22:03 -0000 1.3 +++ css_inc.php 14 Sep 2002 15:19:12 -0000 1.4 @@ -14,5 +14,20 @@ p { font-family:Verdana, Arial; font-size: 10pt } h3 { font-family:Verdana, Arial; font-size: 13pt; font-weight: bold; text-align: center } address { font-family:Verdana, Arial; font-size: 8pt } +div {width: auto; font-size: 10pt; clear: both;} +div.code {background-color: #f0f0f0; border: 1px solid #444444; padding: 8px; font-family: courier new, courier, fixed; white-space: pre;} +div.note {background-color: #c8e0f8; border: 1px solid #4444aa; padding: 8px;} +div.warning {background-color: #f8e0e0; border: 1px solid #aa4444; padding: 8px;} +div.parent {background-color: #e8e8e8; border-bottom: 1px solid #aaaaaa; padding-top: 4px;} + +div.example {background-color: #f4f4f4; font-family: courier new, courier, fixed; border-left: 1px solid #000000; border-right: 1px solid #000000; display: inline;} + +div.float-right {background-color: #ffffcc; border: 1px solid #88aa44; float: right; width: 30%; display: inline; padding: 8px;} +div.float-left {background-color: #ffffcc; border: 1px solid #88aa44; float: left; width: 30%; display: inline; padding: 8px;} + +div.title {background-color: #c8e0f8; border: 1px solid #4444aa; padding: 8px;} +div.box { border: 1px solid #000000; padding: 8px;} + div.warning {background-color: #f8e0e0; border: 1px solid #aa4444; padding: 8px;} +div.menu {background-color: #f4f4f4; border: 1px solid #000000; padding: 8px; text-align: center; } </style> Index: html_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/html_api.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- html_api.php 14 Sep 2002 06:22:03 -0000 1.4 +++ html_api.php 14 Sep 2002 15:19:12 -0000 1.5 @@ -64,7 +64,12 @@ } ### -------------------- function print_header( $p_title = '' ) { - echo "<h3>$p_title</h3>"; + echo <<<EOT + <div class="title"> + $p_title + </div> + <br /> +EOT; } ### -------------------- function print_top_page( $p_page ) { @@ -82,7 +87,7 @@ function print_footer( $p_file ) { global $g_webmaster_email; - echo '<hr size="1" />'; + echo '<br /><hr size="1" />'; print_phpWebNotes_version(); echo '<address>Copyright (c) 2000-2002</address>'; echo "<address><a href=\"mailto:$g_webmaster_email\">$g_webmaster_email</a></address>"; @@ -108,12 +113,24 @@ } ### -------------------- function print_admin_menu() { - global $g_admin_page, $g_logout, - $s_admin_link, $s_logout_link; + global $g_logout, $g_admin_index_files, $g_admin_pending, $g_admin_change_password, + $g_admin_manage_notes, $g_admin_manage_users, + $s_logout_link, $s_index_files, $s_view_queue, $s_change_password, + $s_manage_notes, $s_manage_users; - echo '<div align="center">'; - echo "<a href=\"$g_admin_page\">$s_admin_link</a> | "; - echo "<a href=\"$g_logout\">$s_logout_link</a>"; - echo '<br />'; + $queue_count = note_queue_count(); + + echo <<<EOT + <div class="menu"> + <a href="$g_admin_index_files">$s_index_files</a> | + <a href="$g_admin_manage_notes">$s_manage_notes</a> | + <a href="$g_admin_manage_users">$s_manage_users</a> | + <a href="$g_admin_pending">$s_view_queue</a> [$queue_count] | + + <a href="$g_admin_change_password">$s_change_password</a> | + <a href="$g_logout">$s_logout_link</a> + </div> + <br /> +EOT; } ?> Index: user_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/user_api.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- user_api.php 11 Sep 2002 09:49:54 -0000 1.2 +++ user_api.php 14 Sep 2002 15:19:12 -0000 1.3 @@ -24,4 +24,23 @@ $result = db_query( $query ); return db_fetch_array( $result ); } + ### -------------------- + function user_get_all() { + global $g_phpWN_user_table; + + $t_users_array = array(); + + $query = "SELECT * + FROM $g_phpWN_user_table"; + $result = db_query( $query ); + if ( !$result ) { + return false; + } + + while ( $row = db_fetch_array( $result ) ) { + $t_users_array[] = $row; + } + + return $t_users_array; + } ?> |