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


PHP rex_view::success方法代码示例

本文整理汇总了PHP中rex_view::success方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_view::success方法的具体用法?PHP rex_view::success怎么用?PHP rex_view::success使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rex_view的用法示例。


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

示例1: rex_request

<?php

/**
 * YREWRITE Addon.
 *
 * @author jan.kristinus@yakamara.de
 *
 * @package redaxo\yrewrite
 *
 * @var rex_addon $this
 */
$func = rex_request('func', 'string');
if ($func != '') {
    if ($func == 'htaccess') {
        rex_yrewrite::copyHtaccess();
        echo rex_view::success($this->i18n('htaccess_hasbeenset'));
    }
}
$content = '

            <h3>' . $this->i18n('htaccess_set') . '</h3>
            <p>' . rex_i18n::rawMsg('yrewrite_htaccess_info') . '</p>
            <p><a class="btn btn-primary" href="' . rex_url::currentBackendPage(['func' => 'htaccess']) . '">' . $this->i18n('yrewrite_htaccess_set') . '</a></p>

            <h3>' . $this->i18n('info_headline') . '</h3>
            <p>' . rex_i18n::rawMsg('yrewrite_info_text') . '</p>

            <h3>' . $this->i18n('info_seo') . '</h3>
            <p>' . rex_i18n::rawMsg('yrewrite_info_seo_text') . '

            <br /><br />' . highlight_string('<?php
开发者ID:VIEWSION,项目名称:redaxo_yrewrite,代码行数:31,代码来源:setup.php

示例2:

<?php

if (rex_request('func', 'string') == 'clearall') {
    rex_article_slice_history::clearAllHistory();
    echo rex_view::success($this->i18n('deleted'));
}
$content = rex_i18n::rawMsg('structure_history_info_content');
$content .= '<p><a href="' . rex_url::currentBackendPage(['func' => 'clearall']) . '" class="btn btn-setup">' . $this->i18n('button_delete_history') . '</a></p>';
$fragment = new rex_fragment();
$fragment->setVar('title', $this->i18n('title_info'));
$fragment->setVar('body', $content, false);
echo $fragment->parse('core/page/section.php');
$fragment = new rex_fragment();
$fragment->setVar('title', $this->i18n('todos'));
$fragment->setVar('body', rex_i18n::rawMsg('structure_history_todos_content', true), false);
echo $fragment->parse('core/page/section.php');
开发者ID:DECAF,项目名称:redaxo,代码行数:16,代码来源:system.history.php

示例3: rex_exception

