コード例 #1
0
     header("Location: graph_templates.php?action=edit&id=" . $_GET["graph_template_id"]);
     break;
 case 'item_moveup':
     item_moveup();
     header("Location: graph_templates.php?action=edit&id=" . $_GET["graph_template_id"]);
     break;
 case 'row_movedown':
     row_movedown();
     header("Location: graph_templates.php?action=edit&id=" . $_GET["graph_template_id"]);
     break;
 case 'row_moveup':
     row_moveup();
     header("Location: graph_templates.php?action=edit&id=" . $_GET["graph_template_id"]);
     break;
 case 'group':
     item_group();
     header("Location: graph_templates.php?action=edit&id=" . $_SESSION["sess_field_values"]["id"]);
     break;
 case 'ungroup':
     item_ungroup();
     header("Location: graph_templates.php?action=edit&id=" . $_GET["graph_template_id"]);
 case 'edit':
     require_once CACTI_BASE_PATH . "/include/top_header.php";
     item_edit();
     require_once CACTI_BASE_PATH . "/include/bottom_footer.php";
     break;
 case 'item':
     require_once CACTI_BASE_PATH . "/include/top_header.php";
     item();
     include_once "./include/bottom_footer.php";
     break;
コード例 #2
0
ファイル: item.php プロジェクト: Goryudyuma/ez5000
function item_group_end($start)
{
    if (item_group($start) == -1) {
        return -1;
    }
    if ($start < 13000) {
        return $start + 99;
    } else {
        return $start + 1000;
    }
}
コード例 #3
0
ファイル: index.php プロジェクト: Goryudyuma/ez5000
echo pagehead($title);
?>
</head>
<body>
<div id="all">
<?php 
if (item_group($id) != -1) {
    //グループ表示
    ?>
<h1>アイテムデータ</h1>
<hr class="normal">
<h2><?php 
    echo item_category(item_category_id($id));
    ?>
 <?php 
    echo item_group($id);
    ?>
</h2>
<ul id="linklist">
<?php 
    $data->select_column("id,name", "items", array("id", "hidden"), array("BETWEEN " . ($id + 1) . " AND " . item_group_end($id), "0"));
    while ($row = $data->fetch()) {
        $i_id = $row["id"];
        $i_name = $row["name"];
        $id_f = isset($data->is_admin) ? sprintf("%d:", $i_id) : "";
        ?>
<li><?php 
        echo $id_f;
        ?>
<a href="/db/item/data/?id=<?php 
        echo $i_id;
コード例 #4
0
ファイル: index.php プロジェクト: Goryudyuma/ez5000
    }
} else {
    $data = new GuestData($userName, $password, $database);
}
if (mysqli_connect_error()) {
    die("データベースの接続に失敗しました");
}
$i_name = "";
if ($data->is_added("items", $id)) {
    $data->select_id("items", $id);
    $item = $data->fetch();
    $i_name = $item["name"];
    $category = item_category_id($id);
    $categoryName = item_category($category);
    $group = item_group_id($id);
    $groupName = item_group($group);
    $i_text = nl2br(str_replace("  ", " ", $item["text"]));
    $i_rare = item_attribute($item["rare"]);
    $i_notrade = item_attribute($item["notrade"]);
    $i_price = item_price($item["price"]);
    $i_stack = $item["stack"];
    $i_note = nl2br($item["note"]);
    $i_hidden = $item["hidden"];
    //未実装アイテム
    if (!isset($data->is_admin) && $i_hidden) {
        toppage();
    }
    //D/D計算
    if ($flag = preg_match("/DMG([0-9]+(~[0-9]+)?).*?DLY([0-9]+)/ms", $i_text, $val)) {
        if (preg_match("/^([0-9]+)~([0-9]+)/", $val[1], $dmg)) {
            $min = sprintf("%0.3f", round($dmg[1] / $val[3], 3));
コード例 #5
0
ファイル: updinfo.php プロジェクト: Goryudyuma/ez5000
<?php

//=====================================
// アイテムデータ 更新情報
//=====================================
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 = 20020;
$LIMIT = 50;
$group = item_group();
$title = "アイテムデータ更新履歴";
$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 {