// $arr['month']; // $arr['day']; // // echo var_dump($arr['year']); // echo var_dump($arr['month']); // echo var_dump($arr['day']); /* class CalData{ function __construct($id, $title, $start, $level, $message){ $this->id = $id; $this->title = $title; $this->start = $start; $this->level = $level; $this->message = $message; } public $id = null; public $title = null; public $start = null; // 日期 public $level = null; public $message = null; } */ //test //$arr = array(new CalData(6, 'qwe', '2015-08-01', '2', 'fdsfdsf'), new CalData(6, 'qwe', '2015-08-02', '2', 'fdsfdsf')); $result['arr'] = get_CalData($arr); //result $result["status"] = true; $tmp = json_encode($result); echo $tmp;
// $this->start = $start; // $this->level = $level; // $this->message = $message; // } // public $id = null; // public $title = null; // public $start = null; // 日期 // public $level = null; // public $message = null; // } require_once "cal_action.php"; $date = date("Y-m-d"); $temp = explode('-', $date); $arr['year'] = $temp[0]; $arr['month'] = $temp[1]; $cal_data = get_CalData($arr); //nead to fix to connet the db // $cal_data = array( // new CalData(1,'hehehe','2015-07-03', 1, 'werysdfgsdfg'), // new CalData(2,'hehe','2015-07-05', 2, 'werysdfsfdsdfgsdfg'), // new CalData(3,'hehehexx','2015-07-07', 3, 'wegdfgrysdfgsdfdsfsfg'), // new CalData(4,'hxxehehe','2015-07-09', 1, 'werdgfdgdgfdfysdfgsdfdsfg'), // new CalData(5,'hehhghhhhhehe','2015-07-11', 2, 'wegfdggfdgfdgfdgdfgdrysdfgsdffs') // ); ?> <script> var choosedID = null; var choosedDate = null; function getYYMMDD(date){ var d=date;//new Date();