Exemplo n.º 1
0
                echo ' background-color: #F7F7F7;';
            }
            echo '">';
            echo '<tr';
            //if($i%2!=0){echo ' style="background-color: #F7F7F7;" ';}
            echo '>';
            echo '<td style="padding: 0 10px;" valign="top"><h6 class="table" style="line-height: 25px;"><b>Door: </b>' . $row['naam'];
            if ($row['email'] != '') {
                echo ' - ' . $row['email'];
            }
            if ($row['website'] != '') {
                echo ' - <a href="' . $row['website'] . '" target="_blank">website</a>';
            }
            echo '</h6></td>';
            echo '</tr><tr>';
            echo '<td style="padding: 0 10px;"><h6 class="table" style="line-height: 25px;"><b>Op: </b>' . datumOmzetten($row['datumformat']) . '</h6></td>';
            echo '</tr><tr>';
            echo '<td style="padding: 0 10px;"><h6 class="table" style="text-align: justify; line-height: 25px;">' . artikelInOrde($row['tekst']) . '</h6></td>';
            echo '</tr>';
            echo '</table></div>';
            $i++;
        }
        echo makeNav($page, $max, $start, '?page=gastenboek', 'gastenboek');
        // navigatie aanmaken
    }
    echo '<h6 class="text"><a href="?page=gastenboek&amp;action=toevoegen">Schrijf iets in het gastenboek</a></h6>';
} else {
    $actions = array('toevoegen');
    if (isset($_GET['action']) && in_array($_GET['action'], $actions) && file_exists($_GET['page'] . '_' . $_GET['action'] . '.php')) {
        include $_GET['page'] . '_' . $_GET['action'] . '.php';
    } else {
Exemplo n.º 2
0
<?php

if (isset($_GET['id']) && is_numeric($_GET['id'])) {
    $query = mysql_query('SELECT *, DATE_FORMAT(`datum`, "%d/%M/%m/%Y %H:%i") AS `formatdatum` FROM nieuws WHERE id = ' . $_GET['id']);
    if (mysql_num_rows($query) < 1) {
        echo '<h6 class="text">U probeert een artikel aan te bekijken dat niet (meer) bestaat.</h6>';
    } else {
        while ($row = mysql_fetch_array($query)) {
            ?>
      <h6 class="ondertitle" style="margin-top: 0;"><?php 
            echo artikelInOrde($row['titel']);
            ?>
</h6>
      <h6 class="date"><?php 
            echo datumOmzetten($row['formatdatum']);
            ?>
</h6>
      <h6 class="text" style="margin-bottom: 0;"><?php 
            echo artikelInOrde($row['artikel']);
            ?>
</h6>
      <h6 class="text"><a href="?page=nieuws">Terug naar de artikels</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="?page=nieuws&amp;action=aanpassen&amp;id=<?php 
            echo $_GET['id'];
            ?>
">Artikel aanpassen</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="?page=nieuws&amp;action=verwijderen&amp;id=<?php 
            echo $_GET['id'];
            ?>
">Artikel verwijderen</a></h6>
      <?php 
        }
    }