Exemplo n.º 1
0
 public function generate()
 {
     $data = array_merge($this->_data_def, $this->_data);
     $data['content'] = bu::view($this->_content_view, $data);
     $data['menu'] = bu::view('menu');
     echo bu::view($this->_layout_view, $data);
 }
Exemplo n.º 2
0
 public static function DoIt()
 {
     self::prepareHttpString();
     ob_start();
     try {
         $url = new BuUrl2(self::$httpString);
         bu::setBuUrlInstance($url);
         self::runController($url);
     } catch (Exception $e) {
         ob_end_clean();
         $msg = 'Ошибка на сайте';
         if (bu::config('rc/debug')) {
             $msg = get_class($e) . ': ' . $e->getMessage();
         }
         $content = $msg;
         if (bu::config('rc/debug')) {
             $content .= sprintf('<br><b>%s</b><br>', get_class($e));
             $content .= "<pre>";
             foreach (array_reverse($e->getTrace()) as $v) {
                 if (isset($v['line'])) {
                     $content .= $v['line'] . ' ' . $v['file'] . "\n";
                 }
             }
             $content .= "</pre>";
         }
         echo bu::view('layout/panic', array('content' => $content));
     }
 }
Exemplo n.º 3
0
 public static function flash($key, $value = NULL)
 {
     if (is_null($value)) {
         $flashInfo = bu::session('flash');
         if (isset($flashInfo[$key])) {
             return $flashInfo[$key]['text'];
         }
     } else {
         $flashInfo = bu::session('flash');
         if ($key == 'error' and is_array($value)) {
             $text = bu::view('errors', array('errors' => $value));
         } else {
             $text = $value;
         }
         $flashInfo[$key] = array('text' => $text, 'valid' => true);
         bu::session('flash', $flashInfo);
     }
 }
Exemplo n.º 4
0
<?php

$title = sf('%s %s', bu::lang('framework/name'), ' смотрит на тебя =_+!');
$layout->title = $title;
$layout->content = bu::view('index_content');
Exemplo n.º 5
0
<?php

echo bu::view('path_block');
?>
<?

if ($data->getInfo()): ?>
<div class='alert alert-info'>
  <?php 
echo $data->getInfo();
?>
</div>
<?endif?>

<?

if ($data->categories()): ?>
<div id="subdirs">
	 <?
$sub_dirs = $data->categories();

if (count($sub_dirs) > 20) {
  $groups = group_by(function ($k, $v) {return strtolower(first_letter($v->name()));},
    $data->categories());
  ksort($groups);
  $columns = group_by_column($groups, 3);
  echo '<table><tr>';

  foreach ($columns as $groups) {
    echo "<td width='230px' style='vertical-align: top'>";
Exemplo n.º 6
0
<?php

require 'base.php';
$content = bu::view('preview', array('name' => $_GET['img']));
echo bu::view('index', array('title' => bu::lang('linksTitle'), 'content' => $content));
Exemplo n.º 7
0
function exception_handler($exception)
{
    ob_end_clean();
    echo bu::view('error', array('message' => $exception->getMessage()));
}
Exemplo n.º 8
0
 public static function log($name = false, $group = false, $data = false)
 {
     self::$_log .= bu::view('debug_bar/log_message', array('time' => time(), 'name' => $name, 'group' => $group, 'data' => $data), true);
 }
Exemplo n.º 9
0
<?php

echo bu::view('flash_block', array('error' => bu::flash('error'), 'success' => bu::flash('success'), 'notice' => bu::flash('notice')));
Exemplo n.º 10
0
<?php

$layout->title = 'Благодарности';
$layout->content = bu::view('thanks_to');
Exemplo n.º 11
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php 
echo bu::view('header/charset');
?>
    <?php 
echo bu::view('header/meta', array('title' => $title, 'keywords' => $keywords, 'description' => $description));
?>
    <?php 
echo bu::view('header/blueprint');
?>
    <style>
    #header{
        height: 30px;
    }
    #footer{
        text-align: center;
    }
    </style>
</head>
<body>
<div class="container">
    <div class='span-22 prepend-1' id='header'> 
        <div class='span-4 prepend-19 last' id='header'> 
        </div> 
    </div> 

    <div class='span-22 prepend-1'> 
	<?php 
echo bu::act('flash_block');
Exemplo n.º 12
0
    <link href="/public/css/style.css" rel="stylesheet" type="text/css" media="screen, projection" />
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    //http://www.webreference.com/js/tips/991125.html
    function highlight(field) {
      field.focus();
      field.select();
    }
    // -->
    </SCRIPT>
</head>
<body>
<div id='content'>
    <div id='wrapper'>
        <h1><?php 
echo bu::config('rc/siteName');
?>
</h1>
        <?php 
echo $content;
?>
    </div>

</div>
    <a href='http://bubujka.ru'><img id='bu_logo' src='/public/bu_logo.png'></a>
    <?php 
echo bu::view('counter');
?>
</body>
</html>
Exemplo n.º 13
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php 
echo bu::view('header/charset');
?>
</head>
<style>
h1{
    font-size: 20px;
    font-family: georgia;
    font-style: italic;
    font-weight: bold;
    background: black;
    color: white;
    padding: 7px 10px;;
    display: inline-block;

}
.container{
    width: 600px;
}
h2{
    padding: 7px 10px;
}
p{
    padding: 7px 10px;
    font-family: verdana;
}
textarea{
    padding: 7px 10px;