-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathnuphpjscall.php
More file actions
34 lines (24 loc) · 916 Bytes
/
nuphpjscall.php
File metadata and controls
34 lines (24 loc) · 916 Bytes
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
<?php
require_once('nucommon.php');
$response = array();
$response['DATA'] = '';
$response['SUCCESS'] = false;
$response['ERRORS'] = array();
$GLOBALS['ERRORS'] = array();
$hashData = nuHashData();
$code = $_POST['nuWindow']['phpCode'];
$sql = "SELECT * FROM zzzsys_php WHERE slp_code = ?";
$t = nuRunQuery($sql, array($code));
$r = db_fetch_object($t);
if(nuPHPAccess($r->zzzsys_php_id)){
$e = nuReplaceHashes($r->slp_php, $hashData);
eval($e);
$response['DATA'] = $nuParameters;
if($nuError != ''){
$response['ERRORS'][] = $nuError;
}
}else{
$response['ERRORS'][] = "Access denied to PHP - ($r->slp_code)";
}
print json_encode($response);
?>