Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function _view($id=1, $isAjax = false, $forExport = false)
- {
- ini_set('memory_limit', '512M');
- if (Input::get('report_exceeded')) {
- $filter_arr = Input::all();
- $filter_obj = array();
- unset($filter_arr['report_exceeded']);
- unset($filter_arr['dynamicDates']);
- unset($filter_arr['format']);
- foreach ($filter_arr as $key => $value) {
- if (!strpos($key, '_comparator') && !strpos($key, '_logicOperator')) {
- if (isset($filter_arr[$key . '_logicOperator'])) {
- $filter_obj[] = (object) array($key => $value, $key . '_comparator' => $filter_arr[$key . '_comparator'], $key . '_logicOperator' => $filter_arr[$key . '_logicOperator']);
- } else {
- $filter_obj[] = (object) array($key => $value, $key . '_comparator' => $filter_arr[$key . '_comparator']);
- }
- }
- }
- $this->_createReportSchedule($id, json_encode($filter_obj));
- }
- $filter = (Input::get('filter')) ? true : false;
- $output = Input::get('output', 'view');
- $NR = (null !== (Input::get('NR'))) ? true : false;
- $XD = (Input::get('XD')) ? Input::get('XD') : false;
- if (!$XD) {
- $id = filter_var($id, FILTER_SANITIZE_NUMBER_INT);
- }
- $page = (Input::get('page') && is_numeric(Input::get('page'))) ? filter_var(Input::get('page'), FILTER_SANITIZE_NUMBER_INT) : 1;
- $perPage = Setting::get('resultsPerPage');
- $theme = Input::get('theme', 'light');
- if (!in_array($theme, ['light', 'dark'])) {
- $theme = 'light';
- }
- Log::error(__METHOD__ .' REPORT ID: '. $id);
- if ($XD) {
- Log::error(__METHOD__ .' XD: '. json_encode($XD));
- }
- $arrayReport = array();
- $arrayReport['NR'] = $NR;
- $arrayReport['chart'] = 0;
- $arrayReport['error'] = '';
- $arrayReport['errorExport'] = '';
- $arrayReport['multi'] = false;
- $filters = [];
- $savedFilters = [];
- $sponsorsFilter = [];
- $agregadorFilter = [];
- $tgestadoFilter = [];
- $tgsponsorsFilter = [];
- $activoFilter = [];
- $campaniaFilter = [];
- $mediosFilter = [];
- $rowsFilter = [];
- $estadoEsFilter = [];
- $resultadoFilter = [];
- $mdsFilter = [];
- $paquetesFilter = [];
- $aplicacionesFilter = [];
- $paymentFilter = [];
- $redesFilter = [];
- $actionFilter = [];
- $operadorKey = null;
- $operadorValue = null;
- $mdsUserFiltered = false;
- $mdsValue = null;
- $mdsRedFiltered = false;
- $userRedAuthorized = true;
- $redValue = null;
- $repo = null;
- $reportExec = null;
- $catched = false;
- $aDynamicDates = null;
- $data = array();
- if ($id) {
- // $results = [];
- $this->_resultHeader = [];
- $this->_resultBody = [0 => []];
- $this->_resultRaw = [0 => []];
- try {
- if (!$XD) {
- $this->_report[0] = OrtReports::findOrFail($id);
- if (!Auth::user()->hasRole('admin')) {
- $roleUser = RoleUser::where('user_id', Auth::user()->user_id)->get(['role_id']);
- $myRoles = [];
- foreach ($roleUser as $role) {
- $myRoles[] = $role->role_id;
- }
- $this->_report[0] = OrtReports::where('report.report_id', $id)->select("report.*");
- $this->_report[0] = $this->_report[0]->leftJoin('role_report', 'role_report.report_id', '=', 'report.report_id');
- $whereClause = "(report.user_id = ". Auth::user()->user_id . " OR (report_tool = 'ort'";
- if (count($myRoles)) {
- $whereClause .= " AND role_report.role_id IN(".implode(',', $myRoles).")";
- }
- $whereClause .= "))";
- $this->_report[0] = $this->_report[0]->whereRaw($whereClause)->first();
- // if no report_id user has NO privileges over the report but the report exists. Otherwise it would throw an exception at the findOrFail sentence
- if (!isset($this->_report[0]->report_id)) {
- return Response::view('forbidden', array(), 403);
- }
- }
- if (!$this->_report[0]->report_enabled) {
- throw new Exception(sprintf(trans('messages.reporte_deshabilitado'), $id), 1);
- }
- $filters = $this->_getFilters($this->_report[0]->report_query);
- if (in_array(trans("ort.Operador"), $filters)) {
- if (Auth::user()->hasRole('admin')) {
- $sponsorsFilter = Sponsor::noLock()->orderBy('Sponsor')->lists('Sponsor', 'SponsorId');
- } else {
- $roleSponsorsModel = RoleSponsor::whereIn('role_id', $myRoles)->get(['sponsor_id']);
- $roleSponsors = [];
- foreach ($roleSponsorsModel as $modelObj) {
- $roleSponsors[] = $modelObj->sponsor_id;
- }
- if (count($roleSponsors)) {
- $sponsorsFilter = Sponsor::noLock()->orderBy('Sponsor')->whereIn('SponsorId', $roleSponsors)->lists('Sponsor', 'SponsorId');
- }
- }
- $operadorKey = array_search(trans("ort.Operador"), $filters);
- $operadorValue = Input::get($operadorKey) ? Input::get($operadorKey) : Input::old($operadorKey);
- // if operador not submitted, then select first
- if (is_array($sponsorsFilter) && count($sponsorsFilter) && !$operadorValue) {
- $operadorValue = array_keys($sponsorsFilter)[0];
- }
- // validar que el usuario tiene permisos sobre el sponsor seleccionado
- if (!in_array($operadorValue, array_keys($sponsorsFilter))) {
- throw new \Exception(trans('messages.sin_permisos_sobre_operador'));
- }
- }
- if (in_array(trans("ort.Operador2"), $filters)) {
- $tgsponsorsFilter = ['' => trans('messages.select_seleccionar')] + Sponsor::noLock()->orderBy('Sponsor')->lists('Sponsor', 'SponsorId');
- }
- if (in_array(trans("ort.Agregador"), $filters)) {
- $agregadorFilter = ['' => trans('messages.select_seleccionar')] +
- Aggregator::orderBy('name')->lists('name', 'id');
- }
- if (in_array('Estado usuario', $filters)) {
- $tgestadoFilter = ['' => trans('messages.select_seleccionar')] +
- TGStatus::orderBy('status')->lists('status', 'status_id');
- }
- if (in_array(trans("ort.activo"), $filters)) {
- $activoFilter = ['' => trans('messages.select_seleccionar')] +
- ['1' => trans('messages.Sí'), '0' => 'No'];
- }
- if (in_array(trans("ort.campania"), $filters)) {
- $campaniaFilter = ['' => trans('messages.select_seleccionar')] +
- Campaign::orderBy('name')->lists('name', 'id');
- }
- if (in_array(trans("ort.Medio"), $filters)) {
- if ($operadorKey) {//dd($operadorValue);
- if ($operadorValue) {
- $mediosFilter = ['' => trans('messages.select_seleccionar')] + Medio::noLock()->where('SponsorId', $operadorValue)->orderBy('Medio')->lists('Medio', 'MedioId');
- } else {
- $mediosFilter = ['' => trans('messages.select_seleccionar_operador')];
- }
- } else {
- $mediosFilter = ['' => trans('messages.select_seleccionar')] + Medio::noLock()->leftJoin('OpratelInfo.dbo.SuscripcionDiario', 'OpratelInfo.dbo.SuscripcionDiario.MedioId', '=', 'Medio.MedioId')
- ->join('Sponsor', 'Sponsor.SponsorId', '=', 'Medio.SponsorId')
- ->whereNotNull('OpratelInfo.dbo.SuscripcionDiario.SuscripcionId')
- ->orderBy('Sponsor')->select(
- [DB::raw("DISTINCT(Medio.MedioId)"), DB::raw("Medio + ' (' + Sponsor.Sponsor + ')' as Medio"), "Sponsor"]
- )->lists("Medio", "MedioId");
- }
- }
- if (in_array(trans("ort.Records"), $filters)) {
- $rowsFilter = ['' => trans('ort.label_todas'), '10' => '10', '25' => '25', '50' => '50', '100' => '100', '1000' => '1000'];
- }
- if (in_array(trans("ort.Estado"), $filters)) {
- $estados = EstadoES::noLock()->get();
- foreach ($estados as $estado) {
- $estadoEsFilter[$estado->EstadoESId] = trans('estadoes.' . $estado->Estado);
- }
- }
- if (in_array(trans("ort.ResultadoId"), $filters)) {
- $resultados = Resultado::noLock()->get();
- foreach ($resultados as $resultado) {
- $resultadoFilter[$resultado->ResultadoId] = trans('resultado.' . $resultado->Resultado);
- }
- }
- if (in_array(trans("ort.Action"), $filters)) {
- $actionFilter[""] = trans('ort.Accion_Todos');
- $actionFilter["1"] = trans('ort.Accion_Altas');
- $actionFilter["0"] = trans('ort.Accion_Bajas');
- }
- if (in_array(trans("ort.Red"), $filters)) {
- $redKey = array_search(trans("ort.Red"), $filters);
- $redValue = Input::get($redKey) ? Input::get($redKey) : Input::old($redKey);
- $redesObjList = Red::noLock()->orderBy('OpratelInfo.dbo.Red.Red');
- if (!Auth::user()->hasRole('admin')) {
- $redesOriginalList = [];
- $userRedesObj = UserRedes::where(['user_id' => Auth::id()])->get(['redid']);
- if (count($userRedesObj)) {
- $mdsRedFiltered = true;
- foreach ($userRedesObj as $value) {
- $redesOriginalList[] = $value->redid;
- }
- $redesObjList = $redesObjList->whereIn('redid', $redesOriginalList);
- }
- }
- $redesObjList = $redesObjList->lists("Red", "Red");
- $redesFilter = ['' => trans('messages.select_seleccionar')] + $redesObjList;
- }
- if (in_array(trans("ort.MDS"), $filters)) {
- $mdsKey = array_search(trans("ort.MDS"), $filters);
- $mdsValue = Input::get($mdsKey) ? Input::get($mdsKey) : Input::old($mdsKey);
- if ($operadorKey) {
- if ($operadorValue) {
- if (in_array(trans("ort.Red"), $filters)) {
- if (!$redValue) {
- $mdsFilter = ['' => trans('messages.select_seleccionar_red')];
- } else {
- $mdsObjList = MedioSuscripcionMySql::getBySponsorIdAndRed($operadorValue, $redValue);
- $mdsUserFiltered = $mdsObjList->mdsUserFiltered;
- $userRedAuthorized = $mdsObjList->userRedAuthorized;
- if (count($mdsObjList->medios)) {
- $mdsFilter = ['' => trans('messages.select_seleccionar')];
- foreach ($mdsObjList->medios as $value) {
- $mdsFilter[$value['mediosuscripcion']] = $value['mediosuscripcion'];
- }
- }
- }
- } else {
- $mdsObjList = MedioSuscripcionMySql::getBySponsorId($operadorValue);
- $mdsUserFiltered = $mdsObjList->mdsUserFiltered;
- if (count($mdsObjList->medios)) {
- $mdsFilter = ['' => trans('messages.select_seleccionar')];
- foreach ($mdsObjList->medios as $value) {
- $mdsFilter[$value['mediosuscripcion']] = $value['mediosuscripcion'];
- }
- }
- }
- } else {
- $mdsFilter = ['' => trans('messages.select_seleccionar_operador')];
- }
- } else {
- $mdsObjList = MedioSuscripcionMySql::orderBy('mediosuscripcion');
- if (!Auth::user()->hasRole('admin')) {
- $mdsOriginalList = [];
- $userMedioSuscripcionObj = UserMedioSuscripcion::where(['user_id' => Auth::id()])->get(['mediosuscripcionid']);
- if (count($userMedioSuscripcionObj)) {
- $mdsUserFiltered = true;
- foreach ($userMedioSuscripcionObj as $value) {
- $mdsOriginalList[] = $value->mediosuscripcionid;
- }
- $mdsObjList = $mdsObjList->whereIn('mediosuscripcionid', $mdsOriginalList);
- }
- }
- $mdsObjList = $mdsObjList->lists("MedioSuscripcion", "MedioSuscripcion");
- if (!$mdsUserFiltered) {
- $mdsObjList = ['SMS' => 'SMS'] + $mdsObjList;
- }
- $mdsFilter = ['' => trans('messages.select_seleccionar')] + $mdsObjList;
- }
- }
- if (in_array(trans("ort.Paquete"), $filters)) {
- $paquetesFilter = ['' => trans('messages.select_seleccionar')] +
- Paquete::noLock()->leftJoin('OpratelInfo.dbo.SuscripcionDiario', 'OpratelInfo.dbo.SuscripcionDiario.PaqueteId', '=', 'Paquete.PaqueteId')
- ->whereNotNull('OpratelInfo.dbo.SuscripcionDiario.SuscripcionId')->orderBy('Paquete')->select(
- [DB::raw("DISTINCT(Paquete.PaqueteId)"), "Paquete"]
- )->lists("Paquete", "PaqueteId");
- }
- if (in_array(trans("ort.Aplicacion"), $filters)) {
- $aplicacionesFilter = ['' => trans('messages.select_seleccionar')] +
- Paquete::noLock()->leftJoin('OpratelCenter.dbo.Aplicacion', 'Paquete.AplicacionId', '=', 'OpratelCenter.dbo.Aplicacion.AplicacionId')
- ->leftJoin('OpratelInfo.dbo.SuscripcionDiario', 'OpratelInfo.dbo.SuscripcionDiario.PaqueteId', '=', 'Paquete.PaqueteId')
- ->whereNotNull('OpratelInfo.dbo.SuscripcionDiario.SuscripcionId')->orderBy('OpratelCenter.dbo.Aplicacion.Aplicacion')->select(
- [DB::raw("DISTINCT(OpratelCenter.dbo.Aplicacion.AplicacionId)"), "OpratelCenter.dbo.Aplicacion.Aplicacion"]
- )->lists("Aplicacion", "AplicacionId");
- }
- if (in_array(trans("ort.Payment"), $filters)) {
- $paymentFilter = ['' => trans('messages.select_seleccionar')] +
- Payment::noLock()->lists("Descripcion", "PaymentId");
- }
- // @TODO agregar redes a este exception
- if ($filters
- && (!$filter
- || (in_array(trans("ort.Operador"), $filters) && !$operadorValue)
- || ($mdsUserFiltered && (!$mdsValue || (!in_array($mdsValue, $mdsFilter))))
- || ($mdsRedFiltered && (!$redValue || !$userRedAuthorized || ($mdsFilter && !in_array($mdsValue, $mdsFilter)))))
- ) {
- throw new Exception("Faltan filtros", 1);
- }
- $dataSource = DataSource::findOrFail($this->_report[0]->data_source_id);
- if ($filter) {
- $this->_report[0]->report_query = $this->_replaceFilters($this->_report[0]->report_query, Input::all(), $dataSource->data_source_type);
- }
- Log::error(__METHOD__ .' QUERY ' . $this->_report[0]->report_query);
- $connection = [
- 'conn' => 'otf',
- 'host' => $dataSource->data_source_host,
- 'driver' => str_replace('sqlserver', 'sqlsrv', $dataSource->data_source_type),
- 'database' => $dataSource->data_source_dbname,
- 'username' => $dataSource->data_source_dbuser,
- 'password' => $dataSource->data_source_dbpass
- ];
- if ($dataSource->data_source_port) {
- $connection['port'] = $dataSource->data_source_port;
- }
- $db = new OTF($connection);
- try {
- $db->getConnection()->disableQueryLog();
- $repo = $db->getConnection()->select($this->_report[0]->report_query);
- if ($this->_report[0]->report_exec) {
- $reportExec = json_decode($this->_report[0]->report_exec);
- }
- if ($repo) {
- if ($forExport) {
- $this->_resultRaw[0] = $repo;
- }
- $i = 0;
- foreach ($repo as $value) {
- // Log::error(var_export($value, true));
- if ($i == 0) {
- $this->_resultHeader[0] = array_keys(get_object_vars($value));
- foreach ($this->_resultHeader[0] as $rkey => $rval) {
- $this->_resultHeader[0][$rkey] = $this->friendlyName($rval);
- }
- }
- $tmp_values = get_object_vars($value);
- foreach ($tmp_values as $key => $value) {
- if (strpos($value, ",") !== false) {
- $tmp_values[$key] = '"'.rtrim($value).'"';
- }else{
- $tmp_values[$key] = rtrim($value);
- }
- }
- $this->_resultBody[0][] = array_values($tmp_values);
- $i++;
- }
- if ($this->_report[0]->report_chart_enabled) {
- $this->_drawLavaChart($NR, $theme, $forExport);
- }
- }
- } catch (\Illuminate\Database\QueryException $e) {
- var_dump($e->getMessage()); // wtf
- }
- } else {
- if (!is_array($XD)) {
- $arrayReport['multi'] = true;
- $XD = (array) $XD;
- }
- $chartType = Input::get('chartType', 'Pie');
- if (!is_array($chartType)) {
- $chartType = (array) $chartType;
- // foreach ($chartType as $index => $chart) {
- // $chartType[$index] = ucfirst(filter_var($chart, FILTER_SANITIZE_STRING));
- // }
- }
- $filters = [];
- $this->_report = [];
- foreach ($XD as $index => $XD_item) {
- // echo $index . ' --- ' . $XD_item. "<br>";
- $repo = $this->_getExternalData($XD_item);
- // Log::error('XD DECOD ' . var_export($repo, true));
- $this->_report[$index] = new stdClass;
- $this->_report[$index]->report_chart_enabled = 0;
- $this->_report[$index]->report_id = 0;
- $this->_report[$index]->report_name = ''; // 'External Report';
- if (count($repo)) {
- $this->_report[$index]->report_chart_type = (isset($chartType[$index])) ? ucfirst(filter_var($chartType[$index], FILTER_SANITIZE_STRING)) : 'Pie';
- $this->_report[$index]->report_chart_enabled = 1;
- $this->_report[$index]->report_description = '';
- if ($forExport) {
- $this->_resultRaw[$index] = $repo;
- }
- $i = 0;
- foreach ($repo as $value) {
- // Log::error(var_export($value, true));
- if ($i == 0) {
- $this->_resultHeader[$index] = array_keys(get_object_vars($value));
- }
- $this->_resultBody[$index][] = array_values(get_object_vars($value));
- $i++;
- }
- if ($this->_report[$index]->report_chart_enabled) {
- $this->_drawLavaChart($NR, $theme, $forExport, $index);
- }
- }
- }
- }
- } catch (Exception $e) {
- Log::error(__METHOD__ .' Exception on ORT report '. $id. ': ' . $e->getMessage());
- if (!isset($this->_report[0]) || !$this->_report[0]) {
- $this->_report[0] = new stdClass;
- $this->_report[0]->report_id = 0;
- }
- $this->_report[0]->report_chart_type = '';
- $this->_report[0]->report_chart_enabled = 0;
- if (!isset($this->_report[0]->report_name)) {
- $this->_report[0]->report_name = '';
- }
- if (!isset($this->_report[0]->report_description)) {
- $this->_report[0]->report_description = '';
- }
- $arrayReport['error'] = ($e->getMessage() == 'Faltan filtros') ? '' : $e->getMessage();
- $arrayReport['errorExport'] = $e->getMessage();
- $catched = true;
- }
- if ($forExport) {
- $perPage = (count($this->_resultBody[0])) ? count($this->_resultBody[0]) : $perPage;
- $_body = Paginator::make($this->_resultBody[0], count($this->_resultBody[0]), $perPage);
- } else {
- $offset = ($page * $perPage) - $perPage;
- $_paginateBody = array_slice($this->_resultBody[0], $offset, $perPage);
- $_body = Paginator::make($_paginateBody, count($this->_resultBody[0]), $perPage);
- $savedFilters = ReportFilter::where(['report_id' => $id, 'user_id' => Auth::id()])->orderBy('id')->get();
- }
- $inputFilters = Input::all();
- unset($inputFilters['page']);
- $dateFilters = $this->_getDateFilters($filters);
- $dynamicDates = Input::get('dynamicDates', null);
- if ($dynamicDates) {
- $aDynamicDates = explode(',', $dynamicDates);
- }
- $arrayReport['report'] = $this->_report;
- $arrayReport['rheader'] = $this->_resultHeader;
- $arrayReport['rbody'] = $_body;
- $arrayReport['results'] = count($this->_resultBody[0]);
- $arrayReport['isPaginated'] = ($arrayReport['results'] > $perPage);
- $arrayReport['isAjax'] = $isAjax;
- $arrayReport['isExport'] = $forExport;
- $arrayReport['chartType'] = $this->_chartType;
- $arrayReport['filters'] = $filters;
- $arrayReport['dateFilters'] = $dateFilters;
- $arrayReport['dynamicDates'] = $aDynamicDates;
- $arrayReport['flagFields'] = \Setting::get('ortFlagFields');
- $arrayReport['inputFilters'] = $inputFilters;
- $arrayReport['sponsorsFilter'] = ($sponsorsFilter) ? $sponsorsFilter : ['' => trans('messages.no_hay_sponsors_disponibles')];
- $arrayReport['tgsponsorsFilter'] = ($tgsponsorsFilter) ? $tgsponsorsFilter : ['' => trans('messages.no_hay_sponsors_disponibles')];
- $arrayReport['agregadorFilter'] = ($agregadorFilter) ? $agregadorFilter : ['' => trans('messages.no_hay_agregadores_disponibles')];
- $arrayReport['tgestadoFilter'] = ($tgestadoFilter) ? $tgestadoFilter : ['' => trans('messages.no_hay_agregadores_disponibles')];
- $arrayReport['activoFilter'] = ($activoFilter) ? $activoFilter : ['' => 'Error'];
- $arrayReport['campaniaFilter'] = ($campaniaFilter) ? $campaniaFilter : ['' => trans('messages.no_hay_campania_disponibles')];
- $arrayReport['mediosFilter'] = ($mediosFilter) ? $mediosFilter : ['' => trans('messages.no_hay_medios_disponibles')];
- $arrayReport['rowsFilter'] = $rowsFilter;
- $arrayReport['estadoEsFilter'] = ['' => trans('messages.select_seleccionar')] + $estadoEsFilter;
- $arrayReport['resultadoFilter'] = ['' => trans('messages.select_seleccionar')] + $resultadoFilter;
- $arrayReport["ActionFilter"] = $actionFilter;
- $arrayReport['paquetesFilter'] = ($paquetesFilter) ? $paquetesFilter : ['' => trans('messages.no_hay_paquetes_disponibles')];
- $arrayReport['aplicacionesFilter'] = ($aplicacionesFilter) ? $aplicacionesFilter : ['' => trans('messages.no_hay_aplicaciones_disponibles')];
- $arrayReport['paymentFilter'] = ($paymentFilter) ? (['' => trans('messages.select_seleccionar')] + $paymentFilter) : ['' => trans('messages.no_hay_payments_disponibles')];
- $arrayReport['redesFilter'] = ($redesFilter) ? $redesFilter : ['' => trans('messages.no_hay_redes_disponibles')];
- $arrayReport['mdsFilter'] = ($mdsFilter) ? $mdsFilter : ['' => trans('messages.no_hay_medios_disponibles')];
- $arrayReport['msg_bgreport']= (Input::get('report_exceeded')) ? trans('messages.reporte_sin_memoria') : '';
- $arrayReport['reportExec']= $reportExec;
- $arrayReport['savedFilters']= $savedFilters;
- $arrayReport['cookieViewStates'] = $this->_getCookieViewStates();
- $arrayReport['callbackUrl'] = Session::get('ORTcallback', asset('reportes/ort/'));
- if (!$catched && !count($_body) && !$arrayReport['error'] && !$arrayReport['msg_bgreport']) {
- $arrayReport['error'] = trans('ort.no_results');
- }
- if (is_array($arrayReport) && count($arrayReport) > 0) {
- $arrayReport['show'] = true;
- }
- }
- if ($forExport) {
- $tipo = filter_var(Input::get('tipo', 'pdf'), FILTER_SANITIZE_STRING);
- $exportView = ($tipo == 'pdf') ? View::make("reportes.view_report_container", $arrayReport)->render() : ''; // Render view only if export is PDF
- return new ReportExport(
- $this->_report[0]->report_name,
- ['header' => $this->_resultHeader[0], 'body' => $this->_resultBody[0], 'arrayReport' => $arrayReport],
- $exportView
- );
- }
- if ($isAjax) {
- return Response::view("reportes.view_report", $arrayReport);
- }
- $container = "reportes.view_report_container";
- if ($NR) {
- $container .= "_nr";
- $arrayReport['bodycolor'] = ($theme == 'light') ? 'black' : 'white';
- $arrayReport['backgroundcolor'] = ($theme == 'light') ? 'white' : 'black';
- }
- return Response::view($container, $arrayReport);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement