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: <ro...@us...> - 2002-10-29 05:01:30
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv13061 Added Files: .htaccess Log Message: Add .htaccess file, this stuff doesn't need to be browsable by the web --- NEW FILE: .htaccess --- deny from all |
From: <ro...@us...> - 2002-10-29 04:57:53
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv12103 Modified Files: note_add_msg_inc.php Log Message: Change NOSPAM.com references to NOSPAM Index: note_add_msg_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/note_add_msg_inc.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- note_add_msg_inc.php 22 Sep 2002 02:47:16 -0000 1.9 +++ note_add_msg_inc.php 29 Oct 2002 04:57:50 -0000 1.10 @@ -13,9 +13,9 @@ <div class="note"> <p class="title">NOTE</p> <p>You can contribute your insights to this document via your web browser!</p> - <p>Just add your comment and (optional) email address in the form below. If you do specify your real email, anti-spam measures are encouraged (eg. la...@ma...).</p> + <p>Just add your comment and (optional) email address in the form below. If you do specify your real email, anti-spam measures are encouraged (eg. you...@NO...).</p> <p>No HTML tags are allowed. Line breaks are preserved.</p> <p>After you add your note it will be queued for approval by a moderator. Your note may be edited for spelling, grammar, and content.</p> </div> </div> -</div> \ No newline at end of file +</div> |
From: <ro...@us...> - 2002-10-29 04:54:54
|
Update of /cvsroot/webnotes/webnotes/doc In directory usw-pr-cvs1:/tmp/cvs-serv11434 Modified Files: ChangeLog Log Message: Fix dates Index: ChangeLog =================================================================== RCS file: /cvsroot/webnotes/webnotes/doc/ChangeLog,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- ChangeLog 7 Oct 2002 02:54:39 -0000 1.26 +++ ChangeLog 29 Oct 2002 04:54:51 -0000 1.27 @@ -47,10 +47,10 @@ * Added $g_auto_set_email to allow defaulting e-mail for logged in users. * Added support for parent page + APIs to allow easy support for PHP-like Manuals. -03.12.2000 - 1.0.0 +03.12.2001 - 1.0.0 * Rewrite and release -01.01.2000 - 0.9.0 +01.01.2001 - 0.9.0 * Initial release |
From: <vb...@us...> - 2002-10-07 02:54:42
|
Update of /cvsroot/webnotes/webnotes/sql In directory usw-pr-cvs1:/tmp/cvs-serv1320/sql Modified Files: db_upgrade.sql Log Message: - Fixed a problem in the user add if the user was added as not enabled. - 0000079: Add support for protected accounts - Removing of some unnecessary code in user_api.php - User create was hard-coded to add users as enabled. - Changed the version back to 2.0.0-dev. Index: db_upgrade.sql =================================================================== RCS file: /cvsroot/webnotes/webnotes/sql/db_upgrade.sql,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- db_upgrade.sql 6 Oct 2002 15:23:36 -0000 1.8 +++ db_upgrade.sql 7 Oct 2002 02:54:39 -0000 1.9 @@ -11,3 +11,8 @@ ALTER TABLE `phpWN_page_table` ADD INDEX ( `parent_id` ) ; ALTER TABLE `phpWN_page_table` DROP INDEX `id` ; ALTER TABLE `phpWN_note_table` DROP INDEX `id` ; + +# +# Upgrade 2.0.0pr1 to latest +# +ALTER TABLE `phpwn_user_table` ADD `protected` INT( 1 ) DEFAULT '0' NOT NULL AFTER `enabled` ; |
From: <vb...@us...> - 2002-10-07 02:54:42
|
Update of /cvsroot/webnotes/webnotes/doc In directory usw-pr-cvs1:/tmp/cvs-serv1320/doc Modified Files: ChangeLog Log Message: - Fixed a problem in the user add if the user was added as not enabled. - 0000079: Add support for protected accounts - Removing of some unnecessary code in user_api.php - User create was hard-coded to add users as enabled. - Changed the version back to 2.0.0-dev. Index: ChangeLog =================================================================== RCS file: /cvsroot/webnotes/webnotes/doc/ChangeLog,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- ChangeLog 6 Oct 2002 15:23:36 -0000 1.25 +++ ChangeLog 7 Oct 2002 02:54:39 -0000 1.26 @@ -5,6 +5,9 @@ phpWebNotes +??.11-2002 - 2.0.0 + * Added support for protected users. These users are useful for demo account to disallow users from changing password / email / ..etc. + 06.10-2002 - 2.0.0pr1 (2.0.0 pre-release 1) * Fixed bug causing weird "headers already sent in whatever" errors on some servers * convertToPHP3 script removed |
From: <vb...@us...> - 2002-10-07 02:54:42
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv1320/core Modified Files: config_defaults_inc.php constants_inc.php html_api.php user_api.php Log Message: - Fixed a problem in the user add if the user was added as not enabled. - 0000079: Add support for protected accounts - Removing of some unnecessary code in user_api.php - User create was hard-coded to add users as enabled. - Changed the version back to 2.0.0-dev. Index: config_defaults_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/config_defaults_inc.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- config_defaults_inc.php 6 Oct 2002 15:42:13 -0000 1.15 +++ config_defaults_inc.php 7 Oct 2002 02:54:39 -0000 1.16 @@ -12,7 +12,7 @@ # VERSION SETTINGS ##################### - $g_phpWebNotes_version = '2.0.0-pr1'; + $g_phpWebNotes_version = '2.0.0-dev'; ### Display phpWebNotes version on pages $g_show_version = ON; @@ -167,6 +167,7 @@ ACTION_USERS_ADD => ADMINISTRATOR, ACTION_USERS_EDIT => ADMINISTRATOR, ACTION_USERS_EDIT_OWN => REGISTERED, + ACTION_USERS_EDIT_OWN_PROTECTED => ADMINISTRATOR, ACTION_USERS_DELETE => ADMINISTRATOR, ACTION_PAGES_MANAGE => ADMINISTRATOR, ACTION_PAGES_ADD => ADMINISTRATOR, Index: constants_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/constants_inc.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- constants_inc.php 19 Sep 2002 05:15:47 -0000 1.8 +++ constants_inc.php 7 Oct 2002 02:54:39 -0000 1.9 @@ -53,7 +53,8 @@ define( 'ACTION_USERS_ADD', 102 ); define( 'ACTION_USERS_EDIT', 103 ); define( 'ACTION_USERS_EDIT_OWN', 104 ); - define( 'ACTION_USERS_DELETE', 105 ); + define( 'ACTION_USERS_EDIT_OWN_PROTECTED', 105 ); + define( 'ACTION_USERS_DELETE', 106 ); define( 'ACTION_PAGES_MANAGE', 201 ); define( 'ACTION_PAGES_ADD', 202 ); Index: html_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/html_api.php,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- html_api.php 6 Oct 2002 15:23:36 -0000 1.20 +++ html_api.php 7 Oct 2002 02:54:39 -0000 1.21 @@ -126,7 +126,17 @@ if ( access_check_action( ACTION_USERS_MANAGE ) ) { echo "<a title=\"View/edit user information\" href=\"$g_admin_manage_users\">$s_manage_users</a> :: "; } - if ( access_check_action( ACTION_USERS_EDIT_OWN ) ) { + + $row = user_get_info( user_where_current() ); + extract( $row, EXTR_PREFIX_ALL, 'v' ); + + if ( 1 == $v_protected ) { + $t_action = ACTION_USERS_EDIT_OWN_PROTECTED; + } else { + $t_action = ACTION_USERS_EDIT_OWN; + } + + if ( access_check_action( $t_action ) ) { echo "<a title=\"Change your own password\" href=\"$g_admin_change_password\">$s_change_password</a> :: "; } Index: user_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/user_api.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- user_api.php 1 Oct 2002 02:20:43 -0000 1.14 +++ user_api.php 7 Oct 2002 02:54:39 -0000 1.15 @@ -13,7 +13,7 @@ ########################################################################### ### -------------------- - function user_create( $p_username, $p_password, $p_email, $p_access_level = null, $p_enabled = true ) { + function user_create( $p_username, $p_password, $p_email, $p_access_level = null, $p_enabled = true, $p_protected = false ) { if ( false !== user_get_info( user_where_username_equals( $p_username ) ) ) { echo "<p>Duplicate user.</p>"; return false; @@ -31,13 +31,15 @@ $c_username = db_prepare_string( $p_username ); $c_email = db_prepare_string( $p_email ); $c_encrypted_password = db_prepare_string( access_encrypt_password( $p_password ) ); + $c_enabled = db_prepare_int( $p_enabled ); + $c_protected = db_prepare_int( $p_protected ); $t_seed = $p_email . $p_username; $t_cookie_string = create_cookie_string( $t_seed ); $c_cookie_string = db_prepare_string( $t_cookie_string ); - $query = "INSERT INTO phpWN_user_table (username, password, email, cookie_string, access_level, enabled) - VALUES ('$c_username', '$c_encrypted_password', '$c_email', '$c_cookie_string', '$p_access_level', 1)"; + $query = "INSERT INTO phpWN_user_table (username, password, email, cookie_string, access_level, enabled, protected) + VALUES ('$c_username', '$c_encrypted_password', '$c_email', '$c_cookie_string', $p_access_level, $c_enabled, $c_protected)"; $result = mysql_query($query); return( false !== $result ); @@ -184,7 +186,7 @@ ### -------------------- # we assume that the password has been checked for accuracy # we assume that the enabled value is 0 or 1 - function user_update( $p_user_id, $p_email, $p_password, $p_access_level, $p_enabled ) { + function user_update( $p_user_id, $p_email, $p_password, $p_access_level, $p_enabled, $p_protected ) { global $g_phpWN_user_table; if ( empty( $p_password ) ) { @@ -194,24 +196,29 @@ $c_password = db_prepare_string( access_encrypt_password( $p_password ) ); } + $c_user_id = db_prepare_int( $p_user_id ); $c_email = db_prepare_string( $p_email ); $c_access_level = db_prepare_string( $p_access_level ); $c_enabled = db_prepare_string( $p_enabled ); + $c_protected = db_prepare_string( $p_protected ); $query = "UPDATE $g_phpWN_user_table SET email='$c_email', password='$c_password', - access_level='$c_access_level', - enabled='$p_enabled' - WHERE id='$p_user_id'"; + access_level=$c_access_level, + enabled=$c_enabled, + protected=$c_protected + WHERE id=$c_user_id"; return db_query( $query ); } ### -------------------- function user_delete( $p_user_id ) { global $g_phpWN_user_table; + $c_user_id = db_prepare_int( $p_user_id ); + $query = "DELETE FROM $g_phpWN_user_table - WHERE id='$p_user_id'"; + WHERE id=$c_user_id"; return db_query( $query ); } ### -------------------- |
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv1320 Modified Files: admin_change_password.php admin_manage_users.php admin_manage_users_add.php admin_manage_users_add_page.php admin_manage_users_edit.php admin_manage_users_update.php Log Message: - Fixed a problem in the user add if the user was added as not enabled. - 0000079: Add support for protected accounts - Removing of some unnecessary code in user_api.php - User create was hard-coded to add users as enabled. - Changed the version back to 2.0.0-dev. Index: admin_change_password.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_change_password.php,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- admin_change_password.php 21 Sep 2002 02:44:32 -0000 1.17 +++ admin_change_password.php 7 Oct 2002 02:54:39 -0000 1.18 @@ -12,7 +12,16 @@ login_cookie_check(); - access_ensure_check_action( ACTION_USERS_EDIT_OWN ); + $row = user_get_info( user_where_current() ); + extract( $row, EXTR_PREFIX_ALL, 'v' ); + + if ( 1 == $v_protected ) { + $t_action = ACTION_USERS_EDIT_OWN_PROTECTED; + } else { + $t_action = ACTION_USERS_EDIT_OWN; + } + + access_ensure_check_action( $t_action ); if ( isset( $f_action ) && ( $f_action == 'change' ) ) { $f_current_password = gpc_get_string( 'f_current_password' ); @@ -27,9 +36,6 @@ EOT; } } - - $row = user_get_info( user_where_current() ); - extract( $row, EXTR_PREFIX_ALL, "v" ); print_html_top(); print_head_top(); Index: admin_manage_users.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- admin_manage_users.php 3 Oct 2002 03:47:50 -0000 1.10 +++ admin_manage_users.php 7 Oct 2002 02:54:39 -0000 1.11 @@ -28,14 +28,15 @@ $t_users_array = user_get_all(); echo '<table class="box" summary="">'; - echo '<thead><tr><th>Username</th><th>Email</th><th>Access Level</th><th>Enabled</th></tr></thead><tbody>'; + echo '<thead><tr><th>Username</th><th>Email</th><th>Access Level</th><th>Enabled</th><th>Protected</th></tr></thead><tbody>'; $i = 0; foreach ( $t_users_array as $user ) { extract( $user, EXTR_PREFIX_ALL, 'v' ); $v_enabled = $v_enabled ? 'x' : ' '; + $v_protected = $v_protected ? 'x' : ' '; $t_class = util_alternate_class( $i++ ); $t_access_level = enum_get_element( 'access_levels', $v_access_level ); - echo "<tr class=\"$t_class\"><td><a href=\"$g_admin_manage_users_edit?f_user_id=$v_id\">$v_username</a></td><td>$v_email</td><td>$t_access_level</td><td>$v_enabled</td></tr>"; + echo "<tr class=\"$t_class\"><td><a href=\"$g_admin_manage_users_edit?f_user_id=$v_id\">$v_username</a></td><td>$v_email</td><td>$t_access_level</td><td>$v_enabled</td><td>$v_protected</td></tr>"; } echo '</tbody></table>'; echo '<div class="spacer"></div>'; Index: admin_manage_users_add.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users_add.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- admin_manage_users_add.php 1 Oct 2002 00:17:56 -0000 1.3 +++ admin_manage_users_add.php 7 Oct 2002 02:54:39 -0000 1.4 @@ -19,13 +19,24 @@ $f_password = gpc_get( 'f_password' ); $f_password_confirm = gpc_get( 'f_password_confirm' ); $f_access_level = gpc_get( 'f_access_level' ); - $f_enabled = gpc_get( 'f_enabled' ); if ( $f_password != $f_password_confirm ) { util_header_redirect( $g_admin_manage_users_add_page ); } - user_create( $f_username, $f_password, $f_email, $f_access_level, $f_enabled ); + if ( isset( $f_enabled ) ) { + $f_enabled = 1; + } else { + $f_enabled = 0; + } + + if ( isset( $f_protected ) ) { + $f_protected = 1; + } else { + $f_protected = 0; + } + + user_create( $f_username, $f_password, $f_email, $f_access_level, $f_enabled, $f_protected ); util_header_redirect( $g_admin_manage_users ); ?> Index: admin_manage_users_add_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users_add_page.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- admin_manage_users_add_page.php 3 Oct 2002 01:20:45 -0000 1.5 +++ admin_manage_users_add_page.php 7 Oct 2002 02:54:39 -0000 1.6 @@ -86,6 +86,14 @@ <input type="checkbox" name="f_enabled" checked="checked" /> </td> </tr> +<tr class="row-1"> + <th> + Protected + </th> + <td> + <input type="checkbox" name="f_protected" /> + </td> +</tr> <tr class="buttons"> <td colspan="2"> <input type="submit" value="Add User" /> Index: admin_manage_users_edit.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users_edit.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- admin_manage_users_edit.php 3 Oct 2002 03:47:50 -0000 1.7 +++ admin_manage_users_edit.php 7 Oct 2002 02:54:39 -0000 1.8 @@ -91,6 +91,14 @@ <input type="checkbox" name="f_enabled" <?php if ( 1 == $v_enabled ) echo 'checked="checked"' ?> /> </td> </tr> +<tr class="row-1"> + <th> + Protected + </th> + <td> + <input type="checkbox" name="f_protected" <?php if ( 1 == $v_protected ) echo 'checked="checked"' ?> /> + </td> +</tr> <tr class="buttons"> <td colspan="2"> <input type="submit" value="Update User" /> Index: admin_manage_users_update.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users_update.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- admin_manage_users_update.php 3 Oct 2002 03:47:50 -0000 1.5 +++ admin_manage_users_update.php 7 Oct 2002 02:54:39 -0000 1.6 @@ -30,7 +30,13 @@ $f_enabled = 0; } - user_update( $f_user_id, $f_email, $f_password, $f_access_level, $f_enabled ); + if ( isset( $f_protected ) ) { + $f_protected = 1; + } else { + $f_protected = 0; + } + + user_update( $f_user_id, $f_email, $f_password, $f_access_level, $f_enabled, $f_protected ); util_header_redirect( $g_admin_manage_users ); ?> |
From: <vb...@us...> - 2002-10-06 15:42:16
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv20132/core Modified Files: config_defaults_inc.php Log Message: Updated the version to 2.0.0 pre release 1. Index: config_defaults_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/config_defaults_inc.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- config_defaults_inc.php 6 Oct 2002 15:23:36 -0000 1.14 +++ config_defaults_inc.php 6 Oct 2002 15:42:13 -0000 1.15 @@ -12,7 +12,7 @@ # VERSION SETTINGS ##################### - $g_phpWebNotes_version = '2.0.0-dev'; + $g_phpWebNotes_version = '2.0.0-pr1'; ### Display phpWebNotes version on pages $g_show_version = ON; |
From: <vb...@us...> - 2002-10-06 15:35:14
|
Update of /cvsroot/webnotes/webnotes/doc In directory usw-pr-cvs1:/tmp/cvs-serv18316 Modified Files: INSTALL Log Message: Added instructions for installing the sample. Index: INSTALL =================================================================== RCS file: /cvsroot/webnotes/webnotes/doc/INSTALL,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- INSTALL 6 Oct 2002 15:23:36 -0000 1.11 +++ INSTALL 6 Oct 2002 15:35:12 -0000 1.12 @@ -81,6 +81,29 @@ 10. You can edit or delete notes later on by going to the page. This option will only be available if you have logged in as a moderator/administrator. +11. The next step is to get the sample working. This depends on the auto-index feature. +For each page we need to index it, and add links to parent, previous, and next. All +these links can only be established if the page we are linking to is already linked. +Hence, we need to visit each page to index it, and we also need to visit it again when +all its neighbours are indexed and already visited (i.e. they know they own urls). + +Webopedia + |_ Markup + | |_ xml + | |_ xhtml + | + |_ Web Services + +a. Visit http://.../webnotes/sample/webopedia.php [ this will index webopedia page ] +b. Visit http://.../webnotes/sample/markup.php [ this will index markup, and add Webopedia as parent / prev ] +c. Visit http://.../webnotes/sample/xml.php [ this will index xml, add markup as parent, prev ] +d. Visit http://.../webnotes/sample/xhtml.php [ this will index xhtml, add markup as parent, xml as prev ] +e. Visit http://.../webnotes/sample/webservices.php [ this will index web services, add webopedia as parent, xhtml as prev ] +f. Visit http://.../webnotes/sample/xhtml.php [ this will add web services as next ] +g. Visit http://.../webnotes/sample/xml.php [ this will add xhtml as next ] +h. Visit http://.../webnotes/sample/markup.php [ this will add xml as next ] +i. Visit http://.../webnotes/sample/webopedia.php [ this will add markup as next ] + ------------------------------------------------------------------------------- ### Troubleshooting ### ------------------------------------------------------------------------------- |
From: <vb...@us...> - 2002-10-06 15:23:39
|
Update of /cvsroot/webnotes/webnotes/sql In directory usw-pr-cvs1:/tmp/cvs-serv15062/sql Modified Files: db_generate.sql db_upgrade.sql Log Message: - Fixed a parsing error in e-mail api. - Fixed an undefined variable when using the action.php upon indexing/un-indexing a page. - Fixed a problem with the timestamp in the preview page. - Removed the Manage Pages from the menu. - Updated the Change Log. - Updated the Install document. - Updated db_generate.sql / db_upgrade.sql. - Changed the default password encryption to be MD5. Index: db_generate.sql =================================================================== RCS file: /cvsroot/webnotes/webnotes/sql/db_generate.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- db_generate.sql 30 Sep 2002 01:40:19 -0000 1.3 +++ db_generate.sql 6 Oct 2002 15:23:36 -0000 1.4 @@ -1,54 +1,68 @@ # phpMyAdmin MySQL-Dump +# version 2.3.0 # http://phpwizard.net/phpMyAdmin/ +# http://www.phpmyadmin.net/ (download page) # +# Host: localhost +# Generation Time: Oct 07, 2002 at 12:58 AM +# Server version: 3.23.49 +# PHP Version: 4.0.6 +# Database : `phpWebNotes` +# -------------------------------------------------------- # -# Table structure for table 'phpWN_note_table' +# Table structure for table `phpWN_note_table` # CREATE TABLE phpWN_note_table ( - id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL auto_increment, - page_id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL, - email varchar(128) NOT NULL, - ip varchar(15) NOT NULL, - date_submitted datetime, - visible int(1) DEFAULT '0' NOT NULL, - note text NOT NULL, - PRIMARY KEY (id), - KEY id (id), - KEY visible (visible) -); + id int(10) unsigned zerofill NOT NULL auto_increment, + page_id int(10) unsigned zerofill NOT NULL default '0000000000', + email varchar(128) NOT NULL default '', + ip varchar(15) NOT NULL default '', + date_submitted datetime default NULL, + visible int(1) NOT NULL default '0', + note text NOT NULL, + PRIMARY KEY (id), + KEY visible (visible) +) TYPE=MyISAM; +# -------------------------------------------------------- # -# Table structure for table 'phpWN_page_table' +# Table structure for table `phpWN_page_table` # CREATE TABLE phpWN_page_table ( - id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL auto_increment, - date_indexed datetime, - page varchar(255) NOT NULL, - PRIMARY KEY (id), - KEY id (id), - UNIQUE page (page) -); + id int(10) unsigned zerofill NOT NULL auto_increment, + date_indexed datetime default NULL, + last_updated datetime NOT NULL default '0000-00-00 00:00:00', + page varchar(255) NOT NULL default '', + url varchar(255) NOT NULL default '', + parent_id int(10) unsigned zerofill NOT NULL default '0000000000', + prev_id int(10) unsigned zerofill NOT NULL default '0000000000', + next_id int(10) unsigned zerofill NOT NULL default '0000000000', + PRIMARY KEY (id), + UNIQUE KEY page (page), + KEY parent_id (parent_id) +) TYPE=MyISAM; +# -------------------------------------------------------- # -# Table structure for table 'phpWN_user_table' +# Table structure for table `phpWN_user_table` # CREATE TABLE phpWN_user_table ( - id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL auto_increment, - username varchar(32) NOT NULL, - password varchar(16) NOT NULL, - email varchar(64) NOT NULL, - access_level int(1) DEFAULT '0' NOT NULL, - enabled int(1) DEFAULT '0' NOT NULL, - cookie_string varchar(32) NOT NULL, - PRIMARY KEY (id) -); + id int(10) unsigned zerofill NOT NULL auto_increment, + username varchar(32) NOT NULL default '', + password varchar(32) NOT NULL default '', + email varchar(64) NOT NULL default '', + access_level int(2) NOT NULL default '40', + enabled int(1) NOT NULL default '0', + cookie_string varchar(32) NOT NULL default '', + PRIMARY KEY (id) +) TYPE=MyISAM; # # Dumping data for table 'phpWN_user_table' # -INSERT INTO phpWN_user_table VALUES ( '0000000001', 'administrator', 'Wy1r49AOWOdCI', '', '90', '1', '9eCxeTLdGjDpI149f9aca9f0ba076ce2'); \ No newline at end of file +INSERT INTO phpWN_user_table VALUES ( '0000000001', 'administrator', '63a9f0ea7bb98050796b649e85481845', '', '90', '1', '9eCxeTLdGjDpI149f9aca9f0ba076ce2'); Index: db_upgrade.sql =================================================================== RCS file: /cvsroot/webnotes/webnotes/sql/db_upgrade.sql,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- db_upgrade.sql 1 Oct 2002 06:51:45 -0000 1.7 +++ db_upgrade.sql 6 Oct 2002 15:23:36 -0000 1.8 @@ -1,3 +1,6 @@ +# +# Upgrade phpWebNotes 1.0.0 to phpWebNotes 2.0.0pr1 +# ALTER TABLE `phpWN_user_table` CHANGE `password` `password` VARCHAR( 32 ) NOT NULL; ALTER TABLE `phpWN_user_table` CHANGE `access_level` `access_level` INT( 2 ) DEFAULT '40' NOT NULL; ALTER TABLE `phpWN_page_table` ADD `url` VARCHAR( 255 ) NOT NULL ; |
From: <vb...@us...> - 2002-10-06 15:23:39
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv15062/core Modified Files: config_defaults_inc.php email_api.php html_api.php Log Message: - Fixed a parsing error in e-mail api. - Fixed an undefined variable when using the action.php upon indexing/un-indexing a page. - Fixed a problem with the timestamp in the preview page. - Removed the Manage Pages from the menu. - Updated the Change Log. - Updated the Install document. - Updated db_generate.sql / db_upgrade.sql. - Changed the default password encryption to be MD5. Index: config_defaults_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/config_defaults_inc.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- config_defaults_inc.php 4 Oct 2002 04:41:48 -0000 1.13 +++ config_defaults_inc.php 6 Oct 2002 15:23:36 -0000 1.14 @@ -116,6 +116,7 @@ # ADMIN SETTINGS ################### + # automatically index pages that call pwn_api APIs when visited for the first time. $g_auto_index_pages = ON; # automatically sets the e-mail field when logged in users are submitting notes. @@ -132,7 +133,7 @@ ################################ # AUTH_MD5, AUTH_CRYPT, AUTH_PLAIN - $g_auth_type = AUTH_PLAIN; + $g_auth_type = AUTH_MD5; # allow users to signup for their own accounts $g_allow_signup = ON; Index: email_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/email_api.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- email_api.php 3 Oct 2002 06:31:03 -0000 1.4 +++ email_api.php 6 Oct 2002 15:23:36 -0000 1.5 @@ -61,7 +61,7 @@ #$t_headers .= "Reply-To: $p_reply_to_email\n"; $t_headers .= "X-Sender: <$g_from_email>\n"; - $t_headers .= "X-Mailer: phpWebNotes $g_phpWebNotes_version"\n"; + $t_headers .= "X-Mailer: phpWebNotes $g_phpWebNotes_version\n"; if ( ON == $g_use_x_priority ) { $t_headers .= "X-Priority: 0\n"; # Urgent = 1, Not Urgent = 5, Disable = 0 } Index: html_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/html_api.php,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- html_api.php 3 Oct 2002 03:47:50 -0000 1.19 +++ html_api.php 6 Oct 2002 15:23:36 -0000 1.20 @@ -117,9 +117,9 @@ echo '<div class="menu">.: '; echo "<a title=\"Go to your home page\" href=\"$g_user_home_page\">Home</a> :: "; - if ( access_check_action( ACTION_PAGES_MANAGE ) ) { - echo "<a title=\"Add or remove pages\" href=\"$g_admin_index_files\">$s_index_files</a> :: "; - } + #if ( access_check_action( ACTION_PAGES_MANAGE ) ) { + # echo "<a title=\"Add or remove pages\" href=\"$g_admin_index_files\">$s_index_files</a> :: "; + #} if ( access_check_action( ACTION_NOTES_MODERATE ) ) { echo "<a title=\"Moderate notes\" href=\"$g_admin_manage_notes\">$s_manage_notes</a> [$queue_count] :: "; } |
From: <vb...@us...> - 2002-10-06 15:23:39
|
Update of /cvsroot/webnotes/webnotes/doc In directory usw-pr-cvs1:/tmp/cvs-serv15062/doc Modified Files: ChangeLog INSTALL SCRATCHPAD Log Message: - Fixed a parsing error in e-mail api. - Fixed an undefined variable when using the action.php upon indexing/un-indexing a page. - Fixed a problem with the timestamp in the preview page. - Removed the Manage Pages from the menu. - Updated the Change Log. - Updated the Install document. - Updated db_generate.sql / db_upgrade.sql. - Changed the default password encryption to be MD5. Index: ChangeLog =================================================================== RCS file: /cvsroot/webnotes/webnotes/doc/ChangeLog,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ChangeLog 3 Oct 2002 06:01:26 -0000 1.24 +++ ChangeLog 6 Oct 2002 15:23:36 -0000 1.25 @@ -5,7 +5,7 @@ phpWebNotes -??.10.2002 - 2.0.0 +06.10-2002 - 2.0.0pr1 (2.0.0 pre-release 1) * Fixed bug causing weird "headers already sent in whatever" errors on some servers * convertToPHP3 script removed * Added directory core/ to include source files that are not accessed directly through the web. @@ -16,7 +16,7 @@ * Added directory sample/ to contain sample files that can be used to test phpWebNotes. * Cleanup of all files for better readability and complying with coding standards. * Change the extension of the language files to .php rather than .txt. - * Moved to XHTML (not tested yet) + * Moved to XHTML * Integrated the Italian/French strings into cvs. * Added support for themes (#2). * Added admin_pending.php to allow moderating notes in any order (#10). @@ -24,7 +24,7 @@ * 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. + * Changed the encrypted password field size from 16 to 32 characters (for MD5 support). * 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. @@ -39,8 +39,10 @@ * Added pwn_api.php to act the the main interface to phpWebNotes. * Added support for Last Updated timestamp for pages. * Added support for emotions icons. + * Added support for icq online status when detecting the format: "icq://9999999". * Added support for the enabled field in the user table. * Added $g_auto_set_email to allow defaulting e-mail for logged in users. + * Added support for parent page + APIs to allow easy support for PHP-like Manuals. 03.12.2000 - 1.0.0 Index: INSTALL =================================================================== RCS file: /cvsroot/webnotes/webnotes/doc/INSTALL,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- INSTALL 2 Oct 2002 02:43:21 -0000 1.10 +++ INSTALL 6 Oct 2002 15:23:36 -0000 1.11 @@ -38,16 +38,23 @@ database. Also, don't forget to input the correct directory paths. 5. For every page that you want notes to be available you will need to convert -their extension to one that is interpreted by PHP. Then insert these lines -into the bottom of the document (before the </body> tag): +their extension to one that is interpreted by PHP. Then: + +Insert the following inside the <head> </head> tag): <? - require_once("/mypath/core/api.php"); # replace with actual path - print_web_notes( 'my-page-logical-name', $PHP_SELF ); + require_once('/mypath/core/api.php'); # replace with actual path + pwn_head(); ?> -You can replace the 'my-page-logical-name' with __FILE__ if you don't want to -assign ids to the pages. +Insert the following into the bottom of the document (before the </body> tag): + +<? + pwn_body( 'my-page-logical-name', $PHP_SELF, $page_prev, $page_next, $page_parent ); +?> + +You can replace the 'my-page-logical-name' with __FILE__ or basename( __FILE__ ) +if you don't want to assign ids to the pages. The require_once argument should be the absolute path to your installation of phpWebNotes. It should not be relative to what your browser would see. @@ -66,13 +73,13 @@ 8. If you need the notes to be moderated before they appear on the webpage then leave $g_auto_accept_notes = OFF, otherwise set it to ON and go to step 11. -9. Notes will be added to a queue. They need to be approved by the -administrator before they will become visible. You can do this from the admin -section by choosing "View Queue". +9. Notes will be added as pending. They need to be approved by the moderator/ +administrator before they will become visible. This can be done by loggin in and +then visiting the page. All notes will have the actions next to them, to approve +a note, the [ Accept ] action should be clicked. -10. You can edit or delete notes later on by going to the page and selecting -Manage. This option will only be available if you have logged in as an -administrator. +10. You can edit or delete notes later on by going to the page. This option will +only be available if you have logged in as a moderator/administrator. ------------------------------------------------------------------------------- ### Troubleshooting ### Index: SCRATCHPAD =================================================================== RCS file: /cvsroot/webnotes/webnotes/doc/SCRATCHPAD,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- SCRATCHPAD 26 Sep 2002 12:03:59 -0000 1.2 +++ SCRATCHPAD 6 Oct 2002 15:23:36 -0000 1.3 @@ -10,7 +10,6 @@ To-Do list: * Be able to reverse the display order (vb: they may already be supported) - * Consider re-using some APIs like config_api.php / lang_api.php / database_api.php / php_api.php / gpc_api.php from mantisbt. * Add access_api.php - note_accept() / decline() / update() / delete() should check the access level. * Consider supporting html only pages. This can be done by a php loader page + some other tricks (output buffering?) * Indexing page |
From: <vb...@us...> - 2002-10-06 15:23:39
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv15062 Modified Files: action.php note_preview_page.php Log Message: - Fixed a parsing error in e-mail api. - Fixed an undefined variable when using the action.php upon indexing/un-indexing a page. - Fixed a problem with the timestamp in the preview page. - Removed the Manage Pages from the menu. - Updated the Change Log. - Updated the Install document. - Updated db_generate.sql / db_upgrade.sql. - Changed the default password encryption to be MD5. Index: action.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/action.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- action.php 3 Oct 2002 00:23:19 -0000 1.10 +++ action.php 6 Oct 2002 15:23:36 -0000 1.11 @@ -61,6 +61,8 @@ if ( 'index' === $f_action ) { page_add( $c_page_id ); } + + $t_url = $HTTP_REFERER; } if ( isset( $f_wait ) ) { Index: note_preview_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/note_preview_page.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- note_preview_page.php 26 Sep 2002 06:55:04 -0000 1.11 +++ note_preview_page.php 6 Oct 2002 15:23:36 -0000 1.12 @@ -36,7 +36,7 @@ $t_note['id'] = '0'; $t_note['email']= string_prepare_note_for_viewing( $f_email ); - $t_note['date'] = date ($g_date_format); + $t_note['date'] = time(); $t_note['note'] = string_prepare_note_for_viewing( $f_note ); $t_page_data = array(); |
From: <vb...@us...> - 2002-10-04 04:41:51
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv28951/core Modified Files: config_defaults_inc.php Log Message: changed the version to following webnotes standard Index: config_defaults_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/config_defaults_inc.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- config_defaults_inc.php 3 Oct 2002 06:26:34 -0000 1.12 +++ config_defaults_inc.php 4 Oct 2002 04:41:48 -0000 1.13 @@ -12,7 +12,7 @@ # VERSION SETTINGS ##################### - $g_phpWebNotes_version = '2.0-dev'; + $g_phpWebNotes_version = '2.0.0-dev'; ### Display phpWebNotes version on pages $g_show_version = ON; |
From: <vb...@us...> - 2002-10-03 06:59:18
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv5950/core Added Files: cvs_env Log Message: Added a cvs_env script. To run it 'source core/cvs_env'. It sets up CVSROOT and CVS_RSH --- NEW FILE: cvs_env --- CVSROOT=${LOGNAME}@cvs.webnotes.sourceforge.net:/cvsroot/webnotes; export CVSROOT; CVS_RSH=ssh; export CVS_RSH; |
From: <ro...@us...> - 2002-10-03 06:31:06
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv30612 Modified Files: email_api.php Log Message: We're phpwebnotes, not mantis, remove lines saying this is mantis Set phpWebNotes $version in X-Mailer headers Index: email_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/email_api.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- email_api.php 17 Sep 2002 21:51:17 -0000 1.3 +++ email_api.php 3 Oct 2002 06:31:03 -0000 1.4 @@ -1,8 +1,8 @@ <?php - # Mantis - a php based bugtracking system - # Copyright (C) 2000 - 2002 Kenzaburo Ito - ke...@30... - # This program is distributed under the terms and conditions of the GPL - # See the files README and LICENSE for details + # 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 ########################################################################### # Email API @@ -61,7 +61,7 @@ #$t_headers .= "Reply-To: $p_reply_to_email\n"; $t_headers .= "X-Sender: <$g_from_email>\n"; - $t_headers .= "X-Mailer: PHP/".phpversion()."\n"; + $t_headers .= "X-Mailer: phpWebNotes $g_phpWebNotes_version"\n"; if ( ON == $g_use_x_priority ) { $t_headers .= "X-Priority: 0\n"; # Urgent = 1, Not Urgent = 5, Disable = 0 } @@ -96,4 +96,4 @@ return str_replace( "\r\r\n", "\r\n", $p_string ); } # -------------------- -?> \ No newline at end of file +?> |
From: <ro...@us...> - 2002-10-03 06:26:36
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv29993 Modified Files: config_defaults_inc.php Log Message: Make it 2.0-dev not 2.0.0-CVS Index: config_defaults_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/config_defaults_inc.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- config_defaults_inc.php 3 Oct 2002 06:01:26 -0000 1.11 +++ config_defaults_inc.php 3 Oct 2002 06:26:34 -0000 1.12 @@ -12,7 +12,7 @@ # VERSION SETTINGS ##################### - $g_phpWebNotes_version = '2.0.0-CVS'; + $g_phpWebNotes_version = '2.0-dev'; ### Display phpWebNotes version on pages $g_show_version = ON; @@ -220,4 +220,4 @@ # status from $g_status_index-1 to 79 are used for the onboard customization (if enabled) # directly use Mantis to edit them. $g_access_levels_enum_string = '10:anonymous,40:registered,70:moderator,90:administrator'; -?> \ No newline at end of file +?> |
From: <vb...@us...> - 2002-10-03 06:01:29
|
Update of /cvsroot/webnotes/webnotes/doc In directory usw-pr-cvs1:/tmp/cvs-serv24956a/doc Modified Files: ChangeLog Log Message: - 0000071: Default e-mail for logged in users. - Fixed error handling in config_api.php (still to be enhanced). Index: ChangeLog =================================================================== RCS file: /cvsroot/webnotes/webnotes/doc/ChangeLog,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- ChangeLog 29 Sep 2002 13:43:23 -0000 1.23 +++ ChangeLog 3 Oct 2002 06:01:26 -0000 1.24 @@ -40,6 +40,7 @@ * Added support for Last Updated timestamp for pages. * Added support for emotions icons. * Added support for the enabled field in the user table. + * Added $g_auto_set_email to allow defaulting e-mail for logged in users. 03.12.2000 - 1.0.0 |
From: <vb...@us...> - 2002-10-03 06:01:28
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv24956a/core Modified Files: config_api.php config_defaults_inc.php Log Message: - 0000071: Default e-mail for logged in users. - Fixed error handling in config_api.php (still to be enhanced). Index: config_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/config_api.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- config_api.php 14 Sep 2002 06:22:03 -0000 1.3 +++ config_api.php 3 Oct 2002 06:01:26 -0000 1.4 @@ -33,8 +33,10 @@ # unless we were allowing for the option not to exist by passing # a default, trigger a NOTICE if ( null == $p_default ) { - error_parameters($p_option); - trigger_error( ERROR_CONFIG_OPT_NOT_FOUND, NOTICE ); + #error_parameters($p_option); + #trigger_error( ERROR_CONFIG_OPT_NOT_FOUND, NOTICE ); + echo "Config option '$p_option' not found."; + exit; } return $p_default; } @@ -56,7 +58,9 @@ # If the config option does not exist, an ERROR is triggered function config_set( $p_option, $p_value ) { if ( ! isset( $GLOBALS['g_'.$p_option] ) ) { - trigger_error( ERROR_CONFIG_OPT_NOT_FOUND, ERROR ); + echo "Config option '$p_option' not found."; + exit; + #trigger_error( ERROR_CONFIG_OPT_NOT_FOUND, ERROR ); } $GLOBALS['g_'.$p_option] = $p_value; Index: config_defaults_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/config_defaults_inc.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- config_defaults_inc.php 1 Oct 2002 00:17:56 -0000 1.10 +++ config_defaults_inc.php 3 Oct 2002 06:01:26 -0000 1.11 @@ -118,6 +118,9 @@ $g_auto_index_pages = ON; + # automatically sets the e-mail field when logged in users are submitting notes. + $g_auto_set_email = ON; + ######################## # MODERATION SETTINGS ######################## |
From: <vb...@us...> - 2002-10-03 06:01:28
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv24956a Modified Files: note_add_page.php Log Message: - 0000071: Default e-mail for logged in users. - Fixed error handling in config_api.php (still to be enhanced). Index: note_add_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/note_add_page.php,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- note_add_page.php 22 Sep 2002 02:47:16 -0000 1.20 +++ note_add_page.php 3 Oct 2002 06:01:25 -0000 1.21 @@ -25,6 +25,12 @@ if ( 0 == $f_note_id ) { $f_page_id = gpc_get_int( 'f_page_id' ); $t_default_email = ''; + if ( ( ON == config_get('auto_set_email') ) && access_is_logged_in() ) { + $t_user_info = user_get_info( user_where_current() ); + if ( false !== $t_user_info ) { + $t_default_email = $t_user_info['email']; + } + } $t_default_body = ''; $t_note_id = 0; } else { |
From: <vb...@us...> - 2002-10-03 05:26:33
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv8655/core Modified Files: note_api.php Log Message: - Fixed 0000064: Email / Note should be mandatory. Index: note_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/note_api.php,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- note_api.php 26 Sep 2002 06:55:05 -0000 1.29 +++ note_api.php 3 Oct 2002 05:26:31 -0000 1.30 @@ -57,6 +57,8 @@ } ### -------------------- function note_add( $p_page_id, $p_email, $p_remote_addr, $p_note ) { + note_ensure_mandatory_fields( $p_email, $p_note ); + if ( ON == config_get('auto_accept_notes') ) { $t_visible = NOTE_VISIBLE_ACCEPTED; } else { @@ -137,7 +139,24 @@ $result = db_query( $query ); } ### -------------------- + function note_ensure_mandatory_fields( $p_email, $p_note ) { + if ( trim( $p_email ) == '' ) + { + echo sprintf( 'Mandatory field "%s" missing.', 'email'); + exit; + } + + if ( trim( $p_note ) == '' ) + { + echo sprintf( 'Mandatory field "%s" missing.', 'note'); + exit; + } + + } + ### -------------------- function note_update( $p_id, $p_email, $p_note ) { + note_ensure_mandatory_fields( $p_email, $p_note ); + $c_id = db_prepare_int( $p_id ); $c_email = db_prepare_string( $p_email ); $c_note = db_prepare_string( $p_note ); |
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv9166 Modified Files: admin_manage_notes.php admin_manage_users.php admin_manage_users_delete.php admin_manage_users_delete_page.php admin_manage_users_edit.php admin_manage_users_update.php Log Message: comments.txt Index: admin_manage_notes.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_notes.php,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- admin_manage_notes.php 26 Sep 2002 03:41:46 -0000 1.18 +++ admin_manage_notes.php 3 Oct 2002 03:47:50 -0000 1.19 @@ -35,7 +35,7 @@ $result = db_query($query); echo <<<EOT - <p><strong>Following are the documents that have notes pending approval:</strong></p> + <p><strong>Following are the pages that have notes pending approval:</strong></p> <table class="box" summary=""> <tr><th>Page</th><th>URL</th><th>Pending Notes</th></tr>\n EOT; @@ -48,10 +48,10 @@ echo <<<EOT </table> - <p>There are $count document(s) to be moderated.</p>\n + <p>There are $count page(s) to be moderated.</p>\n <hr> <div class="spacer"></div> - <p><strong>Following are all the documents that use phpWebNotes:</strong></p> + <p><strong>Following are all the pages that use phpWebNotes:</strong></p> <table class="box" summary=""> <tr><th>Page</th><th>URL</th></tr>\n EOT; @@ -66,7 +66,7 @@ echo <<<EOT </table> - <p>There are $count document(s) that are indexed.</p>\n + <p>There are $count page(s) that are indexed.</p>\n EOT; print_footer( __FILE__ ); Index: admin_manage_users.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- admin_manage_users.php 3 Oct 2002 01:20:45 -0000 1.9 +++ admin_manage_users.php 3 Oct 2002 03:47:50 -0000 1.10 @@ -27,20 +27,18 @@ $t_users_array = user_get_all(); - echo '<table class="box">'; + echo '<table class="box" summary="">'; echo '<thead><tr><th>Username</th><th>Email</th><th>Access Level</th><th>Enabled</th></tr></thead><tbody>'; $i = 0; foreach ( $t_users_array as $user ) { - $t_class = ( $i % 2 == 0 ) ? 'row-1' : 'row-2'; - extract( $user, EXTR_PREFIX_ALL, 'v' ); $v_enabled = $v_enabled ? 'x' : ' '; - $t_color = util_alternate_colors( $i++ ); + $t_class = util_alternate_class( $i++ ); $t_access_level = enum_get_element( 'access_levels', $v_access_level ); echo "<tr class=\"$t_class\"><td><a href=\"$g_admin_manage_users_edit?f_user_id=$v_id\">$v_username</a></td><td>$v_email</td><td>$t_access_level</td><td>$v_enabled</td></tr>"; } echo '</tbody></table>'; - echo '<br />'; + echo '<div class="spacer"></div>'; echo link_create( $g_admin_manage_users_add_page, 'Add User' ); # @@@ LOCALIZE Index: admin_manage_users_delete.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users_delete.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- admin_manage_users_delete.php 1 Oct 2002 00:17:56 -0000 1.3 +++ admin_manage_users_delete.php 3 Oct 2002 03:47:50 -0000 1.4 @@ -14,7 +14,7 @@ access_ensure_check_action( ACTION_USERS_DELETE ); - $f_user_id = gpc_get( 'f_user_id' ); + $f_user_id = gpc_get_int( 'f_user_id' ); user_delete( $f_user_id ); util_header_redirect( $g_admin_manage_users ); Index: admin_manage_users_delete_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users_delete_page.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- admin_manage_users_delete_page.php 1 Oct 2002 02:21:54 -0000 1.3 +++ admin_manage_users_delete_page.php 3 Oct 2002 03:47:50 -0000 1.4 @@ -25,12 +25,13 @@ print_admin_menu(); - $f_user_id = gpc_get( 'f_user_id' ); + $f_user_id = gpc_get_int( 'f_user_id' ); + + $t_user_info = user_get_info( user_where_id_equals( $f_user_id ) ); ?> <div align="center"> -Are you sure you want to delete this user? -<br /> -<br /> +Are you sure you want to delete user '<?php echo $t_user_info['username'] ?>'?<br /> +<div class="spacer"></div> <form method="post" action="<?php echo $g_admin_manage_users_delete ?>"> <input type="hidden" name="f_user_id" value="<?php echo $f_user_id ?>" /> <input type="submit" value="Delete User" /> Index: admin_manage_users_edit.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users_edit.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- admin_manage_users_edit.php 3 Oct 2002 01:20:45 -0000 1.6 +++ admin_manage_users_edit.php 3 Oct 2002 03:47:50 -0000 1.7 @@ -94,17 +94,16 @@ <tr class="buttons"> <td colspan="2"> <input type="submit" value="Update User" /> - <form method="post" action="<?php echo $g_admin_manage_users_delete_page ?>"> - <input type="hidden" name="f_user_id" value="<?php echo $f_user_id ?>" /> - <input type="submit" value="Delete User" /> - </form> <?php # @@@ LOCALIZE ?> </td> </tr> </table> </form> -<br /> -<br /> +<div class="spacer"></div> + <form method="post" action="<?php echo $g_admin_manage_users_delete_page ?>"> + <input type="hidden" name="f_user_id" value="<?php echo $f_user_id ?>" /> + <input type="submit" value="Delete User" /> + </form> </div> <?php Index: admin_manage_users_update.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users_update.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- admin_manage_users_update.php 1 Oct 2002 02:20:43 -0000 1.4 +++ admin_manage_users_update.php 3 Oct 2002 03:47:50 -0000 1.5 @@ -19,12 +19,10 @@ $f_password = gpc_get( 'f_password' ); $f_password_confirm = gpc_get( 'f_password_confirm' ); $f_access_level = gpc_get( 'f_access_level' ); - $f_enabled = gpc_get( 'f_enabled' ); if ( $f_password != $f_password_confirm ) { util_header_redirect( $g_admin_manage_users_edit.'?f_user_id='.$f_user_id ); } - if ( isset( $f_enabled ) ) { $f_enabled = 1; |
From: <vb...@us...> - 2002-10-03 03:47:53
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv9166/core Modified Files: css_inc.php gpc_api.php html_api.php util_api.php Log Message: comments.txt Index: css_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/css_inc.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- css_inc.php 22 Sep 2002 02:47:16 -0000 1.10 +++ css_inc.php 3 Oct 2002 03:47:50 -0000 1.11 @@ -65,7 +65,7 @@ div.pwn address { font-family:Verdana, Arial; font-size: 8pt; } div.pwn table.box { border: solid 1px #000000; margin-top: 10px; margin-bottom: 10px; text-align: left; width: 100%; } div.pwn tr.row-1 { background-color: #d8d8d8; color: #000000; } -div.pwn tr.row-2 { background-color: #d8d8d8; color: #000000; } +div.pwn tr.row-2 { background-color: #e8e8e8; color: #000000; } div.pwn tr.title { color: #000000; font-weight: bold; } div.pwn tr.buttons { color: #000000; text-align: center; } div.pwn div.note p.title { font-weight: bold; text-align: center; } Index: gpc_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/gpc_api.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gpc_api.php 13 Sep 2002 07:17:53 -0000 1.1 +++ gpc_api.php 3 Oct 2002 03:47:50 -0000 1.2 @@ -34,7 +34,8 @@ } 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); + #trigger_error(ERROR_GPC_VAR_NOT_FOUND, ERROR); + echo "Variable '$p_var_name' not found"; $t_result = null; } @@ -54,7 +55,8 @@ } if ( is_array( $t_result ) ) { - trigger_error( ERROR_GPC_ARRAY_UNEXPECTED, ERROR ); + #trigger_error( ERROR_GPC_ARRAY_UNEXPECTED, ERROR );e + echo "Unexpected array '$p_var_name'."; } return $t_result; @@ -73,7 +75,8 @@ } if ( is_array( $t_result ) ) { - trigger_error( ERROR_GPC_ARRAY_UNEXPECTED, ERROR ); + #trigger_error( ERROR_GPC_ARRAY_UNEXPECTED, ERROR ); + echo "Unexpected array '$p_var_name'."; } return (integer)$t_result; @@ -88,7 +91,8 @@ return $p_default; } else { if ( is_array( $t_result ) ) { - trigger_error( ERROR_GPC_ARRAY_UNEXPECTED, ERROR ); + #trigger_error( ERROR_GPC_ARRAY_UNEXPECTED, ERROR ); + echo "Unexpected array '$p_var_name'."; } return gpc_string_to_bool( $t_result ); @@ -113,7 +117,8 @@ } if ( ! is_array( $t_result ) ) { - trigger_error( ERROR_GPC_ARRAY_EXPECTED, ERROR); + #trigger_error( ERROR_GPC_ARRAY_EXPECTED, ERROR); + echo "Unexpected array '$p_var_name'."; } return $t_result; @@ -132,7 +137,8 @@ } if ( ! is_array( $t_result ) ) { - trigger_error( ERROR_GPC_ARRAY_EXPECTED, ERROR); + #trigger_error( ERROR_GPC_ARRAY_EXPECTED, ERROR); + echo "Unexpected array '$p_var_name'."; } for ( $i=0 ; $i < sizeof( $t_result ) ; $i++ ) { @@ -155,7 +161,8 @@ } if ( ! is_array( $t_result ) ) { - trigger_error( ERROR_GPC_ARRAY_EXPECTED, ERROR); + #trigger_error( ERROR_GPC_ARRAY_EXPECTED, ERROR); + echo "Unexpected array '$p_var_name'."; } for ( $i=0 ; $i < sizeof( $t_result ) ; $i++ ) { @@ -185,7 +192,8 @@ } 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); + #trigger_error(ERROR_GPC_VAR_NOT_FOUND, ERROR); + echo "Variable '$p_var_name' not found"; $t_result = null; } Index: html_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/html_api.php,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- html_api.php 3 Oct 2002 00:23:19 -0000 1.18 +++ html_api.php 3 Oct 2002 03:47:50 -0000 1.19 @@ -118,7 +118,7 @@ echo '<div class="menu">.: '; echo "<a title=\"Go to your home page\" href=\"$g_user_home_page\">Home</a> :: "; if ( access_check_action( ACTION_PAGES_MANAGE ) ) { - echo "<a title=\"Add or remove documents\" href=\"$g_admin_index_files\">$s_index_files</a> :: "; + echo "<a title=\"Add or remove pages\" href=\"$g_admin_index_files\">$s_index_files</a> :: "; } if ( access_check_action( ACTION_NOTES_MODERATE ) ) { echo "<a title=\"Moderate notes\" href=\"$g_admin_manage_notes\">$s_manage_notes</a> [$queue_count] :: "; Index: util_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/util_api.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- util_api.php 3 Oct 2002 00:23:19 -0000 1.5 +++ util_api.php 3 Oct 2002 03:47:50 -0000 1.6 @@ -38,6 +38,22 @@ } } # -------------------- + # alternate color function + function util_alternate_class( $p_num, $p_class1 = null, $p_class2 = null ) { + if ( null === $p_class1 ) { + $p_class1 = 'row-1'; + } + if ( null === $p_class2 ) { + $p_class2 = 'row-2'; + } + + if ( 1 == $p_num % 2 ) { + return $p_class1; + } else { + return $p_class2; + } + } + # -------------------- function util_header_redirect( $p_url ) { $t_use_iis = config_get( 'use_iis'); if ( OFF == $t_use_iis ) { |
From: <vb...@us...> - 2002-10-03 03:47:53
|
Update of /cvsroot/webnotes/webnotes/lang In directory usw-pr-cvs1:/tmp/cvs-serv9166/lang Modified Files: strings_english.php Log Message: comments.txt Index: strings_english.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/lang/strings_english.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- strings_english.php 19 Sep 2002 05:15:47 -0000 1.9 +++ strings_english.php 3 Oct 2002 03:47:50 -0000 1.10 @@ -26,7 +26,7 @@ ### admin.php $s_admin_title = "Admin"; - $s_index_files = 'Manage Documents'; + $s_index_files = 'Manage Pages'; $s_manage_users = 'Manage Users'; $s_view_queue = 'Moderate Notes'; $s_manage_notes = 'Manage Notes'; |
From: <vb...@us...> - 2002-10-03 01:20:48
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv10405 Modified Files: admin_manage_users.php admin_manage_users_add_page.php admin_manage_users_edit.php Log Message: - Fixed the UI for admin_manage_users_page.php - Fixed the UI for the add user form. - Fixed the UI for the update user form. Index: admin_manage_users.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- admin_manage_users.php 1 Oct 2002 00:17:56 -0000 1.8 +++ admin_manage_users.php 3 Oct 2002 01:20:45 -0000 1.9 @@ -27,22 +27,22 @@ $t_users_array = user_get_all(); - #echo '<div class="pwn-box" align="center">'; - - echo '<table class="pwn-width100" border="0" width="95%" cellspacing="0">'; - echo '<thead><tr class="pwn-category"><td></td><td>Email</td><td>Access Level</td><td>Enabled</td></tr></thead><tbody>'; + echo '<table class="box">'; + echo '<thead><tr><th>Username</th><th>Email</th><th>Access Level</th><th>Enabled</th></tr></thead><tbody>'; $i = 0; foreach ( $t_users_array as $user ) { + $t_class = ( $i % 2 == 0 ) ? 'row-1' : 'row-2'; + extract( $user, EXTR_PREFIX_ALL, 'v' ); $v_enabled = $v_enabled ? 'x' : ' '; $t_color = util_alternate_colors( $i++ ); $t_access_level = enum_get_element( 'access_levels', $v_access_level ); - echo "<tr bgcolor=\"$t_color\"><td><a href=\"$g_admin_manage_users_edit?f_user_id=$v_id\">$v_username</a></td><td>$v_email</td><td>$t_access_level</td><td>$v_enabled</td></tr>"; + echo "<tr class=\"$t_class\"><td><a href=\"$g_admin_manage_users_edit?f_user_id=$v_id\">$v_username</a></td><td>$v_email</td><td>$t_access_level</td><td>$v_enabled</td></tr>"; } echo '</tbody></table>'; echo '<br />'; echo link_create( $g_admin_manage_users_add_page, 'Add User' ); - #echo '</div>'; + # @@@ LOCALIZE print_footer( __FILE__ ); Index: admin_manage_users_add_page.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users_add_page.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- admin_manage_users_add_page.php 1 Oct 2002 03:38:28 -0000 1.4 +++ admin_manage_users_add_page.php 3 Oct 2002 01:20:45 -0000 1.5 @@ -28,73 +28,72 @@ # @@@ Need to LOCALIZE text ?> <div align="center"> +<div class="small-width"> <form method="post" action="<?php echo $g_admin_manage_users_add ?>"> -<table> -<tr> - <th colspan="2"> +<table class="box" summary=""> +<tr class="title"> + <td colspan="2"> Add User - </th> + </td> </tr> -<tr> - <td> +<tr class="row-1"> + <th> Username - </td> + </th> <td> <input type="text" name="f_username" value="" /> </td> </tr> -<tr> - <td> +<tr class="row-2"> + <th> Email - </td> + </th> <td> <input type="text" name="f_email" value="" /> </td> </tr> -<tr> - <td> +<tr class="row-1"> + <th> Password - </td> + </th> <td> <input type="password" name="f_password" value="" /> </td> </tr> -<tr> - <td> +<tr class="row-2"> + <th> Password Confirm - </td> + </th> <td> <input type="password" name="f_password_confirm" value="" /> </td> </tr> -<tr> - <td> +<tr class="row-1"> + <th> Access Level - </td> + </th> <td> <select name="f_access_level"> <?php html_option_list_access_level( REGISTERED ) ?> </select> </td> </tr> -<tr> - <td> +<tr class="row-2"> + <th> Enabled - </td> + </th> <td> <input type="checkbox" name="f_enabled" checked="checked" /> </td> </tr> -<tr> - <td> - - </td> - <td> +<tr class="buttons"> + <td colspan="2"> <input type="submit" value="Add User" /> </td> </tr> </table> </form> +</div> </div> <?php print_footer( __FILE__ ); Index: admin_manage_users_edit.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users_edit.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- admin_manage_users_edit.php 1 Oct 2002 03:06:22 -0000 1.5 +++ admin_manage_users_edit.php 3 Oct 2002 01:20:45 -0000 1.6 @@ -32,70 +32,72 @@ # @@@ Need to LOCALIZE text ?> <div align="center"> +<div class="small-width"> <form method="post" action="<?php echo $g_admin_manage_users_update ?>"> <input type="hidden" name="f_user_id" value="<?php echo $v_id ?>" /> -<table> -<tr> - <th colspan="2"> +<table class="box" summary=""> +<tr class="title"> + <td colspan="2"> Update User - </th> + </td> </tr> -<tr> - <td> +<tr class="row-1"> + <th> Username - </td> + </th> <td> <?php echo $v_username ?> </td> </tr> -<tr> - <td> +<tr class="row-2"> + <th> Email - </td> + </th> <td> <input type="text" name="f_email" value="<?php echo $v_email ?>" /> </td> </tr> -<tr> - <td> +<tr class="row-1"> + <th> Password - </td> + </th> <td> <input type="password" name="f_password" value="" /> </td> </tr> -<tr> - <td> +<tr class="row-2"> + <th> Password Confirm - </td> + </th> <td> <input type="password" name="f_password_confirm" value="" /> </td> </tr> -<tr> - <td> +<tr class="row-1"> + <th> Access Level - </td> + </th> <td> <select name="f_access_level"> <?php html_option_list_access_level( $v_access_level ) ?> </select> </td> </tr> -<tr> - <td> +<tr class="row-2"> + <th> Enabled - </td> + </th> <td> <input type="checkbox" name="f_enabled" <?php if ( 1 == $v_enabled ) echo 'checked="checked"' ?> /> </td> </tr> -<tr> - <td> - - </td> - <td> +<tr class="buttons"> + <td colspan="2"> <input type="submit" value="Update User" /> + <form method="post" action="<?php echo $g_admin_manage_users_delete_page ?>"> + <input type="hidden" name="f_user_id" value="<?php echo $f_user_id ?>" /> + <input type="submit" value="Delete User" /> + </form> <?php # @@@ LOCALIZE ?> </td> </tr> @@ -103,10 +105,6 @@ </form> <br /> <br /> -<form method="post" action="<?php echo $g_admin_manage_users_delete_page ?>"> -<input type="hidden" name="f_user_id" value="<?php echo $f_user_id ?>" /> -<input type="submit" value="Delete User" /> -</form> </div> <?php |