Exemplo n.º 1
0
    case 1:
        $image = imagecreatefromgif($url);
        break;
    case 2:
        $image = imagecreatefromjpeg($url);
        break;
    case 3:
        $image = imagecreatefrompng($url);
        break;
    default:
        toppage();
        die;
        break;
}
// 圧縮サイズ指定
switch (device_info()) {
    case 'mb':
        $quality = 50;
        break;
    case 'sp':
        $quality = 90;
        break;
    case 'pc':
        $quality = 100;
        break;
}
// 出力画像サイズより元画像が大きい場合
if ($image_w > $width) {
    //元画像の比率を計算し、高さを設定
    $proportion = $image_w / $image_h;
    $height = $width / $proportion;
Exemplo n.º 2
0
<ul id="footlink">
<li><a href="./"<?php 
    echo mbi_ack(9);
    ?>
><?php 
    echo mbi("9.");
    ?>
スキルデータ</a></li>
<?php 
} else {
    //一覧表示
    ?>
<h1>スキルデータ</h1>
<hr class="normal">
<?php 
    if (device_info() == 'mb') {
        ?>
<hr class="normal">
<div class="cnt">
<a href="#s1" accesskey="1">1.クラス</a>|<a href="#s2" accesskey="2">2.魔法</a>|<a href="#s3" accesskey="3">3.モンスター</a>
</div>
<?php 
    }
    $i = 0;
    foreach ($categories->category as $category) {
        $i++;
        echo mbi("<a name=\"s" . $i . "\">");
        ?>
<h2><?php 
        echo $category["name"];
        ?>
Exemplo n.º 3
0
//=====================================
// アイテムデータ 装備データ検索
//=====================================
require_once "/var/www/class/mysql.php";
require_once "/var/www/class/guestdata.php";
require_once "/var/www/class/admindata.php";
require_once "/var/www/functions/template.php";
require_once "/var/www/functions/form.php";
require_once "/var/www/functions/item.php";
session_start();
$PAGE_ID = 20030;
$title = "装備アイテム検索";
$MAX_LV = "60";
$PAGE_SIZE = 50;
$error = false;
$mb = device_info() == "mb" || device_info() == "sp" ? true : false;
$user_file = "/etc/mysql-user/user5000.ini";
if ($fp_user = fopen($user_file, "r")) {
    $userName = rtrim(fgets($fp_user));
    $password = rtrim(fgets($fp_user));
    $database = rtrim(fgets($fp_user));
} else {
    die("接続設定の読み込みに失敗しました");
}
if (isset($_SESSION["user"]) && isset($_SESSION["pass"])) {
    $data = new AdminData($_SESSION["user"], $_SESSION["pass"], "ezdata");
    if (!$data->is_admin) {
        session_destroy();
        die("データベースの接続に失敗しました");
    }
} else {
Exemplo n.º 4
0
function array_online($disk) {
  global $display, $temps, $counts, $tot_size, $tot_used, $tot_free, $reads, $writes, $errors;
  if (is_numeric($disk['temp'])) {
    $temps += $disk['temp'];
    $counts++;
  }
  $reads += $disk['numReads'];
  $writes += $disk['numWrites'];
  $errors += $disk['numErrors'];
  if (isset($disk['fsFree']) && $disk['name']!='parity') {
    $disk['fsUsed'] = $disk['fsSize'] - $disk['fsFree'];
    $tot_size += $disk['fsSize'];
    $tot_free += $disk['fsFree'];
    $tot_used += $disk['fsUsed'];
  }
  echo "<tr>";
  switch ($disk['status']) {
  case "DISK_NP":
//  Suppress empty slots to keep device list short
//  this actually should be configurable
//  echo "<td>".device_info($disk)."</td>";
//  echo "<td colspan='9'>Not installed</td>";
//  echo "<td></td>";
    break;
  case "DISK_OK_NP":
    echo "<td>".device_info($disk)."</td>";
    echo "<td>Not Installed</td>";
    echo "<td colspan='4'></td>";
    render_used_and_free($disk);
    echo "<td>".device_browse($disk)."</td>";
    break;
  case "DISK_NP_DSBL":
    echo "<td>".device_info($disk)."</td>";
    if ($disk['name']=="parity") {
      echo "<td>Not installed</td>";
      echo "<td colspan='9'></td>";
    } else {
      echo "<td><em>Not installed</em></td>";
      echo "<td colspan='4'></td>";
      render_used_and_free($disk);
      echo "<td>".device_browse($disk)."</td>";
    }
    break;
  case "DISK_DSBL":
    echo "<td>".device_info($disk)."</td>";
    echo "<td>".device_desc($disk)."</td>";
    echo "<td>".my_temp($disk['temp'])."</td>";
    echo "<td>".my_number($disk['numReads'])."</td>";
    echo "<td>".my_number($disk['numWrites'])."</td>";
    echo "<td>".my_number($disk['numErrors'])."</td>";
    if ($disk['name']=="parity") {
      echo "<td colspan='5'></td>";
    } else {
      render_used_and_free($disk);
      echo "<td>".device_browse($disk)."</td>";
    }
    break;
  default:
    echo "<td>".device_info($disk)."</td>";
    echo "<td>".device_desc($disk)."</td>";
    echo "<td>".my_temp($disk['temp'])."</td>";
    echo "<td>".my_number($disk['numReads'])."</td>";
    echo "<td>".my_number($disk['numWrites'])."</td>";
    echo "<td>".my_number($disk['numErrors'])."</td>";
    render_used_and_free($disk);
    echo "<td>".device_browse($disk)."</td>";
    break;
  }
  echo "</tr>";
}
Exemplo n.º 5
0
function mbi($str)
{
    if (device_info() == 'mb') {
        return $str;
    }
}
Exemplo n.º 6
0
function array_online(&$disk) {
  global $sum;
  if (is_numeric($disk['temp'])) {
    $sum['count']++;
    $sum['temp'] += $disk['temp'];
  }
  $sum['numReads'] += $disk['numReads'];
  $sum['numWrites'] += $disk['numWrites'];
  $sum['numErrors'] += $disk['numErrors'];
  if (isset($disk['fsFree'])) {
    $disk['fsUsed'] = $disk['fsSize']-$disk['fsFree'];
    $sum['fsSize'] += $disk['fsSize'];
    $sum['fsUsed'] += $disk['fsUsed'];
    $sum['fsFree'] += $disk['fsFree'];
  }
  echo "<tr>";
  switch ($disk['status']) {
  case 'DISK_NP':
//  Suppress empty slots to keep device list short (make this configurable?)
//  echo "<td>".device_info($disk)."</td>";
//  echo "<td colspan='9'>Not installed</td>";
//  echo "<td></td>";
    break;
  case 'DISK_OK_NP':
  case 'DISK_NP_DSBL':
    echo "<td>".device_info($disk)."</td>";
    echo "<td><em>Not installed</em></td>";
    echo "<td colspan='4'></td>";
    fs_info($disk);
    break;
  case 'DISK_DSBL':
  default:
    echo "<td>".device_info($disk)."</td>";
    echo "<td>".device_desc($disk)."</td>";
    echo "<td>".my_temp($disk['temp'])."</td>";
    echo "<td>".my_number($disk['numReads'])."</td>";
    echo "<td>".my_number($disk['numWrites'])."</td>";
    echo "<td>".my_number($disk['numErrors'])."</td>";
    fs_info($disk);
    break;
  }
  echo "</tr>";
}
Exemplo n.º 7
0
※512KBまで<br />
<input type="hidden" name="MAX_FILE_SIZE" value="<?php 
    echo $MAX_FSIZE;
    ?>
" />
<input name="media" type="file" value="1"><br />
<?php 
    if ($mode == 2 && $message->image != "") {
        ?>
<input type="checkbox" name="delmedia">添付ファイル削除<br />
<?php 
    }
    ?>
<hr class="normal">
<?php 
    if (device_info() == "mb") {
        ?>
<input type="hidden" name="enc" value="あ">
<?php 
    } else {
        ?>
<img src="ImageAuthentication.php" /><br />
画像認証-上記文字を入力してください<br />
<input type="text" name="authcap">
<hr class="normal">
<?php 
    }
    if ($mode == 1 || $mode == 2) {
        ?>
<input type="hidden" name="tid" value="<?php 
        echo $thread->tid;