예제 #1
0
파일: list.php 프로젝트: vukasins/ocp
    ?>
    <?php 
    $id = 'image-' . md5(microtime());
    $image_name = trim(str_replace(dirname($value), '', $value), '/');
    ?>
    <div id="<?php 
    echo $id;
    ?>
">
        <span><?php 
    echo $image_name;
    ?>
</span>
        <div class="image-hover" style="display: none">
            <img src="<?php 
    echo Libraries_Image::getThumbFromImage($value, '200x200');
    ?>
" />
            <?php 
    echo $value;
    ?>
        </div>
    </div>
    <script>
    $(document).ready(function() {
        $('#<?php 
    echo $id;
    ?>
').hover(
        	    function() {
        	    	$('#<?php 
예제 #2
0
파일: image.php 프로젝트: vukasins/ocp
 /**
  *
  * @param string $image_url
  * @param string $dimensions
  * @param int $thumb_method
  */
 public static function getThumbFromImage($image_url, $dimensions, $thumb_method = Libraries_Image::THUMBMETHOD_FIT)
 {
     if (!file_exists(PROJECT_ROOT_DIR . $image_url)) {
         return '';
     }
     $image = new Libraries_Image();
     $image->setImage($image_url);
     return $image->getThumb($dimensions, $thumb_method);
 }
예제 #3
0
파일: edit.php 프로젝트: vukasins/ocp
<?php

$root = isset($control_properties->root) ? preg_replace('/^(\\/|)upload\\//', '', rtrim($control_properties->root, '/')) : '';
$type = isset($control_properties->type) ? $control_properties->type : '2';
?>
<div class="file-manager">
	<div class="fm-image">
        <?php 
if ($value != '') {
    ?>
            <div class="fm-preview"><img src="<?php 
    echo Libraries_Image::getThumbFromImage($value, '78x78');
    ?>
" /></div>
		<?php 
}
?>
	</div>
	<div class="fm-file">
		<input type="text" id="<?php 
echo $field->field_name;
?>
" name="<?php 
echo $field->field_name;
?>
" class="form-control" tabindex="<?php 
echo $index;
?>
" value="<?php 
echo $value;
?>