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


PHP COMMONFUNC::IsMyRequest方法代碼示例

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


在下文中一共展示了COMMONFUNC::IsMyRequest方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

    case 'athlete':
        //AthleteID
        $UserID = $_SESSION['Athlete_id'];
        break;
    case 'coach':
        //HS Coach ID
        $UserID = $_SESSION['Coach_id'];
        break;
    case 'college':
        //College Coach ID
        $UserID = $_SESSION['College_Coach_id'];
        break;
}
if ($_REQUEST['mode'] == "del") {
    //Detect if requested rowID is user's
    $isMine = $func->IsMyRequest($_REQUEST['Id'], $UserID);
    $_REQUEST['msg'] = "Delete RowID: " . $_REQUEST['Id'] . " | IsMyRow: " . $isMine;
    if ($isMine == 1) {
        $delete_query_details = "delete from " . TBL_NETWORK . " where fldId='" . $_REQUEST['Id'] . "'";
        $delmsg = $db->query($delete_query_details);
        if (isset($delmsg)) {
            $_REQUEST['msg'] = "Network Request successfully deleted.";
        }
    }
    //end isMine test
}
if ($_REQUEST['mode'] == "active") {
    $Id = $_REQUEST['Id'];
    $active_query_details = "update " . TBL_NETWORK . " set fldStatus = 'Active' where fldId='" . $Id . "'";
    $activemsg = $db->query($active_query_details);
    if (isset($activemsg)) {
開發者ID:trungjc,項目名稱:collegeprospectnetwork,代碼行數:31,代碼來源:Network-Requests.php

示例2:

    case 'athlete':
        $PageTitle = "My Athletes";
        $displayMessage = "You have not added any members to your network yet. <a href='athleteSearch_all.php?network_for=" . $network_for . "&mode=" . $ModeType . "'>Click here</a> to get started.";
        break;
    case 'coach':
        $PageTitle = "My HS/AAU Coach";
        $displayMessage = "You have not added any members to your network yet. <a href='ViewAllHsAau.php?network_for=" . $network_for . "&mode=" . $ModeType . "'>Click here</a> to get started.";
        break;
    case 'college':
        $PageTitle = "My College Coach";
        $displayMessage = "You have not added any members to your network yet. <a href='ViewCollegeCoach.php?network_for=" . $network_for . "&mode=" . $ModeType . "'>Click here</a> to get started.";
        break;
}
if ($mode_1 == "del") {
    //Detect if requested rowID is user's
    $isMine = $func->IsMyRequest($Id, $UserID);
    $_REQUEST['msg'] = "Delete RowID: " . $Id . " | IsMyRow: " . $isMine;
    if ($isMine == 1) {
        $delete_query_details = "delete from " . TBL_NETWORK . " where fldId='" . $Id . "'";
        $delmsg = $db->query($delete_query_details);
        if (isset($delmsg)) {
            $_REQUEST['msg'] = "Network Request successfully deleted.";
        }
    }
    //end isMine test
}
if ($mode_1 == "active") {
    $active_query_details = "update " . TBL_NETWORK . " set fldStatus = 'Active' where fldId='" . $Id . "'";
    $activemsg = $db->query($active_query_details);
    if (isset($activemsg)) {
        $_REQUEST['msg'] = "Network Request Aapproved. User has been sent a nofication.";
開發者ID:trungjc,項目名稱:collegeprospectnetwork,代碼行數:31,代碼來源:my_network.php


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