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


PHP rex_select::setSize方法代码示例

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


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

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

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

示例3: array

 function __construct($tag = '', &$table, $attributes = array())
 {
     global $I18N;
     global $REX;
     parent::rex_form_select_element('', $table, $attributes);
     $dummy = null;
     $this->chkbox_element = new rex_form_checkbox_element('', $dummy);
     $this->chkbox_element->setAttribute('name', 'enable_restrictions');
     $this->chkbox_element->setAttribute('id', 'enable_restrictions_chkbx');
     $this->chkbox_element->addOption($I18N->msg('minfo_field_label_no_restrictions'), '');
     if ($table->getPrefix() == 'art_' || $table->getPrefix() == 'cat_') {
         $restrictionsSelect = new rex_category_select(false, false, true, false);
     } elseif ($table->getPrefix() == 'med_') {
         $restrictionsSelect = new rex_mediacategory_select();
     } elseif ($table->getPrefix() == 'asd_') {
         $restrictionsSelect = new rex_select();
         $restrictionsSelect->addSqlOptions('SELECT `name`, `id` FROM ' . $REX['TABLE_PREFIX'] . 'asd_news_category');
         $restrictionsSelect->setSize(6);
     } else {
         trigger_error('Unexpected TablePrefix "' . $table->getPrefix() . '"!', E_USER_ERROR);
         exit;
     }
     $restrictionsSelect->setMultiple(true);
     $this->setSelect($restrictionsSelect);
     $this->setNotice($I18N->msg('ctrl'));
 }
