agenda-php-en-mysql

Gesponsorde koppelingen

PHP script bestanden

  1. agenda-php-en-mysql

« Lees de omschrijving en reacties

index.php:
------------

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
<head>
<link rel="stylesheet" href="css/style1.css" type="text/css">
<SCRIPT language="JavaScript">
function submitform()
{
  document.formpje.submit();
}
</SCRIPT>
</head>
<body>

<form name="formpje" method="post" action="agenda.php">
<?
$jaar
= date("Y");
$maand = date("m");
$dag = date("d");
echo '<input name="jaar"   value="'. $jaar  . '" type=hidden>' ;
echo '<input name="maand"  value="'. $maand . '" type=hidden>' ;
echo '<input name="dag"    value="'. $dag   . '" type=hidden>'  ;
echo '<A href="javascript: submitform()">Bekijk Agenda</A>';
?>


</body>
</html>


agenda.php;
--------------
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<? include 'inc/connect.inc.php'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Agenda</title>
<link rel="stylesheet" href="css/style1.css" type="text/css">
</head>

<body>

<h1> Digitaal agenda </h1>

<table width="400" border="0" cellspacing="0" cellpadding="0">
  <tr align="left" valign="top">
    <th scope="col">Jaar</th>
    <th scope="col">Maand</th>
    <th scope="col">Dag</th>
    <th scope="col">&nbsp;</th>
  </tr>
  <tr align="left" valign="top">
    <td>
<?

if(isset($_GET['showall']))
{

   $showall = $_GET['showall'] ;
   if($showall== '1')
   {

   include 'forms/htmlijst.php';
   }

   else
   {
   include 'forms/phplijst.php';
   }
}

else
{
include 'forms/phplijst.php';
}


?>


    </td>
    <td align="center">
    
    <input type="submit" value="vernieuwen" class="inputbox"></form>

    </td>
  </tr>

  <tr>
    <td colspan="4">


<?php

if(isset($_GET['mx']))
{

$max = $_GET['mx'];
}

else
{
$max = 10;
}


if(isset($_GET['rws']))
{

 $start = $_GET['rws'];
 }

else
{
$start = 0;
}



$end = $start + $max;
$prev = $start - $max;
$next = $end;


if(isset($_POST['jaar']) || isset($_POST['maand']))
{

  $jaar = $_POST['jaar'];
  $maand = $_POST['maand'];
  if($_POST['dag'] == 'alles')
  {

    $jaar = $_POST['jaar'];
    $maand = $_POST['maand'];
    $dag = '';
    $query = mysql_query("SELECT * FROM calender WHERE jaar = '$jaar' AND maand = '$maand' ORDER BY id DESC LIMIT $start, $max") or die (mysql_error());
  }

  else
  {
    if(isset($_POST['dag']))
    {

    $dag = $_POST['dag'];
    $query = mysql_query("SELECT * FROM calender WHERE jaar = '$jaar' AND maand = '$maand' AND dag = '$dag' ORDER BY id DESC LIMIT $start, $max") or die (mysql_error());
    }
  }
}

else
{
    $query = mysql_query("SELECT * FROM calender ORDER BY id DESC LIMIT $start, $max") or die (mysql_error());
}


$num = mysql_num_rows($query);
if (empty($num))
{

   echo "<center><p>Er zijn geen taken gevonden.</p></center>";
}

