示例#1
0
文件: mark.php 项目: s-kalaus/ekernel
<?php

/**
 * ekernel
 *
 * Copyright (c) 2012 Magwai Ltd. <*****@*****.**>, http://magwai.ru
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 */
application::get_instance()->controller->layout = null;
$m = new model_cnotify();
$m->set_control_read($this->control()->config->post->id);
echo $this->view->json(array());
示例#2
0
文件: read.php 项目: s-kalaus/ekernel
<?php

/**
 * ekernel
 *
 * Copyright (c) 2012 Magwai Ltd. <*****@*****.**>, http://magwai.ru
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 */
application::get_instance()->controller->layout = null;
$m = new model_cnotify();
echo $this->view->json($m->fetch_control_no_read());
示例#3
0
 public function render()
 {
     // Записываем уведомления
     if (count($this->config->notify)) {
         $mn = new model_cnotify();
         foreach ($this->config->notify as $el) {
             $mn->insert($el->to_array());
         }
     }
     // Если заполнен текущий возвратный контроллер, то делаем редирект
     if (count($this->config->request->current)) {
         $p = clone $this->config->param;
         unset($p['id']);
         unset($p['ids']);
         //unset($p['oid']);
         unset($p['prev']);
         $p->set($this->config->request->current->param);
         $p['ccontroller'] = $this->config->request->current->controller;
         $p['caction'] = $this->config->request->current->action;
         header('Location: ' . $this->view->url($p, 'control'));
         application::get_instance()->controller->layout = null;
     }
     // Вызываем коллбэк для финальных настроек из вьюшки перед рендером лейаута
     if ($this->config->callback->prelayout) {
         $f = $this->config->callback->prelayout;
         $f($this);
     }
 }
示例#4
0
<?php

$model_notify = new model_cnotify();
$notify = $model_notify->fetch_control_no_read_count();
$this->messify->prepend('js', '/' . DIR_KERNEL . '/ctl/noty/themes/default.js')->prepend('js', '/' . DIR_KERNEL . '/ctl/noty/layouts/top.js')->prepend('js', '/' . DIR_KERNEL . '/ctl/noty/jquery.noty.js')->prepend('js', '/' . DIR_KERNEL . '/ctl/fancybox2/jquery.fancybox.js')->prepend('js', '/' . DIR_KERNEL . '/ctl/control/js/plugins/ui/jquery.collapsible.min.js')->prepend('js', '/' . DIR_KERNEL . '/ctl/uniform/jquery.uniform.js')->prepend('js', '/' . DIR_KERNEL . '/js/jquery/jquery-migrate.js')->prepend('js', '/' . DIR_KERNEL . '/js/jquery/jquery.js')->set('js', 1000, '/' . DIR_KERNEL . '/ctl/control/js/custom.js')->set_inline('js', 1200, '$(function() { c.init(' . json_encode(array('url' => $this->url(array('ccontroller' => 'cindex', 'caction' => 'index'), 'control'), 'url_current' => str_replace('/replace/replace', '', $this->url(array('replace' => 'replace'), 'control')))) . ') });')->prepend('css', '/' . DIR_KERNEL . '/ctl/fancybox2/jquery.fancybox.css')->prepend('css', '/' . DIR_KERNEL . '/ctl/control/css/ui_custom.css')->prepend('css', '/' . DIR_KERNEL . '/ctl/control/css/dataTable.css')->prepend('css', '/' . DIR_KERNEL . '/ctl/control/css/reset.css')->set('css', 1300, '/' . DIR_KERNEL . '/ctl/control/css/main.css')->append('css', 'http://fonts.googleapis.com/css?family=Cuprum');
$this->meta->set('http-equiv', 'Content-Type', 'text/html; charset=utf-8')->set('name', 'viewport', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0');
$this->title('CP');
$bread = (string) $this->navigation()->bread();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<?php 
echo (string) $this->meta();
?>
		<?php 
echo (string) $this->title();
?>
		<?php 
echo $this->messify->render('css');
?>
		<link href="/<?php 
echo DIR_KERNEL;
?>
/ctl/control/favicon.ico" rel="icon" type="image/x-icon" />
	</head>
	<body>
		<!-- Top navigation bar -->
		<div id="topNav">
			<div class="fixed">
				<div class="wrapper">