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


PHP rex_select::setId方法代码示例

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


在下文中一共展示了rex_select::setId方法的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)
    {
        $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

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

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

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

示例6: renderMetaFields


//.........这里部分代码省略.........
                     if ($oneValue) {
                         $e['label'] = $label;
                     } else {
                         $e['label'] = '<label for="' . $id . '">' . htmlspecialchars($value) . '</label>';
                     }
                     $e['field'] = '<input type="' . $typeLabel . '" name="' . $name . '" value="' . htmlspecialchars($key) . '" id="' . $id . '" ' . $attrStr . $selected . ' />';
                     $formElements[] = $e;
                 }
                 $fragment = new rex_fragment();
                 $fragment->setVar('elements', $formElements, false);
                 $fragment->setVar('inline', $inline);
                 if ($typeLabel == 'radio') {
                     $field = $fragment->parse('core/form/radio.php');
                 } else {
                     if (!$oneValue) {
                         $fragment->setVar('grouped', true);
                     }
                     $field = $fragment->parse('core/form/checkbox.php');
                 }
                 if (!$oneValue) {
                     $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 'select':
                 $tag_attr = ' class="form-control"';
                 $select = new rex_select();
                 $select->setStyle('class="form-control"');
                 $select->setName($name);
                 $select->setId($id);
                 $multiple = false;
                 foreach ($attrArray as $attr_name => $attr_value) {
                     if (empty($attr_name)) {
                         continue;
                     }
                     $select->setAttribute($attr_name, $attr_value);
                     if ($attr_name == 'multiple') {
                         $multiple = true;
                         $select->setName($name . '[]');
                         $select->setMultiple();
                     }
                 }
                 // Beachte auch default values in multiple fields bei ADD.
                 // Im EDIT wurde dies bereits vorher gehandelt
                 if ($multiple && !$activeItem) {
                     $dbvalues = explode('|', $defaultValue);
                 }
                 // hier mit den "raw"-values arbeiten, da die rex_select klasse selbst escaped
                 $select->setSelected($dbvalues);
                 if (rex_sql::getQueryType($params) == 'SELECT') {
                     // Werte via SQL Laden
                     $select->addDBSqlOptions($params);
                 } else {
                     // Optionen mit | separiert
                     // eine einzelne Option kann mit key:value separiert werden
                     $values = [];
                     $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:DECAF,项目名称:redaxo,代码行数:67,代码来源:handler.php

示例7: foreach

 if (count($categories) > 0) {
     foreach ($categories as $c => $cc) {
         // typsicherer vergleich, weil (0 != "all") => false
         if ($c !== 'all') {
             $cat_select->setSelected($cc);
         }
     }
 }
 $ctypes_out = '';
 $i = 1;
 $ctypes[] = '';
 // Extra, fŸr Neue Spalte
 if (is_array($ctypes)) {
     foreach ($ctypes as $id => $name) {
         $modul_select->setName('modules[' . $i . '][]');
         $modul_select->setId('modules_' . $i . '_select');
         $modul_select->resetSelected();
         if (isset($modules[$i]) && count($modules[$i]) > 0) {
             foreach ($modules[$i] as $j => $jj) {
                 // typsicherer vergleich, weil (0 != "all") => false
                 if ($j !== 'all') {
                     $modul_select->setSelected($jj);
                 }
             }
         }
         $ctypes_out .= '
         <div class="rex-form-row">
         <p class="rex-form-col-a rex-form-text">
             <label for="ctype' . $i . '">ID=' . $i . '</label>
             <input class="rex-form-text" id="ctype' . $i . '" type="text" name="ctype[' . $i . ']" value="' . htmlspecialchars($name) . '" />
         </p>
开发者ID:eaCe,项目名称:redaxo4,代码行数:31,代码来源:template.inc.php

示例8: enterObject


//.........这里部分代码省略.........
					<span class="rex-widget-column rex-widget-column-first">
						<a href="#" class="rex-icon-file-open" 
							onclick="xform_manager_openDatalist(' . $this->getId() . ', \'' . $this->be_em["target_field"] . '\', \'' . $link . '\',\'' . $multiple . '\');return false;" 
							title="' . $I18N->msg("xform_relation_choose_entry") . '"></a>
						<a href="#" class="rex-icon-file-delete" 
							onclick="xform_manager_deleteDatalist(' . $this->getId() . ',\'' . $multiple . '\');return false;" 
							title="' . $I18N->msg("xform_relation_delete_entry") . '"></a>
					</span>
					</p>
					</div>
				</div>
				<div class="rex-clearer"></div>
				';
            }
            $form_output[] = '
				<p class="formpopup" id="' . $this->getHTMLId() . '">
					<label class="select ' . $wc . '" for="el_' . $this->id . '" >' . $this->be_em["label"] . '</label>
					' . $out . '
				</p>';
        }
        // --------------------------------------- POPUP, 1-n
        if ($this->be_em["relation_type"] == 4) {
            $text = 'not yet implemented';
            // TODO
            /*
            if($this->params["main_id"] < 1)
            {
            	$text = 'Diesen Bereich k&ouml;nnen Sie erst bearbeiten, wenn der Datensatz angelegt wurde.';
            }else
            {
            		
            	$link = 'javascript:rex_xform_openRelation('.$this->getId().',\''.$this->be_em["target_table"].'\',\'id'.
            		'&rex_em_filter['.$this->be_em["target_field"].']='.$this->params["main_id"].
            		'&rex_em_set['.$this->be_em["target_field"].']='.$this->params["main_id"].
            		'&page='.$this->be_em["page"].
            		'&subpage='.$this->be_em["subpage"].
            	'\');';
            		
            	$text = '<a href="'.$link.'">'.
            	'Link'.
            	'</a>';
            }
            */
            $form_output[] = '
			<p class="formhtml" id="' . $this->getHTMLId() . '">
			<label class="select " for="el_' . $this->getId() . '" >' . $this->be_em["label"] . '</label>
			<input type="hidden" name="FORM[' . $this->params["form_name"] . '][el_' . $this->getId() . '][]" id="REX_RELATION_' . $this->getId() . '" />
			<span>' . $text . '</span>
			</p>';
            return;
        }
        // --------------------------------------- Selectbox, single or multiple
        if ($this->be_em["relation_type"] < 2) {
            if ($send == 1 && $this->be_em["eoption"] == 0 && count($this->getValue()) == 0) {
                // Error. Fehlermeldung ausgeben
                $this->params["warning"][] = $this->elements[7];
                $this->params["warning_messages"][] = $this->elements[7];
                $wc = $this->params["error_class"];
            }
            $wc = "";
            if (isset($warning[$this->getId()])) {
                $wc = $warning[$this->getId()];
            }
            // ----- SELECT BOX
            $sss = rex_sql::factory();
            $sss->debugsql = $this->params["debug"];
            $sss->setQuery('select * from ' . $this->be_em["target_table"] . ' order by ' . $this->be_em["target_field"]);
            $SEL = new rex_select();
            $SEL->setName('FORM[' . $this->params["form_name"] . '][el_' . $this->id . '][]');
            $SEL->setId("el_" . $this->id);
            $SEL->setStyle('class="select"');
            $SEL->setDisabled($disabled);
            $SEL->setSize(1);
            // mit --- keine auswahl ---
            if ($this->be_em["relation_type"] == 1) {
                $SEL->setMultiple(TRUE);
                $SEL->setSize(5);
            } elseif ($this->be_em["eoption"] == 1) {
                $SEL->addOption("-", "");
            }
            foreach ($sss->getArray() as $v) {
                $s = $v[$this->be_em["target_field"]];
                if (strlen($s) > 50) {
                    $s = substr($s, 0, 45) . ' ... ';
                }
                $s = $s . ' [id=' . $v["id"] . ']';
                $SEL->addOption($s, $v["id"]);
            }
            // var_dump($this->getValue());
            $SEL->setSelected($this->getValue());
            $form_output[] = '
	        <p class="formselect" id="' . $this->getHTMLId() . '">
	          <label class="select ' . $wc . '" for="el_' . $this->id . '" >' . $this->be_em["label"] . '</label>
	          ' . $SEL->get() . '
	        </p>';
        }
        // --------------------------------------- save
        $email_elements[$this->getName()] = stripslashes(implode(",", $this->getValue()));
        $sql_elements[$this->getName()] = implode(",", $this->getValue());
    }
开发者ID:rotzek,项目名称:redaxo_xform,代码行数:101,代码来源:class.xform.be_manager_relation.inc.php

示例9: rex_a62_metaFields


//.........这里部分代码省略.........
                if (!$activeItem) {
                    $dbvalues = (array) $defaultValue;
                }
                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="rex-form-col-a rex-form-' . $class_s . $classAdd . '"';
                        $field .= '<input class="rex-form-' . $class_s . '" type="' . $typeLabel . '" name="' . $name . '" value="' . htmlspecialchars($key) . '" id="' . $id . '" ' . $attrStr . $selected . ' />' . "\n";
                    } else {
                        $field .= '<p class="rex-form-' . $class_s . ' rex-form-label-right' . $classAdd . '">' . "\n";
                        $field .= '<input class="rex-form-' . $class_s . '" type="' . $typeLabel . '" name="' . $name . '" value="' . htmlspecialchars($key) . '" id="' . $id . '" ' . $attrStr . $selected . ' />' . "\n";
                        $field .= '<label for="' . $id . '">' . htmlspecialchars($value) . '</label>';
                        $field .= '</p>' . "\n";
                    }
                }
                if (!$oneValue) {
                    $field .= '</div>';
                }
                break;
            case 'select':
                $tag_attr = ' class="rex-form-select"';
                $select = new rex_select();
                $select->setStyle('class="rex-form-select"');
                $select->setName($name);
                $select->setId($id);
                $multiple = false;
                foreach ($attrArray as $attr_name => $attr_value) {
                    if (empty($attr_name)) {
                        continue;
                    }
                    $select->setAttribute($attr_name, $attr_value);
                    if ($attr_name == 'multiple') {
                        $multiple = true;
                        $select->setName($name . '[]');
                    }
                }
                // Beachte auch default values in multiple fields bei ADD.
                // Im EDIT wurde dies bereits vorher gehandelt
                if ($multiple && !$activeItem) {
                    $dbvalues = explode('|', $defaultValue);
                }
                // hier mit den "raw"-values arbeiten, da die rex_select klasse selbst escaped
                $select->setSelected($dbvalues);
                if (!$multiple) {
                    $select->setSize(1);
                }
                if (rex_sql::getQueryType($params) == 'SELECT') {
                    // Werte via SQL Laden
                    $select->addDBSqlOptions($params);
                } else {
                    // Optionen mit | separiert
                    // eine einzelne Option kann mit key:value separiert werden
                    $values = array();
                    $value_groups = explode('|', $params);
                    foreach ($value_groups as $value_group) {
                        // check ob key:value paar
                        // und der wert beginnt nicht mit "translate:"
开发者ID:Barnhiac,项目名称:MTW_REDAXO,代码行数:67,代码来源:extension_common.inc.php

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

示例11: foreach

            // --------------------------------------------------- INHALTE KOPIEREN START
            if (($REX['USER']->isAdmin() || $REX['USER']->hasPerm('copyContent[]')) && count($REX['USER']->getClangPerm()) > 1) {
                $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">
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:content.inc.php

示例12: foreach

 if (count($categories) > 0) {
     foreach ($categories as $c => $cc) {
         // typsicherer vergleich, weil (0 != "all") => false
         if ($c !== 'all') {
             $cat_select->setSelected($cc);
         }
     }
 }
 $ctypes_out = '';
 $i = 1;
 $ctypes[] = '';
 // Extra, fuer Neue Spalte
 if (is_array($ctypes)) {
     foreach ($ctypes as $id => $name) {
         $modul_select->setName('modules[' . $i . '][]');
         $modul_select->setId('rex-id-modules-' . $i . '-select');
         $modul_select->resetSelected();
         if (isset($modules[$i]) && count($modules[$i]) > 0) {
             foreach ($modules[$i] as $j => $jj) {
                 // typsicherer vergleich, weil (0 != "all") => false
                 if ($j !== 'all') {
                     $modul_select->setSelected($jj);
                 }
             }
         }
         $ctypes_out .= '<fieldset><legend><small>' . rex_i18n::msg('content_type') . '</small> ' . rex_i18n::msg('id') . '=' . $i . '</legend>';
         $formElements = [];
         $n = [];
         $n['label'] = '<label for="rex-id-ctype' . $i . '">' . rex_i18n::msg('name') . '</label>';
         $n['field'] = '<input class="form-control" id="rex-id-ctype' . $i . '" type="text" name="ctype[' . $i . ']" value="' . htmlspecialchars($name) . '" />';
         $formElements[] = $n;
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:templates.php

示例13: elseif

    } else {
        $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>
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:specials.clangs.inc.php

示例14:

  </fieldset>
</form>';
}
echo '
<!-- *** OUTPUT CATEGORIES - END *** -->
';
// --------------------------------------------- ARTIKEL LISTE
echo '
<!-- *** OUTPUT ARTICLES - START *** -->';
// --------------------- READ TEMPLATES
if ($category_id > -1) {
    $TEMPLATES = new rex_sql();
    $TEMPLATES->setQuery('select * from ' . $REX['TABLE_PREFIX'] . 'template order by name');
    $TMPL_SEL = new rex_select();
    $TMPL_SEL->setName('template_id');
    $TMPL_SEL->setId('template_id');
    $TMPL_SEL->setSize(1);
    $TMPL_SEL->addOption($I18N->msg('option_no_template'), '0');
    for ($i = 0; $i < $TEMPLATES->getRows(); $i++) {
        if ($TEMPLATES->getValue('active') == 1) {
            $TMPL_SEL->addOption(rex_translate($TEMPLATES->getValue('name')), $TEMPLATES->getValue('id'));
        }
        $TEMPLATE_NAME[$TEMPLATES->getValue('id')] = rex_translate($TEMPLATES->getValue('name'));
        $TEMPLATES->next();
    }
    $TEMPLATE_NAME[0] = $I18N->msg('template_default_name');
    // --------------------- ARTIKEL LIST
    if (isset($amessage) and $amessage != '') {
        echo rex_warning($amessage);
    }
    $art_add_link = '';
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:structure.inc.php

示例15: switch

 }
 $dbchecked = array_fill(0, 6, '');
 switch ($createdb) {
     case 1:
     case 2:
     case 3:
     case 4:
         $dbchecked[$createdb] = ' checked="checked"';
         break;
     default:
         $dbchecked[0] = ' checked="checked"';
 }
 // Vorhandene Exporte auslesen
 $sel_export = new rex_select();
 $sel_export->setName('import_name');
 $sel_export->setId('rex-form-import-name');
 $sel_export->setSize(1);
 $sel_export->setStyle('class="form-control rex-js-import-name"');
 $sel_export->setAttribute('onclick', 'checkInput(\'createdb_3\')');
 $export_dir = rex_backup::getDir();
 $exports_found = false;
 if (is_dir($export_dir)) {
     if ($handle = opendir($export_dir)) {
         $export_archives = [];
         $export_sqls = [];
         while (($file = readdir($handle)) !== false) {
             if ($file == '.' || $file == '..') {
                 continue;
             }
             $isSql = substr($file, strlen($file) - 4) == '.sql';
             $isArchive = substr($file, strlen($file) - 7) == '.tar.gz';
开发者ID:alsahh,项目名称:redaxo,代码行数:31,代码来源:setup.php


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