else
{
  while ($row = mysql_fetch_array ($query))
{

$vandaag = date("d-m-Y");

$kenmerk =  'align="right"';
$kenmerk2 =  'class="datum"';

$datum = $row['dag'].'-'.$row['maand'].'-'.$row['jaar'];

echo '<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <th width="88" scope="col" '
;

        if ($datum == $vandaag)
        {

          echo $kenmerk;
        }

        else
        {
          echo $kenmerk2;
        }

        
echo    '>'.$row['dag'].'-'.$row['maand'].'-'.$row['jaar'].'</th>
        <th colspan="2" scope="col" align="left" class="titel">'
.$row['taaknaam'].'</th>
        </tr>
      <tr>
        <td colspan="3"><div class="takendiv">'
.$row['taken'].'</div>
        </td>
        </tr>
      <tr>
        <td></td>
        <td width="277" align="right"><a href="javascript:var EffectiveNewWin = window.open('
; echo "'admin/agenda_wijzigen.php?vid=".$row['Id']."&tn=".$row['taaknaam']."','Voegtoe','width=331,height=390,resizable'); EffectiveNewWin.focus();"; echo '">W</a>
                                      <a href="javascript:var EffectiveNewWin = window.open('
; echo "'admin/agenda_verwijderen.php?vid=".$row['Id']."&tn=".$row['taaknaam']."','Voegtoe','width=331,height=160,resizable'); EffectiveNewWin.focus();"; echo '">X</a>

        </td>
        <td width="135" class="tijd" align="center">van '
.$row['tijd'].' tot '.$row['tijd2'].'</td>
      </tr>
    </table><br>'
;
}


  echo '<div align="right" valign="middle" style="padding-right:15px" > <b class="opmerking">';
  
  if ($prev >= '0')
  {

     echo '&nbsp;[<a href="home.php?pagina=view_autos&rws='.$prev.'&mx='.$max.'">Vorige pagina</a>]&nbsp;';
  }
else {
     echo "";
  }


  $count = mysql_fetch_row(mysql_query("SELECT count(*) FROM calender"));

  $thispage = ceil($start/$max+1);

  if ($count[0] > $max)
  {

     $total = ceil($count[0]/$max);
     for($i=0;$i<$total;$i++)
     {

          $number  = $i+1;
          $start = $i*$max;

         if ($thispage == $number)
          {

           echo '<strong>&nbsp;[<a href="home.php?pagina=view_autos&rws=' . $start . '&mx=' . $max . '">' . $number . '</a>]&nbsp;</strong>';
         }
else {
           echo '<a href="home.php?pagina=view_autos&rws=' . $start . '&mx=' . $max . '">&nbsp;' . $number . '&nbsp;</a>';
         }
     }
  }


  if ($count[0] > $next)
  {

     echo "&nbsp;[<a href=\"home.php?pagina=view_autos&rws=$next&mx=$max\">Volgende pagina</a>]&nbsp;\n";
  }
else {
     echo "\n";
  }

  echo "</p>\n";
}

?>


 <div align="center" valign="middle">
<b class="langetoelichtingonderaaneenopsomming"></b>
<a href="javascript:var EffectiveNewWin = window.open('admin/agenda_toevoegen.php','Voegtoe','width=331,height=390,resizable'); EffectiveNewWin.focus();">Taak toevoegen</a> - <a href="agenda.php?showall=1">Alle taken tonen</a> - <a href="agenda.php?showall=1">Lijst vernieuwen</a>

    

    
    
    </td>
  </tr>
</table>



</body>
</html>


Plaat connect.inc.php in de map inc/;
------------------------------------------
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
<?php
mysql_connect("127.0.0.1", "username", "wachtwoord") or die(mysql_error());
mysql_select_db("agenda") or die(mysql_error());

?>


Plaats htmlijst.php in de map forms/;
------------------------------------------
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
    <form method="post" action="agenda.php">
        
        <select name="jaar" style="width:100px;">
          <option value="2006">2006</option>
          <option value="2007">2007</option>
        </select>

    </td>
    <td>
    
            <select name="maand" style="width:100px;">
          <option value="01">januari</option>
          <option value="02">februari</option>
          <option value="03">maart</option>
          <option value="04">april</option>
          <option value="05">mei</option>
          <option value="06">juni</option>
          <option value="07">juli</option>
          <option value="08">augustus</option>
          <option value="09">september</option>
          <option value="10">oktober</option>
          <option value="11">november</option>
          <option value="12">december</option>
        </select>
    
    </td>
    <td>

            <select name="dag" style="width:100px;">
          <option value="alles">Alles</option>
          <option value="01">1</option>
          <option value="02">2</option>
          <option value="03">3</option>
          <option value="04">4</option>
          <option value="05">5</option>
          <option value="06">6</option>
          <option value="07">7</option>
          <option value="08">8</option>
          <option value="09">9</option>
          <option value="10">10</option>
          <option value="11">11</option>
          <option value="12">12</option>
          <option value="13">13</option>
          <option value="14">14</option>
          <option value="15">15</option>
          <option value="16">16</option>
          <option value="17">17</option>
          <option value="18">18</option>
          <option value="19">19</option>
          <option value="20">20</option>
          <option value="21">21</option>
          <option value="22">22</option>
          <option value="23">23</option>
          <option value="24">24</option>
          <option value="25">25</option>
          <option value="26">26</option>
          <option value="27">27</option>
          <option value="28">28</option>
          <option value="29">29</option>
          <option value="30">30</option>
          <option value="31">31</option>
        </select>


