<?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - webnotes-devel@sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: note_add.php,v 1.20 2003/09/13 06:59:30 vboctor Exp $ # -------------------------------------------------------- require_once 'core' . DIRECTORY_SEPARATOR . 'api.php'; access_ensure_check_action(ACTION_NOTES_SUBMIT); $f_page_id = gpc_get_int('f_page_id'); $f_note_id = gpc_get_int('f_note_id'); $f_email = stripslashes(gpc_get_string('f_email')); $f_note = stripslashes(gpc_get_string('f_note')); ### insert note if (0 == $f_note_id) { $result = note_add($f_page_id, $f_email, $REMOTE_ADDR, $f_note); if ($result !== false) { email_note_added($result); } } else { $result = note_update($f_note_id, $f_email, $f_note); email_note_updated($f_note_id); } $t_page_info = page_get_info(page_where_id_equals($f_page_id)); if (false === $t_page_info) { echo "page not found"; exit; } $t_url = $t_page_info['url'];
<?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - webnotes-devel@sourceforge.net # 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.11 2002/10/07 02:54:39 vboctor Exp $ # -------------------------------------------------------- require_once 'core' . DIRECTORY_SEPARATOR . 'api.php'; login_cookie_check(); access_ensure_check_action(ACTION_USERS_MANAGE); 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 '<table class="box" summary="">'; 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);
<?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - webnotes-devel@sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: admin_manage_notes.php,v 1.22 2003/08/20 11:26:16 vboctor Exp $ # -------------------------------------------------------- require_once 'core' . DIRECTORY_SEPARATOR . 'api.php'; login_cookie_check(); access_ensure_check_action(ACTION_NOTES_MODERATE); 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(); $query = "SELECT p.*, COUNT(n.id) as notes_count\r\n\t\t\tFROM " . config_get('phpWN_page_table') . " p,\r\n\t\t\t\t" . config_get('phpWN_note_table') . " n\r\n\t\t\tWHERE (p.id=n.page_id) AND (n.visible=" . NOTE_VISIBLE_PENDING . ")\r\n\t\t\tGROUP BY p.id \r\n\t\t\tORDER BY notes_count DESC"; $result = db_query($query); echo <<<EOT \t<p><strong>Following are the pages that have notes pending approval:</strong></p> \t<table class="box" summary=""> \t\t<tr><th>Page</th><th>URL</th><th>Pending Notes</th></tr> EOT; $count = 0; while ($row = db_fetch_array($result)) {
<?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - webnotes-devel@sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: admin_index_files.php,v 1.17 2002/09/18 12:33:31 vboctor Exp $ # -------------------------------------------------------- require_once 'core' . DIRECTORY_SEPARATOR . 'api.php'; login_cookie_check(); access_ensure_check_action(ACTION_PAGES_MANAGE); if (!isset($f_dir)) { $f_dir = dirname(__FILE__); } else { $f_dir = stripslashes(urldecode($f_dir)); } if (substr($f_dir, -1) != '\\' && substr($f_dir, -1) != '/') { $f_dir = $f_dir . DIRECTORY_SEPARATOR; } 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(); ?> <div align="center">
<?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - webnotes-devel@sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: user_home_page.php,v 1.1 2002/09/18 12:33:31 vboctor Exp $ # -------------------------------------------------------- require_once 'core' . DIRECTORY_SEPARATOR . 'api.php'; login_cookie_check(); access_ensure_check_action(ACTION_USERS_EDIT_OWN); $row = user_get_info(user_where_current()); extract($row, EXTR_PREFIX_ALL, "v"); 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_access_level = enum_get_element('access_levels', $v_access_level); echo "<p>Logged in as {$v_username} ({$t_access_level})</p>"; print_bottom_page($g_bottom_page_inc); print_footer(__FILE__); print_body_bottom(); print_html_bottom();
<?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - webnotes-devel@sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: admin_manage_users_delete_page.php,v 1.4 2002/10/03 03:47:50 vboctor Exp $ # -------------------------------------------------------- require_once 'core' . DIRECTORY_SEPARATOR . 'api.php'; login_cookie_check(); access_ensure_check_action(ACTION_USERS_DELETE); 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(); $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 user '<?php echo $t_user_info['username']; ?> '?<br /> <div class="spacer"></div> <form method="post" action="<?php
# Copyright (C) 2000-2002 Webnotes Team - webnotes-devel@sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: admin_change_password.php,v 1.18 2002/10/07 02:54:39 vboctor Exp $ # -------------------------------------------------------- require_once 'core' . DIRECTORY_SEPARATOR . 'api.php'; login_cookie_check(); $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'); $f_password = gpc_get_string('f_password'); $f_password2 = gpc_get_string('f_password'); if (false !== user_change_password(user_where_current(), $f_current_password, $f_password, $f_password2)) { echo <<<EOT \t\t\t<div align="center"> \t\t\t\t<p>Password changed successfully</p> \t\t\t</div> EOT; } } print_html_top(); print_head_top(); print_title($g_window_title);
<?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - webnotes-devel@sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: admin_manage_users_add_page.php,v 1.6 2002/10/07 02:54:39 vboctor Exp $ # -------------------------------------------------------- require_once 'core' . DIRECTORY_SEPARATOR . 'api.php'; login_cookie_check(); access_ensure_check_action(ACTION_USERS_ADD); 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(); # @@@ Need to LOCALIZE text ?> <div align="center"> <div class="small-width"> <form method="post" action="<?php echo $g_admin_manage_users_add; ?> "> <table class="box" summary=""> <tr class="title">