Esempio n. 1
0
function listImages($dir)
{
    if ($dh = opendir($dir)) {
        echo "<h1>{$dir}</h1>";
        while (($file = readdir($dh)) !== false) {
            if ($file[0] == ".") {
                continue;
            }
            if ($file == "index.php") {
                continue;
            }
            if (is_dir($dir . "/" . $file)) {
                $subdirs[] = $dir . "/" . $file;
                continue;
            }
            $gis = getimagesize($dir . "/" . $file);
            $path = str_replace(dirname(__FILE__), "", $dir . "/" . $file);
            echo "<div class=\"imageContainer\">{$file}<br /><small>{$gis['0']}x{$gis['1']}, " . round(filesize($dir . "/" . $file) / 1024, 2) . "KB</small><br /><img style=\"" . ($gis[0] > 256 ? "width:256px;" : "") . "\" src=\".{$path}\" /></div>";
        }
        if (count($subdirs) > 0) {
            foreach ($subdirs as $k => $v) {
                listImages($v);
            }
        }
        closedir($dh);
    }
}
Esempio n. 2
0
function listDiffType($type, $imgstyle = null)
{
    $imgstyle = $imgstyle == null ? 'height:126px;width:150px;' : $imgstyle;
    $imglist = listImages("images/album/{$type}");
    foreach ($imglist as $key => $value) {
        echo "<img key=\"{$key}\" style=\"{$imgstyle}\" src=\"{$value}\" alt=\"{$value}\"/>";
    }
}
Esempio n. 3
0
File: zip.php Progetto: shiyake/PHP
set_time_limit(0);
function listImages($dir)
{
    $filer = array();
    if (is_dir($dir)) {
        if ($dh = opendir($dir)) {
            while (($file = readdir($dh)) !== false) {
                array_push($filer, $dir . '/' . $file);
            }
            closedir($dh);
        }
    }
    array_splice($filer, 0, 2);
    return $filer;
}
$imglist = listImages("images/album/trip");
foreach ($imglist as $key => $value) {
    resizeImage($value, 2000, 1000, "images/album/tmp/{$key}", '.jpg');
}
/**
+------------------------------------------------------------------------------
*                等比例压缩图片
+------------------------------------------------------------------------------
* @param String $src_imagename 源文件名        比如 “source.jpg”
* @param int    $maxwidth      压缩后最大宽度
* @param int    $maxheight     压缩后最大高度
* @param String $savename      保存的文件名    “d:save”
* @param String $filetype      保存文件的格式 比如 ”.jpg“
* @author Yovae     <*****@*****.**>
* @version 1.0
+------------------------------------------------------------------------------
Esempio n. 4
0
            mosRedirect("index2.php?option=com_media&listdir=" . $_POST['dirPath'], T_("Directory creation not allowed while running in SAFE MODE as this can cause problems."));
        } else {
            create_folder($foldername, $dirPath);
        }
        showMedia($dirPath);
        break;
    case "delete":
        delete_file($delFile, $listdir);
        showMedia($listdir);
        break;
    case "deletefolder":
        delete_folder($delFolder, $listdir);
        showMedia($listdir);
        break;
    case "list":
        listImages($listdir);
        break;
    default:
        showMedia($listdir);
        break;
}
function delete_file($delfile, $listdir)
{
    global $mosConfig_absolute_path;
    $del_image = $mosConfig_absolute_path . "/images/stories" . $listdir . "/" . $delfile;
    unlink($del_image);
}
function create_folder($folder_name, $dirPath)
{
    global $mosConfig_absolute_path;
    if (strlen($folder_name) > 0) {
            <?php 
listImages('../imgs/boats/for-sale/demo-2012-pavati-16x55-guardian-white/', 'fs-slide', 'slideimage-');
?>
        </div>
    </div>
    <div class='for-sale-information'>
        <p>Package includes, 2 passenger PAVATI Element seats on dry storage boxes, Ultimate padded row seat with removable back rest, TRUE FULL LEVEL removable diamond plate floor, quick-lock seat system, manual style anchor with locking anchor nest, The Truth Ruler, powder coated interior with white wrap exterior, 12 position oar lock block, Helfrich Oar locks, Sawyer Square top oars,Vacuumed sealed UHMW Bottom, Elite Diamond punched sides, North West Aluminum trailer. Call now for pricing!</p>
    </div>
</div>

<div class='for-sale-container' data-tag='used' data-sold='true'>
    <h3>Used 2014 Pavati 17' x 61" Chameleon Sapphire over Ink Black Legacy</h3>
    <div class='for-sale-slider'>
        <div class='fs-slider'>
            <?php 
listImages('../imgs/boats/for-sale/used-2014-pavati-17x61-legacy-lavendar/', 'fs-slide', 'slideimage-');
?>
        </div>
    </div>
    <div class='for-sale-information'>
        <p>Inside and outside powder coated. Inside color is Silver Hammertone, outside color is Chameleon Sapphire over Ink Black. Front port starbord side door. Front and rear casting stands included. Rod butt holder and accessory tower. Vaccum sealed UHMW bottom with kevlar sides, bow, and transom. Northwest aluminum trailer, and Helfrich oarlocks. 12-position oar lock block, full-level diamond plate floors with quick-lock seat system&trade;.</p>
    </div>
</div>

</div><?php 
include "../footer2.php";
?>
</div>

<!-- include necessary javascript files -->
<script type='text/javascript' src='../js/master.js'></script>
Esempio n. 6
0
        } else {
            $out .= "<a href='{$PHP_SELF}?pagenum={$a}'>{$a}</a> ";
        }
    }
    $out .= $out2 . " Total Pages: " . ($pg_ttl - 1);
    return $out;
}
$dir = getcwd() . "/charimg/";
$url = $URI_BASE . "charimg/";
$pagelimit = "4";
$pagenum = $_GET["pagenum"];
if (!$pagenum || !is_numeric($pagenum)) {
    $pagenum = 1;
}
$mylist = array();
$mylist = listImages($dir);
$ttl_imgs = sizeof($mylist);
$pg_st = ($pagenum - 1) * $pagelimit;
$pg_ed = $pagenum * $pagelimit;
if ($pg_ed > $ttl_imgs) {
    $pg_ed = $ttl_imgs;
}
$pg_out = "";
$pg_out .= "<div align='center'> Page:";
$pg_out .= pagelist($pagenum, $pagelimit, $ttl_imgs);
$pg_out .= "</div>\n";
$pg_out .= "<div align='center'><table border='1' cellspacing='10' cellpadding='10' bordercolor='#666666' bordercolordark='#FFFFFF'>\n";
$ln = 1;
for ($l = $pg_st; $l < $pg_ed; $l++) {
    if ($ln == '1') {
        $pg_out .= "<tr><td align='center'><img src='" . $url . $mylist[$l] . "' width='125' height='193' border='0'><br>";
Esempio n. 7
0
            $hint = $hint . $text;
        }
    }
    return $hint;
}
//lookup all links from the xml file if length of q>0
if (strlen($q) > 0) {
    $hint = "";
    $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
    $text = listArticles($dbc, $q);
    if ($hint == "") {
        $hint = $text;
    } else {
        $hint = $hint . $text;
    }
    $text = listImages($dbc, $q);
    if ($hint == "") {
        $hint = $text;
    } else {
        $hint = $hint . $text;
    }
    $text = listConcepts($dbc, $q);
    if ($hint == "") {
        $hint = $text;
    } else {
        $hint = $hint . $text;
    }
}
// Set output to "no suggestion" if no hint were found
// or to the correct values
if ($hint == "") {
Esempio n. 8
0
        echo "<div class=\"container\"><h2>Retail</h2>";
        listImages("banners/" . $_GET["type"] . "/retail");
        echo "</div><div class=\"container\"><h2>Nintendo eShop</h2>";
        listImages("banners/" . $_GET["type"] . "/eshop");
        echo "</div><div class=\"container\"><h2>Virtual Console</h2>";
        listImages("banners/" . $_GET["type"] . "/vc");
        echo "</div>";
    } elseif ($_GET["type"] == "Homebrew") {
        echo "<div class=\"container\"><h2>General</h2>";
        listImages("banners/" . $_GET["type"] . "/general");
        echo "</div><div class=\"container\"><h2>Emulators</h2>";
        listImages("banners/" . $_GET["type"] . "/emulators");
        echo "</div>";
    } else {
        echo "<div class=\"container\">";
        listImages("banners/" . $_GET["type"]);
        echo "</div>";
    }
}
?>
        <hr>
        <div class="container"><p>
                <a href="https://gbatemp.net/threads/gridlauncher-3dsflow-project-box-cover-banners.405303/">GBAtemp thread</a> &mdash; <a href="https://github.com/ihaveamac/3DSFlow-downloader">Site source code on GitHub</a> &mdash; <a href="https://ianburgwin.net/">ianburgwin.net</a>
            </p></div>
    </div>
</div>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
</body>
</html>