當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Frontend::totalLove方法代碼示例

本文整理匯總了PHP中Frontend::totalLove方法的典型用法代碼示例。如果您正苦於以下問題:PHP Frontend::totalLove方法的具體用法?PHP Frontend::totalLove怎麽用?PHP Frontend::totalLove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Frontend的用法示例。


在下文中一共展示了Frontend::totalLove方法的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;
    }
開發者ID:highfidelity,項目名稱:love,代碼行數:31,代碼來源:sendlove.php


注:本文中的Frontend::totalLove方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。