当前位置: 首页>>代码示例>>PHP>>正文


PHP Output::assign方法代码示例

本文整理汇总了PHP中Output::assign方法的典型用法代码示例。如果您正苦于以下问题:PHP Output::assign方法的具体用法?PHP Output::assign怎么用?PHP Output::assign使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Output的用法示例。


在下文中一共展示了Output::assign方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __call

 public function __call($name, $arguments)
 {
     try {
         $replaced = 0;
         $act = str_replace('action_', '', $name, $replaced);
         if ($replaced == 0) {
             throw new Exception("Нет такого метода {$name}");
         }
         $act = $this->getName() . "_" . $act;
         if (class_exists($act)) {
             $this->table = new $act();
         } else {
             $this->table = new sqltable($act);
         }
         if ($this->table == null) {
             throw new Exception("Не возможно создать такую таблицу {$act}");
         }
     } catch (Exception $e) {
         return $this->_404("[class=" . get_class($this) . "] : " . $e->getMessage());
     }
     if ($arguments[nooutput]) {
         return;
     }
     if ($this->table->run()) {
         if (Ajax::isAjaxRequest()) {
             return $this->table->getOutput();
         }
         $this->setOutputAssigns();
         Output::assign('menu', $this->getIndexMenu());
         Output::setContent($this->table->getOutput());
         return $this->fetch("body_base.tpl");
     }
 }
开发者ID:GGF,项目名称:baza4,代码行数:33,代码来源:secondlevel.class.php

示例2: action_index

    public function action_index() {
        $menuitems = "";
                $fkey = 0;
        foreach ($this->items as $item) {
            $text = $type = $noajax = $picture = $right = '';
            extract($item);
            //echo $type."_".$right;
            if ($this->parent) {
                $righttype = get_class($this->parent) . '_' . $type;
            } else {
                $righttype = $type;
            }
            if ($right and !Auth::getInstance()->getRights($righttype,'view'))
                continue;

            if ($type == "newline") {
                //$menuitems .= "</tr><tr>";
            } else {
                $uri = new UriConstructor();
                $uri->clear();
                Output::assign('hotkey', $fkey++<11?"Ctrl + f{$fkey }":"");
                Output::assign('text',$text);
                Output::assign('hyphertext',hypher::addhypher($text));
                Output::assign('ajax',($item[noajax]?'':"data-silent='{$this->parent->getMainTarget()}' legotarget='{$this->parent->getName()}'"));
                Output::assign('type',$type);
                Output::assign('url',$uri->set($this->parent->getName(),$type)->url());
                Output::assign('selected',($this->parent->getAction()==$type?" menu-item-sel":""));
                Output::assign('picture', (empty($picture) ? "" : "style='background-image: URL(\"/picture/{$picture}\");'"));
                $menuitems .= $this->fetch('menu_item.tpl');
            }
        }
        Output::assign('menuitems',$menuitems);
        return $this->fetch('menu.tpl');
    }
开发者ID:GGF,项目名称:baza4,代码行数:34,代码来源:menu.class.php

示例3: fetch

 /**
  * Отрисовать по шаблону
  * @param String $template
  * @param array $date
  * @return String
  */
 public function fetch($template, $data = false)
 {
     // найти шаблон, он может быть и у любого потомка этого класса, они же и друг от друга наследуют
     $dir = $this->dir;
     $class = get_class($this);
     while (!file_exists($dir . '/' . $template) && !file_exists($template)) {
         $class = get_parent_class($class);
         if ($class) {
             $ref = new ReflectionClass($class);
             if (!$ref->isAbstract()) {
                 $obj = new $class();
                 $dir = $obj->getDir();
             }
         } else {
             return '';
         }
     }
     // Если переданы данные, сделать обозначения
     if ($data !== false) {
         foreach ($data as $key => $value) {
             Output::assign($key, $value);
         }
     }
     $templatedir = Output::getTemplateCompiler()->getTemplateDir();
     Output::getTemplateCompiler()->setTemplateDir($dir);
     $content = Output::fetch($template);
     Output::getTemplateCompiler()->setTemplateDir($templatedir);
     return $content;
 }
