本文整理汇总了PHP中tl函数的典型用法代码示例。如果您正苦于以下问题:PHP tl函数的具体用法?PHP tl怎么用?PHP tl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initialize
public function _initialize()
{
// 模板全局变量
$aConfVars = array('TITLE', 'SITE_TITLE', 'SITE_COMPANY', 'VAR_REDIRECT');
$aTplVars = array();
foreach ($aConfVars as $v) {
$aTplVars[strtolower($v)] = tl(C($v));
}
$this->assign('G_VAR', $aTplVars);
// 登录认证判断
$oAminAuth = $this->auth = new t\AdminAuth();
if ($oAminAuth->isLogin()) {
$this->_account = $oAminAuth->getUser();
$this->assign('ACCOUNT', $this->_account);
if (!strcasecmp(CONTROLLER_NAME, 'Index')) {
} elseif (!strcasecmp(CONTROLLER_NAME, 'Public')) {
} else {
if (!$this->check_access($this->_account['role_id'])) {
$this->error("您没有访问权限!", null, -1);
//不需要跳转
exit;
}
}
} else {
if (strcasecmp(CONTROLLER_NAME, 'Public')) {
$tipMsg = strcasecmp(ACTION_NAME, 'login') ? "操作需要登录才能进行" : '';
$oAminAuth->redirectLogin($tipMsg);
// 注意:代码永远运行到此处,调用redirect后,程序已经exit
}
}
}
示例2: renderView
/**
* Draws a simple message saying no cache available of
* the requested page
*
* @param array $data at this point this view does not make
* use of the $data info passed to it.
*/
function renderView($data)
{
?>
<h1><?php
e(tl('nocache_view_no_cache'));
?>
</h1>
<p>
<a href="<?php
e($data['URL']);
?>
"><?php
e($data['URL']);
?>
</a>.<br />
</p>
<?php
if (isset($data["SUMMARY_STRING"])) {
?>
<p><?php
e(tl('nocache_view_summary_contents'));
?>
</p>
<pre>
<?php
e($data["SUMMARY_STRING"]);
?>
</pre>
<?php
}
}
示例3: render
/**
* Method responsible for drawing links to common subsearches
*
* @param array $data makes use of the CSRF token for anti CSRF attacks
*/
function render($data)
{
if (!SUBSEARCH_LINK) {
return;
}
$logged_in = isset($data["ADMIN"]) && $data["ADMIN"];
if (!isset($data['SUBSEARCH'])) {
$data['SUBSEARCH'] = "";
}
$drop_threshold = 4;
if (MOBILE) {
$drop_threshold = 0;
}
?>
<div class="subsearch" >
<ul class="out-list">
<?php
$i = 0;
$found = false;
foreach ($data["SUBSEARCHES"] as $search) {
if ($i >= $drop_threshold && ($found || MOBILE)) {
$append_token = $logged_in ? "&" . CSRF_TOKEN . "=" . $data[CSRF_TOKEN] : "";
e("<li class='outer'><a " . " href='?a=more{$append_token}' ><b>" . tl('subsearch_element_more') . "</b></a>");
break;
}
$i++;
$source = "?s={$search["FOLDER_NAME"]}";
$delim = "&";
if ($search["FOLDER_NAME"] == "") {
$source = "./";
$delim = "?";
}
if ($search['FOLDER_NAME'] == $data['SUBSEARCH']) {
e("<li class='outer'><b>" . "{$search['SUBSEARCH_NAME']}</b></li>");
$found = true;
} else {
if ($i <= $drop_threshold) {
$query = "";
if (isset($data[CSRF_TOKEN]) && $logged_in) {
$query .= $delim . CSRF_TOKEN . "=" . $data[CSRF_TOKEN];
}
if (isset($data['QUERY']) && !isset($data['NO_QUERY'])) {
$query .= "{$delim}c=search" . "&q={$data['QUERY']}";
}
e("<li class='outer'><a href='{$source}{$query}'>" . "{$search['SUBSEARCH_NAME']}</a></li>");
}
}
}
if ($i > $drop_threshold + 1) {
e("</ul></div></li>");
}
?>
</ul>
</div>
<?php
}
示例4: __construct
/**
* The constructor reads in any Element and Helper subclasses which are
* needed to draw the view. It also reads in the Layout subclass on which
* the View will be drawn.
*
*/
function __construct()
{
$layout_name = ucfirst($this->layout) . "Layout";
if ($this->layout != "") {
if (file_exists(APP_DIR . "/views/layouts/" . $this->layout . "_layout.php")) {
require_once APP_DIR . "/views/layouts/" . $this->layout . "_layout.php";
} else {
require_once BASE_DIR . "/views/layouts/" . $this->layout . "_layout.php";
}
}
$this->logo_alt_text = tl('view_logo_alt_text');
$this->layout_object = new $layout_name($this);
}
示例5: render
/**
* Takes page summaries for image pages and the current query
* and draw a thumbnail strip so that clicking on an image goes to
* the cache of that image.
*
* @param array $image_pages page data and thumbnails for images
* @param string $query the current search query
* @param string $subsearch name of subsearch page this image group on
*/
function render($image_pages, $query, $subsearch)
{
if ($subsearch != 'images') {
?>
<h2><a href="<?php
e($query . '&s=images');
?>
"
><?php
e(tl('images_helper_view_image_results'));
?>
</a></h2>
<?php
}
?>
<div class="image-list">
<?php
$i = 0;
$break_frequency = 5;
foreach ($image_pages as $page) {
if (CACHE_LINK && (!isset($page[self::ROBOT_METAS]) || !(in_array("NOARCHIVE", $page[self::ROBOT_METAS]) || in_array("NONE", $page[self::ROBOT_METAS])))) {
$link = $query . "&a=cache&arg=" . urlencode($page[self::URL]) . "&its=" . $page[self::CRAWL_TIME];
} else {
$link = htmlentities($page[self::URL]);
}
?>
<a href="<?php
e($link);
?>
" rel="nofollow"
><img src="<?php
e($page[self::THUMB]);
?>
" alt="<?php
e($page[self::TITLE]);
?>
" /></a>
<?php
$i++;
if ($i % $break_frequency == 0) {
e('<br />');
}
}
?>
</div>
<?php
}
示例6: recursive_print_data
function recursive_print_data($data, $l)
{
if (!is_array($data)) {
echo tl($l) . htmlentities($data) . "\n";
} else {
$width_attr = $l > 0 ? "width='100%'" : "";
echo tl($l) . "<table border='1' " . $width_attr . ">\n";
foreach ($data as $key => $value) {
echo tl($l + 1) . "<tr>\n";
echo tl($l + 2) . "<td align='center'>\n";
echo tl($l + 3) . "<b>" . htmlentities($key) . "</b>\n";
echo tl($l + 2) . "</td>\n";
echo tl($l + 2) . "<td align='center'>\n";
recursive_print_data($value, $l + 3);
echo tl($l + 2) . "</td>\n";
echo tl($l + 1) . "</tr>\n";
}
echo tl($l) . "</table>\n";
}
}
示例7: parseLink
}
}
}
}
}
echo '<p>';
if (strlen($website) == 0) {
echo '<strong>' . $person . '</strong><br/>' . $role;
} else {
echo '<strong>' . $person . '</strong><br/><a href="http://' . parseLink($website) . '/">' . $role . '</a>';
}
echo '</p>';
}
echo ' </div>
<div class="uk-width-medium-1-2">
<h2 id="contact">' . tl('Contact') . '</h2>';
for ($i = 0; $i < count($contacts); $i++) {
$link = $mail = $name = "";
foreach ($contacts[$i]['contact']->children() as $child) {
if ($child->getName() == "name") {
$name = $child;
} else {
if ($child->getName() == "link") {
$link = $child;
} else {
if ($child->getName() == "mail") {
$mail = $child;
}
}
}
}
示例8: rawoutput
//echo "<font color='red'>$modulename is installed but not active.</font><br>";
$installcheck = true;
} else {
//echo "$modulename is uninstalled.<br>";
$uninstallcheck = true;
}
if (isset($moduleinfo['invalid']) && $moduleinfo['invalid'] == true) {
rawoutput("<td><input type='radio' name='modules[{$modulename}]' id='uninstall-{$modulename}' value='{$uninstallop}' checked disabled></td>");
rawoutput("<td><input type='radio' name='modules[{$modulename}]' id='install-{$modulename}' value='{$installop}' disabled></td>");
rawoutput("<td><input type='radio' name='modules[{$modulename}]' id='activate-{$modulename}' value='{$activateop}' disabled></td>");
} else {
rawoutput("<td><input type='radio' name='modules[{$modulename}]' id='uninstall-{$modulename}' value='{$uninstallop}'" . ($uninstallcheck ? " checked" : "") . "></td>");
rawoutput("<td><input type='radio' name='modules[{$modulename}]' id='install-{$modulename}' value='{$installop}'" . ($installcheck ? " checked" : "") . "></td>");
rawoutput("<td><input type='radio' name='modules[{$modulename}]' id='activate-{$modulename}' value='{$activateop}'" . ($activatecheck ? " checked" : "") . "></td>");
}
output_notl("<td>" . (in_array($modulename, $recommended_modules) ? tl("`^Yes`0") : tl("`\$No`0")) . "</td>", true);
require_once "lib/sanitize.php";
rawoutput("<td><span title=\"" . (isset($moduleinfo['description']) && $moduleinfo['description'] ? $moduleinfo['description'] : sanitize($moduleinfo['formalname'])) . "\">");
output_notl("`@");
if (isset($moduleinfo['invalid']) && $moduleinfo['invalid'] == true) {
rawoutput($moduleinfo['formalname']);
} else {
output($moduleinfo['formalname']);
}
output_notl(" [`%{$modulename}`@]`0");
rawoutput("</span></td><td>");
output_notl("`#{$moduleinfo['moduleauthor']}`0", true);
rawoutput("</td>");
rawoutput("</tr>");
}
}
示例9: render
/**
* Element used to render the login screen for the admin control panel
*
* @param array $data many data from the controller for the footer
* (so far none)
*/
function render($data)
{
$logged_in = isset($data['ADMIN']) && $data['ADMIN'];
if (isset($_SERVER["PATH_INFO"]) && $logged_in) {
$path_info = $_SERVER["PATH_INFO"];
} else {
$path_info = ".";
}
$tools = isset($data[CSRF_TOKEN]) && $logged_in ? "?a=more&" . CSRF_TOKEN . "=" . $data[CSRF_TOKEN] : "?a=more";
?>
<div>
- <a href="<?php
e($path_info);
?>
/blog.php"><?php
e(tl('footer_element_blog'));
?>
</a> -
<a href="<?php
e($path_info);
?>
/privacy.php"><?php
e(tl('footer_element_privacy'));
?>
</a> -
<a href="<?php
e($path_info);
?>
/terms.php"><?php
e(tl('footer_element_terms'));
?>
</a> -
<a href="<?php
e($path_info);
?>
/<?php
e($tools);
?>
"><?php
e(tl('footer_element_tools'));
?>
</a> -
<a href="<?php
e($path_info);
?>
/bot.php"><?php
e(tl('footer_element_bot'));
?>
</a> - <?php
if (MOBILE) {
e('<br /> - ');
}
?>
<a href="http://www.seekquarry.com/"><?php
e(tl('footer_element_developed_seek_quarry'));
?>
</a> -
</div>
<div>
<?php
e(tl('footer_element_copyright_yioop'));
?>
- <a href="http://www.yioop.com/"><?php
e(tl('footer_element_php_search_engine'));
?>
</a>
</div>
<?php
}
示例10: renderView
/**
* Draws the create account web page.
*
* @param array $data contains the anti CSRF token
* the view, data for captcha and recover dropdowns
*/
function renderView($data)
{
$logged_in = isset($data['ADMIN']) && $data['ADMIN'];
$append_url = $logged_in && isset($data[CSRF_TOKEN]) ? CSRF_TOKEN . "=" . $data[CSRF_TOKEN] : "";
$logo = LOGO;
if (MOBILE) {
$logo = M_LOGO;
}
$missing = array();
if (isset($data['MISSING'])) {
$missing = $data['MISSING'];
}
?>
<div class="landing non-search">
<div class="small-top">
<h1 class="logo"><a href="./?<?php
e($append_url);
?>
"><img
src="<?php
e($logo);
?>
" alt="<?php
e($this->logo_alt_text);
?>
" /></a><span> - <?php
e(tl('register_view_create_account'));
?>
</span></h1>
<?php
if ($data['AUTHENTICATION_MODE'] == ZKP_AUTHENTICATION) {
?>
<form method="post"
onsubmit="registration('pass-word', 'retype-password', <?php
?>
'fiat-shamir-modulus')">
<input type="hidden" name="fiat_shamir_modulus"
id="fiat-shamir-modulus"
value="<?php
e($data['FIAT_SHAMIR_MODULUS']);
?>
"/>
<?php
} else {
?>
<form method="post">
<?php
}
?>
<input type="hidden" name="c" value="register" />
<input type="hidden" name="a" value="processAccountData" />
<?php
if (isset($_SESSION["random_string"])) {
?>
<input type='hidden' name='nonce_for_string'
id='nonce_for_string' />
<input type='hidden' name='random_string' id='random_string'
value='<?php
e($_SESSION["random_string"]);
?>
' />
<input type='hidden' name='time' id='time'
value='<?php
e($_SESSION["request_time"]);
?>
' />
<input type='hidden' name='level' id='level'
value='<?php
e($_SESSION["level"]);
?>
' />
<?php
}
?>
<div class="register">
<table>
<tr>
<th class="table-label">
<label for="firstname"><?php
e(tl('register_view_firstname'));
?>
</label>
</th>
<td class="table-input">
<input id="firstname" type="text"
class="narrow-field" maxlength="<?php
e(NAME_LEN);
?>
"
name="first" autocomplete="off"
value = "<?php
e($data['FIRST']);
?>
"/>
//.........这里部分代码省略.........
示例11: render
/**
* Displays a list of admin activities
*
* @param array $data available activities and CSRF token
*/
function render($data)
{
?>
<?php
if (isset($data['ACTIVITIES'])) {
if (MOBILE) {
?>
<div class="frame activity-menu">
<h2><?php
e(tl('activity_element_activities'));
?>
</h2>
<?php
$count = count($data['ACTIVITIES']);
$activities = $data['ACTIVITIES'];
$out_activities = array();
$base_url = "?c=admin&" . CSRF_TOKEN . "=" . $data[CSRF_TOKEN] . "&a=";
$current = "";
foreach ($activities as $activity) {
$out_activities[$base_url . $activity['METHOD_NAME']] = $activity['ACTIVITY_NAME'];
if (strcmp($activity['ACTIVITY_NAME'], $data['CURRENT_ACTIVITY']) == 0) {
$current = $base_url . $activity['METHOD_NAME'];
}
}
$this->view->helper("options")->render("activity", "a", $out_activities, $current);
?>
<script type="text/javascript">
activity_select = document.getElementById('activity');
function activityChange() {
document.location = activity_select.value;
}
activity_select.onchange = activityChange;
</script>
</div>
<?php
} else {
?>
<div class="component-container">
<?php
foreach ($data['COMPONENT_ACTIVITIES'] as $component_name => $activities) {
$count = count($activities);
?>
<div class="frame activity-menu">
<h2><?php
e($component_name);
?>
</h2>
<ul>
<?php
for ($i = 0; $i < $count; $i++) {
if ($i < $count - 1) {
$class = "class='bottom-border'";
} else {
$class = "";
}
e("<li {$class}><a href='?c=admin&" . CSRF_TOKEN . "=" . $data[CSRF_TOKEN] . "&a=" . $activities[$i]['METHOD_NAME'] . "'>" . $activities[$i]['ACTIVITY_NAME'] . "</a></li>");
}
?>
</ul>
</div>
<?php
}
?>
</div>
<?php
}
}
}
示例12: render
/**
* Draws the forms used to configure the search engine.
*
* This element has two forms on it: One for setting the working directory
* for crawls, the other to set-up profile information which is mainly
* stored in the profile.php file in the working directory. The exception
* is longer data concerning the crawl robot description which is stored
* in bot.txt. Some elements on forms are not displayed if they are not
* relevant (for instance, there is no notion of a username for a sqlite
* database system, but there is for other DBMSs). Also, if the work
* directory is not properly configured then only the language portion of
* the profile form is displayed since there is no real place to store data
* from the latter form until a proper working directory is established.
*
* @param array $data holds data on the profile elements which have been
* filled in as well as data about which form fields to display
*/
function render($data)
{
$configure_url = '?c=admin&a=configure&' . CSRF_TOKEN . "=" . $data[CSRF_TOKEN];
?>
<div class="current-activity">
<form id="configureDirectoryForm" method="post"
action='<?php
e($configure_url);
?>
' >
<?php
if (isset($data['lang'])) {
?>
<input type="hidden" name="lang" value="<?php
e($data['lang']);
?>
" />
<?php
}
?>
<input type="hidden" name="arg" value="directory" />
<h2><label for="directory-path"><?php
e(tl('configure_element_work_directory'));
?>
</label></h2>
<div class="top-margin"><input type="text" id="directory-path"
name="WORK_DIRECTORY" class="extra-wide-field" value='<?php
e($data["WORK_DIRECTORY"]);
?>
' /><button
class="button-box"
type="submit"><?php
e(tl('configure_element_load_or_create'));
?>
</button>
</div>
</form>
<form id="configureProfileForm" method="post"
enctype='multipart/form-data'>
<?php
if (isset($data['WORK_DIRECTORY'])) {
?>
<input type="hidden" name="WORK_DIRECTORY" value="<?php
e($data['WORK_DIRECTORY']);
?>
" />
<?php
}
?>
<input type="hidden" name="c" value="admin" />
<input type="hidden" name="advanced" id='a-settings' value="<?php
e($data['advanced']);
?>
" />
<input type="hidden" name="<?php
e(CSRF_TOKEN);
?>
" value="<?php
e($data[CSRF_TOKEN]);
?>
" />
<input type="hidden" name="a" value="configure" />
<input type="hidden" name="arg" value="profile" />
<h2><?php
e(tl('configure_element_component_check'));
?>
</h2>
<div class="top-margin">
<?php
e($data['SYSTEM_CHECK']);
?>
</div>
<h2><?php
e(tl('configure_element_profile_settings'));
?>
</h2>
<?php
if ($data['PROFILE']) {
?>
<div class="top-margin">[<a href="javascript:toggleAdvance()"><?php
e(tl('configure_element_toggle_advanced'));
?>
</a>]</div>
//.........这里部分代码省略.........
示例13: render
/**
* Method that draw forms to set up the various external servers
* that might be connected with a Yioop installation
*
* @param array $data holds data on the profile elements which have been
* filled in as well as data about which form fields to display
*/
function render($data)
{
?>
<div class="current-activity">
<form id="serverSettingsForm" method="post">
<input type="hidden" name="c" value="admin" />
<input type="hidden" name="<?php
e(CSRF_TOKEN);
?>
" value="<?php
e($data[CSRF_TOKEN]);
?>
" />
<input type="hidden" name="a" value="serverSettings" />
<input type="hidden" name="arg" value="update" />
<h2><?php
e(tl('serversettings_element_server_settings'));
?>
</h2>
<div class="bold">
<div class="top-margin">
<fieldset><legend><?php
e(tl('serversettings_element_name_server'));
?>
</legend>
<div ><b><label for="queue-fetcher-salt"><?php
e(tl('serversettings_element_name_server_key'));
?>
</label></b>
<input type="text" id="queue-fetcher-salt" name="AUTH_KEY"
value="<?php
e($data['AUTH_KEY']);
?>
"
class="wide-field" />
</div>
<div class="top-margin"><b><label for="name-server-url"><?php
e(tl('serversettings_element_name_server_url'));
?>
</label></b>
<input type="text" id="name-server-url" name="NAME_SERVER"
value="<?php
e($data['NAME_SERVER']);
?>
"
class="extra-wide-field" />
</div>
<?php
if (class_exists("Memcache")) {
?>
<div class="top-margin"><label for="use-memcache"><b><?php
e(tl('serversettings_element_use_memcache'));
?>
</b></label>
<input type="checkbox" id="use-memcache"
name="USE_MEMCACHE" value="true" <?php
e($data['USE_MEMCACHE'] ? "checked='checked'" : "");
?>
/>
</div>
<div id="memcache">
<div class="top-margin"><label for="memcache-servers"
><b><?php
e(tl('serversettings_element_memcache_servers'));
?>
</b></label>
</div>
<textarea class="short-text-area" id="memcache-servers"
name="MEMCACHE_SERVERS"><?php
e($data['MEMCACHE_SERVERS']);
?>
</textarea>
</div>
<?php
}
?>
<div id="filecache">
<div class="top-margin"><label for="use-filecache"><b><?php
e(tl('serversettings_element_use_filecache'));
?>
</b></label>
<input type="checkbox" id="use-filecache"
name="USE_FILECACHE" value="true" <?php
e($data['USE_FILECACHE'] ? "checked='checked'" : "");
?>
/>
</div>
</div>
</fieldset>
</div>
<div class="top-margin">
<fieldset><legend><?php
e(tl('configure_element_database_setup'));
//.........这里部分代码省略.........
示例14: render
/**
* Renders search source and subsearch forms
*
* @param array $data available Search sources and subsearches
*/
function render($data)
{
$pre_base_url = "?" . CSRF_TOKEN . "=" . $data[CSRF_TOKEN] . "&c=admin";
$base_url = $pre_base_url . "&a=searchSources";
$localize_url = $pre_base_url . "&a=manageLocales" . "&arg=editstrings&selectlocale=" . $data['LOCALE_TAG'] . "&previous_activity=searchSources";
?>
<div class="current-activity">
<?php
if ($data["SOURCE_FORM_TYPE"] == "editsource") {
?>
<div class='float-opposite'><a href='<?php
e($base_url);
?>
'><?php
e(tl('searchsources_element_addsource_form'));
?>
</a></div>
<h2><?php
e(tl('searchsources_element_edit_media_source'));
?>
</h2>
<?php
} else {
?>
<h2><?php
e(tl('searchsources_element_add_media_source'));
?>
</h2>
<?php
}
?>
<form id="addSearchSourceForm" method="post">
<input type="hidden" name="c" value="admin" />
<input type="hidden" name="<?php
e(CSRF_TOKEN);
?>
" value="<?php
e($data[CSRF_TOKEN]);
?>
" />
<input type="hidden" name="a" value="searchSources" />
<input type="hidden" name="arg" value="<?php
e($data['SOURCE_FORM_TYPE']);
?>
" />
<?php
if ($data['SOURCE_FORM_TYPE'] == "editsource") {
?>
<input type="hidden" name="ts" value="<?php
e($data['ts']);
?>
" />
<?php
}
?>
<table class="name-table">
<tr><td><label for="source-type"><b><?php
e(tl('searchsources_element_sourcetype'));
?>
</b></label></td><td>
<?php
$this->view->helper("options")->render("source-type", "type", $data['SOURCE_TYPES'], $data['CURRENT_SOURCE']['type']);
?>
</td></tr>
<tr><td><label for="source-name"><b><?php
e(tl('searchsources_element_sourcename'));
?>
</b></label></td><td>
<input type="text" id="source-name" name="name"
value="<?php
e($data['CURRENT_SOURCE']['name']);
?>
"
maxlength="<?php
e(LONG_NAME_LEN);
?>
"
class="wide-field" /></td></tr>
<tr><td><label for="source-url"><b><?php
e(tl('searchsources_element_url'));
?>
</b></label></td><td>
<input type="text" id="source-url" name="source_url"
value="<?php
e($data['CURRENT_SOURCE']['source_url']);
?>
"
maxlength="<?php
e(MAX_URL_LEN);
?>
"
class="wide-field" /></td></tr>
<tr><td><label for="source-locale-tag"><b id="locale-text"><?php
e(tl('searchsources_element_locale_tag'));
?>
//.........这里部分代码省略.........
示例15: render
/**
* Draw the form for advanced search for any HTML table drawn based on
* using a model's getRow function
*
* @param array $data from the controller with info of what fields might
* already be filled.
* @param object $controller what controller is being used to handle logic
* @param string $activity what activity the controller was executing
* (for return link)
* @param object $view which view is responsible for calling this helper
* @param string $title what to display as the header of this form
* @param string $return_form_name string to use for return link to previous
* page
* @param array $fields a list of searchable fields
* @param array $dropdowns which fields should be rendered as dropdowns
* @param string $postfix string to tack on to form variables (might use
* to make var names unique on page)
*/
function render($data, $controller, $activity, $view, $title, $return_form_name, $fields, $dropdowns = array(), $postfix = "")
{
$base_url = "?c={$controller}&" . CSRF_TOKEN . "=" . $data[CSRF_TOKEN] . "&a={$activity}";
$old_base_url = $base_url;
$browse = false;
if (isset($data['browse'])) {
$base_url .= "&browse=" . $data['browse'];
$browse = true;
}
e("<div class='float-opposite'><a href='{$old_base_url}'>" . $return_form_name . "</a></div>");
e("<h2>{$title}" . " ");
e("</h2>");
$item_sep = MOBILE ? "<br />" : "</td><td>";
?>
<form id="search-form" method="post" autocomplete="off">
<input type="hidden" name="c" value="<?php
e($controller);
?>
" />
<input type="hidden" name="<?php
e(CSRF_TOKEN);
?>
" value="<?php
e($data[CSRF_TOKEN]);
?>
" />
<input type="hidden" name="a" value="<?php
e($activity);
?>
" />
<input type="hidden" name="arg" value="search" />
<?php
if ($browse) {
?>
<input type="hidden" name="browse" value="true" />
<?php
}
?>
<table class="name-table">
<?php
foreach ($fields as $label => $name) {
if (is_array($name)) {
$comparison_types = $name[1];
$name = $name[0];
} else {
$comparison_types = $data['COMPARISON_TYPES'];
}
e("<tr><td class='table-label'><label for='{$name}-id'>" . "{$label}:</label>");
e($item_sep);
?>
<style type="text/css">
#<?php
e($name);
?>
-comparison {
width:100%;
}
</style>
<?php
$view->helper("options")->render("{$name}-comparison", "{$name}_comparison", $comparison_types, $data["{$name}_comparison"]);
e($item_sep);
$out_name = $name;
if ($postfix != "") {
$out_name = $name . "_{$postfix}";
}
if (isset($dropdowns[$name])) {
$dropdowns[$name] = array('-1' => tl('searchform_helper_any')) + $dropdowns[$name];
?>
<style type="text/css">
#<?php
e($name);
?>
-id {
width:100%;
}
</style>
<?php
if ($data["{$out_name}"] == "") {
$data["{$out_name}"] = '-1';
}
$view->helper("options")->render("{$name}-id", "{$out_name}", $dropdowns[$name], $data["{$out_name}"]);
} else {
//.........这里部分代码省略.........