我有一個問題:我有一個由不同用戶使用的調度程序。當用戶向調度程序添加事件時,包含其ID的會話變量必須傳遞到將其插入數據庫的處理器。在DHTMLX中使用BeforeInsert並將變量傳遞給表格
我的第一個問題是,我怎麼一個會話變量綁定到與scheduler.config.lightbox.sections
創建的窗體:
scheduler.config.lightbox.sections=[
{name:"Customer Code", height:21, map_to:"text", type:"textarea" , focus:false},
{name:"Photographer", height:21, map_to:"pid", type:"select",
options:scheduler.serverList("type")},
{name:"time", height:72, type:"time", map_to:"auto"}
]
是否有可能一個會話變量綁定呢?
我的第二個問題是如何在processor.php中獲取會話變量? 請糾正我,如果我錯了,但根據文檔這將是這樣的:
//... connect here
function myInsert($action){
$new_value = rand(0,100);
$action->set_value("name",$new_value);
}
$conn->event->attach("beforeInsert","myInsert");
// ...some code here
$conn->render_table("photographers_at_work", "id", "time, end_time, customer_code, pid");