[ Index ] |
|
Code source de WebCalendar 1.0.5 |
1 <?php 2 if ( empty ( $PHP_SELF ) && ! empty ( $_SERVER ) && 3 ! empty ( $_SERVER['PHP_SELF'] ) ) { 4 $PHP_SELF = $_SERVER['PHP_SELF']; 5 } 6 if ( ! empty ( $PHP_SELF ) && preg_match ( "/\/includes\//", $PHP_SELF ) ) { 7 die ( "You can't access this file directly!" ); 8 } 9 global $month, $day, $year; 10 ?> 11 12 <script type="text/javascript"> 13 <!-- <![CDATA[ 14 // detect browser 15 NS4 = (document.layers) ? 1 : 0; 16 IE4 = (document.all) ? 1 : 0; 17 // W3C stands for the W3C standard, implemented in Mozilla (and Netscape 6) and IE5 18 W3C = (document.getElementById) ? 1 : 0; 19 //Function is similar to visible.php, but effects the parent 20 function makeVisible ( name ) { 21 var ele; 22 23 if ( W3C ) { 24 ele = window.opener.document.getElementById(name); 25 } else if ( NS4 ) { 26 ele = window.opener.document.layers[name]; 27 } else { // IE4 28 ele = window.opener.document.all[name]; 29 } 30 31 if ( NS4 ) { 32 ele.visibility = "show"; 33 } else { // IE4 & W3C & Mozilla 34 ele.style.visibility = "visible"; 35 } 36 } 37 38 function schedule_event(hours, minutes) { 39 var year =<?php echo $year ?> ; 40 var month =<?php echo $month ?> ; 41 var day =<?php echo $day ?> ; 42 if (confirm("<?php etranslate("Change the date and time of this entry?")?>")) { 43 var parentForm = window.opener.document.editentryform; 44 parentForm.timetype.selectedIndex = 1; 45 //Make time controls visible on parent 46 makeVisible ( "timeentrystart" ); 47 if ( parentForm.duration_h ) { 48 makeVisible ( "timeentryduration" ); 49 } else { 50 makeVisible ( "timeentryend" ); 51 } 52 if ( hours > 12 ) { 53 parentForm.hour.value = hours - 12; 54 if ( parentForm.ampm ) { 55 parentForm.ampm[1].checked = true; 56 } 57 } else { 58 parentForm.hour.value = hours; 59 if ( hours == 12 && parentForm.ampm ) { 60 parentForm.ampm[1].checked = true; 61 } else { 62 if ( parentForm.ampm ) { 63 parentForm.ampm[0].checked = true; 64 } 65 } 66 } 67 parentForm.minute.value = minutes; 68 parentForm.day.selectedIndex = day - 1; 69 parentForm.month.selectedIndex = month - 1; 70 for ( i = 0; i < parentForm.year.length; i++ ) { 71 if ( parentForm.year.options[i].value == year ) { 72 parentForm.year.selectedIndex = i; 73 } 74 } 75 window.close (); 76 } 77 } 78 //]]> --> 79 </script>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Nov 30 19:09:19 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |