Esempio n. 1
0
File: boot.php Progetto: philum/cms
function reboot()
{
    require 'params/_connectx.php';
    req('art,spe,pop');
    master_params('params/_' . $db, $qd, $aqb, $subd);
    $_SESSION['dayx'] = time();
    define_hubs();
    define_qb();
    define_config();
    eye_iq();
    log_mods();
    define_auth();
    //if($_SESSION['rstr'][22])block_crawls();
    time_system('ok');
    cache_arts();
    define_cats_rqt();
    define_condition();
    define_clr();
}
Esempio n. 2
0
File: ajax.php Progetto: philum/cms
<?php

//philum_ajax_hangar
session_start();
error_report();
$_SESSION['onload'] = '';
if (!$_SESSION['stime']) {
    req('boot,art,spe');
    master_params('params/_' . $db, $qd, $aqb, $subd);
    define_hubs();
    define_qb();
    define_config();
    time_system($cache);
    cache_arts();
    define_cats_rqt();
    define_condition();
    define_clr();
}
if (!$_SESSION['picto']) {
    $_SESSION['picto'] = msql_read('system', 'edition_pictos', '', 1);
}
$res = $_GET['res'];
if (substr($res, -1) == '_') {
    $res = substr($res, 0, -1);
}
list($n, $id, $va, $opt, $optb) = ajxr($_GET['callj']);
$sz = $_GET['sz'];
$pp = $_GET['popup'];
$ar = array('plug' => 1, 'plup' => 1, 'plugin' => 1, 'plupin' => 1, 'titsav' => 1, 'popbub' => 1, 'call' => 1, 'callp' => 1);
if (!$ar[$n]) {
    require_once 'prog' . $b . '/ajxf.php';
Esempio n. 3
0
File: admin.php Progetto: philum/cms
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 . '&params=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;
}