static function setTxt($id, $v)
 {
     $vs = D()->row("SELECT name, page_id FROM page_text WHERE text_id = " . (int) $id . " ");
     if ($vs) {
         return qgApi::call('page::text', array($vs['page_id'], $vs['name'], L(), $v));
     }
     $vs = D()->row("SELECT id FROM page WHERE title_id = " . (int) $id . " ");
     if ($vs) {
         return qgApi::call('page::title', array($vs['id'], L(), $v));
     }
     return false;
 }
Beispiel #2
0
    html::addJSFile(sysURL . 'core/js/c1.js', 'core');
    /* old ie */
    $matches = preg_match('/MSIE ([0-9.]+)/', $_SERVER['HTTP_USER_AGENT'], $match);
    if (isset($match[1]) && $match[1] < 9) {
        html::addJSFile(sysURL . 'core/js/jQuery1.js', 'core');
    } else {
        html::addJSFile(sysURL . 'core/js/jQuery.js', 'core');
    }
    $matches && header('X-UA-Compatible: IE=Edge,chrome=1');
    html::addJSFile(sysURL . 'core/js/qg/divers.js', 'core');
    html::addJSFile(sysURL . 'core/js/qg/remote.js', 'core');
});
qg::on('action', function () {
    // use 'render' ? would be .5 miliseconds slower :(
    if (strpos(appRequestUri, 'dbFile/') === 0) {
        $request = substr(appRequestUri, 7);
        dbFiles::output($request);
    }
    rTicket::captchaListener();
    Files::uploadListener();
    if (isset($_GET['qgha'])) {
        require_once sysPATH . 'core/lib/system/hashAction.php';
        $ok = hashAction::fire($_GET['qgha']);
    }
    if (isset(G()->ASK['serverInterface'])) {
        foreach (G()->ASK['serverInterface'] as $id => $vs) {
            $ret['serverInterface'][$id] = qgApi::call($vs['fn'], $vs['args']);
        }
        Answer($ret);
    }
});
 static function onAfter($fn, $pid)
 {
     qgApi::call('page::reload', array($pid));
 }
Beispiel #4
0
		blur:add,
		focus:function() {
			this.value='';
		},
		keydown:function(e) {
			e.which==13 && add();
			if (e.which==27) {
				this.value='';
				this.blur();
			}
		}
	});
}();
</script>

<div id=cmsTreeContainer></div>

<script>
//$fn('cms::getTree')(0,{ in : <?php 
echo $Cont;
?>
 , filter : '<?php 
echo G()->SET['cms']['panel']['tree_show_c']->v ? '*' : 'p';
?>
' }).then(cmsTreeInit);
cmsTreeInit( <?php 
echo json_encode(qgApi::call('cms::getTree', array(0, array('in' => $Cont, 'filter' => G()->SET['cms']['panel']['tree_show_c']->v ? '*' : 'p'))));
?>
 )
</script>