nieuws
By: Ruben | Date: Nov 13 2007 18:11 | Format: PHP | Expires: never | Size: 8.56 KB | Hits: 1457
- <script language="javascript" type="text/javascript">
- tinyMCE.init({
- mode : "textareas",
- theme : "simple"
- });
- </script>
- <script language="javascript" type="text/javascript">
- function confirmDelete()
- {
- var agree=confirm("Weet u zeker dat u dit nieuwsbericht wilt verwijderen?");
- if (agree)
- return true;
- else
- return false;
- }
- </script>
- <div id="inhoud-left">
- <div class="panel">
- <h1><span><a href="index.php?p=nieuws&sub=add">Voeg nieuws toe</a></span>Nieuws</h1>
- <table cellspacing="0">
- <tr>
- <th class="coltopll" align="left">Titel / URL</th>
- <th class="coltoprr">Delete</th>
- <th class="coltopr">Bewerk</th>
- </tr>
- <?php
- if ($kleur == 'odd')
- $kleur = 'even';
- else $kleur = 'odd';
- print '
- <tr>
- <td class="midden '.$kleur.'" align="left">
- <a href="../nieuws.php?view=bericht&id='.$row['id'].'" target="_blank">'.$row['titel'].'</a> <span style="font-size: 9px; color: #999;">( '.$row['datum'].' )</span>
- </td>
- <td class="zijkant '.$kleur.'" align="center">
- [ <a href="index.php?p=nieuws&sub=del&id='.$row['id'].'" onclick='return confirmDelete();'>X</a> ]
- </td>
- <td class="zijkant '.$kleur.'" align="center">
- [ <a href="index.php?p=nieuws&sub=edit&id='.$row['id'].'">edit</a> ]
- </td>
- </tr>
- ';
- }
- }
- ?>
- </table>
- <div class="panel-footer"> </div>
- </div>
- <?php
- if ($_POST['submit']) {
- foreach ($_POST as $key => $value) {
- }
- // NEWS
- $titel = $_POST['titel'];
- $dag = $_POST['dag'];
- $maand = $_POST['maand'];
- $jaar = $_POST['jaar'];
- $verhaal = $_POST['verhaal'];
- VALUES ($titel, $datum, $verhaal)
- ");
- print '<h5>Klaar is <span>KEES</span>! Pagina is succesvol aangemaakt!</h5><meta http-equiv="refresh" content="1;URL=index.php?p=pages" />';
- }
- ?>
- <div class="panel">
- <h1>Voeg Nieuwsbericht toe!</h1>
- <form action="" method="post">
- <table cellspacing="0">
- <tr>
- <th class="coltopl" colspan="2"> </th>
- <th class="coltop"> </th>
- <th class="coltopr"> </th>
- </tr>
- <tr>
- <td class="form-l odd">
- <h2>Titel</h2>
- </td>
- <td class="breed odd" colspan="2">
- <input name="titel" size="30" />
- </td>
- </tr>
- <tr>
- <td class="form-l even">
- <h2>Datum</h2>
- </td>
- <td class="form-r even" colspan="2">
- <?php
- $stakker = getDates($tijd);
- print '<select name="days">'."n";
- foreach ($stakker['days'] as $key => $value) {
- if ($key !== 'selected') {
- print '<option value="'.$value.'"';
- if ($key == $stakker['days']['selected']) {
- print ' selected="selected"';
- }
- print ">$value</option>n";
- }
- }
- print '</select>';
- print '<select name="months">'."n";
- foreach ($stakker['months'] as $key => $value) {
- if ($key !== 'selected') {
- print '<option value="'.$value.'"';
- if ($key == $stakker['months']['selected']) {
- print ' selected="selected"';
- }
- print ">$value</option>n";
- }
- }
- print '</select>';
- print '<select name="year">'."n";
- foreach ($stakker['year'] as $key => $value) {
- if ($key !== 'selected') {
- print '<option value="'.$value.'"';
- if ($key == $stakker['year']['selected']) {
- print ' selected="selected"';
- }
- print ">$value</option>n";
- }
- }
- print '</select>';
- print '<select name="hours">'."n";
- foreach ($stakker['hours'] as $key => $value) {
- if ($key !== 'selected') {
- print '<option value="'.$value.'"';
- if ($key == $stakker['hours']['selected']) {
- print ' selected="selected"';
- }
- print ">$value</option>n";
- }
- }
- print '</select>';
- print '<select name="minutes">'."n";
- foreach ($stakker['minutes'] as $key => $value) {
- if ($key !== 'selected') {
- print '<option value="'.$value.'"';
- if ($key == $stakker['minutes']['selected']) {
- print ' selected="selected"';
- }
- print ">$value</option>n";
- }
- }
- print '</select>';
- print '<select name="seconds">'."n";
- foreach ($stakker['seconds'] as $key => $value) {
- if ($key !== 'selected') {
- print '<option value="'.$value.'"';
- if ($key == $stakker['seconds']['selected']) {
- print ' selected="selected"';
- }
- print ">$value</option>n";
- }
- }
- print '</select>';
- function getDates($timestamp = false) {
- $maanden = array(1 => "januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december");
- $toret['months'] = $maanden;
- if ($timestamp) {
- $toret['months']['selected'] = $maand;
- $toret['days']['selected'] = $dag;
- $toret['hours']['selected'] = $uur;
- $toret['minutes']['selected'] = $minuten;
- $toret['seconds']['selected'] = $seconden;
- $toret['year']['selected'] = $jaar;
- }
- for ($i = 1; $i <= 31; $i++) {
- $toret['days'][$i] = $i;
- }
- for ($i = 0; $i <= 23; $i++) {
- $toret['hours'][$i] = $i;
- }
- for ($i = 0; $i <= 59; $i++) {
- $toret['minutes'][$i] = '0'.$i;
- $toret['seconds'][$i] = '0'.$i;
- }
- else {
- $toret['minutes'][$i] = $i;
- $toret['seconds'][$i] = $i;
- }
- }
- $toret['year'][$i] = $i;
- }
- return $toret;
- }
- ?>
- </td>
- </tr>
- <tr>
- <td class="form-l odd">
- <h2>Bericht</h2>
- </td>
- <td class="form-r odd" colspan="2">
- <textarea name="verhaal" cols="35" rows="10"></textarea>
- </td>
- </tr>
- <tr>
- <td class="form-l even">
- </td>
- <td class="form-r even" colspan="2">
- <input type="submit" name="submit" value="verzend" />
- </td>
- </tr>
- </table>
- </form>
- <div class="panel-groot-footer"> </div>
- </div>
- </div>
- <div id="inhoud-right">
- <div class="text-vlak">
- <div class="text-vlak-h"><img src="images/KEES_legt_uit_orange.jpg" alt="KEES legt uit" /></div>
- <div class="text-vlak-m">
- <strong>Volgordes</strong> - Door middel van cijfers in de volgorde vakjes in te voeren,
- bepaalt u de volgorde van de pagina's in uw menu
- <p><strong>Wijzigen/verwijderen</strong> - Klik op een pagina titel om hem te wijzigen of te verwijderen.</p>
- <p><strong>KEES in 't snel</strong> - Je kunt vliegensvlug een pagina aanmaken onder het overzicht.
- Als je niet alle extra functies nodig hebt! Heb je deze wel nodig? Klik dan op "Voeg toe" onder het
- overzicht!</p>
- </div>
- <div class="text-vlak-f"> </div>
- </div>
- </div>
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago