コード例 #1
0
						});
					</script>
				</div>
			</a>
			<?php 
}
?>


        </div>

        <!-- User Ratings as task doer -->
        <div class="row">
        	<?php 
$doreviews = array();
$doreviews = listDoReviewsByTime($user->userid);
?>
        	
            <legend>Doer(<?php 
echo count($doreviews);
?>
)</legend>
		<?php 
foreach ($doreviews as $key => $doreview) {
    ?>
		<a href="/ViewTask.php?id=<?php 
    echo $doreview->taskid;
    ?>
">
			<div class="col-md-4 col-sm-4 col-xs-4">
				<!--Increment raing number in loop-->
コード例 #2
0
<?php

require_once 'user_class.php';
require_once 'lister.php';
$user = new user();
if (isset($_POST['userid'])) {
    $user->getFromDB($_POST['userid']);
    $userout = array();
    $userout['Username'] = $user->username;
    $userout['AvatarURL'] = $user->avatarurl;
    $listerreviews = listReviewsByTime($_POST['userid']);
    $doerreviews = listDoReviewsByTime($_POST['userid']);
    $userout['ListerReviews'] = $listerreviews;
    $userout['DoerReviews'] = $doerreviews;
    echo json_encode($userout);
}