当前位置: 首页>>代码示例>>PHP>>正文


PHP Rating::retrieveScoreApp方法代码示例

本文整理汇总了PHP中Rating::retrieveScoreApp方法的典型用法代码示例。如果您正苦于以下问题:PHP Rating::retrieveScoreApp方法的具体用法?PHP Rating::retrieveScoreApp怎么用?PHP Rating::retrieveScoreApp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Rating的用法示例。


在下文中一共展示了Rating::retrieveScoreApp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Rating

 //************************************** UPCOMING APPOINTMENTS ENDS ******************************************
 //*************************** PAST APPOINTMENTS ****************************************************
 echo "<div class='container'> ";
 echo "<h2>Past Appointments</h2>";
 echo "<ul class='list-group'>";
 $appList = $appointment->retrieveAppointments($userType, $userEmail, "past");
 $rating = new Rating();
 for ($i = 0; $i < count($appList); $i++) {
     $captain_id = $appList[$i]->getCaptainId();
     $user_id_from_book = $appList[$i]->getUserId();
     $captList = $captain->retrieveCaptainFromBook($captain_id);
     //$userList = $user->retrieveUserFromId($appList[$i]->getUserId());
     $captName = $captList[0]->getFirstName() . " " . $captList[0]->getLastName();
     //$userName = $userList[0]->getFirstName() . " " . $userList[0]->getLastName();
     $app_id = $appList[$i]->getAppointmentId();
     $ratingScore = $rating->retrieveScoreApp($app_id, $captain_id, $user_id_from_book);
     echo "<li class='list-group-item'>Appointment with Captain " . $captName . " at " . $appList[$i]->getAppointmentDate();
     if ($userType == "Customer") {
         echo "</br>Rate " . $captName . " <div class='captRate' id='rate-" . $captain_id . "-" . $user_id_from_book . "-" . $app_id . "' data-score='" . $ratingScore . "'></div><button class='btn btn-primary rateButton' id='button-" . $captain_id . "-" . $user_id_from_book . "-" . $app_id . "'>Rate</button>  ";
     } elseif ($userType == "Captain") {
         echo "Your rating <div class='captRate' id='rate-" . $captain_id . "-" . $user_id_from_book . "-" . $app_id . "' data-score='" . $ratingScore . "'></div>  ";
     }
     echo "</li>";
 }
 echo "</ul></div> ";
 //************************************** PAST APPOINTMENTS ENDS ******************************************
 if ($userType == "Customer") {
     $cancelMsg = "You will lose your deposit and notifications will be sent to all parties involved.";
 } else {
     $cancelMsg = "The deposit will be refunded back to the customer and notifications will be sent to all parties involved.";
 }
开发者ID:poliang13,项目名称:Captains-Hubs,代码行数:31,代码来源:appointment.php


注:本文中的Rating::retrieveScoreApp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。