Пример #1
0
                    echo "locked";
                }
                ?>
"><!-- --></span>
						  <?php 
            }
            ?>
							<span class="icon" <?php 
            if (SubfolioTheme::get_mobile_viewport()) {
                echo "style='background-image:url(" . $item['icon_grid'] . ")'";
            }
            ?>
>

							<?php 
            if (SubfolioTheme::get_listing_mode() == 'list') {
                ?>
								<img src='<?php 
                echo $item['icon'];
                ?>
' width='18' height='17' />
							<?php 
            } else {
                ?>
								<img src='<?php 
                echo $item['icon_grid'];
                ?>
' width='32' height='32' />
							<?php 
            }
            ?>
Пример #2
0
<?php

if (SubfolioFiles::have_related()) {
    ?>
	
	<div id="related">
		<p><?php 
    echo SubfolioLanguage::get_text('seealso');
    ?>
</p>
		<ul class="<?php 
    echo SubfolioTheme::get_listing_mode();
    ?>
">
			
			<?php 
    foreach (SubfolioFiles::related() as $item) {
        ?>
				<li>
					<a href='<?php 
        echo $item['link'];
        ?>
'>
						<?php 
        if (SubfolioTheme::get_option('display_icons')) {
            ?>
  						<?php 
            if ($item['restricted']) {
                ?>
						  <span class="<?php 
                if ($item['have_access']) {
Пример #3
0
	<link rel="shortcut icon" href="<?php 
    echo $favicon;
    ?>
" type="image/vnd.microsoft.icon"  />
	<?php 
}
?>
	
	
	<link href="<?php 
echo SubfolioTheme::get_view_url();
?>
/css/main.css" type="text/css" rel="stylesheet" >
	<!--<link href="<?php 
echo SubfolioTheme::get_view_url();
"/css/" . SubfolioTheme::get_listing_mode();
?>
.css" type="text/css" rel="stylesheet" >-->
	<!--[if IE 6]><link href="<?php 
echo SubfolioTheme::get_view_url();
?>
/css/ie6.css" type="text/css" rel="stylesheet" ><![endif]-->
	
	<!-- All right. Let's overwrite with some inline styles -->
	<?php 
// Main Colors -----------------------------------------------------------------------------------------------------
$back_color = SubfolioTheme::get_color('back', 'white');
$main_link_color = SubfolioTheme::get_color('main_link', '#1a1a1a');
$main_link_hover_color = SubfolioTheme::get_color('main_link_hover', '#000000');
$main_link_back_hover_color = SubfolioTheme::get_color('main_link_back_hover', '#f5f5f5');
$flash_color = SubfolioTheme::get_color('flash', 'red');
Пример #4
0
 public function files_and_folders()
 {
     $hide_locked = view::get_option('hide_locked_folders', false);
     $listing_mode = SubfolioTheme::get_listing_mode();
     $replace_dash_space = view::get_option('replace_dash_space', true);
     $replace_underscore_space = view::get_option('replace_underscore_space', true);
     $display_file_extensions = view::get_option('display_file_extensions', true);
     $folders = Subfolio::$filebrowser->get_folder_list();
     $folders = Subfolio::$filebrowser->sort($folders);
     $files = Subfolio::$filebrowser->get_file_list();
     $files = Subfolio::$filebrowser->sort($files);
     $items = array_merge($folders, $files);
     $items = Subfolio::$filebrowser->sort($items);
     $new_updated_start = Subfolio::$filebrowser->get_updated_since_time();
     $list = array();
     $current_user = $this->auth->get_user();
     foreach ($items as $file) {
         $restricted = false;
         $have_access = false;
         $new = false;
         $updated = false;
         $empty = false;
         if (!Subfolio::$filebrowser->is_feature($file->name)) {
             if (!$file->has_thumbnail()) {
                 if ($file->is_file()) {
                     $empty = false;
                 } else {
                     $empty = !(bool) Subfolio::$filebrowser->file_or_folder_count(true, $file->name);
                 }
                 $file_kind = Subfolio::$filekind->get_kind_by_file($file->name);
                 if (isset($file_kind['kind'])) {
                     $kind = $file_kind['kind'];
                 } else {
                     $kind = "";
                 }
                 $include = false;
                 if (!$current_user) {
                     $include = true;
                 }
                 if ($file->contains_access_file()) {
                     $restricted = true;
                     if ($file->have_access($current_user)) {
                         $include = true;
                         $have_access = true;
                     } else {
                         $have_access = false;
                     }
                 } else {
                     if ($file->have_access($current_user)) {
                         $include = true;
                         $have_access = true;
                     } else {
                         $have_access = false;
                         $restricted = true;
                     }
                 }
                 if (!$hide_locked) {
                     $include = true;
                 }
                 if ($include) {
                     if ($kind == "img" && !$file->needs_thumbnail()) {
                         // don't show listing for image smaller than thumbnail;
                         continue;
                     }
                     $kind_display = isset($file_kind['display']) ? $file_kind['display'] : '';
                     $icon_file = "";
                     $new = false;
                     $updated = false;
                     if (false && $file->stats['ctime'] > $new_updated_start) {
                         $new = true;
                     } else {
                         if ($file->stats['mtime'] > $new_updated_start) {
                             $updated = true;
                         }
                     }
                     $icon_file = Subfolio::$filekind->get_icon_by_file($file_kind);
                     $listing_mode = Subfolio::$filebrowser->get_folder_property('listing_mode', $listing_mode);
                     if ($icon_file == "gen" && $file->type == "folder") {
                         $icon_file = "dir";
                     }
                     // to be confirmed
                     if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod')) {
                         $listing_mode = 'grid';
                     }
                     $icon_set = view::get_option('icon_set_list', "list");
                     $icon_set_grid = view::get_option('icon_set_grid', "grid");
                     $icon = view::get_view_url() . "/images/icons/" . $icon_set . "/" . $icon_file . ".png";
                     $icon_grid = view::get_view_url() . "/images/icons/" . $icon_set_grid . "/" . $icon_file . ".png";
                     $target = "";
                     $url = "";
                     $display = "";
                     switch ($kind) {
                         case "slide":
                             $slide_files = Subfolio::$filebrowser->get_file_list(null, $file->name . "/");
                             $slide_files = Subfolio::$filebrowser->sort($slide_files);
                             if (sizeof($slide_files) == 0) {
                                 $url = Subfolio::$filebrowser->get_link($file->name);
                             } else {
                                 $url = Subfolio::$filebrowser->get_link($slide_files[0]->name);
                             }
                             $display = format::filename($file->get_display_name($replace_dash_space, $replace_underscore_space, $display_file_extensions), false);
                             break;
                         case "pop":
                             $width = Subfolio::$filebrowser->get_item_property($file->name, 'width') ? Subfolio::$filebrowser->get_item_property($file->name, 'width') : 800;
                             $height = Subfolio::$filebrowser->get_item_property($file->name, 'height') ? Subfolio::$filebrowser->get_item_property($file->name, 'height') : 600;
                             $url = Subfolio::$filebrowser->get_item_property($file->name, 'url') ? Subfolio::$filebrowser->get_item_property($file->name, 'url') : 'http://www.subfolio.com';
                             $name = Subfolio::$filebrowser->get_item_property($file->name, 'name') ? Subfolio::$filebrowser->get_item_property($file->name, 'name') : 'POPUP';
                             $style = Subfolio::$filebrowser->get_item_property($file->name, 'style') ? Subfolio::$filebrowser->get_item_property($file->name, 'style') : 'POPSCROLL';
                             $url = "javascript:pop('{$url}','{$name}',{$width},{$height},'{$style}');";
                             $display = format::filename($file->get_display_name($replace_dash_space, $replace_underscore_space, TRUE), false);
                             break;
                         case "link":
                             $url = Subfolio::$filebrowser->get_item_property($file->name, 'url') ? Subfolio::$filebrowser->get_item_property($file->name, 'url') : '';
                             $target = Subfolio::$filebrowser->get_item_property($file->name, 'target') ? Subfolio::$filebrowser->get_item_property($file->name, 'target') : '_blank';
                             $display = format::filename($file->get_display_name($replace_dash_space, $replace_underscore_space, TRUE), false);
                             if ($url == '') {
                                 $url = "http://" . substr($file->name, 0, strrpos($file->name, "."));
                             }
                             break;
                         default:
                             $url = Subfolio::$filebrowser->get_link($file->name);
                             $display = $file->get_display_name($replace_dash_space, $replace_underscore_space, $display_file_extensions);
                             break;
                     }
                     $item = array();
                     $item['empty'] = $empty;
                     $item['target'] = $target;
                     $item['url'] = $url;
                     $item['icon'] = $icon;
                     $item['icon_grid'] = $icon_grid;
                     $item['filename'] = $display;
                     $item['size'] = format::filesize($file->stats['size']);
                     $item['date'] = format::filedate($file->stats['mtime']);
                     $item['kind'] = $kind_display;
                     $item['comment'] = format::get_rendered_text(Subfolio::$filebrowser->get_item_property($file->name, 'comment'));
                     $item['restricted'] = $restricted;
                     $item['have_access'] = $have_access;
                     $item['new'] = $new;
                     $item['updated'] = $updated;
                     $list[] = $item;
                 }
             }
         }
     }
     return $list;
 }