aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorgweltas <gweltas@piwigo.org>2004-02-19 00:31:09 +0000
committergweltas <gweltas@piwigo.org>2004-02-19 00:31:09 +0000
commit78df1f97d366e5f9e4115c658ad91fab70717f29 (patch)
tree518126d0a8728d9a2c81155e6ce6527b74fbaf92 /admin
parent19b4964996483b51338deedbdf1dafc6d7ec16d8 (diff)
Split of langage files
git-svn-id: http://piwigo.org/svn/trunk@364 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin.php6
-rw-r--r--admin/cat_modify.php2
-rw-r--r--admin/cat_perm.php4
-rw-r--r--admin/configuration.php4
-rw-r--r--admin/group_perm.php2
-rw-r--r--admin/include/functions.php12
-rw-r--r--admin/include/isadmin.inc.php2
-rw-r--r--admin/user_list.php8
-rw-r--r--admin/user_modify.php2
9 files changed, 20 insertions, 22 deletions
diff --git a/admin.php b/admin.php
index ab774cb4c..6f76ad4cc 100644
--- a/admin.php
+++ b/admin.php
@@ -26,8 +26,8 @@
// +-----------------------------------------------------------------------+
//----------------------------------------------------------- include
-$phpwg_root_path = './';
-include_once( $phpwg_root_path.'include/common.inc.php' );
+define('PHPWG_ROOT_PATH','./');
+include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
include_once( './admin/include/isadmin.inc.php' );
//----------------------------------------------------- template initialization
$vtp = new VTemplate;
@@ -54,7 +54,7 @@ switch ( $_GET['page'] )
case 'user_perm':
if ( !is_numeric( $_GET['user_id'] ) ) $_GET['user_id'] = -1;
$query = 'SELECT status,username';
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= ' WHERE id = '.$_GET['user_id'];
$query.= ';';
$result = mysql_query( $query );
diff --git a/admin/cat_modify.php b/admin/cat_modify.php
index 69e90cbc8..2f08f8f81 100644
--- a/admin/cat_modify.php
+++ b/admin/cat_modify.php
@@ -99,7 +99,7 @@ if ( isset( $_POST['submit'] ) )
// checking users favorites
$query = 'SELECT id';
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= ';';
$result = mysql_query( $query );
while ( $row = mysql_fetch_array( $result ) )
diff --git a/admin/cat_perm.php b/admin/cat_perm.php
index 70a053ade..b571caeab 100644
--- a/admin/cat_perm.php
+++ b/admin/cat_perm.php
@@ -75,7 +75,7 @@ if ( isset( $_POST['submit'] ) )
$query.= ';';
mysql_query( $query );
$query = 'SELECT id';
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= ';';
$result = mysql_query( $query );
while ( $row = mysql_fetch_array( $result ) )
@@ -137,7 +137,7 @@ if ( mysql_num_rows( $result ) > 0 )
}
//----------------------------------------------------------------------- users
$query = 'SELECT id,username,status';
-$query.= ' FROM '.PREFIX_TABLE.'users';
+$query.= ' FROM '.USERS_TABLE;
// only the webmaster can modify webmaster's permissions
if ( $user['username'] != $conf['webmaster'] )
{
diff --git a/admin/configuration.php b/admin/configuration.php
index 4a594f391..733b8f1b9 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -217,7 +217,7 @@ if ( isset( $_POST['submit'] ) )
$query.= ';';
mysql_query( $query );
- $query = 'UPDATE '.PREFIX_TABLE.'users';
+ $query = 'UPDATE '.USERS_TABLE;
$query.= ' SET';
foreach ( $default_user_infos as $i => $default_user_info ) {
if ( $i > 0 ) $query.= ',';
@@ -257,7 +257,7 @@ else
}
$query = 'SELECT '.implode( ',', $default_user_infos );
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= " WHERE username = 'guest'";
$query.= ';';
$row = mysql_fetch_array( mysql_query( $query ) );
diff --git a/admin/group_perm.php b/admin/group_perm.php
index 531717428..37deb5984 100644
--- a/admin/group_perm.php
+++ b/admin/group_perm.php
@@ -61,7 +61,7 @@ if ( isset( $_POST['submit'] ) )
}
// checking users favorites
$query = 'SELECT id';
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= ';';
$result = mysql_query( $query );
while ( $row = mysql_fetch_array( $result ) )
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 9a54e14e4..bb22b50ac 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -282,7 +282,7 @@ function delete_user( $user_id )
mysql_query( $query );
// destruction of the user
- $query = 'DELETE FROM '.PREFIX_TABLE.'users';
+ $query = 'DELETE FROM '.USERS_TABLE;
$query.= ' WHERE id = '.$user_id;
$query.= ';';
mysql_query( $query );
@@ -322,7 +322,7 @@ function delete_group( $group_id )
function check_favorites( $user_id )
{
$query = 'SELECT status,forbidden_categories';
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= ' WHERE id = '.$user_id;
$query.= ';';
$row = mysql_fetch_array( mysql_query( $query ) );
@@ -852,7 +852,7 @@ function synchronize_all_users()
$user_restrictions = array();
$query = 'SELECT id';
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= ';';
$result = mysql_query( $query );
while ( $row = mysql_fetch_array( $result ) )
@@ -901,7 +901,7 @@ function synchronize_group( $group_id )
$user_restrictions = array();
$query = 'SELECT id';
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= ', '.PREFIX_TABLE.'user_group';
$query.= ' WHERE group_id = '.$group_id;
$query.= ' AND id = user_id';
@@ -926,7 +926,7 @@ function update_user_restrictions( $user_id )
$restrictions = get_user_all_restrictions( $user_id );
// update the users.forbidden_categories in database
- $query = 'UPDATE '.PREFIX_TABLE.'users';
+ $query = 'UPDATE '.USERS_TABLE;
$query.= ' SET forbidden_categories = ';
if ( count( $restrictions ) > 0 )
$query.= "'".implode( ',', $restrictions )."'";
@@ -950,7 +950,7 @@ function get_user_all_restrictions( $user_id )
global $page;
$query = 'SELECT status';
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= ' WHERE id = '.$user_id;
$query.= ';';
$row = mysql_fetch_array( mysql_query( $query ) );
diff --git a/admin/include/isadmin.inc.php b/admin/include/isadmin.inc.php
index 11545b700..2b053d7b1 100644
--- a/admin/include/isadmin.inc.php
+++ b/admin/include/isadmin.inc.php
@@ -28,8 +28,6 @@
include( './admin/include/functions.php' );
$isadmin = true;
-include_once( './language/'.$user['language'].'/lang_admin.php' );
-
if ( $user['status'] != 'admin' )
{
echo '<div style="text-align:center;">'.$lang['access_forbiden'].'<br />';
diff --git a/admin/user_list.php b/admin/user_list.php
index a340362aa..82bbeb86c 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -61,7 +61,7 @@ else if ( isset( $_POST['submit_add_user'] ) )
if ( isset ( $_GET['delete'] ) and is_numeric( $_GET['delete'] ) )
{
$query = 'SELECT username';
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= ' WHERE id = '.$_GET['delete'];
$query.= ';';
$row = mysql_fetch_array( mysql_query( $query ) );
@@ -85,7 +85,7 @@ if ( isset ( $_GET['delete'] ) and is_numeric( $_GET['delete'] ) )
and $row['username'] != $conf['webmaster'] )
{
$query = 'SELECT COUNT(*) AS nb_result';
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= ' WHERE id = '.$_GET['delete'];
$query.= ';';
$row2 = mysql_fetch_array( mysql_query( $query ) );
@@ -131,7 +131,7 @@ else
$vtp->setVar( $sub, 'users.form_action', $action );
$query = 'SELECT id,username,status,mail_address';
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= ' ORDER BY status ASC, username ASC';
$query.= ';';
$result = mysql_query( $query );
@@ -233,7 +233,7 @@ else
{
$mails = array();
$query = 'SELECT id,mail_address';
- $query.= ' FROM '.PREFIX_TABLE.'users';
+ $query.= ' FROM '.USERS_TABLE;
$query.= ';';
$result = mysql_query( $query );
while ( $row = mysql_fetch_array( $result ) )
diff --git a/admin/user_modify.php b/admin/user_modify.php
index 3823c9ef6..f55a041a8 100644
--- a/admin/user_modify.php
+++ b/admin/user_modify.php
@@ -41,7 +41,7 @@ $display_form = true;
// id in $_GET['user_id']
$query = 'select';
$query.= ' username,status,mail_address';
-$query.= ' from '.PREFIX_TABLE.'users';
+$query.= ' from '.USERS_TABLE;
$query.= ' where id = '.$_GET['user_id'];
$query.= ';';
$row = mysql_fetch_array( mysql_query( $query ) );