0 ) $additional = "&b=" . $c;
else $additional = "";
if( $displayCountTotal >0 ){
$additional .= "&c=" . $displayCountTotal;
}
?>
">
0 ) $the_url .= "&b=" . $b;
$accum .= "-";
?>/PHP source\n";
}
function full_url( $fn )
{
global $fullself, $scale, $urlpath;
$href_ffn = str_replace( "/?./", "?", $urlpath."?".$fn );
$img_ffn = str_replace( "/./", "/", $urlpath.$fn );
$ext = getExtension( $fn );
if( !imgExtension( $ext ))
{
$img_ffn = $urlpath."icons-".$ext.".png";
}
return( $img_ffn );
}
function ImageSolo( $fn, $randbase )
{
global $fullself, $scale, $urlpath;
$href_ffn = str_replace( "/?./", "?", $urlpath."?".$fn );
$img_ffn = str_replace( "/./", "/", $urlpath.$fn );
$fnsm = str_replace( "./", "", ",sm,".$fn );
$img_ffnsm = str_replace( "/./", "/", $urlpath.$fnsm );
$ext = getExtension( $fn );
if( !imgExtension( $ext ))
{
$img_ffn = $urlpath."icons-".$ext.".png";
}
echo "";
if( file_exists( $fnsm ) && $scale != "" ) {
echo "
\n\n";
} else {
echo "
\n\n";
}
}
function ImageWithTitle( $fn, $randbase )
{
global $fullself, $scale, $urlpath;
global $plcolor;
// basename of the file (without the path)
$nfn = end( explode( "/", substr( $fn, 0, strrpos( $fn, "." ))));
// replace the separator characters...
$nfn = str_replace( array( '_', '-', '.' ), " ", $nfn );
?>
$value ) {
$fp = substr( $value, strpos( $value, ":" )+1);
$els = explode( "/", $fp );
$fileArray[$x] = $els[sizeof($els)-1] . ":" . $fp;
}
sort( $fileArray );
}
// 0x-0-- sort by name (default)
// 0x-1-- sort by date uploaded
// 0x-8-- inverse sort
// remove the search terms
foreach( $fileArray as $x => $value ) {
$fileArray[$x] = substr( $value, strpos( $value, ":" )+1);
}
// reverse if necessary
if( $b & 0x0800 ) {
// inverse the sort
$fileArray = array_reverse( $fileArray );
}
}
function DumpOutImages()
{
global $b, $fileArray, $w;
global $displayCountTotal;
$total=0;
foreach( $fileArray as $i => $thisfile )
{
if( $displayCountTotal )
{
$total++;
if( $total > $displayCountTotal ) {
return;
}
}
if( $b & 0x10 )
{
ImageWithTitle( $thisfile, $w );
} else {
ImageSolo( $thisfile, $w );
}
}
}
// the search query
$w=$_REQUEST['q'];
if( $w == "" ) $w=$_REQUEST['p'];
if( $w == "" ) $w=$_SERVER['QUERY_STRING'];
if( $w == "q=" ) $w="";
$specific_file = FALSE;
// the image (if requested - this trumps everything)
$ext = getExtension( $w );
if( supportedExtension( $ext ) )
{
$specific_file = TRUE;
}
// the settings bitfield
$b=$_REQUEST['b'];
// 0x000? scaling, control
// 0x---0 full size (default)
// 0x---1 tinyh h=100
// 0x---2 tinyw w=100
// 0x---4 enable full depth
// 0x---8 show path bars (not implemented)
//
// 0x00?0 display style
// 0x--0- images, no decorations (default)
// 0x--1- titled
// 0x--2- display src
// 0x--4- rss format
//
// 0x0?00 sorting
// 0x-0-- sort by name (default)
// 0x-1-- sort by date uploaded
// 0x-8-- inverse sort
//
// 0x1000 anywhere-search (not just start)
if( $_REQUEST['view']== "full" ) { $b |= $b&0xfff0; }
if( $_REQUEST['view']== "small" ) { $b |= 0x0001; }
if( $_REQUEST['view']== "rss" ) { $b |= 0x0040; }
if( $_REQUEST['titles']== "true" ) { $b |= 0x0010; }
if( $_REQUEST['sort']== "old" ) { $b |= 0x0900; }
if( $_REQUEST['sort']== "new" ) { $b |= 0x0100; }
if( $_REQUEST['sort']== "az" ) { $b |= 0x0000; }
if( $_REQUEST['sort']== "za" ) { $b |= 0x0800; }
if( $_REQUEST['any']== "y" ) { $b |= 0x1000; }
$displayCountTotal = $_REQUEST['c'];
$bgcolor = "#445566";
$fgcolor = "#000000";
$plcolor = "#cceeee";
$ircolor = "#33cccc";
$iscolor = "#ffffff";
// some various settings
$smallSize = 128; // how small is small?
$scale = "";
if( $b & 0x01 ) $scale .= "width=\"". $smallSize . "\" ";
if( $b & 0x02 ) $scale .= "height=\"". $smallSize . "\" ";
$fullself = "http://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
if( strpos( $fullself, "?" ))
$fullself = substr( $fullself, 0, strpos( $fullself, "?" ));
$fullself = str_replace( "index.php", "", $fullself );
$urlpath = substr( $fullself, 0, strrpos( $fullself, "/" )) . "/";
$thisurl = $fullself . "?q=" . $w;
if( strpos( $thisurl, "&" ))
$thisurl = substr( $thisurl, 0, strpos( $thisurl, "&" ));
$fileArray = array();
foreach( explode( ",", $w ) as $ww ) {
MatchImages( ".", $ww );
}
if( ($b & 0x0040)!=0 ) {
sort( $fileArray );
header("Content-Type: application/xml; charset=ISO-8859-1");
?>
BleuRand() %
All associated items with the base name of .
en-us
BleuRand( v11 )
yorgle@gmail.com>
-
File:
<a href=""
title="" >
<img src=""
alt="" />
</a>
}
?>
BleuRand() %
";
if( !$specific_file ) {
DisplayNavBar();
AddSpacer();
}
foreach( explode( ",", $w ) as $x )
{
DisplayPathBar( $x );
AddSpacer();
}
DisplayAuxLinks();
echo "";
echo "
\n";
echo "
\n";
}
if( $specific_file ) {
if( textExtension( getExtension( $w ))) {
echo "\n";
$theFile = file( $w );
foreach( $theFile as $lineno => $line ) {
$line = str_replace( "<", "<", $line );
$line = str_replace( ">", ">", $line );
printf( "%s", $line );
}
echo "
\n";
} else if( embedExtension( getExtension( $w ))) {
?>
";
} else {
echo "\n
";
echo "$w
";
echo "" . formatSize( filesize( $w )) . "";
echo "";
}
} else {
SortFileArray();
if( $b & 0x20 ) echo "\n";
}
?>