| ||||
Respuesta: calendario agenda tengo esto quiero unir esto de java con php quiero ver si es posible AYUDA PORFAVOR
Código:
codigo javascript<?php function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array()){ $first_of_month = gmmktime(0,0,0,$month,1,$year); $day_names = array(); for($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) $day_names[$n] = ucfirst(gmstrftime('%A',$t)); list($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month)); $weekday = ($weekday + 7 - $first_day) % 7; $title = htmlentities(ucfirst($month_name)).' '.$year; @list($p, $pl) = each($pn); @list($n, $nl) = each($pn); if($p) $p = '<span class="calendar-prev">'.($pl ? '<a href="'.htmlspecialchars($pl).'">'.$p.'</a>' : $p).'</span> '; if($n) $n = ' <span class="calendar-next">'.($nl ? '<a href="'.htmlspecialchars($nl).'">'.$n.'</a>' : $n).'</span>'; $calendar = '<table class="bordeext">'."\n". '<caption class="calendar-month">'.$p.($month_href ? '<a href="'.htmlspecialchars($month_href).'">'.$title.'</a>' : $title).$n."</caption>\n<tr>"; if($day_name_length){ #if the day names should be shown ($day_name_length > 0) #if day_name_length is >3, the full name of the day will be printed foreach($day_names as $d) $calendar .= '<th abbr="'.htmlentities($d).'">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>'; $calendar .= "</tr>\n<tr>"; } if($weekday > 0) $calendar .= '<td width="50%" height="50" colspan="'.$weekday.'"> </td>'; #initial 'empty' days for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){ if($weekday == 7){ $weekday =0; #start a new week $calendar .= "</tr>\n<tr>"; } if(isset($days[$day]) and is_array($days[$day])){ @list($link, $classes, $content) = $days[$day]; if(is_null($content)) $content = $day; $calendar .= '<td'.($classes ? ' class="'.htmlspecialchars($classes).'">' : '>'). ($link ? '<a href="'.htmlspecialchars($link).'">'.$content.'</a>' : $content).'</td>'; } else $calendar .= "<td>$day</td>"; } if($weekday != 7) $calendar .= '<td colspan="'.(7-$weekday).'"> </td>'; #remaining "empty" days return $calendar."</tr>\n</table>\n"; } $time = time(); $today = date('j',$time); $days = array( 2=>array(en este lugar quiero unir el codigo java para que abra una ventana flotante), 3=>array('/weblog/archive/2004/Jan/03','linked-day' ), 8=>array('/weblog/archive/2004/Jan/08','linked-day'), 22=>array('/weblog/archive/2004/Jan/22','linked-day'), ); echo generate_calendar(2010, 9, $days,3); ?>
Código:
como los uno yo la verdad no se mucho de java y php <style> .black_overlay{ display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: transparent; z-index:1001; -moz-opacity: 0.8; opacity:.80; filter: alpha(opacity=80); } .white_content { display: none; position: absolute; top: 25%; left: 25%; width: 50%; height: 50%; padding: 16px; border: 5px solid orange; background-color: white; z-index:1002; overflow: auto; } </style> </head> <body> <p>Para abrir click <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">aquí</a></p> <div id="light" class="white_content">Contenido del lightbox<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a></div> <div id="fade" class="black_overlay"></div> </body> </html> Última edición por CaballeroAries; 14/09/2010 a las 14:18 |
Etiquetas: |