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


PHP Network::postGet方法代碼示例

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


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

示例1: getNetworksByAidIndexNid

 public static function getNetworksByAidIndexNid($aid)
 {
     $sdb = SDB::getInstance();
     $domain = Network::$SDBDomain;
     $aaa = array();
     foreach (Network::$SDBFields as $field => $meta) {
         $aaa[] = $field;
     }
     $where = "where `aid` = '{$aid}'";
     if (!$sdb->select($domain, $aaa, $where)) {
         return null;
     }
     $appNetworks = array();
     foreach ($aaa as $aa) {
         $appNetwork = new Network();
         foreach (Network::$SDBFields as $field => $meta) {
             $appNetwork->{$field} = $aa[$field];
         }
         $appNetwork->id = $aa['id'];
         $appNetwork->postGet();
         $appNetworks[$appNetwork->id] = $appNetwork;
     }
     return $appNetworks;
 }
開發者ID:amoikevin,項目名稱:adwhirl.servers-website,代碼行數:24,代碼來源:NetworkUtil.php

示例2: appNetworksSubmit

 public function appNetworksSubmit()
 {
     $this->printHeader = false;
     $this->printFooter = false;
     $this->needsApp();
     if ($this->user->id != $this->app->uid) {
         die;
     }
     $nids = isset($_POST['nid']) ? $_POST['nid'] : null;
     $priorities = isset($_POST['priority']) ? $_POST['priority'] : null;
     $weights = isset($_POST['weight']) ? $_POST['weight'] : null;
     $adsOn = isset($_POST['adsOn']) ? $_POST['adsOn'] : null;
     fb('nids', $nids);
     fb('priorities', $priorities);
     fb('adsOn', $adsOn);
     fb('weights', $weights);
     $off = array();
     $on = array();
     for ($i = 0; $i < count($nids); $i++) {
         $nid = $nids[$i];
         if (!empty($nid)) {
             $network = new Network($nid);
             $network->postGet();
         } else {
             continue;
             /* We don't need this, since we can only add change things once they have keys
               	$network = new Network();
               	$nid = SDB::uuid();
               	$network->id = $nid;
               	*/
         }
         $network->aid = $this->app->id;
         $network->weight = isset($weights[$i]) ? $weights[$i] : null;
         $network->adsOn = $adsOn[$i];
         if ($adsOn[$i] == "1") {
             $network->priority = $priorities[$i];
             $on[$network->priority * 1000 + $i] = $network;
         } else {
             $network->priority = Network::MAX_PRIORITY;
             $network->put();
         }
     }
     ksort($on);
     fb("on", $on);
     $count = 0;
     foreach ($on as $network) {
         $network->priority = ++$count;
         $network->put();
     }
     return "OK";
     //return $this->appNetworks();
 }
開發者ID:amoikevin,項目名稱:adwhirl.servers-website,代碼行數:52,代碼來源:oneApp.php


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