Plaats phplijst.php in de map forms/;
------------------------------------------
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
    <form method="post" action="agenda.php">
        
        <select name="jaar" style="width:100px;">
          <option value="2006"  <? if($_POST['jaar']== '2006'){echo 'selected';}else {echo '';} ?> >2006</option>
          <option value="2007"  <? if($_POST['jaar']== '2007'){echo 'selected';}else {echo '';} ?> >2007</option>
        </select>

    </td>
    <td>
    
            <select name="maand" style="width:100px;">
          <option value="01" <? if($_POST['maand']== '01'){echo 'selected';}else {echo '';} ?> >januari</option>
          <option value="02" <? if($_POST['maand']== '02'){echo 'selected';}else {echo '';} ?> >februari</option>
          <option value="03" <? if($_POST['maand']== '03'){echo 'selected';}else {echo '';} ?> >maart</option>
          <option value="04" <? if($_POST['maand']== '04'){echo 'selected';}else {echo '';} ?> >april</option>
          <option value="05" <? if($_POST['maand']== '05'){echo 'selected';}else {echo '';} ?> >mei</option>
          <option value="06" <? if($_POST['maand']== '06'){echo 'selected';}else {echo '';} ?> >juni</option>
          <option value="07" <? if($_POST['maand']== '07'){echo 'selected';}else {echo '';} ?> >juli</option>
          <option value="08" <? if($_POST['maand']== '08'){echo 'selected';}else {echo '';} ?> >augustus</option>
          <option value="09" <? if($_POST['maand']== '09'){echo 'selected';}else {echo '';} ?> >september</option>
          <option value="10" <? if($_POST['maand']== '10'){echo 'selected';}else {echo '';} ?> >oktober</option>
          <option value="11" <? if($_POST['maand']== '11'){echo 'selected';}else {echo '';} ?> >november</option>
          <option value="12" <? if($_POST['maand']== '12'){echo 'selected';}else {echo '';} ?> >december</option>
        </select>
    
    </td>
    <td>

            <select name="dag" style="width:100px;">
          <option value="alles" <? if($_POST['dag']== 'alles'){echo 'selected';}else {echo '';} ?> >Alles</option>
          <option value="01" <? if($_POST['dag']== '01'){echo 'selected';}else {echo '';} ?> >1</option>
          <option value="02" <? if($_POST['dag']== '02'){echo 'selected';}else {echo '';} ?> >2</option>
          <option value="03" <? if($_POST['dag']== '03'){echo 'selected';}else {echo '';} ?> >3</option>
          <option value="04" <? if($_POST['dag']== '04'){echo 'selected';}else {echo '';} ?> >4</option>
          <option value="05" <? if($_POST['dag']== '05'){echo 'selected';}else {echo '';} ?> >5</option>
          <option value="06" <? if($_POST['dag']== '06'){echo 'selected';}else {echo '';} ?> >6</option>
          <option value="07" <? if($_POST['dag']== '07'){echo 'selected';}else {echo '';} ?> >7</option>
          <option value="08" <? if($_POST['dag']== '08'){echo 'selected';}else {echo '';} ?> >8</option>
          <option value="09" <? if($_POST['dag']== '09'){echo 'selected';}else {echo '';} ?> >9</option>
          <option value="10" <? if($_POST['dag']== '10'){echo 'selected';}else {echo '';} ?> >10</option>
          <option value="11" <? if($_POST['dag']== '11'){echo 'selected';}else {echo '';} ?> >11</option>
          <option value="12" <? if($_POST['dag']== '12'){echo 'selected';}else {echo '';} ?> >12</option>
          <option value="13" <? if($_POST['dag']== '13'){echo 'selected';}else {echo '';} ?> >13</option>
          <option value="14" <? if($_POST['dag']== '14'){echo 'selected';}else {echo '';} ?> >14</option>
          <option value="15" <? if($_POST['dag']== '15'){echo 'selected';}else {echo '';} ?> >15</option>
          <option value="16" <? if($_POST['dag']== '16'){echo 'selected';}else {echo '';} ?> >16</option>
          <option value="17" <? if($_POST['dag']== '17'){echo 'selected';}else {echo '';} ?> >17</option>
          <option value="18" <? if($_POST['dag']== '18'){echo 'selected';}else {echo '';} ?> >18</option>
          <option value="19" <? if($_POST['dag']== '19'){echo 'selected';}else {echo '';} ?> >19</option>
          <option value="20" <? if($_POST['dag']== '20'){echo 'selected';}else {echo '';} ?> >20</option>
          <option value="21" <? if($_POST['dag']== '21'){echo 'selected';}else {echo '';} ?> >21</option>
          <option value="22" <? if($_POST['dag']== '22'){echo 'selected';}else {echo '';} ?> >22</option>
          <option value="23" <? if($_POST['dag']== '23'){echo 'selected';}else {echo '';} ?> >23</option>
          <option value="24" <? if($_POST['dag']== '24'){echo 'selected';}else {echo '';} ?> >24</option>
          <option value="25" <? if($_POST['dag']== '25'){echo 'selected';}else {echo '';} ?> >25</option>
          <option value="26" <? if($_POST['dag']== '26'){echo 'selected';}else {echo '';} ?> >26</option>
          <option value="27" <? if($_POST['dag']== '27'){echo 'selected';}else {echo '';} ?> >27</option>
          <option value="28" <? if($_POST['dag']== '28'){echo 'selected';}else {echo '';} ?> >28</option>
          <option value="29" <? if($_POST['dag']== '29'){echo 'selected';}else {echo '';} ?> >29</option>
          <option value="30" <? if($_POST['dag']== '30'){echo 'selected';}else {echo '';} ?> >30</option>
          <option value="31" <? if($_POST['dag']== '31'){echo 'selected';}else {echo '';} ?> >31</option>
        </select>


