コード例 #1
0
ファイル: groups.php プロジェクト: romyilano/subfolio
 public function delete($groupname)
 {
     $errors = array();
     $groupArray = $this->auth->get_group_by_name($groupname);
     if (!$groupArray) {
         $this->session->set_flash('flash', 'Group not found');
         url::redirect(SubfolioTheme::get_site_root() . "-cms/groups");
         exit;
     }
     // delete the user
     $this->auth->delete_group($groupname);
     $this->auth->save_groups();
     $this->session->set_flash('flash', 'Group deleted');
     url::redirect(SubfolioTheme::get_site_root() . "-cms/groups");
     exit;
 }
コード例 #2
0
ファイル: swf.php プロジェクト: romyilano/subfolio
<EMBED 
  src='<?php 
echo Subfolio::current_file('url');
?>
' 
  autoplay=<?php 
echo Subfolio::current_file('autoplay');
?>
  quality=high 
  width='<?php 
echo Subfolio::current_file('width');
?>
' 
  height='<?php 
echo Subfolio::current_file('height');
?>
' 
  scale='noscale' 
  TYPE='application/x-shockwave-flash' 
  PLUGINSPAGE='http://public.macromedia.com/go/getflashplayer'>
</EMBED>

<?php 
if (SubfolioTheme::get_option('display_info')) {
    require "_hideable_download_box.php";
}
コード例 #3
0
ファイル: related.php プロジェクト: romyilano/subfolio
                    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 
            }
            ?>
コード例 #4
0
ファイル: add.php プロジェクト: romyilano/subfolio
    foreach ($errors as $error) {
        ?>
        <li><?php 
        print $error;
        ?>
</li>
      <?php 
    }
    ?>
    </ul>
  </div>
  <?php 
}
?>
  <form action="<?php 
print SubfolioTheme::get_site_root();
?>
-cms/groups/create" method="post">

    <div class="login_field" style="padding-bottom: 20px;">
      <label for="name">Group name:</label>
      <input type="text" name="name" id="name" class="field" value="<?php 
echo isset($_POST['name']) ? $_POST['name'] : '';
?>
" tabindex="1" />
    </div>

    <div class="subButton copy">
      <input type="submit" value="Submit" />
    </div>
  </form>
コード例 #5
0
ファイル: header.inc.php プロジェクト: romyilano/subfolio
		<?php 
if (SubfolioTheme::get_option('display_tiny_url')) {
    echo SubfolioTheme::get_tiny_url(SubfolioLanguage::get_text('generatetinyurl'), 'li');
}
?>

		<?php 
if (SubfolioTheme::get_option('display_collapse_header') && SubfolioTheme::get_option('display_header', true)) {
    echo SubfolioTheme::get_collapse_header_button('li');
}
?>
  </ul>
</div>
 
<?php 
if (SubfolioTheme::get_option('display_navigation')) {
    ?>
  <?php 
    require "prev_next.inc.php";
}
?>

