Делаем подарки
This commit is contained in:
parent
63cc7ee533
commit
23dd65b366
32
presents.php
32
presents.php
@ -26,16 +26,18 @@ require_once 'functions.php';
|
||||
<link href="css/main.css" rel="stylesheet"/>
|
||||
<script src="js/main.js"></script>
|
||||
<style>
|
||||
label.present > input{ /* HIDE RADIO */
|
||||
label.present > input { /* HIDE RADIO */
|
||||
visibility: hidden; /* Makes input not-clickable */
|
||||
position: absolute; /* Remove input from document flow */
|
||||
}
|
||||
label.present > input + img{ /* IMAGE STYLES */
|
||||
cursor:pointer;
|
||||
border:2px solid transparent;
|
||||
|
||||
label.present > input + img { /* IMAGE STYLES */
|
||||
cursor: pointer;
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
label.present > input:checked + img{ /* (RADIO CHECKED) IMAGE STYLES */
|
||||
border:2px solid #f00;
|
||||
|
||||
label.present > input:checked + img { /* (RADIO CHECKED) IMAGE STYLES */
|
||||
border: 2px solid #f00;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@ -70,13 +72,13 @@ if (!empty($_POST['present'])) {
|
||||
<div>
|
||||
<?php
|
||||
$dirname = "i/presents/";
|
||||
$images = glob($dirname."*.png");
|
||||
$images = glob($dirname . "*.png");
|
||||
|
||||
foreach($images as $image): ?>
|
||||
<label class="present">
|
||||
<input type="radio" name="present" value="<?= $image ?>">
|
||||
<img src="<?= $image ?>" alt=""><br />
|
||||
</label>
|
||||
foreach ($images as $image): ?>
|
||||
<label class="present">
|
||||
<input type="radio" name="present" value="<?= $image ?>">
|
||||
<img src="<?= $image ?>" alt="">
|
||||
</label>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<table cellspacing=0 cellpadding=0 width=100% bgcolor=#e0e0e2>
|
||||
@ -91,9 +93,9 @@ if (!empty($_POST['present'])) {
|
||||
<textarea name=podarok2 rows=6 cols=80
|
||||
placeholder="Текст сопроводительной записки (в информации о персонаже не отображается)"></textarea><br>
|
||||
Выберите, от чьего имени подарок:<br>
|
||||
<label><input type=radio name=from value=0 checked> <?= $user['login'] ?></label><br>
|
||||
<label><input type=radio name=from value=1> анонимно</label><br>
|
||||
<label><input type=radio name=from value=2> от имени клана</label><br>
|
||||
<label><input type=radio name=from value=0 checked> <?= $user['login'] ?></label><br>
|
||||
<label><input type=radio name=from value=1> анонимно</label><br>
|
||||
<label><input type=radio name=from value=2> от имени клана</label><br>
|
||||
<button>Подарить</button>
|
||||
</p>
|
||||
<input type="hidden" name="flower" id="flower" value="">
|
||||
|
Loading…
Reference in New Issue
Block a user