Viewing file: buttonhandler.php (826 B) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
@ini_set("display_errors","1");
@ini_set("display_startup_errors","1");
require_once("include/dbcommon.php");
require_once("classes/button.php");
$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;
}
}
// create table and non table handlers
?>
|