| Server IP : 74.208.236.18 / Your IP : 216.73.216.185 Web Server : Apache System : Linux infong654 4.4.400-icpu-108 #2 SMP Wed Feb 11 10:12:42 UTC 2026 x86_64 User : u39365822 ( 135825) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /homepages/7/d147067425/htdocs/client_user_2/ |
Upload File : |
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
session_start();
include("includes/db_con_get.php");
if(!isset($_SESSION['loggedinC']) && @$_SESSION['loggedinC'] != '1'):
header("Location:index.php");exit;
endif;
$getUserCan = $con->query("SELECT `UserID`, `CanViewReport` FROM `user` WHERE
`UserID` = '".@$_SESSION['CURRENT_CLIENT']['UserID']."'");
$getCanRow = $getUserCan->fetch_array(MYSQLI_ASSOC);
function get_reports() {
$url = 'http://apis.revealmyway.com:4000/therapist_api/public/api/user/userfiles';
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$headers = array(
"X-Custom-Header: value",
"Content-Type: application/json",
"API-TOKEN:t68VRoQGFSxHVR3dskZvRKpe8Pb1rQrm",
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$fields = array();
$currentUserId = @$_SESSION['CURRENT_CLIENT']['GuidReference'];
//$currentUserId = 'b500aebd-69fe-47fe-91ee-693d650de9f9';
$fields['id'] = @$currentUserId ? $currentUserId : '';
// Api call footer
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($fields));
//for debug only!
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$resp = curl_exec($curl);
curl_close($curl);
$response = json_decode($resp);
return $response->results;
}
$user_reports = get_reports();
//echo '<pre>'; print_r($user_reports); echo '</pre>';
//exit;
?>
<!DOCTYPE html>
<html lang="en">
<?php include("includes/header.php"); ?>
<body class="sb-nav-fixed">
<style>
.table a{
display:block;
text-decoration:none;
}
</style>
<?php include("includes/topnavbar.php"); ?>
<div id="layoutSidenav">
<?php include("includes/sidenavbar.php"); ?>
<div id="layoutSidenav_content">
<div class="container-fluid px-4">
<h3 class="mt-4">View Reports</h3>
</br>
<div class="card mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-md-10">
<i class="fas fa-table me-1"></i>All View Reports</div>
<div class="col-md-2">
<a href="dashboard.php" class="btn btn-primary" style="font-size:15px;" ><i class="fas fa-arrow-left"></i> Return to Dashboard</a>
</div>
</div>
</div>
<div class="card-body">
<table class="table table-bordered text-center">
<thead>
<tr>
<th>Client</th>
<th>File Type</th>
<th>File Name</th>
<th>Created On</th>
</tr>
</thead>
<tbody>
<?php if(@$getCanRow['CanViewReport'] != 0) { ?>
<?php if(!empty($user_reports)) { ?>
<?php foreach($user_reports as $rpts) {?>
<tr>
<th><?=@base64_decode($_SESSION['CURRENT_CLIENT']['UserName'])?></th>
<td>
<?php
if(@str_contains($rpts->FileType, "PRO")) {
echo @str_replace("PRO","WellBeing Profiler",$rpts->FileType);
} else if(@str_contains($rpts->FileType, "PMG")) {
echo @str_replace("PMG","Problem Management Guide",$rpts->FileType);
} else if(@str_contains($vv->FileType, "PP")) {
echo @str_replace("PP","Periodic Profiler",$vv->FileType);
}
?>
</td>
<td><a target="_blank" href="http://s147067457.onlinehome.us/RevealReports/<?=@$rpts->FileName?>"><?=@$rpts->FileName?></a></td>
<td><?=@$rpts->CreatedOn?></td>
</tr>
<?php } ?>
<?php } else {?>
<tr><td colspan="4">No reports found.</td></tr>
<?php } ?>
<?php } else { ?>
<tr><td colspan="4">You have no access to reports. Please contact the therapist.</td></tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<?php include("includes/footer.php"); ?>
</div>
</div>
<?php include("includes/footer_js.php"); ?>
</body>
</html>