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


PHP sw_translate函数代码示例

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


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

示例1: 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

示例2: list_display


//.........这里部分代码省略.........
			$k = key($res);
		for ($i = 0; $i < count($res); $i++ )
		{
			$line =&$res[$i];
			$lab = $res[$i]["label"];
			$ret = $res[$i]["value"];
			$checked="";

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

			if ( in_array($ret, $hidden_params) )
				$checked = $check_text;

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

			if ( $selectall )
				$checked = $check_text;

			if ( $checked != "" )
				if ( !$value_string )
					$value_string = $lab;
				else
					$value_string .= ",".$lab;

			switch ( $type )
			{
				case "MULTI":
					$text .= '<OPTION label="'.$lab.'" value="'.$ret.'" '.$checked.'>'.$lab.'</OPTION>';
					break;

				case "RADIO":
    				$text .= '<INPUT type="radio" name="'.$tag_pref.$this->query_name.'" value="'.$ret.'" '.$checked.'>'.sw_translate($lab).'<BR>';
					break;

				case "CHECKBOX":
    					$text .= '<INPUT type="checkbox" name="'.$tag_pref.$this->query_name.'[]" value="'.$ret.'" '.$checked.'>'.sw_translate($lab).'<BR>';
					break;

				default:
   					$text .= '<OPTION label="'.$lab.'" value="'.$ret.'" '.$checked.'>'.$lab.'</OPTION>';
					break;
				}

			}
		}

		switch ( $type )
		{
				case "MULTI":
 						$text .= '</SELECT>';
						break;

				case "CHECKBOX":
				case "RADIO":
						break;

				default:
 						$text .= '</SELECT>';
						break;
		}

		if ( !$in_is_expanding )
		{
		
开发者ID:arnon22,项目名称:transportcm,代码行数:66,代码来源:reportico.php

示例3: format_column_trailer

 function format_column_trailer(&$trailer_col, &$value_col, $trailer_first = false)
 {
     $just = $trailer_col->derive_attribute("justify", false);
     if ($just && $just != "left") {
         $this->query->output_group_trailer_styles["text-align"] = $just;
     } else {
         $this->query->output_group_trailer_styles["text-align"] = "left";
     }
     if (!get_reportico_session_param("target_show_group_trailers")) {
         return;
     }
     if ($value_col) {
         $group_label = $value_col->get_attribute("group_trailer_label");
         if (!$group_label) {
             $group_label = $value_col->get_attribute("column_title");
         }
         if (!$group_label) {
             $group_label = $value_col->query_name;
             $group_label = str_replace("_", " ", $group_label);
             $group_label = ucwords(strtolower($group_label));
         }
         $group_label = sw_translate($group_label);
         $padstring = $value_col->old_column_value;
         if ($value_col->output_images) {
             $padstring = $this->format_images($value_col->output_images);
         }
         if ($group_label == "BLANK") {
             $group_label == "";
         }
         if (!isset($this->jar["pages"][$this->page_count]["groups"]["trailers"])) {
             $this->jar["pages"][$this->page_count]["groups"]["trailers"] = array();
         }
         $hct = count($this->jar["pages"][$this->page_count]["groups"]["trailers"]) - 1;
         $this->jar["pages"][$this->page_count]["groups"]["trailers"][$trailer_col->query_name][] = array("label" => $group_label, "labelstyle" => $this->query->output_group_trailer_styles, "value" => $value_col->column_value, "valuestyle" => $this->query->output_group_trailer_styles);
     }
     //else
     //$this->jar[""] .= "&nbsp;";
 }
开发者ID:GLUD,项目名称:EcoHack,代码行数:38,代码来源:reportico_report_rjson.php

示例4: format_column_header

 function format_column_header(&$column_item)
 {
     if (!get_reportico_session_param("target_show_column_headers")) {
         return;
     }
     if (!$this->show_column_header($column_item)) {
         return;
     }
     $k =& $column_item->query_name;
     $padstring = $column_item->derive_attribute("column_title", $column_item->query_name);
     $padstring = str_replace("_", " ", $padstring);
     $padstring = ucwords(strtolower($padstring));
     $padstring = sw_translate($padstring);
     $just = $this->justifys[$column_item->derive_attribute("justify", "left")];
     $contenttype = $column_item->derive_attribute("content_type", $column_item->query_name);
     $tw = $column_item->abs_column_start;
     $x = $this->document->GetX();
     $y = $this->document->GetY();
     $this->set_position($tw, $y);
     $wd = $column_item->abs_column_width;
     if ($wd - $this->column_spacing > 0) {
         $wd = $wd - $this->column_spacing;
     }
     if (!$wd) {
         $this->document->Write("{$padstring}");
     } else {
         $this->draw_cell($wd, $this->vsize + 0, $padstring, "PBF", 0, $just, "B");
     }
 }
开发者ID:GLUD,项目名称:EcoHack,代码行数:29,代码来源:reportico_report_tcpdf.php

示例5: format_criteria_selection_set

 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, ""), ",");
