本文整理汇总了PHP中Reports类的典型用法代码示例。如果您正苦于以下问题:PHP Reports类的具体用法?PHP Reports怎么用?PHP Reports使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Reports类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testUnpackAttribute
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);
}
示例2: fromArray
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;
}
示例3: SummarySubmit
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);
}
}
}
}
示例4: reports
/**
* 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;
}
示例5: array
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);
示例6: Reports
<?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>
示例7: executeDownloadFile
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));
}
示例8: Reports
<?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;
示例9: Main
{
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();
示例10: executeReport
//.........这里部分代码省略.........
$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 {
示例11: implode
}
$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);
示例12: gen_id
<?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;
?>
示例13: generateReport
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;
}
示例14: header
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);
示例15: return_module_language
$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);