public function get_points($params, $body) { $isAPITokenRequest = $this->pex->getIsApiTokenRequest(); if ($this->user->check_pageobjects(array('points'), 'AND', false) || $isAPITokenRequest) { include_once $this->root_path . 'core/data_export.class.php'; $myexp = new content_export(); //MemberData $arrBooleansMemberdata = array(); if (isset($params['get']['memberdata']) && strlen($params['get']['memberdata'])) { //Available Memberdata $arrMemberdata = array('items', 'adjustments'); if (strpos($params['get']['memberdata'], ',')) { $arrData = explode(",", $params['get']['memberdata']); } else { $arrData = array($params['get']['memberdata']); } foreach ($arrData as $strData) { if (in_array($strData, $arrMemberdata)) { $arrBooleansMemberdata[$strData] = true; } } } //IncludeHTML $blnIncludeHTML = isset($params['get']['include_html']) && $params['get']['include_html'] == 'true' ? true : false; //Filter $filter = $filterid = false; if (isset($params['get']['filter']) && in_array($params['get']['filter'], array('user', 'character')) && isset($params['get']['filterid'])) { $filter = $params['get']['filter']; $filterid = intval($params['get']['filterid']); } return $myexp->export(isset($arrBooleansMemberdata['items']) && $arrBooleansMemberdata['items'], isset($arrBooleansMemberdata['adjustments']) && $arrBooleansMemberdata['adjustments'], $filter, $filterid, $blnIncludeHTML); } else { return $this->pex->error('access denied'); } }
public function get_points($params, $body) { if ($this->user->check_auth('u_event_view', false) && $this->user->check_auth('u_member_view', false) && $this->user->check_auth('u_item_view', false)) { include_once $eqdkp_root_path . 'core/data_export.class.php'; $myexp = new content_export(); $withMemberItems = isset($params['get']['exclude_memberitems']) && $params['get']['exclude_memberitems'] == 'true' ? false : true; return $myexp->export($withMemberItems); } else { return $this->pex->error('access denied'); } }
public function display() { include_once $this->root_path . 'core/data_export.class.php'; $myexp = new content_export(); $arrData = $myexp->export(true, true, false, false, true); $strApiKey = $this->config->get('api_key'); if (!$strApiKey) { $strApiKey = generateRandomBytes(48); $this->config->set('api_key', $strApiKey); } $this->tpl->assign_vars(array('EXPORT_DATA' => $this->returnLua($arrData), 'API_KEY' => $strApiKey, 'S_SHOW_APIKEY' => $this->user->check_group(2, false))); $this->core->set_vars(array('page_title' => $this->user->lang('manexport_title'), 'template_file' => 'admin/manage_export.html', 'display' => true)); }