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


PHP rex_select::get方法代码示例

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


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

示例1: get

 public function get()
 {
     if (!$this->loaded) {
         $this->addCatOptions();
         $this->loaded = true;
     }
     return parent::get();
 }
开发者ID:staabm,项目名称:redaxo,代码行数:8,代码来源:media_category_select.php

示例2: enterObject

 function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
 {
     $multiple = FALSE;
     if (isset($this->elements[6]) && $this->elements[6] == 1) {
         $multiple = TRUE;
     }
     $size = (int) $this->getElement(7);
     if ($size < 1) {
         $size = 1;
     }
     $SEL = new rex_select();
     $SEL->setId("el_" . $this->getId());
     if ($multiple) {
         if ($size == 1) {
             $size = 2;
         }
         $SEL->setName($this->getFormFieldname() . "[]");
         $SEL->setSize($size);
         $SEL->setMultiple(1);
     } else {
         $SEL->setName($this->getFormFieldname());
         $SEL->setSize(1);
     }
     foreach (explode(',', $this->elements[3]) as $v) {
         $teile = explode('=', $v);
         $wert = $teile[0];
         if (isset($teile[1])) {
             $bezeichnung = $teile[1];
         } else {
             $bezeichnung = $teile[0];
         }
         $SEL->addOption(rex_translate($wert), $bezeichnung);
     }
     if (!$send && $this->value == "" && isset($this->elements[5]) && $this->elements[5] != "") {
         $this->value = $this->elements[5];
     }
     if (!is_array($this->getValue())) {
         $this->value = explode(",", $this->getValue());
     }
     foreach ($this->getValue() as $v) {
         $SEL->setSelected($v);
     }
     $this->value = implode(",", $this->getValue());
     $wc = "";
     if (isset($warning[$this->getId()])) {
         $wc = $warning[$this->getId()];
     }
     $SEL->setStyle(' class="select ' . $wc . '"');
     $form_output[$this->getId()] = '
   <p class="formselect formlabel-' . $this->getName() . '" id="' . $this->getHTMLId() . '">
   <label class="select ' . $wc . '" for="el_' . $this->getId() . '" >' . rex_translate($this->getElement(2)) . '</label>' . $SEL->get() . '</p>';
     $email_elements[$this->elements[1]] = $this->getValue();
     if (!isset($this->elements[4]) || $this->elements[4] != "no_db") {
         $sql_elements[$this->elements[1]] = $this->getValue();
     }
 }
开发者ID:rotzek,项目名称:redaxo_xform,代码行数:56,代码来源:class.xform.select.inc.php

示例3: enterObject

    function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
    {
        $SEL = new rex_select();
        $SEL->setName('FORM[' . $this->params["form_name"] . '][el_' . $this->id . ']');
        $SEL->setId("el_" . $this->id);
        $SEL->setSize(1);
        $sql = $this->elements[4];
        $teams = rex_sql::factory();
        $teams->debugsql = $this->params["debug"];
        $teams->setQuery($sql);
        $sqlnames = array();
        // mit --- keine auswahl ---
        if ($this->elements[3] != 1) {
            $SEL->addOption($this->elements[3], "0");
        }
        foreach ($teams->getArray() as $t) {
            if (!isset($this->elements[6]) || $this->elements[6] == "") {
                $v = $t['name'];
            } else {
                $v = $t[$this->elements[6]];
            }
            if ($this->elements[5] == "") {
                $k = $t['id'];
            } else {
                $k = $t[$this->elements[5]];
            }
            $SEL->addOption($v, $k);
            if (isset($this->elements[7])) {
                $sqlnames[$k] = $t[$this->elements[7]];
            }
        }
        $wc = "";
        if (isset($warning["el_" . $this->getId()])) {
            $wc = $warning["el_" . $this->getId()];
        }
        $SEL->setStyle(' class="select ' . $wc . '"');
        if ($this->value == "" && isset($this->elements[7]) && $this->elements[7] != "") {
            $this->value = $this->elements[7];
        }
        $SEL->setSelected($this->value);
        $form_output[] = '
			<p class="formselect" id="' . $this->getHTMLId() . '">
				<label class="select ' . $wc . '" for="el_' . $this->id . '" >' . $this->elements[2] . '</label>
				' . $SEL->get() . '
			</p>';
        $email_elements[$this->elements[1]] = stripslashes($this->value);
        if (isset($sqlnames[$this->value])) {
            $email_elements[$this->elements[1] . '_SQLNAME'] = stripslashes($sqlnames[$this->value]);
        }
        if (!isset($this->elements[8]) || $this->elements[8] != "no_db") {
            $sql_elements[$this->elements[1]] = $this->value;
        }
    }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:53,代码来源:class.xform.select_single_sql.inc.php

