Exemplo n.º 1
0
 public function getApps()
 {
     if ($this->apps == null) {
         $this->apps = HouseAdUtil::getAppsByCid($this->id);
     }
     return $this->apps;
 }
 public function canDelete()
 {
     $this->printHeader = false;
     $this->printFooter = false;
     $del_cids = isset($_REQUEST['deletes']) ? $_REQUEST['deletes'] : null;
     $hasApps = array();
     fb('del_cids', $del_cids);
     foreach ($del_cids as $del_cid) {
         $apps = HouseAdUtil::getAppsByCid($del_cid);
         $count = count($apps);
         if ($count > 0) {
             $hasApps[] = $del_cid;
         }
     }
     if (count($hasApps) == 0) {
         return 'OK';
     } else {
         return implode(",", $hasApps);
     }
 }