Plaats style1.css in de map css/ ;
--------------------------------------
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
body{
background-color: #E7F5FE;
margin-top:10px;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
font-weight:bold;

}
P, B{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
font-weight:normal;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
color:#999999;
}
.inputbox{
background:#999999;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
font-weight:bold;
color: #333333;
scrollbar-face-color:#999999;
scrollbar-highlight-color:black;
scrollbar-3dlight-color:#000000;
scrollbar-shadow-color:#000000;
scrollbar-darkshadow-color: #333333;
scrollbar-track-color:#999999;
scrollbar-arrow-color:black;
}
A:link{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
color:#333333;
font-style:normal;
font-weight:bold;
text-decoration:none;
}
A:visited{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
color:#333333;
font-style:normal;
font-weight:bold;
text-decoration:none;
}
A:active{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
color:#000000;
font-style:normal;
font-weight:bold;
text-decoration:none;
}
A:hover{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
color:#999999;
font-style:normal;
font-weight:bold;
text-decoration:none;
}
.datum{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
padding-left:4px;
background-color: #CCCCCC;
border-style:solid;
border-color:#000000;
padding-top:0px;
}
.titel{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
padding-left:4px;
background-color:#999999;
border-style:solid;
border-color:#666666;
border-width:1px;
padding-top:0px;
}
.tijd{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:9px;
background-color: #CCCCCC;
border-style:solid;
border-color:#666666;
border-width:1px;
padding-top:0px;
}
.takendiv{
background-color:#FFFFFF;
padding-top:4px;
padding-left:10px;
padding-bottom:8px;
border:groove;
border-width:1px;
border-color:#333333;
width:400px;
}


