echo $lang["theme"];
                } else {
                    echo $lang["public"];
                }
            }
        }
        ?>
</td><?php 
    }
    hook("beforecollectiontoolscolumn");
    ?>
	<td>	
        <div class="ListTools">
        <?php 
    if ($collections_compact_style) {
        draw_compact_style_selector($collections[$n]['ref']);
    } else {
        ?>
<a onClick="return CentralSpaceLoad(this,true);" href="<?php 
        echo $baseurl_short;
        ?>
pages/search.php?search=<?php 
        echo urlencode("!collection" . $collections[$n]["ref"]);
        ?>
">&gt;&nbsp;<?php 
        echo $lang["viewall"];
        ?>
</a>
<!-- No need to check for permission 'b' - this check is done in the beginning of this file -->
	&nbsp;<a href="<?php 
        echo $baseurl_short;
예제 #2
0
</tr>

<?php 
if (!$collections_compact_style) {
    echo $search_title;
} else {
    echo $search_title;
    if (substr($search, 0, 11) == "!collection" && $k == "") {
        $cinfo = get_collection(substr($search, 11));
        $feedback = $cinfo["request_feedback"];
        $count_result = count($result);
        if (!$search_titles) {
            ?>
<br/><?php 
        }
        draw_compact_style_selector($cinfo['ref']);
        if ($vertical == "v") {
            ?>
<br/><br/><?php 
        }
        ?>
    <?php 
    }
    /*end if a collection search and compact_style - action selector*/
    ?>
    
    <?php 
}
$n = 0;
for ($x = 0; $x < count($result); $x++) {
    # Load access level
            } else {
                if (strlen($collections[$n]["theme"]) > 0) {
                    echo $lang["theme"];
                } else {
                    echo $lang["public"];
                }
            }
            ?>
</td><?php 
        }
        hook("beforecollectiontoolscolumn");
        ?>
	<td><div class="ListTools">
    <?php 
        if ($collections_compact_style) {
            draw_compact_style_selector($collections[$n]["ref"]);
        } else {
            ?>
    <a onClick="return CentralSpaceLoad(this,true);" href="<?php 
            echo $baseurl_short;
            ?>
pages/search.php?search=<?php 
            echo urlencode("!collection" . $collections[$n]["ref"]);
            ?>
">&gt;&nbsp;<?php 
            echo $lang["viewall"];
            ?>
</a>
        <?php 
            if (!checkperm("b")) {
                ?>
예제 #4
0
        if ($display_search_titles) {
            hook("beforesearchtitle");
            if (!$collections_compact_style) {
                echo $search_title;
                hook("aftersearchtitle");
            } else {
                echo $search_title;
                hook("aftersearchtitle");
                if (substr($search, 0, 11) == "!collection" && $k == "") {
                    $cinfo = get_collection(substr($search, 11));
                    $feedback = $cinfo["request_feedback"];
                    $count_result = count($result);
                    $collections_compact_style_titleview = true;
                    hook("beforecollectiontoolscolumn");
                    echo $lang["tools"] . ": ";
                    draw_compact_style_selector($cinfo["ref"]);
                    ?>
<br /><br /><div class="clearerleft"></div><?php 
                    $collection_compact_style_titleview = false;
                    ?>
	    <?php 
                }
                /*end if a collection search and compact_style - action selector*/
                ?>
    
    <?php 
            }
        }
        ?>

    <?php 
예제 #5
0
function DisplayTheme($themes=array())
	{
	global $theme_direct_jump,$themes_column_sorting,$themes_ref_column,$themes_date_column,$baseurl_short,$baseurl,$default_perpage_list,$collection_prefix,$revsort,$sort,$find,$getthemes,$m,$lang,$flag_new_themes,$contact_sheet,$theme_images,$allow_share,$zipcommand,$collection_download,$theme_images_align_right,$themes_category_split_pages,$themes_category_split_pages_parents,$collections_compact_style,$pagename,$show_edit_all_link,$preview_all,$userref,$collection_purge,$themes_category_split_pages,$themes_category_split_pages_parents_root_node,$enable_theme_category_sharing,$enable_theme_category_edit,$show_theme_collection_stats,$lastlevelchange;

	$themes_order_by=getvalescaped("themes_order_by",getvalescaped("saved_themes_order_by","name"));
	$sort=getvalescaped("sort",getvalescaped("saved_themes_sort","ASC"));	
	$revsort = ($sort=="ASC") ? "DESC" : "ASC";
	# pager
	$per_page=getvalescaped("per_page_list",$default_perpage_list,true);

	$collection_valid_order_bys=array("name","c");

	// sorting doesn't work for nonsplit
	if (!$themes_column_sorting || !$themes_category_split_pages || $theme_direct_jump){$sort="ASC";$themes_order_by="name";$themes_column_sorting=false;}

	if ($themes_ref_column){$collection_valid_order_bys[]="ref";}
	if ($themes_date_column){$collection_valid_order_bys[]="created";}
	
	$modified_collection_valid_order_bys=hook("modifycollectionvalidorderbys");
	if ($modified_collection_valid_order_bys){$collection_valid_order_bys=$modified_collection_valid_order_bys;}
	if (!in_array($themes_order_by,$collection_valid_order_bys)) {$sort="ASC";$themes_order_by="name";} # Check the value is one of the valid values (SQL injection filter)

	# Work out theme name
	$themecount=count($themes);
	for ($x=0;$x<$themecount;$x++)
		{
		if (isset($themes[$x])&&!isset($themes[$x+1]))
			$themename=i18n_get_translated($themes[$x]);
		}

	$getthemes=get_themes($themes);

	$tmp = hook("getthemesdisp", "", array($themes)); if($tmp!==false) $getthemes = $tmp;
	
	if (count($getthemes)>0)
		{
		?>
		<div class="RecordBox">
		<div class="RecordPanel">

		<div class="RecordHeader">

		<?php
		if ($themes_category_split_pages && $themes_category_split_pages_parents){?><h1><?php
		echo $lang["collections"];?></h1><?php }

		// count total items in themes
	    $totalcount=0;
	    for ($m=0;$m<count($getthemes);$m++)
			{$totalcount=$totalcount+$getthemes[$m]['c'];
		}

		if ($theme_images_align_right)
			{
			?>
			<div style="float:right;">
			<?php
			}

		$images=get_theme_image($themes);
		if (($images!==false) && ($theme_images))
			{
			for ($n=0;$n<count($images);$n++)
				{
				?><div style="float:left;margin-right:12px;"><img class="CollectImageBorder" src="<?php echo get_resource_path($images[$n],false,"col",false) ?>" /></div>
				<?php
				}
			}
		if ($theme_images_align_right)
			{
			?>
			</div>
			<?php
			}
		$themeslinks="";
		for ($x=0;$x<count($themes);$x++){
			$themeslinks.="theme".($x+1)."=".urlencode($themes[$x])."&";
		}
		?>
        <table><tr><td style="margin:0px;padding:0px;">
	<h1 ><?php if (($themes_category_split_pages && $themes_category_split_pages_parents) && !$theme_direct_jump)
			{
			if ($themes_category_split_pages_parents_root_node){?><a href="<?php echo $baseurl_short?>pages/themes.php"  onClick="return CentralSpaceLoad(this,true);"><?php echo $lang["themes"];?></a> / <?php } 
			$themescrumbs="";
			for ($x=0;$x<count($themes);$x++){
				$themescrumbs.="theme".($x+1)."=".urlencode($themes[$x])."&";
				?><a href="<?php echo $baseurl_short?>pages/themes.php?<?php echo $themescrumbs?>"  onClick="return CentralSpaceLoad(this,true);"><?php echo htmlspecialchars(i18n_get_translated($themes[$x]))?></a> / <?php
				}
			}
		else
			{
			echo stripslashes(str_replace("*","",$themename));
			}?></h1></td></tr><tr><td style="margin:0px;padding:0px;">
			
			<?php
			if (($show_theme_collection_stats) || (!($themes_category_split_pages) && ($enable_theme_category_sharing || $enable_theme_category_edit)))
				{
				$linkparams="";
				for ($x=0;$x<count($themes);$x++){
				$linkparams.="theme".($x+1)."=".urlencode($themes[$x])."&";
				}
				if($show_theme_collection_stats)
					{
					?>
					<p style="clear:none;"><?php $collcount = count($getthemes); echo $collcount==1 ? $lang["collections-1"] : sprintf(str_replace("%number","%d",$lang["collections-2"]),$collcount,$totalcount); hook("themeactioninline");
					?>
					</p>
					</td><td style="margin:0px;padding:0px;">
					<?php
					}
					?>
				<?php
					if(!($themes_category_split_pages))
					{
					if (checkperm("h") && $enable_theme_category_sharing)
						{
						$sharelink="";
						for ($x=0;$x<count($themes);$x++)
							{
							$sharelink.="theme".($x+1)."=" . urlencode($themes[$x]) ."&";					
							}
						?>
						
						</td><tr><td style="margin:0px;padding:0px;">
						<a href="<?php echo $baseurl_short?>pages/theme_category_share.php?<?php echo $linkparams?>"  onClick="return CentralSpaceLoad(this,true);"><?php echo "> " . $lang["share"] . "</a>";
						}
					hook("themeaction");
					
					if ($enable_theme_category_edit && checkperm("t"))
						{
						?>
						<a href="<?php echo $baseurl_short?>pages/theme_edit.php?<?php echo $linkparams . "lastlevelchange=" . $lastlevelchange?>" onClick="return CentralSpaceLoad(this,true);"><?php echo "> " . $lang["action-edit"] . "</a>";
						}
					}
				}
				?>
			
			</td></tr></table>
            <!-- The number of collections should never be equal to zero. -->

		<div class="clearerright"> </div>
		</div>
		<br />
		<div class="Listview" style="margin-top:10px;margin-bottom:5px;clear:left;">
		<table border="0" cellspacing="0" cellpadding="0" class="ListviewStyle">
		<tr class="ListviewBoxedTitleStyle">
		<td><?php if ($themes_order_by=="name") {?><span class="Selected"><?php } if($themes_column_sorting) { ?><a href="<?php echo $baseurl_short?>pages/themes.php?<?php echo $themeslinks?>themes_order_by=name&sort=<?php echo urlencode($revsort)?>" onClick="return CentralSpaceLoad(this);"><?php } ?><?php echo $lang["collectionname"]?><?php  if($themes_category_split_pages) { ?></a><?php } ?><?php if ($themes_order_by=="name") {?><div class="<?php echo htmlspecialchars($sort)?>">&nbsp;</div><?php } ?></td>
		<?php if ($themes_ref_column){?>
		<td><?php if ($themes_order_by=="ref") {?><span class="Selected"><?php } if($themes_column_sorting) { ?><a href="<?php echo $baseurl_short?>pages/themes.php?<?php echo $themeslinks?>themes_order_by=ref&sort=<?php echo urlencode($revsort)?>" onClick="return CentralSpaceLoad(this);"><?php } ?><?php echo $lang["id"]?><?php  if($themes_category_split_pages) { ?></a><?php } ?><?php if ($themes_order_by=="ref") {?><div class="<?php echo htmlspecialchars($sort)?>">&nbsp;</div><?php } ?></td>
		<?php } ?>
		<?php if ($themes_date_column){?>
		<td><?php if ($themes_order_by=="created") {?><span class="Selected"><?php } if($themes_column_sorting) { ?><a href="<?php echo $baseurl_short?>pages/themes.php?<?php echo $themeslinks?>themes_order_by=created&sort=<?php echo urlencode($revsort)?>" onClick="return CentralSpaceLoad(this);"><?php } ?><?php echo $lang["created"]?><?php  if($themes_category_split_pages) { ?></a><?php } ?><?php if ($themes_order_by=="created") {?><div class="<?php echo htmlspecialchars($sort)?>">&nbsp;</div><?php } ?></td>
		<?php } ?>
		<td><?php if ($themes_order_by=="c") {?><span class="Selected"><?php } if($themes_column_sorting) { ?><a href="<?php echo $baseurl_short?>pages/themes.php?<?php echo $themeslinks?>themes_order_by=c&sort=<?php echo urlencode($revsort)?>" onClick="return CentralSpaceLoad(this);"><?php } ?><?php echo $lang["itemstitle"]?><?php  if($themes_category_split_pages) { ?></a><?php } ?><?php if ($themes_order_by=="c") {?><div class="<?php echo htmlspecialchars($sort)?>">&nbsp;</div><?php } ?></td>
		<?php hook("beforecollectiontoolscolumnheader","themes",array($themeslinks));?>
		<td><div class="ListTools"><?php echo $lang["tools"]?></div></td>
		</tr>

		<?php
		for ($m=0;$m<count($getthemes);$m++)
			{
			?>
			<tr <?php hook("collectionlistrowstyle");?>>
			<td width="50%"><div class="ListTitle"><a href="<?php echo $baseurl_short?>pages/search.php?search=!collection<?php echo $getthemes[$m]["ref"]?>&bc_from=themes"  title="<?php echo $lang["collectionviewhover"]?>" onClick="return CentralSpaceLoad(this,true);"><?php echo i18n_get_collection_name($getthemes[$m])?></a>
			<?php if ($flag_new_themes && (time()-strtotime($getthemes[$m]["created"]))<(60*60*24*14)) { ?><div class="NewFlag"><?php echo $lang["newflag"]?></div><?php } ?>
			</div></td>
			<?php if ($themes_ref_column){?>
			<td><?php echo $getthemes[$m]["ref"];?></td>
			<?php } ?>
			<?php if ($themes_date_column){?>
			<td><?php echo nicedate($getthemes[$m]["created"],true)?></td>
			<?php } ?>
			<td width="5%"><?php echo $getthemes[$m]["c"]?></td>
			<?php hook("beforecollectiontoolscolumn");?>
			<td nowrap><div class="ListTools">
            <?php if ($collections_compact_style){
            draw_compact_style_selector($getthemes[$m]["ref"]);
            } else {

                ?><a href="<?php echo $baseurl_short?>pages/search.php?search=<?php echo urlencode("!collection" . $getthemes[$m]["ref"])?>" title="<?php echo $lang["collectionviewhover"]?>" onClick="return CentralSpaceLoad(this,true);">&gt;&nbsp;<?php echo $lang["viewall"]?></a>

                <?php if (!checkperm("b")) { ?>&nbsp;<?php echo change_collection_link($getthemes[$m]["ref"]); } ?>

                <?php if (isset($zipcommand) || $collection_download) { ?>
                &nbsp;<a href="<?php echo $baseurl_short?>pages/collection_download.php?collection=<?php echo $getthemes[$m]["ref"]?>" onClick="return CentralSpaceLoad(this,true);">&gt;&nbsp;<?php echo $lang["action-download"]?></a>
                <?php } ?>

                <?php if ($contact_sheet==true) { ?>
                &nbsp;<a href="<?php echo $baseurl_short?>pages/contactsheet_settings.php?ref=<?php echo $getthemes[$m]["ref"]?>"  title="<?php echo $lang["collectioncontacthover"]?>" onClick="return CentralSpaceLoad(this,true);">&gt;&nbsp;<?php echo $lang["contactsheet"]?></a>
                <?php } ?>

                <?php if ($allow_share && (checkperm("v") || checkperm ("g"))) { ?> &nbsp;<a href="<?php echo $baseurl_short?>pages/collection_share.php?ref=<?php echo $getthemes[$m]["ref"]?>"  onClick="return CentralSpaceLoad(this,true);">&gt;&nbsp;<?php echo $lang["share"]?></a><?php } ?>

                <?php if (checkperm("h")) {?>&nbsp;<a href="<?php echo $baseurl_short?>pages/collection_edit.php?ref=<?php echo $getthemes[$m]["ref"]?>" onClick="return CentralSpaceLoad(this,true);">&gt;&nbsp;<?php echo $lang["action-edit"]?></a><?php } ?>

                <?php hook("addcustomtool","",array($getthemes[$m]["ref"])); ?>
			<?php } ?>
			</td>
			</tr>
			<?php
			}
		?>
		</table>
		</div>

		</div>
		<div class="PanelShadow"> </div>
		</div>
		<?php
		}
	}
예제 #6
0
	?>
  <?php if (!$disable_collection_toggle) { ?>
   	<li><a href="<?php echo $baseurl_short?>pages/collections.php?thumbs=show&collection=<?php echo urlencode($usercollection) ?>&k=<?php echo urlencode($k) ?>" onClick="document.cookie = 'thumbs=show';return CollectionDivLoad(this,true);"><?php echo $lang["showthumbnails"]?></li>
  <?php } ?>
</div>
<?php 
} else { 
?>

<div id="CollectionMinTitle"><?php if (!hook("replacecollectiontitle")) { ?><h2><?php if ($collections_compact_style){?><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/collection_manage.php"><?php } ?><?php echo $lang["mycollections"]?><?php if ($collections_compact_style){?></a><?php }?></h2><?php } ?></div>

<!--Menu-->	
<div id="CollectionMinRightNav"><div id="MinSearchItem">
  <?php if ($collections_compact_style){
	 
    draw_compact_style_selector($usercollection);
     if ($thumbs=="show") { ?><a style="display:inline;" onClick="ToggleThumbs();return CollectionDivLoad(this,true);" href="<?php echo $baseurl_short?>pages/collections.php?thumbs=hide">&gt;&nbsp;<?php echo $lang["hidethumbnails"]?></a><?php } ?><?php if ($thumbs=="hide") { ?>&nbsp;&nbsp;&nbsp;<a href="<?php echo $baseurl_short?>pages/collections.php?thumbs=show" onClick="ToggleThumbs();return CollectionDivLoad(this,true);">&gt;&nbsp;<?php echo $lang["showthumbnails"]?></a></div><?php } ?><?php
    
    }
    else { ?>
    <ul>
    <?php if ((!collection_is_research_request($usercollection)) || (!checkperm("r"))) { ?>
    <?php if (checkperm("s")) { ?><?php if (!$collections_compact_style){?><li><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/collection_manage.php"><?php echo $lang["managemycollections"]?></a></li><?php } ?>
    <?php if ($contact_sheet==true) { ?>
    <li><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/contactsheet_settings.php?ref=<?php echo urlencode($usercollection) ?>">&nbsp;<?php echo $lang["contactsheet"]?></a></li>
	<?php } ?>
	<?php if ($allow_share) { ?><li><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/collection_share.php?ref=<?php echo urlencode($usercollection) ?>"><?php echo $lang["share"]?></a></li><?php } ?>
    
    <?php if (($userref==$cinfo["user"]) || (checkperm("h"))) {?><li><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/collection_edit.php?ref=<?php echo urlencode($usercollection) ?>">&nbsp;<?php echo $allow_share?$lang["action-edit"]:$lang["editcollection"]?></a></li><?php } ?>

	<?php if ($preview_all){?><li><a onclick="return CentralSpaceLoad(this,true);" href="<?php echo $baseurl_short?>pages/preview_all.php?ref=<?php echo urlencode($usercollection) ?>"><?php echo $lang["preview_all"]?></a></li><?php } ?>