2 global $form, $fmonth, $fday, $fyear;
3 if (preg_match("/\/includes\//", $PHP_SELF)) {
4 die ("You can't access this file directly!");
8 <script type="text/javascript">
10 function sendDate ( date ) {
11 year = date.substring ( 0, 4 );
12 month = date.substring ( 4, 6 );
13 day = date.substring ( 6, 8 );
14 window.opener.document.<?php echo $form ?>.<?php echo $fday ?>.selectedIndex = day - 1;
15 window.opener.document.<?php echo $form ?>.<?php echo $fmonth ?>.selectedIndex = month - 1;
16 for ( i = 0; i < window.opener.document.<?php echo $form ?>.<?php echo $fyear ?>.length; i++ ) {
17 if ( window.opener.document.<?php echo $form ?>.<?php echo $fyear ?>.options[i].value == year ) {
18 window.opener.document.<?php echo $form ?>.<?php echo $fyear ?>.selectedIndex = i;