mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 12:36:03 +00:00
49 lines
1.5 KiB
PHP
49 lines
1.5 KiB
PHP
<?php
|
|
include "includes.php";
|
|
PDO_Connect("sqlite:" . "d2im.db");
|
|
$sql = "SELECT * FROM d2im";
|
|
$mods = PDO_FetchAll($sql);
|
|
|
|
if (!empty($_POST)) {
|
|
$sql = "SELECT * FROM d2im WHERE `modname`='{$_POST['modname']}'";
|
|
$mod = PDO_FetchRow($sql);
|
|
|
|
$_SESSION['modname'] = $mod[modname];
|
|
$_SESSION['path'] = $mod['path'];
|
|
header("Location: /");
|
|
}
|
|
?>
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<?php
|
|
/* Require the <head> section */
|
|
require_once "src/head.php";
|
|
?>
|
|
<body style="background: white;">
|
|
<div class="center container container-top">
|
|
|
|
<h1><img src="/img/Diablo2.png" style="float:left">D2 Item Maker, v3. By HashCasper</h1>
|
|
<a class="btn btn-outline-danger" style="color:red; font-size: 18px;float:right;" href="/">X</a>
|
|
<hr style="margin: 60px;">
|
|
<div class="offset-2 col-8">
|
|
<h2>Select Mod</h2>
|
|
<div style="margin-top: 20px;" class="ctrl-config">
|
|
<form class="" enctype="multipart/form-data" style="font-family: Lato; font-size: 14pt;text-align:center;" action="" method="post">
|
|
<p>
|
|
<select id="mods" name="modname" required="required" class="custom-select"> <?php foreach ($mods as $mod) { ?>
|
|
<option value="<?php echo $mod['modname'] ?>"><?php echo $mod['modname'] ?>: <?php echo $mod['path'] ?></option>
|
|
<?php } ?>
|
|
</select>
|
|
</p>
|
|
<p>
|
|
<input type="submit" value="Select" name="submit" class="btn-config">
|
|
</p>
|
|
<p>
|
|
<a style="font-weight: bold;" class="btn btn-danger" href="/">Cancel</a>
|
|
</p>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|