コード例 #1
0
/**
 * Returns an img src URI encoded based on the OS of the server
 *
 * @param string $uri uri in FILESYSTEM_CHARSET encoding
 * @return string
 */
function imgSrcURI($uri)
{
    if (getOption('UTF8_image_URI')) {
        return filesystemToUTF8($uri);
    }
    return $uri;
}
コード例 #2
0
ファイル: setup.php プロジェクト: ItsHaden/epicLanBootstrap
     }
 }
 checkMark($noxlate, gettext("PHP <code>gettext()</code> support"), ' ' . gettext("[is not present]"), gettext("Localization of Zenphoto currently requires native PHP <code>gettext()</code> support"));
 if ($_zp_setupCurrentLocale_result === false) {
     checkMark(-1, 'PHP <code>setlocale()</code>', ' ' . gettext("failed"), gettext("Locale functionality is not implemented on your platform or the specified locale does not exist. Language translation may not work.") . '<br />' . gettext('See the troubleshooting guide on zenphoto.org for details.'));
 }
 if (function_exists('mb_internal_encoding')) {
     if (($charset = mb_internal_encoding()) == 'UTF-8') {
         $mb = 1;
     } else {
         $mb = -1;
     }
     $m1 = sprintf(gettext('Your internal characater set is <strong>%s</strong>'), $charset);
     $m2 = gettext('Setting <em>mbstring.internal_encoding</em> to <strong>UTF-8</strong> in your <em>php.ini</em> file is recommended to insure accented and multi-byte characters function properly.');
 } else {
     $test = filesystemToUTF8('test');
     if (empty($test)) {
         $mb = 0;
         $m1 = gettext("[is not present and <code>iconv()</code> is not working]");
         $m2 = gettext("You need to install the <code>mbstring</code> package or correct the issue with <code>iconv(()</code>");
     } else {
         $mb = -1;
         $m1 = gettext("[is not present]");
         $m2 = gettext("Strings generated internally by PHP may not display correctly. (e.g. dates)");
     }
 }
 checkMark($mb, gettext("PHP <code>mbstring</code> package"), ' ' . $m1, $m2);
 $sql = extension_loaded('mysql');
 $good = checkMark($sql, ' ' . gettext(" PHP MySQL support"), '', gettext('You need to install MySQL support in your PHP')) && $good;
 if (file_exists("zp-config.php")) {
     require dirname(__FILE__) . '/zp-config.php';
コード例 #3
0
ファイル: i.php プロジェクト: ItsHaden/epicLanBootstrap
        $j = strpos($imgfile, '}_');
        $source = substr($imgfile, $i + 2, $j - $i - 2);
        $imgfile = substr($imgfile, $j + 1);
        $i = strpos($imgfile, '_{');
        if ($i !== false) {
            $j = strpos($imgfile, '}_');
            $source2 = '/' . substr($imgfile, $i + 2, $j - $i - 2);
            $imgfile = substr($imgfile, $j + 2);
        } else {
            $source2 = '';
        }
        if ($source != ZENFOLDER) {
            $source = THEMEFOLDER . '/' . $source;
        }
        // disable these two lines and enable the one following to allow sizing of default images.
        header("Location: " . FULLWEBPATH . '/' . pathurlencode(FilesystemToUTF8($source . $source2)) . "/" . rawurlencode(filesystemToUTF8($imgfile)));
        exit;
        //		$imgfile = SERVERPATH .'/'. $source.$source2 . "/" . $imgfile;
    }
    if (!file_exists($imgfile)) {
        header("HTTP/1.0 404 Not Found");
        imageError(gettext("Image not found; file does not exist."), 'err-imagenotfound.gif');
    }
}
// Make the directories for the albums in the cache, recursively.
// Skip this for safe_mode, where we can't write to directories we create!
if (!ini_get("safe_mode")) {
    $albumdirs = getAlbumArray($album, true);
    foreach ($albumdirs as $dir) {
        $dir = UTF8ToFilesystem($dir);
        $dir = SERVERCACHE . '/' . $dir;