-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuttonhandler.php
More file actions
58 lines (41 loc) · 1.06 KB
/
Copy pathbuttonhandler.php
File metadata and controls
58 lines (41 loc) · 1.06 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
<?php
@ini_set("display_errors","1");
@ini_set("display_startup_errors","1");
require_once("include/dbcommon.php");
require_once("classes/button.php");
// CSRF protection
if( !isPostRequest() )
return;
$params = (array)my_json_decode(postvalue('params'));
if( $params["_base64fields"] ) {
foreach( $params["_base64fields"] as $f ) {
$params[$f] = base64_str2bin( $params[$f] );
}
}
$buttId = $params['buttId'];
$eventId = postvalue('event');
$table = $params['table'];
if( !GetTableURL( $table ) ) {
exit;
}
$page = $params['page'];
if( !Security::userCanSeePage($table, $page ) ) {
exit;
}
$pSet = new ProjectSettings( $table, "", $page );
if( $buttId ) {
$pageButtons = $pSet->customButtons();
if( array_search( $buttId , $pageButtons ) === false ) {
exit;
}
}
$params["masterTable"] = postValue("masterTable");;
$params["masterKeys"] = array();
// RunnerPage::readMasterKeysFromRequest
$i = 1;
while( isset( $_REQUEST["masterkey".$i] ) ) {
$params["masterKeys"][ $i ] = $_REQUEST["masterkey".$i];
$i++;
}
// create table and non table handlers
?>