source: branches/2.2.0.1/calendar/js/dhtmlx/samples/03_extensions/php/events_multiselect_static.php @ 4001

Revision 4001, 1.0 KB checked in by rafaelraymundo, 13 years ago (diff)

Ticket #1615 - Componente novo para agenda......................................

Line 
1<?php
2        require_once ('../../../codebase/connector/scheduler_connector.php');
3        require_once('../../../codebase/connector/crosslink_connector.php');
4        require_once ('../../common/config.php');
5
6        $res=mysql_connect($server, $user, $pass);
7        mysql_select_db($db_name);
8
9        $cross = new CrossOptionsConnector($res);
10        $cross->options->render_table("user","user_id","user_id(value),username(label)");
11        $cross->link->render_table("event_user","event_id", "user_id,event_id");
12       
13        $fruitCross = new CrossOptionsConnector($res);
14        $fruitCross->options->render_table("fruit","fruit_id","fruit_id(value),fruit_name(label)");
15        $fruitCross->link->render_table("event_fruit","event_id","fruit_id,event_id");
16       
17        //sleep(2);
18        $scheduler = new SchedulerConnector($res);
19        //$scheduler->enable_log("events_log.txt",true);
20       
21        $scheduler->set_options("user_id", $cross->options);
22        $scheduler->set_options("fruit_id", $fruitCross->options);
23       
24        $scheduler->render_table("events_ms","event_id","start_date,end_date,event_name,details");
25?>
Note: See TracBrowser for help on using the repository browser.