} else {
        //json rpc call procedure
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_URL, $xbmcjsonserviceoverride);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonRequest);
        $response = curl_exec($ch);
        curl_close($ch);
    }
    echo $response;
} else {
    if (!empty($arrRequest)) {
        switch ($arrRequest["method"]) {
            case "SaveLayout":
                $arrResult = save_layout($arrRequest);
                break;
            case "GetWidgets":
                $arrResult = get_widgets($arrRequest);
                break;
            case "XBMCPassthough":
                $arrResult = xbmc_passthough($arrRequest);
                break;
            default:
                $arrResult = error_array(-32601, "Method not found.");
        }
    } else {
        $arrResult = error_array(-32700, "Parse error.");
    }
    echo json_encode($arrResult);
}
Beispiel #2
0
    }
}
function update_user_gui_props($file_name, $user_id)
{
    global $sql;
    $query = <<<SQL_QUERY
        update
            user_gui_props
        set
            logo = ?
        where
            user_id = ?
SQL_QUERY;
    $rs = exec_query($sql, $query, array($file_name, $user_id));
}
save_layout();
gen_def_layout($tpl, $sql, $theme_color);
$tpl->assign(array('TR_RESELLER_LAYOUT_DATA_PAGE_TITLE' => tr('VHCS - Reseller/Change Personal Data'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'OWN_LOGO' => get_own_logo($_SESSION['user_id']), 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
/*
 *
 * static page messages.
 *
 */
gen_reseller_menu($tpl);
gen_logged_from($tpl);
update_logo();
$tpl->assign(array('TR_LAYOUT_SETTINGS' => tr('Layout settings'), 'TR_INSTALLED_LAYOUTS' => tr('Installed layouts'), 'TR_LAYOUT_NAME' => tr('Layout name'), 'TR_LAYOUT' => tr('Layout'), 'TR_DEFAULT' => tr('default'), 'TR_YES' => tr('yes'), 'TR_SAVE' => tr('Save'), 'TR_UPLOAD_LOGO' => tr('Upload logo'), 'TR_LOGO_FILE' => tr('Logo file'), 'TR_UPLOAD' => tr('Upload'), 'TR_CHOOSE_DEFAULT_LAYOUT' => tr('Choose default layout')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
Beispiel #3
0
    if ($layout === $user_def_layout) {
        $selected = 'selected';
    } else {
        $selected = '';
    }
    $tpl->assign(array('LAYOUT_VALUE' => $layout, 'LAYOUT_SELECTED' => $selected, 'LAYOUT_NAME' => $layout));
    $tpl->parse('DEF_LAYOUT', '.def_layout');
}
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/layout.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('hosting_plans', 'page');
$tpl->define_dynamic('def_layout', 'page');
save_layout($sql);
update_logo();
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
gen_def_layout($tpl, $sql, $user_def_layout);
$tpl->assign(array('TR_ADMIN_CHANGE_LAYOUT_PAGE_TITLE' => tr('VHCS - Virtual Hosting Control System'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
/*
 *
 * static page messages.
 *
 */
gen_admin_menu($tpl);
$tpl->assign(array('TR_LAYOUT_SETTINGS' => tr('Layout settings'), 'TR_INSTALLED_LAYOUTS' => tr('Installed layouts'), 'TR_LAYOUT_NAME' => tr('Layout name'), 'TR_DEFAULT' => tr('default'), 'TR_YES' => tr('yes'), 'TR_SAVE' => tr('Save'), 'TR_UPLOAD_LOGO' => tr('Upload logo'), 'TR_LOGO_FILE' => tr('Logo file'), 'TR_UPLOAD' => tr('Upload'), 'TR_CHOOSE_DEFAULT_LAYOUT' => tr('Choose default layout'), 'TR_LAYOUT' => tr('Layout')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();