示例4: enterObject

    function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
    {
        $this->label = $this->elements[1];
        $multiple = FALSE;
        if (isset($this->elements[6]) && $this->elements[6] == 1) {
            $multiple = TRUE;
        }
        $SEL = new rex_select();
        $SEL->setId("el_" . $this->id);
        if ($multiple) {
            $SEL->setName("FORM[" . $this->params["form_name"] . "][el_" . $this->id . "][]");
            $SEL->setSize(5);
            $SEL->setMultiple(1);
            if (!is_array($this->value)) {
                $this->value = array();
            }
        } else {
            $SEL->setName("FORM[" . $this->params["form_name"] . "][el_" . $this->id . "]");
            $SEL->setSize(1);
            $this->value = stripslashes($this->value);
        }
        foreach ($this->getKeys() as $k => $v) {
            $SEL->addOption($v, $k);
        }
        if ($this->value == "" && !$send) {
            if (isset($this->elements[5])) {
                $SEL->setSelected($this->elements[5]);
            }
        } else {
            if (is_array($this->value)) {
                foreach ($this->value as $val) {
                    $SEL->setSelected($val);
                }
            } else {
                $SEL->setSelected($this->value);
            }
        }
        $wc = "";
        if (isset($warning["el_" . $this->getId()])) {
            $wc = $warning["el_" . $this->getId()];
        }
        $SEL->setStyle(' class="select ' . $wc . '"');
        $form_output[] = ' 
			<p class="formselect formlabel-' . $this->label . '">
			<label class="select ' . $wc . '" for="el_' . $this->id . '" >' . $this->elements[2] . '</label>' . $SEL->get() . '
			</p>';
        $email_elements[$this->elements[1]] = $this->value;
        if (!isset($this->elements[4]) || $this->elements[4] != "no_db") {
            $sql_elements[$this->elements[1]] = $this->value;
        }
    }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:51,代码来源:class.xform.select.inc.php

示例5: enterObject

    function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
    {
        // ***** SELECT FESTLEGEN
        $SEL = new rex_select();
        $SEL->setName('FORM[' . $this->params["form_name"] . '][el_' . $this->id . '][]');
        $SEL->setId("el_" . $this->id);
        $SEL->setSize(5);
        $SEL->setMultiple(1);
        // ***** SQL - ROHDATEN ZIEHEN
        $sql = $this->elements[5];
        $teams = rex_sql::factory();
        $teams->debugsql = $this->params["debug"];
        $teams->setQuery($sql);
        for ($t = 0; $t < $teams->getRows(); $t++) {
            $SEL->addOption($teams->getValue($this->elements[7]), $teams->getValue($this->elements[6]));
            $teams->next();
        }
        $wc = "";
        // if (isset($warning["el_" . $this->getId()])) $wc = $warning["el_" . $this->getId()];
        $SEL->setStyle('class="multipleselect ' . $wc . '"');
        // ***** EINGELOGGT ODER NICHT SETZEN
        if ($send == 0) {
            // erster aufruf
            // Daten ziehen
            if ($this->params["main_id"] > 0) {
                $this->value = array();
                $g = rex_sql::factory();
                $g->debugsql = $this->params["debug"];
                $g->setQuery('select ' . $this->elements[3] . ' from ' . $this->elements[1] . ' where ' . $this->elements[2] . '=' . $this->params["main_id"]);
                $gg = $g->getArray();
                if (is_array($gg)) {
                    foreach ($gg as $g) {
                        $this->value[] = $g[$this->elements[3]];
                    }
                }
            }
        }
        // ***** AUSWAHL SETZEN
        if (is_array($this->value)) {
            foreach ($this->value as $val) {
                $SEL->setSelected($val);
            }
        }
        // ***** AUSGEBEN
        $form_output[] = '
			<p class="formmultipleselect" id="' . $this->getHTMLId() . '">
				<label class="multipleselect ' . $wc . '" for="el_' . $this->id . '" >' . $this->elements[4] . '</label>
				' . $SEL->get() . '
			</p>';
    }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:50,代码来源:class.xform.select_multiple_sql.inc.php

示例6: enterObject

    function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
    {
        $SEL = new rex_select();
        $SEL->setName('FORM[' . $this->params["form_name"] . '][el_' . $this->id . ']');
        $SEL->setId("el_" . $this->id);
        $SEL->setSize(1);
        $sql = $this->elements[4];
        $teams = new rex_sql();
        $teams->debugsql = $this->params["debug"];
        $teams->setQuery($sql);
        $sqlnames = array();
        if ($this->elements[3] != 1) {
            // mit --- keine auswahl ---
            $SEL->addOption($this->elements[3], "0");
        }
        for ($t = 0; $t < $teams->getRows(); $t++) {
            $SEL->addOption($teams->getValue($this->elements[6]), $teams->getValue($this->elements[5]));
            if (isset($this->elements[7])) {
                $sqlnames[$teams->getValue($this->elements[5])] = $teams->getValue($this->elements[7]);
            }
            $teams->next();
        }
        $wc = "";
        if (isset($warning["el_" . $this->getId()])) {
            $wc = $warning["el_" . $this->getId()];
        }
        $SEL->setStyle(' class="select ' . $wc . '"');
        if ($this->value == "" && isset($this->elements[7]) && $this->elements[7] != "") {
            $this->value = $this->elements[7];
        }
        $SEL->setSelected($this->value);
        $form_output[] = '
			<p class="formselect">
			<label class="select ' . $wc . '" for="el_' . $this->id . '" >' . $this->elements[2] . '</label>
			' . $SEL->get() . '
			</p>';
        $email_elements[$this->elements[1]] = stripslashes($this->value);
        if (isset($sqlnames[$this->value])) {
            $email_elements[$this->elements[1] . '_SQLNAME'] = stripslashes($sqlnames[$this->value]);
        }
        if (!isset($this->elements[8]) || $this->elements[8] != "no_db") {
            $sql_elements[$this->elements[1]] = $this->value;
        }
    }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:44,代码来源:class.xform.select_single_sql.inc.php

示例7: 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

示例8: htmlspecialchars

