mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 18:14:26 +02:00
Site Prefs Administration, imageselector SC fix - work in progress
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
// $Id: imagepreview.sc,v 1.1 2008-03-18 00:39:02 e107coders Exp $
|
||||
global $tp;
|
||||
list($name,$width,$height,$img_path) = explode("|",$parm);
|
||||
|
||||
if(!$width)
|
||||
// $Id: imagepreview.sc,v 1.2 2008-12-17 17:27:07 secretr Exp $
|
||||
global $e107;
|
||||
|
||||
list($name, $width, $height) = explode("|",$parm, 3);
|
||||
|
||||
$name = varset($name);//avoid warnings
|
||||
if(varset($width))
|
||||
{
|
||||
$width = "32px";
|
||||
$width = " width: {$width};";
|
||||
}
|
||||
if(!$height)
|
||||
if(varset($height))
|
||||
{
|
||||
$height = "32px";
|
||||
$height = " width: {$height};";
|
||||
}
|
||||
|
||||
$path = ($_POST[$name] && $_POST['ajax_used']) ? $img_path.$tp->replaceConstants($_POST[$name]) : e_IMAGE_ABS."generic/blank.gif";
|
||||
return "<img src='".$path."' alt=\"\" style='border: 0px; width: {$width}; height: {$height}' />";
|
||||
$path = (varset($_POST[$name]) && defsettrue('e_AJAX_REQUEST')) ? $e107->tp->replaceConstants($_POST[$name], 'full') : e_IMAGE_ABS."generic/blank.gif";
|
||||
|
||||
return "<img src='{$path}' alt=\"\" class='image-selector' style='{$width}{$height}' />";
|
||||
|
Reference in New Issue
Block a user