Example #1
0
 public function __construct()
 {
     parent::__construct();
     $this->topLevel = 0;
     $this->firstTile = '清空料号仓位';
     $this->topTitle = '清空料号仓位';
 }
Example #2
0
 public function display($tpl = null)
 {
     $this->setError(array("error_field" => ""));
     $this->smarty->assign("sesn", session_name());
     $this->smarty->assign("sesi", session_id());
     parent::display($tpl);
 }
Example #3
0
 public function __construct()
 {
     parent::__construct();
     $this->topLevel = 5;
     $this->firTitle = '仓库调拨';
     $this->assign_status = C('assign_status');
 }
Example #4
0
 public function display($tpl = null)
 {
     $this->assignMenu();
     $this->smarty->assign("user_data", $_SESSION["USER_DATA"]);
     $this->smarty->assign("css", "user.css");
     $this->smarty->assign("auth", $_SESSION["USER_DATA"]["auth"]);
     parent::display($tpl);
 }
Example #5
0
 private function _createFromReflection($projectName)
 {
     $this->_name = $projectName;
     $this->_dir = \Fstab::instance()->projectDirectory($projectName);
     $controllerBasePath = rtrim(\Path::instance()->evaluate(":{$this->_name}.apps.controller"), "/\\");
     foreach (glob($controllerBasePath . "/*.php") as $filePath) {
         $fileName = pathinfo($filePath, PATHINFO_FILENAME);
         $controllerClassName = $fileName . 'Controller';
         if (!class_exists($controllerClassName)) {
             require $filePath;
         }
         if (class_exists($controllerClassName)) {
             $reflection = new \ReflectionClass($controllerClassName);
             $this->_controllers[] = AppController::create($this, $reflection);
         }
     }
     $spiritBasePath = rtrim(\Path::instance()->evaluate(":{$this->_name}.spiritPath"), "/\\");
     foreach (glob($spiritBasePath . "/*", GLOB_ONLYDIR) as $dirName) {
         $spiritName = pathinfo($dirName, PATHINFO_FILENAME);
         $spiritFileName = rtrim($dirName, "/\\") . '/abstractor.php';
         $spiritAbstractorClassName = $spiritName . 'Abstractor';
         if (!class_exists($spiritAbstractorClassName) && file_exists($spiritFileName)) {
             require $spiritFileName;
         }
         if (class_exists($spiritAbstractorClassName)) {
             $reflection = new \ReflectionClass($spiritAbstractorClassName);
             $this->_spirits[] = SpiritController::create($this, $reflection);
         }
     }
     $commonViewPath = rtrim(\Path::instance()->evaluate(":{$this->_name}.common.@view.php"), "/\\");
     $commonLayoutPath = rtrim(\Path::instance()->evaluate(":{$this->_name}.common.layout.@layout.php"), "/\\");
     $commonParamsPath = rtrim(\Path::instance()->evaluate(":{$this->_name}.common.layout.@params.php"), "/\\");
     if (file_exists($commonViewPath)) {
         $this->_view = CommonView::create($commonViewPath);
     }
     if (file_exists($commonLayoutPath)) {
         $this->_layout = Layout::create($commonLayoutPath);
     }
     if (file_exists($commonParamsPath)) {
         $this->_params = Params::create($commonParamsPath);
     }
 }
Example #6
0
 public function __construct()
 {
     parent::__construct();
 }
Example #7
0
 public function display($tpl = null)
 {
     $this->smarty->assign("css", "account.css");
     parent::display($tpl);
 }
    function show_gallery($restaurant)
    {
        ?>
        <h3 class="entry-title">Imagenes de <?php 
        echo $restaurant->name;
        ?>
</h3>
        <?php 
        if (count($restaurant->images) > 0) {
            $commonView = new CommonView();
            $commonView->show_gallery($restaurant->images);
        }
    }
    function show_gallery($restaurant)
    {
        ?>
        <h2>Imagenes de <?php 
        echo $restaurant->name;
        ?>
</h2>
        <?php 
        if (count($restaurant->images) > 0) {
            $commonView = new CommonView();
            $commonView->show_gallery($restaurant->images);
        } else {
            ?>
            <div class="alert alert-danger" role="alert">
                <strong>Oops!</strong> No tenemos fotos de <?php 
            echo $restaurant->name;
            ?>
. Ayudanos si tienes.
                <a href="<?php 
            echo get_permalink(MECATO_PLUGIN_PAGE_EDIT_REST) . "?id=" . $restaurant->id . '#images';
            ?>
" class="btn btn-xs btn-danger">Subir fotos</a>
            </div>
            <?php 
        }
    }
Example #10
0
 public function display($tpl = null)
 {
     parent::display($tpl);
 }
Example #11
0
function error()
{
    $view = new CommonView(null);
    $view->error();
}