hi
I have a problem with is that I have a calendar function to enter data manually, but does not serve me and throws me DataConnector errors and not to do.
function in my page that you draw schedule:
function init() {
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.lightbox.sections=[
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
{name:"time", height:72, type:"time", map_to:"auto"}
]
scheduler.config.first_hour=4;
scheduler.config.details_on_create=true;
scheduler.config.details_on_dblclick=true;
scheduler.init('scheduler_here',null,"month");
scheduler.load("events.php?uid="+scheduler.uid());
var dp = new dataProcessor("events.php");
dp.init(scheduler);
}
scheduler.attachEvent("onBeforeLightbox",function(id){
var ev = this.getEvent(id);
var date = ev.start_date;
return (date.getDay()&&date.getDay()!=6)
});
and the function of my page events.php is this and do not insert anything in the database
<?php include ('../componentes/codebase/connector/scheduler_connector.php'); include_once('../componentes/codebase/connector/db_postgre.php'); require_once("../componentes/comunicacion.inc"); global $DB_SERVER,$DB_PORT,$DB_NAME,$DB_USER,$DB_PASSWORD; $res = pg_connect("host=$DB_SERVER port=$DB_PORT dbname=$DB_NAME user=$DB_USER password=$DB_PASSWORD"); function insercion($action){ $status = $action->get_status(); $id_evento = $action->get_value("id_evento"); $start_date = $action->get_value("start_date"); $end_date = $action->get_value("end_date"); $evento_nombre = $action->get_value("evento_nombre"); $detalles = $action->get_value("detalles"); if ($status == "inserted"){ //$action->set_status("deleted"); $scheduler->sql->query("insert","INSERT INTO eventos(id_evento,start_date,end_date,evento_nombre,detalles) VALUES ('{id_evento}','{start_date}','{end_date}','{evento_nombre}','{detalles}')"); $action->success(); } } $scheduler = new schedulerConnector($res,"Postgre"); $scheduler->event->attach("afterProcessing","insercion"); $scheduler->render_table("eventos","id_evento","start_date,end_date,evento_nombre,detalles"); ?>thank you for your time