hjkhghopjkertteerterterterertertrtoirh
bnmbertsurhetertertertertertertertpdf'tdfg
/
srv
/
www
/
virtual
/
dev1.wccweb.jp.dac4.biz
/
web
/
biva.webapp
/
site
/
class
/
Upload FileeE
HOME
<?php /** * Biva class * * @author Mitsutoshi Nakamura <mitsutoshi.nakamura.jp@gmail.com> */ require(BV_APPROOT . 'core/class/Object.class.php'); class Biva extends Object { public $master; public $uploadPath; // @todo.bv $uploadPathをFileクラスに移動すべきか検討 public $MAX_FILE_SIZE; // @todo.bv $MAX_FILE_SIZEはFileクラスに移動すべきか検討 protected $prettyUrls = true; /** * コンストラクタ */ public function __construct() { parent::__construct(); $this->load('Db.mysql'); $this->uploadPath = BV_APPROOT . 'site/data/upload/'; $this->MAX_FILE_SIZE = 1024 * 1024 * 32; } public function dispatch() { // ページに対応しているクラスの読込み $file = BV_APPROOT . 'site/app/' . ($this->route ? $this->route . '/' : null) . $this->controller . '.php'; if (!is_file($file)) { $this->error('リクエストされたページは削除されたか、存在しない為に表示出来ません。<br />' . bvRequestUrl()); } require($file); $this->ap = new $this->controller(); // リクエストアクションを実行 $method = 'page' . ucfirst($this->action); if (!method_exists($this->ap, $method)) { $this->error('リクエストされたページは削除されたか、存在しない為に表示出来ません。<br />' . bvRequestUrl()); } $this->ap->$method(); } /** * マスターデータの取得 * * @todo.bv loadMaster()は必要か?(どこからも呼ばれてない・・・) */ public function loadMaster() { $path = BV_APPROOT . 'site/config/master.env' . BV_RUN_ENV . '.ini'; if (!is_file($path)) { $this->error('[Error] master.ini file not found'); } $data = parse_ini_file($path, true); mb_convert_variables('UTF-8', 'SJIS-win', $data); //bvPr($data); exit; foreach ($data as $k => $v) { $key = explode('::', $k); $this->master[$key[0]][$key[1]] = $v; } $this->tplvar['master'] = $this->master; //bvPr($this->master); exit; } public function view($page = null) { $src = $this->controller . '/' . ($page ? $page : $this->action); $route = $this->route ? $this->route . '/' : null; // テンプレートの設定 $this->tplvar['page'] = $route . $src . '.html'; $file = $route . '_base.html'; // CSSの設定 $cssPath = BV_DOCROOT . 'biva.webroot/material/css/' . $this->Smarty->tplset . '/' . $route . $src . '.css'; if (is_file($cssPath)) { $this->setCss($src); } $this->tplvar['css'] = $this->css; // JSの設定 $jsPath = BV_DOCROOT . 'biva.webroot/material/js/' . $this->Smarty->tplset . '/' . $route . $src . '.js'; if (is_file($jsPath)) { $this->setJs($src); } $this->tplvar['js'] = $this->js; // 出力 $this->Smarty->view($file); } }