[#] hm X_Shell Backd00r [#]
<?php
require_once '../modelo/Calendar.class.php';
if(!empty($_POST)){
$mes = $_POST['mes'];
$act = $_POST['action'];
$ani = $_POST['anio'];
$_m = array(
'1' => '01',
'2' => '02',
'3' => '03',
'4' => '04',
'5' => '05',
'6' => '06',
'7' => '07',
'8' => '08',
'9' => '09',
'10' => '10',
'11' => '11',
'12' => '12'
);
switch($act){
case '1'://Back
if($mes == '1' || $mes == 1):
$mes = 12;
$ani = $ani - 1;
else:
$mes = $mes - 1;
$mes = $_m[$mes];
endif;
break;
case '2'://Next
if($mes == '12' || $mes == 12):
$mes = '01';
$ani = $ani + 1;
else:
$mes = $mes + 1;
$mes = $_m[$mes];
endif;
break;
default:
# code...
break;
}
$_calendar = new Calendar();
echo $_calendar->draw_calendar($mes,$ani);
}else{ return false;}
?>
Mr.hm X_Shell Backd00r 1.0, Coded By Mr.hm X_Shell Backd00r