$content = '';
//------------------------------> Parameter
if (empty($prefix)) {
    throw new rex_exception('Fehler: Prefix nicht definiert!');
}
if (empty($metaTable)) {
    throw new rex_exception('Fehler: metaTable nicht definiert!');
}
$Basedir = __DIR__;
$field_id = rex_request('field_id', 'int');
//------------------------------> Feld loeschen
if ($func == 'delete') {
    $field_id = rex_request('field_id', 'int', 0);
    if ($field_id != 0) {
        if (rex_metainfo_delete_field($field_id)) {
            echo rex_view::success(rex_i18n::msg('minfo_field_successfull_deleted'));
        } else {
            echo rex_view::error(rex_i18n::msg('minfo_field_error_deleted'));
        }
    }
    $func = '';
}
//------------------------------> Eintragsliste
if ($func == '') {
    $title = rex_i18n::msg('minfo_field_list_caption');
    // replace LIKE wildcards
    $likePrefix = str_replace(['_', '%'], ['\\_', '\\%'], $prefix);
    $list = rex_list::factory('SELECT id, name FROM ' . rex::getTablePrefix() . 'metainfo_field WHERE `name` LIKE "' . $likePrefix . '%" ORDER BY priority');
    $list->addTableAttribute('class', 'table-striped');
    $tdIcon = '<i class="rex-icon rex-icon-metainfo"></i>';
    $thIcon = '<a href="' . $list->getUrl(['func' => 'add']) . '"><i class="rex-icon rex-icon-add-metainfo"></i></a>';
开发者ID:alsahh,项目名称:redaxo,代码行数:31,代码来源:field.php

示例4:

                $fragment->setVar('buttons', $buttons, false);
                $content .= $fragment->parse('core/page/section.php');
            }
        }
        $content = '
            <form action="' . rex_url::currentBackendPage() . '" method="post">
            ' . $content . '
            </form>';
        echo $message;
        echo $content;
        $OUT = false;
    }
}
if ($OUT) {
    if ($success != '') {
        $message .= rex_view::success($success);
    }
    if ($error != '') {
        $message .= rex_view::error($error);
    }
    $list = rex_list::factory('SELECT id, name FROM ' . rex::getTablePrefix() . 'module ORDER BY name');
    $list->addTableAttribute('class', 'table-striped table-hover');
    $tdIcon = '<i class="rex-icon rex-icon-module"></i>';
    $thIcon = '<a href="' . $list->getUrl(['function' => 'add']) . '"' . rex::getAccesskey(rex_i18n::msg('create_module'), 'add') . ' title="' . rex_i18n::msg('create_module') . '"><i class="rex-icon rex-icon-add-module"></i></a>';
    $list->addColumn($thIcon, $tdIcon, 0, ['<th class="rex-table-icon">###VALUE###</th>', '<td class="rex-table-icon">###VALUE###</td>']);
    $list->setColumnParams($thIcon, ['function' => 'edit', 'module_id' => '###id###']);
    $list->setColumnLabel('id', rex_i18n::msg('id'));
    $list->setColumnLayout('id', ['<th class="rex-table-id">###VALUE###</th>', '<td class="rex-table-id" data-title="' . rex_i18n::msg('id') . '">###VALUE###</td>']);
    $list->setColumnLabel('name', rex_i18n::msg('module_description'));
    $list->setColumnParams('name', ['function' => 'edit', 'module_id' => '###id###']);
    $list->addColumn(rex_i18n::msg('module_functions'), '<i class="rex-icon rex-icon-edit"></i> ' . rex_i18n::msg('edit'));
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:modules.modules.php

示例5:

            if ($return['state']) {
                $info = $return['message'];
            } else {
                $error = $return['message'];
            }
            // temp datei löschen
            if ($impname == '') {
                rex_file::delete($file_temp);
            }
        } else {
            $error = rex_i18n::msg('backup_file_could_not_be_uploaded') . ' ' . rex_i18n::msg('backup_you_have_no_write_permission_in', 'data/addons/backup/') . ' <br>';
        }
    }
}
if ($success != '') {
    echo rex_view::success($success);
}
if ($error != '') {
    echo rex_view::error($error);
}
$fragment = new rex_fragment();
$fragment->setVar('class', 'info');
$fragment->setVar('title', rex_i18n::msg('backup_note'), false);
$fragment->setVar('body', '<p>' . rex_i18n::msg('backup_intro_import') . '</p>', false);
echo $fragment->parse('core/page/section.php');
$content = '<table class="table table-striped table-hover">
                <thead>
                    <tr>
                        <th class="rex-table-icon"></th>
                        <th>' . rex_i18n::msg('backup_filename') . '</th>
                        <th class="rex-table-width-5">' . rex_i18n::msg('backup_filesize') . '</th>
开发者ID:alsahh,项目名称:redaxo,代码行数:31,代码来源:import.server.php

示例6: rex_mediapool_Mediaform

/**
 * Ausgabe des Medienpool Formulars.
 */
