当前位置: 首页>>代码示例>>PHP>>正文


PHP session_request_item函数代码示例

本文整理汇总了PHP中session_request_item函数的典型用法代码示例。如果您正苦于以下问题:PHP session_request_item函数的具体用法?PHP session_request_item怎么用?PHP session_request_item使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了session_request_item函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: set_project_environment

 /**
  * Function set_project_environment
  *
  * Analyses configuration and current session to identify which project area
  * is to be used. 
  * If a project is specified in the HTTP parameters then that is used, otherwise
  * the current SESSION project is used. If none of these are specified then the default
  * "reports" project is used
  */
 function set_project_environment()
 {
     global $g_project;
     global $g_menu;
     global $g_menu_title;
     $project = session_request_item("project", "reports");
     $menu = false;
     $menu_title = "Set Menu Title";
     // Now we now the project include the relevant config.php
     $projpath = "projects/" . $project;
     $configfile = $projpath . "/config.php";
     $menufile = $projpath . "/menu.php";
     if (!is_file($projpath)) {
         find_file_to_include($projpath, $projpath);
     }
     if (!$projpath) {
         find_file_to_include("config.php", $configfile);
         if ($configfile) {
             include_once $configfile;
         }
         $g_project = false;
         $g_menu = false;
         $g_menu_title = "";
         $old_error_handler = set_error_handler("ErrorHandler");
         handle_error("Project Directory {$project} not found. Check INCLUDE_PATH or project name");
         return;
     }
     if (!is_file($configfile)) {
         find_file_to_include($configfile, $configfile);
     }
     if (!is_file($menufile)) {
         find_file_to_include($menufile, $menufile);
     }
     if ($configfile) {
         include_once $configfile;
         if (is_file($menufile)) {
             include_once $menufile;
         } else {
             handle_error("Menu Definition file menu.php not found in project {$project}", E_USER_WARNING);
         }
     } else {
         find_file_to_include("config.php", $configfile);
         if ($configfile) {
             include_once $configfile;
         }
         $g_project = false;
         $g_menu = false;
         $g_menu_title = "";
         $old_error_handler = set_error_handler("ErrorHandler");
         handle_error("Configuration Definition file config.php not found in project {$project}", E_USER_ERROR);
     }
     $g_project = $project;
     $g_menu = $menu;
     $g_menu_title = $menu_title;
     return $project;
 }
开发者ID:GLUD,项目名称:EcoHack,代码行数:65,代码来源:imageget.php

示例2: begin_page

 function begin_page()
 {
     reportico_report::begin_page();
     $this->debug("HTML Begin Page\n");
     // Page Headers
     reportico_report::page_headers();
     $title = $this->query->derive_attribute("ReportTitle", "Unknown");
     if ($this->query->output_template_parameters["show_hide_report_output_title"] != "hide") {
         $this->text .= '<H1 class="swRepTitle">' . sw_translate($title) . '</H1>';
     }
     $forward = session_request_item('forward_url_get_parameters', '');
     if ($forward) {
         $forward .= "&";
     }
     if (!get_request_item("printable_html")) {
         if (!$this->query->access_mode || $this->query->access_mode != "REPORTOUTPUT") {
             $this->text .= '<div class="swRepBackBox"><a class="swLinkMenu" href="' . $this->query->get_action_url() . '?' . $forward . 'execute_mode=PREPARE&reportico_session_name=' . reportico_session_name() . '" title="' . template_xlate("GO_BACK") . '">&nbsp;</a></div>';
         }
         if (get_reportico_session_param("show_refresh_button")) {
             $this->text .= '<div class="swRepRefreshBox"><a class="swLinkMenu" href="' . $this->query->get_action_url() . '?' . $forward . 'refreshReport=1&execute_mode=EXECUTE&reportico_session_name=' . reportico_session_name() . '" title="' . template_xlate("GO_REFRESH") . '">&nbsp;</a></div>';
         }
     } else {
         $this->text .= '<div class="swRepPrintBox"><a class="swLinkMenu" href="' . $this->query->get_action_url() . '?' . $forward . 'printReport=1&execute_mode=EXECUTE&reportico_session_name=' . reportico_session_name() . '" title="' . template_xlate("GO_PRINT") . '">' . '&nbsp;' . '</a></div>';
     }
 }
开发者ID:hsvikum,项目名称:laravel-reportico,代码行数:25,代码来源:reportico_report_html.php

示例3: each_line

 function each_line($val)
 {
     reportico_report::each_line($val);
     if (session_request_item("target_style", "TABLE") == "FORM") {
         if (!$this->page_started) {
             $formpagethrow = $this->query->get_attribute("formBetweenRows");
             switch ($formpagethrow) {
                 case "newpage":
                     if ($this->page_line_count > 0) {
                         $formpagethrow = "swRepPageFormLine swNewPage";
                     } else {
                         $formpagethrow = "swRepPageFormLine";
                     }
                     break;
                 case "blankline":
                     $formpagethrow = "swRepPageFormBlank";
                     break;
                 case "solidline":
                     $formpagethrow = "swRepPageFormLine";
                     break;
             }
             // PPP $this->jar[""] .= '<TABLE class="'.$this->query->getBootstrapStyle("page").'swRepPage '.$formpagethrow.'" '.$this->get_style_tags($this->query->output_page_styles).'>';
             $this->page_started = true;
         }
         foreach ($this->query->groups as $val) {
             for ($i = 0; $i < count($val->headers); $i++) {
                 $col =& $val->headers[$i];
                 $this->format_group_header($col);
             }
         }
         foreach ($this->query->display_order_set["column"] as $k => $w) {
             if ($w->attributes["column_display"] != "show") {
                 continue;
             }
             $this->format_group_header($w);
         }
         $this->page_line_count++;
         $this->line_count++;
         //$this->jar[""] .= '</TABLE>';
         $this->page_started = false;
         return;
     }
     if ($this->page_line_count == 1) {
         //$this->jar[""] .="<tr class='swPrpCritLine'>";
         //foreach ( $this->columns as $col )
         //$this->format_column_header($col);
         //$this->jar[""] .="</tr>";
     }
     //foreach ( $this->columns as $col )
     if ($this->body_display == "show" && get_reportico_session_param("target_show_detail")) {
         $this->begin_line();
         if (!$this->page_started) {
             //$this->jar[""] .= '<TABLE class="'.$this->query->getBootstrapStyle("page").'swRepPage" '.$this->get_style_tags($this->query->output_page_styles).'>';
             $this->page_started = true;
         }
         foreach ($this->query->display_order_set["column"] as $col) {
             $this->format_column($col);
         }
         $this->end_line();
     }
 }
开发者ID:GLUD,项目名称:EcoHack,代码行数:61,代码来源:reportico_report_rjson.php

示例4: set_project_environment

/**
 * Function set_project_environment
 *
 * Analyses configuration and current session to identify which project area
 * is to be used. 
 * If a project is specified in the HTTP parameters then that is used, otherwise
 * the current SESSION
 * "reports" project is used
 */
