function getImages() { $path = $this->customPath() . 'img/'; !is_dir($path) && mkdir($path); $url = path2uri($path); $ret = array(); foreach (scanDir($path) as $f) { if (!is_file($path . $f)) { continue; } $ret[] = $url . $f; } return $ret; }
} $text = is_file($path . 'description.txt') ? file_get_contents($path . 'description.txt') : ''; $img = is_file($path . '/preview.png') ? 'background-image:url(' . appURL . 'view/module/' . $name . '/preview.png);' : ''; ?> <div style="cursor:pointer" name="<?php echo $name; ?> " class="cmsListItem <?php echo $Cont->vs['module'] === $name ? 'active' : ''; ?> "> <?php if (is_file($path . 'pub/64.png')) { ?> <img src="<?php echo path2uri($path); ?> pub/64.png" style="float:left; display:block" alt=""> <?php } else { ?> <img src="<?php echo sysURL; ?> cms/pub/css/pix/layout_default_64.png" style="float:left; display:block" alt=""> <?php } ?> <div style="margin-left:69px; display:block;"> <h4><?php echo str_replace('cms.cont.', '', str_replace('cms.layout.', '', $name));
<div id=logo2></div> </div> <div id=container> <ul id=nav> <?php foreach (Page(G()->SET['cms']['backend']->v)->Childs('navi') as $C) { ?> <li class="<?php echo $Page->in($C) ? 'active' : ''; ?> "> <a class=item href="<?php echo $C->url(); ?> " style="background-image:url(<?php echo path2uri($C->Cont(1)->modPath); ?> pub/16.png)"> <?php echo $C->title(); ?> </a> <?php if ($Page->in($C)) { ?> <?php foreach ($C->Childs('navi') as $SC) { ?> <ul> <li><a class="item <?php echo $Page->in($SC) ? 'active' : '';
foreach ($files as $row) { ?> <a target=_blank style=" display:inline-block; background-position:50%; background-size:cover; <?php /*=image::able($File->path)?'background-image:url('.$File->url().'/w-200/img.jpg)':'' */ ?> ; margin:3px; box-shadow:0 0 3px black; " href="<?php echo path2uri($row['path']); ?> "> <span style="display:block; margin-top:40px; padding:8px; background:rgba(255,255,255,0.95);"> <?php echo $row['name']; ?> </span> </a> <?php } ?> </div> </div> <?php }
function __construct() { $this->randString = randString(); $this->path = appPATH . 'cache/tmp/' . $this->randString; $this->url = path2uri(appPATH . 'cache/tmp/') . $this->randString; }
static function _getHeaderCSSFilesGroup($files, $compress) { //http://prefixr.com/ $md5 = md5(implode($files)); $cFile = appPATH . 'cache/' . $md5 . '.css'; $cUri = appURL . 'cache/' . $md5 . '.css'; if (debug || !$compress || !self::$compressCss) { $ret = ''; foreach ($files as $file) { $ret .= '<link rel=stylesheet href="' . $file . '?' . filemtime(uri2path($file)) . '">' . "\n"; } return $ret; } if (!is_file($cFile)) { $str = ''; foreach ($files as $f) { $f = uri2path($f); $base = path2uri(dirname($f)) . '/'; $tStr = file_get_contents($f); $tStr = self::_modifyCssUrls($tStr, $base); $str .= "\n" . self::_compressCss($tStr); } file_put_contents($cFile, $str); } return '<link rel=stylesheet href="' . $cUri . '?' . filemtime($cFile) . '">' . "\n"; }
<?php $Layouter = new cmsLayouter3($Cont->vs['module']); $Layouter->init(); $LPage = $Layouter->getLayoutPage(); if (is_file($Layouter->customPath() . 'main.js')) { html::addJsFile(preg_replace('/\\/$/', '', path2uri($Layouter->customPath() . 'main.js'))); } include $Layouter->customTemplatePath();
<?php namespace qg; require_once sysPATH . 'core/lib/path.php'; !defined('sysURL') && define('sysURL', path2uri(sysPATH)); !defined('appURL') && define('appURL', path2uri(appPATH)); error_reporting(E_STRICT | E_ALL); session_name('qg' . substr(md5(appPATH), 0, 4)); session_set_cookie_params(0, appURL, '', false, true); session_start(); if (!isset($_SESSION['qg'])) { $_SESSION['qg'] = array(); } if (!isset($_SESSION['qg']['debug'])) { $_SESSION['qg']['debug'] = false; } if (isset($_SESSION['liveUser']) && isset($_GET['debugmode'])) { $_SESSION['qg']['debug'] = (int) $_GET['debugmode']; } define('debug', isset($debug) && $debug || $_SESSION['qg']['debug']); ini_set('display_errors', debug); set_include_path(sysPATH); // zend require_once sysPATH . 'core/lib/cache.php'; require_once sysPATH . 'core/lib/qg.class.php'; require_once sysPATH . 'core/lib/db.class.php'; require_once sysPATH . 'core/lib/dbTable.class.php'; require_once sysPATH . 'core/lib/dbField.class.php'; require_once sysPATH . 'core/lib/dbEntry.class.php'; require_once sysPATH . 'core/lib/init.php';