| Server IP : 10.200.247.200 / Your IP : 216.73.217.19 Web Server : Apache System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : jeremy ( 1001) PHP Version : 8.4.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/coaching_sites/usbusinessfundingsolutions.com/member/ |
Upload File : |
<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/inc/php_header.php');
$title = 'Enrollment Agreements';
$body_id = 'service_agreements';
$needs_to_change_password = $db->get_results("SELECT id FROM lc2synment_lc.lc_reseller WHERE id='".$db->clean($_SESSION['Client']['id'])."' AND changed_pass=0");
if(!empty($needs_to_change_password)) {
header("Location: /member/change_temporary_password.php");
exit(0);
}
$documents = $db->get_results("
SELECT id,title,datecreated,datesigned,void
FROM lc2synment_lc.document
WHERE client_id = '".$db->clean($_SESSION['Client']['id'])."'
AND title <> 'Profile'
ORDER BY datesigned DESC,datecreated DESC
");
$signed_docs = array();
$unsigned_docs = array();
if(empty($documents)) {
$documents = array();
}
foreach($documents as $document) {
if($document->datesigned == "2000-01-01 00:00:00") {
$unsigned_docs[] = $document;
} else {
$signed_docs[] = $document;
}
}
$newest_doc = '';
if(!empty($unsigned_docs)) {
$newest_doc = 'https://usbusinessfundingsolutions.com/member/view-contract.php?contract_pdf=1&id='.$unsigned_docs[0]->id;
} else {
$newest_doc = 'https://usbusinessfundingsolutions.com/member/view-contract.php?contract_pdf=1&id='.$signed_docs[0]->id;
}
require_once($_SERVER['DOCUMENT_ROOT'].'/member/header_new_2021_06_29.php');
?>
<style>
.size {
width:1100px;
}
#content div {
padding:10px;
}
.doc_preview {
width:calc(100% - 20px);
box-shadow:2px 2px 10px grey;
}
.image_button {
float:none !important;
display:inline-block;
vertical-align:middle;
cursor:pointer;
}
@media screen and (max-width: 600px) {
.size {
width:100%;
}
}
</style>
<?php /*
<script type="text/javascript">
function load_doc(src) {
$('.doc_preview').html('<i class="fas fa-spinner fa-spin"></i>');
$('.doc_preview').load(src);
}
<?php if(!empty($newest_doc)) { ?>
$('document').ready(function() {
load_doc('<?= $newest_doc;?>');
});
<?php } ?>
</script>
*/ ?>
<div id="content" class="size">
<div>
<h1><img src="/member/images/icon_service_agreement.png" /> Enrollment Agreements</h1>
<p>Click on the agreement below to view and sign. You can also print or download the agreement by clicking on the appropriate icon.</p>
<hr />
<?php if(!empty($unsigned_docs)) { ?>
<h3>Unsigned Agreements</h3>
<?php foreach($unsigned_docs as $doc) { ?>
<div><a href="https://usbusinessfundingsolutions.com/member/view-contract.php?id=<?= $doc->id;?>" target="_blank"><?= $doc->title;?></a> - <i>Created <?= date('F j, Y g:i, a',strtotime($doc->datecreated));?></i> <img class="image_button" src="/member/images/icon_print.png" onclick="window.open('https://usbusinessfundingsolutions.com/member/view-contract.php?print=1&id=<?= $doc->id;?>','_blank'); return false;" /></div>
<?php } ?>
<?php } ?>
<?php if(!empty($signed_docs)) { ?>
<h3>Signed Agreements</h3>
<?php foreach($signed_docs as $doc) { ?>
<div><a href="https://usbusinessfundingsolutions.com/member/view-contract.php?id=<?= $doc->id;?>" target="_blank"><?= $doc->title;?></a> - <i>Signed <?= date('F j, Y g:i, a',strtotime($doc->datesigned));?></i> <img class="image_button" src="/member/images/icon_print.png" onclick="window.open('https://usbusinessfundingsolutions.com/member/view-contract.php?print=1&id=<?= $doc->id;?>','_blank'); return false;" /> <img class="image_button" src="/member/images/icon_pdf.png" onclick="window.open('https://usbusinessfundingsolutions.com/member/view-contract-pdf.php?id=<?= $doc->id;?>','_blank'); return false;" /></div>
<?php } ?>
<?php } ?>
<div class="doc_preview">
<?php if(!empty($newest_doc)) {
echo file_get_contents($newest_doc);
} ?>
</div>
</div>
</div>
<?php require_once($_SERVER['DOCUMENT_ROOT'].'/member/footer.php'); ?>