本文整理汇总了PHP中r_函数的典型用法代码示例。如果您正苦于以下问题:PHP r_函数的具体用法?PHP r_怎么用?PHP r_使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了r_函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: output
public static function output($target, $event, $form)
{
$form_id = 'chronoform-' . $form->form['Form']['title'];
$return = "\$('" . $target . "').find('option').remove();";
if (!empty($event['ajax'])) {
$return .= "\r\n\t\t\t\$('" . $target . "').html('<img src=\"" . \GCore\Helpers\Assets::image('loading-small.gif') . "\" />');\r\n\t\t\t\$.ajax({\r\n\t\t\t\t'type' : 'GET',\r\n\t\t\t\t'url' : '" . r_('index.php?ext=chronoforms&chronoform=' . $form->form['Form']['title'] . '&event=' . $event['ajax'] . '&tvout=ajax') . "',\r\n\t\t\t\t'data' : \$('#" . $form_id . "').serialize(),\r\n\t\t\t\t'success' : function(res){\r\n\t\t\t\t\t\$('" . $target . "').html(res);\r\n\t\t\t\t},\r\n\t\t\t});";
}
return $return;
}
示例2: output
public static function output($target, $event, $form)
{
$form_id = 'chronoform-' . $form->form['Form']['title'];
$return = "\$('" . $target . "').find('option').remove();";
if (!empty($event['ajax'])) {
$return .= "\r\n\t\t\t\$.ajax({\r\n\t\t\t\t'type' : 'GET',\r\n\t\t\t\t'url' : '" . r_('index.php?ext=chronoforms&chronoform=' . $form->form['Form']['title'] . '&event=' . $event['ajax'] . '&tvout=ajax') . "',\r\n\t\t\t\t'data' : \$('#" . $form_id . "').serialize(),\r\n\t\t\t\t'success' : function(res){\r\n\t\t\t\t\t\$.each(\$.parseJSON(res), function(id, val){\r\n\t\t\t\t\t\t\$('" . $target . "').append('<option value=\"'+id+'\">'+val+'</option>');\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\t\t\t});";
}
return $return;
}
示例3: output
public static function output($target, $event, $form)
{
$form_id = 'chronoform-' . $form->form['Form']['title'];
$return = "";
if (!empty($event['ajax'])) {
$return .= "\r\n\t\t\t\$.ajax({\r\n\t\t\t\t'type' : 'GET',\r\n\t\t\t\t'url' : '" . r_('index.php?ext=chronoforms&chronoform=' . $form->form['Form']['title'] . '&event=' . $event['ajax'] . '&tvout=ajax') . "',\r\n\t\t\t\t'data' : \$('#" . $form_id . "').serialize(),\r\n\t\t\t\t'success' : function(res){\r\n\t\t\t\t\t\$('" . $target . "').val(res);\r\n\t\t\t\t},\r\n\t\t\t});";
}
return $return;
}
示例4: execute
function execute(&$form, $action_id)
{
$config = $form->actions_config[$action_id];
$config = new \GCore\Libs\Parameter($config);
if ((bool) $config->get('refresh_button', 0) === true) {
$form->form['Form']['content'] = str_replace('{captcha_img}', '<img src="' . r_(\GCore\C::get('GCORE_ROOT_URL') . 'index.php?ext=chronoforms&act=render&action=load_captcha&chronoform=' . $form->form['Form']['title'] . '&action_id=' . $action_id . '&tvout=ajax&rand=' . mt_rand()) . '" alt="captcha" id="gcaptcha_' . $action_id . '" /><img src="' . \GCore\C::get('GCORE_FRONT_URL') . 'admin/extensions/chronoforms/actions/load_captcha/refresh.png" border="0" style="padding:0px 0px 15px 10px;" alt="refresh" onclick="document.getElementById(\'gcaptcha_' . $action_id . '\').src = \'' . r_(\GCore\C::get('GCORE_ROOT_URL') . 'index.php?ext=chronoforms&act=render&tvout=ajax&action=load_captcha&action_id=' . $action_id . '&chronoform=') . $form->form['Form']['title'] . '\' + \'&\' + Math.random();" />', $form->form['Form']['content']);
} else {
$form->form['Form']['content'] = str_replace('{captcha_img}', '<img src="' . r_(\GCore\C::get('GCORE_ROOT_URL') . 'index.php?ext=chronoforms&act=render&action=load_captcha&chronoform=' . $form->form['Form']['title'] . '&action_id=' . $action_id . '&tvout=ajax&rand=' . mt_rand()) . '" alt="captcha" />', $form->form['Form']['content']);
}
}
示例5: execute
function execute(&$form, $action_id)
{
$config = !empty($form->actions_config[$action_id]) ? $form->actions_config[$action_id] : array();
$config = new \GCore\Libs\Parameter($config);
$doc = \GCore\Libs\Document::getInstance();
$ajax_url = $config->get('results_event', '') ? r_(\GCore\C::get('GCORE_ROOT_URL') . 'index.php?ext=chronoforms&chronoform=' . $form->form['Form']['title'] . '&event=' . $config->get('results_event', '') . '&tvout=ajax') : $config->get('results_url', '');
$doc->_('jquery');
//$doc->_('autocompleter');
//$doc->__('autocompleter', $config->get('field_selector', '.auto_complete'), array('path' => $ajax_url, 'length' => $config->get('length', 2), 'multiple' => $config->get('multiple', 0)));
$doc->_('select2');
$doc->addJsCode('
jQuery(document).ready(function($){
$("' . $config->get('field_selector', '') . '").select2(
{
minimumInputLength: ' . $config->get('length', 2) . ',
containerCss:{"min-width":"200px"},
width: "element",
multiple: ' . ($config->get('multiple', 0) ? 'true' : 'false') . ',
//tags: true,
tokenSeparators: [","," "],
ajax:{
url: "' . $ajax_url . '",
dataType: "json",
data: function (term, page){
return {
' . $config->get('field_name', 'tag') . ': term,
};
},
results: function (data, page){
return {results: data};
}
},
formatNoMatches: "' . $config->get('no_matches_msg', 'Error!!') . '",
formatSearching: "' . $config->get('searching_msg', 'Loading....') . '",
formatAjaxError: "' . $config->get('ajax_error_msg', 'Loading failed....') . '",
' . ($config->get('multiple', 0) ? '
initSelection: function(element, callback){
var data = [];
$(element.val().split(",")).each(function (){
data.push({id: this, text: this});
});
callback(data);
}
' : '
initSelection: function(element, callback){
var data = {"id": $(element).val(), "text": $(element).val()};
callback(data);
}
') . '
}
);
});');
}
示例6: index
function index()
{
//apply updates
$sql = file_get_contents(\GCore\C::ext_path('chronoforms', 'admin') . 'sql' . DS . 'install.chronoforms.sql');
$queries = \GCore\Libs\Database::getInstance()->split_sql($sql);
foreach ($queries as $query) {
\GCore\Libs\Database::getInstance()->exec(\GCore\Libs\Database::getInstance()->_prefixTable($query));
}
$session = \GCore\Libs\Base::getSession();
$session->setFlash('success', l_('CF_DB_TABLES_INSTALLED'));
$this->redirect(r_('index.php?ext=chronoforms'));
}
示例7: execute
function execute(&$form, $action_id)
{
$config = !empty($form->actions_config[$action_id]) ? $form->actions_config[$action_id] : array();
$config = new \GCore\Libs\Parameter($config);
$doc = \GCore\Libs\Document::getInstance();
$ajax_url = $config->get('results_event', '') ? r_(\GCore\C::get('GCORE_ROOT_URL') . 'index.php?ext=chronoforms&chronoform=' . $form->form['Form']['title'] . '&event=' . $config->get('results_event', '') . '&tvout=ajax') : $config->get('results_url', '');
if ((bool) $form->params->get('jquery', 1) === true) {
$doc->_('jquery');
}
$doc->_('autocompleter');
$doc->__('autocompleter', $config->get('field_selector', '.auto_complete'), array('path' => $ajax_url, 'length' => $config->get('length', 2), 'multiple' => $config->get('multiple', 0)));
}
示例8: link
public function link($text, $field, $params = array())
{
$drc = $field == $this->active_field ? $this->direction : 'asc';
$drc_new = strtolower($this->direction) == 'asc' ? 'desc' : 'asc';
$drc = strtolower($drc);
if ($field == $this->active_field) {
$href = r_(\GCore\Libs\Url::buildQuery($this->url, array('act' => $this->action, 'orderfld' => $field, 'orderdrc' => $drc_new)));
$data = self::build_link_params($text, $params, $drc, true);
} else {
$href = r_(\GCore\Libs\Url::buildQuery($this->url, array('act' => $this->action, 'orderfld' => $field, 'orderdrc' => $drc)));
$data = self::build_link_params($text, $params, $drc, false);
}
extract($data);
$full = \GCore\Helpers\Html::url($text, $href, $params);
return $full;
}
示例9: on_list
public function on_list($fld, $ttl, &$data_columns)
{
if ($fld == '_EDIT_') {
$data_columns[$fld]['a'] = r_('index.php?ext=chronoconnectivity&cont=lists&ccname=' . $this->connection['Connection']['title'] . '&act=edit');
if ($this->model->pkey) {
$data_columns[$fld]['a'] .= '&gcb={' . $this->model->alias . '.' . $this->model->pkey . '}';
}
$data_columns[$fld]['html'] = '<a href="' . $data_columns[$fld]['a'] . '">' . $ttl . '</a>';
}
if ($fld == '_DELETE_') {
$data_columns[$fld]['a'] = r_('index.php?ext=chronoconnectivity&cont=lists&ccname=' . $this->connection['Connection']['title'] . '&act=delete');
if ($this->model->pkey) {
$data_columns[$fld]['a'] .= '&gcb={' . $this->model->alias . '.' . $this->model->pkey . '}';
}
$data_columns[$fld]['html'] = '<a href="' . $data_columns[$fld]['a'] . '">' . $ttl . '</a>';
}
}
示例10: l_
<h3><?php
echo l_('Validate your ChronoForms install');
?>
</h3>
</div>
<div class="col-md-6 pull-right text-right">
<?php
echo $this->Toolbar->renderBar();
?>
</div>
</div>
<div class="row">
<div class="panel panel-default">
<div class="panel-body">
<form action="<?php
echo r_('index.php?ext=chronoforms&act=validateinstall');
?>
" method="post" name="admin_form" id="admin_form">
<?php
echo $this->Html->formStart();
?>
<?php
echo $this->Html->formSecStart();
?>
<?php
echo $this->Html->formLine('domain', array('type' => 'custom', 'label' => 'Domain', 'code' => $domain, 'sublabel' => 'The domain name, this domain MUST match the domain name used to generate the key on ChronoEngine.com'));
?>
<?php
echo $this->Html->formLine('domain_name', array('type' => 'hidden', 'value' => $domain));
?>
<?php
示例11: l_
<h3><?php
echo l_('CF_SETTINGS');
?>
</h3>
</div>
<div class="col-md-6 pull-right text-right">
<?php
echo $this->Toolbar->renderBar();
?>
</div>
</div>
<div class="row">
<div class="panel panel-default">
<div class="panel-body">
<form action="<?php
echo r_('index.php?ext=chronoforms&act=save_settings');
?>
" method="post" name="admin_form" id="admin_form">
<ul class="nav nav-tabs">
<li class="active"><a href="#emails" data-g-toggle="tab"><?php
echo l_('CF_EMAILS');
?>
</a></li>
<li><a href="#wizard" data-g-toggle="tab"><?php
echo l_('CF_WIZARD');
?>
</a></li>
</ul>
<div class="tab-content">
<div id="emails" class="tab-pane active">
<?php
示例12: config
public static function config($data = array())
{
$tables = \GCore\Libs\Database::getInstance()->getTablesList();
array_unshift($tables, '');
$tables = array_combine($tables, $tables);
$ndb_tables = array();
if (!empty($data['ndb_table_name'])) {
/*$ndb_tables = \GCore\Libs\Database::getInstance(array(
'type' => $data['ndb_driver'],
'host' => $data['ndb_host'],
'name' => $data['ndb_database'],
'user' => $data['ndb_user'],
'pass' => $data['ndb_password'],
'prefix' => $data['ndb_prefix']
))->getTablesList();
$ndb_tables = array_combine($ndb_tables, $ndb_tables);*/
$ndb_tables = array($data['ndb_table_name'] => $data['ndb_table_name']);
}
echo \GCore\Helpers\Html::formStart('action_config db_read_action_config', 'db_read_action_config_{N}');
?>
<script>
function db_read_ndb_load_tables(elem, SID){
jQuery('#db_read_ndb_table_name_'+SID).empty();
jQuery('#db_read_ndb_table_name_'+SID).append('<option value="">Loading....</option>');
jQuery.ajax({
"type" : "POST",
"url" : "<?php
echo r_('index.php?ext=chronoforms&act=action_task&action_name=db_read&action_fn=load_tables&tvout=ajax');
?>
",
"data" : jQuery("#external-"+SID+" :input").serialize(),
"success" : function(res){
try{
jQuery('#db_read_ndb_table_name_'+SID).empty();
jQuery.each(jQuery.parseJSON(res), function(id, val){
jQuery('#db_read_ndb_table_name_'+SID).append('<option value="'+id+'">'+val+'</option>');
});
}catch(error){
jQuery('#db_read_ndb_table_name_'+SID).empty();
jQuery('#db_read_ndb_table_name_'+SID).append('<option value="">Failed to connect!!</option>');
}
},
"error" : function(){
jQuery('#db_read_ndb_table_name_'+SID).empty();
jQuery('#db_read_ndb_table_name_'+SID).append('<option value="">Failed to connect!!</option>');
},
});
}
function addRelation(elem, SID){
var last = jQuery(elem).closest('.form-group').prev();
var count = parseInt(last.clone().wrap('<p>').parent().html().match(/\[relations\]\[[0-9]+\]/).pop().replace('[relations][', '').replace(']', '')) + 1;
jQuery(elem).closest('.form-group').before(last.clone().wrap('<p>').parent().html().replace(/\[relations\]\[[0-9]+\]/g, '[relations]['+count+']'));
}
function removeRelation(elem, button_id){
var last = jQuery(elem).closest('.form-group').prev();
var count = last.clone().wrap('<p>').parent().html().match(/\[relations\]\[[0-9]+\]/).pop().replace('[relations][', '').replace(']', '');
if(count != '0'){
last.remove();
}
}
</script>
<ul class="nav nav-tabs">
<li class="active"><a href="#basic-{N}" data-g-toggle="tab"><?php
echo l_('CF_BASIC');
?>
</a></li>
<li><a href="#relations-{N}" data-g-toggle="tab"><?php
echo l_('CF_RELATIONS');
?>
</a></li>
<li><a href="#external-{N}" data-g-toggle="tab"><?php
echo l_('CF_EXTERNAL_DB');
?>
</a></li>
</ul>
<div class="tab-content">
<div id="basic-{N}" class="tab-pane active">
<?php
echo \GCore\Helpers\Html::formSecStart();
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][action_label]', array('type' => 'text', 'label' => l_('CF_ACTION_LABEL'), 'class' => 'XL', 'sublabel' => l_('CF_ACTION_LABEL_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][enabled]', array('type' => 'dropdown', 'label' => l_('CF_ENABLED'), 'options' => array(0 => l_('NO'), 1 => l_('YES'))));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][tablename]', array('type' => 'dropdown', 'label' => l_('CF_TABLENAME'), 'options' => $tables, 'sublabel' => l_('CF_DB_READ_TABLENAME_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][multi_read]', array('type' => 'dropdown', 'label' => l_('CF_DB_READ_MULTI'), 'options' => array(0 => l_('NO'), 1 => l_('YES')), 'sublabel' => l_('CF_DB_READ_MULTI_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][load_under_modelid]', array('type' => 'dropdown', 'label' => l_('CF_DB_READ_UNDER_MODELID'), 'options' => array(0 => l_('NO'), 1 => l_('YES')), 'sublabel' => l_('CF_DB_READ_UNDER_MODELID_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][model_id]', array('type' => 'text', 'label' => l_('CF_MODEL_ID'), 'sublabel' => l_('CF_DB_READ_MODEL_ID_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][fields]', array('type' => 'text', 'class' => 'L', 'label' => l_('CF_DB_READ_FIELDS'), 'sublabel' => l_('CF_DB_READ_FIELDS_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][order]', array('type' => 'text', 'class' => 'L', 'label' => l_('CF_DB_READ_ORDER'), 'sublabel' => l_('CF_DB_READ_ORDER_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][group]', array('type' => 'text', 'class' => 'L', 'label' => l_('CF_DB_READ_GROUP'), 'sublabel' => l_('CF_DB_READ_GROUP_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][conditions]', array('type' => 'textarea', 'rows' => 8, 'cols' => 70, 'label' => l_('CF_DB_READ_CONDITIONS'), 'sublabel' => l_('CF_DB_READ_CONDITIONS_DESC')));
echo \GCore\Helpers\Html::formSecEnd();
?>
</div>
<div id="relations-{N}" class="tab-pane">
<?php
echo \GCore\Helpers\Html::formSecStart();
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][{N}][enable_relations]', array('type' => 'dropdown', 'label' => l_('CF_DB_READ_ENABLE_RELATIONS'), 'options' => array(0 => l_('NO'), 1 => l_('YES')), 'sublabel' => l_('CF_DB_READ_ENABLE_RELATIONS_DESC')));
if (empty($data['relations'])) {
$data['relations'] = array(array());
}
//.........这里部分代码省略.........
示例13: preg_match_all
/*
$pattern = '/<form([^>]*?)([^>]*?)>/is';
preg_match_all($pattern, $output, $matches);
if(!empty($matches[0][0])){
$form_tag = $matches[0][0];
$form_tag = preg_replace('/ action=("|\')(.*?)("|\')/i', ' action="'.r_('index.php?ext=chronoconnectivity&cont=lists&ccname='.$connection['Connection']['title']).'"', $form_tag);
$form_tag = preg_replace('/ name=("|\')(.*?)("|\')/i', ' name="admin_form"', $form_tag);
$form_tag = preg_replace('/ id=("|\')(.*?)("|\')/i', ' id="admin_form"', $form_tag);
}
$output = str_replace($matches[0][0], $form_tag, $output);
*/
echo $output;
} else {
$code = $connection['Connection']['extras'][$area]['actions'][$act_name]['code'];
ob_start();
eval('?>' . $code);
$code = ob_get_clean();
$code = $this->Lister->prepare($connection, $code);
$code = $this->Lister->translate($connection, $code);
$code = \GCore\Libs\Str::replacer($code, $this->data);
?>
<form action="<?php
echo r_('index.php?ext=chronoconnectivity&cont=lists&ccname=' . $connection['Connection']['title']);
?>
" method="post" name="admin_form" id="admin_form">
<?php
echo $code;
?>
</form>
<?php
}
示例14: config
public static function config($data = array())
{
$tables = \GCore\Libs\Database::getInstance()->getTablesList();
array_unshift($tables, '');
$tables = array_combine($tables, $tables);
$ndb_tables = array();
if (!empty($data['ndb_table_name'])) {
/*$ndb_tables = \GCore\Libs\Database::getInstance(array(
'type' => $data['ndb_driver'],
'host' => $data['ndb_host'],
'name' => $data['ndb_database'],
'user' => $data['ndb_user'],
'pass' => $data['ndb_password'],
'prefix' => $data['ndb_prefix']
))->getTablesList();
$ndb_tables = array_combine($ndb_tables, $ndb_tables);*/
$ndb_tables = array($data['ndb_table_name'] => $data['ndb_table_name']);
}
echo \GCore\Helpers\Html::formStart('action_config db_save_action_config', 'db_save_action_config__XNX_');
?>
<script>
function db_save_ndb_load_tables(elem, SID){
jQuery('#db_save_ndb_table_name_'+SID).empty();
jQuery('#db_save_ndb_table_name_'+SID).append('<option value="">Loading....</option>');
jQuery.ajax({
"type" : "POST",
"url" : "<?php
echo r_('index.php?ext=chronoforms&act=action_task&action_name=db_save&action_fn=load_tables&tvout=ajax');
?>
",
"data" : jQuery("#external-"+SID+" :input").serialize(),
"success" : function(res){
try{
jQuery('#db_save_ndb_table_name_'+SID).empty();
jQuery.each(jQuery.parseJSON(res), function(id, val){
jQuery('#db_save_ndb_table_name_'+SID).append('<option value="'+id+'">'+val+'</option>');
});
}catch(error){
jQuery('#db_save_ndb_table_name_'+SID).empty();
jQuery('#db_save_ndb_table_name_'+SID).append('<option value="">Failed to connect!!</option>');
}
},
"error" : function(){
jQuery('#db_save_ndb_table_name_'+SID).empty();
jQuery('#db_save_ndb_table_name_'+SID).append('<option value="">Failed to connect!!</option>');
},
});
}
</script>
<ul class="nav nav-tabs">
<li class="active"><a href="#basic-_XNX_" data-g-toggle="tab"><?php
echo l_('CF_BASIC');
?>
</a></li>
<li><a href="#external-_XNX_" data-g-toggle="tab"><?php
echo l_('CF_EXTERNAL_DB');
?>
</a></li>
</ul>
<div class="tab-content">
<div id="basic-_XNX_" class="tab-pane active">
<?php
echo \GCore\Helpers\Html::formSecStart();
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][action_label]', array('type' => 'text', 'label' => l_('CF_ACTION_LABEL'), 'class' => 'XL', 'sublabel' => l_('CF_ACTION_LABEL_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][enabled]', array('type' => 'dropdown', 'label' => l_('CF_ENABLED'), 'options' => array(0 => l_('NO'), 1 => l_('YES'))));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][tablename]', array('type' => 'dropdown', 'label' => l_('CF_TABLENAME'), 'options' => $tables, 'sublabel' => l_('CF_TABLENAME_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][save_under_modelid]', array('type' => 'dropdown', 'label' => l_('CF_SAVE_UNDER_MODELID'), 'options' => array(0 => l_('NO'), 1 => l_('YES')), 'sublabel' => l_('CF_SAVE_UNDER_MODELID_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][multi_save]', array('type' => 'dropdown', 'label' => l_('CF_MULTI_SAVE'), 'options' => array(0 => l_('NO'), 1 => l_('YES')), 'sublabel' => l_('CF_MULTI_SAVE_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][model_id]', array('type' => 'text', 'label' => l_('CF_MODEL_ID'), 'sublabel' => l_('CF_MODEL_ID_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][force_save]', array('type' => 'dropdown', 'label' => l_('CF_FORCE_SAVE'), 'options' => array(0 => l_('NO'), 1 => l_('YES')), 'sublabel' => l_('CF_FORCE_SAVE_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][conditions]', array('type' => 'textarea', 'rows' => 5, 'cols' => 70, 'label' => l_('CF_DB_SAVE_CONDITIONS'), 'sublabel' => l_('CF_DB_SAVE_CONDITIONS_DESC')));
echo \GCore\Helpers\Html::formSecEnd();
?>
</div>
<div id="external-_XNX_" class="tab-pane">
<?php
echo \GCore\Helpers\Html::formSecStart();
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][ndb_enable]', array('type' => 'dropdown', 'label' => l_('CF_DB_SAVE_EXTERNAL_ENABLED'), 'options' => array(0 => l_('NO'), 1 => l_('YES')), 'sublabel' => l_('CF_DB_SAVE_EXTERNAL_ENABLED_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][ndb_driver]', array('type' => 'text', 'label' => l_('CF_DB_SAVE_EXTERNAL_DB_DRIVER'), 'sublabel' => l_('CF_DB_SAVE_EXTERNAL_DB_DRIVER_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][ndb_host]', array('type' => 'text', 'label' => l_('CF_DB_SAVE_EXTERNAL_DB_HOST'), 'sublabel' => l_('CF_DB_SAVE_EXTERNAL_DB_HOST_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][ndb_database]', array('type' => 'text', 'label' => l_('CF_DB_SAVE_EXTERNAL_DB_NAME'), 'sublabel' => l_('CF_DB_SAVE_EXTERNAL_DB_NAME_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][ndb_user]', array('type' => 'text', 'label' => l_('CF_DB_SAVE_EXTERNAL_DB_USER'), 'sublabel' => l_('CF_DB_SAVE_EXTERNAL_DB_USER_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][ndb_password]', array('type' => 'text', 'label' => l_('CF_DB_SAVE_EXTERNAL_DB_PASSWORD'), 'sublabel' => l_('CF_DB_SAVE_EXTERNAL_DB_PASSWORD_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][ndb_prefix]', array('type' => 'text', 'label' => l_('CF_DB_SAVE_EXTERNAL_DB_PREFIX'), 'sublabel' => l_('CF_DB_SAVE_EXTERNAL_DB_PREFIX_DESC')));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][ndb_load_tables]', array('type' => 'button', 'value' => l_('CF_DB_SAVE_EXTERNAL_DB_LOAD_TABLES'), 'onclick' => 'db_save_ndb_load_tables(this, \'_XNX_\')', 'sublabel' => ''));
echo \GCore\Helpers\Html::formLine('Form[extras][actions_config][_XNX_][ndb_table_name]', array('type' => 'dropdown', 'label' => l_('CF_DB_SAVE_EXTERNAL_DB_TABLE'), 'id' => 'db_save_ndb_table_name__XNX_', 'options' => $ndb_tables, 'sublabel' => l_('CF_DB_SAVE_EXTERNAL_DB_TABLE_DESC')));
echo \GCore\Helpers\Html::formSecEnd();
?>
</div>
</div>
<?php
echo \GCore\Helpers\Html::formEnd();
}
示例15: _config_cells
public static function _config_cells($columns_info = array())
{
foreach ($columns_info as $c => $info) {
if (!empty($info['function'])) {
$function = !empty($info['function']) ? $info['function'] : '';
if (is_array($info['function'])) {
foreach ($info['function'] as $k => $fn) {
self::$columns_info[$c]['function'][$k] = $fn;
}
} else {
self::$columns_info[$c]['function'] = $function;
}
}
if (!empty($info['html'])) {
$html = !empty($info['html']) ? $info['html'] : '';
if (is_array($info['html'])) {
foreach ($info['html'] as $k => $htm) {
self::$columns_info[$c]['html'][$k] = $htm;
}
} else {
self::$columns_info[$c]['html'] = $html;
}
}
if (!empty($info['image'])) {
$image_params = !empty($info['image_params']) ? $info['image_params'] : array();
$src = !empty($info['image']) ? $info['image'] : '';
if (is_array($info['image'])) {
foreach ($info['image'] as $k => $img) {
self::$columns_info[$c]['image'][$k] = \GCore\Helpers\Html::image($img, $image_params);
}
} else {
self::$columns_info[$c]['image'] = \GCore\Helpers\Html::image($src, $image_params);
}
}
if (!empty($info['link'])) {
$path = !empty($info['link']) ? $info['link'] : '';
if (is_array($info['link'])) {
foreach ($info['link'] as $k => $link) {
self::$columns_info[$c]['link'][$k] = r_($link);
}
} else {
self::$columns_info[$c]['link'] = r_($path);
}
}
if (!empty($info['field'])) {
$field = !empty($info['field']) ? $info['field'] : '';
if (is_array($info['field'])) {
foreach ($info['field'] as $k => $fld) {
self::$columns_info[$c]['field'][$k] = $fld;
}
} else {
self::$columns_info[$c]['field'] = $field;
}
}
self::$columns_info[$c]['style'] = !empty($info['style']) ? $info['style'] : '';
self::$columns_info[$c]['class'] = !empty($info['class']) ? (array) $info['class'] : '';
}
}