You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(240) |
Oct
(66) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(9) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
From: <vb...@us...> - 2002-09-15 02:26:01
|
Update of /cvsroot/webnotes/webnotes/themes/phpnet In directory usw-pr-cvs1:/tmp/cvs-serv6788/themes/phpnet Modified Files: theme_api.php Log Message: Implemented 0000001: Cross referencing Index: theme_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/themes/phpnet/theme_api.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- theme_api.php 12 Sep 2002 13:31:46 -0000 1.10 +++ theme_api.php 15 Sep 2002 02:25:58 -0000 1.11 @@ -91,7 +91,7 @@ } else { $t_note = ''; } - + echo <<<EOT <tr valign="top"> <td bgcolor="#e0e0e0" colspan="2"> |
From: <vb...@us...> - 2002-09-15 02:26:01
|
Update of /cvsroot/webnotes/webnotes/doc In directory usw-pr-cvs1:/tmp/cvs-serv6788/doc Modified Files: ChangeLog Log Message: Implemented 0000001: Cross referencing Index: ChangeLog =================================================================== RCS file: /cvsroot/webnotes/webnotes/doc/ChangeLog,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ChangeLog 14 Sep 2002 06:22:03 -0000 1.10 +++ ChangeLog 15 Sep 2002 02:25:58 -0000 1.11 @@ -28,7 +28,8 @@ * Added warning to login page, if plain passwords are used. * Fixed a problem in db_generate.sql where the administrator account had access level 0 and was not enabled. * Added db_upgrade.sql to upgrade the db and include the password field change. - + * Added support for cross referencing between notes on the same document (#<note number>). + 03.12.2000 - 1.0.0 * Rewrite and release |
From: <vb...@us...> - 2002-09-15 02:26:01
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv6788/core Modified Files: note_api.php string_api.php Log Message: Implemented 0000001: Cross referencing Index: note_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/note_api.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- note_api.php 13 Sep 2002 07:17:53 -0000 1.15 +++ note_api.php 15 Sep 2002 02:25:58 -0000 1.16 @@ -108,7 +108,7 @@ $info['id'] = $v_id; $info['email'] = $v_email; - $info['note'] = string_preserve_spaces( string_disable_html( $v_note ) ); + $info['note'] = string_add_note_links( $p_url, string_preserve_spaces( string_disable_html( $v_note ) ) ); #Removed by Remon tell we fix the problem in the sql_to_unix_time #$info['date'] = date( 'M, d Y H:i', sql_to_unix_time( $v_date_submitted ) ); Index: string_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/string_api.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- string_api.php 13 Sep 2002 07:17:53 -0000 1.4 +++ string_api.php 15 Sep 2002 02:25:58 -0000 1.5 @@ -47,4 +47,9 @@ function string_disable_html( $p_string ) { return str_replace(array('<', '>'), array('<', '>'), $p_string ); } + ### -------------------- + function string_add_note_links( $p_page_url, $p_note ) { + return ( preg_replace( '/#([0-9]+)/', "<a href=\"$p_page_url#\\1\">#\\1</a>", $p_note ) ); + } + ### -------------------- ?> |
From: <vb...@us...> - 2002-09-14 23:27:39
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv29258/core Modified Files: css_inc.php Log Message: Used Mantis look for the login page. Index: css_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/css_inc.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- css_inc.php 14 Sep 2002 15:19:12 -0000 1.4 +++ css_inc.php 14 Sep 2002 23:27:36 -0000 1.5 @@ -9,8 +9,9 @@ # -------------------------------------------------------- ?> <style type="text/css"> +form { margin: 0px; display: inline; } body { background-color: #ffffff; font-family:Verdana, Arial; font-size: 10pt } -td { font-family:Verdana, Arial; font-size: 10pt } +td { font-family:Verdana, Arial; font-size: 10pt; padding: 4px; text-align: left; } 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 } @@ -30,4 +31,13 @@ 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; } + +tr.row-1 { background-color: #d8d8d8; color: #000000; } +tr.row-2 { background-color: #e8e8e8; color: #000000; } +td.category { background-color: #c8c8e8; color: #000000; font-weight: bold; } +td.form-title { background-color: #ffffff; color: #000000; font-weight: bold; } +td.form-buttons { background-color: #ffffff; color: #000000; font-weight: bold; text-align: center; } + +table.width50 { width: 50%; border: solid 1px #000000; } + </style> |
From: <vb...@us...> - 2002-09-14 23:27:39
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv29258 Modified Files: login_page.php Log Message: Used Mantis look for the login page. Index: login_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/login_page.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- login_page.php 14 Sep 2002 15:19:12 -0000 1.15 +++ login_page.php 14 Sep 2002 23:27:36 -0000 1.16 @@ -58,29 +58,33 @@ echo <<<EOT <div align="center"> - <form method="post" action="$g_login"> - <table width="40%" bgcolor="$g_table_border_color" cellspacing="1" border="0"> + <form name="f_login_form" method="post" action="$g_login"> + <table class="width50"> <tr bgcolor="$g_header_color"> - <td colspan="2" bgcolor="$g_table_title_color"><strong>$s_login_title</strong></td> + <td colspan="2" class="form-title"><strong>$s_login_title</strong></td> </tr> - <tr bgcolor="$g_white_color"> - <td width="25%">$s_username:</td> + <tr class="row-1"> + <td class="category" width="25%">$s_username:</td> <td width="75%"><input type="text" name="f_username" size="32" maxlength="32" /></td> </tr> - <tr bgcolor="$g_white_color"> - <td>$s_password:</td> + <tr class="row-2"> + <td class="category">$s_password:</td> <td><input type="password" name="f_password" size="32" maxlength="32" /></td> </tr> - <tr bgcolor="$g_white_color"> - <td>$s_save_login:</td> + <tr class="row-1"> + <td class="category">$s_save_login:</td> <td><input type="checkbox" name="f_perm_login" /></td> </tr> - <tr bgcolor="$g_white_color"> - <td align="center" colspan="2"><input type="submit" value="$s_login_button" /></td> + <tr> + <td class="form-buttons" colspan="2"><input type="submit" value="$s_login_button" /></td> </tr> </table> </form> </div> + +<script type="text/javascript" language="JavaScript"> +window.document.f_login_form.f_username.focus(); +</script> EOT; |
From: <vb...@us...> - 2002-09-14 15:19:15
|
Update of /cvsroot/webnotes/webnotes/lang In directory usw-pr-cvs1:/tmp/cvs-serv25899/lang Modified Files: strings_english.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: strings_english.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/lang/strings_english.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- strings_english.php 11 Sep 2002 09:49:54 -0000 1.6 +++ strings_english.php 14 Sep 2002 15:19:12 -0000 1.7 @@ -26,8 +26,10 @@ ### admin.php $s_admin_title = "Admin"; - $s_index_files = "Index Files"; - $s_view_queue = "View Queue"; + $s_index_files = 'Manage Documents'; + $s_manage_users = 'Manage Users'; + $s_view_queue = 'Moderate Notes'; + $s_manage_notes = 'Manage Notes'; $s_change_password = "Change Password"; ### admin_change_password.php |
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; + } ?> |
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv25899 Modified Files: admin_change_password.php admin_index_files.php admin_manage_notes.php admin_pending.php index.html login_page.php Added Files: admin_manage_users.php Removed Files: admin.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. --- NEW FILE: admin_manage_users.php --- <?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - web...@so... # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: admin_manage_users.php,v 1.1 2002/09/14 15:19:12 vboctor Exp $ # -------------------------------------------------------- require_once( 'core' . DIRECTORY_SEPARATOR . 'api.php' ); login_cookie_check(); print_html_top(); print_head_top(); print_title( $g_window_title ); print_css( $g_css_inc_file ); print_head_bottom(); print_body_top(); print_header( $g_page_title ); print_top_page( $g_top_page_inc ); print_admin_menu(); $t_users_array = user_get_all(); echo '<div class="box" align="center">'; echo '<table border="0" width="95%" cellspacing="0">'; echo "<thead><tr><td>User Name</td><td>Email</td><td>Access Level</td><td>Enabled</td></tr></thead><tbody>"; $i = 0; foreach ( $t_users_array as $user ) { extract( $user, EXTR_PREFIX_ALL, 'v' ); $t_color = util_alternate_colors( $i++ ); echo "<tr bgcolor=\"$t_color\"><td>$v_username</td><td>$v_email</td><td>$v_access_level</td><td>$v_enabled</td></tr>"; } echo '</tbody></table>'; echo '</div>'; print_footer( __FILE__ ); print_bottom_page( $g_bottom_page_inc ); print_body_bottom(); print_html_bottom(); ?> Index: admin_change_password.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_change_password.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- admin_change_password.php 11 Sep 2002 09:49:54 -0000 1.11 +++ admin_change_password.php 14 Sep 2002 15:19:12 -0000 1.12 @@ -38,8 +38,10 @@ print_admin_menu(); - if (isset($pass_change)&&($pass_change==1)) { - PRINT "Password changed.<p>"; + echo '<br /><div align="center">'; + + if ( isset( $pass_change ) && ( $pass_change == 1 ) ) { + echo "Password changed.<br />"; } ?> <form method="post" action="<? echo $g_admin_change_password ?>"> Index: admin_index_files.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_index_files.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- admin_index_files.php 10 Sep 2002 13:58:33 -0000 1.15 +++ admin_index_files.php 14 Sep 2002 15:19:12 -0000 1.16 @@ -31,9 +31,8 @@ print_top_page( $g_top_page_inc ); print_admin_menu(); - echo '<br />'; ?> - +<div align="center"> <table bgcolor="<?php echo $g_table_border_color ?>" width="75%" cellspacing="1" border="0"> <tr bgcolor="<?php echo $g_header_color ?>"> <td> Index: admin_manage_notes.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_notes.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- admin_manage_notes.php 11 Sep 2002 09:49:54 -0000 1.12 +++ admin_manage_notes.php 14 Sep 2002 15:19:12 -0000 1.13 @@ -8,13 +8,13 @@ # $Id$ # -------------------------------------------------------- - require_once( "core" . DIRECTORY_SEPARATOR . "api.php" ); + require_once( 'core' . DIRECTORY_SEPARATOR . 'api.php' ); - if ( ( isset( $f_action ) ) && ( $f_action=="delete" ) ) { + if ( ( isset( $f_action ) ) && ( $f_action== 'delete' ) ) { note_delete( $f_id ); } - if ( ( isset( $f_action ) ) && ( $f_action=="update" ) ) { + if ( ( isset( $f_action ) ) && ( $f_action == 'update' ) ) { note_update( $f_id, $f_email, $f_note ); } @@ -26,9 +26,8 @@ print_body_top(); print_header( $g_page_title ); print_top_page( $g_top_page_inc ); + print_admin_menu (); ?> - -<br /> <div align="center"> <a href="<?php echo $f_url ?>"><?php echo $s_back_link ?></a> <br /> Index: admin_pending.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_pending.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- admin_pending.php 11 Sep 2002 09:49:54 -0000 1.2 +++ admin_pending.php 14 Sep 2002 15:19:12 -0000 1.3 @@ -25,7 +25,7 @@ $result = note_queue( false ); - echo '<br />'; + echo '<div align="center">'; $t_last_page = ''; $t_count = 0; while( $row = db_fetch_array( $result ) ) { Index: index.html =================================================================== RCS file: /cvsroot/webnotes/webnotes/index.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- index.html 5 Sep 2002 06:25:19 -0000 1.5 +++ index.html 14 Sep 2002 15:19:12 -0000 1.6 @@ -1,8 +1,8 @@ <html> <head> - <meta http-equiv="Refresh" content="0;URL=admin.php" /> + <meta http-equiv="Refresh" content="0;URL=login_page.php" /> </head> <body> - <a href="admin.php">click here</a> + <a href="login_page.php">click here</a> </body> </html> Index: login_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/login_page.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- login_page.php 14 Sep 2002 06:22:02 -0000 1.14 +++ login_page.php 14 Sep 2002 15:19:12 -0000 1.15 @@ -15,6 +15,8 @@ login_cookie_check( $g_admin_page ); } + $f_msg = gpc_get_string( 'f_msg', '' ); + print_html_top(); print_head_top(); print_title( $g_window_title ); @@ -25,6 +27,15 @@ print_header( $g_page_title ); print_top_page( $g_top_page_inc ); + if ( $f_msg === 'error' ) { + echo <<<EOT + <div class="warning" align="center"> + <strong>ERROR:</strong> Unauthorised access for supplied user name and password. + </div> + <br /> +EOT; + } + # Warning, if plain passwords are selected if ( config_get( 'auth_type' ) == AUTH_PLAIN ) { echo <<<EOT @@ -35,7 +46,7 @@ EOT; } - # @@@@ Generate a warning if administrator/root is valid. + # Generate a warning if administrator/root is valid. if ( access_verify_login( 'administrator', 'root' ) ) { echo <<<EOT <div class="warning" align="center"> @@ -46,7 +57,6 @@ } echo <<<EOT - <br /> <div align="center"> <form method="post" action="$g_login"> <table width="40%" bgcolor="$g_table_border_color" cellspacing="1" border="0"> @@ -65,7 +75,7 @@ <td>$s_save_login:</td> <td><input type="checkbox" name="f_perm_login" /></td> </tr> - <tr bgcolor="echo $g_white_color"> + <tr bgcolor="$g_white_color"> <td align="center" colspan="2"><input type="submit" value="$s_login_button" /></td> </tr> </table> --- admin.php DELETED --- |
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv8861/core Modified Files: access_api.php api.php config_api.php config_inc.php constants_inc.php css_inc.php html_api.php Log Message: - Fixed 0000011: Support MD5 password encryption (includes db change) - Fixed 0000043: Support Plain Passwords - Fixed 0000044: Warning if administrator/root account still enabled - Fixed 0000045: Administrator Account Details (includes db change) - Added db_upgrade.sql - Included the meta tags in some pages. - Some cleanup of the login pages (there is still a problem with login!!) Index: access_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/access_api.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- access_api.php 11 Sep 2002 09:49:54 -0000 1.2 +++ access_api.php 14 Sep 2002 06:22:03 -0000 1.3 @@ -10,13 +10,44 @@ ### -------------------- function password_match( $p_test_password, $p_password ) { - $salt = substr( $p_password, 0, 2 ); - if ( crypt( $p_test_password, $salt ) == $p_password ) { - return true; - } - else { - return false; + switch( config_get( 'auth_type' ) ) { + case AUTH_PLAIN: + return ( strcmp( $p_test_password, $p_password ) == 0 ); + + case AUTH_CRYPT: + $salt = substr( $p_password, 0, 2 ); + return ( crypt( $p_test_password, $salt ) == $p_password ); + + case AUTH_MD5: + return ( md5( $p_test_password ) == $p_password ); + + default: + # @@@@ Replace with proper error + echo "Invalid authentication type"; + exit; + } // switchconfig_get()) { + } + ### -------------------- + function access_verify_login( $p_username, $p_password ) { + global $g_phpWN_user_table; + + $c_username = db_prepare_string( $p_username ); + + ### get user info + $query = "SELECT * + FROM $g_phpWN_user_table + WHERE username='$c_username'"; + $result = db_query( $query ); + $row = db_fetch_array( $result ); + + if ( $row ) { + extract( $row, EXTR_PREFIX_ALL, 'v' ); + } else { + ### invalid login, retry + return (false); } + + return ( password_match( $p_password, $v_password ) ); } ### -------------------- function create_random_password( $p_email ) { @@ -26,8 +57,7 @@ } ### -------------------- function is_moderator() { - global $g_string_cookie_val, $g_phpWN_user_table, - $g_hostname, $g_db_username, $g_db_password, $g_database_name; + global $g_string_cookie_val, $g_phpWN_user_table; $query = "SELECT COUNT(*) FROM $g_phpWN_user_table @@ -41,26 +71,18 @@ ### checks to see that a user is logged in ### if the user is and the account is enabled then let them pass ### otherwise redirect them to the login page - function login_cookie_check( $p_redirect_url="" ) { - global $g_string_cookie_val, - $g_login_page, $g_logout, - $g_hostname, $g_db_username, $g_db_password, $g_database_name, - $g_phpWN_user_table; - - ### @@@@@ DISABLE FOR NOW - return; + function login_cookie_check( $p_redirect_url = '' ) { + global $g_string_cookie_val, $g_login_page, $g_logout; ### if logged in if ( isset( $g_string_cookie_val ) ) { if ( empty( $g_string_cookie_val ) ) { - header( "Location: $g_login_page" ); - exit; + util_header_redirect( $g_login_page ); } ### go to redirect if ( !empty( $p_redirect_url ) ) { - header( "Location: $p_redirect_url" ); - exit; + util_header_redirect( $p_redirect_url ); } ### continue with current page else { @@ -69,8 +91,7 @@ } ### not logged in else { - header( "Location: $g_login_page" ); - exit; + util_header_redirect( $g_login_page ); } } ### -------------------- Index: api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/api.php,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- api.php 13 Sep 2002 07:17:53 -0000 1.19 +++ api.php 14 Sep 2002 06:22:03 -0000 1.20 @@ -28,7 +28,7 @@ # Filenames $g_login = $g_web_directory . 'login' . $g_ext; $g_login_page = $g_web_directory . 'login_page' . $g_ext; - $g_login_success_page = $g_web_directory . 'index' . $g_ext; + $g_login_success_page = $g_web_directory . 'admin' . $g_ext; $g_logout = $g_web_directory . 'logout' . $g_ext; $g_logout_redirect_page = $g_web_directory; @@ -40,6 +40,7 @@ $g_admin_change_password = $g_web_directory . 'admin_change_password' . $g_ext; $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; $g_note_add_page = $g_web_directory . 'note_add_page' . $g_ext; $g_note_preview_page = $g_web_directory . 'note_preview_page' . $g_ext; @@ -65,6 +66,9 @@ require_once( $t_path_core . 'gpc_api.php' ); require_once( $t_path_main . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $g_theme . DIRECTORY_SEPARATOR . 'theme_api.php' ); + + # Cookies + $g_string_cookie_val = gpc_get_cookie( $g_string_cookie, '' ); ########################################################################### ### END ### Index: config_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/config_api.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- config_api.php 11 Sep 2002 09:49:54 -0000 1.2 +++ config_api.php 14 Sep 2002 06:22:03 -0000 1.3 @@ -76,4 +76,4 @@ exit; } } -?> \ No newline at end of file +?> Index: config_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/config_inc.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- config_inc.php 11 Sep 2002 14:33:59 -0000 1.14 +++ config_inc.php 14 Sep 2002 06:22:03 -0000 1.15 @@ -61,10 +61,6 @@ ### Cookies $g_string_cookie = 'PHPWEBNOTES_COOKIE_STRING'; - $g_string_cookie_val = ''; - if ( isset( $HTTP_COOKIE_VARS[$g_string_cookie] ) ) { - $g_string_cookie_val = $HTTP_COOKIE_VARS[$g_string_cookie]; - } ################## # TIME SETTINGS @@ -129,4 +125,11 @@ ######################## $g_auto_accept_notes = OFF; + + ################################ + # SECURITY AND AUTHENTICATION + ################################ + + # AUTH_MD5, AUTH_CRYPT, AUTH_PLAIN + $g_auth_type = AUTH_PLAIN; ?> Index: constants_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/constants_inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- constants_inc.php 11 Sep 2002 09:49:54 -0000 1.2 +++ constants_inc.php 14 Sep 2002 06:22:03 -0000 1.3 @@ -14,4 +14,9 @@ define( 'ON', 1 ); define( 'OFF', 0 ); + + # Authentication Types + define( 'AUTH_PLAIN', 0 ); + define( 'AUTH_CRYPT', 1 ); + define( 'AUTH_MD5', 2 ); ?> Index: css_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/css_inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- css_inc.php 11 Sep 2002 09:49:54 -0000 1.2 +++ css_inc.php 14 Sep 2002 06:22:03 -0000 1.3 @@ -14,4 +14,5 @@ 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.warning {background-color: #f8e0e0; border: 1px solid #aa4444; padding: 8px;} </style> Index: html_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/html_api.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- html_api.php 10 Sep 2002 01:14:35 -0000 1.3 +++ html_api.php 14 Sep 2002 06:22:03 -0000 1.4 @@ -21,12 +21,18 @@ echo "<title>$p_title</title>"; } ### -------------------- - function print_css( $p_css="" ) { + function print_css( $p_css = '' ) { if ( !empty( $p_css ) && file_exists( $p_css ) ) { include( $p_css ); } } ### -------------------- + function print_meta_inc( $p_meta_inc = '' ) { + if ( !empty( $p_meta_inc ) && file_exists( $p_meta_inc ) ) { + include( $p_meta_inc ); + } + } + ### -------------------- function print_header_redirect( $p_url ) { $t_use_iis = config_get( 'use_iis'); @@ -57,7 +63,7 @@ echo '<body>'; } ### -------------------- - function print_header( $p_title="" ) { + function print_header( $p_title = '' ) { echo "<h3>$p_title</h3>"; } ### -------------------- @@ -74,9 +80,9 @@ } ### -------------------- function print_footer( $p_file ) { - global $g_string_cookie_val, $g_webmaster_email; + global $g_webmaster_email; - echo '<hr size=1 />'; + echo '<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>"; @@ -96,10 +102,8 @@ ### -------------------- ### checks to see whether we need to be displaying the version number function print_phpWebNotes_version() { - global $g_phpWebNotes_version, $g_show_version; - - if ( ON == $g_show_version ) { - echo "<em>phpWebNotes - $g_phpWebNotes_version</em>"; + if ( ON == config_get( 'show_version' ) ) { + echo '<em>phpWebNotes - ' . config_get( 'phpWebNotes_version' ) . '</em>'; } } ### -------------------- |
From: <vb...@us...> - 2002-09-14 06:22:06
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv8861 Modified Files: admin.php login.php login_page.php logout.php Log Message: - Fixed 0000011: Support MD5 password encryption (includes db change) - Fixed 0000043: Support Plain Passwords - Fixed 0000044: Warning if administrator/root account still enabled - Fixed 0000045: Administrator Account Details (includes db change) - Added db_upgrade.sql - Included the meta tags in some pages. - Some cleanup of the login pages (there is still a problem with login!!) Index: admin.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- admin.php 11 Sep 2002 09:49:54 -0000 1.14 +++ admin.php 14 Sep 2002 06:22:02 -0000 1.15 @@ -8,7 +8,7 @@ # $Id$ # -------------------------------------------------------- - require_once( "core" . DIRECTORY_SEPARATOR . "api.php" ); + require_once( 'core' . DIRECTORY_SEPARATOR . 'api.php' ); login_cookie_check(); @@ -18,6 +18,7 @@ print_head_top(); print_title( $g_window_title ); print_css( $g_css_inc_file ); + print_meta_inc( $g_meta_inc_file ); print_head_bottom(); print_body_top(); print_header( $g_page_title ); Index: login.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/login.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- login.php 12 Sep 2002 12:50:22 -0000 1.8 +++ login.php 14 Sep 2002 06:22:02 -0000 1.9 @@ -10,6 +10,10 @@ require_once( 'core' . DIRECTORY_SEPARATOR . 'api.php' ); + $f_username = gpc_get_string( 'f_username' ); + $f_password = gpc_get_string( 'f_password' ); + $f_perm_login = gpc_get_string( 'f_perm_login', 'off' ); + $c_username = db_prepare_string( $f_username ); ### get user info @@ -20,29 +24,34 @@ $row = db_fetch_array( $result ); if ( $row ) { - extract( $row, EXTR_PREFIX_ALL, "v" ); + extract( $row, EXTR_PREFIX_ALL, 'v' ); } else { ### invalid login, retry - header( "Location: $g_login_page?f_msg=error" ); - exit; + util_header_redirect( "$g_login_page?f_msg=error" ); } - + if( password_match( $f_password, $v_password ) ) { ### set permanent cookie (1 year) if ( ( isset( $f_perm_login ) ) && ( $f_perm_login == "on" ) ) { - setcookie( $g_string_cookie, $v_cookie_string, time() + $g_cookie_time_length ); + if ( !setcookie( $g_string_cookie, $v_cookie_string, time() + $g_cookie_time_length ) ) { + # @@@@ Proper error message + echo "Unable to set cookie"; + exit; + } } ### set temp cookie, cookie dies after browser closes else { - setcookie( $g_string_cookie, $v_cookie_string ); + if ( !setcookie( $g_string_cookie, $v_cookie_string ) ) { + # @@@@ Proper error message + echo "Unable to set cookie"; + exit; + } } - header( "Location: $g_admin_page" ); - exit; + util_header_redirect( $g_admin_page ); } else { ### invalid login, retry - header( "Location: $g_login_page?f_msg=error" ); - exit; + util_header_redirect( "$g_login_page?f_msg=error" ); } ?> Index: login_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/login_page.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- login_page.php 11 Sep 2002 09:49:54 -0000 1.13 +++ login_page.php 14 Sep 2002 06:22:02 -0000 1.14 @@ -19,10 +19,31 @@ print_head_top(); print_title( $g_window_title ); print_css( $g_css_inc_file ); + print_meta_inc( $g_meta_inc_file ); print_head_bottom(); print_body_top(); print_header( $g_page_title ); print_top_page( $g_top_page_inc ); + + # Warning, if plain passwords are selected + if ( config_get( 'auth_type' ) == AUTH_PLAIN ) { + echo <<<EOT + <div class="warning" align="center"> + <strong>WARNING:</strong> Plain password authentication is used, this will expose your passwords to administrators. + </div> + <br /> +EOT; + } + + # @@@@ Generate a warning if administrator/root is valid. + if ( access_verify_login( 'administrator', 'root' ) ) { + echo <<<EOT + <div class="warning" align="center"> + <strong>WARNING:</strong> You should disable the "administrator" account or change its password. + </div> + <br /> +EOT; + } echo <<<EOT <br /> Index: logout.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/logout.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- logout.php 11 Sep 2002 09:49:54 -0000 1.12 +++ logout.php 14 Sep 2002 06:22:02 -0000 1.13 @@ -12,6 +12,7 @@ ### remove cookie setcookie( $g_string_cookie ); + util_header_redirect( $g_logout_redirect_page ); print_html_top(); print_head_top(); |
From: <vb...@us...> - 2002-09-14 06:22:06
|
Update of /cvsroot/webnotes/webnotes/sql In directory usw-pr-cvs1:/tmp/cvs-serv8861/sql Modified Files: db_generate.sql Added Files: db_upgrade.sql Log Message: - Fixed 0000011: Support MD5 password encryption (includes db change) - Fixed 0000043: Support Plain Passwords - Fixed 0000044: Warning if administrator/root account still enabled - Fixed 0000045: Administrator Account Details (includes db change) - Added db_upgrade.sql - Included the meta tags in some pages. - Some cleanup of the login pages (there is still a problem with login!!) --- NEW FILE: db_upgrade.sql --- ALTER TABLE `phpwn_user_table` CHANGE `password` `password` VARCHAR( 32 ) NOT NULL Index: db_generate.sql =================================================================== RCS file: /cvsroot/webnotes/webnotes/sql/db_generate.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- db_generate.sql 2 Sep 2002 12:42:13 -0000 1.1 +++ db_generate.sql 14 Sep 2002 06:22:03 -0000 1.2 @@ -51,4 +51,4 @@ # Dumping data for table 'phpWN_user_table' # -INSERT INTO phpWN_user_table VALUES ( '0000000001', 'administrator', 'Wy1r49AOWOdCI', '', '0', '0', '9eCxeTLdGjDpI149f9aca9f0ba076ce2'); \ No newline at end of file +INSERT INTO phpWN_user_table VALUES ( '0000000001', 'administrator', 'Wy1r49AOWOdCI', '', '9', '1', '9eCxeTLdGjDpI149f9aca9f0ba076ce2'); \ No newline at end of file |
From: <vb...@us...> - 2002-09-14 06:22:06
|
Update of /cvsroot/webnotes/webnotes/doc In directory usw-pr-cvs1:/tmp/cvs-serv8861/doc Modified Files: ChangeLog Log Message: - Fixed 0000011: Support MD5 password encryption (includes db change) - Fixed 0000043: Support Plain Passwords - Fixed 0000044: Warning if administrator/root account still enabled - Fixed 0000045: Administrator Account Details (includes db change) - Added db_upgrade.sql - Included the meta tags in some pages. - Some cleanup of the login pages (there is still a problem with login!!) Index: ChangeLog =================================================================== RCS file: /cvsroot/webnotes/webnotes/doc/ChangeLog,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChangeLog 11 Sep 2002 06:45:53 -0000 1.9 +++ ChangeLog 14 Sep 2002 06:22:03 -0000 1.10 @@ -22,6 +22,12 @@ * Added $g_auto_accept_notes to allow auto-accepting of notes (useful for demos and Intranet installations) * Added $g_auto_index_pages to allow auto-indexing for pages which call phpWebNotes but are not indexed. Default is ON. * Added the preview note support + * Added support for MD5 and plain password authentication (with MD5 as the default). + * Changed the encrypted password field size from 16 to 32 characters. + * Added warning to login page, if default account is not disabled. + * Added warning to login page, if plain passwords are used. + * Fixed a problem in db_generate.sql where the administrator account had access level 0 and was not enabled. + * Added db_upgrade.sql to upgrade the db and include the password field change. 03.12.2000 - 1.0.0 |
From: <vb...@us...> - 2002-09-13 07:24:09
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv22855/core Modified Files: api.php note_api.php string_api.php Added Files: gpc_api.php Log Message: Fixed 41: Handling single/double quotes + disabling html tags --- NEW FILE: gpc_api.php --- <?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002 Kenzaburo Ito - ke...@30... # Copyright (C) 2002 Mantis Team - man...@li... # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: gpc_api.php,v 1.1 2002/09/13 07:17:53 vboctor Exp $ # -------------------------------------------------------- ########################################################################### # GET, POST, and Cookie API ########################################################################### # --------------- # Retrieve a GPC variable. # If the variable is not set, the default is returned. # If magic_quotes_gpc is on, slashes will be stripped from the value before being returned. # # You may pass in any variable as a default (including null) but if # you pass in *no* default then an error will be triggered if the field # cannot be found function gpc_get( $p_var_name, $p_default = null ) { # simulate auto-globals from PHP v4.1.0 (see also code in php_api.php) if ( ! php_version_at_least( '4.1.0' ) ) { global $_POST, $_GET; } if ( isset( $_POST[$p_var_name] ) ) { $t_result = gpc_strip_slashes( $_POST[$p_var_name] ); } else if ( isset( $_GET[$p_var_name] ) ) { $t_result = gpc_strip_slashes( $_GET[$p_var_name] ); } else if ( func_num_args() > 1 ) { #check for a default passed in (allowing null) $t_result = $p_default; } else { trigger_error(ERROR_GPC_VAR_NOT_FOUND, ERROR); $t_result = null; } return $t_result; } # ----------------- # Retrieve a string GPC variable. Uses gpc_get(). # If you pass in *no* default, an error will be triggered if # the variable does not exist function gpc_get_string( $p_var_name, $p_default = null ) { # Don't pass along a default unless one was given to us # otherwise we prevent an error being triggered if ( func_num_args() > 1 ) { $t_result = gpc_get( $p_var_name, $p_default ); } else { $t_result = gpc_get( $p_var_name ); } if ( is_array( $t_result ) ) { trigger_error( ERROR_GPC_ARRAY_UNEXPECTED, ERROR ); } return $t_result; } # ------------------ # Retrieve an integer GPC variable. Uses gpc_get(). # If you pass in *no* default, an error will be triggered if # the variable does not exist function gpc_get_int( $p_var_name, $p_default = null ) { # Don't pass along a default unless one was given to us # otherwise we prevent an error being triggered if ( func_num_args() > 1 ) { $t_result = gpc_get( $p_var_name, $p_default ); } else { $t_result = gpc_get( $p_var_name ); } if ( is_array( $t_result ) ) { trigger_error( ERROR_GPC_ARRAY_UNEXPECTED, ERROR ); } return (integer)$t_result; } # ------------------ # Retrieve a boolean GPC variable. Uses gpc_get(). # If you pass in *no* default, false will be used function gpc_get_bool( $p_var_name, $p_default = false ) { $t_result = gpc_get( $p_var_name, $p_default ); if ( $t_result === $p_default ) { return $p_default; } else { if ( is_array( $t_result ) ) { trigger_error( ERROR_GPC_ARRAY_UNEXPECTED, ERROR ); } return gpc_string_to_bool( $t_result ); } } #=================================== # Array Functions #=================================== # ------------------ # Retrieve a atring array GPC variable. Uses gpc_get(). # If you pass in *no* default, an error will be triggered if # the variable does not exist function gpc_get_string_array( $p_var_name, $p_default = null ) { # Don't pass along a default unless one was given to us # otherwise we prevent an error being triggered if ( func_num_args() > 1 ) { $t_result = gpc_get( $p_var_name, $p_default ); } else { $t_result = gpc_get( $p_var_name ); } if ( ! is_array( $t_result ) ) { trigger_error( ERROR_GPC_ARRAY_EXPECTED, ERROR); } return $t_result; } # ------------------ # Retrieve an integer array GPC variable. Uses gpc_get(). # If you pass in *no* default, an error will be triggered if # the variable does not exist function gpc_get_int_array( $p_var_name, $p_default = null ) { # Don't pass along a default unless one was given to us # otherwise we prevent an error being triggered if ( func_num_args() > 1 ) { $t_result = gpc_get( $p_var_name, $p_default ); } else { $t_result = gpc_get( $p_var_name ); } if ( ! is_array( $t_result ) ) { trigger_error( ERROR_GPC_ARRAY_EXPECTED, ERROR); } for ( $i=0 ; $i < sizeof( $t_result ) ; $i++ ) { $t_result[$i] = (integer)$t_result[$i]; } return $t_result; } # ------------------ # Retrieve a boolean array GPC variable. Uses gpc_get(). # If you pass in *no* default, an error will be triggered if # the variable does not exist function gpc_get_bool_array( $p_var_name, $p_default = null ) { # Don't pass along a default unless one was given to us # otherwise we prevent an error being triggered if ( func_num_args() > 1 ) { $t_result = gpc_get( $p_var_name, $p_default ); } else { $t_result = gpc_get( $p_var_name ); } if ( ! is_array( $t_result ) ) { trigger_error( ERROR_GPC_ARRAY_EXPECTED, ERROR); } for ( $i=0 ; $i < sizeof( $t_result ) ; $i++ ) { $t_result[$i] = gpc_string_to_bool( $t_result[$i] ); } return $t_result; } #=================================== # Cookie Functions #=================================== # ------------------ # Retrieve a cookie variable # You may pass in any variable as a default (including null) but if # you pass in *no* default then an error will be triggered if the cookie # cannot be found function gpc_get_cookie( $p_var_name, $p_default = null ) { # simulate auto-globals from PHP v4.1.0 (see also code in php_api.php) if ( ! php_version_at_least( '4.1.0' ) ) { global $_COOKIE; } if ( isset( $_COOKIE[$p_var_name] ) ) { $t_result = gpc_strip_slashes( $_COOKIE[$p_var_name] ); } else if ( func_num_args() > 1 ) { #check for a default passed in (allowing null) $t_result = $p_default; } else { trigger_error(ERROR_GPC_VAR_NOT_FOUND, ERROR); $t_result = null; } return $t_result; } #=================================== # Helper Functions #=================================== # ------------------ # Convert a string to a bool function gpc_string_to_bool( $p_string ) { if ( 0 == strcasecmp( 'off', $p_string ) || 0 == strcasecmp( 'no', $p_string ) || 0 == strcasecmp( 'false', $p_string ) || 0 == strcasecmp( '0', $p_string ) ) { return false; } else { return true; } } # ------------------ # Strip slashes if necessary (supports arrays) function gpc_strip_slashes( $p_var ) { if (get_magic_quotes_gpc() == 0) { return $p_var; } else if ( ! is_array( $p_var ) ){ return stripslashes( $p_var ); } else { for ( $i=0 ; $i < sizeof( $p_var ) ; $i++ ) { $p_var[$i] = stripslashes( $p_var[$i] ); return $p_var; } } } ?> Index: api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/api.php,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- api.php 11 Sep 2002 14:33:58 -0000 1.18 +++ api.php 13 Sep 2002 07:17:53 -0000 1.19 @@ -62,6 +62,7 @@ require_once( $t_path_core . 'user_api.php' ); require_once( $t_path_core . 'link_api.php' ); require_once( $t_path_core . 'util_api.php' ); + require_once( $t_path_core . 'gpc_api.php' ); require_once( $t_path_main . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $g_theme . DIRECTORY_SEPARATOR . 'theme_api.php' ); Index: note_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/note_api.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- note_api.php 12 Sep 2002 21:26:28 -0000 1.14 +++ note_api.php 13 Sep 2002 07:17:53 -0000 1.15 @@ -22,9 +22,9 @@ } ### -------------------- function note_add( $p_page_id, $p_email, $p_remote_addr, $p_note ) { - global $g_phpWN_note_table, $g_auto_accept_notes; + global $g_phpWN_note_table; - if ( ON == $g_auto_accept_notes ) { + if ( ON == config_get('auto_accept_notes') ) { $t_visible = 1; } else { $t_visible = 0; @@ -106,10 +106,10 @@ $row = db_fetch_array( $result ); extract( $row, EXTR_PREFIX_ALL, 'v' ); - $info['id'] = db_unprepare_string( $v_id ); - $info['email'] = db_unprepare_string( $v_email ); - $info['note'] = string_preserve_spaces ( db_unprepare_string( $v_note ) ); - + $info['id'] = $v_id; + $info['email'] = $v_email; + $info['note'] = string_preserve_spaces( string_disable_html( $v_note ) ); + #Removed by Remon tell we fix the problem in the sql_to_unix_time #$info['date'] = date( 'M, d Y H:i', sql_to_unix_time( $v_date_submitted ) ); $info['date'] = $v_date_submitted; Index: string_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/string_api.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- string_api.php 11 Sep 2002 09:49:54 -0000 1.3 +++ string_api.php 13 Sep 2002 07:17:53 -0000 1.4 @@ -22,7 +22,7 @@ } ### -------------------- function string_display_with_br( $p_string ) { - return str_replace( "<br>", "<br>", htmlspecialchars(stripslashes( $p_string ))); + return str_replace( "<br>", "<br />", htmlspecialchars(stripslashes( $p_string ))); } ### -------------------- function string_edit( $p_string ) { @@ -32,7 +32,6 @@ # return just the URL portion of the file path function string_get_url( $p_page ) { global $DOCUMENT_ROOT; - return substr( $p_page, strlen($DOCUMENT_ROOT), strlen($p_page)); } ### -------------------- @@ -41,4 +40,11 @@ return str_replace( " ", " ", $p_string ); } ### -------------------- + function string_to_form( $p_string ) { + return htmlspecialchars( addslashes( $p_string ) ); + } + ### -------------------- + function string_disable_html( $p_string ) { + return str_replace(array('<', '>'), array('<', '>'), $p_string ); + } ?> |
From: <vb...@us...> - 2002-09-13 07:24:09
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv22855 Modified Files: note_add.php note_preview_page.php Log Message: Fixed 41: Handling single/double quotes + disabling html tags Index: note_add.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/note_add.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- note_add.php 11 Sep 2002 09:49:54 -0000 1.13 +++ note_add.php 13 Sep 2002 07:17:53 -0000 1.14 @@ -10,6 +10,11 @@ require_once( 'core' . DIRECTORY_SEPARATOR . 'api.php' ); + $f_page_id = gpc_get_int( 'f_page_id' ); + $f_email = stripslashes( gpc_get_string( 'f_email' ) ); + $f_note = stripslashes( gpc_get_string( 'f_note' ) ); + $f_url = gpc_get_string( 'f_url' ); + ### insert note $result = note_add( $f_page_id, $f_email, $REMOTE_ADDR, $f_note); Index: note_preview_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/note_preview_page.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- note_preview_page.php 12 Sep 2002 12:50:23 -0000 1.3 +++ note_preview_page.php 13 Sep 2002 07:17:53 -0000 1.4 @@ -27,6 +27,12 @@ <br /> EOT; + $f_page_id = gpc_get_int( 'f_page_id' ); + $f_email = string_disable_html( gpc_get_string( 'f_email' ) ); + $f_note = string_disable_html( gpc_get_string( 'f_note' ) ); + $f_came_from = gpc_get_string( 'f_came_from' ); + $f_url = gpc_get_string( 'f_url' ); + $t_note['id'] = '0'; $t_note['email']= $f_email; $t_note['date'] = date ($g_date_format); @@ -37,16 +43,19 @@ theme_notes_echo( $t_page, $f_url, $t_note, true ); theme_notes_end( $t_page, $f_url, true ); + $f_email = string_to_form( $f_email ); + $f_note = string_to_form( $f_note ); + echo <<<EOT <form method="post" action="note_add.php"> <input type="hidden" name="f_came_from" value="$f_came_from" /> <input type="hidden" name="f_page_id" value="$f_page_id" /> <input type="hidden" name="f_url" value="$f_url" /> - + <input type="hidden" name="f_email" value="$f_email" /> - <input type="hidden" name="f_note" value="$f_note" /> - + <input type="hidden" name="f_note" value="$f_note" /> + <table width="100%"> <tr bgcolor="$g_white_color"> <td colspan="2" align="center" width="80%"><input type="submit" value="Submit" /> |
From: <vb...@us...> - 2002-09-13 04:05:37
|
Update of /cvsroot/webnotes/web In directory usw-pr-cvs1:/tmp/cvs-serv22489 Modified Files: cvs.php demo.php download.php index.php links.php localization.php Log Message: - Changed some files to use styles rather than hard-coding the formatting. - Used "section" style rather than "page_title" when appropriate. Index: cvs.php =================================================================== RCS file: /cvsroot/webnotes/web/cvs.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- cvs.php 8 Sep 2002 06:12:53 -0000 1.3 +++ cvs.php 12 Sep 2002 22:10:09 -0000 1.4 @@ -2,8 +2,10 @@ <span class="page_title">CVS</span> <hr size="1" noshade="noshade" width="100%"> -<p>phpWebNotes uses <a href="http://www.cyclic.com/">CVS</a> to store and control its source code. Anonymous cvs access allows anyone to download the most current snapshot of the code. Be warned: the latest build may not always function correctly.</p> +<p>phpWebNotes uses <a href="http://www.cvshome.org/">CVS</a> to store and control its source code. Anonymous cvs access allows anyone to download the most current snapshot of the code. Be warned: the latest build may not always function correctly.</p> <p>Follow the link and follow the commands there. The module name you want to use is <em>webnotes</em>.</p> -<p align="center"><a href="http://sourceforge.net/cvs/?group_id=15381"><strong>phpWebNotes CVS</strong></a></p> +<span class="center_link"> +<p align="center"><a href="http://sourceforge.net/cvs/?group_id=15381">phpWebNotes CVS</a></p> +</span> <?php include('footer.php') ?> Index: demo.php =================================================================== RCS file: /cvsroot/webnotes/web/demo.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- demo.php 12 Sep 2002 14:04:13 -0000 1.5 +++ demo.php 12 Sep 2002 22:10:09 -0000 1.6 @@ -5,10 +5,12 @@ <p>We have put together a demo with a couple of documents enabling the viewers to contribute comments to. For this demo we have disabled the queueing / approval process in order for the comments to appear right away. In a real system, the administrator might like to have such comments moderated first before appearing on the website (which can be done using phpWebNotes).</p> +<span class="center_link"> <p align="center"> <a href="http://webnotes.sourceforge.net/webnotes/demo/">phpWebNotes v1.0.0</a><br /> <a href="http://webnotes.sourceforge.net/phpWebNotes-2.0.0-dev/sample/xml.php">phpWebNotes v2.0.0-dev</a> </p> +</span> <p>For a live example of what can be done using phpWebNotes, visit <a href="http://www.php.net/manual/en">PHP Manual</a>, where users are allowed to contribute notes to any of the manual's pages. Note that PHP site is not using phpWebNotes, however, phpWebNotes allows you to achieve exactly the same functionality.</p> Index: download.php =================================================================== RCS file: /cvsroot/webnotes/web/download.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- download.php 9 Sep 2002 04:19:57 -0000 1.4 +++ download.php 12 Sep 2002 22:10:09 -0000 1.5 @@ -5,13 +5,13 @@ <p>Use the link below to visit the download site for phpWebNotes. The package is kept in .tar.gz which any reasonable (unix systems, UltimateZip, Winzip, StuffIt) decompression program can handle.</p> -<p align="center"><a href="http://sourceforge.net/project/showfiles.php?group_id=15381"><strong>Download phpWebNotes</strong></a></p> +<span class="center_link"> +<p align="center"><a href="http://sourceforge.net/project/showfiles.php?group_id=15381">Download phpWebNotes</a></p> +</span> <p>Please check out the <a href="release.php">Release Notes</a> for important notices and information.</p> -<span class="page_title">Mirroring</span> -<hr size="1" noshade="noshade" width="100%"> - +<span class="section">Mirroring</span> <p>It is recommended to sign up on the <a href="mailinglists.php">announcements</a> mailing list, if you wish to mirror the software. You should also have a link back to this page.</p> <?php include('footer.php') ?> Index: index.php =================================================================== RCS file: /cvsroot/webnotes/web/index.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- index.php 9 Sep 2002 04:03:45 -0000 1.5 +++ index.php 12 Sep 2002 22:10:09 -0000 1.6 @@ -1,18 +1,18 @@ <?php include('header.php') ?> -<span class="page_title">What is it?</span> +<span class="page_title">Home</span> <hr size="1" noshade="noshade" width="100%"> +<span class="section">What is it?</span> + <p>phpWebNotes is a php based solution to letting users contribute their own comments to a document.</p> <p>This project was originally conceived to help people who maintain technical help documents and how-tos. It is more direct than searching through a forum and less involving for the users than signing up for a mailing list. Of course, it adapts to other uses extremely easily.</p> <p>Updating documents is tedious and a lot of documents lack the real world examples and experience to make them truly useful. The best help sites we ever found had not only detailed documentation but lots and lots of examples and problems and quirks that appear in real life. Unfortunately this rules out almost all man pages (unix help docs). Allowing user comments lets the doc maintainer do less work. Whenever the maintainer needs to update the document they can just roll in user feedback instead of recreating the information. This sort of automation cuts down on email and mailing list traffic as well.</p> -<span class="page_title">Goals</span> -<hr size="1" noshade="noshade" width="100%"> +<span class="section">Goals</span> <p>A simple way to allow users to contribute their comments to any document. We would like to see this used in particular for HOW-TO, help files, and online documentation (see <a href="http://www.php.net/manual/en/">PHP manual</a> for an excellent example).</p> -<span class="page_title">Requirements</span> -<hr size="1" noshade="noshade" width="100%"> +<span class="section">Requirements</span> <p>Following are the required software modules to be able to install phpWebNotes:</p> <ul> <li><a href="http://www.php.net/">PHP</a> 4.0.6 and higher</li> @@ -22,8 +22,7 @@ <p>Additionally you will need to know basic administration of MySQL (login, create new database, run a SQL query). We strongly recommend using <a href="http://phpMyAdmin.sf.net">phpMyAdmin</a> to accomplish the database administration task. The webserver needs to be configured to handle php files at a minimum.</p> <p>It also helps a great deal to at least be able to tinker with php scripts (when there's a little bug or you want to tweak something). Of course, knowing HTML is essential to do any custom formatting. Along the lines of appearance, we attempt to use our best judgement in colors, layout, and feel. Eventually we aim to be able to customize the look and feel from a single CSS file.</p> -<span class="page_title">Features and Benefits</span> -<hr size="1" noshade="noshade" width="100%"> +<span class="section">Features and Benefits</span> <p>Following are some of the nice features of phpWebNotes:</p> <ul> <li>Web based and platform independent</li> @@ -32,17 +31,14 @@ <li>Takes two lines of php to add notes to a file</li> </ul> -<span class="page_title">Upcoming Features</span> -<hr size="1" noshade="noshade" width="100%"> +<span class="section">Upcoming Features</span> <p>Check the <a href="roadmap.php">Roadmap</a> for a more detailed and up to date list of features.</p> -<span class="page_title">Versioning</span> -<hr size="1" noshade="noshade" width="100%"> +<span class="section">Versioning</span> <p>The release numbering convention used for phpWebNotes is major.minor.micro. Major indicates a large change in the core package, minor a significant amount of feature addition/modification, micro for mostly bug fixes. A database change always requires a change in major release.</p> -<span class="page_title">How to help?</span> -<hr size="1" noshade="noshade" width="100%"> +<span class="section">How to help?</span> <ul> <li>Report any bugs at the <a href="bugtracker.php">Bugtracker</a></li> <li>Suggest (generic) features that would add value to the product.</li> Index: links.php =================================================================== RCS file: /cvsroot/webnotes/web/links.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- links.php 9 Sep 2002 04:03:45 -0000 1.2 +++ links.php 12 Sep 2002 22:10:09 -0000 1.3 @@ -1,8 +1,9 @@ <?php include('header.php') ?> -<span class="page_title">Users' Links</span> +<span class="page_title">Links</span> <hr size="1" noshade="noshade" width="100%"> +<span class="section">Users' Links</span> <ul> <li><a href="http://www.php.net">http://www.php.net</a> - PHP website</li> <li><a href="http://www.mysql.com">http://www.mysql.com</a> - MySQL Server</li> @@ -11,9 +12,7 @@ <li><a href="http://www.ultimatezip.com">http://www.ultimatezip.com</a> - UltimateZip for extracting phpWebNotes releases (needed for Windows users). Other tools like WinZip and StuffIt can also be used.</li> </ul> -<span class="page_title">Developers' Links</span> -<hr size="1" noshade="noshade" width="100%"> - +<span class="section">Developers' Links</span> <ul> <li><a href="http://www.cvsgui.org">http://www.cvsgui.org</a> - WinCVS website for Windows users.</li> <li><a href="http://filezilla.sf.net">http://filezilla.sf.net</a> - FileZilla for accessing SourceForge webservers (SFTP).</li> Index: localization.php =================================================================== RCS file: /cvsroot/webnotes/web/localization.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- localization.php 9 Sep 2002 14:25:41 -0000 1.5 +++ localization.php 12 Sep 2002 22:10:09 -0000 1.6 @@ -6,13 +6,12 @@ function print_lang( $p_language, $p_version, $p_state ) { global $g_webnotes_url; - $t_filename = 'strings_' . strtolower( $p_language ) . '.php'; + $t_filename = 'strings_' . strtolower( $p_language ) . '.phps'; $t_path = $g_webnotes_url . 'lang/' . $t_filename; # $t_link = cvs_get_link( 'webnotes', 'webnotes', $t_path ); $t_link = $t_path; echo "<li>$p_language (<a href=\"$t_link\" target=\"_new\">$t_filename</a>)</li>"; - } ?> <span class="page_title">Localization</span> @@ -29,8 +28,6 @@ </ul> <br /> <span class="section">Translating</span> -<hr size="1" noshade="noshade" width="100%"> - <p>Don't see your language? Translate one of the files! It's really quite simple. Just take the strings file and convert away. Then <a href="bugtracker.php">submit it</a> back to me. Also, you can update them when new strings make it in. The file won't change drastically so it shouldn't be too much work to keep the files updated.</p> <?php include('footer.php') ?> |
From: <vb...@us...> - 2002-09-13 03:38:42
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv8378 Modified Files: note_api.php Log Message: Fixed a problem where <br /> and <pre> were both used. Index: note_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/note_api.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- note_api.php 11 Sep 2002 10:00:38 -0000 1.13 +++ note_api.php 12 Sep 2002 21:26:28 -0000 1.14 @@ -108,7 +108,7 @@ $info['id'] = db_unprepare_string( $v_id ); $info['email'] = db_unprepare_string( $v_email ); - $info['note'] = nl2br( string_preserve_spaces ( db_unprepare_string( $v_note ) ) ); + $info['note'] = string_preserve_spaces ( db_unprepare_string( $v_note ) ); #Removed by Remon tell we fix the problem in the sql_to_unix_time #$info['date'] = date( 'M, d Y H:i', sql_to_unix_time( $v_date_submitted ) ); |
From: <vb...@us...> - 2002-09-12 14:04:16
|
Update of /cvsroot/webnotes/web In directory usw-pr-cvs1:/tmp/cvs-serv10424 Modified Files: demo.php Log Message: - Added link to phpWebNotes-2.0.0-dev demo and fixed a typo. Index: demo.php =================================================================== RCS file: /cvsroot/webnotes/web/demo.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- demo.php 9 Sep 2002 03:52:36 -0000 1.4 +++ demo.php 12 Sep 2002 14:04:13 -0000 1.5 @@ -3,10 +3,15 @@ <span class="page_title">Demo</span> <hr size="1" noshade="noshade" width="100%"> -<p>We have put together a <a href="http://webnotes.sourceforge.net/webnotes/demo/">demo</a> with a couple of documents enabling the viewers to contribute comments to. For this demo we have disabled the queueing / approval process in order for the comments to appear right away. In a real system, the administrator might like to have such comments moderated first before appearing on the website (which can be done using phpWebNotes).</p> +<p>We have put together a demo with a couple of documents enabling the viewers to contribute comments to. For this demo we have disabled the queueing / approval process in order for the comments to appear right away. In a real system, the administrator might like to have such comments moderated first before appearing on the website (which can be done using phpWebNotes).</p> + +<p align="center"> +<a href="http://webnotes.sourceforge.net/webnotes/demo/">phpWebNotes v1.0.0</a><br /> +<a href="http://webnotes.sourceforge.net/phpWebNotes-2.0.0-dev/sample/xml.php">phpWebNotes v2.0.0-dev</a> +</p> <p>For a live example of what can be done using phpWebNotes, visit <a href="http://www.php.net/manual/en">PHP Manual</a>, where users are allowed to contribute notes to any of the manual's pages. Note that PHP site is not using phpWebNotes, however, phpWebNotes allows you to achieve exactly the same functionality.</p> -<p>If you have questions or feeback please discuss it on the <a href="mailinglists.php">Mailing Lists</a>.</p> +<p>If you have questions or feedback please discuss it on the <a href="mailinglists.php">Mailing Lists</a>.</p> <?php include('footer.php') ?> |
From: <vb...@us...> - 2002-09-12 13:31:50
|
Update of /cvsroot/webnotes/webnotes/themes/phpnet/images In directory usw-pr-cvs1:/tmp/cvs-serv31239/themes/phpnet/images Added Files: notes_about.gif Log Message: - Added the sf logo to the sample pages. - Changed the sample pages to use logical names rather than __FILE__. - Added the ? picture to the notes + other minor tweaks. ? is not yet hyperlinked. --- NEW FILE: notes_about.gif --- (This appears to be a binary file; contents omitted.) |
From: <vb...@us...> - 2002-09-12 13:31:49
|
Update of /cvsroot/webnotes/webnotes/themes/phpnet In directory usw-pr-cvs1:/tmp/cvs-serv31239/themes/phpnet Modified Files: theme_api.php Log Message: - Added the sf logo to the sample pages. - Changed the sample pages to use logical names rather than __FILE__. - Added the ? picture to the notes + other minor tweaks. ? is not yet hyperlinked. Index: theme_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/themes/phpnet/theme_api.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- theme_api.php 12 Sep 2002 12:50:23 -0000 1.9 +++ theme_api.php 12 Sep 2002 13:31:46 -0000 1.10 @@ -41,6 +41,7 @@ $url = $g_web_directory . '/themes/' . $g_theme . '/images/'; $add_picture = $url . 'notes_add.gif'; + $help_picture = $url . 'notes_about.gif'; if ( !$p_preview ) { $t_link_start = "<a href=\"$g_note_add_page?f_page_id=$t_page_id&f_url=$c_url\">"; @@ -52,11 +53,10 @@ echo <<<EOT <table border="0" cellpadding="4" cellspacing="0" width="100%"> <tr bgcolor="#d0d0d0" valign="top"> - <td>User Contributed Notes<br /><b>$p_page</b></td> + <td><small>User Contributed Notes</small><br /><strong>$p_page</strong></td> <td align="right"> - $t_link_start - <img src="$add_picture" border="0" width="13" height="13" ALT="add a note"/> - $t_link_end + $t_link_start<img src="$add_picture" border="0" width="13" height="13" alt="Add Notes" />$t_link_end + <img src="$help_picture" border="0" width="13" height="13" alt="About Notes" /> </td> </tr> EOT; @@ -100,7 +100,7 @@ <table border="0" cellpadding="2" cellspacing="0" width="100%"> <tr align="top" bgcolor="#e0e0e0"> <td><b>$t_email</b><br/>$t_date</td> - <td align="right">$t_id</td> + <td align="right"><pre>$t_id</pre></td> </tr> <tr bgcolor="#f0f0f0"> <td colspan="2"><pre>$t_note</pre></td> @@ -117,9 +117,10 @@ $c_url = urlencode( $p_url ); $t_page_id = page_get_id( $p_page ); - + $url = $g_web_directory . '/themes/' . $g_theme . '/images/'; $add_picture = $url . 'notes_add.gif'; + $help_picture = $url . 'notes_about.gif'; if ( !$p_preview ) { $t_link_start = "<a href=\"$g_note_add_page?f_page_id=$t_page_id&f_url=$c_url\">"; @@ -130,9 +131,10 @@ echo <<<EOT <tr bgcolor="#d0d0d0" valign="top"> - <td colspan="2" align="right">$t_link_start - <img src="$add_picture" border="0" width="13" height="13" ALT="add a note" /> - $t_link_end</td> + <td colspan="2" align="right"> + $t_link_start<img src="$add_picture" border="0" width="13" height="13" alt="Add Notes" />$t_link_end + <img src="$help_picture" border="0" width="13" height="13" alt="About Notes" /> + </td> </tr> </table> EOT; |
From: <vb...@us...> - 2002-09-12 13:31:49
|
Update of /cvsroot/webnotes/webnotes/sample In directory usw-pr-cvs1:/tmp/cvs-serv31239/sample Modified Files: webservices.php xml.php Log Message: - Added the sf logo to the sample pages. - Changed the sample pages to use logical names rather than __FILE__. - Added the ? picture to the notes + other minor tweaks. ? is not yet hyperlinked. Index: webservices.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/sample/webservices.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- webservices.php 11 Sep 2002 09:49:54 -0000 1.4 +++ webservices.php 12 Sep 2002 13:31:46 -0000 1.5 @@ -28,7 +28,10 @@ <?php require_once("../core/api.php"); # replace with actual path - print_web_notes( __FILE__, $PHP_SELF ); + print_web_notes( 'Web Services', $PHP_SELF ); ?> + + <br /> + <a href="http://sourceforge.net/projects/webnotes/"><img src="http://sourceforge.net/sflogo.php?group_id=15381&type=5" width="140" height="42" border="0" alt="phpWebNotes @ SourceForge"></a> </body> </html> Index: xml.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/sample/xml.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- xml.php 11 Sep 2002 09:49:54 -0000 1.4 +++ xml.php 12 Sep 2002 13:31:46 -0000 1.5 @@ -21,7 +21,9 @@ <?php require_once("../core/api.php"); # replace with actual path - print_web_notes( __FILE__, $PHP_SELF ); + print_web_notes( 'XML', $PHP_SELF ); ?> + <br /> + <a href="http://sourceforge.net/projects/webnotes/"><img src="http://sourceforge.net/sflogo.php?group_id=15381&type=5" width="140" height="42" border="0" alt="phpWebNotes @ SourceForge"></a> </body> </html> |
From: <vb...@us...> - 2002-09-12 12:50:26
|
Update of /cvsroot/webnotes/webnotes/themes/phpnet In directory usw-pr-cvs1:/tmp/cvs-serv15660/themes/phpnet Modified Files: theme_api.php Log Message: - Enhancing the preview to include the start / end parts - not just the note. - Handled the case of the preview by not display the # 0 and not adding a hyperlink for + images. - Fixing a couple of warnings with the preview page. - Enabled E_ALL in phpapi to show warnings in dependent of the server settings. Index: theme_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/themes/phpnet/theme_api.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- theme_api.php 11 Sep 2002 09:49:55 -0000 1.8 +++ theme_api.php 12 Sep 2002 12:50:23 -0000 1.9 @@ -30,15 +30,9 @@ } # This function is called before printing any notes to the page. - function theme_notes_start( $p_page, $p_url ) { + function theme_notes_start( $p_page, $p_url, $p_preview = false ) { global $g_note_add_page, $s_add_note_link, $s_manage, $s_admin, $g_web_directory, $g_theme; - if ( isset( $p_page ) ) { - $t_page = basename( $p_page ); - } else { - $t_page = "Test Page"; - } - $c_url = urlencode( $p_url ); $t_page_id = page_get_id( $p_page ); @@ -48,12 +42,21 @@ $url = $g_web_directory . '/themes/' . $g_theme . '/images/'; $add_picture = $url . 'notes_add.gif'; + if ( !$p_preview ) { + $t_link_start = "<a href=\"$g_note_add_page?f_page_id=$t_page_id&f_url=$c_url\">"; + $t_link_end = '</a>'; + } else { + $t_link_start = $t_link_end = ''; + } + echo <<<EOT <table border="0" cellpadding="4" cellspacing="0" width="100%"> <tr bgcolor="#d0d0d0" valign="top"> <td>User Contributed Notes<br /><b>$p_page</b></td> - <td align="right"><a href="$g_note_add_page?f_page_id=$t_page_id&f_url=$c_url"> - <img src="$add_picture" border="0" width="13" height="13" ALT="add a note"/></a> + <td align="right"> + $t_link_start + <img src="$add_picture" border="0" width="13" height="13" ALT="add a note"/> + $t_link_end </td> </tr> EOT; @@ -63,10 +66,10 @@ # are all included in the associative array that is passed to the # function. The theme should check that a field is defined in # the array before using it. - function theme_notes_echo( $p_page, $p_url, $p_note_info_array ) { + function theme_notes_echo( $p_page, $p_url, $p_note_info_array, $p_preview = false ) { - if ( isset( $p_note_info_array['id'] ) ) { - $t_id = (integer)$p_note_info_array['id']; + if ( isset( $p_note_info_array['id'] ) && ( $p_note_info_array['id'] != 0 ) ) { + $t_id = '#' . (integer)$p_note_info_array['id']; } else { $t_id = ''; } @@ -92,12 +95,12 @@ echo <<<EOT <tr valign="top"> <td bgcolor="#e0e0e0" colspan="2"> - <a name="#$t_id"></a> + <a name="$t_id"></a> <table border="0" cellpadding="2" cellspacing="0" width="100%"> <tr align="top" bgcolor="#e0e0e0"> <td><b>$t_email</b><br/>$t_date</td> - <td align="right">#$t_id</td> + <td align="right">$t_id</td> </tr> <tr bgcolor="#f0f0f0"> <td colspan="2"><pre>$t_note</pre></td> @@ -109,26 +112,27 @@ } # This function is called after all notes are echo'ed. - function theme_notes_end( $p_page, $p_url ) { + function theme_notes_end( $p_page, $p_url, $p_preview = false ) { global $g_note_add_page, $g_web_directory, $g_theme; - if ( isset( $p_page ) ) { - $t_page = basename( $p_page ); - } else { - $t_page = "Test Page"; - } - $c_url = urlencode( $p_url ); $t_page_id = page_get_id( $p_page ); $url = $g_web_directory . '/themes/' . $g_theme . '/images/'; $add_picture = $url . 'notes_add.gif'; + if ( !$p_preview ) { + $t_link_start = "<a href=\"$g_note_add_page?f_page_id=$t_page_id&f_url=$c_url\">"; + $t_link_end = '</a>'; + } else { + $t_link_start = $t_link_end = ''; + } + echo <<<EOT <tr bgcolor="#d0d0d0" valign="top"> - <td colspan="2" align="right"><a href="$g_note_add_page?f_page_id=$t_page_id&f_url=$c_url"> - <img src="$add_picture" border="0" width="13" height="13" ALT="add a note"/> - </a></td> + <td colspan="2" align="right">$t_link_start + <img src="$add_picture" border="0" width="13" height="13" ALT="add a note" /> + $t_link_end</td> </tr> </table> EOT; @@ -139,8 +143,7 @@ # APIs are not called. function theme_notes_none( $p_page, $p_url ) { theme_notes_start( $p_page, $p_url ); - #theme_notes_end( $p_page, $p_url ); - + echo <<<EOT <tr valign="top"> <td bgcolor="#e0e0e0" colspan="2">There are no user contributed notes for this page. @@ -149,6 +152,7 @@ </table> EOT; } + # This function is called if the current page was not indexed function theme_not_indexed( $p_page ) { } |
From: <vb...@us...> - 2002-09-12 12:50:26
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv15660/core Modified Files: php_api.php Log Message: - Enhancing the preview to include the start / end parts - not just the note. - Handled the case of the preview by not display the # 0 and not adding a hyperlink for + images. - Fixing a couple of warnings with the preview page. - Enabled E_ALL in phpapi to show warnings in dependent of the server settings. Index: php_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/php_api.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- php_api.php 11 Sep 2002 09:49:54 -0000 1.5 +++ php_api.php 12 Sep 2002 12:50:23 -0000 1.6 @@ -17,6 +17,9 @@ # Constant for our minimum required PHP version define( 'PHP_MIN_VERSION', '4.0.6' ); + # Show all errors/warnings/notices independent of php.ini settings + error_reporting ( E_ALL ); + # -------------------- # Returns true if the current PHP version is higher than the one # specified in the given string |
From: <vb...@us...> - 2002-09-12 12:50:26
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv15660 Modified Files: login.php note_preview_page.php Log Message: - Enhancing the preview to include the start / end parts - not just the note. - Handled the case of the preview by not display the # 0 and not adding a hyperlink for + images. - Fixing a couple of warnings with the preview page. - Enabled E_ALL in phpapi to show warnings in dependent of the server settings. Index: login.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/login.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- login.php 11 Sep 2002 09:49:54 -0000 1.7 +++ login.php 12 Sep 2002 12:50:22 -0000 1.8 @@ -27,7 +27,7 @@ exit; } - if( true /* password_match( $f_password, $v_password ) */ ) { + if( password_match( $f_password, $v_password ) ) { ### set permanent cookie (1 year) if ( ( isset( $f_perm_login ) ) && ( $f_perm_login == "on" ) ) { setcookie( $g_string_cookie, $v_cookie_string, time() + $g_cookie_time_length ); Index: note_preview_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/note_preview_page.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- note_preview_page.php 11 Sep 2002 09:49:54 -0000 1.2 +++ note_preview_page.php 12 Sep 2002 12:50:23 -0000 1.3 @@ -18,21 +18,25 @@ print_head_bottom(); print_body_top(); print_header( $g_page_title ); -?> -<p> + echo <<<EOT +<br /> <div align="center"> -<a href="<? echo $HTTP_REFERER?>"><? echo $s_back_link ?></a> + <a href="$HTTP_REFERER">$s_back_link</a> </div> +<br /> +EOT; -<?php $t_note['id'] = '0'; $t_note['email']= $f_email; $t_note['date'] = date ($g_date_format); $t_note['note'] = $f_note; - theme_notes_echo( $p_page_name, $p_url, $t_note ); - + $t_page = page_get_name( $f_page_id ); + theme_notes_start( $t_page, $f_url, true ); + theme_notes_echo( $t_page, $f_url, $t_note, true ); + theme_notes_end( $t_page, $f_url, true ); + echo <<<EOT <form method="post" action="note_add.php"> |
From: <vb...@us...> - 2002-09-12 07:57:36
|
Update of /cvsroot/webnotes/web In directory usw-pr-cvs1:/tmp/cvs-serv14261 Modified Files: header.php Log Message: Fixed: #0000040: Google search showing Mantis Index: header.php =================================================================== RCS file: /cvsroot/webnotes/web/header.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- header.php 9 Sep 2002 14:25:41 -0000 1.5 +++ header.php 12 Sep 2002 07:57:32 -0000 1.6 @@ -26,9 +26,9 @@ <!-- Search Google --> <input class="small" type="text" name="q" size="16" maxlength="255" value="" /> <input class="small" type="submit" name="sa" value="Search" /> -<input class="small" type="hidden" name="cof" value="L:http://mantisbt.sourceforge.net/images/banner.gif;AH:center;AWFID:124d3521c6d75a4f;" /> -<input class="small" type="hidden" name="domains" value="mantisbt.sourceforge.net" /> -<input class="small" type="hidden" name="sitesearch" value="mantisbt.sourceforge.net" checked="checked" /> +<input class="small" type="hidden" name="cof" value="L:http://webnotes.sourceforge.net/images/banner.gif;AH:center;AWFID:124d3521c6d75a4f;" /> +<input class="small" type="hidden" name="domains" value="webnotes.sourceforge.net" /> +<input class="small" type="hidden" name="sitesearch" value="webnotes.sourceforge.net" checked="checked" /> <!-- Search Google --> </form> </td> |
From: <vb...@us...> - 2002-09-12 00:45:45
|
Update of /cvsroot/webnotes/webnotes/themes In directory usw-pr-cvs1:/tmp/cvs-serv9918 Removed Files: theme_api.php Log Message: Remove the theme_api empty skeleton since it can be a maintenance issue --- theme_api.php DELETED --- |