public function testUnpackAttribute() { $report = new Reports(); $fields = $report->asa('WidgetLayoutJSONFieldsBehavior')->fields('dataWidgetLayout'); $unpackedAttribute = $report->asa('WidgetLayoutJSONFieldsBehavior')->unpackAttribute('dataWidgetLayout'); unset($fields['TemplatesGridViewProfileWidget']); // since layout hasn't been set, unpacked attributes should match expected fields with // exception of TemplatesGridViewProfileWidget $this->assertEquals($fields, $unpackedAttribute); }
public function __construct($adb, $user, $reportid = "") { $this->db = $adb; $this->user = $user; $this->id = $reportid; parent::__construct($reportid); }
public static function fromArray($data) { $settings = new RoleSettings(); foreach ($data as $key => $value) { if (property_exists(get_class($settings), $key)) { if (is_array($value)) { if ($key == "transactions") { $settings->{$key} = Transactions::fromArray($value); } if ($key == "reports") { $settings->{$key} = Reports::fromArray($value); } if ($key == "help") { $settings->{$key} = Help::fromArray($value); } if ($key == "mobileVTAccess") { $settings->{$key} = MobileVTAcces::fromArray($value); } if ($key == "admin") { $settings->{$key} = Admin::fromArray($value); } if ($key == "customer") { $settings->{$key} = Customers::fromArray($value); } if ($key == "webPosAccess") { $settings->{$key} = WebPosAccess::fromArray($value); } } else { $settings->{$key} = $value; } } } return $settings; }
function __construct() { parent::__construct(); $this->user = new \User(); $this->patient = new \Patient(); $this->encounter = new \Encounter(); return; }
private static function initialize() { if (self::$initialized) { return; } //generate reports here //return them via other methods self::$initialized = true; }
function __construct() { parent::__construct(); $this->db = new dbHelper(); $this->user = new User(); $this->patient = new Patient(); $this->encounter = new Encounter(); return; }
function __construct() { parent::__construct(); $this->db = new \MatchaHelper(); $this->user = new \User(); $this->patient = new \Patient(); $this->encounter = new \Encounter(); $this->facilities = new \Facilities(); return; }
public function SummarySubmit() { $start = date('Y-m-d', strtotime(Input::get('start'))); $end = date('Y-m-d', strtotime(Input::get('end'))); $date_today = date('Y-m-d'); $prCount = 0; $POCount = 0; $chequeCount = 0; if ($end == '1970-01-01' && $start == '1970-01-01') { $end = '9998-01-01'; $start = '0001-01-01'; $reports = Reports::whereBetween('date', array($start, $end))->get(); foreach ($reports as $report) { $prCount = $prCount + $report->pRequestCount; $POCount = $POCount + $report->pOrderCount; $chequeCount = $chequeCount + $report->chequeCount; } $data = array("inner-fragments" => array("#PR" => "\n\t\t\t\t\t<span class='summary-panel-title'><strong>Total Number of PR Received:</strong></span><br/>\n\t <span class='summary-amount' style='color: #246D27'> {$prCount} </span>\n\t\t\t\t", "#PO" => "\n\t\t\t\t\t<span class='summary-panel-title'><strong>Total Number of PO Received:</strong></span><br/>\n\t <span class='summary-amount' style='color: #4E3A17'> {$POCount} </span>\n\t\t\t\t", "#Cheque" => "\n\t\t\t\t\t<span class='summary-panel-title'><strong>Total Number of Cheque Received:</strong></span><br/>\n\t <span class='summary-amount' style='color: #1B4F69'> {$chequeCount} </span>\n\t\t\t\t", "#dateReport" => "\n\t\t\t\t\t<div id='dateReport' class='alert alert-info'>\n\t\t\t <p>Summary Reports from beginning to {$date_today}.</p>\n\t\t\t </div>\n\t\t\t\t")); return Response::json($data); } else { if ($end == '1970-01-01') { $end = '9998-01-01'; $reports = Reports::whereBetween('date', array($start, $end))->get(); foreach ($reports as $report) { $prCount = $prCount + $report->pRequestCount; $POCount = $POCount + $report->pOrderCount; $chequeCount = $chequeCount + $report->chequeCount; } $data = array("inner-fragments" => array("#PR" => "\n\t\t\t\t\t<span class='summary-panel-title'><strong>Total Number of PR Received:</strong></span><br/>\n\t <span class='summary-amount' style='color: #246D27'> {$prCount} </span>\n\t\t\t\t", "#PO" => "\n\t\t\t\t\t<span class='summary-panel-title'><strong>Total Number of PO Received:</strong></span><br/>\n\t <span class='summary-amount' style='color: #4E3A17'> {$POCount} </span>\n\t\t\t\t", "#Cheque" => "\n\t\t\t\t\t<span class='summary-panel-title'><strong>Total Number of Cheque Received:</strong></span><br/>\n\t <span class='summary-amount' style='color: #1B4F69'> {$chequeCount} </span>\n\t\t\t\t", "#dateReport" => "\n\t\t\t\t\t<div id='dateReport' class='alert alert-info'>\n\t\t\t <p>Summary Reports {$start} to {$date_today}.</p>\n\t\t\t </div>\n\t\t\t\t")); return Response::json($data); } else { if ($start == '1970-01-01') { $start = '0001-01-01'; $reports = Reports::whereBetween('date', array($start, $end))->get(); foreach ($reports as $report) { $prCount = $prCount + $report->pRequestCount; $POCount = $POCount + $report->pOrderCount; $chequeCount = $chequeCount + $report->chequeCount; } $data = array("inner-fragments" => array("#PR" => "\n\t\t\t\t\t<span class='summary-panel-title'><strong>Total Number of PR Received:</strong></span><br/>\n\t <span class='summary-amount' style='color: #246D27'> {$prCount} </span>\n\t\t\t\t", "#PO" => "\n\t\t\t\t\t<span class='summary-panel-title'><strong>Total Number of PO Received:</strong></span><br/>\n\t <span class='summary-amount' style='color: #4E3A17'> {$POCount} </span>\n\t\t\t\t", "#Cheque" => "\n\t\t\t\t\t<span class='summary-panel-title'><strong>Total Number of Cheque Received:</strong></span><br/>\n\t <span class='summary-amount' style='color: #1B4F69'> {$chequeCount} </span>\n\t\t\t\t", "#dateReport" => "\n\t\t\t\t\t<div id='dateReport' class='alert alert-info'>\n\t\t\t <p>Summary Reports from beginning to {$end}.</p>\n\t\t\t </div>\n\t\t\t\t")); return Response::json($data); } else { $reports = Reports::whereBetween('date', array($start, $end))->get(); foreach ($reports as $report) { $prCount = $prCount + $report->pRequestCount; $POCount = $POCount + $report->pOrderCount; $chequeCount = $chequeCount + $report->chequeCount; } $data = array("inner-fragments" => array("#PR" => "\n\t\t\t\t\t<span class='summary-panel-title'><strong>Total Number of PR Received:</strong></span><br/>\n\t <span class='summary-amount' style='color: #246D27'> {$prCount} </span>\n\t\t\t\t", "#PO" => "\n\t\t\t\t\t<span class='summary-panel-title'><strong>Total Number of PO Received:</strong></span><br/>\n\t <span class='summary-amount' style='color: #4E3A17'> {$POCount} </span>\n\t\t\t\t", "#Cheque" => "\n\t\t\t\t\t<span class='summary-panel-title'><strong>Total Number of Cheque Received:</strong></span><br/>\n\t <span class='summary-amount' style='color: #1B4F69'> {$chequeCount} </span>\n\t\t\t\t", "#dateReport" => "\n\t\t\t\t\t<div id='dateReport' class='alert alert-info'>\n\t\t\t <p>Summary Reports from {$start} to {$end}.</p>\n\t\t\t </div>\n\t\t\t\t")); return Response::json($data); } } } }
/** * Get latest reports. * * @access public * * @return array $reports An array of reports with their data. */ public static function reports() { // Delete cache if report was changed if (did_action('save_post_' . Reports::POST_TYPE)) { Cache::delete(__METHOD__); } // If cached, return cache if (false !== ($items = Cache::get(__METHOD__))) { return $items; } // Get reports from database $items = Reports::reports(); // Save reports to cache Cache::set(__METHOD__, $items); return $items; }
if ($_REQUEST['submode'] == 'generateReport' && empty($advft_criteria)) { $filtersql = ''; } $sshtml = array(); $totalhtml = ''; $list_report_form->assign("DIRECT_OUTPUT", true); $list_report_form->assign_by_ref("__REPORT_RUN_INSTANCE", $oReportRun); $list_report_form->assign_by_ref("__REPORT_RUN_FILTER_SQL", $filtersql); //Ends $ogReport->getPriModuleColumnsList($ogReport->primodule); $ogReport->getSecModuleColumnsList($ogReport->secmodule); $ogReport->getAdvancedFilterList($reportid); $COLUMNS_BLOCK = getPrimaryColumns_AdvFilter_HTML($ogReport->primodule, $ogReport); $COLUMNS_BLOCK .= getSecondaryColumns_AdvFilter_HTML($ogReport->secmodule, $ogReport); $list_report_form->assign("COLUMNS_BLOCK", $COLUMNS_BLOCK); $FILTER_OPTION = Reports::getAdvCriteriaHTML(); $list_report_form->assign("FOPTION", $FILTER_OPTION); $rel_fields = $ogReport->adv_rel_fields; $list_report_form->assign("REL_FIELDS", Zend_Json::encode($rel_fields)); $list_report_form->assign("CRITERIA_GROUPS", $ogReport->advft_criteria); $list_report_form->assign("MOD", $mod_strings); $list_report_form->assign("APP", $app_strings); $list_report_form->assign("IMAGE_PATH", $image_path); $list_report_form->assign("REPORTID", $reportid); $list_report_form->assign("IS_EDITABLE", $ogReport->is_editable); $list_report_form->assign("REP_FOLDERS", $ogReport->sgetRptFldr()); $list_report_form->assign("REPORTNAME", htmlspecialchars($ogReport->reportname, ENT_QUOTES, $default_charset)); if (is_array($sshtml)) { $list_report_form->assign("REPORTHTML", $sshtml); } else { $list_report_form->assign("ERROR_MSG", getTranslatedString('LBL_REPORT_GENERATION_FAILED', $currentModule) . "<br>" . $sshtml);
<?php require_once "../lib/report.class.php"; require_once "../lib/helper_functions.php"; $REPORT = new Reports(); $Data = $REPORT->retriveDailyIssueReports(); $grandTotalPrice = 0; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Daily Issue Report</title> <link href="../css/report.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style1 { font-size: 14px; font-weight: bold; } --> </style> </head> <body> <table width="98%" border="0" align="center" cellpadding="5" cellspacing="0"> <tr> <td height="94" align="center" valign="top"><table width="50%" height="67" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="26" align="center" valign="top"><h1>Square Textiles Ltd.</h1>
public function executeDownloadFile(sfWebRequest $request) { $this->setLayout(false); $report = Doctrine::getTable('Reports')->find($request->getParameter('id')); if (!in_array($report->getName(), array_keys(Reports::getGlobalReports($this->getUser())))) { return $this->forwardToSecureAction(); } $this->forward404Unless(file_exists($uri = sfConfig::get('sf_upload_dir') . $report->getUri()), sprintf('This file does not exist')); $response = $this->getResponse(); // First clear HTTP headers $response->clearHttpHeaders(); // Then define the necessary headers $response->setContentType(Multimedia::getMimeTypeFor($report->getFormat())); $response->setHttpHeader('Content-Disposition', 'attachment; filename="' . $report->getName() . "." . $report->getFormat() . '"'); $response->setHttpHeader('Content-Description', 'File Transfer'); $response->setHttpHeader('Content-Transfer-Encoding', 'binary'); $response->setHttpHeader('Content-Length', filesize($uri)); $response->setHttpHeader('Cache-Control', 'public, must-revalidate'); // if https then always give a Pragma header like this to overwrite the "pragma: no-cache" header which // will hint IE8 from caching the file during download and leads to a download error!!! $response->setHttpHeader('Pragma', 'public'); $response->sendHttpHeaders(); ob_end_flush(); return $this->renderText(readfile($uri)); }
<?php require_once "../config.inc.php"; if (!empty($_REQUEST['page_start'])) { $page_start = $_REQUEST['page_start']; } else { $page_start = "0"; } if (!empty($_REQUEST['page_range'])) { $page_range = $_REQUEST['page_range']; } else { $page_range = PAGING_RANGE; } $db = Database::obtain(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE); $db->connect(); $r = new Reports('unknown', BASE_DOMAIN); if (empty($_REQUEST['uid'])) { $reports = $r->get_reports($page_start, $page_range); $reports_count = $r->count_reports(); } else { //get one report from search results $uid = $_REQUEST['uid']; $reports = $r->getReport($uid); } $pager_count = $reports_count; //total records for query $pager_range = PAGING_RANGE; //total currently displayed $pager_end = $page_start + $pager_range; $pager_pos = $page_start; $next_pos = $pager_range + 1;
{ if (!checkPerms($this->user["userType"], "%1%%%%%%%%")) { // hide Blocks if userType is not at least AM-Edit $this->hideBlock("TransactionsLink"); } else { $this->hideBlock("TransactionsLinkText"); } } function Main() { $this->setPageDetailPerms(); $this->tpl->set_var("uname", $this->user["uname"]); $this->tpl->set_var("today", date("F j, Y")); $this->tpl->set_var("Session", $this->sess->url("")); $this->tpl->parse("templatePage", "rptsTemplate"); $this->tpl->finish("templatePage"); $this->tpl->p("templatePage"); } } ##################################### # Define Procedures and Functions ##################################### ########################################################## # Begin Program Script ########################################################## //* page_open(array("sess" => "rpts_Session", "auth" => "rpts_Challenge_Auth", "perm" => "rpts_Perm")); //*/ $obj = new Reports($sess); $obj->Main(); page_close();
/** * Execute a report and return results * * @param $id * @param $params * * @return array */ static function executeReport($id, $params, $order_by_col = '', $order_by_asc = true, $offset = 0, $limit = 50, $to_print = false) { if (is_null(active_context())) { CompanyWebsite::instance()->setContext(build_context_array(array_var($_REQUEST, 'context'))); } $results = array(); $report = self::getReport($id); $show_archived = false; if ($report instanceof Report) { $conditionsFields = ReportConditions::getAllReportConditionsForFields($id); $conditionsCp = ReportConditions::getAllReportConditionsForCustomProperties($id); $ot = ObjectTypes::findById($report->getReportObjectTypeId()); $table = $ot->getTableName(); if ($ot->getType() == 'dimension_object' || $ot->getType() == 'dimension_group') { $hook_parameters = array('report' => $report, 'params' => $params, 'order_by_col' => $order_by_col, 'order_by_asc' => $order_by_asc, 'offset' => $offset, 'limit' => $limit, 'to_print' => $to_print); $report_result = null; Hook::fire('replace_execute_report_function', $hook_parameters, $report_result); if ($report_result) { return $report_result; } } eval('$managerInstance = ' . $ot->getHandlerClass() . "::instance();"); eval('$item_class = ' . $ot->getHandlerClass() . '::instance()->getItemClass(); $object = new $item_class();'); $order_by = ''; if (is_object($params)) { $params = get_object_vars($params); } $report_columns = ReportColumns::getAllReportColumns($id); $allConditions = ""; $contact_extra_columns = self::get_extra_contact_columns(); if (count($conditionsFields) > 0) { foreach ($conditionsFields as $condField) { if ($condField->getFieldName() == "archived_on") { $show_archived = true; } $skip_condition = false; $model = $ot->getHandlerClass(); $model_instance = new $model(); $col_type = $model_instance->getColumnType($condField->getFieldName()); $allConditions .= ' AND '; $dateFormat = 'm/d/Y'; if (isset($params[$condField->getId()])) { $value = $params[$condField->getId()]; if ($col_type == DATA_TYPE_DATE || $col_type == DATA_TYPE_DATETIME) { $dateFormat = user_config_option('date_format'); } } else { $value = $condField->getValue(); } if ($ot->getHandlerClass() == 'Contacts' && in_array($condField->getFieldName(), $contact_extra_columns)) { $allConditions .= self::get_extra_contact_column_condition($condField->getFieldName(), $condField->getCondition(), $value); } else { if ($value == '' && $condField->getIsParametrizable()) { $skip_condition = true; } if (!$skip_condition) { $field_name = $condField->getFieldName(); if (in_array($condField->getFieldName(), Objects::getColumns())) { $field_name = 'o`.`' . $condField->getFieldName(); } if ($condField->getCondition() == 'like' || $condField->getCondition() == 'not like') { $value = '%' . $value . '%'; } if ($col_type == DATA_TYPE_DATE || $col_type == DATA_TYPE_DATETIME) { if ($value == date_format_tip($dateFormat)) { $value = EMPTY_DATE; } else { $dtValue = DateTimeValueLib::dateFromFormatAndString($dateFormat, $value); $value = $dtValue->format('Y-m-d'); } } if ($condField->getCondition() != '%') { if ($col_type == DATA_TYPE_INTEGER || $col_type == DATA_TYPE_FLOAT) { $allConditions .= '`' . $field_name . '` ' . $condField->getCondition() . ' ' . DB::escape($value); } else { if ($condField->getCondition() == '=' || $condField->getCondition() == '<=' || $condField->getCondition() == '>=') { if ($col_type == DATA_TYPE_DATETIME || $col_type == DATA_TYPE_DATE) { $equal = 'datediff(' . DB::escape($value) . ', `' . $field_name . '`)=0'; } else { $equal = '`' . $field_name . '` ' . $condField->getCondition() . ' ' . DB::escape($value); } switch ($condField->getCondition()) { case '=': $allConditions .= $equal; break; case '<=': case '>=': $allConditions .= '(`' . $field_name . '` ' . $condField->getCondition() . ' ' . DB::escape($value) . ' OR ' . $equal . ') '; break; } } else { $allConditions .= '`' . $field_name . '` ' . $condField->getCondition() . ' ' . DB::escape($value); } } } else { $allConditions .= '`' . $field_name . '` like ' . DB::escape("%{$value}"); } } else { $allConditions .= ' true'; } } } } if (count($conditionsCp) > 0) { $dateFormat = user_config_option('date_format'); $date_format_tip = date_format_tip($dateFormat); foreach ($conditionsCp as $condCp) { $cp = CustomProperties::getCustomProperty($condCp->getCustomPropertyId()); $skip_condition = false; if (isset($params[$condCp->getId() . "_" . $cp->getName()])) { $value = $params[$condCp->getId() . "_" . $cp->getName()]; } else { $value = $condCp->getValue(); } if ($value == '' && $condCp->getIsParametrizable()) { $skip_condition = true; } if (!$skip_condition) { $current_condition = ' AND '; $current_condition .= 'o.id IN ( SELECT object_id as id FROM ' . TABLE_PREFIX . 'custom_property_values cpv WHERE '; $current_condition .= ' cpv.custom_property_id = ' . $condCp->getCustomPropertyId(); $fieldType = $object->getColumnType($condCp->getFieldName()); if ($condCp->getCondition() == 'like' || $condCp->getCondition() == 'not like') { $value = '%' . $value . '%'; } if ($cp->getType() == 'date') { if ($value == $date_format_tip) { continue; } $dtValue = DateTimeValueLib::dateFromFormatAndString($dateFormat, $value); $value = $dtValue->format('Y-m-d H:i:s'); } if ($condCp->getCondition() != '%') { if ($cp->getType() == 'numeric') { $current_condition .= ' AND cpv.value ' . $condCp->getCondition() . ' ' . DB::escape($value); } else { if ($cp->getType() == 'boolean') { $current_condition .= ' AND cpv.value ' . $condCp->getCondition() . ' ' . ($value ? '1' : '0'); if (!$value) { $current_condition .= ') OR o.id NOT IN (SELECT object_id as id FROM ' . TABLE_PREFIX . 'custom_property_values cpv2 WHERE cpv2.object_id=o.id AND cpv2.value=1 AND cpv2.custom_property_id = ' . $condCp->getCustomPropertyId(); } } else { $current_condition .= ' AND cpv.value ' . $condCp->getCondition() . ' ' . DB::escape($value); } } } else { $current_condition .= ' AND cpv.value like ' . DB::escape("%{$value}"); } $current_condition .= ')'; $allConditions .= $current_condition; } } } $select_columns = array('*'); $join_params = null; if ($order_by_col == '') { $order_by_col = $report->getOrderBy(); } if ($ot->getHandlerClass() == 'Contacts' && in_array($order_by_col, $contact_extra_columns)) { $join_params = self::get_extra_contact_column_order_by($order_by_col, $order_by_col, $select_columns); } $original_order_by_col = $order_by_col; if (in_array($order_by_col, self::$external_columns)) { $order_by_col = 'name_order'; $join_params = array('table' => Objects::instance()->getTableName(), 'jt_field' => 'id', 'e_field' => $original_order_by_col, 'join_type' => 'left'); $select_columns = array(); $tmp_cols = $managerInstance->getColumns(); foreach ($tmp_cols as $col) { $select_columns[] = "e.{$col}"; } $tmp_cols = Objects::instance()->getColumns(); foreach ($tmp_cols as $col) { $select_columns[] = "o.{$col}"; } $select_columns[] = 'jt.name as name_order'; } if ($order_by_asc == null) { $order_by_asc = $report->getIsOrderByAsc(); } if ($ot->getName() == 'task' && !SystemPermissions::userHasSystemPermission(logged_user(), 'can_see_assigned_to_other_tasks')) { $allConditions .= " AND assigned_to_contact_id = " . logged_user()->getId(); } if ($managerInstance) { if ($order_by_col == "order") { $order_by_col = "`{$order_by_col}`"; } $listing_parameters = array("select_columns" => $select_columns, "order" => "{$order_by_col}", "order_dir" => $order_by_asc ? "ASC" : "DESC", "extra_conditions" => $allConditions, "count_results" => true, "join_params" => $join_params); if ($limit > 0) { $listing_parameters["start"] = $offset; $listing_parameters["limit"] = $limit; } if ($show_archived) { $listing_parameters["archived"] = true; } $result = $managerInstance->listing($listing_parameters); } else { // TODO Performance Killer $result = ContentDataObjects::getContentObjects(active_context(), $ot, $order_by_col, $order_by_asc ? "ASC" : "DESC", $allConditions); } $objects = $result->objects; $totalResults = $result->total; $results['pagination'] = Reports::getReportPagination($id, $params, $original_order_by_col, $order_by_asc, $offset, $limit, $totalResults); $dimensions_cache = array(); foreach ($report_columns as $column) { if ($column->getCustomPropertyId() == 0) { $field = $column->getFieldName(); if (str_starts_with($field, 'dim_')) { $dim_id = str_replace("dim_", "", $field); $dimension = Dimensions::getDimensionById($dim_id); $dimensions_cache[$dim_id] = $dimension; $column_name = $dimension->getName(); $results['columns'][$field] = $column_name; $results['db_columns'][$column_name] = $field; } else { if ($managerInstance->columnExists($field) || Objects::instance()->columnExists($field)) { $column_name = Localization::instance()->lang('field ' . $ot->getHandlerClass() . ' ' . $field); if (is_null($column_name)) { $column_name = lang('field Objects ' . $field); } $results['columns'][$field] = $column_name; $results['db_columns'][$column_name] = $field; } else { if ($ot->getHandlerClass() == 'Contacts') { if (in_array($field, $contact_extra_columns)) { $results['columns'][$field] = lang($field); $results['db_columns'][lang($field)] = $field; } } else { if ($ot->getHandlerClass() == 'Timeslots') { if (in_array($field, array('time', 'billing'))) { $results['columns'][$field] = lang('field Objects ' . $field); $results['db_columns'][lang('field Objects ' . $field)] = $field; } } else { if ($ot->getHandlerClass() == 'MailContents') { if (in_array($field, array('to', 'cc', 'bcc', 'body_plain', 'body_html'))) { $results['columns'][$field] = lang('field Objects ' . $field); $results['db_columns'][lang('field Objects ' . $field)] = $field; } } } } } } } else { $results['columns'][$column->getCustomPropertyId()] = $column->getCustomPropertyId(); } } $report_rows = array(); foreach ($objects as &$object) { /* @var $object Object */ $obj_name = $object->getObjectName(); $icon_class = $object->getIconClass(); $row_values = array('object_type_id' => $object->getObjectTypeId()); if (!$to_print) { $row_values['link'] = '<a class="link-ico ' . $icon_class . '" title="' . clean($obj_name) . '" target="new" href="' . $object->getViewUrl() . '"> </a>'; } foreach ($report_columns as $column) { if ($column->getCustomPropertyId() == 0) { $field = $column->getFieldName(); if (str_starts_with($field, 'dim_')) { $dim_id = str_replace("dim_", "", $field); if (!array_var($dimensions_cache, $dim_id) instanceof Dimension) { $dimension = Dimensions::getDimensionById($dim_id); $dimensions_cache[$dim_id] = $dimension; } else { $dimension = array_var($dimensions_cache, $dim_id); } $om_object_id = $object instanceof Timeslot ? $object->getRelObjectId() : $object->getId(); $members = ObjectMembers::getMembersByObjectAndDimension($om_object_id, $dim_id, " AND om.is_optimization=0"); $value = ""; foreach ($members as $member) { /* @var $member Member */ $val = $member->getPath(); $val .= ($val == "" ? "" : "/") . $member->getName(); if ($value != "") { $val = " - {$val}"; } $value .= $val; } $row_values[$field] = $value; } else { if ($object instanceof Timeslot) { if ($field == 'id') { $value = $object->getObjectId(); } else { $value = $object->getColumnValue($field); // if it is a task column if (in_array($field, ProjectTasks::instance()->getColumns())) { $task = ProjectTasks::findById($object->getRelObjectId()); // if task exists if ($task instanceof ProjectTask) { $value = $task->getColumnValue($field); // if it is an external task column if (in_array($field, ProjectTasks::instance()->getExternalColumns())) { $value = self::instance()->getExternalColumnValue($field, $value, ProjectTasks::instance()); } else { // if is a date then use format if (ProjectTasks::instance()->getColumnType($field) == DATA_TYPE_DATETIME && $value instanceof DateTimeValue) { $value = format_value_to_print($field, $value->toMySQL(), DATA_TYPE_DATETIME, $report->getReportObjectTypeId()); } } } $results['columns'][$field] = lang('field ProjectTasks ' . $field); $results['db_columns'][lang('field ProjectTasks ' . $field)] = $field; } } } else { $value = $object->getColumnValue($field); } if ($value instanceof DateTimeValue) { $dateFormat = user_config_option('date_format'); Hook::fire("custom_property_date_format", null, $dateFormat); $tz = logged_user()->getTimezone(); if ($object instanceof ProjectTask) { if ($field == 'due_date' && !$object->getUseDueTime() || $field == 'start_date' && !$object->getUseStartTime()) { $dateFormat = user_config_option('date_format'); $tz = 0; } } $value = format_date($value, $dateFormat, $tz * 3600); } if (in_array($field, $managerInstance->getExternalColumns())) { if ($object instanceof Timeslot && $field == 'time') { $lastStop = $object->getEndTime() != null ? $object->getEndTime() : ($object->isPaused() ? $object->getPausedOn() : DateTimeValueLib::now()); $seconds = $lastStop->getTimestamp() - $object->getStartTime()->getTimestamp(); $hours = number_format($seconds / 3600, 2, ',', '.'); $value = $hours; //$value = DateTimeValue::FormatTimeDiff($object->getStartTime(), $lastStop, "hm", 60, $object->getSubtract()); } else { if ($object instanceof Timeslot && $field == 'billing') { $value = config_option('currency_code', '$') . ' ' . $object->getFixedBilling(); } else { $value = self::instance()->getExternalColumnValue($field, $value, $managerInstance); } } } else { if ($field != 'link') { //$value = html_to_text(html_entity_decode($value)); if ($object->getColumnType($field) == DATA_TYPE_STRING) { // change html block end tags and brs to \n, then remove all other html tags, then replace \n with <br>, to remove all styles and keep the enters $value = str_replace(array("</div>", "</p>", "<br>", "<br />", "<br/>"), "\n", $value); $value = nl2br(strip_tags($value)); } } } if (self::isReportColumnEmail($value)) { if (logged_user()->hasMailAccounts()) { $value = '<a class="internalLink" href="' . get_url('mail', 'add_mail', array('to' => clean($value))) . '">' . clean($value) . '</a></div>'; } else { $value = '<a class="internalLink" target="_self" href="mailto:' . clean($value) . '">' . clean($value) . '</a></div>'; } } $row_values[$field] = $value; if ($ot->getHandlerClass() == 'Contacts') { if ($managerInstance instanceof Contacts) { $contact = Contacts::findOne(array("conditions" => "object_id = " . $object->getId())); if ($field == "email_address") { $row_values[$field] = $contact->getEmailAddress(); } if ($field == "is_user") { $row_values[$field] = $contact->getUserType() > 0 && !$contact->getIsCompany(); } if ($field == "im_values") { $str = ""; foreach ($contact->getAllImValues() as $type => $value) { $str .= ($str == "" ? "" : " | ") . "{$type}: {$value}"; } $row_values[$field] = $str; } if (in_array($field, array("mobile_phone", "work_phone", "home_phone"))) { if ($field == "mobile_phone") { $row_values[$field] = $contact->getPhoneNumber('mobile', null, false); } else { if ($field == "work_phone") { $row_values[$field] = $contact->getPhoneNumber('work', null, false); } else { if ($field == "home_phone") { $row_values[$field] = $contact->getPhoneNumber('home', null, false); } } } } if (in_array($field, array("personal_webpage", "work_webpage", "other_webpage"))) { if ($field == "personal_webpage") { $row_values[$field] = $contact->getWebpageUrl('personal'); } else { if ($field == "work_webpage") { $row_values[$field] = $contact->getWebpageUrl('work'); } else { if ($field == "other_webpage") { $row_values[$field] = $contact->getWebpageUrl('other'); } } } } if (in_array($field, array("home_address", "work_address", "other_address"))) { if ($field == "home_address") { $row_values[$field] = $contact->getStringAddress('home'); } else { if ($field == "work_address") { $row_values[$field] = $contact->getStringAddress('work'); } else { if ($field == "other_address") { $row_values[$field] = $contact->getStringAddress('other'); } } } } } } else { if ($ot->getHandlerClass() == 'MailContents') { if (in_array($field, array('to', 'cc', 'bcc', 'body_plain', 'body_html'))) { $mail_data = MailDatas::findById($object->getId()); $row_values[$field] = $mail_data->getColumnValue($field); if ($field == "body_html") { if (class_exists("DOMDocument")) { $d = new DOMDocument(); $mock = new DOMDocument(); $d->loadHTML(remove_css_and_scripts($row_values[$field])); $body = $d->getElementsByTagName('body')->item(0); foreach ($body->childNodes as $child) { $mock->appendChild($mock->importNode($child, true)); } // if css is inside an html comment => remove it $row_values[$field] = preg_replace('/<!--(.*)-->/Uis', '', remove_css($row_values[$field])); } else { $row_values[$field] = preg_replace('/<!--(.*)-->/Uis', '', remove_css_and_scripts($row_values[$field])); } } } } } if (!$to_print && $field == "name") { $row_values[$field] = '<a target="new-' . $object->getId() . '" href="' . $object->getViewUrl() . '">' . $value . '</a>'; } } } else { $colCp = $column->getCustomPropertyId(); $cp = CustomProperties::getCustomProperty($colCp); if ($cp instanceof CustomProperty) { /* @var $cp CustomProperty */ $row_values[$cp->getName()] = get_custom_property_value_for_listing($cp, $object); $results['columns'][$colCp] = $cp->getName(); $results['db_columns'][$cp->getName()] = $colCp; } } } Hook::fire("report_row", $object, $row_values); $report_rows[] = $row_values; } if (!$to_print) { if (is_array($results['columns'])) { array_unshift($results['columns'], ''); } else { $results['columns'] = array(''); } Hook::fire("report_header", $ot, $results['columns']); } $results['rows'] = $report_rows; } return $results; }
} $secondarymodule = implode(":", $secondarymodules); $oReport->secmodule = $secondarymodule; $reporttype = $oReport->reporttype; $reportname = $oReport->reportname; $reportdescription = $oReport->reportdescription; $folderid = $oReport->folderid; $ogReport = new Reports(); $ogReport->getPriModuleColumnsList($oReport->primodule); $ogReport->getSecModuleColumnsList($oReport->secmodule); $list_report_form->assign('BACK_WALK', 'true'); } else { $reportname = vtlib_purify($_REQUEST["reportname"]); $reportdescription = vtlib_purify($_REQUEST["reportdes"]); $folderid = vtlib_purify($_REQUEST["reportfolder"]); $ogReport = new Reports(); $primarymodule = vtlib_purify($_REQUEST["primarymodule"]); $secondarymodule = ''; $secondarymodules = array(); if (!empty($ogReport->related_modules[$primarymodule])) { foreach ($ogReport->related_modules[$primarymodule] as $key => $value) { if (isset($_REQUEST["secondarymodule_" . $value])) { $secondarymodules[] = $_REQUEST["secondarymodule_" . $value]; } $ogReport->getSecModuleColumnsList($_REQUEST["secondarymodule_" . $value]); if (!isPermitted($_REQUEST["secondarymodule_" . $value], 'index') == "yes" && !isset($_REQUEST["secondarymodule_" . $value])) { $permission = false; } } } $secondarymodule = implode(":", $secondarymodules);
<?php $genid = gen_id(); $selectedPage = user_config_option('custom_report_tab'); $customReports = Reports::getAllReportsByObjectType(); $report = new Report(); $can_add_reports = $report->canAdd(logged_user(), active_context()); $reportPages = array(); $object_types = ObjectTypes::getAvailableObjectTypes(); foreach ($object_types as $ot) { $reportPages[$ot->getId()] = array("name" => $ot->getName(), "display_name" => lang($ot->getName())); } $ignored = null; Hook::fire('modify_report_pages', $ignored, $reportPages); // To add, edit or remove report pages $default_reports = array('task' => array('task time report' => array('url' => get_url('reporting', 'total_task_times_p'), 'name' => lang('task time report'), 'description' => lang('task time report description')))); Hook::fire('modify_default_reports', $ignored, $default_reports); // To add, edit or remove default reports require_javascript("og/ReportingFunctions.js"); ?> <div style="padding:7px"> <table width=100% id="reportingMenu"> <tr> <td style="height:2px;width:140px"></td><td width=12></td><td style="line-height:2px;"> </td><td width=12></td> </tr> <tr> <td height=12></td> <td rowspan=<?php echo count($reportPages) + 2; ?>
function generateReport() { $code = $this->generatePass(); $now = Carbon::Now(); $clients = isset($_GET["clients"]) ? $_GET["clients"] : null; $name = isset($_GET["name"]) ? $_GET["name"] : ""; $periodFrom = isset($_GET["periodFrom"]) ? $_GET["periodFrom"] : null; $periodTo = isset($_GET["periodTo"]) ? $_GET["periodTo"] : null; if (is_null($clients)) { echo "Nepavyko nuskaityti parametro!"; return; } $reports = new Reports(); $reports->setName($name); $reports->setCode($code); $reports->setClients($clients); $reports->setOwner(9); $reports->setPeriod_from($periodFrom); $reports->setPeriod_to($periodTo); $reports->setAdd_date($now->toDateTimeString()); $rez = $this->reportsDao->insert($reports); if (is_string($rez)) { echo "-1"; return; } $fullUrl = $this->reportsUrl . $code; //$return = '<span style="font-size: 12px; font-weight: bold;">Ataskaitos adresas</span><br /><div class="well well-sm">'.$fullUrl.'</div>'; $return = '<span style="font-size: 12px; font-weight: bold;">Ataskaitos adresas</span><br /><input type="text" class="form-control" id="exampleInputEmail1" value="' . $fullUrl . '" onclick="this.select(); document.execCommand(\'copy\');">'; echo $return; }
include_once 'classes/Reports.php'; include_once 'classes/User.php'; $db = Database::getDatabase(); Authentication::sec_session_start(); if (Authentication::login_check($db->getMysqli()) == true && $_SESSION['admin'] == true) { ?> <?php } else { header('Location: access-error.php'); } ?> <?php //echo $_POST['term1']; $reports = Reports::getTermReport($_POST['term1']); ?> <?php //loop through report array and print the information in some formatted matter $courseList = array(); $thisTerm; if (substr($_POST['term1'], 0, 2) == 'sp') { $thisTerm = 'Spring'; } else { if (substr($_POST['term1'], 0, 2) == 'fl') { $thisTerm = 'Fall'; } else { $thisTerm = 'Off Term'; } } $thisTerm = $thisTerm . ' 20' . substr($_POST['term1'], 2, 2);
$current_module_strings = return_module_language($current_language, 'Reports'); global $list_max_entries_per_page; global $urlPrefix; $log = LoggerManager::getLogger('report_type'); global $currentModule; global $image_path; global $theme; $theme_path = "themes/" . $theme . "/"; $report_column = new vtigerCRM_Smarty(); $report_column->assign("MOD", $mod_strings); $report_column->assign("APP", $app_strings); $report_column->assign("IMAGE_PATH", $image_path); $report_column->assign("THEME_PATH", $theme_path); if (isset($_REQUEST["record"]) && $_REQUEST['record'] != '') { $recordid = vtlib_purify($_REQUEST["record"]); $oReport = new Reports($recordid); $BLOCK1 = getPrimaryColumnsHTML($oReport->primodule); $oRep = new Reports(); $secondarymodule = ''; $secondarymodules = array(); if (!empty($oRep->related_modules[$oReport->primodule])) { foreach ($oRep->related_modules[$oReport->primodule] as $key => $value) { if (isset($_REQUEST["secondarymodule_" . $value])) { $secondarymodules[] = $_REQUEST["secondarymodule_" . $value]; } } } $secondarymodule = implode(":", $secondarymodules); $oReport->secmodule = $secondarymodule; $BLOCK1 .= getSecondaryColumnsHTML($oReport->secmodule); $BLOCK2 = $oReport->getSelectedColumnsList($recordid);
$torrent = new Torrent($db, $user); $subtitles = new Subtitles($db, $user); $requests = new Requests($db, $user); $forum = new Forum($db, $user); $log = new Logs($db); $comments = new Comments($db, $user); $reports = new Reports($db, $user, $torrent, $subtitles, $requests, $forum, $mailbox, $comments, $log); list($result, $totalCount) = $reports->query(array("limit" => $_GET["limit"], "index" => $_GET["index"])); httpResponse($result, $totalCount); break; case validateRoute('PATCH', 'reports/\\d+'): $reports = new Reports($db, $user); httpResponse($reports->update((int) $params[1], $postdata)); break; case validateRoute('DELETE', 'reports/\\d+'): $reports = new Reports($db, $user); httpResponse($reports->delete((int) $params[1])); break; case validateRoute('GET', 'adminlogs'): $adminlogs = new AdminLogs($db, $user); list($result, $totalCount) = $adminlogs->query(array("limit" => $_GET["limit"], "index" => $_GET["index"], "search" => $_GET["searchText"])); httpResponse($result, $totalCount); break; case validateRoute('GET', 'recovery-logs'): $recoveryLog = new RecoveryLog($db, $user); list($result, $totalCount) = $recoveryLog->query(array("limit" => $_GET["limit"], "index" => $_GET["index"])); httpResponse($result, $totalCount); break; case validateRoute('GET', 'sqlerrors'): $sqlerrors = new SqlErrors($db, $user); list($result, $totalCount) = $sqlerrors->query(array("limit" => $_GET["limit"], "index" => $_GET["index"]));
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer the ID of the model to be loaded */ public function loadModel($id) { $model = Reports::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, Yii::t('phrase', 'The requested page does not exist.')); } return $model; }
<?php require_once "../config.inc.php"; $db = Database::obtain(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE); $db->connect(); if (!empty($_REQUEST['uid'])) { $uid = $_REQUEST['uid']; } $mode = $_REQUEST['mode']; print_r($_REQUEST); if ($mode === "reports") { $r = new Reports('member', BASE_DOMAIN); $delete = $r->delete($uid); } elseif ($mode === "users") { $u = new Users('member', BASE_DOMAIN); $delete = $u->deleteUser($uid); } elseif ($mode === "projects") { $uid = $_REQUEST['proj_delete_uid']; $p = new Projects('member', BASE_DOMAIN); $delete = $p->deleteProject($uid); } elseif ($mode === "categories") { $uid = $_REQUEST['cat_delete_uid']; $p = new Projects('member', BASE_DOMAIN); $delete = $p->deleteCategory($uid); } else { //nothing }
include_once realpath(dirname(__FILE__) . '/inc/code/globalIncludes.php'); /* Load classes */ if (isset($_POST['requestType'])) { switch ($_POST['requestType']) { case "saveReport": /* Report name and category */ $formData = $core->parseQueryString(urldecode($_POST['formData'])); /* Report Name */ if (!isset($formData['reportName']) || strlen($formData['reportName']) <= 0) { $name = "untitled"; } else { $name = $formData['reportName']; } /* Report Category */ if ($formData['reportCatType'] == "new") { /* New Category */ $reportCategory = $formData['reportCatNew']; } else { /* Existing Category */ $reportCategory = intval($formData['reportCatExisting']); } /* Report Parameters */ $reportParams = json_decode(urldecode($formData['reportParams'])); /* Load report class */ $report = new Reports(); /* Save Report */ $report->saveReport($reportParams->domain, $formData['reportName'], $reportCategory, $reportParams); break; } }
<th></th> </tr> </thead> <tbody> <?php foreach ($reports as $report) { ?> <tr> <td><?php echo Reports::getReportName($report->getName(), $sf_user->getCulture()); ?> <?php echo image_tag('info.png', 'class=more_trk'); ?> <?php $widget = Reports::getRequiredFieldForReport($report->getName()); ?> <ul class="field_change"> <?php foreach ($report->getDiffAsArray() as $field => $value) { ?> <li><strong><?php echo __($widget[$field]); ?> </strong> <?php echo $value; ?> </li> <?php } ?>
/** * Mm file * * @return string | die */ function mindmap() { $mm = new Reports(); $mm->MakeMindMap(); }
<?php require_once "../includes/header.php"; if (!$user->hasPermission('tdstaff')) { Session::flash('error', 'Invalid permissions'); Redirect::to(BASE_URL . 'training'); } ?> <h3 class="text-center">Sliders: Breakdown Options</h3><br> <div class="row"> <div class="col-md-12"> <?php $t = new Training(); $r = new Reports(); $programs = $t->getPrograms(); foreach ($programs as $program) { ?> <div class="row"> <div class="col-md-10 col-md-offset-1"> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title"><?php echo $program->name; ?> </h3> </div> <div class="panel-body"> <table class="table table-striped table-condensed table-responsive"> <?php $sliders = $r->getSliders(1, $program->id); if ($sliders !== false) {
private function get_report_column_types($report_id) { $col_types = array(); $report = Reports::getReport($report_id); $model = $report->getObjectType(); $manager = new $model(); $columns = ReportColumns::getAllReportColumns($report_id); foreach ($columns as $col) { $cp_id = $col->getCustomPropertyId(); if ($cp_id == 0) { $col_types[$col->getFieldName()] = $manager->getColumnType($col->getFieldName()); } else { $cp = CustomProperties::getCustomProperty($cp_id); if ($cp) { $col_types[$cp->getName()] = $cp->getOgType(); } } } return $col_types; }
</tr> <?php } if ($ExtraIDs) { ?> <tr> <td class="label">Relevant other torrents:</td> <td colspan="3"> <?php $First = true; $Extras = explode(' ', $ExtraIDs); foreach ($Extras as $ExtraID) { $DB->query("\n\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\ttg.Name,\n\t\t\t\t\t\t\t\t\ttg.ID,\n\t\t\t\t\t\t\t\t\tCASE COUNT(ta.GroupID)\n\t\t\t\t\t\t\t\t\t\tWHEN 1 THEN aa.ArtistID\n\t\t\t\t\t\t\t\t\t\tWHEN 0 THEN '0'\n\t\t\t\t\t\t\t\t\t\tELSE '0'\n\t\t\t\t\t\t\t\t\tEND AS ArtistID,\n\t\t\t\t\t\t\t\t\tCASE COUNT(ta.GroupID)\n\t\t\t\t\t\t\t\t\t\tWHEN 1 THEN aa.Name\n\t\t\t\t\t\t\t\t\t\tWHEN 0 THEN ''\n\t\t\t\t\t\t\t\t\t\tELSE 'Various Artists'\n\t\t\t\t\t\t\t\t\tEND AS ArtistName,\n\t\t\t\t\t\t\t\t\ttg.Year,\n\t\t\t\t\t\t\t\t\tt.Time,\n\t\t\t\t\t\t\t\t\tt.Remastered,\n\t\t\t\t\t\t\t\t\tt.RemasterTitle,\n\t\t\t\t\t\t\t\t\tt.RemasterYear,\n\t\t\t\t\t\t\t\t\tt.Media,\n\t\t\t\t\t\t\t\t\tt.Format,\n\t\t\t\t\t\t\t\t\tt.Encoding,\n\t\t\t\t\t\t\t\t\tt.Size,\n\t\t\t\t\t\t\t\t\tt.HasCue,\n\t\t\t\t\t\t\t\t\tt.HasLog,\n\t\t\t\t\t\t\t\t\tt.LogScore,\n\t\t\t\t\t\t\t\t\tt.UserID AS UploaderID,\n\t\t\t\t\t\t\t\t\tuploader.Username\n\t\t\t\t\t\t\t\tFROM torrents AS t\n\t\t\t\t\t\t\t\t\tLEFT JOIN torrents_group AS tg ON tg.ID = t.GroupID\n\t\t\t\t\t\t\t\t\tLEFT JOIN torrents_artists AS ta ON ta.GroupID = tg.ID AND ta.Importance = '1'\n\t\t\t\t\t\t\t\t\tLEFT JOIN artists_alias AS aa ON aa.AliasID = ta.AliasID\n\t\t\t\t\t\t\t\t\tLEFT JOIN users_main AS uploader ON uploader.ID = t.UserID\n\t\t\t\t\t\t\t\tWHERE t.ID = '{$ExtraID}'\n\t\t\t\t\t\t\t\tGROUP BY tg.ID"); list($ExtraGroupName, $ExtraGroupID, $ExtraArtistID, $ExtraArtistName, $ExtraYear, $ExtraTime, $ExtraRemastered, $ExtraRemasterTitle, $ExtraRemasterYear, $ExtraMedia, $ExtraFormat, $ExtraEncoding, $ExtraSize, $ExtraHasCue, $ExtraHasLog, $ExtraLogScore, $ExtraUploaderID, $ExtraUploaderName) = Misc::display_array($DB->next_record()); if ($ExtraGroupName) { $ExtraRemasterDisplayString = Reports::format_reports_remaster_info($ExtraRemastered, $ExtraRemasterTitle, $ExtraRemasterYear); if ($ArtistID == 0 && empty($ArtistName)) { $ExtraLinkName = "<a href=\"torrents.php?id={$ExtraGroupID}\">{$ExtraGroupName}" . ($ExtraYear ? " ({$ExtraYear})" : '') . "</a> <a href=\"torrents.php?torrentid={$ExtraID}\"> [{$ExtraFormat}/{$ExtraEncoding}/{$ExtraMedia}]{$ExtraRemasterDisplayString}</a> " . ($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid={$ExtraID}&groupid={$ExtraGroupID}\">(Log: {$ExtraLogScore}%)</a>" : '') . ' (' . number_format($ExtraSize / (1024 * 1024), 2) . ' MB)'; } elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') { $ExtraLinkName = "Various Artists - <a href=\"torrents.php?id={$ExtraGroupID}\">{$ExtraGroupName}" . ($ExtraYear ? " ({$ExtraYear})" : '') . "</a> <a href=\"torrents.php?torrentid={$ExtraID}\"> [{$ExtraFormat}/{$ExtraEncoding}/{$ExtraMedia}]{$ExtraRemasterDisplayString}</a> " . ($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid={$ExtraID}&groupid={$ExtraGroupID}\">(Log: {$ExtraLogScore}%)</a>" : '') . ' (' . number_format($ExtraSize / (1024 * 1024), 2) . ' MB)'; } else { $ExtraLinkName = "<a href=\"artist.php?id={$ExtraArtistID}\">{$ExtraArtistName}</a> - <a href=\"torrents.php?id={$ExtraGroupID}\">{$ExtraGroupName}" . ($ExtraYear ? " ({$ExtraYear})" : '') . "</a> <a href=\"torrents.php?torrentid={$ExtraID}\"> [{$ExtraFormat}/{$ExtraEncoding}/{$ExtraMedia}]{$ExtraRemasterDisplayString}</a> " . ($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid={$ExtraID}&groupid={$ExtraGroupID}\">(Log: {$ExtraLogScore}%)</a>" : '') . ' (' . number_format($ExtraSize / (1024 * 1024), 2) . ' MB)'; } ?> <?php echo $First ? '' : '<br />'; ?> <?php echo $ExtraLinkName; ?> <a href="torrents.php?action=download&id=<?php
<?php /********************************************************************************* ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 * ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. * ********************************************************************************/ require_once 'include/Zend/Json.php'; if (isset($_REQUEST["record"]) && $_REQUEST['record'] != '') { $reportid = vtlib_purify($_REQUEST["record"]); $oReport = new Reports($reportid); $oReport->getAdvancedFilterList($reportid); $oRep = new Reports(); $secondarymodule = ''; $secondarymodules = array(); if (!empty($oRep->related_modules[$oReport->primodule])) { foreach ($oRep->related_modules[$oReport->primodule] as $key => $value) { if (isset($_REQUEST["secondarymodule_" . $value])) { $secondarymodules[] = $_REQUEST["secondarymodule_" . $value]; } } } $secondarymodule = implode(":", $secondarymodules); if ($secondarymodule != '') { $oReport->secmodule = $secondarymodule; } $BLOCK1 = getPrimaryColumns_AdvFilterHTML($oReport->primodule, $oReport->advft_column[0]);