Esempio n. 1
0
<?php

require_once "./common/config.php";
sleep(2);
$data = new JSONDataConnector($db, $dbtype);
$data->render_table("users", "id", "name,age,group_name,city,phone,sex,driver_license");
Esempio n. 2
0
 public function __construct($res, $type = false, $item_type = false, $data_type = false)
 {
     if (!$item_type) {
         $item_type = "JSONCommonDataItem";
     }
     if (!$data_type) {
         $data_type = "";
     }
     //has not sense, options not editable
     parent::__construct($res, $type, $item_type, $data_type);
 }
Esempio n. 3
0
<?php

require_once "../../../common/config.php";
$data = new JSONDataConnector($conn, $dbtype);
$data->render_table("packages_plain", "id", "package, size, architecture, section");
Esempio n. 4
0
<?php

require_once "../../../common/config.php";
$data = new JSONDataConnector($conn, $dbtype);
$data->dynamic_loading(50);
$data->render_table("packages_plain", "id", "package,version,maintainer");
Esempio n. 5
0
<?php

require_once "../../../common/config.php";
$data = new JSONDataConnector($conn, $dbtype);
$data->add_section("config", '{
		columns:[
			{ id:"package",	header:"Name", 			width:200 },
			{ id:"section",	header:"Section",		width:120 },
			{ id:"size",	header:"Size" , 		width:80  },
			{ id:"architecture",	header:"PC", 	width:60  }
		],
		height:100,
		autowidth:true
	}');
$data->render_table("packages_plain", "id", "package, size, architecture, section");
Esempio n. 6
0
<?php

require_once "../../../common/config.php";
$data = new JSONDataConnector($conn, $dbtype);
$data->add_section("config", '{
		"columns":[
			{ "id":"package",	"header":"Name", 			"width":200 },
			{ "id":"section",	"header":"Section",		"width":120 },
			{ "id":"size",	"header":"Size" , 		"width":80  },
			{ "id":"architecture",	"header":"PC", 	"width":60  }
		],
		"height":100,
		"autowidth":true
	}');
$data->render_table("packages_plain", "id", "package, size, architecture, section");
Esempio n. 7
0
<?php

require '../../../common/config.php';
$data = new JSONDataConnector($conn, $dbtype);
$data->render_table("films", "id", "title,year,votes,rating,rank");
Esempio n. 8
0
<?php

require_once "../../../common/config.php";
$data = new JSONDataConnector($conn, $dbtype);
$data->dynamic_loading(30);
$data->render_table("packages_plain", "id", "package, size, architecture, section");
Esempio n. 9
0
<?php

require_once "../../../common/config.php";
$data = new JSONDataConnector($conn, $dbtype);
$data->render_table("packages_plain", "id", "package,version,maintainer");
Esempio n. 10
0
<?php

require_once "../config.php";
require_once '../../codebase/db_pdo.php';
$res = new PDO($mysql_server, $mysql_user, $mysql_pass);
require "../../codebase/data_connector.php";
require "../../codebase/scheduler_connector.php";
require "../../codebase/grid_connector.php";
$details = new JSONDataConnector($res, "PDO");
$details->mix("active", "yes");
$details->configure("types", "typeid", "name");
$events = new JSONSchedulerConnector($res, "PDO");
$events->mix("types", $details, array("typeid" => "type"));
$events->render_table("tevents", "event_id", "start_date,end_date,event_name,type", "", "");
Esempio n. 11
0
<?php

require_once "../config.php";
require_once '../../codebase/db_pdo.php';
$res = new PDO($mysql_server, $mysql_user, $mysql_pass);
require "../../codebase/data_connector.php";
require "../../codebase/scheduler_connector.php";
require "../../codebase/mixed_connector.php";
$data1 = new JSONDataConnector($res, "PDO");
$data1->configure("country_data", "country_id", "name,full_name,type");
$data2 = new JSONTreeDataConnector($res, "PDO");
$data2->configure("tasks", "taskId", "taskName", "", "parentId");
$conn = new MixedConnector($res, "PDO");
$conn->add("country_data", $data1);
$conn->add("countries", $data2);
$conn->render();
Esempio n. 12
0
<?php

require_once "../config.php";
$res = mysql_connect($mysql_server, $mysql_user, $mysql_pass);
mysql_select_db($mysql_db);
require "../../codebase/data_connector.php";
ConnectorSecurity::$security_key = true;
$grid = new JSONDataConnector($res);
$grid->set_limit(10);
$grid->render_table("grid50000", "item_id", "item_nm,item_cd");
<?php

require_once "../config.php";
require_once '../../codebase/db_pdo.php';
$res = new PDO($mysql_server, $mysql_user, $mysql_pass);
require "../../codebase/data_connector.php";
$data = new JSONDataConnector($res, "PDO");
$data->dynamic_loading(100);
$data->asString(true);
$json = $data->render_table("grid50000", "item_id", "item_nm,item_cd");
echo "<strong>Generated json:</strong><br>";
echo $json;