summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry <dmitry@dhtmlx.com>2012-04-10 16:54:53 +0200
committerDmitry <dmitry@dhtmlx.com>2012-04-10 16:54:53 +0200
commit38ba5728113f0f864755185e5f57198b97016f5f (patch)
tree3b885f200138f078ebd160d697739ee6971d9955
parent563c6f48a0976f81dbb2c6effe428ac83301d1bd (diff)
downloadconnector-php-38ba5728113f0f864755185e5f57198b97016f5f.zip
connector-php-38ba5728113f0f864755185e5f57198b97016f5f.tar.gz
connector-php-38ba5728113f0f864755185e5f57198b97016f5f.tar.bz2
add scheduler json sample
-rw-r--r--samples/scheduler/05_json.html52
-rw-r--r--samples/scheduler/05_json_connector.php11
2 files changed, 63 insertions, 0 deletions
diff --git a/samples/scheduler/05_json.html b/samples/scheduler/05_json.html
new file mode 100644
index 0000000..388c038
--- /dev/null
+++ b/samples/scheduler/05_json.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title></title>
+</head>
+ <script src="../dhtmlx/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
+ <link rel="stylesheet" href="../dhtmlx/dhtmlxscheduler.css" type="text/css" title="no title" charset="utf-8">
+<style type="text/css" media="screen">
+ html, body{
+ margin:0px;
+ padding:0px;
+ height:100%;
+ overflow:hidden;
+ }
+</style>
+<script type="text/javascript" charset="utf-8">
+ function init() {
+ scheduler.config.xml_date="%Y-%m-%d %H:%i";
+ scheduler.config.prevent_cache = true;
+ scheduler.config.lightbox.sections=[
+ {name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
+ {name:"location", height:43, type:"textarea", map_to:"details" },
+ {name:"time", height:72, type:"time", map_to:"auto"}
+ ]
+ scheduler.config.first_hour=4;
+ scheduler.locale.labels.section_location="Location";
+ scheduler.config.details_on_create=true;
+ scheduler.config.details_on_dblclick=true;
+ scheduler.init('scheduler_here',new Date(2009,10,1),"month");
+ scheduler.load("05_json_connector.php?uid="+scheduler.uid(), "json");
+ var dp = new dataProcessor("05_json_connector.php");
+ dp.init(scheduler);
+ }
+</script>
+<body onload="init();">
+ <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
+ <div class="dhx_cal_navline">
+ <div class="dhx_cal_prev_button">&nbsp;</div>
+ <div class="dhx_cal_next_button">&nbsp;</div>
+ <div class="dhx_cal_today_button"></div>
+ <div class="dhx_cal_date"></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>
+</body> \ No newline at end of file
diff --git a/samples/scheduler/05_json_connector.php b/samples/scheduler/05_json_connector.php
new file mode 100644
index 0000000..778c1b5
--- /dev/null
+++ b/samples/scheduler/05_json_connector.php
@@ -0,0 +1,11 @@
+<?php
+
+ include ('../config.php');
+ include ('../../codebase/scheduler_connector.php');
+
+ $res=mysql_connect($mysql_server,$mysql_user,$mysql_pass);
+ mysql_select_db($mysql_db);
+
+ $scheduler = new JSONSchedulerConnector($res);
+ $scheduler->render_table("events","event_id","start_date,end_date,event_name,details");
+?> \ No newline at end of file