Beispiel #1
0
$obj = new JAT3_AdminUtil();
// Check template use old or new folder structure
$isNewFolderStruct = $obj->checkUseNewFolderStructure();
$uri = str_replace(DS, "/", str_replace(JPATH_SITE, JURI::base(), dirname(__FILE__)));
$uri = str_replace("/administrator", "", $uri);
$template = $obj->template;
$name = 'pages_profile';
$profiles = $obj->getProfiles();
$pageids = $obj->getPageIds($name);
$langlist = $obj->getLanguageList();
jimport('joomla.filesystem.file');
$jsonData = $profiles;
$configfile = dirname(__FILE__) . DS . 'config.xml';
if (file_exists($configfile)) {
    /* For General Tab */
    $generalconfig = $obj->getGeneralConfig();
    $configform = JForm::getInstance('general', $configfile, array('control' => 'jform'));
    // $params = new JParameter($generalconfig);
    // Strict standards: Declaration of JParameter::loadSetupFile() should be compatible with that of JRegistry::loadSetupFile()
    $params = $generalconfig;
    if (!$generalconfig instanceof JRegistry) {
        $params = new JRegistry($generalconfig);
    }
    $jsonData['generalconfigdata'] = $params->toArray();
    $jsonData['generalconfigdata'][$name] = str_replace("\n", "\\\\n", $params->get($name, ''));
    $arr_values = array();
    $value = $params->get($name, '');
    $assignedMenus = $obj->getAssignedMenu();
    if ($value) {
        $arr_values_tmp = explode("\n", $value);
        foreach ($arr_values_tmp as $k => $v) {