Maak agenda_wijzigen.php in het mapje admin/;
-------------------------------------------------------
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<? include '../inc/connect.inc.php'; ?>
<HTML>
<HEAD>

<TITLE>Taak toevoegen</TITLE>
<link rel="stylesheet" href="../css/style1.css" type="text/css">


</HEAD>



<body>
<?php

if(isset($_POST['taaknaam']))
{

$ajaar = $_POST['jaar'];
$amaand = $_POST['maand'];
$adag = $_POST['dag'];
$ataken = $_POST['taken'];
$atijd = $_POST['tijd'];
$ataaknaam = $_POST['taaknaam'];
$atijd2 = $_POST['tijd2'];
$aid = $_POST['Id'];


$query2 = "UPDATE calender SET dag = '$adag', maand = '$amaand', jaar = '$ajaar', taken = '$ataken', tijd = '$atijd', taaknaam = '$ataaknaam', tijd2 = '$atijd2' WHERE Id = '$aid'";
$invoer = mysql_query($query2) or die(mysql_error());
echo '<center><h3>Taak is gewijzigd</h3><meta http-equiv="refresh" content="3; url=javascript: window.close()"> Dit venster zal automatisch sluiten</center><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>';

}

else
{

 $tid = $_GET['vid'];
 $query = mysql_query("SELECT * FROM calender WHERE Id = '$tid'") or die (mysql_error());
 while ($row = mysql_fetch_array ($query))
 {

   echo  '<form method="post" action="agenda_wijzigen.php">

    Datum:<br>
    --------------------------------------------------------------<br>
        dag
        <input type="text" name="dag" size=5 maxlength=100 value="'
.$row['dag'].'">
        <input name="Id"  value="'
. $row['Id'] . '" type=hidden>
        maand
        <input type="text" name="maand" size=5 maxlength=100 value="'
.$row['maand'].'">
        jaar
        <input type="text" name="jaar" size=5 maxlength=100 value="'
.$row['jaar'].'">    <br> <br>

        Tijd:<br>
         --------------------------------------------------------------<br>
        van: <input type="text" name="tijd" size=5 maxlength=100 value="'
.$row['tijd'].'"> tot: <input type="text" name="tijd2" size=5 maxlength=5 value="'.$row['tijd2'].'"><br><br>
        Taaknaam:<br>
         --------------------------------------------------------------<br>
        <input type="text" name="taaknaam" size=47 maxlength=100 value="'
.$row['taaknaam'].'"> <br>  <br>
        Taaktext:<br>
         --------------------------------------------------------------<br>
        <textarea type="text" name="taken" cols="36" rows="6" value="'
.$row['taken'].'"></textarea>
          <br>  <br>
    <center>    <input type="submit" value="Wijziging toepassen" /></center>

 </form>'
;
 
 }
}


?>

</body>
</html>


Maak agenda_verwijderen.php in het mapje admin/;
------------------------------------------------------------
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<HTML>
<HEAD>
<? include '../inc/connect.inc.php'; ?>
<TITLE>Taak verwijderen</TITLE>
<link rel="stylesheet" href="../css/style1.css" type="text/css">
<SCRIPT language="JavaScript">
function submitform()
{
  document.formpje.submit();
}
</SCRIPT>

</HEAD>


<body>





<?php
$taaknaam
= $_GET['tn'];
$taakid = $_GET['vid'];
echo '<center><br>weet u zeker dat u "'.$taaknaam.'" wilt verwijderen ?';
echo '<form method="post" name="formpje" action="agenda_verwijderen.php?vid='.$taakid.'&tn='.$taaknaam.'">
      <INPUT TYPE="hidden" NAME="Id" VALUE="'
