/**
 * Returns the list of installed themes in the following format
 * {
 *   theme_name => PF_REL_THEME_DIR.theme_dir.'/',
 *   ...
 * }
 */
function getThemeList() {
    $themedirs = array();
    chdir(PF_THEME_DIR);
    foreach(glob("*", GLOB_ONLYDIR) as $theme) {
        if(is_dir($theme))
            $themedirs[] = $theme;
    }
    
    $ret = array();
    foreach($themedirs as $themedir) {
        $cp = new ConfigReader($themedir.'/'.PF_THEME_INFO_FILE);
        $data = $cp->get("theme/name");
        $ret[$data['data']] = PF_REL_THEME_DIR.$themedir.'/';
    }
    return $ret;
}
Exemple #2
0
</div>

<div id="content">





<?php 
/*##################################
###    PASSWORD IS GOOD ############
##################################*/
//retrieve password from config file
include_once PF_SCRIPTS_DIR . "pf_configparser.php";
$cr = new ConfigReader(PF_CONFIG_FILE);
$pass = $cr->get("settings/password");
$pass = $pass['data'];
/* TODO : perform password checks here
 This is a fake check */
if (md5($_POST['pf-password']) == $pass) {
    ?>

<!--Control and Information Panels hidden -->
<div id="panel">
<a name="panel"></a>
<div id="success-panel">
<h2>Success!</h2>
</div>
<div id="error-panel">
<h2>Error!</h2>
</div>