clipbucket/upload/admin_area/photo_settings.php
Fawaz 65bf47b8bb Updated : main.css
Added : user account files for photos and collections
Added : function add onReload() in head.html
Updated : photo_upload.html
Updated : view_collection.html
Updated : view_item.html to more simple page
Added : view_photo.html
Updated : watch_video.html. Displayed Collection form
Updated : collections.class.php
Added : new smarty functions
Added : Photo Download
Added : New function updateObjectStats
Added : Photo Comment case
Added : orphan_photos.php
Fixed : Admin photo settings
Updated : photo_uploader.php
Updated : photo.class.php
2010-12-23 16:56:33 +00:00

106 lines
No EOL
2.4 KiB
PHP

<?php
/*
**************************************************************
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
***************************************************************
*/
require_once '../includes/admin_config.php';
$userquery->admin_login_check();
$userquery->login_check('video_moderation');
$pages->page_redir();
$mode = $_GET['mode'];
assign('mode',$mode);
switch($mode)
{
case "photo_settings":
default:
{
if($_POST['update'])
{
$rows = array(
'photo_ratio',
'photo_thumb_width',
'photo_thumb_height',
'photo_med_width',
'photo_med_height',
'photo_lar_width',
'photo_crop',
'photo_multi_upload',
'max_photo_size',
'photo_download',
'photo_comments',
'photo_rating');
$numeric = array(
'photo_thumb_width',
'photo_thumb_height',
'photo_med_width',
'photo_med_height',
'photo_lar_width',
'photo_crop',
'max_photo_size',
'photo_multi_upload');
foreach($rows as $field)
{
$value = $_POST[$field];
if(in_array($field,$numeric))
{
if($value < 0 || !is_numeric($value))
$value = 1;
}
$myquery->Set_Website_Details($field,$value);
}
e("Photo Settings Have Been Updated",'m');
}
subtitle("Photo Settings");
}
break;
case "watermark_settings":
{
if($_POST['update_watermark'])
{
$rows = array(
'watermark_photo',
'watermark_max_width',
'watermark_placement');
$numeric = array(
'watermark_max_width'
);
foreach($rows as $field)
{
$value = $_POST[$field];
if(in_array($filed,$numeric))
{
if($value < 0 || !is_numeric($value))
$value = 1;
}
$myquery->Set_Website_Details($field,$value);
}
if(!empty($_FILES['watermark_file']['tmp_name']))
$cbphoto->update_watermark($_FILES['watermark_file']);
e("Watermark Settings Have Been Updated",'m');
subtitle("Watermark Settings");
}
}
break;
}
$row = $myquery->Get_Website_Details();
assign('row',$row);
template_files('photo_settings.html');
display_it();
?>