2009-11-04 10:27:40 +00:00
|
|
|
<?php
|
|
|
|
/*
|
2010-01-15 16:10:20 +00:00
|
|
|
***************************************************************
|
|
|
|
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
|
|
|
|
| @ Author : ArslanHassan
|
|
|
|
| @ Software : ClipBucket , © PHPBucket.com
|
|
|
|
****************************************************************
|
2009-11-04 10:27:40 +00:00
|
|
|
*/
|
2010-07-28 11:43:41 +00:00
|
|
|
|
|
|
|
define("THIS_PAGE","edit_account");
|
|
|
|
|
2009-11-04 10:27:40 +00:00
|
|
|
require 'includes/config.inc.php';
|
|
|
|
$userquery->logincheck();
|
|
|
|
|
|
|
|
//Updating Profile
|
|
|
|
if(isset($_POST['update_profile']))
|
|
|
|
{
|
|
|
|
$array = $_POST;
|
|
|
|
$array['userid'] = userid();
|
|
|
|
$userquery->update_user($array);
|
|
|
|
}
|
|
|
|
|
|
|
|
//Updating Avatar
|
|
|
|
if(isset($_POST['update_avatar_bg']))
|
|
|
|
{
|
|
|
|
$array = $_POST;
|
|
|
|
$array['userid'] = userid();
|
|
|
|
$userquery->update_user_avatar_bg($array);
|
|
|
|
}
|
|
|
|
|
|
|
|
//Changing Email
|
|
|
|
if(isset($_POST['change_email']))
|
|
|
|
{
|
|
|
|
$array = $_POST;
|
|
|
|
$array['userid'] = userid();
|
|
|
|
$userquery->change_email($array);
|
|
|
|
}
|
|
|
|
|
|
|
|
//Changing User Password
|
|
|
|
if(isset($_POST['change_password']))
|
|
|
|
{
|
|
|
|
$array = $_POST;
|
|
|
|
$array['userid'] = userid();
|
|
|
|
$userquery->change_password($array);
|
|
|
|
}
|
|
|
|
|
|
|
|
//Banning Users
|
2011-02-10 11:59:27 +00:00
|
|
|
if(isset($_POST['block_users']))
|
2009-11-04 10:27:40 +00:00
|
|
|
{
|
2011-02-10 11:59:27 +00:00
|
|
|
$userquery->block_users($_POST['users']);
|
2009-11-04 10:27:40 +00:00
|
|
|
}
|
|
|
|
|
Added : Photo EXIF Data in insert_photo()
Added : Make Avatar from any photo
Added : Collection cover photo
Added : An array for thumb creations. Includes, code, width, height, watermark, sharpit
Added : Resizer class in common.php
Added : jquery.Jcrop.js in edit_account
Added : A common function called cb_filename. All filenames used in clipbucket follow a specific syntax
Added : Four new function for photos. get_original_photo, insert_photo_colors, insert_exif_data & add_custom_photo_size
Added : User Avatar collection functions. But they are not in use right now. This need proper thinking
Added : New files: mobile-form-class.php, resizer.class.php, exif.php, makers files for exif, jquery.Jcrop plugin, some template files
2012-05-16 07:27:54 +00:00
|
|
|
if ( mysql_clean($_GET['mode']) == 'make_avatar' ) {
|
|
|
|
|
|
|
|
$pid = mysql_clean( $_GET['pid'] );
|
|
|
|
$pid = $cbphoto->decode_key( $pid );
|
|
|
|
$pid = substr( $pid, 12, 12 );
|
|
|
|
$photo = $cbphoto->get_photo( $pid );
|
|
|
|
|
|
|
|
if ( !$photo ) {
|
|
|
|
e( lang('photo_not_exist') );
|
|
|
|
cb_show_page( false );
|
|
|
|
} else {
|
|
|
|
assign( 'photo', $photo );
|
|
|
|
if ( isset($_GET['set_avatar']) ) {
|
|
|
|
/* Run set avatar code */
|
|
|
|
} else if( isset( $_POST['set_avatar']) ) {
|
2012-05-18 13:47:20 +00:00
|
|
|
/* Run make avatar code */
|
|
|
|
upload_new_avatar();
|
Added : Photo EXIF Data in insert_photo()
Added : Make Avatar from any photo
Added : Collection cover photo
Added : An array for thumb creations. Includes, code, width, height, watermark, sharpit
Added : Resizer class in common.php
Added : jquery.Jcrop.js in edit_account
Added : A common function called cb_filename. All filenames used in clipbucket follow a specific syntax
Added : Four new function for photos. get_original_photo, insert_photo_colors, insert_exif_data & add_custom_photo_size
Added : User Avatar collection functions. But they are not in use right now. This need proper thinking
Added : New files: mobile-form-class.php, resizer.class.php, exif.php, makers files for exif, jquery.Jcrop plugin, some template files
2012-05-16 07:27:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2009-11-04 10:27:40 +00:00
|
|
|
$mode = $_GET['mode'];
|
|
|
|
|
Added : Photo EXIF Data in insert_photo()
Added : Make Avatar from any photo
Added : Collection cover photo
Added : An array for thumb creations. Includes, code, width, height, watermark, sharpit
Added : Resizer class in common.php
Added : jquery.Jcrop.js in edit_account
Added : A common function called cb_filename. All filenames used in clipbucket follow a specific syntax
Added : Four new function for photos. get_original_photo, insert_photo_colors, insert_exif_data & add_custom_photo_size
Added : User Avatar collection functions. But they are not in use right now. This need proper thinking
Added : New files: mobile-form-class.php, resizer.class.php, exif.php, makers files for exif, jquery.Jcrop plugin, some template files
2012-05-16 07:27:54 +00:00
|
|
|
|
|
|
|
|
2009-11-04 10:27:40 +00:00
|
|
|
switch($mode)
|
|
|
|
{
|
2011-02-09 13:32:08 +00:00
|
|
|
case 'account':
|
|
|
|
{
|
|
|
|
assign('on','account');
|
|
|
|
assign('mode','profile_settings');
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'profile':
|
2009-11-04 10:27:40 +00:00
|
|
|
{
|
2011-02-09 13:32:08 +00:00
|
|
|
assign('on','profile');
|
2009-11-04 10:27:40 +00:00
|
|
|
assign('mode','profile_settings');
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'avatar_bg':
|
|
|
|
{
|
|
|
|
assign('mode','avatar_bg');
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
Added : Photo EXIF Data in insert_photo()
Added : Make Avatar from any photo
Added : Collection cover photo
Added : An array for thumb creations. Includes, code, width, height, watermark, sharpit
Added : Resizer class in common.php
Added : jquery.Jcrop.js in edit_account
Added : A common function called cb_filename. All filenames used in clipbucket follow a specific syntax
Added : Four new function for photos. get_original_photo, insert_photo_colors, insert_exif_data & add_custom_photo_size
Added : User Avatar collection functions. But they are not in use right now. This need proper thinking
Added : New files: mobile-form-class.php, resizer.class.php, exif.php, makers files for exif, jquery.Jcrop plugin, some template files
2012-05-16 07:27:54 +00:00
|
|
|
case 'make_avatar': {
|
|
|
|
assign('mode', 'make_avatar');
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-11-04 10:27:40 +00:00
|
|
|
case 'change_email':
|
|
|
|
{
|
|
|
|
assign('mode','change_email');
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'change_password':
|
|
|
|
{
|
|
|
|
assign('mode','change_password');
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2011-02-10 11:59:27 +00:00
|
|
|
case 'block_users':
|
2009-11-04 10:27:40 +00:00
|
|
|
{
|
2011-02-10 11:59:27 +00:00
|
|
|
assign('mode','block_users');
|
2009-11-04 10:27:40 +00:00
|
|
|
}
|
|
|
|
break;
|
2010-02-01 12:06:13 +00:00
|
|
|
|
|
|
|
case 'subscriptions':
|
|
|
|
{
|
|
|
|
//Removing subscription
|
|
|
|
if(isset($_GET['delete_subs']))
|
|
|
|
{
|
|
|
|
$sid = mysql_clean($_GET['delete_subs']);
|
|
|
|
$userquery->unsubscribe_user($sid);
|
|
|
|
}
|
|
|
|
assign('mode','subs');
|
|
|
|
assign('subs',$userquery->get_user_subscriptions(userid()));
|
|
|
|
}
|
|
|
|
break;
|
2011-02-09 13:32:08 +00:00
|
|
|
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
assign('on','account');
|
|
|
|
assign('mode','profile_settings');
|
|
|
|
}
|
2009-11-04 10:27:40 +00:00
|
|
|
}
|
|
|
|
|
2009-12-31 08:59:12 +00:00
|
|
|
|
2009-11-04 10:27:40 +00:00
|
|
|
$udetails = $userquery->get_user_details(userid());
|
2010-07-28 11:43:41 +00:00
|
|
|
$profile = $userquery->get_user_profile($udetails['userid']);
|
|
|
|
$user_profile = array_merge($udetails,$profile);
|
|
|
|
//pr($Cbucket->header_files);
|
2009-11-04 10:27:40 +00:00
|
|
|
assign('user',$udetails);
|
2010-07-28 11:43:41 +00:00
|
|
|
assign('p',$user_profile);
|
|
|
|
|
2009-11-04 10:27:40 +00:00
|
|
|
|
2009-12-31 08:59:12 +00:00
|
|
|
subtitle(lang("user_manage_my_account"));
|
2009-11-04 10:27:40 +00:00
|
|
|
template_files('edit_account.html');
|
|
|
|
display_it();
|
|
|
|
?>
|