mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 12:36:03 +00:00
123 lines
3.4 KiB
PHP
123 lines
3.4 KiB
PHP
<?php
|
|
|
|
error_reporting(E_ERROR | E_PARSE);
|
|
set_time_limit(-1);
|
|
ini_set('max_input_time', '-1');
|
|
ini_set('max_execution_time', '0');
|
|
session_start();
|
|
ob_start();
|
|
|
|
require_once './config.php';
|
|
require_once './_pdo.php';
|
|
require_once "./src/D2Functions.php";
|
|
require_once './src/D2ItemData.php';
|
|
require_once './src/D2ItemDesc.php';
|
|
require_once './src/D2DocGenerator.php';
|
|
|
|
define('DB_FILE', $_SESSION['modname'] . ".db");
|
|
PDO_Connect("sqlite:" . DB_FILE);
|
|
|
|
|
|
//$sql = "SELECT code FROM uniqueitems";
|
|
//$res = PDO_FetchAll($sql);
|
|
//
|
|
//
|
|
//foreach ($res as $code){
|
|
// $c = $code['code'];
|
|
//
|
|
// $sql = "SELECT flippyfile FROM misc WHERE code = '$c'";
|
|
// $ret = PDO_FetchOne($sql);
|
|
//
|
|
// if(empty($ret)){
|
|
// $sql = "SELECT flippyfile FROM armor WHERE code = '$c'";
|
|
// $ret = PDO_FetchOne($sql);
|
|
// }
|
|
// if(empty($ret)){
|
|
// $sql = "SELECT flippyfile FROM armor WHERE normcode = '$c'";
|
|
// $ret = PDO_FetchOne($sql);
|
|
// }
|
|
// if(empty($ret)){
|
|
// $sql = "SELECT flippyfile FROM armor WHERE ubercode = '$c'";
|
|
// $ret = PDO_FetchOne($sql);
|
|
// }
|
|
// if(empty($ret)){
|
|
// $sql = "SELECT flippyfile FROM armor WHERE ultracode = '$c'";
|
|
// $ret = PDO_FetchOne($sql);
|
|
// }
|
|
//
|
|
// if(empty($ret)){
|
|
// $sql = "SELECT flippyfile FROM weapons WHERE code = '$c'";
|
|
// $ret = PDO_FetchOne($sql);
|
|
// }
|
|
// if(empty($ret)){
|
|
// $sql = "SELECT flippyfile FROM weapons WHERE normcode = '$c'";
|
|
// $ret = PDO_FetchOne($sql);
|
|
// }
|
|
// if(empty($ret)){
|
|
// $sql = "SELECT flippyfile FROM weapons WHERE ubercode = '$c'";
|
|
// $ret = PDO_FetchOne($sql);
|
|
// }
|
|
// if(empty($ret)){
|
|
// $sql = "SELECT flippyfile FROM weapons WHERE ultracode = '$c'";
|
|
// $ret = PDO_FetchOne($sql);
|
|
// }
|
|
//
|
|
// $return[] = $ret;
|
|
//
|
|
// echo $ret . "_uni<br>";
|
|
//}
|
|
|
|
//dump($return)
|
|
//
|
|
//
|
|
|
|
|
|
$sql = "SELECT item FROM setitems";
|
|
$res = PDO_FetchAll($sql);
|
|
|
|
|
|
foreach ($res as $code){
|
|
$c = $code['item'];
|
|
|
|
|
|
$sql = "SELECT flippyfile FROM misc WHERE code = '$c'";
|
|
$ret = PDO_FetchOne($sql);
|
|
|
|
if(empty($ret)){
|
|
$sql = "SELECT flippyfile FROM armor WHERE code = '$c'";
|
|
$ret = PDO_FetchOne($sql);
|
|
}
|
|
if(empty($ret)){
|
|
$sql = "SELECT flippyfile FROM armor WHERE normcode = '$c'";
|
|
$ret = PDO_FetchOne($sql);
|
|
}
|
|
if(empty($ret)){
|
|
$sql = "SELECT flippyfile FROM armor WHERE ubercode = '$c'";
|
|
$ret = PDO_FetchOne($sql);
|
|
}
|
|
if(empty($ret)){
|
|
$sql = "SELECT flippyfile FROM armor WHERE ultracode = '$c'";
|
|
$ret = PDO_FetchOne($sql);
|
|
}
|
|
|
|
if(empty($ret)){
|
|
$sql = "SELECT flippyfile FROM weapons WHERE code = '$c'";
|
|
$ret = PDO_FetchOne($sql);
|
|
}
|
|
if(empty($ret)){
|
|
$sql = "SELECT flippyfile FROM weapons WHERE normcode = '$c'";
|
|
$ret = PDO_FetchOne($sql);
|
|
}
|
|
if(empty($ret)){
|
|
$sql = "SELECT flippyfile FROM weapons WHERE ubercode = '$c'";
|
|
$ret = PDO_FetchOne($sql);
|
|
}
|
|
if(empty($ret)){
|
|
$sql = "SELECT flippyfile FROM weapons WHERE ultracode = '$c'";
|
|
$ret = PDO_FetchOne($sql);
|
|
}
|
|
|
|
$return[] = $ret;
|
|
|
|
echo $ret . "_set<br>";
|
|
}; |