From e712c4aef84d5ac73e55f904a8922064f63f90a3 Mon Sep 17 00:00:00 2001 From: gweltas Date: Sat, 7 Feb 2004 19:36:44 +0000 Subject: Migration of common.php in the include directory to fit the new coding rules git-svn-id: http://piwigo.org/svn/trunk@354 68402e56-0260-453c-a942-63ccdbb3a9ee --- about.php | 44 ++++++----- admin.php | 44 ++++++----- category.php | 2 +- comments.php | 44 ++++++----- common.php | 200 ----------------------------------------------- identification.php | 44 ++++++----- include/common.inc.php | 208 +++++++++++++++++++++++++++++++++++++++++++++++++ index.php | 44 ++++++----- install.php | 42 ++++++---- picture.php | 45 ++++++----- profile.php | 19 +++-- register.php | 44 ++++++----- search.php | 44 ++++++----- upload.php | 46 ++++++----- 14 files changed, 482 insertions(+), 388 deletions(-) delete mode 100644 common.php create mode 100644 include/common.inc.php diff --git a/about.php b/about.php index f9743c25d..7111179cf 100644 --- a/about.php +++ b/about.php @@ -1,25 +1,33 @@ * - * author : Pierrick LE GALL * - * * - * $Id$ - * * - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; * - * * - ***************************************************************************/ +// +-----------------------------------------------------------------------+ +// | about.php | +// +-----------------------------------------------------------------------+ +// | application : PhpWebGallery | +// | branch : 1.4 | +// +-----------------------------------------------------------------------+ +// | file : $RCSfile$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ //----------------------------------------------------------- include $phpwg_root_path = './'; -include_once( $phpwg_root_path.'common.php' ); +include_once( $phpwg_root_path.'include/common.inc.php' ); //----------------------------------------------------- template initialization // // Start output of page diff --git a/admin.php b/admin.php index 5707cca0f..7f22af61a 100644 --- a/admin.php +++ b/admin.php @@ -1,25 +1,33 @@ * - * author : Pierrick LE GALL * - * * - * $Id$ - * * - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; * - * * - ***************************************************************************/ +// +-----------------------------------------------------------------------+ +// | admin.php | +// +-----------------------------------------------------------------------+ +// | application : PhpWebGallery | +// | branch : 1.4 | +// +-----------------------------------------------------------------------+ +// | file : $RCSfile$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ //----------------------------------------------------------- include $phpwg_root_path = './'; -include_once( $phpwg_root_path.'common.php' ); +include_once( $phpwg_root_path.'include/common.inc.php' ); include_once( './admin/include/isadmin.inc.php' ); //----------------------------------------------------- template initialization $vtp = new VTemplate; diff --git a/category.php b/category.php index 10d119986..9fb7e7d27 100644 --- a/category.php +++ b/category.php @@ -27,7 +27,7 @@ //--------------------------------------------------------------------- include $phpwg_root_path = './'; -include_once( $phpwg_root_path.'common.php' ); +include_once( $phpwg_root_path.'include/common.inc.php' ); //---------------------------------------------------------------------- logout if ( isset( $_GET['act'] ) and $_GET['act'] == 'logout' diff --git a/comments.php b/comments.php index 650dd10c6..4dcb38fe2 100644 --- a/comments.php +++ b/comments.php @@ -1,25 +1,33 @@ * - * author : Pierrick LE GALL * - * * - * $Id$ - * * - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; * - * * - ***************************************************************************/ +// +-----------------------------------------------------------------------+ +// | comments.php | +// +-----------------------------------------------------------------------+ +// | application : PhpWebGallery | +// | branch : 1.4 | +// +-----------------------------------------------------------------------+ +// | file : $RCSfile$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ //----------------------------------------------------------- include $phpwg_root_path = './'; -include_once( $phpwg_root_path.'common.php' ); +include_once( $phpwg_root_path.'include/common.inc.php' ); //------------------------------------------------------------------- functions function display_pictures( $mysql_result, $maxtime, $forbidden_cat_ids ) diff --git a/common.php b/common.php deleted file mode 100644 index 9c30982f9..000000000 --- a/common.php +++ /dev/null @@ -1,200 +0,0 @@ - * - * author : Pierrick LE GALL * - * * - * $Id$ - * * - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; * - * * - ***************************************************************************/ -// determine the initial instant to indicate the generation time of this page -$t1 = explode( ' ', microtime() ); -$t2 = explode( '.', $t1[0] ); -$t2 = $t1[1].'.'.$t2[1]; - -set_magic_quotes_runtime(0); // Disable magic_quotes_runtime - -// -// addslashes to vars if magic_quotes_gpc is off -// this is a security precaution to prevent someone -// trying to break out of a SQL statement. -// -if( !get_magic_quotes_gpc() ) -{ - if( is_array($HTTP_GET_VARS) ) - { - while( list($k, $v) = each($HTTP_GET_VARS) ) - { - if( is_array($HTTP_GET_VARS[$k]) ) - { - while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) ) - { - $HTTP_GET_VARS[$k][$k2] = addslashes($v2); - } - @reset($HTTP_GET_VARS[$k]); - } - else - { - $HTTP_GET_VARS[$k] = addslashes($v); - } - } - @reset($HTTP_GET_VARS); - } - - if( is_array($HTTP_POST_VARS) ) - { - while( list($k, $v) = each($HTTP_POST_VARS) ) - { - if( is_array($HTTP_POST_VARS[$k]) ) - { - while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) ) - { - $HTTP_POST_VARS[$k][$k2] = addslashes($v2); - } - @reset($HTTP_POST_VARS[$k]); - } - else - { - $HTTP_POST_VARS[$k] = addslashes($v); - } - } - @reset($HTTP_POST_VARS); - } - - if( is_array($HTTP_COOKIE_VARS) ) - { - while( list($k, $v) = each($HTTP_COOKIE_VARS) ) - { - if( is_array($HTTP_COOKIE_VARS[$k]) ) - { - while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) ) - { - $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2); - } - @reset($HTTP_COOKIE_VARS[$k]); - } - else - { - $HTTP_COOKIE_VARS[$k] = addslashes($v); - } - } - @reset($HTTP_COOKIE_VARS); - } -} - -// -// Define some basic configuration arrays this also prevents -// malicious rewriting of language and otherarray values via -// URI params -// -$conf = array(); -$page = array(); -$user = array(); -$lang = array(); - -include($phpwg_root_path .'config.php'); - -if( !defined("PHPWG_INSTALLED") ) -{ - header("Location: install.php"); - exit; -} - -include($phpwg_root_path . 'include/constants.php'); -include($phpwg_root_path . 'include/functions.inc.php'); -include($phpwg_root_path . 'include/template.php'); -include($phpwg_root_path . 'include/vtemplate.class.php'); -include($phpwg_root_path . 'include/config.inc.php'); - -// -// Database connection -// - -mysql_connect( $cfgHote, $cfgUser, $cfgPassword ) - or die ( "Could not connect to server" ); -mysql_select_db( $cfgBase ) - or die ( "Could not connect to database" ); - -// -// Obtain and encode users IP -// -if( getenv('HTTP_X_FORWARDED_FOR') != '' ) -{ - $client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); - - if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", getenv('HTTP_X_FORWARDED_FOR'), $ip_list) ) - { - $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10.\.*/', '/^224.\.*/', '/^240.\.*/'); - $client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]); - } -} -else -{ - $client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); -} -$user_ip = encode_ip($client_ip); - -// -// Setup forum wide options, if this fails -// then we output a CRITICAL_ERROR since -// basic forum information is not available -// -$sql = "SELECT * FROM " . CONFIG_TABLE; -if( !($result = mysql_query($sql)) ) -{ - die("Could not query config information"); -} - -$row =mysql_fetch_array($result); -// rertieving the configuration informations for site -// $infos array is used to know the fields to retrieve in the table "config" -// Each field becomes an information of the array $conf. -// Example : -// prefix_thumbnail --> $conf['prefix_thumbnail'] -$infos = array( 'prefix_thumbnail', 'webmaster', 'mail_webmaster', 'access', - 'session_id_size', 'session_keyword', 'session_time', - 'max_user_listbox', 'show_comments', 'nb_comment_page', - 'upload_available', 'upload_maxfilesize', 'upload_maxwidth', - 'upload_maxheight', 'upload_maxwidth_thumbnail', - 'upload_maxheight_thumbnail','log','comments_validation', - 'comments_forall','authorize_cookies','mail_notification' ); -// affectation of each field of the table "config" to an information of the -// array $conf. -foreach ( $infos as $info ) { - if ( isset( $row[$info] ) ) $conf[$info] = $row[$info]; - else $conf[$info] = ''; - // If the field is true or false, the variable is transformed into a boolean - // value. - if ( $conf[$info] == 'true' or $conf[$info] == 'false' ) - { - $conf[$info] = get_boolean( $conf[$info] ); - } -} - -if (file_exists('install.php') && !DEBUG) -{ - die('Please ensure both the install/ and contrib/ directories are deleted'); -} - - -//--------------- -// A partir d'ici il faudra dispatcher le code dans d'autres fichiers -//--------------- - -include($phpwg_root_path . 'include/user.inc.php'); - -// displaying the username in the language of the connected user, instead of -// "guest" as you can find in the database -if ( $user['is_the_guest'] ) $user['username'] = $lang['guest']; -include_once( './template/'.$user['template'].'/htmlfunctions.inc.php' ); -define('PREFIX_TABLE', $table_prefix); -?> \ No newline at end of file diff --git a/identification.php b/identification.php index 27ae3dc3b..177c5ec0d 100644 --- a/identification.php +++ b/identification.php @@ -1,25 +1,33 @@ * - * author : Pierrick LE GALL * - * * - * $Id$ - * * - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; * - * * - ***************************************************************************/ +// +-----------------------------------------------------------------------+ +// | identification.php | +// +-----------------------------------------------------------------------+ +// | application : PhpWebGallery | +// | branch : 1.4 | +// +-----------------------------------------------------------------------+ +// | file : $RCSfile$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ //----------------------------------------------------------- include $phpwg_root_path = './'; -include_once( $phpwg_root_path.'common.php' ); +include_once( $phpwg_root_path.'include/common.inc.php' ); //-------------------------------------------------------------- identification $errors = array(); diff --git a/include/common.inc.php b/include/common.inc.php new file mode 100644 index 000000000..8a35ef469 --- /dev/null +++ b/include/common.inc.php @@ -0,0 +1,208 @@ + | +// | branch : 1.4 | +// +-----------------------------------------------------------------------+ +// | file : $RCSfile$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ +// determine the initial instant to indicate the generation time of this page +$t1 = explode( ' ', microtime() ); +$t2 = explode( '.', $t1[0] ); +$t2 = $t1[1].'.'.$t2[1]; + +set_magic_quotes_runtime(0); // Disable magic_quotes_runtime + +// +// addslashes to vars if magic_quotes_gpc is off +// this is a security precaution to prevent someone +// trying to break out of a SQL statement. +// +if( !get_magic_quotes_gpc() ) +{ + if( is_array($HTTP_GET_VARS) ) + { + while( list($k, $v) = each($HTTP_GET_VARS) ) + { + if( is_array($HTTP_GET_VARS[$k]) ) + { + while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) ) + { + $HTTP_GET_VARS[$k][$k2] = addslashes($v2); + } + @reset($HTTP_GET_VARS[$k]); + } + else + { + $HTTP_GET_VARS[$k] = addslashes($v); + } + } + @reset($HTTP_GET_VARS); + } + + if( is_array($HTTP_POST_VARS) ) + { + while( list($k, $v) = each($HTTP_POST_VARS) ) + { + if( is_array($HTTP_POST_VARS[$k]) ) + { + while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) ) + { + $HTTP_POST_VARS[$k][$k2] = addslashes($v2); + } + @reset($HTTP_POST_VARS[$k]); + } + else + { + $HTTP_POST_VARS[$k] = addslashes($v); + } + } + @reset($HTTP_POST_VARS); + } + + if( is_array($HTTP_COOKIE_VARS) ) + { + while( list($k, $v) = each($HTTP_COOKIE_VARS) ) + { + if( is_array($HTTP_COOKIE_VARS[$k]) ) + { + while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) ) + { + $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2); + } + @reset($HTTP_COOKIE_VARS[$k]); + } + else + { + $HTTP_COOKIE_VARS[$k] = addslashes($v); + } + } + @reset($HTTP_COOKIE_VARS); + } +} + +// +// Define some basic configuration arrays this also prevents +// malicious rewriting of language and otherarray values via +// URI params +// +$conf = array(); +$page = array(); +$user = array(); +$lang = array(); + +include($phpwg_root_path .'config.php'); + +if( !defined("PHPWG_INSTALLED") ) +{ + header("Location: install.php"); + exit; +} + +include($phpwg_root_path . 'include/constants.php'); +include($phpwg_root_path . 'include/functions.inc.php'); +include($phpwg_root_path . 'include/template.php'); +include($phpwg_root_path . 'include/vtemplate.class.php'); +include($phpwg_root_path . 'include/config.inc.php'); + +// +// Database connection +// + +mysql_connect( $cfgHote, $cfgUser, $cfgPassword ) + or die ( "Could not connect to server" ); +mysql_select_db( $cfgBase ) + or die ( "Could not connect to database" ); + +// +// Obtain and encode users IP +// +if( getenv('HTTP_X_FORWARDED_FOR') != '' ) +{ + $client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); + + if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", getenv('HTTP_X_FORWARDED_FOR'), $ip_list) ) + { + $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10.\.*/', '/^224.\.*/', '/^240.\.*/'); + $client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]); + } +} +else +{ + $client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); +} +$user_ip = encode_ip($client_ip); + +// +// Setup forum wide options, if this fails +// then we output a CRITICAL_ERROR since +// basic forum information is not available +// +$sql = "SELECT * FROM " . CONFIG_TABLE; +if( !($result = mysql_query($sql)) ) +{ + die("Could not query config information"); +} + +$row =mysql_fetch_array($result); +// rertieving the configuration informations for site +// $infos array is used to know the fields to retrieve in the table "config" +// Each field becomes an information of the array $conf. +// Example : +// prefix_thumbnail --> $conf['prefix_thumbnail'] +$infos = array( 'prefix_thumbnail', 'webmaster', 'mail_webmaster', 'access', + 'session_id_size', 'session_keyword', 'session_time', + 'max_user_listbox', 'show_comments', 'nb_comment_page', + 'upload_available', 'upload_maxfilesize', 'upload_maxwidth', + 'upload_maxheight', 'upload_maxwidth_thumbnail', + 'upload_maxheight_thumbnail','log','comments_validation', + 'comments_forall','authorize_cookies','mail_notification' ); +// affectation of each field of the table "config" to an information of the +// array $conf. +foreach ( $infos as $info ) { + if ( isset( $row[$info] ) ) $conf[$info] = $row[$info]; + else $conf[$info] = ''; + // If the field is true or false, the variable is transformed into a boolean + // value. + if ( $conf[$info] == 'true' or $conf[$info] == 'false' ) + { + $conf[$info] = get_boolean( $conf[$info] ); + } +} + +if (file_exists('install.php') && !DEBUG) +{ + die('Please ensure both the install/ and contrib/ directories are deleted'); +} + + +//--------------- +// A partir d'ici il faudra dispatcher le code dans d'autres fichiers +//--------------- + +include($phpwg_root_path . 'include/user.inc.php'); + +// displaying the username in the language of the connected user, instead of +// "guest" as you can find in the database +if ( $user['is_the_guest'] ) $user['username'] = $lang['guest']; +include_once( './template/'.$user['template'].'/htmlfunctions.inc.php' ); +define('PREFIX_TABLE', $table_prefix); +?> \ No newline at end of file diff --git a/index.php b/index.php index cdcfaa01f..a3e96b03f 100644 --- a/index.php +++ b/index.php @@ -1,25 +1,33 @@ * - * author : Pierrick LE GALL * - * * - * $Id$ - * * - *************************************************************************** - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; * - * * - ***************************************************************************/ +// +-----------------------------------------------------------------------+ +// | index.php | +// +-----------------------------------------------------------------------+ +// | application : PhpWebGallery | +// | branch : 1.4 | +// +-----------------------------------------------------------------------+ +// | file : $RCSfile$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ //----------------------------------------------------------- include $phpwg_root_path = './'; -include_once( $phpwg_root_path.'common.php' ); +include_once( $phpwg_root_path.'include/common.inc.php' ); if ( $conf['access'] == 'restricted' ) { if ( isset( $_COOKIE['id'] ) ) $url = 'category'; diff --git a/install.php b/install.php index 95c0098e6..99a5a7bc0 100644 --- a/install.php +++ b/install.php @@ -1,21 +1,29 @@ * - * author : Pierrick LE GALL * - * * - * $Id$ - * * - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; * - * * - ***************************************************************************/ +// +-----------------------------------------------------------------------+ +// | install.php | +// +-----------------------------------------------------------------------+ +// | application : PhpWebGallery | +// | branch : 1.4 | +// +-----------------------------------------------------------------------+ +// | file : $RCSfile$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ //-------------------------------------------------------------------- includes define( 'PREFIX_INCLUDE', '' ); diff --git a/picture.php b/picture.php index bc44846b2..00b5fa201 100644 --- a/picture.php +++ b/picture.php @@ -1,25 +1,32 @@ * - * author : Pierrick LE GALL * - * * - * $Id$ - * * - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; * - * * - ***************************************************************************/ -// this page shows the image full size +// +-----------------------------------------------------------------------+ +// | picture.php | +// +-----------------------------------------------------------------------+ +// | application : PhpWebGallery | +// | branch : 1.4 | +// +-----------------------------------------------------------------------+ +// | file : $RCSfile$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ //----------------------------------------------------------- include $phpwg_root_path = './'; -include_once( $phpwg_root_path.'common.php' ); +include_once( $phpwg_root_path.'include/common.inc.php' ); //-------------------------------------------------- access authorization check check_cat_id( $_GET['cat'] ); check_login_authorization(); diff --git a/profile.php b/profile.php index 3b27d57cb..d1d8977ee 100644 --- a/profile.php +++ b/profile.php @@ -1,10 +1,9 @@ | -// | branch : 1.4 | -// | author : Pierrick LE GALL | +// | branch : 1.4 | // +-----------------------------------------------------------------------+ // | file : $RCSfile$ // | last update : $Date$ @@ -13,13 +12,23 @@ // +-----------------------------------------------------------------------+ // | This program is free software; you can redistribute it and/or modify | // | it under the terms of the GNU General Public License as published by | -// | the Free Software Foundation; | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | // +-----------------------------------------------------------------------+ // customize appearance of the site for a user //----------------------------------------------------------- include $phpwg_root_path = './'; -include_once( $phpwg_root_path.'common.php' ); +include_once( $phpwg_root_path.'include/common.inc.php' ); //-------------------------------------------------- access authorization check check_login_authorization(); if ( $user['is_the_guest'] ) diff --git a/register.php b/register.php index 399e60603..68a22da8f 100644 --- a/register.php +++ b/register.php @@ -1,25 +1,33 @@ * - * author : Pierrick LE GALL * - * * - * $Id$ - * * - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; * - * * - ***************************************************************************/ +// +-----------------------------------------------------------------------+ +// | register.php | +// +-----------------------------------------------------------------------+ +// | application : PhpWebGallery | +// | branch : 1.4 | +// +-----------------------------------------------------------------------+ +// | file : $RCSfile$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ //----------------------------------------------------------- include $phpwg_root_path = './'; -include_once( $phpwg_root_path.'common.php' ); +include_once( $phpwg_root_path.'incelude/common.inc.php' ); //-------------------------------------------------- access authorization check if ( $conf['access'] == "restricted" ) { diff --git a/search.php b/search.php index 9d3cd9180..41dcbe1fe 100644 --- a/search.php +++ b/search.php @@ -1,25 +1,33 @@ * - * author : Pierrick LE GALL * - * * - * $Id$ - * * - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; * - * * - ***************************************************************************/ +// +-----------------------------------------------------------------------+ +// | search.php | +// +-----------------------------------------------------------------------+ +// | application : PhpWebGallery | +// | branch : 1.4 | +// +-----------------------------------------------------------------------+ +// | file : $RCSfile$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ //----------------------------------------------------------- include $phpwg_root_path = './'; -include_once( $phpwg_root_path.'common.php' ); +include_once( $phpwg_root_path.'include/common.inc.php' ); //-------------------------------------------------- access authorization check check_login_authorization(); //----------------------------------------------------------------- redirection diff --git a/upload.php b/upload.php index 778863743..88a81f1c8 100644 --- a/upload.php +++ b/upload.php @@ -1,25 +1,31 @@ * - * author : Pierrick LE GALL * - * * - * $Id$ - * * - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; * - * * - ***************************************************************************/ - -//----------------------------------------------------------- include +// +-----------------------------------------------------------------------+ +// | upload.php | +// +-----------------------------------------------------------------------+ +// | application : PhpWebGallery | +// | branch : 1.4 | +// +-----------------------------------------------------------------------+ +// | file : $RCSfile$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Revision$ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ $phpwg_root_path = './'; -include_once( $phpwg_root_path.'common.php' ); +include_once( $phpwg_root_path.'include/common.inc.php' ); //------------------------------------------------------------------- functions // The validate_upload function checks if the image of the given path is valid. -- cgit v1.2.3