开发者ID:Sysix,项目名称:asd_news,代码行数:26,代码来源:rex_form_asd_restrictions_element.php

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

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

 function buildSelectBoxes()
 {
     $select = new rex_select();
     // hier muss getName() nicht $name verwendet werden (section Prefix!)
     $select->setName($this->getName() . '[]');
     $select->setSize(1);
     $select->setStyle('width: 24%;');
     $this->daySelect = $select;
     $this->monthSelect = $select;
     $this->yearSelect = $select;
     foreach (range(1, 31) as $day) {
         $this->daySelect->addOption($day, $day);
     }
     foreach (range(1, 12) as $month) {
         $this->monthSelect->addOption($month, $month);
     }
     foreach (range(1995, 2050) as $year) {
         $this->yearSelect->addOption($year, $year);
     }
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:20,代码来源:field.dateField.inc.php

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

示例9: elseif

        $warning = $I18N->msg('enter_name');
        $func = 'addclang';
    }
} elseif (!empty($edit_clang_save)) {
    if (array_key_exists($clang_id, $REX['CLANG'])) {
        rex_editCLang($clang_id, $clang_name);
        $info = $I18N->msg('clang_edited');
        $func = '';
        unset($clang_id);
    }
}
// seltype
$sel = new rex_select();
$sel->setName('clang_id');
$sel->setId('clang_id');
$sel->setSize(1);
foreach (array_diff(range(0, 14), array_keys($REX['CLANG'])) as $clang) {
    $sel->addOption($clang, $clang);
}
if ($info != '') {
    echo rex_info($info);
}
if ($warning != '') {
    echo rex_warning($warning);
}
if ($func == 'addclang' || $func == 'editclang') {
    $legend = $func == 'add_clang' ? $I18N->msg('clang_add') : $I18N->msg('clang_edit');
    echo '
      <form action="index.php#clang" method="post">
        <fieldset>
          <legend><span class="rex-hide">' . $legend . '</span></legend>
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:specials.clangs.inc.php

示例10: foreach

						</p>
					</div>
					
					<?php 
if (OOAddon::isActivated('multinewsletter')) {
    ?>
					<div class="rex-form-row rex-form-element-v1">
						<p class="rex-form-text">
							<label for="multinewsletter_group"><?php 
    echo $I18N_KURSE->msg('multinewsletter_gruppe');
    ?>
</label>
							<?php 
    require_once $REX['INCLUDE_PATH'] . '/addons/multinewsletter/classes/class.multinewsletter_group.inc.php';
    $groups = new rex_select();
    $groups->setSize(1);
    $groups->setAttribute('class', 'myrex_select');
    $groups->addOption($I18N_KURSE->msg('multinewsletter_nicht_anmelden'), '0');
    $newsletter_groups = MultinewsletterGroupList::getAll($REX['TABLE_PREFIX']);
    foreach ($newsletter_groups as $group) {
        $groups->addOption($group->name, $group->group_id);
    }
    $groups->setSelected($REX['ADDON']['d2u_kurse']['settings']['multinewsletter_group']);
    $groups->setAttribute('id', 'multinewsletter_group');
    $groups->setName('settings[multinewsletter_group]');
    print $groups->get();
    ?>
						</p>
					</div>
					<?php 
}
开发者ID:TobiasKrais,项目名称:d2u_kurse,代码行数:31,代码来源:einstellungen.inc.php

示例11: array

 $ctypes = rex_getAttributes('ctype', $attributes);
 $modules = rex_getAttributes('modules', $attributes);
 $categories = rex_getAttributes('categories', $attributes);
 if (!is_array($modules)) {
     $modules = array();
 }
 if (!is_array($categories)) {
     $categories = array();
 }
 // modules[ctype_id][module_id];
 // modules[ctype_id]['all'];
 // Module ...
 $modul_select = new rex_select();
 $modul_select->setMultiple(true);
 $modul_select->setStyle('class="rex-form-select"');
 $modul_select->setSize(10);
 $m_sql = rex_sql::factory();
 $m_sql->setQuery('SELECT id, name FROM ' . $REX['TABLE_PREFIX'] . 'module ORDER BY name');
 foreach ($m_sql->getArray() as $m) {
     $modul_select->addOption(rex_translate($m['name'], $I18N, false), $m['id']);
 }
 // Kategorien
 $cat_select = new rex_category_select(false, false, false, false);
 $cat_select->setMultiple(true);
 $cat_select->setStyle('class="rex-form-select"');
 $cat_select->setSize(10);
 $cat_select->setName('categories[]');
 $cat_select->setId('categories');
 if (count($categories) > 0) {
     foreach ($categories as $c => $cc) {
         // typsicherer vergleich, weil (0 != "all") => false
开发者ID:eaCe,项目名称:redaxo4,代码行数:31,代码来源:template.inc.php

示例12: htmlspecialchars

    $radio->addOption($I18N->msg('xform_manager_import_if_no_column_break'), '3');
    // $SEL->setStyle(' class="select ' . $wc . '"');
    $radio->setSelected($missing_columns);
    echo $radio->get();
    ?>

                <p class="rex-form-select">
                <label class="select " for="divider" ><?php 
    echo $I18N->msg('xform_manager_import_divider');
    ?>
</label>
                <?php 
    $a = new rex_select();
    $a->setName('divider');
    $a->setId('divider');
    $a->setSize(1);
    $a->addOption($I18N->msg('xform_manager_import_divider_semicolon') . ' (;)', ';');
    $a->addOption($I18N->msg('xform_manager_import_divider_comma') . ' (,)', ',');
    $a->addOption($I18N->msg('xform_manager_import_divider_tab') . '', 'tab');
    $a->setSelected($divider);
    echo $a->get();
    ?>
                    </p>

                <p class="rex-form-text">
                    <label for="rex-form-error-replacefield"><?php 
    echo $I18N->msg('xform_manager_import_unique_field');
    ?>
</label>
                    <input class="rex-form-text" type="text" id="rex-form-replacefield" name="replacefield" value="<?php 
    echo htmlspecialchars(stripslashes($replacefield));
开发者ID:alexbarnhill,项目名称:redaxo_xform,代码行数:31,代码来源:data_import.inc.php

示例13: foreach

                $clang_perm = $REX['USER']->getClangPerm();
                $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>
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:content.inc.php

示例14: foreach

                <form action="index.php" method="get" class="rex-fl-lft" style="margin-left:5px">
                    <fieldset>
                        <input type="hidden" name="page" value="<?php 
    print rex_request('page');
    ?>
" />
                        <input type="hidden" name="subpage" value="<?php 
    print rex_request('subpage');
    ?>
" />
                        <label for="filter">Filter:</label> &nbsp;
                        <?php 
    $select = new rex_select();
    $select->setName('filter');
    $select->setAttribute('onchange', 'this.form.submit();');
    $select->setSize(1);
    $select->setMultiple(false);
    $select->setStyle("width:250px;");
    $select->addOption("Alle anzeigen", 999);
    $select->addOption("nur News, die den Status \"online\" haben", 101);
    $select->addOption("nur News, die den Status \"auf Startseite\" haben", 102);
    $qry = 'SELECT id, name from ' . TBL_NEWS_CATS;
    $sql = new rex_sql();
    $data = $sql->getArray($qry);
    if (is_array($data) && sizeof($data) > 0) {
        foreach ($data as $row) {
            $select->addOption("nur aus " . $row['name'], $row['id']);
        }
    }
    if (sizeof($REX['CLANG']) > 1) {
        foreach ($REX['CLANG'] as $k => $v) {
开发者ID:brt-tito,项目名称:rex-news,代码行数:31,代码来源:entries.inc.php

示例15:

        					<th class="rex-icon">&nbsp;</th>
        					' . $add_header . '
        					<th>' . $I18N->msg('action_name') . '</th>
        					<th>' . $I18N->msg('action_functions') . '</th>
      					</tr>
    					</thead>
    				<tbody>
              ' . $actions . '
            </tbody>
            </table>
          ';
                }
                $gaa_sel = new rex_select();
                $gaa_sel->setName('action_id');
                $gaa_sel->setId('action_id');
                $gaa_sel->setSize(1);
                $gaa_sel->setStyle('class="rex-form-select"');
                for ($i = 0; $i < $gaa->getRows(); $i++) {
                    $gaa_sel->addOption(rex_translate($gaa->getValue('name'), null, false), $gaa->getValue('id'));
                    $gaa->next();
                }
                echo $actions . '
				<fieldset class="rex-form-col-1">
          <legend>' . $I18N->msg('action_add') . '</legend>
      		<div class="rex-form-wrapper">
						
						<div class="rex-form-row">
							<p class="rex-form-col-a rex-form-select">
								<label for="action_id">' . $I18N->msg('action') . '</label>
								' . $gaa_sel->get() . '
					  	</p>
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:module.modules.inc.php


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