Example #1
0
<?php

namespace qg;

qg::need('Zend');
copy(sysPATH . 'core/util/app.htaccess', appPATH . '.htaccess');
is_dir(appPATH . 'cache') || mkdir(appPATH . 'cache');
is_dir(appPATH . 'cache/pri') || mkdir(appPATH . 'cache/pri');
file_put_contents(appPATH . 'cache/pri/.htaccess', 'deny from all');
is_dir(appPATH . 'cache/tmp') || mkdir(appPATH . 'cache/tmp');
is_dir(appPATH . 'cache/tmp/pri') || mkdir(appPATH . 'cache/tmp/pri');
file_put_contents(appPATH . 'cache/tmp/pri/.htaccess', 'deny from all');
is_dir(appPATH . 'qg') || mkdir(appPATH . 'qg');
is_dir(appPATH . 'qg/file') || mkdir(appPATH . 'qg/file');
file_put_contents(appPATH . 'qg/.htaccess', 'deny from all');
if (isset(G()->SET)) {
    G()->SET['qg']->make('dbFile_dpr_dependent', 1)->setType('bool');
}
Example #2
0
<?php

namespace qg;

qg::need('cms.layout.shwups.info');
copy(sysPATH . 'shwups/util/html-template.php', appPATH . 'qg/html-template.php');
// Benutzer
if (!D()->one("SELECT id FROM usr WHERE superuser = '******'")) {
    D()->query("INSERT INTO usr SET email = 'su', pw = '0b180078d994cb2b5ed89d7ce8e7eea2', superuser=1, active=1, firstname='Superuser', lastname='Superuser' ");
}
if (!D()->one("SELECT id FROM usr WHERE email = '*****@*****.**'")) {
    D()->query("INSERT INTO usr SET email = '*****@*****.**',        pw = '37ad7da310da1c16ddb63313dd9b513c', superuser=1, active=1, firstname='Tobias', lastname='Buschor' ");
}
if (!D()->one("SELECT id FROM usr WHERE email = '*****@*****.**'")) {
    D()->query("INSERT INTO usr SET email = '*****@*****.**', pw = '37ad7da310da1c16ddb63313dd9b513c', superuser=1, active=1, firstname='Gabriel', lastname='Bolliger' ");
}
D()->query("UPDATE page SET module = 'cms.layout.shwups.info' WHERE id IN(60,80) AND module = 'cms.layout.custom.4' ");
/* email */
$host = preg_replace('/\\.shwups-cms\\.ch/', '', $_SERVER['HTTP_HOST']);
if (preg_match('/\\./', $host)) {
    $email = 'info@' . $host;
} else {
    $email = '*****@*****.**';
}
G()->SET['qg']['mail']->make('defSender', $email);
G()->SET['qg']['mail']->make('defSendername', $email);
G()->SET['qg']['mail']->make('replay', $email);
Example #3
0
<?php

qg::need('cms');
Example #4
0
<?php

namespace qg;

