-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchat.php
More file actions
executable file
·63 lines (61 loc) · 2.07 KB
/
chat.php
File metadata and controls
executable file
·63 lines (61 loc) · 2.07 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
<?php
/**
* INTER-Mediator
* Copyright (c) INTER-Mediator Directive Committee (http://inter-mediator.org)
* This project started at the end of 2009 by Masayuki Nii msyk@msyk.net.
*
* INTER-Mediator is supplied under MIT License.
* Please see the full license for details:
* https://github.com/inter-mediator/inter-mediator/blob/master/dist-docs/License.txt
*
* @copyright Copyright (c) INTER-Mediator Directive Committee (http://inter-mediator.org)
* @link https://inter-mediator.com/
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
require_once('vendor/inter-mediator/inter-mediator/INTER-Mediator.php');
IM_Entry(
array(
array(
'records' => 10,
'name' => 'chat',
'key' => 'id',
'paging' => true,
'sort' => array(
array('field' => 'postdt', 'direction' => 'desc'),
),
'default-values' => array(
array('field' => 'postdt', 'value' => date("Y-m-d H:i:s")),
),
'authentication' => array(
'all' => array( // load, update, new, delete
'target' => 'field-user',
'field' => 'user',
),
),
'post-reconstruct' => true,
),
array(
'records' => 10,
'name' => 'chat2',
'view' => 'chat',
'table' => 'chat',
'key' => 'id',
'paging' => true,
'sort' => array(
array('field' => 'postdt', 'direction' => 'desc'),
),
'default-values' => array(
array('field' => 'postdt', 'value' => date("Y-m-d H:i:s")),
),
'post-reconstruct' => true,
),
),
array(
'authentication' => array( // table only, for all operations
'authexpired' => '600', // Set as seconds.
'storing' => 'credential', // session-storage, 'cookie'(default), 'cookie-domainwide', 'none'
),
),
array('db-class' => 'PDO'),
2
);