Пример #1
0
 function __construct()
 {
     global $lC_Language, $breadcrumb_string;
     $this->_page_title = $lC_Language->get('heading_title');
     $breadcrumb_array = array(lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module), $lC_Language->get('heading_title')));
     if (!empty($_GET[$this->_module]) && is_numeric($_GET[$this->_module])) {
         $this->_page_contents = 'entries.php';
         $this->_page_title = lC_Zone_groups_Admin::get($_GET[$this->_module], 'geo_zone_name');
         $breadcrumb_array[] = lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $this->_module . '=' . $this->_page_contents), $this->_page_title);
     }
     $breadcrumb_string = '<ul>';
     foreach ($breadcrumb_array as $key => $value) {
         $breadcrumb_string .= '<li>' . $value . '</li>';
     }
     $breadcrumb_string .= '</ul>';
 }
Пример #2
0
 public static function getData()
 {
     $result = lC_Zone_groups_Admin::get($_GET['zid']);
     $result['rpcStatus'] = RPC_STATUS_SUCCESS;
     echo json_encode($result);
 }
Пример #3
0
 public static function batchDeleteGroups($batch)
 {
     global $lC_Language;
     $lC_Language->loadIniFile('zone_groups.php');
     $result = array();
     $result['namesString'] = '';
     foreach ($batch as $id) {
         if (lC_Zone_groups_Admin::hasTaxRate($id)) {
             $zData = lC_Zone_groups_Admin::get($id);
             $result['namesString'] .= $zData['geo_zone_name'] . ' (' . sprintf($lC_Language->get('total_entries'), $zData['total_entries']) . '), ';
         } else {
             lC_Zone_groups_Admin::delete($id);
         }
     }
     if (!empty($result['namesString'])) {
         $result['namesString'] = substr($result['namesString'], 0, -2);
     }
     return $result;
 }