我是 dhtmlxscheduler 的新手。我创建了一些演示调度程序。众所周知,我们可以制作自定义灯箱并相应地发送数据,但是,我真正想知道的是如何将默认变量的数据从 php.ini 发送到数据库。好吧,我知道这听起来很乱。让我说清楚。下面是我的 scheduler.html:
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>How to start</title>
<link rel="stylesheet" href="dhtmlxScheduler/codebase/dhtmlxscheduler.css" type="text/css">
<style type="text/css" media="screen">
html, body{
margin:0px;
padding:0px;
height:100%;
overflow:hidden;
}
</style>
</head>
<script>
function init() {
scheduler.config.multi_day = true;
scheduler.config.xml_date="%Y-%m-%d %H:%i";
var d = new Date();
var m = d.getMonth();
var y = d.getFullYear();
scheduler.config.limit_start = new Date(y,m,1);
scheduler.config.limit_end = new Date (2100,0,1);
scheduler.init('scheduler_here', new Date(), "month");
//scheduler.load("dhtmlxScheduler/demo_php/data.php");
scheduler.locale.labels.section_type = "Type";
scheduler.config.lightbox.sections = [
{name:"description", height:200, map_to:"text", type:"textarea" , focus:true},
{name:"type", height:21, map_to:"type", type:"select", options:[
{key:"Call", label:"Call"},
{key:"Appointment", label:"Appointment"},
{key:"Both", label:"Both"}
]},
{name:"time", height:72, type:"time", map_to:"auto"},
];
scheduler.load("dhtmlxScheduler/samples/01_initialization_loading/data/types.php", function(){
scheduler.showLightbox(2);
});
var dp = new dataProcessor("dhtmlxScheduler/samples/01_initialization_loading/data/types.php");
dp.enableUTFencoding(true);
dp.init(scheduler);
function show_minical(){
if (scheduler.isCalendarVisible())
scheduler.destroyCalendar();
else
scheduler.renderCalendar({
position:"dhx_minical_icon",
date:scheduler._date,
navigation:true,
handler:function(date,calendar){
scheduler.setCurrentView(date);
scheduler.destroyCalendar()
}
});
}
</script>
<body onload="init();return false;">
<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
<div class="dhx_cal_navline">
<div class="dhx_cal_prev_button"> </div>
<div class="dhx_cal_next_button"> </div>
<div class="dhx_cal_today_button"></div>
<div class="dhx_cal_date"></div>
<div class="dhx_minical_icon" id="dhx_minical_icon" onclick="show_minical()"> </div>
<div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
<div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
<div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
</div>
<div class="dhx_cal_header"></div>
<div class="dhx_cal_data"></div>
</div>
<script src="dhtmlxScheduler/codebase/dhtmlxscheduler.js" type="text/javascript"></script>
<script src="dhtmlxScheduler/codebase/ext/dhtmlxscheduler_limit.js" type="text/javascript"></script>
<script src="dhtmlxScheduler/codebase/ext/dhtmlxscheduler_minical.js" type="text/javascript"></script>
<script src="dhtmlxScheduler/codebase/ext/dhtmlxscheduler_collision.js"></script>
</body>
</html>
这是我的 types.php:
<?php
require_once('../../common/connector/scheduler_connector.php');
include('../../common/config.php');
$doctor_id=1;
$scheduler = new schedulerConnector($res, $dbtype);
$scheduler->render_table("tevents", "event_id","start_date,end_date,event_name,type","extra");
?>
我真正想做的是将值插入$doctor_id
“tevents”表的“extra”列。我应该做些什么 ?
提前致谢 !!!