function rex_mediapool_Mediaform($form_title, $button_title, $rex_file_category, $file_chooser, $close_form)
{
    global $ftitle, $warning, $info;
    $s = '';
    $cats_sel = new rex_media_category_select();
    $cats_sel->setStyle('class="form-control"');
    $cats_sel->setSize(1);
    $cats_sel->setName('rex_file_category');
    $cats_sel->setId('rex-mediapool-category');
    $cats_sel->addOption(rex_i18n::msg('pool_kats_no'), '0');
    $cats_sel->setAttribute('onchange', 'this.form.submit()');
    $cats_sel->setSelected($rex_file_category);
    if (isset($warning)) {
        if (is_array($warning)) {
            if (count($warning) > 0) {
                $s .= rex_view::error(implode('<br />', $warning));
            }
        } elseif ($warning != '') {
            $s .= rex_view::error($warning);
        }
        $warning = '';
    }
    if (isset($info)) {
        if (is_array($info)) {
            if (count($info) > 0) {
                $s .= rex_view::success(implode('<br />', $info));
            }
        } elseif ($info != '') {
            $s .= rex_view::success($info);
        }
        $info = '';
    }
    if (!isset($ftitle)) {
        $ftitle = '';
    }
    $arg_fields = '';
    foreach (rex_request('args', 'array') as $arg_name => $arg_value) {
        $arg_fields .= '<input type="hidden" name="args[' . $arg_name . ']" value="' . $arg_value . '" />' . "\n";
    }
    $opener_input_field = rex_request('opener_input_field', 'string');
    if ($opener_input_field != '') {
        $arg_fields .= '<input type="hidden" name="opener_input_field" value="' . htmlspecialchars($opener_input_field) . '" />' . "\n";
    }
    $add_submit = '';
    if ($close_form && $opener_input_field != '') {
        $add_submit = '<button class="btn btn-save" type="submit" name="saveandexit" value="' . rex_i18n::msg('pool_file_upload_get') . '"' . rex::getAccesskey(rex_i18n::msg('pool_file_upload_get'), 'save') . '>' . rex_i18n::msg('pool_file_upload_get') . '</button>';
    }
    $panel = '';
    $formElements = [];
    $e = [];
    $e['label'] = '<label for="rex-mediapool-title">' . rex_i18n::msg('pool_file_title') . '</label>';
    $e['field'] = '<input class="form-control" type="text" id="rex-mediapool-title" name="ftitle" value="' . htmlspecialchars($ftitle) . '" />';
    $formElements[] = $e;
    $e = [];
    $e['label'] = '<label for="rex-mediapool-category">' . rex_i18n::msg('pool_file_category') . '</label>';
    $e['field'] = $cats_sel->get();
    $formElements[] = $e;
    $fragment = new rex_fragment();
    $fragment->setVar('elements', $formElements, false);
    $panel .= $fragment->parse('core/form/form.php');
    $panel .= rex_extension::registerPoint(new rex_extension_point('MEDIA_FORM_ADD', ''));
    if ($file_chooser) {
        $e = [];
        $e['label'] = '<label for="rex-mediapool-choose-file">' . rex_i18n::msg('pool_file_file') . '</label>';
        $e['field'] = '<input id="rex-mediapool-choose-file" type="file" name="file_new" />';
        $e['note'] = '<h3>' . rex_i18n::msg('phpini_settings') . '</h3>
                        <dl class="dl-horizontal">
                        ' . (rex_ini_get('file_uploads') == 0 ? '<dt><span class="text-warning">' . rex_i18n::msg('pool_upload') . '</span></dt><dd><span class="text-warning">' . rex_i18n::msg('pool_upload_disabled') . '</span></dd>' : '') . '
                            <dt>' . rex_i18n::msg('pool_max_uploadsize') . ':</dt><dd>' . rex_formatter::bytes(rex_ini_get('upload_max_filesize')) . '</dd>
                            <dt>' . rex_i18n::msg('pool_max_uploadtime') . ':</dt><dd>' . rex_ini_get('max_input_time') . 's</dd>
                        </dl>';
        $fragment = new rex_fragment();
        $fragment->setVar('elements', [$e], false);
        $panel .= $fragment->parse('core/form/form.php');
    }
    $formElements = [];
    $e = [];
    $e['field'] = '<button class="btn btn-save" type="submit" name="save" value="' . $button_title . '"' . rex::getAccesskey($button_title, 'save') . '>' . $button_title . '</button>';
    $formElements[] = $e;
    $e = [];
    $e['field'] = $add_submit;
    $formElements[] = $e;
    $fragment = new rex_fragment();
    $fragment->setVar('elements', $formElements, false);
    $buttons = $fragment->parse('core/form/submit.php');
    $fragment = new rex_fragment();
    $fragment->setVar('title', $form_title, false);
    $fragment->setVar('body', $panel, false);
    $fragment->setVar('buttons', $buttons, false);
    $content = $fragment->parse('core/page/section.php');
    $s .= ' <form action="' . rex_url::currentBackendPage() . '" method="post" enctype="multipart/form-data">
                <fieldset>
                    <input type="hidden" name="media_method" value="add_file" />
                    ' . $arg_fields . '
                    ' . $content . '
                </fieldset>
            ';
//.........这里部分代码省略.........
开发者ID:skerbis,项目名称:redaxo,代码行数:101,代码来源:function_rex_mediapool.php

示例7: rex_post

<?php

/** @var rex_addon $this */
$panel = '';
$settings = rex_post('settings', [['backups', 'bool', false], ['api_login', 'string'], ['api_key', 'string']], null);
if (is_array($settings)) {
    foreach ($settings as $key => $value) {
        $this->setConfig($key, $value);
    }
    echo rex_view::success($this->i18n('settings_saved'));
    rex_install_webservice::deleteCache();
}
$panel .= '
            <fieldset>
                <legend>' . $this->i18n('settings_general') . '</legend>';
$formElements = [];
$n = [];
$n['reverse'] = true;
$n['label'] = '<label>' . $this->i18n('settings_backups') . '</label>';
$n['field'] = '<input type="checkbox"  name="settings[backups]" value="1" ' . ($this->getConfig('backups') ? 'checked="checked" ' : '') . '/>';
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$panel .= $fragment->parse('core/form/checkbox.php');
$panel .= '
            </fieldset>
            <fieldset>
                <legend>' . $this->i18n('settings_myredaxo_account') . '</legend>';
$formElements = [];
$n = [];
$n['label'] = '<label for="install-settings-api-login">' . $this->i18n('settings_api_login') . '</label>';
开发者ID:skerbis,项目名称:redaxo,代码行数:31,代码来源:settings.php

示例8: htmlspecialchars

<?php

$content = '';
if (rex_post('savemeta', 'boolean')) {
    $content = rex_view::success(rex_i18n::msg('minfo_metadata_saved'));
}
$panel = '<fieldset>
            <input type="hidden" name="save" value="1" />
            <input type="hidden" name="ctype" value="' . $ctype . '" />
            ';
$metainfoHandler = new rex_metainfo_article_handler();
$form = $metainfoHandler->getForm(['id' => $article_id, 'clang' => $clang, 'article' => $article]);
$n = [];
$n['label'] = '<label for="rex-id-meta-article-name">' . rex_i18n::msg('header_article_name') . '</label>';
$n['field'] = '<input class="form-control" type="text" id="rex-id-meta-article-name" name="meta_article_name" value="' . htmlspecialchars(rex_article::get($article_id, $clang)->getValue('name')) . '" />';
$formElements = [$n];
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$panel .= $fragment->parse('core/form/form.php');
$panel .= $form . '</fieldset>';
$formElements = [];
$n = [];
$n['field'] = '<button class="btn btn-save rex-form-aligned" type="submit" name="savemeta"' . rex::getAccesskey(rex_i18n::msg('update_metadata'), 'save') . ' value="1">' . rex_i18n::msg('update_metadata') . '</button>';
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$buttons = $fragment->parse('core/form/submit.php');
$fragment = new rex_fragment();
$fragment->setVar('class', 'edit', false);
$fragment->setVar('title', rex_i18n::msg('general'), false);
$fragment->setVar('body', $panel, false);
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:content.metainfo.php

示例9:

     $contentMain = $fragment->parse('core/navigations/content.php');
     // ------------------------------------------ END: CONTENT HEAD MENUE
     // ------------------------------------------ WARNING
     if ($global_warning != '') {
         $contentMain .= rex_view::warning($global_warning);
     }
     if ($global_info != '') {
         $contentMain .= rex_view::success($global_info);
     }
     // --------------------------------------------- API MESSAGES
     $contentMain .= rex_api_function::getMessage();
     if ($warning != '') {
         $contentMain .= rex_view::warning($warning);
     }
     if ($info != '') {
         $contentMain .= rex_view::success($info);
     }
     // ----- EXTENSION POINT
     $contentMain .= rex_extension::registerPoint(new rex_extension_point('STRUCTURE_CONTENT_BEFORE_SLICES', '', ['article_id' => $article_id, 'clang' => $clang, 'function' => $function, 'slice_id' => $slice_id, 'page' => rex_be_controller::getCurrentPage(), 'ctype' => $ctype, 'category_id' => $category_id, 'article_revision' => &$article_revision, 'slice_revision' => &$slice_revision]));
     // ------------------------------------------ START: MODULE EDITIEREN/ADDEN ETC.
     $contentMain .= (include rex_be_controller::getCurrentPageObject()->getSubPath());
     // ------------------------------------------ END: AUSGABE
     // ----- EXTENSION POINT
     $contentMain .= rex_extension::registerPoint(new rex_extension_point('STRUCTURE_CONTENT_AFTER_SLICES', '', ['article_id' => $article_id, 'clang' => $clang, 'function' => $function, 'slice_id' => $slice_id, 'page' => rex_be_controller::getCurrentPage(), 'ctype' => $ctype, 'category_id' => $category_id, 'article_revision' => &$article_revision, 'slice_revision' => &$slice_revision]));
     // ----- EXTENSION POINT
     $contentSidebar = rex_extension::registerPoint(new rex_extension_point('STRUCTURE_CONTENT_SIDEBAR', '', ['article_id' => $article_id, 'clang' => $clang, 'function' => $function, 'slice_id' => $slice_id, 'page' => rex_be_controller::getCurrentPage(), 'ctype' => $ctype, 'category_id' => $category_id, 'article_revision' => &$article_revision, 'slice_revision' => &$slice_revision]));
     $fragment = new rex_fragment();
     $fragment->setVar('content', $contentMain, false);
     $fragment->setVar('sidebar', $contentSidebar, false);
     echo $fragment->parse('core/page/main_content.php');
 }
