-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.php
43 lines (41 loc) · 957 Bytes
/
example.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
<?php
require_once('SDP/SDP.php');
$sdp_sqlInfos = array(
'hostname' => '127.0.0.1',
'username' => 'user',
'password' => 'pass',
'dbname' => 'database'
);
?>
<html>
<head>
<title></title>
</head>
<body>
<h1>SDP Example</h1>
<br />
<br />
<center>
<table border="true" width="80%">
<?php
//setup
$tablename = 'table_name';
$order = 'ORDER BY `id` DESC';
$where = 'WHERE `date` > NOW()';
$db_access['id'] = 'read';
$db_access['field1'] = 'read, new';
$db_access['field2'] = 'read, new';
$db_access['field3'] = 'read, write, new';
$db_access['date'] = 'read, new, date';
$db_access['comment'] = 'read, write, new, text';
$db_access['photo'] = 'read, write, blob, new';
//function
echo SpawnSaarpDatabasePanel($sdp_sqlInfos, $tablename, $db_access, $where, $order);
?>
</table>
<br><br><br>
<br><br><br>
<br><br><br>
</center>
</body>
</html>