tester
By: ruben | Date: Nov 12 2007 22:10 | Format: PHP | Expires: never | Size: 7.54 KB | Hits: 1447
- <script language="javascript" type="text/javascript">
- tinyMCE.init({
- mode : "textareas",
- theme : "advanced"
- });
- </script>
- <?php
- if ($_POST['submit']) {
- foreach ($_POST as $key => $value) {
- }
- $titel = $_POST['titel'];
- $dag = $_POST['dag'];
- $maand = $_POST['maand'];
- $jaar = $_POST['jaar'];
- $uren = $_POST['uren'];
- $minutes = $_POST['minutes'];
- $seconds = $_POST['seconds'];
- $functie = $_POST['functie'];
- $salaris = $_POST['salaris'];
- $status = $_POST['status'];
- $omschrijving = $_POST['omschrijving'];
- mysql_query("INSERT INTO vacatures (`titel` , `datum` , `functie`, `salaris` , `status` , `omschrijving`)
- VALUES ($titel, $datum, $functie, $salaris, $status, $omschrijving)
- ");
- print '<h5>Klaar is <span>KEES</span>! Pagina is succesvol aangemaakt!</h5>
- ';
- }
- ?>
- <div class="panel-groot">
- <h1>Pagina toevoegen</h1>
- <form action="" method="post">
- <table cellspacing="0" class="groot">
- <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>Functie</h2>
- </td>
- <td class="form-r odd" colspan="2">
- <input name="functie" size="30" />
- </td>
- </tr>
- <tr>
- <td class="form-l even">
- <h2>Salaris</h2>
- </td>
- <td class="form-r even" colspan="2">
- <input name="salaris" size="30" />
- </td>
- </tr>
- <tr>
- <td class="form-l odd">
- <h2>Status</h2>
- </td>
- <td class="form-r odd" colspan="2">
- <select name="status">
- <option value="1">open</option>
- <option value="2">gepauzeerd</option>
- <option value="3">vervuld</option>
- </select>
- </td>
- </tr>
- <tr>
- <td class="form-l even">
- <h2>Omschrijving</h2>
- </td>
- <td class="form-r even" colspan="2" style="padding: 10px 0 10px 0;">
- <textarea name="omschrijving" cols="60" rows="15"></textarea>
- </td>
- </tr>
- <tr>
- <td class="form-l odd">
- </td>
- <td class="form-r odd" colspan="2">
- <input type="submit" name="submit" value="verzend" />
- </td>
- </tr>
- </table>
- </form>
- <div class="panel-groot-footer"> </div>
- </div>
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago