Last active
September 25, 2015 04:02
-
-
Save amberhwang/162d483893e166d804bc to your computer and use it in GitHub Desktop.
single view message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
include('functions.php'); | |
include('php-header.php'); | |
if( !isset($_SESSION[$PROJECT_NAME . '-sessionId']) ){ | |
header('Location:' . $base_url . 'login'); | |
} | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head><?php $header_title = 'Messages'; include('header.php'); ?></head> | |
<body id="coupons"> | |
<div id="preloader"> | |
<div id="status"> </div> | |
</div> | |
<div class="global-wrapper"> | |
<?php include('header-nav.php'); ?> | |
<div class="wrapper"> | |
<main> | |
<article class="row-list"> | |
<?php | |
$currentPage = array( | |
'label' => 'Messages', | |
'url' => curPageURL(), | |
); | |
array_push($breadcrumbs, $currentPage); | |
?> | |
<?php include('breadcrumbs.php') ?> | |
<div class="clear"></div> | |
<header> | |
<h1>Messages</h1> | |
</header> | |
<article class="row"> | |
<nav class="column col_3" style="display:none;"> | |
<?php | |
if(isset($_SESSION[$PROJECT_NAME . '-sessionId'])){ | |
include('menu.php'); | |
}else{ | |
include('menu-no-login.php'); | |
} | |
?> | |
</nav> | |
<ul class="column col_12 container messages-list"> | |
<?php | |
$fields = array( | |
'maxCount' => 100, | |
'offset' => 0, | |
'sessionId' => $SESSION_ID, | |
'sortBy' => 'id', | |
'sortOrder' => 'ASC', | |
'projectId' => 8, | |
); | |
$decode = get_decoded_info( $SERVER_URL, $PORT, 'tos-member/user/membershipmessage/view' , $fields ); | |
$count = count($decode['lists']); | |
if($decode['lists']){ | |
foreach($decode['lists'] as $entry){ | |
echo "<pre>"; | |
print_r($entry); | |
echo "</pre>"; | |
//$timestamp = $entry['timestamp']; | |
//$string_time = sprintf('%.0f', $timestamp); | |
//if(strlen($string_time) > 11){ | |
// if($entry['timestamp'] > 999999999){ | |
// $timestamp = $timestamp / 1000; | |
//} | |
//} | |
?> | |
<li class="message-item"> | |
<a class="title" href="<?php echo $base_url . 'messages/' . $entry['id']; ?>"> | |
<?php echo $entry['postTitle']; ?> | |
</a> | |
<p class="feed-date"><?php echo date("j F Y | g:i a", $entry['createDate']); ?></p> | |
<!-- <p class="content"><?php echo $entry['message'];?></p> --> | |
<p class="desc"> | |
<?php | |
echo $entry['message']; | |
//if($content['strip'] == true){ | |
//echo ' ... <a href="'. $base_url . 'messages/' . $id . '"><span class="read-more">Read more</span></a>'; | |
//} | |
?> | |
</p> | |
</li> | |
<?php | |
} | |
} | |
if($count == 0){ | |
echo '<span class="no-entry">No messages available.</span>'; | |
} | |
?> | |
</ul> | |
</article> | |
<div class="coupon-lightbox" id="couponLightbox" style="display:none;"></div> | |
</article> | |
</main> | |
</div> | |
<?php include('footer.php'); ?> | |
</div> | |
<?php include('footer-js.php'); ?> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment