function alternate_design($node_clr) { $_SESSION['switch'] = 1; $_SESSION['tab'] = ''; define_mods($node_clr); $qbinb = ser("rstr,config", $_SESSION['qdu'] . ' WHERE name="' . $node_clr . '"'); $prmb = explode('#', $qbinb["config"]); $_SESSION['prmb'] = prmb_defaults($prmb); $_SESSION['node_clr'] = $node_clr; $_SESSION['rstr'] = strsplit($qbinb['rstr']); }
function define_config() { $qbn = sql('mail,rstr,mbrs,config,dscrp', 'qdu', 'a', 'name="' . $_SESSION['qb'] . '"'); $_SESSION['rstr'] = strsplit($qbn['rstr']); unset($_SESSION['rstr'][0]); //$_SESSION['rstr']=msql_read('',$_SESSION['qb'].'_rstr','',1); $prmb = explode('#', $qbn['config']); $_SESSION['prmb'] = prmb_defaults($prmb); //config $qbin['adminmail'] = $qbn['mail']; //$qbin['struct']=$qbn['struct']; $qbin['membrs'] = tab_members($qbn['mbrs']); $qbin['dscrp'] = $qbn['dscrp']; $_SESSION['qbin'] = $qbin; $_SESSION['modsnod'] = $_SESSION['qb'] . '_mods_' . prmb(1); if ($_SESSION['prmb'][5]) { auto_design(); } define_mods(''); $_SESSION['nms'] = msql_read('lang', 'helps_nominations', '', 1); $_SESSION['art_options'] = array('related', 'folder', 'agenda', 'lang', 'template', 'authlevel', 'tracks', '2cols', 'fav', 'like', 'poll'); $_SESSION['node_clr'] = $_SESSION['qb']; $_SESSION['mobile'] = mobile(); $_SESSION['switch'] = ''; $_SESSION['prma'] = ''; $_SESSION['ip'] = sesmk('hostname'); }
function adm_params($curauth, $rep) { $auth = ses('auth'); $goto = '/?admin=params'; $qb = ses('qb'); req('boot,adminx'); connect(); //$db if ($auth > 6 && $_GET['m_cnfg'] == '=') { $mcfg = '&m_cnfg=='; $f = 'params/_' . $db . '_config.txt'; if (is_file($f)) { $prms = explode('#', read_file($f)); } $arr = msql_read_prep('system', 'admin_config'); $hl = 'lang_admin*config_'; } else { $prms = $_SESSION['prmb']; $prmb = sql('config', 'qdu', 'v', 'name="' . ses('qb') . '"'); $prms = explode('#', $prmb); $prms = prmb_defaults($prms); $arr = msql_read_prep('system', 'admin_params'); $hl = 'lang_admin*params_'; } if ($_GET['params'] == 'save' && $auth >= $curauth) { for ($i = 0; $i <= $_POST['valmax']; $i++) { $prms[$i] = $_POST['pms' . $i]; $vaue .= $prms[$i] . '#'; } if ($prms[1] != prmb(1) && !$_GET['m_cnfg']) { newmodfrom($prms[1]); } if ($_GET['m_cnfg'] == '=') { write_file($f, $vaue); update('qdu', 'struct', $vaue, 'name', $qb); master_params('params/_' . $db, $qd, $aqb, $subd); alert(lkt('txtyl', $f, $db . '_config')); } else { $_SESSION['prmb'] = $prms; update('qdu', 'config', $vaue, 'name', $qb); } } $sty = '" style="width:200px;'; //read foreach ($arr as $t => $ak) { foreach ($ak as $i => $v) { if ($i != 22) { if ($valmax < $i) { $valmax = $i; } $attr = array('name' => 'pms' . $i, 'style' => 'width:200px;'); if ($i == 11 && !$_GET['m_cnfg']) { //$r[$t].=menuder_form_kv(affect_auth($auth),'pms'.$i.$sty,$prms[$i],'kv'); $r[$t] .= select($attr, affect_auth($auth), 'kv', $prms[$i]); } elseif ($i == 25) { $lc = 'msql/lang/'; $dirs = explore($lc, 'dirs', 1); $dirs = str_replace($lc, '', $dirs); //$r[$t].=menuder_form_kv($dirs,'pms'.$i.$sty,$prms[$i],'vv').' '; $r[$t] .= select($attr, $dirs, 'vv', $prms[$i]); } elseif ($i == 21) { $r[$t] .= txarea('pms' . $i, $prms[$i], 31, 5) . ' '; } else { $r[$t] .= input2('text" size="34', 'pms' . $i, $prms[$i], '') . ' '; } $r[$t] .= btn('txtblc', $v) . ' ' . btn('txtsmall2', bubble('grey', 'popmsqt', $hl . $i, $i)) . br(); } } } $r[$t] .= hidden('valmax', '', $valmax) . br(); $ret = form($goto . $mcfg . '¶ms=save', make_tabs($r, 'prm') . input2('submit', 'Submit', nms(27), '')) . br(); if ($auth > 6 && !$mcfg) { $ret .= lkc('txtbox', $goto . '&m_cnfg==', 'server') . ' ' . backup_config(); } return $ret; }