本文整理汇总了PHP中Frontend::mostLoved方法的典型用法代码示例。如果您正苦于以下问题:PHP Frontend::mostLoved方法的具体用法?PHP Frontend::mostLoved怎么用?PHP Frontend::mostLoved使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frontend
的用法示例。
在下文中一共展示了Frontend::mostLoved方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
$for = mysql_real_escape_string($for_stripped);
if ($_SESSION['username'] == $to) {
if ($fromMarklet) {
$message = '<div class="LV_invalid">You cannot send love to yourself.</div>';
} else {
die("Love sent: self");
}
}
$rc = sendlove_toanother($_SESSION['userid'], $_SESSION['username'], $_SESSION['nickname'], $isSuper, $to, $for, (int) $_POST["priv"] > 0);
if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
echo json_encode(array('response' => $rc));
exit;
// The following section is not executed due the preceeding speedup workaround. - GJ - Aug 12, 2011
// return a json array containing updated Love counts for dynamic page update
$front = new Frontend();
$loveData = array('response' => $rc, 'data' => array('loveNotifications' => $front->getLoveNotification(), 'loveTotal' => $front->totalLove(), 'loveMost' => $front->mostLoved()));
echo json_encode($loveData);
} else {
if ($fromMarklet) {
if ($message == '') {
if ($rc == 'outside') {
$message = '<div class="LV_invalid">This user is not registered.</div>';
} else {
$message = '<div class="LV_valid">Love sent successfully</div>';
}
}
$front = Frontend::getInstance();
include "view/tofor/love/m_sendlove.php";
} else {
echo "Love sent: " . $rc;
}