Esempio n. 1
0
 /**
  * 
  * 获取还未自定义积分规则的应用标识和名称 ...
  */
 public function getNotSetApp()
 {
     if ($this->input[id]) {
         $this->addItem(array());
         $this->output();
     }
     $appInfo = $this->CreditRulesDiy->getApp();
     $Members = new members();
     $creditRules = new creditrules();
     $appid = array();
     if ($appInfo && is_array($appInfo)) {
         $appid = array_keys($appInfo);
         $appDiyRule = $Members->getDiyRulesInfo($appid, true);
         $diyRule = $creditRules->getDiyRules();
         $diyRuleKey = array();
         if (is_array($diyRule)) {
             $diyRuleKey = array_keys($diyRule);
         }
         foreach ($appDiyRule as $k => $v) {
             $noSetRuleKey = array();
             if (is_array($v)) {
                 $setRuleKey = array_keys($v);
                 $noSetRuleKey = array_diff($diyRuleKey, $setRuleKey);
             }
             if (empty($noSetRuleKey)) {
                 unset($appInfo[$k]);
             }
         }
         foreach ($appInfo as $k => $v) {
             $this->addItem_withkey($k, $v);
         }
     } else {
         $this->addItem($appid);
     }
     $this->output();
 }