.$taakid.'">
  <A href="javascript: submitform()">Ja</A> \
  <A href="javascript: window.close()">Nee</A></center>'
;

if (isset($_POST['Id']))
{

 $vis = $_POST['Id']  ;
 $qryDelete = "DELETE FROM calender WHERE Id=$vis";
 $Delete = mysql_query($qryDelete) or die(mysql_error());

 echo '<center><h3>Taak is verwijderd</h3><meta http-equiv="refresh" content="3; url=javascript: window.close()"> Dit venster zal automatisch sluiten</center>';
}

?>



</body>
</html>


Maak agenda_toevoegen.php in het mapje admin/;
----------------------------------------------------------
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<? include '../inc/connect.inc.php'; ?>
<HTML>
<HEAD>

<TITLE>Taak toevoegen</TITLE>
<link rel="stylesheet" href="../css/style1.css" type="text/css">


</HEAD>



<body>
<?php

if(isset($_POST['taaknaam']))
{


$query = "INSERT INTO calender (dag, maand, jaar, taken, tijd, taaknaam, tijd2) VALUES ('".$_REQUEST['dag']."','".$_REQUEST['maand']."','".$_REQUEST['jaar']."','".$_REQUEST['taken']."','".$_REQUEST['tijd']."','".$_REQUEST['taaknaam']."','".$_REQUEST['tijd2']."')";
$invoer = mysql_query($query) or die(mysql_error());
echo '<center><h3>Taak is toegevoegd</h3><meta http-equiv="refresh" content="3; url=javascript: window.close()"> Dit venster zal automatisch sluiten</center><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>';

}

?>





    <form method="post" action="agenda_toevoegen.php">

    Datum:<br>
    --------------------------------------------------------------<br>
          <select name="dag" style="width:100px;">
          <option value="01">1</option>
          <option value="02">2</option>
          <option value="03">3</option>
          <option value="04">4</option>
          <option value="05">5</option>
          <option value="06">6</option>
          <option value="07">7</option>
          <option value="08">8</option>
          <option value="09">9</option>
          <option value="10">10</option>
          <option value="11">11</option>
          <option value="12">12</option>
          <option value="13">13</option>
          <option value="14">14</option>
          <option value="15">15</option>
          <option value="16">16</option>
          <option value="17">17</option>
          <option value="18">18</option>
          <option value="19">19</option>
          <option value="20">20</option>
          <option value="21">21</option>
          <option value="22">22</option>
          <option value="23">23</option>
          <option value="24">24</option>
          <option value="25">25</option>
          <option value="26">26</option>
          <option value="27">27</option>
          <option value="28">28</option>
          <option value="29">29</option>
          <option value="30">30</option>
          <option value="31">31</option>
        </select>

    
          <select name="maand" style="width:100px;">
          <option value="01">januari</option>
          <option value="02">februari</option>
          <option value="03">maart</option>
          <option value="04">april</option>
          <option value="05">mei</option>
          <option value="06">juni</option>
          <option value="07">juli</option>
          <option value="08">augustus</option>
          <option value="09">september</option>
          <option value="10">oktober</option>
          <option value="11">november</option>
          <option value="12">december</option>
        </select>
    
        <select name="jaar" style="width:100px;">
          <option value="2006">2006</option>
          <option value="2007">2007</option>
        </select>    <br> <br>

        Tijd:<br>
         --------------------------------------------------------------<br>
        van: <input type="text" name="tijd" size=5 maxlength=100 value="00:00"> tot: <input type="text" name="tijd2" size=5 maxlength=5 value="23:59"><br><br>
        Taaknaam:<br>
         --------------------------------------------------------------<br>
        <input type="text" name="taaknaam" size=47 maxlength=100> <br>  <br>
        Taaktext:<br>
         --------------------------------------------------------------<br>
        <textarea type="text" name="taken" cols="36" rows="6"></textarea>
          <br>  <br>
    <center>    <input type="submit" value="Taak toevoegen" /></center>

 </form>


</body>
</html>

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.