Exemplo n.º 1
0
 function finish()
 {
     reportico_report::finish();
     if (ob_get_length() > 0) {
         ob_clean();
     }
     $retarr = array();
     $retarr["JSON"] = "success";
     $retarr["viewname"] = $this->report_name;
     $retarr["colmodel"] = $this->colmodel;
     $retarr["colnames"] = $this->colnames;
     $page = get_request_item("page", "");
     $numrecords = 1000000;
     if (!$page) {
         $page = 1;
     }
     $rows = get_request_item("rows", "");
     if (!$rows) {
         $rows = $numrecords;
     }
     $retarr["gridmodel"] = array("total" => ceil($numrecords / $rows) . "", "page" => $page, "records" => $numrecords . "", "rows" => $this->results);
     if ($this->dataonly) {
         $len = strlen(json_encode($retarr["gridmodel"]));
     } else {
         $len = strlen(json_encode($retarr));
     }
     header('Cache-Control: no-cache, must-revalidate');
     //header('Content-Type: application/json');
     header('Content-Type: text/html');
     header("Content-Length: {$len}");
     header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
     header('Content-Disposition: attachment; filename=reportico.json');
     if ($this->dataonly) {
         echo json_encode($retarr["gridmodel"]);
     } else {
         echo json_encode($retarr);
     }
     die;
 }
 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>';
     }
 }
Exemplo n.º 3
0
 function setup_report_attributes()
 {
     $title = $this->query->derive_attribute("ReportTitle", "Unknown");
     $this->jar["title"] .= sw_translate($title);
     if ($this->query->output_template_parameters["show_hide_report_output_title"] == "hide") {
         $this->jar["attributes"]["hide_title"] = true;
     }
     $forward = session_request_item('forward_url_get_parameters', '');
     if ($forward) {
         $forward .= "&";
     }
     // In printable rjson mode dont show back box
     if (!get_request_item("printable_rjson")) {
         // Show Go Back Button ( if user is not in "SINGLE REPORT RUN " )
         if (!$this->query->access_mode || $this->query->access_mode != "REPORTOUTPUT") {
             $this->jar["attributes"]["show_prepare_button"] .= $this->query->get_action_url() . '?' . $forward . 'execute_mode=PREPARE&reportico_session_name=' . reportico_session_name();
         }
         if (get_reportico_session_param("show_refresh_button")) {
             $this->jar["attributes"]["show_refresh_button"] .= $this->query->get_action_url() . '?' . $forward . 'refreshReport=1&execute_mode=EXECUTE&reportico_session_name=' . reportico_session_name();
         }
     } else {
         $this->jar["attributes"]["show_print_button"] .= $this->query->get_action_url() . '?' . $forward . 'printReport=1&execute_mode=EXECUTE&reportico_session_name=' . reportico_session_name();
     }
     $this->jar["attributes"]["column_header_styles"] = $this->query->output_header_styles;
     $this->jar["attributes"]["column_page_styles"] = $this->query->output_page_styles;
     $this->jar["attributes"]["page_style"] = session_request_item("target_style", "TABLE");
     $this->setup_columns();
 }
