PM 2.0 Skin feature. The green now becomes classic and it is possible to have Skins under PATH_DATA /skins each skin folder has a configuration file, layout htmls, css and images

This commit is contained in:
Hugo Loza
2011-02-28 16:08:15 +00:00
parent 1d2ab61a71
commit 49b9c52546
25 changed files with 20930 additions and 193 deletions

View File

@@ -0,0 +1,44 @@
<?php
if (! isset ( $_REQUEST ['action'] )) {
$res ['success'] = 'failure';
$res ['message'] = 'You may request an action';
print G::json_encode ( $res);
die ();
}
if (! function_exists ( $_REQUEST ['action'] )) {
$res ['success'] = 'failure';
$res ['message'] = 'The requested action doesn\'t exists';
print G::json_encode ( $res );
die ();
}
$functionName = $_REQUEST ['action'];
$functionParams = isset ( $_REQUEST ['params'] ) ? $_REQUEST ['params'] : array ();
$functionName ( $functionParams );
function updatePageSize(){
G::LoadClass('configuration');
$c = new Configurations();
$arr['pageSize'] = $_REQUEST['size'];
$arr['dateSave'] = date('Y-m-d H:i:s');
$config = Array();
$config[] = $arr;
$c->aConfig = $config;
$c->saveConfig('calendarList', 'pageSize','',$_SESSION['USER_LOGGED']);
echo '{success: true}';
}
function skinList(){
$skinListArray=array();
$customSkins=glob(PATH_CUSTOM_SKINS."*");
foreach($customSkins as $skin){
if(is_dir($skin)){
$res['CALENDAR_UID']=$skin;
$res['CALENDAR_NAME']=basename($skin);
$skinListArray['cals'][]=$res;
}
}
print_r(G::json_encode($skinListArray));
}