Esempio n. 1
0
 /**
  * the component constructor
  *
  * @param $conf component data
  */
 public function __construct()
 {
     // runs the CConfig
     $com = new CConfig(DBControl::getPrefix(), dirname(__FILE__));
     // runs the DBControl
     if ($com->used()) {
         return;
     }
     $conf = $com->loadConfig();
     // initialize component
     $this->_conf = $conf;
     // initialize slim
     $this->_app = new \Slim\Slim();
     $this->_app->map('/:data+', array($this, 'getl'))->via('GET', 'POST', 'DELETE', 'PUT', 'INFO');
     // run Slim
     $this->_app->run();
 }
Esempio n. 2
0
 /**
  * the $_prefix setter
  *
  * @param string $value the new value for $_prefix
  */
 public static function setPrefix($value)
 {
     DBControl::$_prefix = $value;
 }
Esempio n. 3
0
<!Doctype html>
<html lang="ja">
<head>
  <meta charset = "utf-8">
  <title>アルバムアップローダ</title>
  <link rel="stylesheet" href="./css/Album.css">
  <link rel="icon" type="image/vnd.microsoft.icon" href="./BackDesign/AlbumUp.ico">
  <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
</head>
<body>
  <?php 
require_once './php/Common/DBConnect.php';
// DB接続用
require_once './php/Main/MainControl.php';
require_once './php/Main/MainView.php';
$DBControl = new DBControl();
// アルバム名一覧取得クラス(Model)
$DBView = new DBView();
$GetData = null;
// アルバム名の一覧を取得
$PullData = null;
// 取得したアルバム名を1つずつ繰り返し処理で行うときの受け
// DBエラーの場合は終了
if ($DBControl->getError() != null) {
    echo $DBControl->getError();
    require_once './php/Common/ExitCode.html';
    exit;
}
$DBControl->setResult($DBControl->getSetDB());
// 接続設定を取得し、Queryを投げる
$DBView->setSqlList($DBControl->getResult());