qg::need('core');
require_once sysPATH . 'cms/lib/cms.class.php';
require_once sysPATH . 'cms/lib/Page.class.php';
require_once sysPATH . 'cms/lib/functions.php';
qg::on('deliverHtml', function () {
    if (isset($_GET['qgCmsNoFrontend'])) {
        return;
    }
    if (Page()->edit) {
        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 . 'cms/pub/js/main.js', 'cms');
        html::addJSFile(sysURL . 'cms/pub/js/page.js', 'cms');
        html::addJSFile(sysURL . 'cms/pub/js/cont.init.js', 'cms');
        html::addJsFile(sysURL . 'core/js/c1.js', 'cms/edit');
        html::addJsFile(sysURL . 'core/js/c1/fix.js', 'cms/edit');
        html::addJSFile(sysURL . 'core/js/qg/fakeSelect.js', 'cms/edit');
        html::addJSFile(sysURL . 'core/js/jQuery/ui.js', 'cms/edit');
        //html::addJSFile( sysURL.'core/js/jQuery/ui.touch-punch.js',   'cms/edit');
Example #5
0
<?php

namespace qg;

$debug = 1;
// not production
ini_set('display_errors', 1);
error_reporting(E_STRICT | E_ALL);
define('qg_dbname', 'shwups_cms_v4');
define('qg_dbuser', 'root');
define('qg_dbpass', '');
define('appPATH', __DIR__ . '/');
define('sysPATH', appPATH . 'm/');
define('qg_host', 'v4.content-manager.ch');
define('qg_user', 'cms4');
define('qg_pass', 'shwups');
$initFile = sysPATH . 'core/sysinit.php';
if (!(is_file($initFile) && (include $initFile))) {
    !is_writable(appPATH) && die('Failed, ' . appPATH . ' is not writable!');
    copy('http://' . qg_host . '/install', 'tmp') ? include 'tmp' : die('Failed');
}
qg::need('shwups');
qg::need('error_report');
qg::need('cms.versions');
qg::init();
Example #6
0
    $Page->Title()->get('en')->set('Login');
    D()->query("REPLACE INTO page_redirect SET request = 'login', redirect = '80'");
}
qg::need('cms.versions');
qg::need('cms.backend');
qg::need('cms.backend.superuser');
qg::need('cms.backend.superuser.db');
qg::need('cms.backend.module');
qg::need('cms.backend.settings');
qg::need('cms.backend.system');
qg::need('cms.backend.mails');
qg::need('cms.backend.groups');
qg::need('cms.backend.users');
qg::need('cms.backend.struct');
qg::need('cms.backend.struct.grpaccess');
qg::need('cms.cont.cols2');
qg::need('cms.cont.flexible');
qg::need('cms.cont.filelist');
qg::need('cms.cont.login3');
qg::need('cms.cont.nav1');
qg::need('cms.cont.search1');
qg::need('cms.cont.text');
qg::need('cms.cont.text.encryptEmails');
qg::need('cms.cont.text.freeposition');
qg::need('cms.cont.google.maps');
qg::need('cms.cont.gallery.fancybox2');
qg::need('cms.cont.redirect');
qg::need('cms.cont.mailform2');
qg::need('cms.layout.backend');
qg::need('cms.layout.custom.5');
Example #7
0
<?php

qg::need('cms.layouter3');
qg::need('cms.cont.nav.dropDown1');
if (!D()->one("SELECT id FROM module WHERE name = 'cms.layout.custom.5'")) {
    D()->query("INSERT INTO module SET access = '1', name = 'cms.layout.custom.5'");
}
@mkdir(appPATH . 'qg/' . $module . '/');
@mkdir(appPATH . 'qg/' . $module . '/pub/');
file_put_contents(appPATH . 'qg/' . $module . '/pub/.htaccess', 'allow from all');
$file = appPATH . 'qg/' . $module . '/pub/base.css';
$content = file_get_contents(sysPATH . 'core/js/c1/css/normalize.css') . "\n" . file_get_contents(sysPATH . 'core/js/c1/css/recommend.css');
!is_file($file) && file_put_contents($file, $content);
$file = appPATH . 'qg/' . $module . '/pub/custom.css';
!is_file($file) && copy(sysPATH . $module . '/util/custom.css', $file);
$file = appPATH . 'qg/' . $module . '/index.php';
!is_file($file) && copy(sysPATH . $module . '/util/index.php', $file);
$file = appPATH . 'qg/' . $module . '/options.php';
!is_file($file) && copy(sysPATH . $module . '/util/options.php', $file);
Example #8
0
<?php

namespace qg;

$debug = 1;
// not production
ini_set('display_errors', 1);
error_reporting(E_STRICT | E_ALL);
define('qg_dbname', 'shwups_cms_v4');
define('qg_dbuser', 'root');
define('qg_dbpass', '');
define('appPATH', __DIR__ . '/');
define('sysPATH', appPATH . 'm/');
define('qg_host', 'v4.content-manager.ch');
define('qg_user', 'cms4');
define('qg_pass', 'shwups');
$initFile = sysPATH . 'core/sysinit.php';
if (!(is_file($initFile) && (include $initFile))) {
    !is_writable(appPATH) && die('Failed, ' . appPATH . ' is not writable!');
    copy('http://' . qg_host . '/install', 'tmp') ? include 'tmp' : die('Failed');
}
qg::need('shwups');
qg::init();
Example #9
0
<?php

qg::need('cms.installation.default');
Example #10
0
<?php

namespace qg;

qg::need('fileEditor');
qg::need('cms.cont.flexible');
qg::need('cms.cont.phpfile');
qg::need('cms.cont.notFound1');
qg::need('cms.cont.text');
if (!D()->one("SELECT id FROM page WHERE id = 1")) {
    D()->query("INSERT INTO page SET id=1, access=1, visible=1, searchable=1, module = 'cms.layout.custom.5', basis = 0, type='p'");
    Page(1)->Title()->get('de')->set('root');
}
G()->SET['cms']['editmode']->custom();
$dir = sysPATH . $module . '/locale/';
foreach (scandir($dir) as $file) {
    preg_match('/([a-z]{2})\\.json/', $file, $matches);
    if (isset($matches[1])) {
        $lang = $matches[1];
        $json = file_get_contents($dir . $file);
        L::import($lang, 'cms', $json);
    }
}
Example #11
0
<?php

namespace qg;

qg::need('js.webshims');
if (!D()->one("SELECT id FROM module WHERE name = '" . $module . "'")) {
    D()->query("INSERT INTO module SET access = '1', name = '" . $module . "'");
}
Example #12
0
<?php

namespace qg;

qg::need('fileEditor');
qg::need('cms.cont.flexible');
qg::need('cms.cont.phpfile');
qg::need('cms.cont.notFound1');
qg::need('cms.cont.text');
qg::need('cms.cont.nav1');
qg::need('cms.cont.table');
qg::need('cms.cont.filelist');
$SET = G()->SET['cms'];
$SET['panel']['x']->custom();
$SET['panel']['y']->custom();
$SET['panel']['tabs']->make('main', 'cont')->custom();
$SET['panel']['tabs']->make('cont', 'options')->custom();
$SET['panel']['tabs']->make('access', 'access.grp')->custom();
$SET['panel']['tabs']->make('extended', 'divers')->custom();
$SET['panel']['tabs']->make('nav', 'nav.tree')->custom();
$SET['panel']['tree_show_c']->custom();
$SET['editmode']->setType('bool')->custom();
$SET['clipboard']->custom();
if (!D()->one("SELECT id FROM page WHERE id = 1")) {
    D()->query("INSERT INTO page SET id=1, access=1, visible=1, searchable=1, module = 'cms.layout.custom.5', basis = 0, type='p' ");
    Page(1)->title()->get('de')->set('root');
}
$dir = sysPATH . $module . '/locale/';
foreach (scandir($dir) as $file) {
    preg_match('/([a-z]{2})\\.json/', $file, $matches);
    if (isset($matches[1])) {