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


PHP Connect::GetValue方法代碼示例

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


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

示例1: unserialize

    $safe = false;
}
if (array_key_exists('token', $_POST)) {
    $token = filter_input(INPUT_POST, 'token');
} else {
    $safe = false;
}
if ($safe) {
    $authenticated = $connection->Verify($connectinfo, $profid, $token);
    if ($authenticated) {
        //Do only if user has notification
        $check = $connection->ListCheck($connectinfo, 1, $profid, "groups_pending", $groupid);
        $checkdeclined = $connection->ListCheck($connectinfo, 2, $profid, "groups_declined", $groupid);
        $checkleft = $connection->ListCheck($connectinfo, 2, $profid, "groups_left", $groupid);
        if ($check == true || $checkdeclined == true || $checkleft == true) {
            $targetvalues = $connection->GetValue($connectinfo, 0, $groupid, "people_added");
            $targetvaluesarray = unserialize($targetvalues);
            $targetid = ReturnTargetID($targetvaluesarray, $profid);
            $connection->RemoveItemfromList($connectinfo, 1, $profid, "groups_pending", "groupid:" . strval($groupid), "data");
            if ($accepted) {
                //Add on to people accepted
                $connection->AddtoList($connectinfo, 0, $groupid, "people_accepted", $profid);
                //Add to group list of accepted friends
                $connection->AddtoList($connectinfo, 2, $profid, "groups_accepted", $groupid);
                //Add to profile list of accepted groups
                //(Notify group inviter that a new user has accepted group request?
                if ($checkdeclined == false && $checkleft == false) {
                    CreateNotification(2, $connectinfo, $targetid, $profid, $groupid, TRUE);
                } else {
                    //Remove from list of left groups
                    if ($checkleft) {
開發者ID:96imranahmed,項目名稱:Eventory,代碼行數:31,代碼來源:group_decision.php

示例2: Connect

<?php

include 'connect.php';
$connection = new Connect();
$connectinfo = $connection->GetConnection();
$column = "groups_pending";
$currentrow = $connection->GetRow($connectinfo, 1, "863307073758034");
$notifraw = $connection->GetValue($connectinfo, 1, "863307073758034", "notification_raw");
$notiflist = explode(";", $notifraw);
$columnid = array_search($column, array_keys($currentrow));
print_r($columnid);
print_r($notiflist);
$notifremove = [];
$removeindex = [1];
$occurencecount = 0;
//NEED TO REMOVE FROM RAW AS WELL!
for ($b = 0; $b < count($notiflist); $b++) {
    if ($notiflist[$b] == $columnid) {
        if (in_array($occurencecount, $removeindex)) {
            $notifremove[] = $b;
        }
        $occurencecount++;
    }
}
print_r($notifremove);
for ($a = 0; $a < count($notifremove); $a++) {
    unset($notiflist[$notifremove[$a] - $a]);
}
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
開發者ID:96imranahmed,項目名稱:Eventory,代碼行數:31,代碼來源:blah.php

示例3: elseif

if (array_key_exists('token', $_POST)) {
    $token = filter_input(INPUT_POST, 'token');
} else {
    $safe = false;
}
if (array_key_exists('type', $_POST)) {
    $type = filter_input(INPUT_POST, 'type');
} else {
    $safe = false;
}
if ($safe) {
    $authenticated = $connection->Verify($connectinfo, $profid, $token);
    if ($authenticated) {
        if ($type == 0) {
            //Get accepted groups
            $groupstring = $connection->GetValue($connectinfo, 2, $profid, "groups_accepted");
        } elseif ($type == 1) {
            //Get declined groups
            $groupstring = $connection->GetValue($connectinfo, 2, $profid, "groups_declined");
        } elseif ($type == 2) {
            //Get left groups
            $groupstring = $connection->GetValue($connectinfo, 2, $profid, "groups_left");
        }
        if (count($groupstring) == 0 || $groupstring == null) {
            echo null;
        } else {
            $grouparray = explode(";", $groupstring);
            $returnarray = array();
            foreach ($grouparray as $currentid) {
                $row = $connection->GetRow($connectinfo, 0, $currentid);
                $name = $row["name"];
開發者ID:96imranahmed,項目名稱:Eventory,代碼行數:31,代碼來源:group_get.php


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