:::

4-5 /get_event.php

<?php
include "../../mainfile.php";

$start = date("Y-m-d" , $_REQUEST['start']/1000);
$end = date("Y-m-d" , $_REQUEST['end']/1000);

$sql = "select sn, birthday, name from `" . $xoopsDB->prefix("phone_book") . "` where birthday >= '{$start}' and birthday < '{$end}'";
$result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'], 3, mysql_error());

$i=0;
while (list($sn ,$birthday ,$name) = $xoopsDB->fetchRow($result)) {
  $myEvents[$i]['title']     = $name;
  $myEvents[$i]['start']     = $birthday;
  $myEvents[$i]['url']       = "index.php?sn={$sn}";
  $myEvents[$i]['color']     = 'red';

  $i++;
}


// $myEvents[0]['title']     = '開始';
// $myEvents[0]['start']     = $start;

// $myEvents[1]['title']     = '今天';
// $myEvents[1]['start']     = '2015-10-24';

// $myEvents[2]['title']     = '結束'.$end;
// $myEvents[2]['start']     = '2015-10-31';

echo json_encode($myEvents);

 


:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1239%26tbsn%3D39

書籍目錄

展開 | 闔起

線上使用者

42人線上 (16人在瀏覽線上書籍)

會員: 0

訪客: 42

更多…