Ejemplo n.º 1
0
<?php

/**
 * define the site base path
 * this is the name of the folder where this index.php file is
 * i.e.
 * if index.php is in the document root, (i.e. http://www.example.com/index.php)
 * then SITE_ROOT should be an empty string ''
 * if however index.php is in a sub-folder of document root (i.e. http://www.example.com/some/path/index.php
 * then SITE_ROOT should be 'some/path' (Note: no leading or trailing slashes)
 */
define('SITE_ROOT', str_replace($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR, '', dirname(__FILE__)));
/**
 * define application directory path
 */
define('APPPATH', realpath('../application') . DIRECTORY_SEPARATOR);
/**
 * define lib directory path
 */
define('LIBPATH', realpath('../library') . DIRECTORY_SEPARATOR);
/**
 * load uno
 */
require_once '../uno.php';
/**
 * run it, passing the array config as parameter
 */
Uno::run(require_once APPPATH . 'config.php');
Ejemplo n.º 2
0
 /**
  * find and return the template file path
  *
  * @param string $template The template file
  * @return string
  */
 protected function template($template)
 {
     $ext = pathinfo($template, PATHINFO_EXTENSION);
     if (Uno::dispatcher()->module()) {
         $filepath = APPPATH . 'Module/' . Uno::dispatcher()->module() . '/View/' . $template . (empty($ext) ? $this->config['ext'] : $ext);
         if (is_file($filepath)) {
             return $filepath;
         }
     }
     return APPPATH . 'View/' . $template . (empty($ext) ? $this->config['ext'] : $ext);
 }
Ejemplo n.º 3
0
<?php

//  更新:: 2016_10_31
//  容量:: 34.2 MB /100MB
session_start();
//// SESSIONを削除
//$_SESSION = array();
//session_destroy();
ini_set('display_errors', true);
// PDO接続
include_once "./inc/config.php";
include_once "./inc/pdoClass.php";
$DB = new DB();
include_once './inc/uno.class.php';
$UNO = new Uno();
// 表示のみ($flag:1)
$image_flag = array(1);
$topOnImages = $UNO->selectTopImages(1, $image_flag, 4);
// ディレクトリ内のサイズ計算
function dir_size($dir)
{
    $total_size = 0;
    $handle = opendir($dir);
    while ($file = readdir($handle)) {
        if ($file != '..' && $file != '.' && !is_dir($dir . '/' . $file)) {
            $total_size += filesize($dir . '/' . $file);
        } else {
            if (is_dir($dir . '/' . $file) && $file != '..' && $file != '.') {
                $total_size += dir_size($dir . '/' . $file);
            }
        }
Ejemplo n.º 4
0
<?php

include_once './inc/uno.class.php';
$DB = new Uno();
// テーブル追加
$DB->tableCreate();
// 表示のみ($flag:1)
$image_flag = array(1);
$topOnImages = $DB->selectTopImages(1, $image_flag, 4);
?>
<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <title>fileMove</title>
  <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  <link rel="stylesheet" type="text/css" href="./css/reset.css">
  <link rel="stylesheet" type="text/css" href="./css/jquery.bxslider.css">
  <link rel="stylesheet" type="text/css" href="./css/style.css">
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script src="./js/jquery.bxslider.min.js"></script>
<!--  <script async defer src="//platform.instagram.com/en_US/embeds.js"></script>-->
  <script type="text/javascript">
        $(document).ready(function(){
            $('.bxslider').bxSlider({
                auto: true,
            });
        });
</script>
</head>
<body>
Ejemplo n.º 5
0
<?php

session_start();
include_once '../inc/uno.class.php';
$DB = new Uno();
//管理者チェック
if ($_SESSION["id"] == ADMIN && $_SESSION["pass"] == PASS) {
    //  $flag=1;
} else {
    //管理者でなければセッション破棄
    //  header("Location: ../index.php");
    //  exit();
}
// 初期化
$f_name_path = "";
$date = date('YmdHis');
$id = "";
//----------------------------------------------
//ファイルチェック
//----------------------------------------------
$_SESSION["file"] = !empty($_SESSION["file"]) ? $DB->h($_SESSION["file"]) : "";
//画像ファイル
if (isset($_FILES['file']['error']) && is_int($_FILES['file']['error'])) {
    try {
        // $_FILES['file']['error'] の値を確認
        switch ($_FILES['file']['error']) {
            case UPLOAD_ERR_OK:
                // OK
                break;
            case UPLOAD_ERR_NO_FILE:
                // ファイル未選択