Exemplo n.º 1
0
 * @package setup
 *
 */
define('OFFSET_PATH', 2);
require_once 'setup-functions.php';
require_once dirname(dirname(__FILE__)) . '/admin-functions.php';
$iMutex = new Mutex('i', getOption('imageProcessorConcurrency'));
$iMutex->lock();
$theme = sanitize($_REQUEST['theme']);
setupLog(sprintf(gettext('Theme:%s setup started'), $theme), true);
$requirePath = getPlugin('themeoptions.php', $theme);
if (!empty($requirePath)) {
    require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/cacheManager.php';
    require_once SERVERPATH . '/' . THEMEFOLDER . '/' . $theme . '/themeoptions.php';
    /* prime the default theme options */
    $optionHandler = new ThemeOptions();
    setupLog(sprintf(gettext('Theme:%s option interface instantiated'), $theme), true);
}
/* then set any "standard" options that may not have been covered by the theme */
standardThemeOptions($theme, NULL);
/* and record that we finished */
setupLog(sprintf(gettext('Theme:%s setup completed'), $theme), true);
$iMutex->unlock();
$fp = fopen(SERVERPATH . '/' . ZENFOLDER . '/images/pass.png', 'rb');
// send the right headers
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header("Content-Type: image/png");
header("Content-Length: " . filesize(SERVERPATH . '/' . ZENFOLDER . '/images/pass.png'));
// dump the picture and stop the script
fpassthru($fp);
fclose($fp);
Exemplo n.º 2
0
        }
    }
    if (!(false === ($requirePath = getPlugin('themeoptions.php', $themename)))) {
        require_once $requirePath;
        $optionHandler = new ThemeOptions();
        $supportedOptions = $optionHandler->getOptionsSupported();
        if (method_exists($optionHandler, 'getOptionsDisabled')) {
            $unsupportedOptions = $optionHandler->getOptionsDisabled();
        } else {
            $unsupportedOptions = array();
        }
    } else {
        $unsupportedOptions = array();
        $supportedOptions = array();
    }
    standardThemeOptions($themename, $album);
    ?>
						<form class="dirty-check" action="?action=saveoptions" method="post" id="themeoptionsform" autocomplete="off">
							<?php 
    XSRFToken('saveoptions');
    ?>
							<input type="hidden" id="savethemeoptions" name="savethemeoptions" value="yes" />
							<input type="hidden" name="optiontheme" value="<?php 
    echo html_encode($themename);
    ?>
" />
							<input type="hidden" name="old_themealbum" value="<?php 
    echo pathurlencode($alb);
    ?>
" />
							<table class='bordered options'>
Exemplo n.º 3
0
             $_zp_gallery->save();
             $_set_theme_album = NULL;
         } else {
             $_set_theme_album = newAlbum($alb);
             $oldtheme = $_set_theme_album->getAlbumTheme();
             $_set_theme_album->setAlbumTheme($newtheme);
             $_set_theme_album->save();
         }
         $opthandler = SERVERPATH . '/' . THEMEFOLDER . '/' . $newtheme . '/themeoptions.php';
         if (file_exists($opthandler)) {
             require_once $opthandler;
             $opt = new ThemeOptions();
             //	prime the default options!
         }
         /* set any "standard" options that may not have been covered by the theme */
         standardThemeOptions($newtheme, $_set_theme_album);
         header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/admin-themes.php?themealbum=" . sanitize($_GET['themealbum']));
         exitZP();
     }
     break;
     // Duplicate a theme
 // Duplicate a theme
 case 'copytheme':
     if (isset($_GET['source']) && isset($_GET['target']) && isset($_GET['name'])) {
         $message = copyThemeDirectory(sanitize($_GET['source'], 3), sanitize($_GET['target'], 3), sanitize($_GET['name'], 3));
     }
     $_zp_gallery = new Gallery();
     //	flush out remembered themes
     break;
 case 'deletetheme':
     if (isset($_GET['theme'])) {