Beispiel #1
0
 /**
  * @static
  */
 function ShowFile_Gallery($dir_piece, $file, $isThumbDir)
 {
     global $langmessage;
     if (!admin_uploaded::IsImg($file)) {
         return false;
     }
     //for gallery editing
     $fileUrl = common::GetDir('/data/_uploaded' . $dir_piece . '/' . $file);
     if ($isThumbDir) {
         $thumb = ' <img src="' . $fileUrl . '" alt="" />';
     } else {
         $thumb = ' <img src="' . common::GetDir('/data/_uploaded/image/thumbnails' . $dir_piece . '/' . $file . '.jpg') . '" alt="" />';
     }
     $query_string = 'file_cmd=delete&show=inline&file=' . urlencode($file);
     return '<span class="expand_child">' . '<a href="' . $fileUrl . '" name="gp_gallery_add" rel="' . $fileUrl . '">' . $thumb . '</a>' . common::Link('Admin_Uploaded' . $dir_piece, '', $query_string, ' class="delete gpconfirm" name="gpajax" title="' . $langmessage['delete_confirm'] . '"', 'delete') . '</span>';
 }
Beispiel #2
0
 /**
  * @static
  */
 static function ShowFile_Gallery($dir_piece, $file)
 {
     global $langmessage, $dataDir;
     if (!admin_uploaded::IsImg($file)) {
         return false;
     }
     //for gallery editing
     $rel_path = '/data/_uploaded' . $dir_piece . '/' . $file;
     $id = self::ImageId($rel_path);
     $file_url = common::GetDir($rel_path);
     $full_path = $dataDir . $rel_path;
     //thumbnail
     $thumb_url = common::ThumbnailPath($file_url);
     $thumb = ' <img src="' . $thumb_url . '" alt="" />';
     //get size
     $size = '';
     $size_a = getimagesize($full_path);
     if ($size_a) {
         $size = ' data-width="' . $size_a[0] . '" data-height="' . $size_a[1] . '"';
     }
     $query_string = 'file_cmd=delete&show=inline&file=' . urlencode($file);
     return '<span class="expand_child" id="' . $id . '">' . '<a href="' . $file_url . '" data-cmd="gp_gallery_add" ' . $size . '>' . $thumb . '</a>' . common::Link('Admin_Uploaded' . $dir_piece, '', $query_string, array('class' => 'delete gpconfirm', 'data-cmd' => 'gpajax', 'title' => $langmessage['delete_confirm']), 'delete') . '</span>';
 }