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


PHP rex_select::setAttribute方法代码示例

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


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

示例1: formatElement

 function formatElement()
 {
     global $I18N;
     $name = $this->getAttribute('name') . '[]';
     $value = explode('|', htmlspecialchars($this->getValue()));
     if (count($value) != 4) {
         $value = array(null, 1, 'd');
     }
     $select = new rex_select();
     $select->setAttribute('class', 'rex-form-select rex-a630-interval');
     $select->setStyle('width:120px');
     $select->setName($name);
     $select->setSize(1);
     $select->addOption($I18N->msg('cronjob_interval_hour'), 'h');
     $select->addOption($I18N->msg('cronjob_interval_day'), 'd');
     $select->addOption($I18N->msg('cronjob_interval_week'), 'w');
     $select->addOption($I18N->msg('cronjob_interval_month'), 'm');
     $select->addOption($I18N->msg('cronjob_interval_year'), 'y');
     $select->setSelected($value[2]);
     return '
         <input type="text" class="rex-form-text rex-a630-interval" name="' . $name . '" style="width:20px; margin-right: 5px;" value="' . $value[1] . '" />
         ' . $select->get() . "\n";
 }
开发者ID:Barnhiac,项目名称:MTW_REDAXO,代码行数:23,代码来源:class.form.inc.php

示例2:

"><?php 
    echo $this->getLabelStyle($this->relation['label']);
    ?>
</label>
        <?php 
    $select = new rex_select();
    $select->setStyle('class="form-control"');
    if ($this->relation['relation_type'] == 1) {
        $select->setName($this->getFieldName() . '[]');
        $select->setMultiple();
        $select->setSize($this->relation['size']);
    } else {
        $select->setName($this->getFieldName());
    }
    if ($this->relation['disabled']) {
        $select->setAttribute('disabled', 'disabled');
    }
    $select->addOptions($options);
    $select->setSelected($this->getValue());
    echo $select->get();
    ?>
    </div>
<?php 
} else {
    ?>
    <div class="<?php 
    echo $class_group;
    ?>
" id="<?php 
    echo $this->getHTMLId();
    ?>
开发者ID:VIEWSION,项目名称:redaxo_yform,代码行数:31,代码来源:value.be_manager_relation.tpl.php

示例3: foreach

                $lang_a = new rex_select();
                $lang_a->setStyle('class="rex-form-select"');
                $lang_a->setId('clang_a');
                $lang_a->setName('clang_a');
                $lang_a->setSize('1');
                $lang_a->setAttribute('tabindex', rex_tabindex(false));
                foreach ($clang_perm as $key) {
                    $val = rex_translate($REX['CLANG'][$key]);
                    $lang_a->addOption($val, $key);
                }
                $lang_b = new rex_select();
                $lang_b->setStyle('class="rex-form-select"');
                $lang_b->setId('clang_b');
                $lang_b->setName('clang_b');
                $lang_b->setSize('1');
                $lang_b->setAttribute('tabindex', rex_tabindex(false));
                foreach ($clang_perm as $key) {
                    $val = rex_translate($REX['CLANG'][$key]);
                    $lang_b->addOption($val, $key);
                }
                $lang_a->setSelected(rex_request('clang_a', 'rex-clang-id', null));
                $lang_b->setSelected(rex_request('clang_b', 'rex-clang-id', null));
                $out .= '
              <fieldset class="rex-form-col-2">
                <legend>' . $I18N->msg('content_submitcopycontent') . '</legend>
							  <div class="rex-form-wrapper">
							  
							  	<div class="rex-form-row">
									  <p class="rex-form-col-a rex-form-select">
											<label for="clang_a">' . $I18N->msg('content_contentoflang') . '</label>
											' . $lang_a->get() . '
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:content.inc.php

示例4:

             </thead>
         <tbody>
             ' . $actions . '
         </tbody>
         </table>
     ';
     $fragment = new rex_fragment();
     $fragment->setVar('title', rex_i18n::msg('actions_added_caption'), false);
     $fragment->setVar('content', $panel, false);
     $content .= $fragment->parse('core/page/section.php');
 }
 $gaa_sel = new rex_select();
 $gaa_sel->setName('action_id');
 $gaa_sel->setId('action_id');
 $gaa_sel->setSize(1);
 $gaa_sel->setAttribute('class', 'form-control');
 for ($i = 0; $i < $gaa->getRows(); ++$i) {
     $gaa_sel->addOption(rex_i18n::translate($gaa->getValue('name'), false), $gaa->getValue('id'));
     $gaa->next();
 }
 $panel = '';
 $panel .= '<fieldset>';
 $formElements = [];
 $n = [];
 $n['label'] = '<label for="action_id">' . rex_i18n::msg('action') . '</label>';
 $n['field'] = $gaa_sel->get();
 $formElements[] = $n;
 $fragment = new rex_fragment();
 $fragment->setVar('elements', $formElements, false);
 $panel .= $fragment->parse('core/form/form.php');
 $panel .= '</fieldset>';
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:modules.modules.php

