我有一个问题:我有一个由不同用户使用的调度程序。当用户向调度程序添加事件时,包含其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");