<script>
$(document).ready(function(){
  expand_header_label = "<?php 
echo SubfolioLanguage::get_text('expandheader');
?>
";
  collapse_header_label = "<?php 
echo SubfolioLanguage::get_text('collapseheader');
?>
コード例 #6
0
ファイル: FileFolder.php プロジェクト: romyilano/subfolio
 public function get_thumbnail_url()
 {
     $root = SubfolioTheme::get_site_root();
     if ($this->has_custom_thumbnail()) {
         return $root . "directory/" . format::urlencode_parts($this->parent) . "/-thumbnails-custom/" . Filebrowser::double_encode_specialcharacters($this->get_custom_thumbnail_file_name());
     } else {
         $thumbnail = "-thumbnails/" . $this->name;
         $url = $root . "directory/" . format::urlencode_parts($this->parent) . "/-thumbnails/" . Filebrowser::double_encode_specialcharacters(urlencode($this->name));
         if (!file_exists("-thumbnails")) {
             mkdir("-thumbnails", 0755, true);
         }
         $build_thumbnail = false;
         if (!$this->has_thumbnail()) {
             $build_thumbnail = true;
         }
         if ($build_thumbnail) {
             $max_size = Kohana::config('filebrowser.thumbnail_max_filesize');
             $stats = stat($this->name);
             if ($stats['size'] > $max_size * 1024 * 1024) {
                 return '';
             } else {
                 $thumbnail_width = SubfolioTheme::get_option('thumbnail_width', Kohana::config('filebrowser.thumbnail_width'));
                 $thumbnail_height = SubfolioTheme::get_option('thumbnail_height', Kohana::config('filebrowser.thumbnail_height'));
                 $info = @getimagesize($this->name);
                 if (isset($info[1])) {
                     if ($info[1] <= $thumbnail_height) {
                     } else {
                         $this->image = new Image($this->name);
                         if ($this->image) {
                             $this->image->resize($thumbnail_width, $thumbnail_height, Image::HEIGHT);
                             $this->image->save($thumbnail);
                         }
                     }
                 }
             }
         }
         if (file_exists($thumbnail)) {
             $thumbnail_stats = stat($thumbnail);
             return $url . "?rnd=" . $thumbnail_stats['ctime'];
         } else {
             return '';
         }
     }
 }
コード例 #7
0
ファイル: footer.inc.php プロジェクト: romyilano/subfolio
?>

	<?php 
$copyright = SubfolioTheme::get_site_copyright();
if ($copyright != '') {
    ?>
	<span class='copyright'><?php 
    echo $copyright;
    ?>
</span>
	<?php 
}
?>

	<?php 
if (!SubfolioTheme::get_mobile_viewport() && SubfolioTheme::get_option('display_updated_since')) {
    ?>
		<span><?php 
    echo SubfolioLanguage::get_text('updated_since');
    ?>
</span>
		<?php 
    echo SubfolioFiles::updated_since_link_or_span('lastweek');
    ?>
		<span class="updated_since_sep">&#8226;</span>
		<?php 
    echo SubfolioFiles::updated_since_link_or_span('lastmonth');
    ?>
		<span class="updated_since_sep">&#8226;</span>
		<?php 
    echo SubfolioFiles::updated_since_link_or_span('lastvisit');
コード例 #8
0
ファイル: MY_View.php プロジェクト: romyilano/subfolio
 public function get_view_url()
 {
     $root = SubfolioTheme::get_site_root();
     $theme = Kohana::config('filebrowser.theme');
     return $root . "config/themes/" . $theme;
 }
コード例 #9
0
ファイル: related.php プロジェクト: romyilano/subfolio
  						<?php 
            if ($item['restricted']) {
                ?>
						  <span class="<?php 
                if ($item['have_access']) {
                    echo "unlocked";
                } else {
                    echo "locked";
                }
                ?>
"><!-- --></span>
						  <?php 
            }
            ?>
							<span class="icon" <?php 
            if (SubfolioTheme::get_mobile_viewport()) {
                echo "style='background-image:url(" . $item['icon_grid'] . ")'";
            }
            ?>
>
								<img src="<?php 
            echo $item['icon'];
            ?>
" width="<?php 
            $item['width'];
            ?>
" height="<?php 
            $item['height'];
            ?>
" />
							</span>
コード例 #10
0
ファイル: template.php プロジェクト: romyilano/subfolio
echo SubfolioTheme::get_view_url();
?>
/css/application.uri.css" type="text/css" rel="stylesheet" >
	<link href="<?php 
echo SubfolioTheme::get_view_url();
?>
/css/icons.uri.css" type="text/css" rel="stylesheet" >
	<script src="<?php 
echo SubfolioTheme::get_view_url();
?>
/js/html5.js"></script> 
</head>
<body>
	<div id="container">	
		<?php 
include "header.inc.php";
?>
		<div id="content">
			<?php 
if (isset($content)) {
    echo $content;
}
?>
		</div>
	</div>
	<script src="<?php 
echo SubfolioTheme::get_view_url();
?>
/js/application.js"></script> 
</body>
</html>
コード例 #11
0
            echo $item['date'];
            ?>
</span><?php 
        }
        ?>
						<?php 
        if (SubfolioTheme::get_option('display_kind')) {
            ?>
<span class="kind"><?php 
            echo $item['kind'];
            ?>
</span><?php 
        }
        ?>
						<?php 
        if (SubfolioTheme::get_option('display_comment')) {
            ?>
<span class="comment"><?php 
            echo $item['comment'];
            ?>
</span><?php 
        }
        ?>
							
					</a>
				</li>
			<?php 
    }
    ?>
			
		</ul>
コード例 #12
0
ファイル: Filebrowser.php プロジェクト: romyilano/subfolio
 public function get_file_url()
 {
     $root = SubfolioTheme::get_site_root();
     return $root . "directory/" . format::urlencode_parts($this->filepath);
 }
コード例 #13
0
ファイル: gallery.php プロジェクト: romyilano/subfolio
        echo $image['container_height'] . "px";
        ?>
">
  						<img width="<?php 
        echo $image['width'] . "px";
        ?>
" height="<?php 
        echo $image['height'] . "px";
        ?>
" src="<?php 
        echo $image['url'];
        ?>
" />
  					</div>
  					<?php 
        if (SubfolioTheme::get_option('display_file_names_in_gallery')) {
            ?>
          	  <p><?php 
            echo $image['filename'];
            ?>
</p>
          	<?php 
        }
        ?>
  				</a>
        </li>
			
			<?php 
    }
    ?>
		</ul>
