Пример #1
0
<?php
include_once 'libs/pkw.function.php';
$m = new ACTIONS();
$url = $m->urlPath();
$baseUrl = $m->baseUrlAjax();

$_SESSION['acessLevel'] = 1;
?>


<!-- Sidebar -->
<nav class="navbar navbar-inverse navbar-fixed-top" id="sidebar-wrapper" role="navigation">
    <ul class="nav sidebar-nav">
        <li class="sidebar-brand">
            <a href="#">
                MENU
            </a>
        </li>
        <?php foreach($m->makeMenu() as $k){ ?>
            <li>
                <a href="<?= $baseUrl.$k['url'] ?>" class="title"><?=$k['title']?></a>
            <?php foreach($k['submenu'] as $v){?>
                <li>
                    <a href="<?php if (!empty($v['url'])) echo $baseUrl.$v['url'] ?> " data-toggle="offcanvas"><?=$v['title']?></a>
                </li>
            <?}?>

            </li>
        <?php } ?>
    </ul>
</nav>
Пример #2
0
<?php

include_once 'libs/pkw.function.php';
$action = new ACTIONS();
$url = $action->urlModels();
$urlAjax = $action->baseUrlAjax();
$name = $_SESSION['user']['name'];
?>

<!-- div de notificações -->
<div class="alert alert-success alert-dismissable notification">
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
    <strong></strong>
</div>
<!-- /div de notificações -->

<!--top menu-->
<div class="row">
    <div class="col-md-12">
        <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation" style="z-index: 10">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand nopadding" href="<?php 
echo $action->adminUrl();
?>
Пример #3
0
    function event_InitSkinParse($data)
    {
        global $blogid, $CONF, $manager;
        $feedurl = array('rss1.xml', 'index.rdf', 'rss2.xml', 'atom.xml');
        $reqPaths = explode('/', serverVar('PATH_INFO'));
        $reqPath = end($reqPaths);
        $feeds = in_array($reqPath, $feedurl, true);
        if (!$feeds) {
            return;
        } else {
            $p_info = trim(serverVar('PATH_INFO'), '/');
            $path_arr = explode('/', $p_info);
            switch (end($path_arr)) {
                case 'rss1.xml':
                case 'index.rdf':
                    $skinName = 'feeds/rss10';
                    break;
                case 'rss2.xml':
                    $skinName = 'feeds/rss20';
                    break;
                case 'atom.xml':
                    $skinName = 'feeds/atom';
                    break;
            }
            if (SKIN::exists($skinName)) {
                $skin =& SKIN::createFromName($skinName);
                $data['skin']->SKIN($skin->getID());
                $skinData =& $data['skin'];
                $pageType = $data['type'];
                if (!$CONF['DisableSite']) {
                    ob_start();
                    $skinID = $skinData->id;
                    $contents = $this->getSkinContent($pageType, $skinID);
                    $actions = SKIN::getAllowedActionsForType($pageType);
                    $dataArray = array('skin' => &$skinData, 'type' => $pageType, 'contents' => &$contents);
                    $manager->notify('PreSkinParse', $dataArray);
                    PARSER::setProperty('IncludeMode', SKIN::getIncludeMode());
                    PARSER::setProperty('IncludePrefix', SKIN::getIncludePrefix());
                    $handler = new ACTIONS($pageType, $skinData);
                    $parser = new PARSER($actions, $handler);
                    $handler->setParser($parser);
                    $handler->setSkin($skinData);
                    $parser->parse($contents);
                    $dataArray = array('skin' => &$skinData, 'type' => $pageType);
                    $manager->notify('PostSkinParse', $dataArray);
                    $feed = ob_get_contents();
                    ob_end_clean();
                    $eTag = '"' . md5($feed) . '"';
                    header('Etag: ' . $eTag);
                    if ($eTag == serverVar('HTTP_IF_NONE_MATCH')) {
                        header('HTTP/1.0 304 Not Modified');
                        header('Content-Length: 0');
                    } else {
                        if (extension_loaded('mbstring')) {
                            $feed = mb_convert_encoding($feed, 'UTF-8', _CHARSET);
                            $charset = 'UTF-8';
                        } else {
                            $charset = _CHARSET;
                        }
                        header('Content-Type: application/xml; charset=' . $charset);
                        header('Generator: Nucleus CMS ' . $nucleus['version']);
                        // dump feed
                        echo $feed;
                    }
                } else {
                    echo '<' . '?xml version="1.0" encoding="ISO-8859-1"?' . '>';
                    ?>
<rss version="2.0">
  <channel>
    <title><?php 
                    echo $this->hsc($CONF['SiteName'], ENT_QUOTES);
                    ?>
</title>
    <link><?php 
                    echo $this->hsc($CONF['IndexURL'], ENT_QUOTES);
                    ?>
</link>
    <description></description>
    <docs>http://backend.userland.com/rss</docs>
  </channel>
</rss>	
<?php 
                }
            }
            exit;
        }
    }
    function doSkinVar($skinType, $param = '')
    {
        $this->sanitizeRequestUri();
        //	sucoshi+yamabuki
        $search = array('?page=0', '?action=logout');
        $zerouri = str_replace($search, '', $_SERVER['REQUEST_URI']);
        $url = 'http://' . $_SERVER["HTTP_HOST"] . $zerouri;
        //		$url = 'http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
        $iteration = intrequestvar('iteration') + 1;
        $formdata = <<<LOGINFORM
\t<form method="post" action="{$url}">
\t  <div class="loginform">
\t\t<input type="hidden" name="action" value="login" />
\t\t<input type="hidden" name="iteration" value="{$iteration}" />
\t\t<label for="nucleus_lf_name" accesskey="l"><%text(_LOGINFORM_NAME)%></label>: <input id="nucleus_lf_name" name="login" size="10" value="" class="formfield" />
\t\t<br />
\t\t<label for="nucleus_lf_pwd"><%text(_LOGINFORM_PWD)%></label>: <input id="nucleus_lf_pwd" name="password" size="10" type="password" value="" class="formfield" />
\t\t<br />
\t\t<input type="submit" value="<%text(_LOGIN)%>" class="formbutton" />
\t\t<br />
\t\t<input type="checkbox" value="1" name="shared" id="nucleus_lf_shared" /><label for="nucleus_lf_shared"><%text(_LOGINFORM_SHARED)%></label>
\t  </div>
\t</form>
LOGINFORM;
        $actions = new ACTIONS('index');
        $parser = new PARSER(array('text'), $actions);
        $actions->setParser($parser);
        $parser->parse($formdata);
    }