diff options
author | z0rglub <z0rglub@piwigo.org> | 2003-09-14 15:00:39 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2003-09-14 15:00:39 +0000 |
commit | 36a792246bc4aae3d4c506222cb6e8e97307eca0 (patch) | |
tree | dc1872ab5ef2806a295af2f81884634d6489bdc2 /admin/user_add.php | |
parent | 676739adc4e24185abcd1465dad290e38e62a9b0 (diff) |
Removing user_add.php, this file is replaced by a small form in user_list.php
git-svn-id: http://piwigo.org/svn/trunk@95 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/user_add.php')
-rw-r--r-- | admin/user_add.php | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/admin/user_add.php b/admin/user_add.php deleted file mode 100644 index d2353d212..000000000 --- a/admin/user_add.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -/*************************************************************************** - * user_add.php * - * ------------------- * - * application : PhpWebGallery 1.3 <http://phpwebgallery.net> * - * author : Pierrick LE GALL <pierrick@z0rglub.com> * - * * - * $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_once( './include/isadmin.inc.php' ); -//----------------------------------------------------- template initialization -$sub = $vtp->Open( '../template/'.$user['template'].'/admin/user_add.vtp' ); -$tpl = array( 'adduser_info_message', 'adduser_info_back', - 'adduser_fill_form', 'login', 'password', 'mail_address', - 'adduser_status', 'submit' ); -templatize_array( $tpl, 'lang', $sub ); -//--------------------------------------------------------- form criteria check -$error = array(); -if ( isset( $_POST['submit'] ) ) -{ - $error = register_user( - $_POST['username'], $_POST['password'], $_POST['password'], - $_POST['mail_address'], $_POST['status'] ); -} -//-------------------------------------------------------------- errors display -if ( sizeof( $error ) != 0 ) -{ - $vtp->addSession( $sub, 'errors' ); - for ( $i = 0; $i < sizeof( $error ); $i++ ) - { - $vtp->addSession( $sub, 'li' ); - $vtp->setVar( $sub, 'li.li', $error[$i] ); - $vtp->closeSession( $sub, 'li' ); - } - $vtp->closeSession( $sub, 'errors' ); -} -//---------------------------------------------------------------- confirmation -if ( sizeof( $error ) == 0 and isset( $_POST['submit'] ) ) -{ - $vtp->addSession( $sub, 'confirmation' ); - $vtp->setVar( $sub, 'confirmation.username', $_POST['username'] ); - $url = add_session_id( './admin.php?page=user_list' ); - $vtp->setVar( $sub, 'confirmation.url', $url ); - $vtp->closeSession( $sub, 'confirmation' ); - // reset all values - unset( $_POST ); -} -//------------------------------------------------------------------------ form -$action = add_session_id( './admin.php?page=user_add' ); -$vtp->setVar( $sub, 'form_action', $action ); -$vtp->setVar( $sub, 'user:username', $_POST['username'] ); -$vtp->setVar( $sub, 'user:password', $_POST['password'] ); -$vtp->setVar( $sub, 'user:mail_address', $_POST['mail_address'] ); - -if ( !isset( $_POST['status'] ) ) -{ - $_POST['status'] = 'guest'; -} -$option = get_enums( PREFIX_TABLE.'users', 'status' ); -for ( $i = 0; $i < sizeof( $option ); $i++ ) -{ - $vtp->addSession( $sub, 'status_option' ); - $vtp->setVar( $sub, 'status_option.value', $option[$i] ); - $vtp->setVar( $sub, 'status_option.option', - $lang['adduser_status_'.$option[$i]] ); - if( $option[$i] == $_POST['status'] ) - { - $vtp->setVar( $sub, 'status_option.selected', ' selected="selected"' ); - } - $vtp->closeSession( $sub, 'status_option' ); -} -//----------------------------------------------------------- sending html code -$vtp->Parse( $handle , 'sub', $sub ); -?>
\ No newline at end of file |