Update form with new control
This commit is contained in:
parent
bb8052bd01
commit
f2faa1ce41
1 changed files with 2 additions and 0 deletions
|
@ -6,6 +6,7 @@ include_once(__DIR__ . '/libs/dpclass.php');
|
||||||
|
|
||||||
if($_POST['submit']) {
|
if($_POST['submit']) {
|
||||||
$diabloProgressUrl = trim($_POST['url']);
|
$diabloProgressUrl = trim($_POST['url']);
|
||||||
|
$elementalOnWeapon = isset($_POST['elemental']['elemental']) ? true : false;
|
||||||
if(preg_match('{^http://www.diabloprogress.com/hero/[\w]+\-[\d]+/[\w]+/[\d]+$}', $diabloProgressUrl) != 1) {
|
if(preg_match('{^http://www.diabloprogress.com/hero/[\w]+\-[\d]+/[\w]+/[\d]+$}', $diabloProgressUrl) != 1) {
|
||||||
die('Bad URL. Please enter the entire diablo progress URL.<br/><br/>Example: http://www.diabloprogress.com/hero/celanian-1548/HsuMing/21706367');
|
die('Bad URL. Please enter the entire diablo progress URL.<br/><br/>Example: http://www.diabloprogress.com/hero/celanian-1548/HsuMing/21706367');
|
||||||
}
|
}
|
||||||
|
@ -38,5 +39,6 @@ Paragon Score: <?php echo number_format($character->paragonScore(), 2, '.', ',')
|
||||||
?>
|
?>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
D3 Progress URL: <input type="text" name="url" style="width:500px;" value="<?php echo $diabloProgressUrl ?>" /><br />
|
D3 Progress URL: <input type="text" name="url" style="width:500px;" value="<?php echo $diabloProgressUrl ?>" /><br />
|
||||||
|
Elemental Damage on Weapon: <input type="checkbox" name="elemental" value="elemental" <?php echo $elementalOnWeapon ? 'checked="checked"' : '' ?> /><br/>
|
||||||
<input type="submit" name="submit" />
|
<input type="submit" name="submit" />
|
||||||
</form>
|
</form>
|
Loading…
Reference in a new issue