//.........这里部分代码省略.........
开发者ID:lihaobin0320,项目名称:yii2-reportico,代码行数:101,代码来源:reportico_report.php

示例6: ErrorHandler

function ErrorHandler($errno, $errstr, $errfile, $errline)
{
    global $g_system_errors;
    global $g_error_status;
    global $g_code_area;
    global $g_code_source;
    switch ($errno) {
        case E_ERROR:
            $errtype = sw_translate("Error");
            break;
        case E_NOTICE:
            $errtype = sw_translate("Notice");
            break;
        case E_USER_ERROR:
            $errtype = sw_translate("Error");
            break;
        case E_USER_WARNING:
            $errtype = sw_translate("");
            break;
        case E_USER_NOTICE:
            $errtype = sw_translate("");
            break;
        case E_WARNING:
            $errtype = sw_translate("");
            break;
        default:
            $errtype = sw_translate("Fatal Error");
    }
    // Avoid adding duplicate errors
    if (!$g_system_errors) {
        $g_system_errors = array();
    }
    foreach ($g_system_errors as $k => $val) {
        if ($val["errstr"] == $errstr) {
            $g_system_errors[$k]["errct"]++;
            return;
        }
    }
    $g_system_errors[] = array("errno" => $errno, "errstr" => $errstr, "errfile" => $errfile, "errline" => $errline, "errtype" => $errtype, "errarea" => $g_code_area, "errsource" => $g_code_source, "errct" => 1);
    //echo "<PRE>";
    //var_dump($g_system_errors);
    //echo "</PRE>";
    $g_error_status = 1;
}
开发者ID:junjiezou,项目名称:reportico,代码行数:44,代码来源:swutil.php

示例7: 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

示例8: format_column_trailer

 function format_column_trailer(&$trailer_col, &$value_col, $trailer_first = false)
 {
     if ($value_col) {
         $group_label = $value_col["GroupTrailerValueColumn"]->get_attribute("group_trailer_label");
         if (!$group_label) {
             $group_label = $value_col["GroupTrailerValueColumn"]->get_attribute("column_title");
         }
         if (!$group_label) {
             $group_label = $value_col["GroupTrailerValueColumn"]->query_name;
             $group_label = str_replace("_", " ", $group_label);
             $group_label = ucwords(strtolower($group_label));
         }
         $group_label = sw_translate($group_label);
         $padstring = $value_col["GroupTrailerValueColumn"]->old_column_value;
         echo $group_label . ":" . $padstring;
     }
     echo ",";
 }
开发者ID:GLUD,项目名称:EcoHack,代码行数:18,代码来源:reportico_report_csv.php

示例9: each_line

 function each_line($val)
 {
     reportico_report::each_line($val);
     // Set the values for the fields in the record
     $this->results["data"][$this->line_ct] = array();
     if ($this->line_ct == 0) {
         $qn = get_query_column("golap", $this->columns);
         if ($qn) {
             $arr = explode(",", $qn->column_value);
             foreach ($arr as $k => $v) {
                 $arr1 = explode("=", $v);
                 $this->results["displaylike"][$arr1[0]] = $arr1[1];
             }
         }
     }
     foreach ($this->query->display_order_set["column"] as $col) {
         $qn = get_query_column($col->query_name, $this->columns);
         $coltitle = $col->derive_attribute("column_title", $col->query_name);
         $coltitle = str_replace("_", " ", $coltitle);
         $coltitle = ucwords(strtolower($coltitle));
         $coltitle = sw_translate($coltitle);
         $disp = $col->derive_attribute("column_display", "show");
         if ($disp == "hide") {
             continue;
         }
         $this->results["data"][$this->line_ct][$coltitle] = $qn->column_value;
     }
     $this->line_ct++;
 }
开发者ID:lihaobin0320,项目名称:yii2-reportico,代码行数:29,代码来源:reportico_report_json.php

