<?php require_once 'protect.php'; ?>
<?php if ($rowspr>0) {?>
<div class="divprices">
<div class="titles3 color1"><?php echo $pricelist ?></div>
<table class="table">
<tr> 
<?php
$result6 = $mysqli->query("SELECT * FROM seasons WHERE lang_id=$lang ORDER BY priority");
while($row = $result6->fetch_array()) {	
$seasonid=$row['insert_id'];
$season=$row['name'];
$date1=$row['date1'];
$date1b=$row['date1b'];
$date2=$row['date2'];
$date2b=$row['date2b'];

$date1 = substr($date1, 2, 4).".".substr($date1, 0, 2);
$date1b = substr($date1b, 2, 4).".".substr($date1b, 0, 2);
$date2 = substr($date2, 2, 4).".".substr($date2, 0, 2);
$date2b = substr($date2b, 2, 4).".".substr($date2b, 0, 2);
?> 
<td class="tdprice">
<div class="text-center">
<div class="divprice">
<strong><?php echo $season ?></strong> <br>
<?php if ($date1!='0000') echo $date1 ?> - <?php if ($date1b!='0000') echo $date1b ?>
<br>
<?php if ($date2!='0000') echo $date2 ?> - <?php if ($date2b!='0000') echo $date2b ?>
</div>
<?php
$resultd = $mysqli->query("SELECT id FROM days");
$rowsd = mysqli_num_rows($resultd);
?> 
<?php if ($rowsd>0) { ?>
<!--days -->
<hr>
<div class="color1"><strong><?php echo $textdays ?></strong></div>
<?php
$result10 = $mysqli->query("SELECT * FROM days ORDER BY nr1");
while($row = $result10->fetch_array()) {	
$nr1=$row['nr1'];
$nr2=$row['nr2'];
?>
<div class="divprice"><span class="example3"> <?php echo $nr1 ?><?php if ($nr2==0) { echo "+"; } else if ($nr2==$nr1) { } else { echo "-".$nr2; } ?> </span></div>
<?php } ?>	
<!--end days --> 
<hr>
<?php } ?>
<div class="color1"><strong>&#8364;</strong></div>	 
</div>
</td>
<?php } ?> 
</tr>
</table>
<table class="table">
<tr class="tcolor">
<?php
$result7 = $mysqli->query("SELECT * FROM seasons WHERE lang_id=$lang ORDER BY priority");
while($row = $result7->fetch_array()) {	
$seasonid=$row['insert_id'];
?>
<td class="tdprice">
<div class="text-center"> 
<?php
$result9 = $mysqli->query("SELECT * FROM prices WHERE item_id=$id AND season_id=$seasonid");
while($row = $result9->fetch_array()) {	
$lprice=$row['price'];
$lprice1=$row['price'];
$lprice = $lprice-($lprice*(($discount+$langdiscount)/100));
$lprice = round($lprice, 2);
$pavailable=$row['available'];
?>
<div class="divprice">
<?php if ($discount>0 OR $langdiscount>0) { ?><span class="price notvalid"><?php echo $lprice1 ?></span> <?php } ?>
<span class="price<?php if ($pavailable==0) { echo ' notavailable'; }?>"> <?php echo $lprice ?></span>
</div>
<?php } ?>
</div>
</td>
<?php } ?> 
</tr>
</table> 
<?php if ($sitediscount2>0) { ?><strong><?php echo $fieldchildren ?> <?php echo $sitediscount2 ?> % discount</strong><?php } ?>
<hr></div>
<?php } ?>