Делаем подарки
This commit is contained in:
parent
63cc7ee533
commit
23dd65b366
20
presents.php
20
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,12 +72,12 @@ if (!empty($_POST['present'])) {
|
||||
<div>
|
||||
<?php
|
||||
$dirname = "i/presents/";
|
||||
$images = glob($dirname."*.png");
|
||||
$images = glob($dirname . "*.png");
|
||||
|
||||
foreach($images as $image): ?>
|
||||
foreach ($images as $image): ?>
|
||||
<label class="present">
|
||||
<input type="radio" name="present" value="<?= $image ?>">
|
||||
<img src="<?= $image ?>" alt=""><br />
|
||||
<img src="<?= $image ?>" alt="">
|
||||
</label>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user