public function spincard() { $dbapi = $this->dbapi; $data = $this->conf_data; $data['limit'] = $this->limit; $start = $this->start; $start_date = $this->start_date; $end_date = $this->end_date; $gsearch = $this->gsearch; $data['gdtto'] = $this->gdtto; $data['gdtform'] = $this->gdtform; $qfilter = " AND unix_timestamp(created) >= " . strtotime($start_date) . " AND unix_timestamp(created) <= " . strtotime($end_date); if ($gsearch) { $qsearch = " AND ((username LIKE '%{$gsearch}%' OR username LIKE '{$gsearch}%' OR username LIKE '%{$gsearch}')or (spincard like '%{$gsearch}%' OR spincard like '{$gsearch}%' OR spincard like '%{$gsearch}') )"; $qfilter = ""; } $qwhere = "1=1 {$qsearch} {$qfilter}"; $data['content_data'] = $dbapi->get_spincard('username, spincard, created', $qwhere, $start, $data['limit']); $data['total'] = $dbapi->get_total_from_query_aaa2(); if ($_REQUEST['print'] == 'excel') { DooTextHelper::download_send_headers('spincard_' . date("Ymd") . ".csv"); echo DooTextHelper::array2csv($data['content_data']); exit; } $data['graph'] = $dbapi->get_graph_spincard($start_date, $end_date); $data['filter_tipe'] = false; $data['filter_action'] = 'user/spincard'; $data['content_view'] = 'content/spincard.php'; $data['table_row_option'] = array(20, 100, 500, 1000, 10000); $data['label'] = 'Spincard'; $this->view()->renderc(Doo::conf()->language . '/t3', $data); }
public function userList() { Doo::loadHelper('DooTextHelper'); $data = $this->conf_data; Doo::loadClass('UserSession'); $usession = new UserSession(); $username = $usession->uget('username'); if (isset($_POST['table_row'])) { $usession->uset('table_row_option', $_POST['table_row']); } $rows_data = $usession->uget('table_row_option'); if (!$username) { header('Location:' . DOO::conf()->SUBFOLDER . 'login'); } $dbapi = $this->dbapi; $data['limit'] = 20; if ($rows_data) { $data['limit'] = $rows_data; } $gpage = $_GET['page'] - 1; if ($_REQUEST['print'] == 'excel') { set_time_limit(0); ini_set('memory_limit', '512M'); $data['limit'] = 99999999; unset($gpage); } $gord = $_GET['ord']; $gsearch = addslashes($_POST['search']); $gdtform = addslashes($_GET['dtform']); $gdtto = addslashes($_GET['dtto']); if (!$gdtform) { $gdtform = date("m/d/Y", strtotime("-1 month")); } if (!$gdtto) { $gdtto = date("m/d/Y"); } $data['gdtto'] = $gdtto; $data['gdtform'] = $gdtform; $start = 0; $ord = ''; $qsearch = ''; $qutype = ''; $qfilter = ''; $qSpeedyReginal = $qSubregional = ''; $ordby = "ASC"; if ($username == 'dcs_timur') { $_GET['userProvider'] = 1; if (!$_REQUEST['speedyRegional']) { $_REQUEST['speedyRegional'] = "14;15;16;17"; } } if ($username == 'dcs_barat') { $_GET['userProvider'] = 1; if (!$_REQUEST['speedyRegional']) { $_REQUEST['speedyRegional'] = "11;12;13"; } } if ($username == 'telkomsel') { $_GET['userProvider'] = 2; } if ($_REQUEST['speedyRegional']) { $tempSpeedyReg = explode(';', $_REQUEST['speedyRegional']); $impSpeedyReg = implode("','", $tempSpeedyReg); $qSpeedyReginal = " AND left( ota.bill_account,2) in ('{$impSpeedyReg}') "; if ($_REQUEST['speedySubRegional']) { $qSpeedyReginal = " AND left( ota.bill_account,5) in ('{$_REQUEST['speedySubRegional']}') "; } } if ($_GET['ascd'] == '0') { $ordby = "DESC"; } switch ($gord) { case 'name': $ord = 'subscriber_name '; break; case 'email': $ord = 'user_id '; break; case 'created': $ord = 'create_time '; break; case 'status': $ord = 'status '; break; default: $ord = 'create_time '; $ordby = "DESC"; break; } if ($ord) { $ord .= $ordby; } if ($_GET['userProvider']) { $qutype = " AND type = '" . (int) $_GET['userProvider'] . "'"; } if (isset($gpage) && $gpage >= 0) { $start = $gpage * $data['limit']; } if ($gsearch) { $qsearch = " AND ( subscriber_name LIKE '%{$gsearch}%' OR user_id LIKE '%{$gsearch}%' or email like '%{$gsearch}%') "; } if ($gdtform && $gdtto) { $start_date = $gdtform = date("Y-m-d H:i:s", strtotime($gdtform)); $end_date = $gdtto = date("Y-m-d", strtotime($gdtto)) . " 23:59:59"; $qfilter = " AND create_time >= '{$gdtform}' AND create_time <= '{$gdtto}' "; if ($gdtform == $gdtto) { $qfilter = " AND create_time like '" . date("Y-m-d", strtotime($gdtto)) . "%' "; } } else { $qfilter = " AND create_time > '2012-08-31' "; } $qwhere = "1=1 {$qsearch} {$qfilter} {$qutype} {$qSpeedyReginal}"; if ($qSpeedyReginal) { $dbapi->join_table = "LEFT JOIN ott_business_account ota ON (ics.id=ota.subscriber_id)"; } $data['content_data'] = $dbapi->get_user('ics.id, customer_id, user_id, type, create_time,update_time,subscriber_name, ics.bill_account_type, ics.bill_account, ics.home_phone, email', $qwhere, $start, $data['limit'], $ord); $data['total'] = $dbapi->get_total_from_query(); if ($_REQUEST['print'] == 'excel') { DooTextHelper::download_send_headers('users_' . date("Ymd") . ".csv"); echo DooTextHelper::array2csv($data['content_data']); exit; } if (!$start_date) { $start_date = date("Y-m-d", strtotime("-1 month")); } if (!$end_date) { $end_date = date("Y-m-d"); } $data['graph'] = $dbapi->get_graph_register($_GET['userProvider'], $_REQUEST['speedyRegional'], $_REQUEST['speedySubRegional'], $start_date, $end_date); $data['username'] = $username; $data['dbapi'] = $this->dbapi; $data['subregion'] = $this->subregion; $data['filter_action'] = 'user/list'; $data['content_view'] = 'content/list_user.php'; $data['table_row_option'] = array(20, 100, 500, 1000, 10000); $this->view()->renderc(Doo::conf()->language . '/t3', $data); }
public function indexKoreanpackage() { Doo::loadHelper('DooPager'); Doo::loadClass('Movie'); $mv = new Movie(); $data = $this->conf_data; $data['title'] = 'UseeTV - Korean Packet'; $data['content_view'] = 'content/new_svod.php'; if (!$this->start) { $this->start = 0; } $data['limit'] = $this->limit; $data['gdtto'] = $this->gdtto; $data['gdtform'] = $this->gdtform; $data['content_data'] = $mv->get_korean_register($_GET['userProvider'], $_REQUEST['speedyRegional'], $_REQUEST['speedySubRegional'], $this->start_date, $this->end_date, $this->start, $data['limit'], $this->ord, $this->gsearch); if ($_REQUEST['print'] == 'excel') { DooTextHelper::download_send_headers('koreanpackage_' . date("Ymd") . ".csv"); echo DooTextHelper::array2csv($data['content_data']); exit; } $data['total'] = $mv->get_total_from_query(); $data['graph'] = $mv->get_graph_korean_register($_GET['userProvider'], $_REQUEST['speedyRegional'], $_REQUEST['speedySubRegional'], $this->start_date, $this->end_date); $data['filter_action'] = 'koreanpackage'; $data['table_row_option'] = array(20, 100, 500, 1000, 10000); $data['label'] = 'KOREAN PACKAGE'; $this->view()->renderc(Doo::conf()->language . '/t3', $data); }