开发者ID:GGF,项目名称:baza4,代码行数:35,代码来源:views.class.php

示例4: showrec

 public function showrec($rec)
 {
     $out = '';
     Output::assign('linkclass', 'path');
     Output::assign('sllink', "file://" . $rec[path]);
     Output::assign('type', 'Путь к блоку');
     Output::assign('slid', '');
     $out .= $this->fetch('link.tpl');
     Output::assign('type', 'СЛ-');
     Output::assign('sllink', $rec[sl][link]);
     Output::assign('slid', $rec[sl][id]);
     Output::assign('linkclass', 'filelink');
     $out .= $this->fetch('link.tpl');
     Output::assign('type', 'ТЗ-');
     Output::assign('sllink', $rec[tz][link]);
     Output::assign('slid', $rec[tz][id]);
     $out .= $this->fetch('link.tpl');
     $out .= "Письма:&nbsp;" . $rec[letter][link];
     // Добавить информацию о платах в блоке
     foreach ($rec[boards] as $value) {
         $files = $value[filelinks][link];
         $out .= $this->fetch('board.tpl', array('boardname' => $value["board_name"], 'filelinks' => $files));
     }
     Output::assign('dozaplink', $rec[dozaplink]);
     Output::assign('filelinks', $out);
     $out = $this->fetch('dozap.tpl');
     $out .= "<script>\$('form[name=dozap]').submit(function(){\n        \$().lego.load('lanch_nzap', \$(this).attr('action'),\$(this).serialize());\n        reload_table();\n        return false;\n    });</script>";
     $out .= $this->addComments($rec[id], 'lanch');
     return $out;
 }
开发者ID:GGF,项目名称:baza4,代码行数:30,代码来源:lanch_zap_view.class.php

示例5: action_help

 public function action_help()
 {
     if (Ajax::isAjaxRequest()) {
         return $this->fetch("help.tpl");
     } else {
         CTitle::addSection('Помощь');
         $this->setOutputAssigns();
         Output::assign('menu', $this->getIndexMenu());
         Output::setContent($this->fetch("help.tpl"));
         return $this->fetch("body_base.tpl");
     }
 }
开发者ID:GGF,项目名称:baza4,代码行数:12,代码来源:firstlevel.class.php

示例6: action_blocks

 public function action_blocks()
 {
     $_SESSION[customer_id] = '';
     $this->table = new orders_blocks();
     if ($this->table->run()) {
         if (Ajax::isAjaxRequest()) {
             return $this->table->getOutput();
         }
         $this->setOutputAssigns();
         Output::assign('menu', $this->getIndexMenu());
         Output::setContent($this->table->getOutput());
         return $this->fetch("body_base.tpl");
     }
 }
开发者ID:GGF,项目名称:baza4,代码行数:14,代码来源:lanch.class.php

示例7: __call

 public function __call($name, $arguments)
 {
     $arguments[nooutput] = true;
     parent::__call($name, $arguments);
     $this->need_yaer_arc = $this->table->model->getNeedArc();
     //console::getInstance()->out("lss=".Auth::$lss." ".print_r($_SESSION,true));
     if ($this->table->run()) {
         if (Ajax::isAjaxRequest()) {
             return $this->table->getOutput();
         }
         $this->setOutputAssigns();
         Output::assign('menu', $this->getIndexMenu());
         Output::setContent($this->table->getOutput());
         return $this->fetch("body_base.tpl");
     }
 }
开发者ID:GGF,项目名称:baza4,代码行数:16,代码来源:storage.class.php

示例8: action_index

	public function action_index($show=false) {
		Output::assign('linkshowbash',$this->actUri('showbash')->url());
		Output::assign('linkhidebash',$this->actUri('hidebash')->url());
		Output::assign('linkplusbash',$this->actUri('plusbash')->url());
		Output::assign('linkminusbash',$this->actUri('minusbash')->url());

                if ($_SESSION[bashcite]) {
                    $ret = $this->_getcite();
                    Output::assign('bashcite',$ret);
                    $ret = $this->fetch("bashcite.tpl");
                } else {
                    $ret = $this->fetch("bashcitehide.tpl");
                }
                if (Ajax::isAjaxRequest())
                    return $ret;
                else
                    return "<div id='bashcite'>{$ret}</div>";
	}