コード例 #14
0
ファイル: header.inc.php プロジェクト: romyilano/subfolio
    print Kohana::config('filebrowser.site_root');
    ?>
logout' id='logout'>Logout</a>
	<?php 
} else {
    ?>
		<span id='right'></span>
	<?php 
}
?>
	
	<?php 
if (SubfolioFiles::is_root()) {
    ?>
		<h1 class="h1_home"><?php 
    echo SubfolioTheme::get_site_title();
    ?>
</h1>
	<?php 
} else {
    ?>
		<h1 class="h1"><?php 
    echo Subfolio::current_file('filename');
    ?>
</h1> 
	<?php 
}
?>
</header>

<?php 
コード例 #15
0
ファイル: template.php プロジェクト: romyilano/subfolio
				<a href="javascript:hideFlash('notice');" id="close">Close</a>
				<p><b><?php 
    echo SubfolioTheme::get_notice('flash');
    ?>
</b></p>
			</div>
		<?php 
}
?>
		<?php 
if (SubfolioTheme::get_notice('error')) {
    ?>
			<div id="notice" class="error">
				<a href="javascript:hideFlash('notice');" id="close">Close</a>
				<p><b><?php 
    echo SubfolioTheme::get_notice('error');
    ?>
</b></p>
			</div>
		<?php 
}
?>
		<div id="container-inner">
			<?php 
include "header.inc.php";
?>
			<div id="content">
				<?php 
if (isset($content)) {
    echo $content;
}
コード例 #16
0
ファイル: users.php プロジェクト: romyilano/subfolio
 public function removefromgroup($username)
 {
     $errors = array();
     $userArray = $this->auth->get_user_by_name($username);
     if (!$userArray) {
         url::redirect(SubfolioTheme::get_site_root() . "-cms/users");
         exit;
     }
     if (!isset($_GET['group'])) {
         $this->session->set_flash('flash', 'No group');
         url::redirect(SubfolioTheme::get_site_root() . "-cms/users/edit/" . $username);
         exit;
     }
     if (!$this->auth->remove_user_from_group($username, $_GET['group'])) {
         $this->session->set_flash('flash', 'Remove failed please try again');
         url::redirect(SubfolioTheme::get_site_root() . "-cms/users/edit/" . $username);
         exit;
     }
     $this->auth->save_groups();
     $this->session->set_flash('flash', 'Removed from group');
     url::redirect(SubfolioTheme::get_site_root() . "-cms/users/edit/" . $username);
     exit;
 }
コード例 #17
0
ファイル: Subfolio.php プロジェクト: romyilano/subfolio
 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;
 }