-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
53 lines (48 loc) · 1.5 KB
/
index.php
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
<?php
/**
* 連線方式 http://localhost/voc4fun/voc4fun-server/
*/
include_once 'config.php';
include_once 'lib/redbeanphp/rb.config.php';
include_once 'helper/javascript_helper.php';
include_once 'helper/log_helper.php';
//$log = R::dispense('log');
//$log->timestamp = time() * 1000;
//$log->file_name = "index.php";
//$log->function_name = null;
//$log->qualifier = null;
//$log->data = json_encode(array("key" => "value2"));
//
//R::store($log);
//$logs = R::dispense('log');
//$logs->import(array(
// array(
// 'timestamp' => time() * 1000,
// 'file_name' => "index.php",
// 'function_name' => "1"
// ),
// array(
// 'timestamp' => time() * 1000,
// 'file_name' => "index.php",
// 'function_name' => "2"
// )
//));
//$logs->import(array(
// 'timestamp' => time() * 1000,
// 'file_name' => "index.php",
// 'function_name' => "1"
//));
//R::store($logs);
//R::dispense('log');
//echo time() * 1000;
//R::exec("CREATE VIEW uuid_name AS SELECT l1.uuid, l1.data AS name FROM log AS l1, (SELECT uuid, max(timestamp) AS timestamp FROM log WHERE file_name = 'controller_profile.js' AND function_name = 'change_user_name()' GROUP BY uuid) AS l2 WHERE l1.uuid = l2.uuid AND l1.timestamp = l2.timestamp");
//$exists = R::getRow("
//SELECT EXISTS(
// SELECT *
// FROM information_schema.tables
// WHERE
// table_schema = 'public' AND
// table_name = 'log'
//);");
//
//print_r($exists);