开发者ID:alsahh,项目名称:redaxo,代码行数:31,代码来源:content.php

示例10: foreach

$sel_encoding->setAttribute('class', 'form-control');
$sel_encoding->setSelected($this->getConfig('encoding'));
foreach (['7bit', '8bit', 'binary', 'base64', 'quoted-printable'] as $enc) {
    $sel_encoding->addOption($enc, $enc);
}
$sel_priority = new rex_select();
$sel_priority->setid('phpmailer-priority');
$sel_priority->setName('settings[priority]');
$sel_priority->setSize(1);
$sel_priority->setAttribute('class', 'form-control');
$sel_priority->setSelected($this->getConfig('priority'));
foreach ([1 => $this->i18n('high'), 3 => $this->i18n('normal'), 5 => $this->i18n('low')] as $no => $name) {
    $sel_priority->addOption($name, $no);
}
if ($message != '') {
    echo rex_view::success($message);
}
$content = '';
$content .= '<fieldset><legend>' . $this->i18n('email_options') . '</legend>';
$formElements = [];
$n = [];
$n['label'] = '<label for="phpmailer-fromname">' . $this->i18n('sender_name') . '</label>';
$n['field'] = '<input class="form-control" id="phpmailer-fromname" type="text" name="settings[fromname]" value="' . $this->getConfig('fromname') . '" />';
$formElements[] = $n;
$n = [];
$n['label'] = '<label for="phpmailer-from">' . $this->i18n('sender_email') . '</label>';
$n['field'] = '<input class="form-control" id="phpmailer-from" type="text" name="settings[from]" value="' . $this->getConfig('from') . '" />';
$formElements[] = $n;
$n = [];
$n['label'] = '<label for="phpmailer-confirmto">' . $this->i18n('confirm') . '</label>';
$n['field'] = '<input class="form-control" id="phpmailer-confirmto" type="text" name="settings[confirmto]" value="' . $this->getConfig('confirmto') . '" />';
开发者ID:skerbis,项目名称:redaxo,代码行数:31,代码来源:config.php

