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
This commit is contained in:
gweltas 2004-02-07 19:36:44 +00:00
parent 3ae73d950e
commit e712c4aef8
13 changed files with 299 additions and 205 deletions

View file

@ -1,25 +1,33 @@
<?php <?php
/*************************************************************************** // +-----------------------------------------------------------------------+
* about.php * // | about.php |
* ------------------ * // +-----------------------------------------------------------------------+
* application : PhpWebGallery 1.3 <http://phpwebgallery.net> * // | application : PhpWebGallery <http://phpwebgallery.net> |
* author : Pierrick LE GALL <pierrick@z0rglub.com> * // | branch : 1.4 |
* * // +-----------------------------------------------------------------------+
* $Id$ // | file : $RCSfile$
* * // | last update : $Date$
***************************************************************************/ // | last modifier : $Author$
// | revision : $Revision$
/*************************************************************************** // +-----------------------------------------------------------------------+
* * // | This program is free software; you can redistribute it and/or modify |
* 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 |
* 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. |
// +-----------------------------------------------------------------------+
//----------------------------------------------------------- include //----------------------------------------------------------- include
$phpwg_root_path = './'; $phpwg_root_path = './';
include_once( $phpwg_root_path.'common.php' ); include_once( $phpwg_root_path.'include/common.inc.php' );
//----------------------------------------------------- template initialization //----------------------------------------------------- template initialization
// //
// Start output of page // Start output of page

View file

@ -1,25 +1,33 @@
<?php <?php
/*************************************************************************** // +-----------------------------------------------------------------------+
* admin.php * // | admin.php |
* ------------------- * // +-----------------------------------------------------------------------+
* application : PhpWebGallery 1.3 <http://phpwebgallery.net> * // | application : PhpWebGallery <http://phpwebgallery.net> |
* author : Pierrick LE GALL <pierrick@z0rglub.com> * // | branch : 1.4 |
* * // +-----------------------------------------------------------------------+
* $Id$ // | file : $RCSfile$
* * // | last update : $Date$
***************************************************************************/ // | last modifier : $Author$
// | revision : $Revision$
/*************************************************************************** // +-----------------------------------------------------------------------+
* * // | This program is free software; you can redistribute it and/or modify |
* 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 |
* 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. |
// +-----------------------------------------------------------------------+
//----------------------------------------------------------- include //----------------------------------------------------------- include
$phpwg_root_path = './'; $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' ); include_once( './admin/include/isadmin.inc.php' );
//----------------------------------------------------- template initialization //----------------------------------------------------- template initialization
$vtp = new VTemplate; $vtp = new VTemplate;

View file

@ -27,7 +27,7 @@
//--------------------------------------------------------------------- include //--------------------------------------------------------------------- include
$phpwg_root_path = './'; $phpwg_root_path = './';
include_once( $phpwg_root_path.'common.php' ); include_once( $phpwg_root_path.'include/common.inc.php' );
//---------------------------------------------------------------------- logout //---------------------------------------------------------------------- logout
if ( isset( $_GET['act'] ) if ( isset( $_GET['act'] )
and $_GET['act'] == 'logout' and $_GET['act'] == 'logout'

View file

@ -1,25 +1,33 @@
<?php <?php
/*************************************************************************** // +-----------------------------------------------------------------------+
* comments.php * // | comments.php |
* ------------------- * // +-----------------------------------------------------------------------+
* application : PhpWebGallery 1.3 <http://phpwebgallery.net> * // | application : PhpWebGallery <http://phpwebgallery.net> |
* author : Pierrick LE GALL <pierrick@z0rglub.com> * // | branch : 1.4 |
* * // +-----------------------------------------------------------------------+
* $Id$ // | file : $RCSfile$
* * // | last update : $Date$
***************************************************************************/ // | last modifier : $Author$
// | revision : $Revision$
/*************************************************************************** // +-----------------------------------------------------------------------+
* * // | This program is free software; you can redistribute it and/or modify |
* 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 |
* 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. |
// +-----------------------------------------------------------------------+
//----------------------------------------------------------- include //----------------------------------------------------------- include
$phpwg_root_path = './'; $phpwg_root_path = './';
include_once( $phpwg_root_path.'common.php' ); include_once( $phpwg_root_path.'include/common.inc.php' );
//------------------------------------------------------------------- functions //------------------------------------------------------------------- functions
function display_pictures( $mysql_result, $maxtime, $forbidden_cat_ids ) function display_pictures( $mysql_result, $maxtime, $forbidden_cat_ids )

View file

@ -1,25 +1,33 @@
<?php <?php
/*************************************************************************** // +-----------------------------------------------------------------------+
* identification.php * // | identification.php |
* ------------------ * // +-----------------------------------------------------------------------+
* application : PhpWebGallery 1.3 <http://phpwebgallery.net> * // | application : PhpWebGallery <http://phpwebgallery.net> |
* author : Pierrick LE GALL <pierrick@z0rglub.com> * // | branch : 1.4 |
* * // +-----------------------------------------------------------------------+
* $Id$ // | file : $RCSfile$
* * // | last update : $Date$
***************************************************************************/ // | last modifier : $Author$
// | revision : $Revision$
/*************************************************************************** // +-----------------------------------------------------------------------+
* * // | This program is free software; you can redistribute it and/or modify |
* 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 |
* 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. |
// +-----------------------------------------------------------------------+
//----------------------------------------------------------- include //----------------------------------------------------------- include
$phpwg_root_path = './'; $phpwg_root_path = './';
include_once( $phpwg_root_path.'common.php' ); include_once( $phpwg_root_path.'include/common.inc.php' );
//-------------------------------------------------------------- identification //-------------------------------------------------------------- identification
$errors = array(); $errors = array();

View file

@ -1,21 +1,29 @@
<?php <?php
/*************************************************************************** // +-----------------------------------------------------------------------+
* common.php * // | common.inc.php |
* ------------------- * // +-----------------------------------------------------------------------+
* application : PhpWebGallery 1.4 <http://phpwebgallery.net> * // | application : PhpWebGallery <http://phpwebgallery.net> |
* author : Pierrick LE GALL <pierrick@z0rglub.com> * // | branch : 1.4 |
* * // +-----------------------------------------------------------------------+
* $Id$ // | file : $RCSfile$
* * // | last update : $Date$
***************************************************************************/ // | last modifier : $Author$
// | revision : $Revision$
/*************************************************************************** // +-----------------------------------------------------------------------+
* * // | This program is free software; you can redistribute it and/or modify |
* 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 |
* 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. |
// +-----------------------------------------------------------------------+
// determine the initial instant to indicate the generation time of this page // determine the initial instant to indicate the generation time of this page
$t1 = explode( ' ', microtime() ); $t1 = explode( ' ', microtime() );
$t2 = explode( '.', $t1[0] ); $t2 = explode( '.', $t1[0] );

View file

@ -1,25 +1,33 @@
<?php <?php
/*************************************************************************** // +-----------------------------------------------------------------------+
* index.php * // | index.php |
* ------------------- * // +-----------------------------------------------------------------------+
* application : PhpWebGallery 1.3 <http://phpwebgallery.net> * // | application : PhpWebGallery <http://phpwebgallery.net> |
* author : Pierrick LE GALL <pierrick@z0rglub.com> * // | branch : 1.4 |
* * // +-----------------------------------------------------------------------+
* $Id$ // | file : $RCSfile$
* * // | last update : $Date$
*************************************************************************** // | last modifier : $Author$
// | revision : $Revision$
/*************************************************************************** // +-----------------------------------------------------------------------+
* * // | This program is free software; you can redistribute it and/or modify |
* 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 |
* 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. |
// +-----------------------------------------------------------------------+
//----------------------------------------------------------- include //----------------------------------------------------------- include
$phpwg_root_path = './'; $phpwg_root_path = './';
include_once( $phpwg_root_path.'common.php' ); include_once( $phpwg_root_path.'include/common.inc.php' );
if ( $conf['access'] == 'restricted' ) if ( $conf['access'] == 'restricted' )
{ {
if ( isset( $_COOKIE['id'] ) ) $url = 'category'; if ( isset( $_COOKIE['id'] ) ) $url = 'category';

View file

@ -1,21 +1,29 @@
<?php <?php
/*************************************************************************** // +-----------------------------------------------------------------------+
* install.php * // | install.php |
* ------------------- * // +-----------------------------------------------------------------------+
* application : PhpWebGallery 1.3 <http://phpwebgallery.net> * // | application : PhpWebGallery <http://phpwebgallery.net> |
* author : Pierrick LE GALL <pierrick@z0rglub.com> * // | branch : 1.4 |
* * // +-----------------------------------------------------------------------+
* $Id$ // | file : $RCSfile$
* * // | last update : $Date$
***************************************************************************/ // | last modifier : $Author$
// | revision : $Revision$
/*************************************************************************** // +-----------------------------------------------------------------------+
* * // | This program is free software; you can redistribute it and/or modify |
* 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 |
* 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. |
// +-----------------------------------------------------------------------+
//-------------------------------------------------------------------- includes //-------------------------------------------------------------------- includes
define( 'PREFIX_INCLUDE', '' ); define( 'PREFIX_INCLUDE', '' );

View file

@ -1,25 +1,32 @@
<?php <?php
/*************************************************************************** // +-----------------------------------------------------------------------+
* picture.php * // | picture.php |
* ------------------- * // +-----------------------------------------------------------------------+
* application : PhpWebGallery 1.3 <http://phpwebgallery.net> * // | application : PhpWebGallery <http://phpwebgallery.net> |
* author : Pierrick LE GALL <pierrick@z0rglub.com> * // | branch : 1.4 |
* * // +-----------------------------------------------------------------------+
* $Id$ // | file : $RCSfile$
* * // | last update : $Date$
***************************************************************************/ // | last modifier : $Author$
// | revision : $Revision$
/*************************************************************************** // +-----------------------------------------------------------------------+
* * // | This program is free software; you can redistribute it and/or modify |
* 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 |
* 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 |
// this page shows the image full size // | 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 //----------------------------------------------------------- include
$phpwg_root_path = './'; $phpwg_root_path = './';
include_once( $phpwg_root_path.'common.php' ); include_once( $phpwg_root_path.'include/common.inc.php' );
//-------------------------------------------------- access authorization check //-------------------------------------------------- access authorization check
check_cat_id( $_GET['cat'] ); check_cat_id( $_GET['cat'] );
check_login_authorization(); check_login_authorization();

View file

@ -1,10 +1,9 @@
<?php <?php
// +-----------------------------------------------------------------------+ // +-----------------------------------------------------------------------+
// | profile.php | // | profile.php |
// +-----------------------------------------------------------------------+ // +-----------------------------------------------------------------------+
// | application : PhpWebGallery <http://phpwebgallery.net> | // | application : PhpWebGallery <http://phpwebgallery.net> |
// | branch : 1.4 | // | branch : 1.4 |
// | author : Pierrick LE GALL <pierrick@z0rglub.com> |
// +-----------------------------------------------------------------------+ // +-----------------------------------------------------------------------+
// | file : $RCSfile$ // | file : $RCSfile$
// | last update : $Date$ // | last update : $Date$
@ -13,13 +12,23 @@
// +-----------------------------------------------------------------------+ // +-----------------------------------------------------------------------+
// | This program is free software; you can redistribute it and/or modify | // | 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 | // | 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 // customize appearance of the site for a user
//----------------------------------------------------------- include //----------------------------------------------------------- include
$phpwg_root_path = './'; $phpwg_root_path = './';
include_once( $phpwg_root_path.'common.php' ); include_once( $phpwg_root_path.'include/common.inc.php' );
//-------------------------------------------------- access authorization check //-------------------------------------------------- access authorization check
check_login_authorization(); check_login_authorization();
if ( $user['is_the_guest'] ) if ( $user['is_the_guest'] )

View file

@ -1,25 +1,33 @@
<?php <?php
/*************************************************************************** // +-----------------------------------------------------------------------+
* register.php * // | register.php |
* ------------------- * // +-----------------------------------------------------------------------+
* application : PhpWebGallery 1.3 <http://phpwebgallery.net> * // | application : PhpWebGallery <http://phpwebgallery.net> |
* author : Pierrick LE GALL <pierrick@z0rglub.com> * // | branch : 1.4 |
* * // +-----------------------------------------------------------------------+
* $Id$ // | file : $RCSfile$
* * // | last update : $Date$
***************************************************************************/ // | last modifier : $Author$
// | revision : $Revision$
/*************************************************************************** // +-----------------------------------------------------------------------+
* * // | This program is free software; you can redistribute it and/or modify |
* 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 |
* 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. |
// +-----------------------------------------------------------------------+
//----------------------------------------------------------- include //----------------------------------------------------------- include
$phpwg_root_path = './'; $phpwg_root_path = './';
include_once( $phpwg_root_path.'common.php' ); include_once( $phpwg_root_path.'incelude/common.inc.php' );
//-------------------------------------------------- access authorization check //-------------------------------------------------- access authorization check
if ( $conf['access'] == "restricted" ) if ( $conf['access'] == "restricted" )
{ {

View file

@ -1,25 +1,33 @@
<?php <?php
/*************************************************************************** // +-----------------------------------------------------------------------+
* search.php * // | search.php |
* ------------------- * // +-----------------------------------------------------------------------+
* application : PhpWebGallery 1.3 <http://phpwebgallery.net> * // | application : PhpWebGallery <http://phpwebgallery.net> |
* author : Pierrick LE GALL <pierrick@z0rglub.com> * // | branch : 1.4 |
* * // +-----------------------------------------------------------------------+
* $Id$ // | file : $RCSfile$
* * // | last update : $Date$
***************************************************************************/ // | last modifier : $Author$
// | revision : $Revision$
/*************************************************************************** // +-----------------------------------------------------------------------+
* * // | This program is free software; you can redistribute it and/or modify |
* 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 |
* 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. |
// +-----------------------------------------------------------------------+
//----------------------------------------------------------- include //----------------------------------------------------------- include
$phpwg_root_path = './'; $phpwg_root_path = './';
include_once( $phpwg_root_path.'common.php' ); include_once( $phpwg_root_path.'include/common.inc.php' );
//-------------------------------------------------- access authorization check //-------------------------------------------------- access authorization check
check_login_authorization(); check_login_authorization();
//----------------------------------------------------------------- redirection //----------------------------------------------------------------- redirection

View file

@ -1,25 +1,31 @@
<?php <?php
/*************************************************************************** // +-----------------------------------------------------------------------+
* upload.php * // | upload.php |
* ------------------- * // +-----------------------------------------------------------------------+
* application : PhpWebGallery 1.3 <http://phpwebgallery.net> * // | application : PhpWebGallery <http://phpwebgallery.net> |
* author : Pierrick LE GALL <pierrick@z0rglub.com> * // | branch : 1.4 |
* * // +-----------------------------------------------------------------------+
* $Id$ // | file : $RCSfile$
* * // | last update : $Date$
***************************************************************************/ // | last modifier : $Author$
// | revision : $Revision$
/*************************************************************************** // +-----------------------------------------------------------------------+
* * // | This program is free software; you can redistribute it and/or modify |
* 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 |
* 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 |
//----------------------------------------------------------- include // | 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 = './'; $phpwg_root_path = './';
include_once( $phpwg_root_path.'common.php' ); include_once( $phpwg_root_path.'include/common.inc.php' );
//------------------------------------------------------------------- functions //------------------------------------------------------------------- functions
// The validate_upload function checks if the image of the given path is valid. // The validate_upload function checks if the image of the given path is valid.