开发者ID:GGF,项目名称:baza4,代码行数:18,代码来源:bashcite.class.php

示例9: getRasschet

 public function getRasschet($rec)
 {
     extract($rec);
     $filelink = fileserver::createdironserver($filename);
     $excel = file_get_contents($this->getDir() . "/" . $template);
     if (fileserver::savefile($filelink . ".txt", $rec)) {
         // сохранить
         if (fileserver::savefile($filelink, $excel)) {
             Output::assign('rlink', fileserver::sharefilelink($filelink));
             $out = $this->fetch('rlink.tpl');
             $res[filename] = $filename;
             $res[result] = true;
         } else {
             $out = "Не удалось записать файл xls";
             $res[result] = false;
         }
     } else {
         $out = "Не удалось создать файл txt";
         $res[result] = false;
     }
     $res[out] = $out;
     return $res;
 }
开发者ID:GGF,项目名称:baza4,代码行数:23,代码来源:orders_posintz_view.class.php

示例10: action_userwin

 /**
  * Действие по клику по окну "показать пользователей"
  * @return string теккст окна с данными
  */
 public function action_userwin() {
     Output::assign('users', $this->m->userwin());
     return $this->fetch('adminhere.tpl');
 }
开发者ID:GGF,项目名称:baza4,代码行数:8,代码来源:adminhere.class.php

示例11: run

 /**
  * Оснновной поток исполнения
  * @return this сам текущий лего, для сквозных вызовов
  */
 public function run()
 {
     $this->beforeRun();
     Output::assign("lego", $this);
     $act = $this->getAction();
     $method_name = "action_{$act}";
     try {
         $this->current_action = $act;
         $this->output = call_user_func_array(array($this, $method_name), $this->getActionParams());
     } catch (Exception $e) {
         $this->output = $this->_404("wrong action ({$method_name}) [class=" . get_class($this) . "]" . $e->getMessage());
     }
     Output::assign("lego", $this->runner());
     return $this->afterRun();
 }
开发者ID:GGF,项目名称:baza4,代码行数:19,代码来源:lego_abstract.class.php

示例12: showcoment

 public function showcoment($rec)
 {
     Output::assignAll($rec);
     Output::assign('deleteurl', $this->owner->actUri('deletecomment', $rec["id"])->ajaxurl($this->owner->getName()));
     $out = $this->fetch(__DIR__ . '/coment.tpl');
     return $out;
 }
开发者ID:GGF,项目名称:baza4,代码行数:7,代码来源:sqltable_view.class.php

示例13: action_index

	public function action_index() {
		$m = new birthdays_model();
		Output::assign('birthdays',$m->getToday());
		return $this->fetch("birthdays.tpl");
	}
开发者ID:GGF,项目名称:baza4,代码行数:5,代码来源:birthdays.class.php

示例14: showmplink

 public function showmplink($rec)
 {
     $filename = "z:\\Заказчики\\{$rec[customer]}\\{$rec[blockname]}\\Мастерплаты\\МП-{$rec[date]}-{$rec[mp_id]}.xls";
     $filename = fileserver::createdironserver($filename);
     $excel = file_get_contents($this->getDir() . "/mp.xls");
     if (fileserver::savefile($filename, $excel)) {
         $mp["_date_"] = date("d.m.Y");
         $mp["_number_"] = sprintf("%08d\n", $rec[mp_id]);
         if (fileserver::savefile($filename . ".txt", $mp)) {
             Output::assign('mplink', fileserver::sharefilelink($filename));
             Output::assign('mpid', $rec[mp_id]);
             $out = $this->fetch('mplink.tpl');
         } else {
             $out = "Не удалось создать файл txt";
         }
     } else {
         $out = "Не удалось создать файл xls" . print_r($rec, true);
     }
     return $out;
 }
开发者ID:GGF,项目名称:baza4,代码行数:20,代码来源:lanch_nzap_view.class.php


注:本文中的Output::assign方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。