コード例 #1
0
ファイル: convertdb.php プロジェクト: kyroskoh/singapore-1
function convertDirectory($path)
{
    if (is_dir($path)) {
        $gallery = getGallery($path);
        echo "<ul><li>Checking {$path}<br />\n";
        if ($gallery) {
            if ($gallery->summary != "" && empty($_REQUEST["convertOverwrite"])) {
                echo "Did NOT overwrite non-empty summary in {$path}<br />\n";
            } else {
                if ($_REQUEST["convertType"] != 'none') {
                    $gallery->summary = $gallery->desc;
                }
                if ($_REQUEST["convertType"] == 'move') {
                    $gallery->desc = "";
                }
            }
            $gallery = setPerms($gallery);
            for ($i = 0; $i < count($gallery->images); $i++) {
                $gallery->images[$i] = setPerms($gallery->images[$i]);
            }
            if (putGallery($gallery, $path)) {
                echo "Successfully converted {$path}<br />\n";
            } else {
                echo "Problem saving data file for {$path}<br />\n";
            }
        } else {
            echo "Skipping {$path}<br />\n";
        }
        $d = dir($path);
        while (($file = $d->read()) !== false) {
            if ($file == '.' || $file == '..') {
                continue;
            }
            $path = $d->path . "/" . $file;
            if (is_dir($path)) {
                convertDirectory($path);
            }
        }
        echo "</li></ul>\n";
    }
}
コード例 #2
0
ファイル: name.php プロジェクト: horde/horde
<?php

/**
 * Set the name of a single image via Ajax
 *
 * Copyright 2008-2016 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (GPL). If you
 * did not receive this file, see http://www.horde.org/licenses/gpl.
 *
 * @author Duck <*****@*****.**>
 */
require_once __DIR__ . '/../lib/Application.php';
Horde_Registry::appInit('ansel');
$image_id = (int) Horde_Util::getFormData('image');
$face_id = (int) Horde_Util::getFormData('face');
$name = Horde_Util::getFormData('name');
$image = $GLOBALS['injector']->getInstance('Ansel_Storage')->getImage($image_id);
$gallery = $GLOBALS['injector']->getInstance('Ansel_Storage') > getGallery($image->gallery);
if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
    throw new Ansel_Exception('Access denied editing the photo.');
}
$faces = $injector->getInstance('Ansel_Faces');
$result = $faces->setName($face_id, $name);
コード例 #3
0
ファイル: galleries.php プロジェクト: kirvin/the-nerdery
     }
     echo '</tr>';
     echo '</table><br>';
     // form for adding new images to this album
     if ($gallery->isPublic || $gallery->creator == $_SESSION["UserID"]) {
         writeSectionHeader("Add Images");
         $frm = new Form("field", "addImages", 'galleries.php?gid=' . $_GET["gid"] . '&aid=' . $_GET["aid"], "addImages");
         $frm->addDescription("You may upload multiple images in a zip file, or a single jpg or gif file");
         $frm->addFormElement("album_files", "file", "File", "", true);
         $frm->method = "post";
         $frm->draw();
     }
     // form for adding a picture
 } else {
     if (isset($_GET["gid"])) {
         $gallery = getGallery($_GET["gid"]);
         writeHeader(3, "Nerdery Pictures", "<a class=\"boldWhiteLink\" href=\"galleries.php\">Picture Galleries</a> >> " . $gallery->name);
         writeCP();
         $sh = new SectionHeader("<a class=\"boldWhiteLink\" href=\"galleries.php\">Picture Galleries</a> >> " . $gallery->name, true);
         $sh->start();
         $sh->end();
         echo '<table border="0" cellpadding="4" cellspacing="0" width="700">';
         $each = getAlbums($_GET["gid"]);
         $i = 0;
         echo "<tr>" . "<td colspan=\"2\">" . '<a class="modifiedLink" href="galleries.php?gid=' . $_GET["gid"] . '">' . $gallery->name . '</a>' . "</td>" . "</tr>";
         while ($a = $each[$i]) {
             if ($a->lastModified > $_SESSION["PrevVisit"]) {
                 $classname = "modifiedLink";
             } else {
                 $classname = "unmodifiedLink";
             }
コード例 #4
0
ファイル: obras.php プロジェクト: KINOTO/apymeco-web
                                       
                        </a>    
                    </li>
                </ul>
            </nav>

        </div>

    </header>

    <div class="container">

        <div class="work-archive">
            <?php 
foreach ($works as $i => $work) {
    $gallery = getGallery($work["id_work"]);
    $client = getClient($work["id_client"]);
    if ($gallery) {
        $filename = generateRandomString();
        file_put_contents("_temp/" . $filename . getExtension($gallery[0]->getTypeImage()), $gallery[0]->getWorkImage());
        ?>
            <div class="work-thumb">
                <a class="gal<?php 
        echo $work["id_work"];
        ?>
" href="_temp/<?php 
        echo $filename . getExtension($gallery[0]->getTypeImage());
        ?>
" data-name="<?php 
        echo $work["work_name"];
        ?>
コード例 #5
0
<?php

/* Photo Gallery - Archive Page */
get_header();
$galleries = getGallery();
?>

<section class="row mainbg">
	<h1 class="pageTitle">Photo Gallery</h1>
	
	<div class="pictureNav col-md-offset-2 col-md-8">
		<?php 
foreach ($galleries as $i => $gallery) {
    ?>
		<a class="navButton col-md-2 <?php 
    echo $i == 0 ? 'active' : '';
    ?>
" title="View Yankee Lobster <?php 
    echo $gallery['title'];
    ?>
 photo gallery" href="#gallery-<?php 
    echo $i;
    ?>
"><?php 
    echo $gallery['title'];
    ?>
</a>
		<?php 
}
?>