2010-12-14 13:53:51 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
***********************************************************************
|
|
|
|
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
|
|
|
|
| @ Author : ArslanHassan
|
|
|
|
| @ Software : ClipBucket , © PHPBucket.com
|
|
|
|
*************************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
require'../includes/admin_config.php';
|
|
|
|
$userquery->admin_login_check();
|
|
|
|
$userquery->login_check('video_moderation');
|
|
|
|
$pages->page_redir();
|
|
|
|
|
|
|
|
$mode = $_GET['mode'];
|
|
|
|
$photo = mysql_clean($_GET['photo']);
|
|
|
|
|
|
|
|
|
|
|
|
switch($mode)
|
|
|
|
{
|
|
|
|
case "single":
|
|
|
|
{
|
|
|
|
assign('mode',$mode);
|
|
|
|
if($cbphoto->photo_exists($photo))
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if($_GET['recreate'])
|
|
|
|
{
|
|
|
|
$cbphoto->generate_photos($photo);
|
|
|
|
e("Photo has been re-created. Please remove cache if you dont see any change.","m");
|
|
|
|
}
|
|
|
|
|
|
|
|
$files = $cbphoto->get_image_file($photo,'t',TRUE);
|
|
|
|
$p = $cbphoto->get_photo($photo);
|
|
|
|
|
|
|
|
assign('files',$files);
|
|
|
|
assign('p',$p);
|
|
|
|
} else
|
|
|
|
e("Photo does not exist");
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "mass":
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
assign('mode',$mode);
|
|
|
|
$start_index = $_GET['start_index'] ? $_GET['start_index'] : 0;
|
|
|
|
$loop_size = $_GET['loop_size'];
|
|
|
|
$loop_size = $loop_size ? $loop_size : 2;
|
|
|
|
assign('loop_size',$loop_size);
|
|
|
|
$next_index = $start_index+$loop_size;
|
|
|
|
assign('next_index',$next_index);
|
|
|
|
if(isset($_GET['mass_recreation']))
|
|
|
|
{
|
|
|
|
$photos = $cbphoto->get_photos(array("limit"=>$start_index.",".$loop_size));
|
|
|
|
$total = $cbphoto->get_photos(array("count_only"=>true));
|
|
|
|
$i = 0;
|
|
|
|
|
|
|
|
assign('total',$total);
|
|
|
|
assign('from',$start_index+1);
|
|
|
|
$to = $start_index+$loop_size;
|
|
|
|
if($to>$total)
|
|
|
|
{
|
|
|
|
$to = $total;
|
|
|
|
e($total." photos image have been recreated.","m");
|
Fixed : Mass Recreation of photos
Fixed : Uploading/Making/Changing user avatar will also update collection cover to current one
Fixed : $crop variable to $cropping in generate_photos. In resizer.class.php we are using $cropping
Added : New cropping case, 10. Read it's example to understand what it does
Added : Documentation for few function in functions_photos.php
Added : new function called display_user_custom_background in functions_users.php
Added : Custom Dimensions for photos in startup.php. Now these will also be produced, 75x75,100x100,150x150,240,320,500,640,800,1024
Updated : default.css
Added : new display_method in blocks/video.html
Added : Change background form
Fixed : photo embed code
2012-09-26 12:35:05 +00:00
|
|
|
$stop_loop = "yes";
|
2010-12-14 13:53:51 +00:00
|
|
|
assign("stop_loop","yes");
|
Fixed : Mass Recreation of photos
Fixed : Uploading/Making/Changing user avatar will also update collection cover to current one
Fixed : $crop variable to $cropping in generate_photos. In resizer.class.php we are using $cropping
Added : New cropping case, 10. Read it's example to understand what it does
Added : Documentation for few function in functions_photos.php
Added : new function called display_user_custom_background in functions_users.php
Added : Custom Dimensions for photos in startup.php. Now these will also be produced, 75x75,100x100,150x150,240,320,500,640,800,1024
Updated : default.css
Added : new display_method in blocks/video.html
Added : Change background form
Fixed : photo embed code
2012-09-26 12:35:05 +00:00
|
|
|
assign('from',$total);
|
2010-12-14 13:53:51 +00:00
|
|
|
}
|
|
|
|
assign('to',$to);
|
|
|
|
|
|
|
|
while($i < $total)
|
|
|
|
{
|
|
|
|
if($photos[$i]['photo_id'])
|
|
|
|
{
|
2012-10-03 19:00:29 +00:00
|
|
|
$cbphoto->generate_photos($photos[$i]['photo_id']);
|
Fixed : Mass Recreation of photos
Fixed : Uploading/Making/Changing user avatar will also update collection cover to current one
Fixed : $crop variable to $cropping in generate_photos. In resizer.class.php we are using $cropping
Added : New cropping case, 10. Read it's example to understand what it does
Added : Documentation for few function in functions_photos.php
Added : new function called display_user_custom_background in functions_users.php
Added : Custom Dimensions for photos in startup.php. Now these will also be produced, 75x75,100x100,150x150,240,320,500,640,800,1024
Updated : default.css
Added : new display_method in blocks/video.html
Added : Change background form
Fixed : photo embed code
2012-09-26 12:35:05 +00:00
|
|
|
$msg[] = $photos[$i]['photo_id'].": Re-created '<strong>".$photos[$i]['photo_title']."</strong>'";
|
2010-12-14 13:53:51 +00:00
|
|
|
}
|
|
|
|
$i++;
|
|
|
|
}
|
Fixed : Mass Recreation of photos
Fixed : Uploading/Making/Changing user avatar will also update collection cover to current one
Fixed : $crop variable to $cropping in generate_photos. In resizer.class.php we are using $cropping
Added : New cropping case, 10. Read it's example to understand what it does
Added : Documentation for few function in functions_photos.php
Added : new function called display_user_custom_background in functions_users.php
Added : Custom Dimensions for photos in startup.php. Now these will also be produced, 75x75,100x100,150x150,240,320,500,640,800,1024
Updated : default.css
Added : new display_method in blocks/video.html
Added : Change background form
Fixed : photo embed code
2012-09-26 12:35:05 +00:00
|
|
|
|
|
|
|
if ( $stop_loop != 'yes' ) {
|
|
|
|
e($start_index+1 ." - ".$to." photos image have been recreated.","m");
|
|
|
|
}
|
|
|
|
|
2010-12-14 13:53:51 +00:00
|
|
|
assign("index_msgs",$msg);
|
|
|
|
assign("indexing","yes");
|
Fixed : Mass Recreation of photos
Fixed : Uploading/Making/Changing user avatar will also update collection cover to current one
Fixed : $crop variable to $cropping in generate_photos. In resizer.class.php we are using $cropping
Added : New cropping case, 10. Read it's example to understand what it does
Added : Documentation for few function in functions_photos.php
Added : new function called display_user_custom_background in functions_users.php
Added : Custom Dimensions for photos in startup.php. Now these will also be produced, 75x75,100x100,150x150,240,320,500,640,800,1024
Updated : default.css
Added : new display_method in blocks/video.html
Added : Change background form
Fixed : photo embed code
2012-09-26 12:35:05 +00:00
|
|
|
assign('button','mass_recreation');
|
|
|
|
if ( !$stop_loop ) {
|
|
|
|
$url = queryString( "loop_size=$loop_size&start_index=$next_index&mass_recreation=yes", array("loop_size", "start_index","button") );
|
|
|
|
header( "Refresh: 2; url=" . BASEURL . "/admin_area/recreate_thumbs.php$url" );
|
|
|
|
}
|
2010-12-14 13:53:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "collection":
|
|
|
|
{
|
|
|
|
assign('mode',$mode);
|
|
|
|
$cid = mysql_clean($_GET['cid']);
|
|
|
|
if($cbphoto->collection->collection_exists($cid))
|
|
|
|
{
|
|
|
|
if(isset($_POST['recreating']))
|
|
|
|
{
|
|
|
|
$total = count($_POST['check_photo']);
|
|
|
|
for($i=0;$i<$total;$i++)
|
|
|
|
{
|
|
|
|
$cbphoto->generate_photos($_POST['check_photo'][$i]);
|
|
|
|
}
|
|
|
|
$eh->flush();
|
|
|
|
e($total." photo(s) have been re-created. Please remove browser cache if you don't see any change.","m");
|
|
|
|
}
|
|
|
|
$items = $cbphoto->collection->get_collection_items_with_details($cid);
|
|
|
|
assign('items',$items);
|
|
|
|
} else {
|
|
|
|
e(lang("Collection does not exist"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
subtitle("Recreate Photos");
|
|
|
|
template_files('recreate_thumbs.html');
|
|
|
|
display_it();
|
|
|
|
?>
|