function set_project_environment($initial_project = false, $project_folder = "projects", $admin_project_folder = "projects" )
{
	global $g_project;
	global $g_projpath;
	global $g_language;
	global $g_translations;
	global $g_menu;
	global $g_menu_title;
	global $g_dropdown_menu;
	global $g_report_desc;
	global $g_included_config;
	
	$target_menu = "";
	$project = "";

    $last_project = "";

    if ( isset_reportico_session_param("project") )
        if ( get_reportico_session_param("project") )
            $last_project = get_reportico_session_param("project");

	if ( !$project && array_key_exists("submit_delete_project", $_REQUEST) )
	{
		$project = get_request_item("jump_to_delete_project", "");	
		$_REQUEST["xmlin"] = "deleteproject.xml";
		set_reportico_session_param("project",$project);
	}

	if ( !$project && array_key_exists("submit_configure_project", $_REQUEST) )
	{
		$project = get_request_item("jump_to_configure_project", "");	
		$_REQUEST["xmlin"] = "configureproject.xml";
		set_reportico_session_param("project",$project);
	}

	if ( !$project && array_key_exists("submit_menu_project", $_REQUEST) )
	{
		$project = get_request_item("jump_to_menu_project", "");	
		set_reportico_session_param("project",$project);
	}

	if ( !$project && array_key_exists("submit_design_project", $_REQUEST) )
	{
		$project = get_request_item("jump_to_design_project", "");	
		set_reportico_session_param("project",$project);
	}
    
	if ( $initial_project )
	{
		$project = $initial_project;
		set_reportico_session_param("project",$project);
	}
    

	if ( !$project )
		$project = session_request_item("project", "admin");

	if ( !$target_menu )
		$target_menu = session_request_item("target_menu", "");

	$menu = false;
	$menu_title = "Set Menu Title";

    if ( $project == "admin" )
        $project_folder = $admin_project_folder;

	// Now we now the project include the relevant config.php
	$projpath = $project_folder."/".$project;

	$configfile = $projpath."/config.php";
	$configtemplatefile = $projpath."/adminconfig.template";

	$menufile = $projpath."/menu.php";
	if ( $target_menu != "" )
		$menufile = $projpath."/menu_".$target_menu.".php";

	if ( !is_file($projpath) )
	{
		find_file_to_include($projpath, $projpath);
	}

    set_reportico_session_param("project_path", $projpath); 
    $this->reports_path = $projpath;

	if ( !$projpath )
	{
		find_file_to_include("config.php", $configfile);
        if ( $g_included_config && $g_included_config != $configfile )
            handle_error("Cannot load two different instances on a single page from different projects.", E_USER_ERROR);
        else
        {
//.........这里部分代码省略.........
开发者ID:arnon22,项目名称:transportcm,代码行数:101,代码来源:reportico.php

示例5: generate_url_params

 function generate_url_params($target_format, $session_placeholder = false)
 {
     $this->apply_defaults();
     $result = "";
     $url = "";
     $url .= "title=" . $this->convert_special_chars($this->title_actual);
     $url .= "&xtitle=" . $this->convert_special_chars($this->xtitle_actual);
     $url .= "&ytitle=" . $this->convert_special_chars($this->ytitle_actual);
     if ($target_format == "PDF") {
         $url .= "&width=" . $this->width_pdf_actual;
         $url .= "&height=" . $this->height_pdf_actual;
     } else {
         $url .= "&width=" . $this->width_actual;
         $url .= "&height=" . $this->height_actual;
     }
     $url .= "&graphcolor=" . $this->graphcolor_actual;
     $url .= "&gridposition=" . $this->gridpos_actual;
     $url .= "&xgriddisplay=" . $this->xgriddisplay_actual;
     $url .= "&xgridcolor=" . $this->xgridcolor_actual;
     $url .= "&ygriddisplay=" . $this->ygriddisplay_actual;
     $url .= "&ygridcolor=" . $this->ygridcolor_actual;
     $url .= "&titlefont=" . $this->titlefont_actual;
     $url .= "&titlefontstyle=" . $this->titlefontstyle_actual;
     $url .= "&titlefontsize=" . $this->titlefontsize_actual;
     $url .= "&titlecolor=" . $this->titlecolor_actual;
     $url .= "&xaxiscolor=" . $this->xaxiscolor_actual;
     $url .= "&xaxisfont=" . $this->xaxisfont_actual;
     $url .= "&xaxisfontstyle=" . $this->xaxisfontstyle_actual;
     $url .= "&xaxisfontsize=" . $this->xaxisfontsize_actual;
     $url .= "&xaxisfontcolor=" . $this->xaxisfontcolor_actual;
     $url .= "&yaxiscolor=" . $this->yaxiscolor_actual;
     $url .= "&yaxisfont=" . $this->yaxisfont_actual;
     $url .= "&yaxisfontstyle=" . $this->yaxisfontstyle_actual;
     $url .= "&yaxisfontsize=" . $this->yaxisfontsize_actual;
     $url .= "&yaxisfontcolor=" . $this->yaxisfontcolor_actual;
     $url .= "&xtitlefont=" . $this->xtitlefont_actual;
     $url .= "&xtitlefontstyle=" . $this->xtitlefontstyle_actual;
     $url .= "&xtitlefontsize=" . $this->xtitlefontsize_actual;
     $url .= "&xtitlecolor=" . $this->xtitlecolor_actual;
     $url .= "&xtickint=" . $this->xtickinterval_actual;
     $url .= "&xticklabint=" . $this->xticklabelinterval_actual;
     $url .= "&ytitlefont=" . $this->ytitlefont_actual;
     $url .= "&ytitlefontstyle=" . $this->ytitlefontstyle_actual;
     $url .= "&ytitlefontsize=" . $this->ytitlefontsize_actual;
     $url .= "&ytitlecolor=" . $this->ytitlecolor_actual;
     $url .= "&ytickint=" . $this->ytickinterval_actual;
     $url .= "&yticklabint=" . $this->yticklabelinterval_actual;
     $url .= "&margincolor=" . $this->margincolor_actual;
     $url .= "&marginleft=" . $this->marginleft_actual;
     $url .= "&marginright=" . $this->marginright_actual;
     $url .= "&margintop=" . $this->margintop_actual;
     $url .= "&marginbottom=" . $this->marginbottom_actual;
     $url .= "&xlabels=" . implode(",", $this->xlabels);
     foreach ($this->plot as $k => $v) {
         $str = implode(",", $v["data"]);
         $url .= "&plotname{$k}=" . $v["name"];
         $url .= "&plotdata{$k}={$str}";
         $url .= "&plottype{$k}=" . $v["type"];
         $url .= "&plotlinecolor{$k}=" . $v["linecolor"];
         if ($v["legend"]) {
             $url .= "&plotlegend{$k}=" . $v["legend"];
         }
         if ($v["fillcolor"]) {
             $url .= "&plotfillcolor{$k}=" . $v["fillcolor"];
         }
     }
     if ($session_placeholder) {
         $ses = "graph_" . $session_placeholder;
         set_reportico_session_param($ses, $url);
         $url = "graphid=" . $ses . "&time=" . time();
     }
     // Select the appropriate reporting engine
     $dyngraph = "dyngraph.php";
     if (defined("SW_GRAPH_ENGINE") && SW_GRAPH_ENGINE == "PCHART") {
         $dyngraph = "dyngraph_pchart.php";
     }
     $dr = get_reportico_url_path();
     $dyngraph = $dr . "/" . find_best_url_in_include_path($dyngraph);
     if ($this->reportico->framework_parent) {
         $dyngraph = "";
         if ($this->reportico->reportico_ajax_mode == "2") {
             $dyngraph = preg_replace("/ajax/", "graph", $this->reportico->reportico_ajax_script_url);
         }
     }
     $forward_url_params = session_request_item('forward_url_get_parameters_graph');
     if (!$forward_url_params) {
         $forward_url_params = session_request_item('forward_url_get_parameters', $this->reportico->forward_url_get_parameters);
     }
     if ($forward_url_params) {
         $url .= "&" . $forward_url_params;
     }
     $url .= "&reportico_call_mode=graph_pchart";
     $url .= "&reportico_session_name=" . reportico_session_name();
     $result = '<img class="swRepGraph" src=\'' . $dyngraph . '?' . $url . '\'>';
     return $result;
 }
开发者ID:JorgeUlises,项目名称:higia,代码行数:96,代码来源:swgraph_pchart.php

示例6: imagequery

 function imagequery($imagesql, $width = 200)
 {
     $conn =& $this->datasource;
     //$imagesql = str_replace($imagesql, '"', "'");
     $imagesql = preg_replace("/'/", "\"", $imagesql);
     //$params="driver=".$conn->driver."&dbname=".$conn->database."&hostname=".$conn->host_name;
     $params = "dummy=xxx";
     // Link to db image depaends on the framework used. For straight reportico, its a call to the imageget.php
     // file, for Joomla it must go through the Joomla index file
     $imagegetpath = dirname($this->url_path_to_reportico_runner) . "/" . find_best_url_in_include_path("imageget.php");
     if ($this->framework_parent) {
         $imagegetpath = "";
         if ($this->reportico_ajax_mode == "2") {
             $imagegetpath = preg_replace("/ajax/", "dbimage", $this->reportico_ajax_script_url);
         }
     }
     $forward_url_params = session_request_item('forward_url_get_parameters_dbimage');
     if (!$forward_url_params) {
         $forward_url_params = session_request_item('forward_url_get_parameters', $this->forward_url_get_parameters);
     }
     if ($forward_url_params) {
         $params .= "&" . $forward_url_params;
     }
     $params .= "&reportico_session_name=" . reportico_session_name();
     $result = '<img width="' . $width . '" src=\'' . $imagegetpath . '?' . $params . '&reportico_call_mode=dbimage&imagesql=' . $imagesql . '\'>';
     return $result;
 }
开发者ID:EmmanuelTaborda2015,项目名称:kyron_modificado,代码行数:27,代码来源:reportico.php

示例7: before_group_headers

 function before_group_headers()
 {
     //if ( $this->inOverflow )
     //return;
     if (session_request_item("target_style", "TABLE") == "FORM") {
         return;
     }
     // Work out which groups have triggered trailer by passing
     // through highest to lowest level .. group changes at level cause change at lower
     // also last line does too!!
     $uppergroupchanged = false;
     reset($this->query->groups);
     if ($this->query->groups) {
         do {
             $group = current($this->query->groups);
             $group->change_triggered = false;
             if ($uppergroupchanged || $this->query->changed($group->group_name) || $this->last_line) {
                 $group->change_triggered = true;
                 $uppergroupchanged = true;
             }
         } while (next($this->query->groups));
     }
     $changect = 0;
     reset($this->query->groups);
     foreach ($this->query->groups as $name => $group) {
         if (count($group->headers) > 0 && ($group->group_name == "REPORT_BODY" && $this->line_count == 0 || $group->change_triggered)) {
             if ($changect == 0 && $this->page_line_count > 0) {
                 $changect++;
                 $this->apply_format($group, "before_header");
                 $this->format_group_header_start($group->get_format("before_header") == "newpage");
             } else {
                 if ($changect == 0 || 1) {
                     $this->format_group_header_start($this->page_line_count > 0 && $group->get_format("before_header") == "newpage");
                 }
             }
             if (get_reportico_session_param("target_show_group_headers")) {
                 for ($i = 0; $i < count($group->headers); $i++) {
                     $col =& $group->headers[$i]["GroupHeaderColumn"];
                     $custom = $group->headers[$i]["GroupHeaderCustom"];
                     $this->format_group_header($col, $custom);
                 }
             }
             if ($graphs =& $this->query->get_graph_by_name($group->group_name)) {
                 foreach ($graphs as $graph) {
                     $graph->clear_data();
                 }
             }
             $this->format_group_header_end();
             $this->apply_format($group, "after_header");
         } else {
             if ($group->group_name == "REPORT_BODY" && $this->line_count == 0 || $this->query->changed($group->group_name)) {
                 if ($graphs =& $this->query->get_graph_by_name($group->group_name)) {
                     foreach ($graphs as $graph) {
                         $graph->clear_data();
                     }
                 }
             }
         }
     }
     // Show column headers for HTML/CSV on group change, or on first line of report, or on new page
     if (!$this->page_started && ($this->query->target_format == "HTML" || $this->query->target_format == "HTMLPRINT") || $this->query->target_format != "CSV" && $changect > 0 || $this->page_line_count == 0) {
         $this->format_report_detail_start();
         if ($this->query->target_format == "PDF") {
             $this->column_header_required = true;
         } else {
             $this->format_headers();
         }
         $this->page_styles_started = true;
     }
 }
开发者ID:lihaobin0320,项目名称:yii2-reportico,代码行数:70,代码来源:reportico_report.php

示例8: each_line

 function each_line($val)
 {
     if (!$this->columns_calculated) {
         // Calulate position and width of column detail taking into account
         // Report Body and Page styles
         $this->calculateColumnMetrics();
         $this->columns_calculated = true;
     }
     reportico_report::each_line($val);
     if (session_request_item("target_style", "TABLE") == "FORM") {
         $this->end_line();
         // Throw new page if set to throw between rows
         $formpagethrow = $this->query->get_attribute("formBetweenRows");
         if ($this->line_count > 1 && $formpagethrow == "newpage") {
             $this->finish_page();
             $this->begin_page();
         }
         // Throw new page if current position + number headers + line + headers > than bottom margin
         $ln = 0;
         $totheaderheight = 0;
         $prevheight = $this->calculated_line_height;
         $this->apply_style_tags("ROW", $this->query->output_before_form_row_styles);
         $y = $this->document->GetY();
         $this->set_position($this->abs_left_margin, $y);
         $this->unapply_style_tags("ROW", $this->query->output_before_form_row_styles);
         foreach ($this->query->groups as $val) {
             for ($i = 0; $i < count($val->headers); $i++) {
                 $col =& $val->headers[$i]["GroupHeaderColumn"];
                 $this->format_group_header($col, false);
                 $totheaderheight += $this->calculated_line_height;
             }
         }
         foreach ($this->query->display_order_set["column"] as $k => $w) {
             if ($w->attributes["column_display"] != "show") {
                 continue;
             }
             $ct++;
             $this->format_group_header($w, false);
             $totheaderheight += $this->calculated_line_height;
         }
         $this->calculated_line_height = $totheaderheight;
         $y = $this->document->GetY();
         $this->check_page_overflow();
         $this->calculated_line_height = $prevheight;
         // Between form solid line or blank line
         if ($formpagethrow == "blankline") {
             $this->end_line();
             $this->end_line();
         } else {
             $this->end_line();
             $this->apply_style_tags("AFTERFORMROW", $this->query->output_after_form_row_styles);
             $y = $this->document->GetY();
             $this->set_position($this->abs_left_margin, $y);
             $this->draw_cell($this->abs_right_margin - $this->abs_left_margin, $this->vsize, "RR");
             // Blank cell to continue page breaking at this size
             $this->unapply_style_tags("AFTERFORMROW", $this->query->output_after_form_row_styles);
             $this->end_line();
         }
         return;
     }
     $y = $this->document->GetY();
     $this->check_graphic_fit();
     $this->yjump = 0;
     if ($this->body_display == "show" && get_reportico_session_param("target_show_detail")) {
         $this->row_styles = array();
         $this->apply_style_tags("EACHHEADMID", $this->mid_cell_reportbody_styles, false, false, "ROW");
         $this->apply_style_tags("EACHLINEMID", $this->mid_row_page_styles, false, false, "ROW");
         $this->apply_style_tags("ROW2", $this->mid_cell_row_styles, false, false, "ROW");
         $this->draw_mode = "CALCULATE";
         $this->no_columns_printed = 0;
         $this->no_columns_to_print = 0;
         $this->cell_row_top_addition = $this->all_page_row_styles["style_border_top"];
         $this->cell_row_bottom_addition = $this->all_page_row_styles["style_border_bottom"];
         foreach ($this->columns as $col) {
             $this->format_column($col);
         }
         $this->cell_row_top_addition = 0;
         $this->cell_row_bottom_addition = 0;
         $this->unapply_style_tags("ROW2", $this->mid_cell_row_styles);
         $this->unapply_style_tags("EACHLINEMID", $this->mid_row_page_styles);
         $this->unapply_style_tags("EACHHEADMID", $this->mid_cell_reportbody_styles);
         $this->draw_mode = "DRAW";
         $this->check_page_overflow();
         $prev_calculated_line_height = $this->calculated_line_height;
         $prev_current_line_height = $this->current_line_height;
         $prev_max_line_height = $this->max_line_height;
         if ($this->column_header_required) {
             $this->format_headers();
             $this->column_header_required = false;
         }
         $this->current_line_height = $prev_current_line_height;
         $this->calculated_line_height = $prev_calculated_line_height;
         $this->max_line_height = $prev_max_line_height;
         // Line page wrapper
         $this->new_report_page_line_by_style("LINE5PAGE", $this->mid_page_reportbody_styles, false);
         $this->new_report_page_line_by_style("LINE2PAGE", $this->mid_page_page_styles, false);
         $this->new_report_page_line_by_style("LINE2PAGE", $this->all_page_row_styles, false);
         // Page Styles
         $this->apply_style_tags("EACHHEADMID", $this->mid_cell_reportbody_styles, false, false, "ROW");
         $this->apply_style_tags("EACHLINEMID", $this->mid_row_page_styles, false, false, "ROW");
//.........这里部分代码省略.........
开发者ID:GLUD,项目名称:EcoHack,代码行数:101,代码来源:reportico_report_tcpdf.php

示例9: get_reportico_url_path

function get_reportico_url_path()
{
    $newpath = "reportico.php";
    $found = find_file_to_include($newpath, $newpath, $reltoinclude);
    $newpath = get_relative_path(str_replace("/", "\\", realpath($newpath)), dirname(realpath($_SERVER["SCRIPT_FILENAME"])));
    $above = dirname($_SERVER["SCRIPT_NAME"]);
    if ($above == "/") {
        $above = "";
    }
    $url_path = $above . "/" . session_request_item('reporticourl', dirname($newpath));
    // If reportico source files are installed in root directory or in some other
    // scenarios such as an invalid linkbaseurl parameter the dirname of the
    // the reportico files returns just a slash (backslash on windows) so
    // return a true path
    if ($url_path == "/" || $url_path == "\\") {
        $url_path = "/";
    } else {
        $url_path = $url_path . "/";
    }
    return $url_path;
}
开发者ID:junjiezou,项目名称:reportico,代码行数:21,代码来源:swutil.php

示例10: each_line

 function each_line($val)
 {
     // PDF
     reportico_report::each_line($val);
     if (session_request_item("target_style", "TABLE") == "FORM") {
         $this->end_line();
         // Throw new page if set to throw between rows
         $formpagethrow = $this->query->get_attribute("formBetweenRows");
         if ($this->line_count > 1 && $formpagethrow == "newpage") {
             $this->finish_page();
             $this->begin_page();
         }
         // Throw new page if current position + number headers + line + headers > than bottom margin
         $ln = 0;
         $totheaderheight = 0;
         $prevheight = $this->calculated_line_height;
         $this->apply_style_tags($this->query->output_before_form_row_styles);
         $y = $this->document->GetY();
         $this->set_position($this->abs_left_margin, $y);
         $this->draw_cell(400, $this->vsize, "");
         // Blank cell to continue page breaking at this size
         $this->unapply_style_tags($this->query->output_before_form_row_styles);
         foreach ($this->query->groups as $val) {
             for ($i = 0; $i < count($val->headers); $i++) {
                 $col =& $val->headers[$i]["GroupHeaderColumn"];
                 $this->format_group_header($col, false);
                 $totheaderheight += $this->calculated_line_height;
             }
         }
         foreach ($this->query->display_order_set["column"] as $k => $w) {
             if ($w->attributes["column_display"] != "show") {
                 continue;
             }
             $ct++;
             $this->format_group_header($w, false);
             $totheaderheight += $this->calculated_line_height;
         }
         $this->calculated_line_height = $totheaderheight;
         $y = $this->document->GetY();
         $this->check_page_overflow();
         $this->calculated_line_height = $prevheight;
         // Between form solid line or blank line
         if ($formpagethrow == "blankline") {
             $this->end_line();
             $this->end_line();
         } else {
             $this->end_line();
             $this->apply_style_tags($this->query->output_after_form_row_styles);
             $y = $this->document->GetY();
             $this->set_position($this->abs_left_margin, $y);
             $this->draw_cell($this->abs_right_margin - $this->abs_left_margin, $this->vsize, "");
             // Blank cell to continue page breaking at this size
             $this->unapply_style_tags($this->query->output_after_form_row_styles);
             $this->end_line();
         }
         return;
     }
     $y = $this->document->GetY();
     $this->check_graphic_fit();
     $this->yjump = 0;
     if ($this->body_display == "show" && get_reportico_session_param("target_show_detail")) {
         $this->row_styles = array();
         $this->apply_style_tags($this->query->output_row_styles, false, false, "ROW");
         $this->draw_mode = "CALCULATE";
         $this->no_columns_printed = 0;
         $this->no_columns_to_print = 0;
         foreach ($this->columns as $col) {
             $this->format_column($col);
         }
         $this->unapply_style_tags($this->query->output_row_styles);
         $this->draw_mode = "DRAW";
         $this->check_page_overflow();
         //$this->set_position($this->abs_left_margin, false);
         //$this->draw_cell($this->abs_right_margin - $this->abs_left_margin, $this->calculated_line_height, "xx", 0, 0);
         //$this->disable_style_tag($this->query->output_header_styles, "border-width");
         $this->apply_style_tags($this->query->output_row_styles, false, false, "ROW");
         $this->no_columns_printed = 0;
         foreach ($this->columns as $col) {
             $this->format_column($col);
         }
         $this->page_line_count++;
         $this->unapply_style_tags($this->query->output_row_styles);
         $nextliney = $this->document->GetY() + $this->max_line_height;
         $this->end_line();
         $this->set_position(false, $nextliney);
     }
     //if ( $this->yjump )
     //$this->set_position(false, $y + $this->yjump);
     //if ( $y + $this->vsize > $this->abs_bottom_margin )
     //{
     //$this->finish_page();
     //$this->begin_page();
     //}
 }
开发者ID:fernandoceli,项目名称:polux_desarrollo,代码行数:94,代码来源:reportico_report_fpdf.php

示例11: pre_draw_smarty

 function pre_draw_smarty()
 {
     $text = "";
     switch ($this->panel_type) {
         case "LOGIN":
             $this->smarty->assign('SHOW_LOGIN', true);
             break;
         case "LOGOUT":
             if (!SW_DB_CONNECT_FROM_CONFIG) {
                 $this->smarty->assign('SHOW_LOGOUT', true);
             }
             break;
         case "MAINTAIN":
             $text .= $this->query->xmlin->xml2html($this->query->xmlin->data);
             break;
         case "BODY":
             $this->smarty->assign('EMBEDDED_REPORT', $this->query->embedded_report);
             break;
         case "MAIN":
             break;
         case "TITLE":
             $reporttitle = sw_translate($this->query->derive_attribute("ReportTitle", "Set Report Title"));
             // For Admin options title should be translatable
             // Also for configureproject.xml
             global $g_project;
             if ($this->query->xmlinput == "configureproject.xml" || $g_project == "admin") {
                 $this->smarty->assign('TITLE', template_xlate($reporttitle));
             } else {
                 $this->smarty->assign('TITLE', $reporttitle);
             }
             $submit_self = $this->query->get_action_url();
             $forward = session_request_item('forward_url_get_parameters', '');
             if ($forward) {
                 $submit_self .= "?" . $forward;
             }
             $this->smarty->assign('SCRIPT_SELF', $submit_self);
             break;
         case "CRITERIA":
             $this->smarty->assign('SHOW_CRITERIA', true);
             break;
         case "CRITERIA_FORM":
             $dispcrit = array();
             $ct = 0;
             // Build Select Column List
             $this->query->expand_col = false;
             foreach ($this->query->lookup_queries as $k => $col) {
                 if ($col->criteria_type) {
                     if (array_key_exists("EXPAND_" . $col->query_name, $_REQUEST)) {
                         $this->query->expand_col =& $this->query->lookup_queries[$col->query_name];
                     }
                     if (array_key_exists("EXPANDCLEAR_" . $col->query_name, $_REQUEST)) {
                         $this->query->expand_col =& $this->query->lookup_queries[$col->query_name];
                     }
                     if (array_key_exists("EXPANDSELECTALL_" . $col->query_name, $_REQUEST)) {
                         $this->query->expand_col =& $this->query->lookup_queries[$col->query_name];
                     }
                     if (array_key_exists("EXPANDSEARCH_" . $col->query_name, $_REQUEST)) {
                         $this->query->expand_col =& $this->query->lookup_queries[$col->query_name];
                     }
                     $crititle = "";
                     if ($tooltip = $col->derive_attribute("tooltip", false)) {
                         $title = $col->derive_attribute("column_title", $col->query_name);
                         $crittitle = '<a HREF="" onMouseOver="return overlib(\'' . $tooltip . '\',STICKY,CAPTION,\'' . $title . '\',DELAY,400);" onMouseOut="nd();" onclick="return false;">' . $title . '</A>';
                     } else {
                         $crittitle = $col->derive_attribute("column_title", $col->query_name);
                     }
                     $critsel = $col->format_form_column();
                     $critexp = false;
                     if ($col->expand_display && $col->expand_display != "NOINPUT") {
                         $critexp = true;
                     }
                     $dispcrit[] = array("name" => $col->query_name, "title" => sw_translate($crittitle), "entry" => $critsel, "expand" => $critexp);
                 }
                 $this->smarty->assign("CRITERIA_ITEMS", $dispcrit);
             }
             break;
         case "CRITERIA_EXPAND":
             // Expand Cell Table
             $this->smarty->assign("SHOW_EXPANDED", false);
             if ($this->query->expand_col) {
                 $this->smarty->assign("SHOW_EXPANDED", true);
                 $this->smarty->assign("EXPANDED_ITEM", $this->query->expand_col->query_name);
                 $this->smarty->assign("EXPANDED_SEARCH_VALUE", false);
                 $title = $this->query->expand_col->derive_attribute("column_title", $this->query->expand_col->query_name);
                 $this->smarty->assign("EXPANDED_TITLE", sw_translate($title));
                 // Only use then expand value if Search was press
                 $expval = "";
                 if ($this->query->expand_col->submitted('MANUAL_' . $this->query->expand_col->query_name)) {
                     $tmpval = $_REQUEST['MANUAL_' . $this->query->expand_col->query_name];
                     if (strlen($tmpval) > 1 && substr($tmpval, 0, 1) == "?") {
                         $expval = substr($tmpval, 1);
                     }
                 }
                 if ($this->query->expand_col->submitted('EXPANDSEARCH_' . $this->query->expand_col->query_name)) {
                     if (array_key_exists("expand_value", $_REQUEST)) {
                         $expval = $_REQUEST["expand_value"];
                     }
                 }
                 $this->smarty->assign("EXPANDED_SEARCH_VALUE", $expval);
                 $text .= $this->query->expand_col->expand_template();
//.........这里部分代码省略.........
开发者ID:lihaobin0320,项目名称:yii2-reportico,代码行数:101,代码来源:swpanel.php

示例12: before_group_headers

 function before_group_headers()
 {
     //if ( $this->inOverflow )
     //return;
     if (session_request_item("target_style", "TABLE") == "FORM") {
         return;
     }
     $changect = 0;
     reset($this->query->groups);
     foreach ($this->query->groups as $name => $group) {
         if (count($group->headers) > 0 && ($group->group_name == "REPORT_BODY" && $this->line_count == 0 || $this->query->changed($group->group_name))) {
             if ($changect == 0 && $this->page_line_count > 0) {
                 $changect++;
                 $this->apply_format($group, "before_header");
                 $this->format_group_header_start($group->get_format("before_header") == "newpage");
             } else {
                 if ($changect == 0 || 1) {
                     $this->format_group_header_start($this->page_line_count > 0 && $group->get_format("before_header") == "newpage");
                 }
             }
             if (get_reportico_session_param("target_show_group_headers")) {
                 for ($i = 0; $i < count($group->headers); $i++) {
                     $col =& $group->headers[$i]["GroupHeaderColumn"];
                     $custom = $group->headers[$i]["GroupHeaderCustom"];
                     $this->format_group_header($col, $custom);
                 }
             }
             if ($graphs =& $this->query->get_graph_by_name($group->group_name)) {
                 foreach ($graphs as $graph) {
                     $graph->clear_data();
                 }
             }
             $this->format_group_header_end();
             $this->apply_format($group, "after_header");
         } else {
             if ($group->group_name == "REPORT_BODY" && $this->line_count == 0 || $this->query->changed($group->group_name)) {
                 if ($graphs =& $this->query->get_graph_by_name($group->group_name)) {
                     foreach ($graphs as $graph) {
                         $graph->clear_data();
                     }
                 }
             }
         }
     }
     // Show column headers for HTML/CSV on group change, or on first line of report, or on new page
     if (!$this->page_started && ($this->query->target_format == "HTML" || $this->query->target_format == "HTMLPRINT") || $this->query->target_format != "CSV" && $changect > 0 || $this->page_line_count == 0) {
         $this->format_report_detail_start();
         $this->format_headers();
         $this->page_styles_started = true;
     }
 }
开发者ID:nmcgann,项目名称:reportico,代码行数:51,代码来源:reportico_report.php


注:本文中的session_request_item函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。