Ejemplo n.º 1
0
 public function setConfigValueFor($dn_name, $app_code, $us_login, $se_section, $se_param, $value)
 {
     $dbini = new R3DBIni($this->db, $this->options['options'], $dn_name, $app_code, $us_login);
     $dbini->setValue($se_section, $se_param, $value);
 }
Ejemplo n.º 2
0
$dbini = new R3DBIni($mdb2, $auth_options);
$dbini->setDomainName($dn_name, true);
$dbini->setApplicationCode($app_code, true);
if (($p = strpos($us_login, '|')) !== false) {
    $us_login = substr($us_login, $p + 1);
}
$dbini->setUserLogin($dn_name, $us_login, true);
$dbini->setShowPrivate(true);
if (isset($_REQUEST['save']) && $_REQUEST['save']) {
    if (!$auth->hasPerm('EDIT', 'CONFIG')) {
        die("PERMISSION DENIED\n");
    }
    foreach ($_REQUEST as $key => $value) {
        $a = explode('|', $key);
        if (count($a) == 2) {
            $dbini->setValue($a[0], $a[1], $value);
        }
    }
}
$sections = $dbini->getAllSections();
$smarty->assign('sections', $sections);
$smarty->assign('fltsection', $fltsection);
if (in_array($fltsection, $sections)) {
    $attribs = $dbini->getAllAttributes($fltsection, true);
    foreach ($attribs as $key1 => $val1) {
        foreach ($val1 as $key2 => $val2) {
            if ($val2['se_type'] == 'ARRAY') {
                /** substring prevent to show the forst array */
                $attribs[$key1][$key2]['se_value'] = substr(var_export($attribs[$key1][$key2]['se_value'], true), 7, -3);
                $attribs[$key1][$key2]['se_value'] = htmlspecialchars($attribs[$key1][$key2]['se_value']);
            } else {