Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(-1);
- ini_set('display_errors', 'On');
- //echo $_POST['currentDay'];
- class OreGiorno {
- public $id_nominativo;
- public $tp;
- public $data;
- public $ore_lavorate;
- }
- $hMese=array();
- $user_id = $_POST['id_operatore'];
- $month = $_POST['currentMonth'];
- $year = $_POST['currentYear'];
- $numberOfDaysInMonth = cal_days_in_month(CAL_GREGORIAN, $month, $year);
- $x = $numberOfDaysInMonth;
- for($i=0;$i<=$x;$i++){
- $NuovaData = date('01') + $i . '/' . $month . '/' . $year;
- $hMese[$i] = new OreGiorno();
- $hMese[$i]->id_nominativo = $user_id;
- $hMese[$i]->tp = 10;
- $hMese[$i]->data = $NuovaData;
- $hMese[$i]->ore_lavorate = 5;
- }
- echo json_encode($hMese);
- //var_dump($week);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement