HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/ledub.komma.pro/wwwroot/kms/home.php
<?php

	if (isset($_GET['zoeken'])){
		$zoeken = $_GET['zoeken'];
	}
	
		$q_count = "SELECT COUNT(kms_inschrijvingen.inschrijving_id) AS totaal FROM kms_inschrijvingen ORDER BY kms_inschrijvingen.datum DESC, kms_inschrijvingen.tijd DESC";
		$r_count = mysql_query($q_count);
		$rec_count = mysql_fetch_assoc($r_count);
	
?>
<p><a href="/kms/excel_export.php" target="_blank" title="Excel export">Klik hier voor de excel export &gt;</a></p>
<br /><br />
<div class="zoeken" >
<form method="GET" action="<?php echo $_SERVER['PHP_SELF']; ?>"/>
<input class="zoeken" name="zoeken" type="text" value="<?php echo($zoeken); ?>"/>
<input class="submit_zoeken" type="submit" value="Zoeken" />

</form>

</div>
<div class="clear_both"></div>
<br /><br />

<h1>Inschrijvingen (totaal <?php echo($rec_count['totaal']); ?>)</h1>

<table cellpadding="20" cellspacing="0" border="0">
    <tr height="40">
    	<th width="25">&nbsp;</th>
        <th width="200">Vereniging en Teamnaam</th>
        <th width="200">Contactpersoon</th>
        <th width="200">Woonplaats</th>
        <th width="75">Niveau</th>
        <th width="150">Te betalen / Betaald</th>
        <th width="100">Wijzigen / Verwijderen</th>
        <th width="90">Meer info</th>
    </tr>

<?php
	
	if(empty($zoeken)){ 
	
		$q_nieuws = "SELECT kms_inschrijvingen.inschrijving_id, kms_inschrijvingen.vereniging, kms_inschrijvingen.teamnaam, 
		kms_inschrijvingen.niveau, kms_inschrijvingen.voornaam, kms_inschrijvingen.tussenvoegsel, kms_inschrijvingen.achternaam, 
		kms_inschrijvingen.adres, kms_inschrijvingen.postcode, kms_inschrijvingen.woonplaats, kms_inschrijvingen.land, kms_inschrijvingen.telefoonnummer, kms_inschrijvingen.emailadres,   
		kms_inschrijvingen.betaald, kms_inschrijvingen.kamperen 
		FROM kms_inschrijvingen ORDER BY kms_inschrijvingen.datum DESC, kms_inschrijvingen.tijd DESC";

	}else if(!empty($zoeken)){ 
		
		$q_nieuws = "SELECT kms_inschrijvingen.inschrijving_id, kms_inschrijvingen.vereniging, kms_inschrijvingen.teamnaam, kms_inschrijvingen.niveau, kms_inschrijvingen.voornaam, kms_inschrijvingen.tussenvoegsel, kms_inschrijvingen.achternaam, kms_inschrijvingen.betaald, kms_inschrijvingen.kamperen FROM kms_inschrijvingen WHERE
		(kms_inschrijvingen.vereniging LIKE '%$zoeken%' OR kms_inschrijvingen.teamnaam LIKE '%$zoeken%' OR kms_inschrijvingen.niveau LIKE '%$zoeken%' OR kms_inschrijvingen.voornaam LIKE '%$zoeken%' OR kms_inschrijvingen.achternaam LIKE '%$zoeken%') ORDER BY kms_inschrijvingen.teamnaam ASC";
		
	}
	
	$r_nieuws = mysql_query($q_nieuws);
	
	$kleur = true;
	
	while($rec_nieuws = mysql_fetch_array($r_nieuws)){ ?>
        <tr height="40" <?php if($kleur) { echo("style=\"background-color:#eee\""); $kleur = false; }else{ $kleur = true; }?>>
        	<td>&nbsp;</td>
            <td><?php echo(html_entity_decode($rec_nieuws['vereniging'])); ?><br /><?php echo(html_entity_decode($rec_nieuws['teamnaam'])); ?></td>
            <td><?php echo(html_entity_decode($rec_nieuws['voornaam'])); 
				if(!empty($rec_nieuws['tussenvoegsel'])){ echo(html_entity_decode(" ".$rec_nieuws['tussenvoegsel'])); }
				echo(html_entity_decode(" ".$rec_nieuws['achternaam'])); ?>
            </td>            
            <td><?php echo(html_entity_decode($rec_nieuws['woonplaats'])); ?></td>
            
            <td><?php echo(html_entity_decode($rec_nieuws['niveau'])); ?></td>
            
            <td><?php if($rec_nieuws['betaald'] != "yes"){  if($rec_nieuws['kamperen'] == "yes"){ echo("&euro; 90"); }else{ echo("&euro; 70"); }  }?><br />
            Betaald: <?php if($rec_nieuws['betaald'] == "yes"){ echo("ja"); }else{ echo("nee"); } ?></td>
            
            <td><a href="index.php?p=inschrijving_wijzigen&amp;inschrijving_id=<?php echo($rec_nieuws[0]); ?>">Wijzigen</a><?php if($rec_nieuws['betaald'] != "yes"){ ?><br /><a href="index.php?p=inschrijving_verwijderen&amp;inschrijving_id=<?php echo($rec_nieuws[0]); ?>">Verwijderen</a><?php } ?></td>
            <td><a href="index.php?p=inschrijving_info&amp;inschrijving_id=<?php echo($rec_nieuws[0]); ?>">Meer info</a></td>
        </tr>
<?php } ?>

</table>