示例11: elseif

 } elseif (!isset($rex_version_article[$params['article_id']])) {
     $rex_version_article[$params['article_id']] = 1;
 }
 $func = rex_request('rex_version_func', 'string');
 switch ($func) {
     case 'copy_work_to_live':
         if ($working_version_empty) {
             $return .= rex_view::error(rex_i18n::msg('version_warning_working_version_to_live'));
         } elseif (rex::getUser()->hasPerm('version[live_version]')) {
             rex_article_revision::copyContent($params['article_id'], $params['clang'], rex_article_revision::WORK, rex_article_revision::LIVE);
             $return .= rex_view::success(rex_i18n::msg('version_info_working_version_to_live'));
         }
         break;
     case 'copy_live_to_work':
         rex_article_revision::copyContent($params['article_id'], $params['clang'], rex_article_revision::LIVE, rex_article_revision::WORK);
         $return .= rex_view::success(rex_i18n::msg('version_info_live_version_to_working'));
         break;
 }
 if (!rex::getUser()->hasPerm('version[live_version]')) {
     $rex_version_article[$params['article_id']] = 1;
     unset($revisions[0]);
 }
 rex::getProperty('login')->setSessionVar('rex_version_article', $rex_version_article);
 $context = new rex_context(['page' => $params['page'], 'article_id' => $params['article_id'], 'clang' => $params['clang'], 'ctype' => $params['ctype']]);
 $items = [];
 $brand = '';
 foreach ($revisions as $version => $revision) {
     $item = [];
     $item['title'] = $revision;
     $item['href'] = $context->getUrl(['rex_set_version' => $version]);
     if ($rex_version_article[$params['article_id']] == $version) {
开发者ID:eaCe,项目名称:redaxo,代码行数:31,代码来源:boot.php

示例12: function

        return !preg_match('/^[%_\\.+\\-\\/a-zA-Z0-9]+$/', $yrewrite_url);
    }, 'params' => [], 'message' => rex_i18n::msg('yrewrite_warning_chars')]);
    $yform->setValidateField('customfunction', ['name' => 'yrewrite_url', 'function' => function ($func, $yrewrite_url, $params, $field) {
        $return = ($a = rex_yrewrite::getArticleIdByUrl($params["domain"], $yrewrite_url)) && (key($a) != $params["article_id"] || current($a) != $params["clang"]);
        if ($return && $yrewrite_url != "") {
            $field->setElement("message", rex_i18n::msg('yrewrite_warning_urlexists', key($a)));
        } else {
            $return = false;
        }
        return $return;
    }, 'params' => ['article_id' => $article_id, "domain" => $domain, "clang" => $clang], 'message' => rex_i18n::msg('yrewrite_warning_urlexists')]);
    $yform->setActionField('db', [rex::getTable('article'), 'id=' . $article_id . ' and clang_id=' . $clang]);
    $yform->setObjectparams('submit_btn_label', $addon->i18n('update_url'));
    $form = $yform->getForm();
    if ($yform->objparams['actions_executed']) {
        $form = rex_view::success($addon->i18n('urlupdated')) . $form;
        rex_yrewrite::generatePathFile(['id' => $article_id, 'clang' => $clang, 'extension_point' => 'ART_UPDATED']);
        rex_article_cache::delete($article_id, $clang);
    } else {
    }
    echo '<section id="rex-page-sidebar-yrewrite-url" data-pjax-container="#rex-page-sidebar-yrewrite-url" data-pjax-no-history="1">' . $form . '</section>';
    $selector_preview = '#yform-yrewrite-url-yrewrite_url p.help-block';
    $selector_url = '#yform-yrewrite-url-yrewrite_url input';
    echo '