示例10: each_line

 function each_line($val)
 {
     reportico_report::each_line($val);
     //if ( $this->line_ct > 3 ) return;
     // Set the values for the fields in the record
     $this->results[] = array("id" => $this->line_ct, "cell" => array());
     $this->results[count($this->results) - 1]["cell"][] = "options";
     // Excel requires group headers are printed as the first columns in the spreadsheet against
     // the detail.
     foreach ($this->query->groups as $name => $group) {
         if (count($group->headers) > 0) {
             foreach ($group->headers as $gphk => $col) {
                 $qn = get_query_column($col->query_name, $this->query->columns);
                 $coltitle = $col->derive_attribute("column_title", $col->query_name);
                 $coltitle = str_replace("_", " ", $coltitle);
                 $coltitle = ucwords(strtolower($coltitle));
                 $coltitle = sw_translate($coltitle);
                 if ($col->query_name == $this->key_column) {
                     $this->results[count($this->results) - 1]["id"][] = $qn->column_value;
                 }
                 $this->results[count($this->results) - 1]["cell"][] = $qn->column_value;
                 if ($this->line_ct == 0) {
                     $this->colmodel[] = array("name" => $col->query_name, "index" => $col->query_name, "editable" => derive_jquerygrid_col_params($this->report_name, $col->query_name, "editable", false), "edittype" => "text", "sorttype" => "text", "jsonmap" => $col->query_name, "width" => derive_jquerygrid_col_params($this->report_name, $col->query_name, "width", "80"));
                     // Map colname to col
                     $this->colmap[$col->query_name] = count($this->colmodel) - 1;
                     if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "edittype", "")) {
                         $this->colmodel[count($this->colmodel) - 1]["edittype"] = $v;
                     }
                     if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "sorttype", "")) {
                         $this->colmodel[count($this->colmodel) - 1]["sorttype"] = $v;
                     }
                     if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "editoptions", "")) {
                         $this->colmodel[count($this->colmodel) - 1]["editoptions"] = $v;
                     }
                     if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "filtertype", "")) {
                         if ($v == "select") {
                             $this->colmodel[count($this->colmodel) - 1]["stype"] = "select";
                             if (!$this->colmodel[count($this->colmodel) - 1]["editoptions"]) {
                                 $this->colmodel[count($this->colmodel) - 1]["editoptions"] = array();
                                 $this->colfilters[$col->query_name] = array();
                                 $this->colmodel[count($this->colmodel) - 1]["editoptions"]["value"] = ":All";
                             }
                         }
                     }
                     $this->colnames[] = $coltitle;
                 }
                 if ($this->colmodel[$this->colmap[$col->query_name]]["stype"] == "select") {
                     if (!array_key_exists($qn->column_value, $this->colfilters[$col->query_name])) {
                         //$this->colmodel[$this->colmap[$col->query_name]]["editoptions"][$qn->column_value] = $qn->column_value;
                         $this->colfilters[$col->query_name][$qn->column_value] = "1";
                         $this->colmodel[$this->colmap[$col->query_name]]["editoptions"]["value"] .= ";" . $qn->column_value . ":" . $qn->column_value;
                     }
                 }
             }
         }
     }
     foreach ($this->query->display_order_set["column"] as $col) {
         $qn = get_query_column($col->query_name, $this->columns);
         $coltitle = $col->derive_attribute("column_title", $col->query_name);
         $coltitle = str_replace("_", " ", $coltitle);
         $coltitle = ucwords(strtolower($coltitle));
         $coltitle = sw_translate($coltitle);
         if ($col->query_name == $this->key_column) {
             $this->results[count($this->results) - 1]["id"] = $qn->column_value;
         }
         $disp = $col->derive_attribute("column_display", "show");
         if ($disp == "hide") {
             continue;
         }
         if ($this->line_ct == 0) {
             $this->colmodel[] = array("name" => $col->query_name, "index" => $col->query_name, "editable" => derive_jquerygrid_col_params($this->report_name, $col->query_name, "editable", false), "edittype" => "text", "sorttype" => "int", "jsonmap" => $col->query_name, "width" => derive_jquerygrid_col_params($this->report_name, $col->query_name, "width", "80"));
             // Map colname to col
             $this->colmap[$col->query_name] = count($this->colmodel) - 1;
             if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "hidden", "")) {
                 $this->colmodel[count($this->colmodel) - 1]["hidden"] = $v;
             }
             if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "edittype", "")) {
                 $this->colmodel[count($this->colmodel) - 1]["edittype"] = $v;
             }
             if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "sorttype", "")) {
                 $this->colmodel[count($this->colmodel) - 1]["sorttype"] = $v;
             }
             if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "filtertype", "")) {
                 if ($v == "select") {
                     $this->colmodel[count($this->colmodel) - 1]["stype"] = "select";
                     if (!$this->colmodel[count($this->colmodel) - 1]["editoptions"]) {
                         $this->colmodel[count($this->colmodel) - 1]["editoptions"] = array();
                         $this->colfilters[$col->query_name] = array();
                         $this->colmodel[count($this->colmodel) - 1]["editoptions"]["value"] = ":All";
                     }
                 }
             }
             if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "editoptions", "")) {
                 $this->colmodel[count($this->colmodel) - 1]["editoptions"] = $v;
             }
             $this->colnames[] = $coltitle;
         }
         // Add value to filter options if type is select
         if ($this->colmodel[$this->colmap[$col->query_name]]["stype"] == "select") {
             if (!array_key_exists($qn->column_value, $this->colfilters[$col->query_name])) {
//.........这里部分代码省略.........
开发者ID:GLUD,项目名称:EcoHack,代码行数:101,代码来源:reportico_report_jquerygrid.php


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