File: /home/httpd/html/naced.com/public_html/admin/api_log.php
<?php
require "db.php";
if (!is_numeric($_REQUEST['id'])) {
exit();
}
$id = (int) $_REQUEST['id'];
$row = dbRow("SELECT * FROM `paysites` WHERE `record_num` = '$id'");
if (!is_array($row)) {
setMessage("API ID $id does not exist!", 'error');
pageNotFound(true);
}
$_POST += $row;
entities_walk($_POST);
?>
<? require "header.php"; ?>
<div class="content-page">
<div class="header-area">
<div class="breadcrumbs">
<a href="index.php">Admin Home</a>
<span><a href="apis.php">Manage APIs</a></span>
</div>
</div>
<div class="content-outer">
<h2>API<strong>Log</strong></h2>
<div class="content-inner">
<? echo getMessages(); ?>
<p>Please note - only first 1000 characters of response are stored. This exists primarily for debugging issues like incorrect API keys.<br><br></p>
<form method="POST" action="" enctype="multipart/form-data" class="form" novalidate autocomplete="off">
<table class="pagetable" id="languages">
<thead>
<tr>
<th colspan="2">Last Response - <? echo $_POST['name']; ?></th>
</tr>
</thead>
<tbody>
<tr>
<td>Last Cron Run</td>
<td><?php echo dbValue("SELECT cron_last_run AS `cron_last_run` FROM `status`", 'cron_last_run'); ?></td>
</tr>
<tr>
<td>Last Response</td>
<td>
<div style='max-width: 800px; overflow-wrap: break-word;'>
<?php echo htmlentities($row['last_log']); ?>
</div>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
<? require "footer.php"; ?>