<script type="text/javascript">

jQuery(document).ready(function() {

    jQuery("' . $selector_url . '").keyup(function() {
        updateCustomUrlPreview();
开发者ID:VIEWSION,项目名称:redaxo_yrewrite,代码行数:31,代码来源:content.yrewrite_url.php

示例13: rex_fragment

                rex_yrewrite_forward::generatePathFile();
            } else {
                $showlist = false;
                $fragment = new rex_fragment();
                $fragment->setVar('class', 'edit', false);
                $fragment->setVar('title', $this->i18n('forward_edit'));
                $fragment->setVar('body', $form, false);
                echo $fragment->parse('core/page/section.php');
            }
        } else {
            if ($func == 'add') {
                $yform->setActionField('db', [rex::getTable('yrewrite_forward')]);
                $yform->setObjectparams('submit_btn_label', rex_i18n::msg('add'));
                $form = $yform->getForm();
                if ($yform->objparams['actions_executed']) {
                    echo rex_view::success($this->i18n('forward_added'));
                    rex_yrewrite_forward::generatePathFile();
                } else {
                    $showlist = false;
                    $fragment = new rex_fragment();
                    $fragment->setVar('class', 'edit', false);
                    $fragment->setVar('title', $this->i18n('forward_add'));
                    $fragment->setVar('body', $form, false);
                    echo $fragment->parse('core/page/section.php');
                }
            }
        }
    }
}
if ($showlist) {
    $sql = 'SELECT * FROM ' . rex::getTable('yrewrite_forward');
开发者ID:VIEWSION,项目名称:redaxo_yrewrite,代码行数:31,代码来源:forward.php

示例14: rex_request

<?php

/** @var rex_addon $this */
echo rex_view::title($this->i18n('title'));
$content = '';
$func = rex_request('func', 'string');
if ($func == 'update') {
    $this->setConfig(rex_post('config', [['autoload_css', 'bool'], ['autoload_js', 'bool'], ['articles', 'string'], ['templates', 'array[int]']]));
    echo rex_view::success($this->i18n('config_saved'));
}
/* assets */
$content .= '
    <fieldset>
        <legend>' . $this->i18n('config_assets') . '</legend>';
$formElements = [];
$n = [];
$n['label'] = '<label for="autoload_css">' . $this->i18n('config_assets_css') . '</label>';
$n['field'] = '<input type="checkbox" id="autoload_css" name="config[autoload_css]" value="1" ' . ($this->getConfig('autoload_css') ? ' checked="checked"' : '') . '>';
$formElements[] = $n;
$n = [];
$n['label'] = '<label for="autoload_js">' . $this->i18n('config_assets_js') . '</label>';
$n['field'] = '<input type="checkbox" id="autoload_js" name="config[autoload_js]" value="1" ' . ($this->getConfig('autoload_js') ? ' checked="checked"' : '') . '>';
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$assets = $fragment->parse('core/form/checkbox.php');
$formElements = [];
$n = [];
$n['label'] = $this->i18n('config_load_assets');
$n['field'] = $assets;
$n['note'] = rex_i18n::rawMsg('emailobfuscator_config_assets_note', rex_url::backendPage('packages', ['subpage' => 'help', 'package' => $this->getPackageId()]));
开发者ID:FriendsOfREDAXO,项目名称:rex_emailobfuscator,代码行数:31,代码来源:index.php

示例15: rex_fragment

            rex_yrewrite::deleteCache();
        } else {
            $showlist = false;
            $fragment = new rex_fragment();
            $fragment->setVar('class', 'edit', false);
            $fragment->setVar('title', $this->i18n('edit_domain'));
            $fragment->setVar('body', $form, false);
            echo $fragment->parse('core/page/section.php');
        }
    } else {
        if ($func == 'add') {
            $yform->setActionField('db', [rex::getTable('yrewrite_domain')]);
            $yform->setObjectparams('submit_btn_label', rex_i18n::msg('add'));
            $form = $yform->getForm();
            if ($yform->objparams['actions_executed']) {
                echo rex_view::success($this->i18n('domain_added'));
                rex_yrewrite::deleteCache();
            } else {
                $showlist = false;
                $fragment = new rex_fragment();
                $fragment->setVar('class', 'edit', false);
                $fragment->setVar('title', $this->i18n('add_domain'));
                $fragment->setVar('body', $form, false);
                echo $fragment->parse('core/page/section.php');
            }
        }
    }
}
if ($showlist) {
    $sql = 'SELECT * FROM ' . rex::getTable('yrewrite_domain') . ' where alias_domain <> ""';
    $list = rex_list::factory($sql, 100);
开发者ID:VIEWSION,项目名称:redaxo_yrewrite,代码行数:31,代码来源:alias_domains.php


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