Example #1
0
 /**
  * Renders ajax data subscriptions
  * 
  * @return void
  */
 public function subscribtionsListAjax()
 {
     $allAddress = zb_AddressGetFulladdresslistCached();
     $allRealNames = zb_UserGetAllRealnames();
     $allBalance = zb_UserGetAllBalance();
     $result = '{ 
               "aaData": [ ';
     if (!empty($this->allSubscribers)) {
         foreach ($this->allSubscribers as $io => $each) {
             $userLink = wf_Link('?module=userprofile&username='******'login'], web_profile_icon() . ' ' . @$allAddress[$each['login']], false);
             $userLink = $this->jqDtFilter($userLink);
             @($userRealName = $this->jqDtFilter($allRealNames[$each['login']]));
             $actFlag = $this->jqDtFilter(web_bool_led($each['active'], false));
             $primFlag = $this->jqDtFilter(web_bool_led($each['primary'], false));
             $freeperiodFlag = $this->jqDtFilter(web_bool_led($each['freeperiod'], false));
             $actLinks = wf_Link(self::URL_ME . '&' . self::URL_SUBVIEW . '&subid=' . $each['id'], wf_img('skins/icon_edit.gif'));
             $actLinks = $this->jqDtFilter($actLinks);
             @($userCash = $this->jqDtFilter($allBalance[$each['login']]));
             $result .= '
                 [
                 "' . $each['id'] . '",
                 "' . $userLink . '",
                 "' . $userRealName . '",
                 "' . $userCash . '",
                 "' . @$this->allTariffs[$each['tariffid']]['name'] . '",
                 "' . $each['actdate'] . '",
                 "' . $actFlag . '",
                 "' . $primFlag . '",
                 "' . $freeperiodFlag . '",
                 "' . $actLinks . '"
                 ],';
         }
     }
     $result = zb_CutEnd($result);
     $result .= '] 
     }';
     die($result);
 }
Example #2
0
 /**
  * Returns JQuery datatables reply for total remains report
  * 
  * @return string
  */
 public function reportAllStoragesRemainsAjaxReply()
 {
     $all = $this->remainsAll();
     $result = '{ 
               "aaData": [ ';
     if (!empty($all)) {
         foreach ($all as $itemtypeId => $count) {
             if ($count > 0) {
                 $actLink = wf_Link(self::URL_ME . '&' . self::URL_VIEWERS . '&showremains=' . $itemtypeId, wf_img_sized('skins/icon_search_small.gif', '', '10', '10') . ' ' . __('Show'));
                 $actLink = str_replace('"', '', $actLink);
                 $actLink = trim($actLink);
                 $result .= '
                 [
                 "' . $this->allCategories[$this->allItemTypes[$itemtypeId]['categoryid']] . '",
                 "' . $this->allItemTypeNames[$itemtypeId] . '",
                 "' . $count . ' ' . $this->unitTypes[$this->allItemTypes[$itemtypeId]['unit']] . '",
                 "' . $actLink . '"
                 ],';
             }
         }
     }
     $result = zb_CutEnd($result);
     $result .= '] 
     }';
     die($result);
 }
Example #3
0
 /**
  * Renders ajax data subscriptions
  * 
  * @return void
  */
 public function subscribtionsListAjax()
 {
     $result = '{ 
               "aaData": [ ';
     if (!empty($this->allSubscribers)) {
         foreach ($this->allSubscribers as $io => $each) {
             $userLink = wf_Link('?module=userprofile&username='******'login'], web_profile_icon() . ' ' . $each['login'], false);
             $userLink = trim($userLink);
             $userLink = str_replace('"', '', $userLink);
             $actFlag = web_bool_led(web_bool_led($each['active'], false));
             $actFlag = str_replace('"', '', $actFlag);
             $primFlag = web_bool_led(web_bool_led($each['primary'], false));
             $primFlag = str_replace('"', '', $primFlag);
             $freeperiodFlag = web_bool_led(web_bool_led($each['freeperiod'], false));
             $freeperiodFlag = str_replace('"', '', $freeperiodFlag);
             $result .= '
                 [
                 "' . $each['id'] . '",
                 "' . $userLink . '",
                 "' . @$this->allTariffs[$each['tariffid']]['name'] . '",
                 "' . $each['actdate'] . '",
                 "' . $actFlag . '",
                 "' . $primFlag . '",
                 "' . $freeperiodFlag . '"
                 ],';
         }
     }
     $result = zb_CutEnd($result);
     $result .= '] 
     }';
     die($result);
 }