Exemplo n.º 4
0
	function criteria_summary_display()
	{
		$text = "";

		$type = $this->criteria_display;

		$value_string = "";

		$params = array();
		$manual_params = array();
		$hidden_params = array();
		$expanded_params = array();
		$manual_override = false;

        if ( get_request_item("MANUAL_".$this->query_name."_FROMDATE", "" ) )
        {
            $this->criteria_summary = get_request_item("MANUAL_".$this->query_name."_FROMDATE","");
            if ( get_request_item("MANUAL_".$this->query_name."_TODATE", "" ) )
            {
                $this->criteria_summary .= "-";
                $this->criteria_summary .= get_request_item("MANUAL_".$this->query_name."_TODATE");
            }
            return;
        }

        if ( get_request_item("HIDDEN_".$this->query_name."_FROMDATE", "" ) )
        {
            $this->criteria_summary = get_request_item("HIDDEN_".$this->query_name."_FROMDATE","");
            if ( get_request_item("HIDDEN_".$this->query_name."_TODATE", "" ) )
            {
                $this->criteria_summary .= "-";
                $this->criteria_summary .= get_request_item("HIDDEN_".$this->query_name."_TODATE");
            }
            return;
        }

		if ( ! array_key_exists("EXPANDED_".$this->query_name, $_REQUEST) )
			if ( array_key_exists($this->query_name, $_REQUEST) )
			{
					$params = $_REQUEST[$this->query_name];
					if ( !is_array($params) )
						$params = array ( $params );
			}

		$hidden_params = array();
		if ( ! array_key_exists("EXPANDED_".$this->query_name, $_REQUEST) )
			if ( array_key_exists("HIDDEN_".$this->query_name, $_REQUEST) )
			{
					$hidden_params = $_REQUEST["HIDDEN_".$this->query_name];
					if ( !is_array($hidden_params) )
						$hidden_params = array ( $hidden_params );
			}

		$manual_params = array();
		if ( ! array_key_exists("EXPANDED_".$this->query_name, $_REQUEST) )
			if ( array_key_exists("MANUAL_".$this->query_name, $_REQUEST) )
			{
				$manual_params = explode(',',$_REQUEST["MANUAL_".$this->query_name]);
				if ( $manual_params )
				{
					$hidden_params = $manual_params;
					$manual_override = true;
				}
			}

		$expanded_params = array();
		if ( array_key_exists("EXPANDED_".$this->query_name, $_REQUEST) )
		{
				$expanded_params = $_REQUEST["EXPANDED_".$this->query_name];
				if ( !is_array($expanded_params) )
					$expanded_params = array ( $expanded_params );
		}

        if ( $this->criteria_type == "LIST" )
        {
            $checkedct = 0;
                $res =& $this->list_values;
                $text = "";
                if ( !$res )
                {
                    $text = "";
                }
                else
                {
                    reset($res);
                    $k = key($res);
                    for ($i = 0; $i < count($res); $i++ )
                    {
                        $line =&$res[$i];
                        $lab = $res[$i]["label"];
                        $ret = $res[$i]["value"];
                        $checked=false;
            
                        if ( in_array($ret, $params) )
                            $checked = true;
           
                        if ( in_array($ret, $hidden_params) )
                            $checked = true;
          
                        if ( in_array($ret, $expanded_params) )
                            $checked = true;
         
                        if ( $checked )
                        {
                                if ( $checkedct++ )
                                    $text .= ",";
                                $text .=  $lab;
                        }
                    }
                    $this->criteria_summary = $text;
                    return;
                }
        }

        $txt = "";
		$res =& $this->lookup_query->targets[0]->results;
		if ( !$res )
		{
			$res = array();
			$k = 0;
		}
		else
		{
			reset($res);
			$k = key($res);
            $checkedct = 0;
		    for ($i = 0; $i < count($res[$k]); $i++ )
		    {
			    $line =&$res[$i];
			    foreach ( $this->lookup_query->columns as $ky => $col )
			    {
				    if ( $col->lookup_display_flag )
				    {
					    $lab = $res[$col->query_name][$i];
				    }
				    if ( $col->lookup_return_flag )
					    $ret = $res[$col->query_name][$i];
				    if ( $col->lookup_abbrev_flag )
					    $abb = $res[$col->query_name][$i];
			    }
			    $checked=false;

			    if ( in_array($ret, $params) )
				    $checked = true;

			    if ( in_array($ret, $hidden_params) && !$manual_override )
				    $checked = true;

			    if ( in_array($ret, $expanded_params) )
				    $checked = true;

			    if ( in_array($abb, $hidden_params) && $manual_override )
				    $checked = true;

			    if ( $checked )
                {
                        if ( $checkedct++ )
                            $text .= ",";
   					    $text .=  $lab;
                }
		    }
		}

		if ( array_key_exists("EXPAND_".$this->query_name, $_REQUEST) ||
			array_key_exists("EXPANDCLEAR_".$this->query_name, $_REQUEST) ||
			array_key_exists("EXPANDSELECTALL_".$this->query_name, $_REQUEST) ||
			array_key_exists("EXPANDSEARCH_".$this->query_name, $_REQUEST) ||
			$this->criteria_display == "NOINPUT" )
		{
			$tag = $value_string;
			if ( strlen($tag) > 40 )
				$tag = substr($tag, 0, 40)."...";

			if ( !$tag )
				$tag = "ANY";

			$text .= $tag;
		}
		else if ( $this->criteria_display == "ANYCHAR" || $this->criteria_display == "TEXTFIELD" )
		{
			$txt =  $value_string;
		}

        $this->criteria_summary = $text;
	}
 function format_criteria_selection_set()
 {
     $is_criteria = false;
     foreach ($this->query->lookup_queries as $name => $crit) {
         $label = "";
         $value = "";
         if (isset($crit->criteria_summary) && $crit->criteria_summary) {
             $label = $crit->derive_attribute("column_title", $crit->query_name);
             $value = $crit->criteria_summary;
         } else {
             if (get_request_item($name . "_FROMDATE_DAY", "")) {
                 $label = $crit->derive_attribute("column_title", $crit->query_name);
                 $label = sw_translate($label);
                 $mth = get_request_item($name . "_FROMDATE_MONTH", "") + 1;
                 $value = get_request_item($name . "_FROMDATE_DAY", "") . "/" . $mth . "/" . get_request_item($name . "_FROMDATE_YEAR", "");
                 if (get_request_item($name . "_TODATE_DAY", "")) {
                     $mth = get_request_item($name . "_TODATE_MONTH", "") + 1;
                     $value .= "-";
                     $value .= get_request_item($name . "_TODATE_DAY", "") . "/" . $mth . "/" . get_request_item($name . "_TODATE_YEAR", "");
                 }
             } else {
                 if (get_request_item("MANUAL_" . $name . "_FROMDATE", "")) {
                     $label = $crit->derive_attribute("column_title", $crit->query_name);
                     $label = sw_translate($label);
                     $value = get_request_item("MANUAL_" . $name . "_FROMDATE", "");
                     if (get_request_item("MANUAL_" . $name . "_TODATE", "")) {
                         $value .= "-";
                         $value .= get_request_item("MANUAL_" . $name . "_TODATE");
                     }
                 } else {
                     if (get_request_item("HIDDEN_" . $name . "_FROMDATE", "")) {
                         $label = $crit->derive_attribute("column_title", $crit->query_name);
                         $label = sw_translate($label);
                         $value = get_request_item("HIDDEN_" . $name . "_FROMDATE", "");
                         if (get_request_item("HIDDEN_" . $name . "_TODATE", "")) {
                             $value .= "-";
                             $value .= get_request_item("HIDDEN_" . $name . "_TODATE");
                         }
                     } else {
                         if (get_request_item("EXPANDED_" . $name, "")) {
                             $label = $crit->derive_attribute("column_title", $crit->query_name);
                             $label = sw_translate($label);
                             $value .= implode(get_request_item("EXPANDED_" . $name, ""), ",");
                         } else {
                             if (get_request_item("MANUAL_" . $name, "")) {
                                 $label = $crit->derive_attribute("column_title", $crit->query_name);
                                 $label = sw_translate($label);
                                 $value .= get_request_item("MANUAL_" . $name, "");
                             }
                         }
                     }
                 }
             }
         }
         if ($label || $value) {
             $is_criteria = true;
         }
     }
     if (get_reportico_session_param("target_show_criteria") && $is_criteria) {
         $this->before_format_criteria_selection();
         foreach ($this->query->lookup_queries as $name => $crit) {
             $label = "";
             $value = "";
             if (isset($crit->criteria_summary) && $crit->criteria_summary) {
                 $label = $crit->derive_attribute("column_title", $crit->query_name);
                 $value = $crit->criteria_summary;
             } else {
                 if (get_request_item($name . "_FROMDATE_DAY", "")) {
                     $label = $crit->derive_attribute("column_title", $crit->query_name);
                     $label = sw_translate($label);
                     $mth = get_request_item($name . "_FROMDATE_MONTH", "") + 1;
                     $value = get_request_item($name . "_FROMDATE_DAY", "") . "/" . $mth . "/" . get_request_item($name . "_FROMDATE_YEAR", "");
                     if (get_request_item($name . "_TODATE_DAY", "")) {
                         $mth = get_request_item($name . "_TODATE_MONTH", "") + 1;
                         $value .= "-";
                         $value .= get_request_item($name . "_TODATE_DAY", "") . "/" . $mth . "/" . get_request_item($name . "_TODATE_YEAR", "");
                     }
                 } else {
                     if (get_request_item("MANUAL_" . $name . "_FROMDATE", "")) {
                         $label = $crit->derive_attribute("column_title", $crit->query_name);
                         $label = sw_translate($label);
                         $value = get_request_item("MANUAL_" . $name . "_FROMDATE", "");
                         if (get_request_item("MANUAL_" . $name . "_TODATE", "")) {
                             $value .= "-";
                             $value .= get_request_item("MANUAL_" . $name . "_TODATE");
                         }
                     } else {
                         if (get_request_item("HIDDEN_" . $name . "_FROMDATE", "")) {
                             $label = $crit->derive_attribute("column_title", $crit->query_name);
                             $label = sw_translate($label);
                             $value = get_request_item("HIDDEN_" . $name . "_FROMDATE", "");
                             if (get_request_item("HIDDEN_" . $name . "_TODATE", "")) {
                                 $value .= "-";
                                 $value .= get_request_item("HIDDEN_" . $name . "_TODATE");
                             }
                         } else {
                             if (get_request_item("EXPANDED_" . $name, "")) {
                                 $label = $crit->derive_attribute("column_title", $crit->query_name);
                                 $label = sw_translate($label);
                                 $value .= implode(get_request_item("EXPANDED_" . $name, ""), ",");
                             } else {
                                 if (get_request_item("MANUAL_" . $name, "")) {
                                     $label = $crit->derive_attribute("column_title", $crit->query_name);
                                     $label = sw_translate($label);
                                     $value .= get_request_item("MANUAL_" . $name, "");
                                 }
                             }
                         }
                     }
                 }
             }
             if ($label || $value) {
                 $this->format_criteria_selection($label, $value);
             }
         }
         $this->after_format_criteria_selection();
     }
 }
Exemplo n.º 6
0
 function &display_maintain_field($tag, $val, &$tagct, $translate = true, $overridetitle = false, $toggleclass = false, $togglestate = false, $draw_shadow = false)
 {
     $text = "";
     $striptag = preg_replace("/ .*/", "", $tag);
     $showtag = preg_replace("/ /", "_", $tag);
     $partialMaintain = get_request_item("partialMaintain", false);
     if ($partialMaintain) {
         $x = $this->id . "_" . $showtag;
         if ($partialMaintain != $x && !preg_match("/_ANY/", $partialMaintain)) {
             return $text;
         }
     }
     $text .= "\n<!-- SETFIELD-->";
     $text .= '<TR';
     if ($toggleclass) {
         if ($togglestate) {
             $text .= " class=\"" . $toggleclass . "\" style=\"display: table-row\" ";
         } else {
             $text .= " class=\"" . $toggleclass . "\" style=\"display: none\" ";
         }
     }
     if ($draw_shadow) {
         $text .= " style=\"display: none\" ";
     }
     $text .= '>';
     $type = "TEXTFIELD";
     $translateoptions = false;
     $title = $tag;
     $edit_mode = "FULL";
     $tagvals = array();
     $subtitle = "";
     if (preg_match("/ /", $tag)) {
         $subtitle = preg_replace("/.* /", " ", $tag);
     }
     if (array_key_exists($striptag, $this->field_display)) {
         $arval = $this->field_display[$striptag];
         if (array_key_exists("Title", $arval)) {
             $title = $arval["Title"] . $subtitle;
         }
         if (array_key_exists("Type", $arval)) {
             $type = $arval["Type"];
         }
         if (array_key_exists("WizardLink", $arval)) {
             $this->wizard_linked_to = $val;
         }
         if (array_key_exists("XlateOptions", $arval)) {
             $translateoptions = $arval["XlateOptions"];
         }
         if (array_key_exists("EditMode", $arval)) {
             $edit_mode = $arval["EditMode"];
         }
         if (array_key_exists("Values", $arval)) {
             $tagvals = $arval["Values"];
         }
     }
     if ($overridetitle) {
         $title = $overridetitle;
     }
     $default = get_default($striptag, ".");
     if ($type == "HIDE") {
         $tagct--;
         $test = "";
         return $text;
     }
     $helppage = $this->get_help_link($this->id);
     $text .= '<TD class="swMntSetField">';
     if ($helppage) {
         if ($this->query->url_path_to_assets) {
             $helpimg = $this->query->url_path_to_assets . "/images/help.png";
             $text .= '<a target="_blank" href="' . $this->help_path($this->id, $striptag) . '">';
             $text .= '<img class="swMntHelpImage" alt="tab" src="' . $helpimg . '">';
             $text .= '</a>&nbsp;';
         } else {
             $helpimg = find_best_url_in_include_path("images/help.png");
             $dr = get_reportico_url_path();
             $text .= '<a target="_blank" href="' . $this->help_path($this->id, $striptag) . '">';
             $text .= '<img class="swMntHelpImage" alt="tab" src="' . $dr . $helpimg . '">';
             $text .= '</a>&nbsp;';
         }
     }
     if ($translate) {
         $text .= template_xlate($title);
     } else {
         $text .= $title;
     }
     if ($edit_mode == "SAFE") {
         if (SW_SAFE_DESIGN_MODE) {
             $text .= "<br>" . template_xlate("SAFEOFF");
         } else {
             $text .= "";
         }
     }
     $text .= '</TD>';
     if ($draw_shadow) {
         $shadow = "_shadow";
     } else {
         $shadow = "";
     }
     // Display Field Entry
     $text .= '<TD class="swMntSetField" colspan="1">';
     switch ($type) {
         case "PASSWORD":
             $text .= '<input class="' . $this->query->getBootstrapStyle('textfield') . '" type="password" size="40%" name="set_' . $this->id . "_" . $showtag . $shadow . '" value="' . htmlspecialchars($val) . '"><br>';
             break;
         case "TEXTFIELDREADONLY":
             $readonly = "readonly";
             $text .= '<input class="' . $this->query->getBootstrapStyle('textfield') . '" type="text" size="40%" ' . $readonly . ' name="set_' . $this->id . "_" . $showtag . $shadow . '" value="' . htmlspecialchars($val) . '">';
             break;
         case "TEXTFIELD":
         case "TEXTFIELDNOOK":
             $readonly = "";
             if ($edit_mode == "SAFE" && ($this->query->allow_maintain == "SAFE" || $this->query->allow_maintain == "DEMO" || SW_SAFE_DESIGN_MODE)) {
                 $readonly = "readonly";
             }
             $text .= '<input class="' . $this->query->getBootstrapStyle('textfield') . '" type="text" size="40%" ' . $readonly . ' name="set_' . $this->id . "_" . $showtag . $shadow . '" value="' . htmlspecialchars($val) . '">';
             break;
         case "TEXTBOX":
             $readonly = "";
             if ($edit_mode == "SAFE" && ($this->query->allow_maintain == "SAFE" || $this->query->allow_maintain == "DEMO" || SW_SAFE_DESIGN_MODE)) {
                 $readonly = "readonly";
             }
             $text .= '<textarea class="' . $this->query->getBootstrapStyle('textfield') . '" ' . $readonly . ' cols="70" rows="20" name="set_' . $this->id . "_" . $showtag . $shadow . '" >';
             $text .= htmlspecialchars($val);
             $text .= '</textarea>';
             break;
         case "TEXTBOXSMALL":
             $readonly = "";
             if ($edit_mode == "SAFE" && ($this->query->allow_maintain == "SAFE" || $this->query->allow_maintain == "DEMO" || SW_SAFE_DESIGN_MODE)) {
                 $readonly = "readonly";
             }
             $text .= '<textarea class="' . $this->query->getBootstrapStyle('textfield') . '" ' . $readonly . ' cols="70" rows="4" name="set_' . $this->id . "_" . $showtag . $shadow . '" >';
             $text .= htmlspecialchars($val);
             $text .= '</textarea>';
             break;
         case "DROPDOWN":
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $tagvals, $val, false, $translateoptions);
             break;
         case "CRITERIA":
             $keys = array_keys($this->query->lookup_queries);
             if (!is_array($keys)) {
                 $key = array();
             }
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $keys, $val, false, $translateoptions);
             break;
         case "GROUPCOLUMNS":
             if (!$this->current_criteria_name) {
                 $q =& $this->query;
             } else {
                 $q =& $this->query->lookup_queries[$this->current_criteria_name]->lookup_query;
             }
             $keys = array();
             $keys[] = "REPORT_BODY";
             if (is_array($q->columns)) {
                 foreach ($q->columns as $col) {
                     $keys[] = $col->query_name;
                 }
             }
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $keys, $val, false, $translateoptions);
             break;
         case "REPORTLIST":
             $keys = array();
             $keys[] = "";
             if (is_dir($this->query->reports_path)) {
                 $testpath = $this->query->reports_path;
             } else {
                 $testpath = find_best_location_in_include_path($this->query->reports_path);
             }
             if (is_dir($testpath)) {
                 if ($dh = opendir($testpath)) {
                     while (($file = readdir($dh)) !== false) {
                         if (preg_match("/.*\\.xml/", $file)) {
                             $keys[] = $file;
                         }
                     }
                     closedir($dh);
                 }
             } else {
                 trigger_error(template_xlate("NOOPENDIR") . $this->query->reports_path);
             }
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $keys, $val, false, $translateoptions);
             break;
         case "FONTLIST":
             $keys = array();
             $keys[] = "";
             if ($this->query->pdf_engine == "fpdf") {
                 $fontdir = "fpdf/font";
             } else {
                 $fontdir = "tcpdf/fonts";
             }
             if (is_dir($fontdir)) {
                 $testpath = $fontdir;
             } else {
                 $testpath = find_best_location_in_include_path($fontdir);
             }
             if (is_dir($testpath)) {
                 if ($dh = opendir($testpath)) {
                     while (($file = readdir($dh)) !== false) {
                         if (preg_match("/.*\\.php/", $file)) {
                             $keys[] = preg_replace("/.php/", "", $file);
                         }
                     }
                     sort($keys);
                     closedir($dh);
                 }
             } else {
                 trigger_error(template_xlate("NOOPENDIR") . $this->query->reports_path);
             }
             if (!in_array($val, $keys)) {
                 $keys[] = $val;
             }
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $keys, $val, false, $translateoptions);
             break;
         case "STYLELOCTYPES":
             if (!$this->current_criteria_name) {
                 $q =& $this->query;
             } else {
                 $q =& $this->query->lookup_queries[$this->current_criteria_name]->lookup_query;
             }
             $keys = array();
             $keys[] = "CELL";
             $keys[] = "ALLCELLS";
             $keys[] = "COLUMNHEADERS";
             $keys[] = "ROW";
             $keys[] = "PAGE";
             $keys[] = "BODY";
             $keys[] = "GROUPHEADERLABEL";
             $keys[] = "GROUPHEADERVALUE";
             $keys[] = "GROUPTRAILER";
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $keys, $val, false, $translateoptions);
             break;
         case "FONTSTYLES":
             if (!$this->current_criteria_name) {
                 $q =& $this->query;
             } else {
                 $q =& $this->query->lookup_queries[$this->current_criteria_name]->lookup_query;
             }
             $keys = array();
             $keys[] = "NONE";
             $keys[] = "BOLD";
             $keys[] = "ITALIC";
             $keys[] = "BOLDANDITALIC";
             $keys[] = "UNDERLINE";
             $keys[] = "NORMAL";
             $keys[] = "STRIKETHROUGH";
             $keys[] = "OVERLINE";
             $keys[] = "BLINK";
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $keys, $val, false, $translateoptions);
             break;
         case "POSITIONS":
             if (!$this->current_criteria_name) {
                 $q =& $this->query;
             } else {
                 $q =& $this->query->lookup_queries[$this->current_criteria_name]->lookup_query;
             }
             $keys = array();
             $keys[] = "";
             $keys[] = "RELATIVE";
             $keys[] = "ABSOLUTE";
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $keys, $val, false, $translateoptions);
             break;
         case "BORDERSTYLES":
             if (!$this->current_criteria_name) {
                 $q =& $this->query;
             } else {
                 $q =& $this->query->lookup_queries[$this->current_criteria_name]->lookup_query;
             }
             $keys = array();
             $keys[] = "NOBORDER";
             $keys[] = "NONE";
             $keys[] = "SOLIDLINE";
             $keys[] = "DOTTED";
             $keys[] = "DASHED";
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $keys, $val, false, $translateoptions);
             break;
         case "AGGREGATETYPES":
             if (!$this->current_criteria_name) {
                 $q =& $this->query;
             } else {
                 $q =& $this->query->lookup_queries[$this->current_criteria_name]->lookup_query;
             }
             $keys = array();
             $keys[] = "";
             $keys[] = "SUM";
             $keys[] = "AVERAGE";
             $keys[] = "MIN";
             $keys[] = "MAX";
             $keys[] = "PREVIOUS";
             $keys[] = "COUNT";
             $keys[] = "SKIPLINE";
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $keys, $val, false, $translateoptions);
             break;
         case "QUERYCOLUMNS":
             if (!$this->current_criteria_name) {
                 $q =& $this->query;
             } else {
                 $q =& $this->query->lookup_queries[$this->current_criteria_name]->lookup_query;
             }
             $keys = array();
             if ($q && is_array($q->columns)) {
                 foreach ($q->columns as $col) {
                     $keys[] = $col->query_name;
                 }
             }
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $keys, $val, false, $translateoptions);
             break;
         case "QUERYCOLUMNSOPTIONAL":
             if (!$this->current_criteria_name) {
                 $q =& $this->query;
             } else {
                 $q =& $this->query->lookup_queries[$this->current_criteria_name]->lookup_query;
             }
             $keys = array();
             $keys[] = "";
             if (is_array($q->columns)) {
                 foreach ($q->columns as $col) {
                     $keys[] = $col->query_name;
                 }
             }
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $keys, $val, false, $translateoptions);
             break;
         case "QUERYGROUPS":
             $q =& $this->query;
             $keys = array();
             if (is_array($q->columns)) {
                 foreach ($q->groups as $col) {
                     $keys[] = $col->group_name;
                 }
             }
             $text .= $this->draw_array_dropdown("set_" . $this->id . "_" . $showtag . $shadow, $keys, $val, false, $translateoptions);
             break;
     }
     $text .= '<TD class="swMntSetField" colspan="1">';
     if ($default) {
         $text .= '&nbsp;(' . $default . ')';
     } else {
         $text .= '&nbsp;';
     }
     $text .= '</TD>';
     if ($partial = get_request_item("partialMaintain", false)) {
         $arr = explode("_", $partial);
         if (count($arr) > 1) {
             $partial = $arr[1];
         }
     }
     if ($tagct == 1 || $partial == $tag && $partial != "ANY") {
         $text .= "\n<!-- TAG 1-->";
         $text .= '<TD colspan="1">';
         if ($type != "TEXTFIELDNOOK") {
             $text .= '<input class="' . $this->query->getBootstrapStyle('design_ok') . 'swMntButton reporticoSubmit" type="submit" name="submit_' . $this->id . '_SET" value="' . template_xlate("OK") . '">';
         } else {
             $text .= "&nbsp;";
         }
         $text .= '</TD>';
     }
     $text .= '</TR>';
     return $text;
 }