本文整理汇总了PHP中template_xlate函数的典型用法代码示例。如果您正苦于以下问题:PHP template_xlate函数的具体用法?PHP template_xlate怎么用?PHP template_xlate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了template_xlate函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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") . '"> </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") . '"> </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") . '">' . ' ' . '</a></div>';
}
}
示例2: expand
function & expand()
{
$text = "";
$text .= template_xlate("Search")." ";
$text .= $this->derive_attribute("column_title", $this->query_name);
$text .= " :<br>";
$tag = "";
$tag .= '<input class="'.$this->lookup_query->getBootstrapStyle('textfield').'" type="text" name="expand_value"';
$tag .= ' size="30"';
if ( $this->submitted('EXPANDSEARCH_'.$this->query_name) )
$dosearch = true;
// Only use then expand value if Search was press
$expval="";
if ( $this->submitted('EXPANDSEARCH_'.$this->query_name) )
if ( array_key_exists("expand_value", $_REQUEST) )
$expval=$_REQUEST["expand_value"];
$tag .= ' value="'.$expval.'">';
$text .= $tag;
$text .= '<input class="btn btn-sm btn-default swPrpSubmit" type="submit" name="EXPANDSEARCH_'.$this->query_name.'" value="'.template_xlate("Search").'">';
$text .= "<br>";
$type = $this->criteria_type;
if ( $this->expand_display == "ANYCHAR" )
$type = $this->expand_display;
if ( $this->expand_display == "TEXTFIELD" )
$type = $this->expand_display;
$text .= '<DIV id="hello" style="visibility:hide">';
$text .= '</DIV>';
switch($type)
{
case "LIST":
$text .= $this->list_display(true);
break;
case "LOOKUP":
$this->execute_criteria_lookup(true);
$text .= $this->lookup_display(true);
break;
case "DATE":
$text .= $this->date_display(true);
break;
case "DATERANGE":
$text .= $this->daterange_display(true);
break;
case "ANYCHAR":
case "TEXTFIELD":
//ECHO $TAG;
$tag = "";
$tag .= '<input type="text" name="EXPANDED_'.$this->query_name.'"';
$tag .= ' size="'.($this->column_length).'"';
$tag .= ' maxlength="'.$this->column_length.'"';
$tag .= ' value="'.$this->column_value.'">';
$text .= $tag;
break;
default:
break;
}
$text .= '<br><input class="btn btn-sm btn-default swPrpSubmit" type="submit" name="EXPANDCLEAR_'.$this->query_name.'" value="Clear">';
$text .= '<input class="btn btn-sm btn-default swPrpSubmit" type="submit" name="EXPANDSELECTALL_'.$this->query_name.'" value="Select All">';
$text .= '<input class="btn btn-sm btn-default swPrpSubmit" type="submit" name="EXPANDOK_'.$this->query_name.'" value="OK">';
return $text;
}
示例3: or
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* File: menu.php
*
* This is the core Reportico Reporting Engine. The main
* reportico class is responsible for coordinating
* all the other functionality in reading, preparing and
* executing Reportico reports as well as all the screen
* handling.
*
* @link http://www.reportico.co.uk/
* @copyright 2010-2013 Peter Deed
* @author Peter Deed <info@reportico.org>
* @package Reportico
* @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @version : reportico.php,v 1.58 2013/04/24 22:03:22 peter Exp $
*/
$menu_title = template_xlate(SW_PROJECT_TITLE);
$menu = array(array("language" => "en_gb", "report" => "", "title" => "BLANKLINE"), array("language" => "en_gb", "report" => "createproject.xml", "title" => "Create A New Project"));
示例4: available_languages
function available_languages()
{
$langs = array();
global $g_language;
$lang_dir = find_best_location_in_include_path("language");
if (is_dir($lang_dir)) {
// Place english at the start
if ($dh = opendir($lang_dir)) {
while (($file = readdir($dh)) !== false) {
if ($file == "en_gb" || $file == "en_us") {
if (is_dir($lang_dir . "/" . $file)) {
$langs[] = array("label" => template_xlate($file), "value" => $file, "active" => $file == $g_language);
}
}
}
closedir($dh);
}
if ($dh = opendir($lang_dir)) {
while (($file = readdir($dh)) !== false) {
if ($file != "." && $file != ".." && $file != "CVS" && $file != "packs" && $file != "en_us" && $file != "en_gb") {
if (is_dir($lang_dir . "/" . $file)) {
$langs[] = array("label" => template_xlate($file), "value" => $file, "active" => $file == $g_language);
}
}
}
closedir($dh);
}
}
// No languages found at all - default to en_gb
if (count($langs) == 0) {
$langs[] = array("label" => template_xlate("en_gb"), "value" => "en_gb");
}
return $langs;
}
示例5: write_file
function write_file($filename)
{
global $g_project;
if (!$filename) {
trigger_error(template_xlate("UNABLE_TO_SAVE") . template_xlate("SPECIFYXML"), E_USER_ERROR);
return false;
}
if (!preg_match("/\\.xml\$/", $filename)) {
$filename = $filename . ".xml";
}
$projdir = $this->query->projects_folder . "/" . $g_project;
if (!is_file($projdir)) {
find_file_to_include($projdir, $projdir);
}
if ($projdir && is_dir($projdir)) {
$fn = $projdir . "/" . $filename;
if (!($fd = fopen($fn, "w"))) {
return false;
}
} else {
trigger_error("Unable to open project area {$g_project} to save file {$filename} " . $this->query->reports_path . "/" . $filename . " Not Found", E_USER_ERROR);
}
if (!fwrite($fd, '<?xml version="' . $this->xml_version . '"?>')) {
return false;
}
$xmltext = $this->xmldata->unserialize();
if (!fwrite($fd, $xmltext)) {
return false;
}
fclose($fd);
}