tab

KOL Update uitvoeren

{source}
<?php
$id=$_GET[“ID”];

// Connect de database
$db = JFactory::getDbo();
$query = $db->getQuery(true);
if (isset($_GET[“Verwijder”])) {
$query=’DELETE FROM korenonline WHERE `ID` = ‘.$id;
$db->setQuery($query);
$db->execute();
$id=””;

}else{

$set=”korenonline SET
`ID` = ‘” . $_GET[“ID”] . “‘,
`Koor` = ‘” . $_GET[“Koor”] . “‘,
`Wm` = ‘” . $_GET[“Wm”] . “‘,
`Url` = ‘” . $_GET[“Url”] . “‘,
`Org` = ‘” . $_GET[“Org”] . “‘,
`Template` = ‘” . $_GET[“Template”] . “‘,
`Byte` = ‘” . $_GET[“Byte”] . “‘,
`Euro` = ‘” . $_GET[“Euro”] . “‘,
`La` = ‘” . $_GET[“La”] . “‘,
`FTP-host` = ‘” . $_GET[“FTP-host”] . “‘,
`FTP-user` = ‘” . $_GET[“FTP-user”] . “‘,
`FTP-pw` = ‘” . $_GET[“FTP-pw”] . “‘,
`Mysql-host` = ‘” . $_GET[“Mysql-host”] . “‘,
`Mysql-user` = ‘” . $_GET[“Mysql-user”] . “‘,
`Mysql-pw` = ‘” . $_GET[“Mysql-pw”] . “‘,
`Mysql-db` = ‘” . $_GET[“Mysql-db”] . “‘,
`Opmerking` = ‘” . $_GET[“Opmerking”] .”‘”;

if (!empty($id)){
$wat=”UPDATE ” . $set . ” WHERE ID = “.$id;
}else{
$wat=”INSERT INTO “.$set;
}
$query=$wat;
$db->setQuery($query);
$result=$db->execute();
if (empty($id)) {
$id=$db->insertid();
};
}

header(“Location: update-invoer?ID=$id&OK=Uitgevoerd”);
?>
{/source}

Updaten details korenonline deelnemer

{source}
<?php
$id=$_GET[“ID”];
// Connect de database

$db = JFactory::getDbo();
$query = $db->getQuery(true);
if ($id) {
$query =”SELECT * FROM korenonline WHERE ID = $id”;
}else{
$query =”SELECT * FROM korenonline”;
}
$db->setQuery($query);
$db->execute();
$rows = $db->loadAssoc();

// Toon de gevonden gegevens

if ($_GET[“OK”]) {
echo “<h1>Deze update werd “.$_GET[“OK”].”</h1>”;
}
?>
<h2>Muteren korenonline informatie</h2>
<form action=”update-uitvoeren?id=<?=$rows->ID?> method=”get”>
<input type=”submit” class=”button” name=”Wijzig” value=”Wijzig”> <input type=”submit” name=”Verwijder” class=”button” value=”Verwijder”>
<hr />
<table class=”table”><tr><td><table>
<?php
echo ‘<tr><td colspan=”2″><h3>Algemene gegevens</h3></td></tr>’;
foreach($rows as $column => $value) {
if ($id) {
echo ‘<tr><td >’. $column . ‘</td><td><input type=”text” name=”‘ . $column . ‘” value=”‘ . $value . ‘” size=”50″</td></tr>’;
if ($column == “FTP-host”) {
if ($value == “Byte”) { break; };
echo ‘</td></tr></table><td ><table>’;
echo ‘<tr><td colspan=”2″><h3>Gegevens ledenadmi (geen Byte)</h3></td></tr>’;
}
}else{
if ($column == “FTP-host”) {
echo ‘</td></tr></table><td ><table>’;
echo ‘<tr><td colspan=”2″><h3>Gegevens ledenadmi (geen Byte)</h3></td></tr>’;
}
echo ‘<tr><td>’. $column . ‘</td><td><input type=”text” name=”‘ . $column . ‘”</td></tr>’;
}
}

?>

</td></tr></table>
</table>
</form>
<hr /><p><small><i>Versie 2.0 d.d. 20-08-2016</i></small></p>

{/source}

Hits per kalender evenement

{source}
<?php
// Connect de database
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query =”SELECT title as titel, next as datum, hits FROM h29z1_icagenda_events ORDER BY next DESC”;
$db->setQuery($query); $db->execute(); $aantal=$db->getNumRows();
$results = $db->loadObjectList();
?>

</h2><p class=”signaal”></p>
<table class=”table table-striped”>
<tr><td><H3><b>Evenementen</a></td><td><H3><b>Datum/tijd</td><td><H3><b>Hits</td></tr>

<?php
// Toon de gevonden gegevens
foreach($results as $result){
echo”<tr><td>” . $result->titel . “</td><td>” . $result->datum .”</td><td>” .$result->hits .”</td></tr>”;
}?>

</table>

{/source}

{pagebuilderck 15}