$n = [];
$n['label'] = '<label for="rex-id-servername">' . rex_i18n::msg('servername') . '</label>';
$n['field'] = '<input class="form-control" type="text" id="rex-id-servername" name="settings[servername]" value="' . htmlspecialchars(rex::getServerName()) . '" />';
$formElements[] = $n;
$n = [];
$n['label'] = '<label for="rex-id-error-email">' . rex_i18n::msg('error_email') . '</label>';
$n['field'] = '<input class="form-control" type="text" id="rex-id-error-email" name="settings[error_email]" value="' . htmlspecialchars(rex::getErrorEmail()) . '" />';
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$content[] = $fragment->parse('core/form/form.php');
$elements = '';
$formElements = [];
$n = [];
$n['label'] = '<label for="rex-id-lang">' . rex_i18n::msg('backend_language') . '</label>';
$n['field'] = $sel_lang->get();
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$elements .= $fragment->parse('core/form/form.php');
$formElements = [];
$n = [];
$n['label'] = '<label for="rex-id-debug">' . rex_i18n::msg('debug_mode') . '</label>';
$n['field'] = '<input type="checkbox" id="rex-id-debug" name="settings[debug]" value="1" ' . (rex::isDebugMode() ? 'checked="checked" ' : '') . '/>';
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$elements .= $fragment->parse('core/form/checkbox.php');
foreach (rex_system_setting::getAll() as $setting) {
    $field = $setting->getField();
    if (!$field instanceof rex_form_element) {
开发者ID:staabm,项目名称:redaxo,代码行数:31,代码来源:system.settings.php

示例9: htmlspecialchars

      <thead>
        <tr>
          <th class="rex-icon"><a href="index.php?page=specials&amp;subpage=lang&amp;func=addclang#clang"' . rex_accesskey($I18N->msg('clang_add'), $REX['ACKEY']['ADD']) . '>+</a></th>
          <th class="rex-icon">ID</th>
          <th>' . $I18N->msg('clang_name') . '</th>
          <th colspan="2">' . $I18N->msg('clang_function') . '</th>
        </tr>
      </thead>
      <tbody>
  ';
// Add form
if ($func == 'addclang') {
    echo '
        <tr class="rex-trow-actv">
          <td class="rex-icon"></td>
          <td class="rex-icon">' . $sel->get() . '</td>
          <td><input type="text" id="clang_name" name="clang_name" value="' . htmlspecialchars($clang_name) . '" /></td>
          <td><input type="submit" class="rex-fsubmit" name="add_clang_save" value="' . $I18N->msg('clang_add') . '"' . rex_accesskey($I18N->msg('clang_add'), $REX['ACKEY']['SAVE']) . ' /></td>
        </tr>
      ';
}
foreach ($REX['CLANG'] as $lang_id => $lang) {
    // Edit form
    if ($func == "editclang" && $clang_id == $lang_id) {
        echo '
          <tr class="rex-trow-actv">
            <td class="rex-icon"></td>
            <td class="rex-icon">' . $lang_id . '</td>
            <td><input type="text" id="clang_name" name="clang_name" value="' . htmlspecialchars($lang) . '" /></td>
            <td>
              <input type="submit" class="rex-fsubmit" name="edit_clang_save" value="' . $I18N->msg('clang_update') . '"' . rex_accesskey($I18N->msg('clang_update'), $REX['ACKEY']['SAVE']) . ' />
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:specials.clangs.inc.php

示例10: htmlspecialchars

                <tr>
                    <th class="rex-small"><a class="rex-i-element rex-i-clang-add" href="index.php?page=specials&amp;subpage=lang&amp;func=addclang#clang"' . rex_accesskey($I18N->msg('clang_add'), $REX['ACKEY']['ADD']) . '><span class="rex-i-element-text">' . $I18N->msg('clang_add') . '</span></a></th>
                    <th class="rex-small">ID</th>
                    <th>' . $I18N->msg('clang_name') . '</th>
                    <th>' . $I18N->msg('clang_function') . '</th>
                </tr>
            </thead>
            <tbody>
    ';
// Add form
if ($func == 'addclang') {
    //ggf wiederanzeige des add forms, falls ungueltige id uebermittelt
    echo '
                <tr class="rex-table-row-activ">
                    <td class="rex-small"><span class="rex-i-element rex-i-clang"><span class="rex-i-element-text">' . htmlspecialchars($clang_name) . '</span></span></td>
                    <td class="rex-small">' . $sel->get() . '</td>
                    <td><input class="rex-form-text" type="text" id="rex-form-clang-name" name="clang_name" value="' . htmlspecialchars($clang_name) . '" /></td>
                    <td><input class="rex-form-submit" type="submit" name="add_clang_save" value="' . $I18N->msg('clang_add') . '"' . rex_accesskey($I18N->msg('clang_add'), $REX['ACKEY']['SAVE']) . ' /></td>
                </tr>
            ';
}
foreach ($REX['CLANG'] as $lang_id => $lang) {
    $add_td = '';
    $add_td = '<td class="rex-small">' . $lang_id . '</td>';
    $delLink = $I18N->msg('clang_delete');
    if ($lang_id == 0) {
        $delLink = '<span class="rex-strike">' . $delLink . '</span>';
    } else {
        $delLink = '<a href="index.php?page=specials&amp;subpage=lang&amp;func=deleteclang&amp;clang_id=' . $lang_id . '" onclick="return confirm(\'' . $I18N->msg('delete') . ' ?\')">' . $delLink . '</a>';
    }
    // Edit form
开发者ID:Barnhiac,项目名称:MTW_REDAXO,代码行数:31,代码来源:specials.clangs.inc.php

示例11: jQuery

             $field .= ' checked="checked" ';
         }
         $field .= ' value="1" />';
         $formElements = [];
         $n = [];
         $n['label'] = '<label>' . rex_i18n::msg('modules_available_all') . '</label>';
         $n['field'] = $field;
         $formElements[] = $n;
         $fragment = new rex_fragment();
         $fragment->setVar('elements', $formElements, false);
         $ctypes_out .= $fragment->parse('core/form/checkbox.php');
         $formElements = [];
         $n = [];
         $n['id'] = 'rex-js-modules' . $i;
         $n['label'] = '<label for="rex-id-modules-' . $i . '-select">' . rex_formatter::widont(rex_i18n::msg('modules_available')) . '</label>';
         $n['field'] = $modul_select->get();
         $n['note'] = rex_i18n::msg('ctrl');
         $formElements[] = $n;
         $fragment = new rex_fragment();
         $fragment->setVar('flush', true);
         $fragment->setVar('elements', $formElements, false);
         $ctypes_out .= $fragment->parse('core/form/form.php');
         $ctypes_out .= '</fieldset>';
         ++$i;
     }
 }
 $ctypes_out .= '
     <script type="text/javascript">
     <!--
     jQuery(function($) {
 ';
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:templates.php

示例12:

 }
 $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>';
 $formElements = [];
 $n = [];
 $n['field'] = '<button class="btn btn-save rex-form-aligned" type="submit" value="1" name="add_action">' . rex_i18n::msg('action_add') . '</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('title', rex_i18n::msg('action_add'), false);
 $fragment->setVar('body', $panel, false);
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:modules.modules.php

示例13: confirm

                }
                $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() . '
										</p>
									  <p class="rex-form-col-b rex-form-select">
											<label for="clang_b">' . $I18N->msg('content_to') . '</label>
											' . $lang_b->get() . '
									  </p>
									 </div>
									 <div class="rex-form-row">
										 <p class="rex-form-col-a rex-form-submit">
											<input class="rex-form-submit" type="submit" name="copycontent" value="' . $I18N->msg('content_submitcopycontent') . '"' . rex_tabindex() . ' onclick="return confirm(\'' . $I18N->msg('content_submitcopycontent') . '?\')" />
									  </p>
									 </div>
									 <div class="rex-clearer"></div>
							  </div>
              </fieldset>';
            }
            // --------------------------------------------------- INHALTE KOPIEREN ENDE
            // --------------------------------------------------- ARTIKEL VERSCHIEBEN START
            if (!$isStartpage && ($REX['USER']->isAdmin() || $REX['USER']->hasPerm('moveArticle[]'))) {
                // Wenn Artikel kein Startartikel dann Selectliste darstellen, sonst...
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:content.inc.php

示例14: rex_a62_metaFields

/**
 * Erstellt den nötigen HTML Code um ein Formular zu erweitern
 *
 * @param $sqlFields rex_sql-objekt, dass die zu verarbeitenden Felder enthält
 * @param $activeItem objekt, dass mit getValue() die Werte des akuellen Eintrags zurückgibt
 * @param $formatCallback callback, dem die infos als Array übergeben werden und den formatierten HTML Text zurückgibt
 */
function rex_a62_metaFields($sqlFields, $activeItem, $formatCallback, $epParams)
{
    global $I18N, $REX;
    $s = '';
    // Startwert für MEDIABUTTON, MEDIALIST, LINKLIST zähler
    $media_id = 1;
    $mlist_id = 1;
    $link_id = 1;
    $llist_id = 1;
    $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');
        $restrictions = $sqlFields->getValue('restrictions');
        $attr .= rex_tabindex();
        $attrArray = rex_split_string($attr);
        if (isset($attrArray['perm'])) {
            if (!$REX['USER']->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_translate($title);
        } else {
            $label = htmlspecialchars($name);
        }
        $id = preg_replace('/[^a-zA-Z\\-0-9_]/', '_', $label);
        $labelIt = true;
        $field = '';
        switch ($typeLabel) {
            case 'text':
                $tag_attr = ' class="rex-form-text"';
                $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();
                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':
                $values = array();
                if (rex_sql::getQueryType($params) == 'SELECT') {
                    $sql = rex_sql::factory();
                    $value_groups = $sql->getDBArray($params, MYSQL_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];
                        }
                    }
                } else {
                    $value_groups = explode('|', $params);
                    foreach ($value_groups as $value_group) {
                        // check ob key:value paar
                        // und der wert beginnt nicht mit "translate:"
                        if (strpos($value_group, ':') !== false && strpos($value_group, 'translate:') !== 0) {
                            $temp = explode(':', $value_group, 2);
//.........这里部分代码省略.........
开发者ID:Barnhiac,项目名称:MTW_REDAXO,代码行数:101,代码来源:extension_common.inc.php

示例15:

      <p>
        <input class="rex-chckbx" type="radio" id="dbanlegen_2" name="dbanlegen" value="2"' . $dbchecked2 . ' />
        <label class="rex-lbl-right" for="dbanlegen_2">' . $I18N->msg('setup_036') . '</label>
      </p>

      <p>
        <input class="rex-chckbx" type="radio" id="dbanlegen_4" name="dbanlegen" value="4"' . $dbchecked3 . ' />
        <label class="rex-lbl-right" for="dbanlegen_4">' . $I18N->msg('setup_038') . '</label>
      </p>';
    if ($exports_found) {
        echo '
      <p>
        <input class="rex-chckbx" type="radio" id="dbanlegen_3" name="dbanlegen" value="3"' . $dbchecked3 . ' />
        <label class="rex-lbl-right" for="dbanlegen_3">' . $I18N->msg('setup_037') . '</label>
      </p>
      <p>' . $sel_export->get() . '</p>';
    }
    echo '
      <p>
        <input class="rex-sbmt" type="submit" value="' . $I18N->msg('setup_039') . '"' . rex_tabindex() . ' />
      </p>
    </fieldset>
  </form>
  ';
}
// ---------------------------------- MODUS 4 | User anlegen ...
if ($checkmodus == 4 && $send == 1) {
    $err_msg = "";
    if ($noadmin != 1) {
        if ($redaxo_user_login == '') {
            $err_msg .= $I18N->msg('setup_040');
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:setup.inc.php


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