示例#1
0
文件: admin.php 项目: kabell/gallery
                </div>
            </div>
        </div>
    </div>
    <div class='container' id='container'>
        <!-- The Bootstrap Image Gallery lightbox, should be a child element of the document body -->
        <div id="links">
            <?php 
foreach (gallery::listDirs() as $value) {
    echo "<a href=\"?dir=" . htmlspecialchars(urlencode($value)) . "\">\n                    <img  class='align' src=\"?folder=" . urlencode(end(explode('/', $value))) . "\" data-width='433' data-height='312'>\n                </a>\n";
}
?>

            <?php 
$pocet = 0;
foreach (gallery::listImages() as $value) {
    $size = getimagesize('data' . $value);
    echo "<a href='#' onClick=\"\$('#thumb" . $pocet . "').attr('src', 'index.php?rotate=" . htmlspecialchars(urlencode($value)) . "'+'&date=' + new Date().getTime()); return false;\" title='" . end(explode('/', $value)) . "' data-gallery>";
    echo "<img id='thumb" . $pocet . "' class='align lazy' src=\"index.php?thumb=" . htmlspecialchars(urlencode($value)) . "\" data-width=\"" . $size[0] . "\" data-height=\"" . $size[1] . "\">";
    echo "</a>\n";
    $pocet++;
}
?>
        </div>

    </div>

    <script>
        function rotate(id){
            $("#myimg").attr("src", $("#myimg").attr("src")+"?timestamp=" + new Date().getTime());