Files
Wrench-ApiTester/public/wrenchboard/getmedia.php
T
dev-chiefworks c50bf3a8d7 tst updates
2024-01-07 13:57:29 -05:00

131 lines
4.8 KiB
PHP

<?php
include_once('def.php');
include 'session_read.php';
include('wrenchboard_class.php');
// public $REACT_APP_AUX_ENDPOINT = "https://apigate.lotus.g1.wrenchboard.com/svs/user";
// public $REACT_APP_USERS_ENDPOINT = "https://apigate.lotus.g1.wrenchboard.com/svs/user";
$wrenchboard = new wrenchboard_class();
$data = array(
"member_id" => $member_id ,
"sessionid" => $session_id ,
"uid" => $uid,
"msg_uid" => "3ba22926-f734-4440-9651-ed848b6b1043",
"process" => WRENCHBOARD_CONTRACT_MESSAGE,
'action'=>WRENCHBOARD_GET_MEDIA
);
$SERVER_URL = "https://apigate.lotus.g1.wrenchboard.com";
//$out = array();
//$ret = $wrenchboard->wrenchboard_api($data,$out,'getmedia');
$family_uid = "1f385837-b5e6-420e-a17a-488c4b8ef015";
$job_uid = "9e04cac7-bea2-498e-9d72-ef30830d0f92"; // sample
$myFile_sample = $SERVER_URL."/en/wrench/api/v1/getmedia/".$session_id."/myfile/8be7f3dc-7fd8-4c0b-bc78-33dc5537cc3f";
$myFile_profile = $SERVER_URL."/en/wrench/api/v1/getmedia/".$session_id."/profile/".$uid;
$myFile_family_profile = $SERVER_URL."/en/wrench/api/v1/getmedia/".$session_id."/family/".$family_uid;
$myFile_jobs_picture = $SERVER_URL."/en/wrench/api/v1/getmedia/".$session_id."/job/".$job_uid;
$myFile_family_banner = $SERVER_URL."/en/wrench/api/v1/getmedia/".$session_id."/familybanner/".$uid;
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>WrenchBoard Secure Media File </title>
</head>
<body>
<h1>WrenchBoard Secure Media File </h1>
<hr />
<table class="table table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Type</th>
<th scope="col">Upload File</th>
<th scope="col">Read File Back</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>USERS UPLADED FILES</td>
<td>Upload</td>
<td>
<a href='<?=$myFile_sample?>'><?=$myFile_sample?></a> <hr size="1">
<?=$SERVER_URL?>/en/wrench/api/v1/getmedia/<b>session_id</b>/myfile/<b>file_uid</b> </td>
<td>......</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Active Job Files</td>
<td>Upload</td>
<td><?=$SERVER_URL?>/en/wrench/api/v1/getmedia/<?=$session_id?>/contracts/9af67a04-6f4f-477f-a0a5-3336c7e9022b
<hr size="1">
<?=$SERVER_URL?>/en/wrench/api/v1/getmedia/<b>session_id</b>/contracts/<b>msg_uid</b>
</td>
<td>....</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Profile Picture</td>
<td><a href="upload_profile.php">Upload</a></td>
<td>
<?=$SERVER_URL?>/en/wrench/api/v1/getmedia/<b>session_id</b>/profile/<b>uid</b><br>
<a href='<?=$myFile_profile?>'><?=$myFile_profile?></a></td>
<td>.....</td>
</tr>
<tr>
<th scope="row">4</th>
<td>family Profile Picture</td>
<td><a href="upload_family_profile.php">Upload</a></td>
<td>
<?=$SERVER_URL?>/en/wrench/api/v1/getmedia/<b>session_id</b>/family/<b>family_uid</b><br>
<a href='<?=$myFile_family_profile?>'><?=$myFile_family_profile?></a></td>
<td>.....</td>
</tr>
<tr>
<th scope="row">5</th>
<td>Job Creation Picture</td>
<td><a href="upload_job_picture.php">Upload</a></td>
<td>
<?=$SERVER_URL?>/en/wrench/api/v1/getmedia/<b>session_id</b>/job/<b>job_uid</b><br>
<a href='<?=$myFile_jobs_picture?>'><?=$myFile_jobs_picture?></a></td>
<td>.....</td>
</tr>
<tr>
<th scope="row">6</th>
<td>family Profile Picture</td>
<td><a href="upload_family_banner.php">Upload</a></td>
<td>
<?=$SERVER_URL?>/en/wrench/api/v1/getmedia/<b>session_id</b>/familybanner/<b>uid</b><br>
<a href='<?=$myFile_family_banner?>'><?=$myFile_family_banner?></a></td>
<td>.....</td>
</tr>
</tbody>
</table>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>