-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
75 lines (62 loc) · 1.92 KB
/
index.php
File metadata and controls
75 lines (62 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
require_once('vendor/autoload.php');
\Pyntax\Pyntax::start(dirname(__FILE__)."/config");
\Pyntax\Config\Config::write('database', array(
'database' => 'simplemanager_db_v3',
'server' => 'localhost',
'password' => '',
));
//include_once("third-party/AdminLTE-2.3.0/pages/forms/PyntaxDAO-General.php"); die;
//include_once("third-party/AdminLTE-2.3.0/pages/tables/PyntaxDAO-Table.php");
//$clientBean = \Pyntax\PyntaxDAO::getBean('clients');
//if(!empty($_POST)) {
// var_dump($_POST); die;
//}
//$clientBean->users_id = 4;
//$clientBean->first_name = "Sahil";
//$clientBean->last_name = "Sharma";
//$clientBean->website = "pyntax.net";
//$clientBean->save();
//
//$clientBean->website = "http://hello.world.com";
//
//$clientBean->save();
//
//$r = $clientBean->find(array('AND' => array(
// 'first_name' => 'Sahil',
// 'OR' => array(
// 'last_name' => 'Sharma'
// )
//)), true);
//
//var_dump($r); die;
//$clientBean = \Pyntax\PyntaxDAO::getBean('clients');
//$tableFactory = new \Pyntax\Html\Table\TableFactory();
////$tableFactory->generateTable($clientBean, array('AND' => array(
//// 'first_name' => 'Sahil',
//// 'OR' => array(
//// 'last_name' => 'Sharma'
//// )
////)));
//
//
//echo $tableFactory->generateTable($clientBean);
$startTime = microtime();
$bean = \Pyntax\Pyntax::getBean('clients');
//$bean->find(2);
$htmlFactory = \Pyntax\Pyntax::loadHtmlFactory();
?>
<html>
<head>
<?php $htmlFactory->printCSSFiles(\Pyntax\Html\HtmlFactory::FilePlacementOption_Header);
$htmlFactory->printJSFiles(\Pyntax\Html\HtmlFactory::FilePlacementOption_Header); ?>
</head>
<body>
<h1>Example <span style="font-size: 18px">- <?php echo ucfirst($bean->getName()) ?></span></h1>
<?php echo \Pyntax\Pyntax::generateForm($bean); ?>
<?php echo $htmlFactory->createTable($bean); ?>
<h3><?php echo microtime() - $startTime ?></h3>
</body>
</html>