示例5: getArticle

    function getArticle($curctype = -1)
    {
        global $module_id, $REX_USER, $REX, $I18N;
        $this->ctype = $curctype;
        $sliceLimit = '';
        if ($this->getSlice) {
            //$REX['GG'] = 0;
            $sliceLimit = " AND " . $REX['TABLE_PREFIX'] . "article_slice.id = '" . $this->getSlice . "' ";
        }
        // ----- start: article caching
        ob_start();
        ob_implicit_flush(0);
        if ($REX['GG'] && !$this->viasql && !$this->getSlice) {
            if ($this->article_id != 0) {
                $this->contents = '';
                $article_content_file = $REX['INCLUDE_PATH'] . '/generated/articles/' . $this->article_id . '.' . $this->clang . '.content';
                if ($cont = rex_get_file_contents($article_content_file)) {
                    $this->contents = $cont;
                    eval($this->contents);
                }
            }
        } else {
            if ($this->article_id != 0) {
                // ---------- alle teile/slices eines artikels auswaehlen
                $sql = "SELECT " . $REX['TABLE_PREFIX'] . "module.id, " . $REX['TABLE_PREFIX'] . "module.name, " . $REX['TABLE_PREFIX'] . "module.ausgabe, " . $REX['TABLE_PREFIX'] . "module.eingabe, " . $REX['TABLE_PREFIX'] . "article_slice.*, " . $REX['TABLE_PREFIX'] . "article.re_id\r\n          FROM\r\n            " . $REX['TABLE_PREFIX'] . "article_slice\r\n          LEFT JOIN " . $REX['TABLE_PREFIX'] . "module ON " . $REX['TABLE_PREFIX'] . "article_slice.modultyp_id=" . $REX['TABLE_PREFIX'] . "module.id\r\n          LEFT JOIN " . $REX['TABLE_PREFIX'] . "article ON " . $REX['TABLE_PREFIX'] . "article_slice.article_id=" . $REX['TABLE_PREFIX'] . "article.id\r\n          WHERE\r\n            " . $REX['TABLE_PREFIX'] . "article_slice.article_id='" . $this->article_id . "' AND\r\n            " . $REX['TABLE_PREFIX'] . "article_slice.clang='" . $this->clang . "' AND\r\n            " . $REX['TABLE_PREFIX'] . "article.clang='" . $this->clang . "'\r\n            " . $sliceLimit . "\r\n            ORDER BY " . $REX['TABLE_PREFIX'] . "article_slice.re_article_slice_id";
                $this->CONT = new rex_sql();
                $this->CONT->debugsql = 0;
                $this->CONT->setQuery($sql);
                $RE_CONTS = array();
                $RE_CONTS_CTYPE = array();
                $RE_MODUL_OUT = array();
                $RE_MODUL_IN = array();
                $RE_MODUL_ID = array();
                $RE_MODUL_NAME = array();
                $RE_C = array();
                // ---------- SLICE IDS/MODUL SETZEN - speichern der daten
                for ($i = 0; $i < $this->CONT->getRows(); $i++) {
                    $RE_CONTS[$this->CONT->getValue('re_article_slice_id')] = $this->CONT->getValue($REX['TABLE_PREFIX'] . 'article_slice.id');
                    $RE_CONTS_CTYPE[$this->CONT->getValue('re_article_slice_id')] = $this->CONT->getValue($REX['TABLE_PREFIX'] . 'article_slice.ctype');
                    $RE_MODUL_IN[$this->CONT->getValue('re_article_slice_id')] = $this->CONT->getValue($REX['TABLE_PREFIX'] . 'module.eingabe');
                    $RE_MODUL_OUT[$this->CONT->getValue('re_article_slice_id')] = $this->CONT->getValue($REX['TABLE_PREFIX'] . 'module.ausgabe');
                    $RE_MODUL_ID[$this->CONT->getValue('re_article_slice_id')] = $this->CONT->getValue($REX['TABLE_PREFIX'] . 'module.id');
                    $RE_MODUL_NAME[$this->CONT->getValue('re_article_slice_id')] = $this->CONT->getValue($REX['TABLE_PREFIX'] . 'module.name');
                    $RE_C[$this->CONT->getValue('re_article_slice_id')] = $i;
                    $this->CONT->next();
                }
                // ---------- moduleselect: nur module nehmen auf die der user rechte hat
                if ($this->mode == 'edit') {
                    $MODULE = new rex_sql();
                    $MODULE->setQuery('select * from ' . $REX['TABLE_PREFIX'] . 'module order by name');
                    $MODULESELECT = new rex_select();
                    $MODULESELECT->setName('module_id');
                    $MODULESELECT->setSize('1');
                    $MODULESELECT->setAttribute('onchange', 'this.form.submit();');
                    $MODULESELECT->addOption('----------------------------  ' . $I18N->msg('add_block'), '');
                    for ($i = 0; $i < $MODULE->getRows(); $i++) {
                        if ($REX_USER->hasPerm('module[' . $MODULE->getValue('id') . ']') || $REX_USER->hasPerm('admin[]')) {
                            $MODULESELECT->addOption(rex_translate($MODULE->getValue('name'), NULL, FALSE), $MODULE->getValue('id'));
                        }
                        $MODULE->next();
                    }
                }
                // ---------- SLICE IDS SORTIEREN UND AUSGEBEN
                $I_ID = 0;
                $PRE_ID = 0;
                $LCTSL_ID = 0;
                $this->CONT->reset();
                $this->article_content = "";
                for ($i = 0; $i < $this->CONT->getRows(); $i++) {
                    // ----- ctype unterscheidung
                    if ($this->mode != "edit" && $i == 0) {
                        $this->article_content = "<?php if (\$this->ctype == '" . $RE_CONTS_CTYPE[$I_ID] . "' || (\$this->ctype == '-1')) { ?>";
                    }
                    // ------------- EINZELNER SLICE - AUSGABE
                    $this->CONT->counter = $RE_C[$I_ID];
                    $slice_content = "";
                    $SLICE_SHOW = TRUE;
                    if ($this->mode == "edit") {
                        $form_url = 'index.php';
                        if ($this->setanker) {
                            $form_url .= '#addslice';
                        }
                        $this->ViewSliceId = $RE_CONTS[$I_ID];
                        // ----- add select box einbauen
                        if ($this->function == "add" && $this->slice_id == $I_ID) {
                            $slice_content = $this->addSlice($I_ID, $module_id);
                        } else {
                            // ----- BLOCKAUSWAHL - SELECT
                            $MODULESELECT->setId("module_id" . $I_ID);
                            $slice_content = '
              <form action="' . $form_url . '" method="get" id="slice' . $RE_CONTS[$I_ID] . '">
                <fieldset>
                  <legend class="rex-lgnd"><span class="rex-hide">' . $I18N->msg("add_block") . '</span></legend>
                  <input type="hidden" name="article_id" value="' . $this->article_id . '" />
                  <input type="hidden" name="page" value="content" />
                  <input type="hidden" name="mode" value="' . $this->mode . '" />
                  <input type="hidden" name="slice_id" value="' . $I_ID . '" />
                  <input type="hidden" name="function" value="add" />
                  <input type="hidden" name="clang" value="' . $this->clang . '" />
                  <input type="hidden" name="ctype" value="' . $this->ctype . '" />
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:101,代码来源:class.rex_article.inc.php

示例6: renderMetaFields

 /**
  * Erstellt den nötigen HTML Code um ein Formular zu erweitern.
  *
  * @param rex_sql $sqlFields rex_sql-objekt, dass die zu verarbeitenden Felder enthält
  * @param array   $epParams  Array of all EP parameters
  *
  * @return string
  */
 public function renderMetaFields(rex_sql $sqlFields, array $epParams)
 {
     $s = '';
     // Startwert für MEDIABUTTON, MEDIALIST, LINKLIST zähler
     $media_id = 1;
     $mlist_id = 1;
     $link_id = 1;
     $llist_id = 1;
     $activeItem = isset($epParams['activeItem']) ? $epParams['activeItem'] : null;
     $sqlFields->reset();
     for ($i = 0; $i < $sqlFields->getRows(); $i++, $sqlFields->next()) {
         // Umschliessendes Tag von Label und Formularelement
         $tag = 'p';
         $tag_attr = '';
         $name = $sqlFields->getValue('name');
         $title = $sqlFields->getValue('title');
         $params = $sqlFields->getValue('params');
         $typeLabel = $sqlFields->getValue('label');
         $attr = $sqlFields->getValue('attributes');
         $dblength = $sqlFields->getValue('dblength');
         $attrArray = rex_string::split($attr);
         if (isset($attrArray['perm'])) {
             if (!rex::getUser()->hasPerm($attrArray['perm'])) {
                 continue;
             }
             unset($attrArray['perm']);
         }
         $defaultValue = $sqlFields->getValue('default');
         if ($activeItem) {
             $itemValue = $activeItem->getValue($name);
             if (strpos($itemValue, '|+|') !== false) {
                 // Alte notation mit |+| als Trenner
                 $dbvalues = explode('|+|', $activeItem->getValue($name));
             } else {
                 // Neue Notation mit | als Trenner
                 $dbvalues = explode('|', $activeItem->getValue($name));
             }
         } else {
             $dbvalues = (array) $sqlFields->getValue('default');
         }
         if ($title != '') {
             $label = rex_i18n::translate($title);
         } else {
             $label = htmlspecialchars($name);
         }
         $id = preg_replace('/[^a-zA-Z\\-0-9_]/', '_', $label);
         $labelIt = true;
         $label = '<label for="' . $id . '">' . $label . '</label>';
         $field = '';
         switch ($typeLabel) {
             case 'text':
                 $tag_attr = ' class="form-control"';
                 $rexInput = rex_input::factory($typeLabel);
                 $rexInput->addAttributes($attrArray);
                 $rexInput->setAttribute('id', $id);
                 $rexInput->setAttribute('name', $name);
                 if ($dblength > 0) {
                     $rexInput->setAttribute('maxlength', $dblength);
                 }
                 if ($activeItem) {
                     $rexInput->setValue($activeItem->getValue($name));
                 } else {
                     $rexInput->setValue($defaultValue);
                 }
                 $field = $rexInput->getHtml();
                 $e = [];
                 $e['label'] = $label;
                 $e['field'] = $field;
                 $fragment = new rex_fragment();
                 $fragment->setVar('elements', [$e], false);
                 $field = $fragment->parse('core/form/form.php');
                 break;
             case 'checkbox':
                 // Beachte auch default values in multiple fields bei ADD.
                 // Im EDIT wurde dies bereits vorher gehandelt
                 if (!$activeItem) {
                     $defaultValue = explode('|', $defaultValue);
                 }
                 $name .= '[]';
             case 'radio':
                 $formElements = [];
                 $values = [];
                 if (rex_sql::getQueryType($params) == 'SELECT') {
                     $sql = rex_sql::factory();
                     $value_groups = $sql->getDBArray($params, [], PDO::FETCH_NUM);
                     foreach ($value_groups as $value_group) {
                         if (isset($value_group[1])) {
                             $values[$value_group[1]] = $value_group[0];
                         } else {
                             $values[$value_group[0]] = $value_group[0];
                         }
                     }
//.........这里部分代码省略.........
开发者ID:DECAF,项目名称:redaxo,代码行数:101,代码来源:handler.php

示例7: isset

 $ctypes = isset($attributes['ctype']) ? $attributes['ctype'] : [];
 $modules = isset($attributes['modules']) ? $attributes['modules'] : [];
 $categories = isset($attributes['categories']) ? $attributes['categories'] : [];
 if (!is_array($modules)) {
     $modules = [];
 }
 if (!is_array($categories)) {
     $categories = [];
 }
 // modules[ctype_id][module_id];
 // modules[ctype_id]['all'];
 // Module ...
 $modul_select = new rex_select();
 $modul_select->setMultiple(true);
 $modul_select->setSize(10);
 $modul_select->setAttribute('class', 'form-control');
 $m_sql = rex_sql::factory();
 foreach ($m_sql->getArray('SELECT id, name FROM ' . rex::getTablePrefix() . 'module ORDER BY name') as $m) {
     $modul_select->addOption(rex_i18n::translate($m['name']), $m['id']);
 }
 // Kategorien
 $cat_select = new rex_category_select(false, false, false, false);
 $cat_select->setMultiple(true);
 $cat_select->setSize(10);
 $cat_select->setName('categories[]');
 $cat_select->setId('rex-id-categories-select');
 $cat_select->setAttribute('class', 'form-control');
 if (count($categories) > 0) {
     foreach ($categories as $c => $cc) {
         // typsicherer vergleich, weil (0 != "all") => false
         if ($c !== 'all') {
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:templates.php

示例8:

$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$radios = $fragment->parse('core/form/radio.php');
$formElements = [];
$n = [];
$n['label'] = rex_i18n::msg('backup_export_select');
$n['field'] = $radios;
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$content .= $fragment->parse('core/form/form.php');
$tableSelect = new rex_select();
$tableSelect->setMultiple();
$tableSelect->setId('rex-form-exporttables');
$tableSelect->setName('EXPTABLES[]');
$tableSelect->setAttribute('class', 'form-control');
$tables = rex_sql::showTables();
foreach ($tables as $table) {
    $tableSelect->addOption($table, $table);
    if ($table != rex::getTable('user') && 0 === strpos($table, rex::getTablePrefix()) && 0 !== strpos($table, rex::getTablePrefix() . rex::getTempPrefix())) {
        $tableSelect->setSelected($table);
    }
}
$formElements = [];
$n = [];
$n['header'] = '<div id="rex-js-exporttype-sql-div">';
$n['label'] = '<label for="rex-form-exporttables">' . rex_i18n::msg('backup_export_select_tables') . '</label>';
$n['field'] = $tableSelect->get();
$n['footer'] = '</div>';
$formElements[] = $n;
// Vorhandene Exporte auslesen
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:export.php

示例9: rex_version_header

function rex_version_header($params)
{
    global $REX, $I18N;
    $return = "";
    $rex_version_article = $REX['LOGIN']->getSessionVar("rex_version_article");
    if (!is_array($rex_version_article)) {
        $rex_version_article = array();
    }
    $working_version_empty = TRUE;
    $gw = rex_sql::factory();
    $gw->setQuery('select * from ' . $REX['TABLE_PREFIX'] . 'article_slice where article_id=' . $params['article_id'] . ' and clang=' . $params['clang'] . ' and revision=1 LIMIT 1');
    if ($gw->getRows() > 0) {
        $working_version_empty = FALSE;
    }
    $revisions = array();
    $revisions[0] = $I18N->msg("version_liveversion");
    $revisions[1] = $I18N->msg("version_workingversion");
    $version_id = rex_request("rex_set_version", "int", "-1");
    if ($version_id === 0) {
        $rex_version_article[$params['article_id']] = 0;
    } elseif ($version_id == 1) {
        $rex_version_article[$params['article_id']] = 1;
    } 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_warning($I18N->msg("version_warning_working_version_to_live"));
            } else {
                if (!$REX['USER']->hasPerm('version[only_working_version]')) {
                    require $REX['INCLUDE_PATH'] . '/addons/version/functions/function_rex_copyrevisioncontent.inc.php';
                    // rex_copyRevisionContent($article_id,$clang,$from_revision_id, $to_revision_id, $gc->getValue("id"),$delete_to_revision);
                    rex_copyRevisionContent($params['article_id'], $params['clang'], 1, 0, 0, TRUE);
                    $return .= rex_info($I18N->msg("version_info_working_version_to_live"));
                }
            }
            break;
        case "copy_live_to_work":
            require $REX['INCLUDE_PATH'] . '/addons/version/functions/function_rex_copyrevisioncontent.inc.php';
            // rex_copyRevisionContent($article_id,$clang,$from_revision_id, $to_revision_id, $gc->getValue("id"),$delete_to_revision);
            rex_copyRevisionContent($params['article_id'], $params['clang'], 0, 1, 0, TRUE);
            $return .= rex_info($I18N->msg("version_info_live_version_to_working"));
            break;
    }
    if ($REX['USER']->hasPerm('version[only_working_version]')) {
        $rex_version_article[$params['article_id']] = 1;
        unset($revisions[0]);
    }
    $REX['LOGIN']->setSessionVar("rex_version_article", $rex_version_article);
    $link = 'index.php?page=' . $params['page'] . '&article_id=' . $params['article_id'] . '&clang=' . $params['clang'];
    $return .= '
		<div id="rex-version-header" class="rex-toolbar rex-toolbar-has-form rex-version-revision-' . $rex_version_article[$params['article_id']] . '">
				<div class="rex-toolbar-content rex-version-header">

				<form action="index.php" method="post">
				<fieldset>
				<input type="hidden" name="page" value="' . $params['page'] . '" />
				<input type="hidden" name="mode" value="' . $params['mode'] . '" />
        <input type="hidden" name="article_id" value="' . $params['article_id'] . '" />
        <input type="hidden" name="clang" value="' . $params['clang'] . '" />
        <input type="hidden" name="ctype" value="' . $params['ctype'] . '" />
	';
    $s = new rex_select();
    foreach ($revisions as $k => $r) {
        $s->addOption($r, $k);
    }
    $s->setSelected($rex_version_article[$params['article_id']]);
    $s->setName('rex_set_version');
    $s->setId('rex-select-version-id');
    $s->setSize('1');
    $s->setAttribute('onchange', 'this.form.submit();');
    if ($REX['USER']->hasPerm('version[only_working_version]')) {
        $s->setDisabled();
    }
    $return .= '<ul class="rex-display-inline">';
    $return .= '<li class="rex-navi-first"><label for="rex-select-version-id">' . $I18N->msg('version') . ':</label> ' . $s->get() . '</li>';
    if ($REX['USER']->hasPerm('version[only_working_version]')) {
        if ($rex_version_article[$params['article_id']] > 0) {
            $return .= '<li><a href="' . $link . '&rex_version_func=copy_live_to_work">' . $I18N->msg('version_copy_from_liveversion') . '</a></li>';
            $return .= '<li><a href="/' . rex_getUrl($params['article_id'], $params['clang'], array("rex_version" => 1)) . '" target="_blank">' . $I18N->msg("version_preview") . '</a></li>';
        }
    } else {
        if ($rex_version_article[$params['article_id']] > 0) {
            if (!$working_version_empty) {
                $return .= '<li><a href="' . $link . '&rex_version_func=copy_work_to_live">' . $I18N->msg('version_working_to_live') . '</a></li>';
            }
            $return .= '<li><a href="../' . rex_getUrl($params['article_id'], $params['clang'], array("rex_version" => 1)) . '" target="_blank">' . $I18N->msg("version_preview") . '</a></li>';
        } else {
            $return .= '<li><a href="' . $link . '&rex_version_func=copy_live_to_work" onclick="return confirm(\'' . $I18N->msg('version_confirm_copy_live_to_workingversion') . '\');">' . $I18N->msg('version_copy_live_to_workingversion') . '</a></li>';
        }
    }
    $return .= '</ul>';
    $return .= '

					<noscript>
    			  <input type="submit" />
    			</noscript>
				</fieldset>
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:101,代码来源:config.inc.php

示例10: foreach

    ?>
" name="lang_settings[<?php 
    echo $clangId;
    ?>
][special_chars_rewrite]" class="rex-form-text pipes" id="lang_settings_<?php 
    echo $clangId;
    ?>
_special_chars_rewrite">
				</p>
			</div>

			<?php 
    $inherit_from_clang_select = new rex_select();
    $inherit_from_clang_select->setSize(1);
    $inherit_from_clang_select->setName('lang_settings[' . $clangId . '][inherit_from_clang]');
    $inherit_from_clang_select->setAttribute('id', 'lang_settings_' . $clangId . '_inherit_from_clang');
    foreach ($REX['CLANG'] as $clangIdTemp => $clangName) {
        if (count($REX['CLANG']) == 1 || $clangIdTemp != $clangId) {
            $inherit_from_clang_select->addOption($clangName, $clangIdTemp);
        }
    }
    $inherit_from_clang_select->setSelected($inheritFromClang);
    ?>

	     <div class="rex-form-row" id="lang_settings_<?php 
    echo $clangId;
    ?>
_inherit_from_clang_row">
            <p class="rex-form-col-a rex-form-select">
              <label for="lang_settings_<?php 
    echo $clangId;
开发者ID:omphteliba,项目名称:seo42,代码行数:31,代码来源:settings.inc.php

示例11: rex_a62_metaFields


//.........这里部分代码省略.........
                }
                foreach ($values as $key => $value) {
                    $id = preg_replace('/[^a-zA-Z\\-0-9_]/', '_', $id . $key);
                    // wenn man keine Werte angibt (Boolean Chkbox/Radio)
                    // Dummy Wert annehmen, damit an/aus unterscheidung funktioniert
                    if ($oneValue && $key == '') {
                        $key = 'true';
                    }
                    $selected = '';
                    if (in_array($key, $dbvalues)) {
                        $selected = ' checked="checked"';
                    }
                    if ($oneValue) {
                        $tag_attr = ' class="' . $class . '"';
                        $field .= '<input type="' . $typeLabel . '" name="' . $name . '" value="' . $key . '" id="' . $id . '" ' . $attr . $selected . ' />' . "\n";
                    } else {
                        $field .= '<p class="' . $class . '">' . "\n";
                        $field .= '<label for="' . $id . '"><span>' . htmlspecialchars($value) . '</span></label>';
                        $field .= '<input type="' . $typeLabel . '" name="' . $name . '" value="' . $key . '" id="' . $id . '" ' . $attr . $selected . ' />' . "\n";
                        $field .= '</p>' . "\n";
                    }
                }
                break;
            case 'select':
                $select = new rex_select();
                $select->setName($name);
                $select->setId($id);
                $select->setSelected($dbvalues);
                foreach (explode(' ', $attr) as $pair) {
                    if (strpos($pair, '=') === false) {
                        continue;
                    }
                    $temp = explode('=', $pair);
                    $select->setAttribute($temp[0], str_replace(array('"', "'"), '', $temp[1]));
                    if ($temp[0] == 'multiple') {
                        $select->setName($name . '[]');
                    }
                }
                if (rex_sql::getQueryType($params) == 'SELECT') {
                    $select->addDBSqlOptions($params);
                } else {
                    $values = array();
                    $value_groups = explode('|', $params);
                    foreach ($value_groups as $value_group) {
                        if (strpos($value_group, ':') !== false) {
                            $temp = explode(':', $value_group);
                            $values[$temp[0]] = $temp[1];
                        } else {
                            $values[$value_group] = $value_group;
                        }
                    }
                    $select->addOptions($values);
                }
                $field .= $select->get();
                break;
            case 'datetime':
            case 'date':
                if ($dbvalues[0] == '') {
                    $dbvalues[0] = time();
                }
                $style = 'class="rex-fdate"';
                $yearStyle = 'class="rex-fdatey"';
                $yearSelect = new rex_select();
                $yearSelect->addOptions(range(2005, date('Y') + 2), true);
                $yearSelect->setName($name . '[year]');
                $yearSelect->setSize(1);
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:67,代码来源:extension_common.inc.php

示例12:

    }
} else {
    for ($i = 1; $i <= count($values); $i++) {
        echo '<li id="' . $i . '"><a data-toggle="tab" id="tab' . $i . '" href="#bereich' . $i . '"><i>B' . $i . '</i><span>Bereich ' . $i . '</span></a></li>' . PHP_EOL;
    }
}
echo '
    <li class="locked pull-right"><a data-toggle="tab" id="tabanleitung" href="#anleitung"><i class="rex-icon rex-icon-info"></i><span>Anleitung</span></a></li>
    <li class="locked pull-right"><a data-toggle="tab" id="tabweiteres" href="#weiteres"><i class="rex-icon rex-icon-metafuncs"></i><span>Weitere Einstellungen</span></a></li>
  </ul>
</div>' . PHP_EOL;
echo '<div class="tab-content">' . PHP_EOL;
for ($i = 1; $i <= count($values); $i++) {
    $ueberschrift_art = new rex_select();
    $ueberschrift_art->setName('REX_INPUT_VALUE[' . $i . '][ueberschrift_art]');
    $ueberschrift_art->setAttribute('class', 'ueberschriften');
    $ueberschrift_art->setSelected(isset($values[$i]['ueberschrift_art']) ? $values[$i]['ueberschrift_art'] : '');
    $ueberschrift_art->setSize(1);
    $ueberschrift_art->addOptions(array('h1' => 'Überschrift 1 (H1) - Nur einmal pro Seite verwenden', 'h2' => 'Überschrift 2 (H2)', 'h3' => 'Überschrift 3 (H3)', 'h4' => 'Überschrift 4 (H4)', 'faq' => 'FAQ Überschrift (Inhalt: Fließtext)'));
    $bildinformationen = new rex_select();
    $bildinformationen->setName('REX_INPUT_VALUE[' . $i . '][bildinformationen]');
    $bildinformationen->setSelected(isset($values[$i]['bildinformationen']) ? $values[$i]['bildinformationen'] : '');
    $bildinformationen->setSize(1);
    $bildinformationen->addOptions(array('nein' => 'nein', 'ja' => 'ja'));
    $bildposition = new rex_select();
    $bildposition->setName('REX_INPUT_VALUE[' . $i . '][bildposition]');
    $bildposition->setSelected(isset($values[$i]['bildposition']) ? $values[$i]['bildposition'] : '');
    $bildposition->setSize(1);
    $bildposition->addOptions(array('oben' => 'über dem Text', 'unten' => 'unter dem Text', 'nachueberschrift' => 'unter der Überschrift', 'nachteaser' => 'unter dem Teasertext'));
    $bildanpassen = new rex_select();
    $bildanpassen->setName('REX_INPUT_VALUE[' . $i . '][bildanpassen]');
开发者ID:darwin26,项目名称:REX5-Modulsammlung,代码行数:31,代码来源:rex5_modul_eingabe.php

示例13: array

$func = rex_request('func', 'string');
// save settings
if ($func == 'update') {
    $thisPlugin = 'rex_globals';
    $settings = (array) rex_post('settings', 'array', array());
    rex_backend_utilities::replaceSettings($thisPlugin, $settings);
    rex_backend_utilities::updateSettingsFile($thisPlugin);
}
// templates
$sql = rex_sql::factory();
$sql->setQuery('select id, name from ' . $REX['TABLE_PREFIX'] . 'template order by name');
$templates = $sql->getArray();
$selectTemplates = new rex_select();
$selectTemplates->setName('settings[include_template_id]');
$selectTemplates->setAttribute('id', 'include_template_id');
$selectTemplates->setSize(1);
$selectTemplates->addOption('<' . $I18N->msg('rex_globals_none') . '>', '0');
foreach ($templates as $template) {
    $selectTemplates->addOption($template['name'], $template['id']);
}
$selectTemplates->setSelected($REX['ADDON']['rex_globals']['settings']['include_template_id']);
?>

<div class="rex-addon-output">
	<div class="rex-form">

		<h2 class="rex-hl2"><?php 
echo $I18N->msg('be_utilities_settings');
?>
</h2>
开发者ID:olien,项目名称:be_utilities,代码行数:30,代码来源:index.inc.php

示例14: array

 *
 * @package redaxo4
 * @version svn:$Id$
 */
$year_sel = new rex_select();
$year_sel->setSize(1);
$year_sel->setName('log[year]');
$year_sel->setId('log_year');
$year_sel->setAttribute('class', 'rex-form-select');
$year_sel->setAttribute('onchange', 'this.form.submit();');
$year_sel->setStyle('width: 100px');
$month_sel = new rex_select();
$month_sel->setSize(1);
$month_sel->setName('log[month]');
$month_sel->setId('log_month');
$month_sel->setAttribute('class', 'rex-form-select');
$month_sel->setAttribute('onchange', 'this.form.submit();');
$month_sel->setStyle('width: 100px');
$log = rex_request('log', 'array', array());
if (!isset($log['year']) || !$log['year']) {
    $log['year'] = date('Y');
}
if (!isset($log['month']) || !$log['month']) {
    $log['month'] = date('m');
}
$array = rex_cronjob_log::getYearMonthArray();
if (empty($array)) {
    echo '
    <div class="rex-toolbar">
      <div class="rex-toolbar-content">
        <strong>' . $I18N->msg('cronjob_no_log_files') . '</strong>
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:log.inc.php

示例15:

    $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 ([0 => $this->i18n('disabled'), 1 => $this->i18n('high'), 3 => $this->i18n('normal'), 5 => $this->i18n('low')] as $no => $name) {
    $sel_priority->addOption($name, $no);
}
$sel_debug = new rex_select();
$sel_debug->setid('phpmailer-smtp_debug');
$sel_debug->setName('settings[smtp_debug]');
$sel_debug->setSize(1);
$sel_debug->setAttribute('class', 'form-control');
$sel_debug->setSelected($this->getConfig('smtp_debug'));
foreach ([0 => $this->i18n('smtp_debug_0'), 1 => $this->i18n('smtp_debug_1'), 2 => $this->i18n('smtp_debug_2'), 3 => $this->i18n('smtp_debug_3'), 4 => $this->i18n('smtp_debug_4')] as $no => $name) {
    $sel_debug->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 = [];
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:config.php


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