From: <vb...@us...> - 2002-09-10 01:14:38
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv13002/core Modified Files: config_inc.php html_api.php Added Files: meta_inc.php Log Message: - Cleanup of core/config_inc.php - Added core/meta_inc.php from Mantis (not used yet). - Added print_header_redirect() from Mantis (not used yet). --- NEW FILE: meta_inc.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: meta_inc.php,v 1.1 2002/09/10 01:14:35 vboctor Exp $ # -------------------------------------------------------- # prevent caching global $g_content_expire; if ( !isset( $g_content_expire ) ) { $g_content_expire = 0; } ?> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> <META HTTP-EQUIV="Pragma-directive" CONTENT="no-cache"> <META HTTP-EQUIV="Cache-Directive" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="<?php echo $g_content_expire ?>"> Index: config_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/config_inc.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- config_inc.php 9 Sep 2002 22:30:21 -0000 1.9 +++ config_inc.php 10 Sep 2002 01:14:35 -0000 1.10 @@ -1,7 +1,6 @@ <? # phpWebNotes - a php based note addition system - # Copyright (C) 2000 Kenzaburo Ito - ke...@30... - # 2002 Webnotes Team - web...@so... + # 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 @@ -9,104 +8,139 @@ # $Id$ # -------------------------------------------------------- - ########################### - # CONFIGURATION SETTINGS - ########################### + ##################### + # VERSION SETTINGS + ##################### $g_phpWebNotes_version = '2.0.0-CVS'; - ### Database Configuration - $g_hostname = 'localhost'; - $g_db_username = 'root'; - $g_db_password = ''; - $g_database_name = 'phpWebNotes'; + ### Display phpWebNotes version on pages + $g_show_version = ON; - ### Email Settings - $g_webmaster_email = 'web...@my...'; - $g_administrator_email = 'ad...@my...'; + ###################### + # DATABASE SETTINGS + ###################### + + $g_hostname = 'localhost'; + $g_db_username = 'root'; + $g_db_password = ''; + $g_database_name = 'phpWebNotes'; + + ### Database Table Names + $g_phpWN_note_table = 'phpWN_note_table'; + $g_phpWN_page_table = 'phpWN_page_table'; + $g_phpWN_user_table = 'phpWN_user_table'; + + ################### + # EMAIL SETTINGS + ################### + + $g_webmaster_email = 'web...@my...'; + $g_administrator_email = 'ad...@my...'; + + #################### + # SERVER SETTINGS + #################### + + # Using Microsoft Internet Information Server (IIS) + $g_use_iis = OFF; ### File extension to use. Default is .php. ### Switch to .php3 if you ran convertToPHP3 - $g_ext = '.php'; + $g_ext = '.php'; ### url directory - $g_web_directory = DIRECTORY_SEPARATOR . 'webnotes' . DIRECTORY_SEPARATOR; + $g_web_directory = DIRECTORY_SEPARATOR . 'webnotes' . DIRECTORY_SEPARATOR; ### absolute directory path - $g_absolute_directory = dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR; + $g_absolute_directory = dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR; - ### default ordering of the notes. - ### ASC = newest on bottom - $g_note_order = 'ASC'; + + ### 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_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_pending = $g_web_directory . 'admin_pending' . $g_ext; + $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_note_add_page = $g_web_directory . 'note_add_page' . $g_ext; + $g_note_add = $g_web_directory . 'note_add' . $g_ext; + + ###################### + # COOKIES' SETTINGS + ###################### + + ### 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 + ################## ### Time to wait between redirects (except index.html) - $g_time_wait = 2; + $g_time_wait = 2; ### This is how long the "save login" cookies live. - $g_cookie_time_length = 30000000; # 1 year + $g_cookie_time_length = 30000000; # 1 year - ### Display phpWebNotes version on pages - $g_show_version = ON; + ##################### + # DISPLAY SETTINGS + ##################### - $g_window_title = 'phpWebNotes'; - $g_page_title = 'phpWebNotes'; + $g_window_title = 'phpWebNotes'; + $g_page_title = 'phpWebNotes'; + + ### default ordering of the notes. + ### ASC = newest on bottom + $g_note_order = 'ASC'; ### optional page includes (for appearance customization) - $g_top_page_inc = ''; - $g_bottom_page_inc = ''; + $g_top_page_inc = ''; + $g_bottom_page_inc = ''; - $g_date_format = 'm-d-y H:i'; + $g_date_format = 'm-d-y H:i'; ### change to language you want... choices are: ### english - $g_language = 'english'; - + $g_language = 'english'; + ### Theme to be used - $g_theme = 'classic'; + $g_theme = 'phpnet'; ### Customize this file for the add message page - $g_note_add_include = 'note_add_msg_inc.php'; - - ### Database Table Names - $g_phpWN_note_table = 'phpWN_note_table'; - $g_phpWN_page_table = 'phpWN_page_table'; - $g_phpWN_user_table = 'phpWN_user_table'; + $g_note_add_include = 'note_add_msg_inc.php'; ### Colors - $g_table_border_color = '#aaaaaa'; - $g_table_title_color = '#cccccc'; # temporary color, should be changed - $g_primary_dark_color = '#d8d8d8'; - $g_primary_light_color = '#e8e8e8'; - $g_white_color = '#ffffff'; - $g_header_color = '#bbddff'; - - ### 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]; - } + $g_table_border_color = '#aaaaaa'; + $g_table_title_color = '#cccccc'; # temporary color, should be changed + $g_primary_dark_color = '#d8d8d8'; + $g_primary_light_color = '#e8e8e8'; + $g_white_color = '#ffffff'; + $g_header_color = '#bbddff'; - ### 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_logout = $g_web_directory . 'logout' . $g_ext; - $g_logout_redirect_page = $g_web_directory; + #################################### + # CACHING / OPTIMISATION SETTINGS + #################################### - $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_pending = $g_web_directory . 'admin_pending' . $g_ext; - $g_admin_change_password = $g_web_directory . 'admin_change_password' . $g_ext; + # minutes to wait before document is stale (in minutes) + $g_content_expire = 0; - $g_css_inc_file = $g_absolute_directory . 'core' . DIRECTORY_SEPARATOR . 'css_inc' . $g_ext; + ######################## + # MODERATION SETTINGS + ######################## - $g_note_add_page = $g_web_directory . 'note_add_page' . $g_ext; - $g_note_add = $g_web_directory . 'note_add' . $g_ext; - - $g_use_iis = OFF; - $g_auto_accept_notes = OFF; ?> Index: html_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/html_api.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- html_api.php 4 Sep 2002 13:36:58 -0000 1.2 +++ html_api.php 10 Sep 2002 01:14:35 -0000 1.3 @@ -1,7 +1,6 @@ <?php # phpWebNotes - a php based note addition system - # Copyright (C) 2000 Kenzaburo Ito - ke...@30... - # 2002 Webnotes Team - web...@so... + # 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 @@ -26,6 +25,24 @@ if ( !empty( $p_css ) && file_exists( $p_css ) ) { include( $p_css ); } + } + ### -------------------- + function print_header_redirect( $p_url ) { + $t_use_iis = config_get( 'use_iis'); + + if ( OFF == $t_use_iis ) { + header( 'Status: 302' ); + } + header( 'Content-Type: text/html' ); + header( 'Pragma: no-cache' ); + header( 'Expires: Fri, 01 Jan 1999 00:00:00 GMT' ); + header( 'Cache-control: no-cache, no-cache="Set-Cookie", private' ); + if ( ON == $t_use_iis ) { + header( "Refresh: 0;url=$p_url" ); + } else { + header( "Location: $p_url" ); + } + die; # additional output can cause problems so let's just stop output here } ### -------------------- function print_meta_redirect( $p_url, $p_time ) { |