HEX
Server: Apache/2.4.59 (Debian)
System: Linux keymana 4.19.0-21-cloud-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64
User: lijunjie (1003)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/doco/keytest/wp-content/themes/ormedia/keyAlertData/alert/r_alert_1.php
<?php
ini_set('display_errors', 1);
require_once '/var/www/html/wp-content/themes/ormedia/key_alert_functions.php';
require_once '/var/www/html/wp-load.php';
if (isset($_REQUEST['checking_api_file'])){
    exit();
}
$uid = $_REQUEST['uid'];
$id = $_REQUEST['id'];
$status = $_REQUEST['status'];
$limit = $_REQUEST['al'];
$page = $_REQUEST['ap'];
$limit = $limit>0?$limit:10;
$page = $page>0?$page:1;
$offset = ($page-1)*$limit;
$status = (empty($status)||!is_numeric($status))?-1:$status;
if(empty($uid)&&empty($id)){
	$rv->rc = -1;
	$rv->msg = "missing params";
}else{
	$rv->rc = 1;
	$rv->msg = "success";
	if(empty($id)){
		$alerts = get_alerts_by_uid($status,$uid,$offset,$limit);
	}else{
		$alerts = [get_alert_by_id($id)];
	}
	foreach ($alerts as $alert) {
		// if(empty($alert->image)){
		// 	$alert->image = 'http://keylab.cc/wp-content/uploads/2020/01/Rectangle-2.1.png';
		// }else{
		// 	$alert->image = wp_get_attachment_image_url($alert->image,'large');
		// }
		if(empty($alert->uid)) $alert->uid = "";
		if(empty($alert->opened_time)) $alert->opened_time = "";
		$alert->strip_content = strip_tags($alert->content);
	}
	$rv->data = $alerts;
}
echo json_encode($rv);
?>