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


PHP Table::flush_table方法代码示例

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


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

示例1: array

 function cat_select()
 {
     $return_string = Form::form_tag(SELF, 'get');
     $attr = array();
     $table = new Table(2, array('id' => 'cat_select'));
     foreach ($this->categories as $cat) {
         if (isset($_GET['Kategorie'])) {
             if (in_array(rawurlencode($cat['Name']), $_GET['Kategorie'])) {
                 $attr['checked'] = 'checked';
             } else {
                 unset($attr['checked']);
             }
         }
         if ($cat['Access'] == 'PUBLIC' || $this->check_right('KalenderExtern') || $this->check_right('KalenderIntern')) {
             $inputs[] = Form::add_input('checkbox', 'Kategorie[]', rawurlencode($cat['Name']), $attr);
             $labels[] = $cat['Name'];
         }
     }
     $submit = Form::add_input('submit', 'filter', 'Auswählen', array('class' => 'button'));
     //$table->add_td(array(array(2=>'Ansicht')));
     $table->add_caption('Ansicht');
     for ($i = 0; $i < count($inputs); $i++) {
         $table->add_td(array($labels[$i], $inputs[$i]));
     }
     $table->add_td(array(array(2 => $submit)), array('style' => 'text-align:center'));
     $return_string .= $table->flush_table() . Form::close_form();
     return $return_string;
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:28,代码来源:Kalender.php

示例2: array

 function group_table()
 {
     $group_table = '';
     $this->images['edit'] = Html::img('/Libraries/Icons/16x16/edit.png', 'Eigenschaften bearbeiten', array('title' => 'Eigenschaften bearbeiten'));
     $this->images['apply'] = Html::img('/Libraries/Icons/16x16/apply.png', 'Speichern');
     $this->images['apply_path'] = '/Libraries/Icons/16x16/apply.png';
     $this->images['checkbox_disabled_unchecked'] = Html::img('/Libraries/Icons/16x16/checkbox_disabled_unchecked.png', 'Nicht erlaubt');
     $this->images['checkbox_disabled_checked'] = Html::img('/Libraries/Icons/16x16/checkbox_disabled_checked.png', 'Erlaubt');
     $this->images['new_group'] = Html::img('/Libraries/Icons/16x16/add_group.png', 'Gruppe hinzufügen', array('title' => 'Gruppe hinzufügen'));
     $this->images['delete_group'] = Html::img('/Libraries/Icons/16x16/delete_group.png', 'Gruppe löschen', array('title' => 'Gruppe löschen'));
     $img_group = Html::img('/Libraries/Icons/16x16/edit_group.png', 'Gruppe');
     $cols = count($this->rechte) + 3;
     $table = new Table($cols, array('id' => 'groups_table'));
     $form_tag = Form::form_tag('/Admin/Gruppen');
     $form_close = Form::close_form();
     $th = array(Html::bold('Gruppe'));
     foreach ($this->rechte as $recht) {
         $th[] = $recht['RechtName'];
     }
     $table->add_th($th);
     $i = 0;
     foreach ($this->existent_groups as $group) {
         if (isset($_GET['editgroup']) && $_GET['editgroup'] == $group['id']) {
             $td = array(Form::add_input('text', 'name', $group['Name']));
             for ($j = 0; $j < count($this->rechte); $j++) {
                 if (in_array($this->rechte[$j]['id'], $group['Rechte'])) {
                     $td[] = Form::add_input('checkbox', 'Recht[]', $this->rechte[$j]['id'], array('checked' => 'checked'));
                 } else {
                     $td[] = Form::add_input('checkbox', 'Recht[]', $this->rechte[$j]['id']);
                 }
             }
             $id = Form::add_input('hidden', 'group_id', $group['id']);
             $old_name = Form::add_input('hidden', 'old_name', $group['Name']);
             $new_rechte_submit = Form::add_input('image', 'submit_rechte', 'Speichern', array('src' => $this->images['apply_path'], 'alt' => 'Speichern'));
             $td[] = $id . $old_name . $new_rechte_submit;
         } else {
             $td = array(Html::bold($group['Name']));
             for ($j = 0; $j < count($this->rechte); $j++) {
                 $td[] = in_array($this->rechte[$j]['id'], $group['Rechte']) ? $this->images['checkbox_disabled_checked'] : $this->images['checkbox_disabled_unchecked'];
             }
             $edit_button = Html::a('/Admin/Gruppen?editgroup=' . $group['id'], $this->images['edit'], array('title' => 'Eigenschaften bearbeiten'));
             $delete_button = Html::a('/Admin/Gruppen?deletegroup=' . $group['id'], $this->images['delete_group'], array('title' => 'Gruppe löschen', 'onclick' => "return confirm('Gruppe " . addcslashes($group['Name'], "'") . " löschen?')"));
             $td[] = $edit_button;
             $td[] = $delete_button;
         }
         $class = is_int($i / 2) ? 'abwechselnde_flaechen_1' : 'abwechselnde_flaechen_2';
         $table->add_td($td, array('class' => is_int($i / 2) ? 'abwechselnde_flaechen_1' : 'abwechselnde_flaechen_2'));
         $i++;
     }
     $new_group_button = Html::a('/Admin/Gruppen?newgroup', $this->images['new_group'] . ' Gruppe hinzufügen');
     if (isset($_GET['newgroup'])) {
         $td = array(Form::add_input('text', 'name', ''));
         for ($j = 0; $j < count($this->rechte); $j++) {
             $td[] = Form::add_input('checkbox', 'Recht[]', $this->rechte[$j]['id']);
         }
         $new_group_submit = Form::add_input('image', 'submit_newgroup', 'Speichern', array('src' => $this->images['apply_path'], 'alt' => 'Speichern'));
         $td[] = $id . $new_group_submit;
         $table->add_td($td);
     } else {
         $table->add_td(array(array(2 => $new_group_button)));
     }
     return $form_tag . $table->flush_table() . $form_close;
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:63,代码来源:Gruppen.php

示例3: array

 function user_table()
 {
     $user_table = '';
     $img_edit_group = Html::img('/' . INSTALL_PATH . '/Classes/Admin/Icons/16x16/edit_group.png', 'Gruppe ändern', array('title' => 'Gruppe ändern'));
     $img_delete_user = Html::img('/' . INSTALL_PATH . '/Classes/Admin/Icons/16x16/delete_user.png', 'Benutzer löschen', array('title' => 'Benutzer löschen'));
     $img_new_user = Html::img('/' . INSTALL_PATH . '/Classes/Admin/Icons/16x16/add_user.png', 'Benutzer hinzufügen', array('title' => 'Benutzer hinzufügen'));
     $img_edit = Html::img('/' . INSTALL_PATH . '/Classes/Admin/Icons/16x16/edit.png', 'Eigenschaften bearbeiten', array('title' => 'Eigenschaften bearbeiten'));
     $img_apply = Html::img('/' . INSTALL_PATH . '/Classes/Admin/Icons/16x16/apply.png', 'Speichern');
     $img_apply_path = '/' . INSTALL_PATH . '/Classes/Admin/Icons/16x16/apply.png';
     $img_pass = Html::img('/' . INSTALL_PATH . '/Classes/Admin/Icons/16x16/password.png', 'Passwort');
     $img_user = Html::img('/' . INSTALL_PATH . '/Classes/Admin/Icons/16x16/edit_user.png', 'Benutzername');
     $img_group = Html::img('/' . INSTALL_PATH . '/Classes/Admin/Icons/16x16/edit_group.png', 'Gruppe');
     $img_mail = Html::img('/' . INSTALL_PATH . '/Classes/Admin/Icons/16x16/mail_generic.png', 'E-Mail');
     $img_show_pw = Html::img('/' . INSTALL_PATH . '/Classes/Admin/Icons/16x16/14_layer_visible.png', 'Passwörter zeigen');
     $img_hide_pw = Html::img('/' . INSTALL_PATH . '/Classes/Admin/Icons/16x16/14_layer_novisible.png', 'Passwörter verstecken');
     $form = new Form();
     $table = new Table(5, array('id' => 'user_table'));
     $table->add_caption('Registrierte Benutzer');
     if (!isset($_GET['showpw'])) {
         $pwshow = Html::a($_SERVER['REDIRECT_URL'] . '?showpw', $img_show_pw, array('title' => 'Passwörter zeigen'));
     } else {
         $pwshow = Html::a($_SERVER['REDIRECT_URL'], $img_hide_pw, array('title' => 'Passwörter verstecken'));
     }
     $table->add_th(array('Benutzer', 'E-Mail', 'Passwort ' . $pwshow, 'Gruppe'));
     for ($i = 0; $i < count($this->existent_users); $i++) {
         $select = new Select('gruppe');
         foreach ($this->existent_groups as $group) {
             if ($this->existent_users[$i]['Group'] == $group) {
                 $attr['selected'] = 'selected';
             } else {
                 unset($attr['selected']);
             }
             $select->add_option(rawurlencode($group), $group, $attr);
         }
         $groups_select = $select->flush_select();
         if (!isset($_GET['showpw'])) {
             $show_password = '*****';
         } else {
             $show_password = $this->existent_users[$i]['Password'];
         }
         if (isset($_GET['editgroup'])) {
             $id = $_GET['editgroup'];
             if ($id == $this->existent_users[$i]['id']) {
                 $editgroup_submit = $form->add_input('image', 'submit_edit_group', '', array('src' => $img_apply_path, 'alt' => 'Speichern'));
                 $editgroup_submit_id = $form->add_input('hidden', 'id', $id);
                 $groupshow = $groups_select . $editgroup_submit_id . $editgroup_submit;
             } else {
                 $groupshow = $this->existent_users[$i]['Group'];
             }
         } else {
             $groupshow = $this->existent_users[$i]['Group'];
         }
         //$edit_group_button = Html::a($_SERVER['REDIRECT_URL'].'?editgroup='.$this->existent_users[$i]['id'],$img_edit_group);
         $edit_user_button = Html::a($_SERVER['REDIRECT_URL'] . '?edituser=' . $this->existent_users[$i]['id'], $img_edit);
         $delete_user_confirm = array('onclick' => 'return confirm(\'Wollen Sie ' . $this->existent_users[$i]['Name'] . ' wirklich löschen?\')');
         $delete_user_button = Html::a($_SERVER['REDIRECT_URL'] . '?deleteuser=' . $this->existent_users[$i]['id'], $img_delete_user, $delete_user_confirm);
         $user_row = array($this->existent_users[$i]['Name'], $this->existent_users[$i]['E-Mail'], $show_password, $groupshow, $edit_user_button . $edit_group_button . $delete_user_button);
         if (isset($_GET['edituser'])) {
             $id = $_GET['edituser'];
             if ($id == $this->existent_users[$i]['id']) {
                 $edit_user_form_name = $form->add_input('text', 'edit_user_name', $this->existent_users[$i]['Name'], array('size' => '12'));
                 $edit_user_form_pass = $form->add_input('text', 'edit_user_pass', $this->existent_users[$i]['Password'], array('size' => '12'));
                 $edit_user_form_mail = $form->add_input('text', 'edit_user_mail', $this->existent_users[$i]['E-Mail'], array('size' => '12'));
                 $edit_user_form_id = $form->add_input('hidden', 'edit_user_id', $id);
                 $edit_user_form_submit = $form->add_input('image', 'submit_edit_user', 'Speichern', array('src' => $img_apply_path, 'alt' => 'Speichern'));
                 $user_row = array($img_user . $edit_user_form_name, $img_mail . $edit_user_form_mail, $img_pass . $edit_user_form_pass, $img_group . $groups_select, $edit_user_form_submit . $edit_user_form_id);
             }
         }
         $table->add_td($user_row, array('class' => is_int($i / 2) ? 'abwechselnde_flaechen_1' : 'abwechselnde_flaechen_2'));
     }
     $new_user_link = Html::a($_SERVER['REDIRECT_URL'] . '?newuser', $img_new_user . ' Benutzer hinzufügen');
     if (isset($_GET['newuser'])) {
         $new_user_form_name = $form->add_input('text', 'new_user_name', '', array('size' => '12'));
         $new_user_form_pass = $form->add_input('text', 'new_user_pass', '', array('size' => '12'));
         $new_user_form_mail = $form->add_input('text', 'new_user_mail', '', array('size' => '12'));
         $new_user_form_submit = $form->add_input('image', 'submit_new_user', 'Speichern', array('src' => $img_apply_path, 'alt' => 'Speichern'));
         $table->add_td(array($img_user . $new_user_form_name, $img_mail . $new_user_form_mail, $img_pass . $new_user_form_pass, $img_group . $groups_select, $new_user_form_submit));
     } else {
         $table->add_td(array(array(2 => $new_user_link)));
     }
     return $form->form_tag('/Admin/User/') . $table->flush_table() . $form->close_form();
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:82,代码来源:User.php

示例4: foreach

 function module_table()
 {
     $this->installed = $this->connection->db_assoc("SELECT * FROM `RheinaufCMS>Module` WHERE `SYSTEM` = 0 ORDER BY `id` ASC");
     $this->available_modules = RheinaufFile::dir_array(INSTALL_PATH . '/Module', false, 'php');
     foreach ($this->available_modules as $module) {
         $class_name = preg_replace('/\\.php/', '', $module);
         if ($module != 'Navi.php') {
             if (RheinaufFile::is_file(INSTALL_PATH . '/Module/' . $class_name . '/Install.php')) {
                 include_once INSTALL_PATH . '/Module/' . $class_name . '/Install.php';
                 $class_name .= 'Install';
             } else {
                 include_once $module;
             }
         }
         if (is_callable(array($class_name, 'about'))) {
             eval('$module_about = ' . $class_name . '::about();');
             switch ($module_about['type']) {
                 case 'inPage':
                     $this->inPageModules[] = $module_about;
                     break;
                 case 'installable':
                     $this->installableModules[] = $module_about;
                     break;
             }
         }
     }
     $return_string = '';
     $this->return .= Html::h(3, 'Installierbare Module');
     $table = new Table(2);
     $table->add_th(array('Installierbare Module', 'Installierte Module'));
     $form = new Form();
     $form->form_tag(SELF_URL);
     $installed_modules = array();
     foreach ($this->installed as $installed) {
         $installed_modules[] = $installed['Name'];
     }
     $installables_select = new Select('installable', array('size' => '10', 'style' => 'width:150px'));
     foreach ($this->installableModules as $modul) {
         if (!in_array($modul['Name'], $installed_modules)) {
             $installables_select->add_option(rawurlencode($modul['Name']), $modul['Name']);
         }
     }
     $installed_select = new Select('installed', array('size' => '10', 'style' => 'width:150px'));
     foreach ($installed_modules as $modul) {
         $installed_select->add_option(rawurlencode($modul), $modul);
     }
     $table->add_td(array($installables_select->flush_select(), $installed_select->flush_select()));
     $install_submit = Form::add_input('submit', 'install', 'Installieren');
     $uninstall_submit = Form::add_input('submit', 'uninstall', 'Deinstallieren');
     $table->add_td(array($install_submit, $uninstall_submit), array('style' => 'text-align:center'));
     $form->add_custom($table->flush_table());
     $this->return .= $form->flush_form();
     $this->return .= Html::h(3, 'Aufruf über Template');
     $table = new Table(2, array('style' => 'width:500px'));
     $table->add_th(array('Modul', 'Einbindung'));
     foreach ($this->inPageModules as $module) {
         $table->add_td(array(Html::bold($module['Name']), $module['Usage']));
     }
     $this->return .= $table->flush_table();
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:60,代码来源:Module.php

示例5: current


//.........这里部分代码省略.........
                            } else {
                                $GLOBALS['scripts'] .= Html::script('xinha_editors.push("' . $id . '")');
                            }
                        }
                        break;
                    case 'upload':
                        $attr_array['id'] = $id;
                        $input = $value ? $value . Form::add_input('hidden', $encoded_name, $value, $attr_array) . Html::br() . Html::span('Neue Datei verknüpfen:', array('class' => 'klein')) . Html::br() : '';
                        $input .= Form::add_input('file', $encoded_name . '_upload');
                        break;
                    case 'custom':
                        $input = $col['custom_input'];
                        break;
                    case 'timestamp':
                        $this->calendar_script();
                        $attr_array['id'] = 'tag_' . $GLOBALS['input_id'];
                        $attr_array['size'] = '2';
                        $input = Form::add_input('text', $encoded_name . '_tag', ($tag = Date::tag($value)) != 0 && $value != '' ? $tag : '', $attr_array) . '.';
                        $attr_array['id'] = 'monat_' . $GLOBALS['input_id'];
                        $attr_array['size'] = '2';
                        $input .= Form::add_input('text', $encoded_name . '_monat', ($monat = Date::monat($value)) != 0 && $value != '' ? $monat : '', $attr_array) . '.';
                        $attr_array['id'] = 'jahr_' . $GLOBALS['input_id'];
                        $attr_array['size'] = '2';
                        $input .= Form::add_input('text', $encoded_name . '_jahr', ($jahr = Date::jahr($value)) != 0 && $value != '' ? $jahr : '', $attr_array) . '&emsp;';
                        $attr_array['id'] = 'stunde_' . $GLOBALS['input_id'];
                        $attr_array['size'] = '2';
                        $input .= Form::add_input('text', $encoded_name . '_stunde', ($stunde = Date::stunde($value)) != 0 && $value != '' ? $stunde : '', $attr_array) . ':';
                        $attr_array['id'] = 'minute_' . $GLOBALS['input_id'];
                        $attr_array['size'] = '2';
                        $input .= Form::add_input('text', $encoded_name . '_minute', ($minute = Date::minute($value)) != 0 && $value != '' ? $minute : '', $attr_array);
                        $input .= Form::add_input('hidden', $encoded_name, $value, array('id' => $id));
                        $input .= Form::add_input('button', '', 'Kalender', array('id' => 'trigger_' . $GLOBALS['input_id']));
                        $script = '
						Calendar.setup(
							{
								inputField : "' . $id . '", // ID of the input field
								ifFormat : "%Y/%m/%d", // the date format
								button : "trigger_"+' . $GLOBALS['input_id'] . ', // ID of the button
								showsTime : false,
								timeFormat : "24",
								showOthers : true,
								onSelect : onSelect,
								onUpdate : onUpd,
								inputId : ' . $GLOBALS['input_id'] . ',
								prevInput : "test"

							}
						);
						timefields.push("' . $id . '");
				';
                        $input .= Html::script($script);
                        break;
                    case 'email':
                        preg_match('/(.*?)<?([0-9a-z.+-]{2,}\\@[0-9a-z.-]{2,}\\.[a-z]{2,6})>?/', $value, $matches);
                        $name_value = trim($matches[1]);
                        $mail_value = $matches[2];
                        $attr_array['id'] = 'name_' . $GLOBALS['input_id'];
                        $input = 'Name ' . Form::add_input('text', $encoded_name . '_name', $name_value, $attr_array);
                        $attr_array['id'] = 'mail_' . $GLOBALS['input_id'];
                        $input .= 'E-Mail ' . Form::add_input('text', $encoded_name . '_mail', $mail_value, $attr_array);
                        break;
                    case 'info':
                        $input = $col['value'];
                        $hidden_inputs .= Form::add_input('hidden', $encoded_name, $value, $attr_array);
                        break;
                    case 'hidden':
                        $attr_array['id'] = $id;
                        $hidden_inputs .= Form::add_input('hidden', $encoded_name, $value, $attr_array);
                        $input = '';
                        break;
                    case 'ignore':
                        unset($input);
                        break;
                }
                if ($col['required'] && $input) {
                    if ($col['type'] == 'timestamp') {
                        $input .= Html::script("\nrequired_fields.push('" . 'tag_' . $GLOBALS['input_id'] . "');");
                        $input .= Html::script("\nrequired_fields.push('" . 'monat_' . $GLOBALS['input_id'] . "');");
                        $input .= Html::script("\nrequired_fields.push('" . 'jahr_' . $GLOBALS['input_id'] . "');");
                    } else {
                        $input .= Html::script("\nrequired_fields.push('{$id}');");
                    }
                }
                if ($input) {
                    $table->add_td(array(Form::add_label($id, $show_name), $input));
                }
                $GLOBALS['input_id']++;
            }
        }
        $input = $this->submit_button ? $this->submit_button : Form::add_input('submit', 'submit', 'Eintragen', array('class' => 'button'));
        if ($edit) {
            $input .= Form::add_input('hidden', 'edit_id', $edit);
        }
        $input .= Form::add_input('hidden', 'submit', 'submit');
        $input .= $hidden_inputs;
        $table->add_td(array('', $input));
        $return .= $table->flush_table();
        $return .= Form::close_form();
        return $return;
    }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:101,代码来源:FormScaffold.php

示例6: editor

    function pages_table($j)
    {
        $rubrik = $this->navi[$j]['Rubrik'];
        $rubrik = $this->I18n_get_real($rubrik);
        $return_string = '';
        $GLOBALS['scripts'] .= Html::script('
		var editor_win = null;
		function editor (r,s)
		{
			editor_win = window.open("/Admin/SeiteEdit?edit_page=" +r+ "&edit="+s,"Editor","resizable=yes,status=no");
			editor_win.focus();
		}
		');
        $navi_table = new Table(3);
        $navi_table->add_caption('Seiten in ' . $rubrik);
        $rubrik_folder = $this->path_encode($rubrik);
        $navi_table->add_th(array('Live-Version', 'Arbeits-Version'), array('style:padding-right:5px;'));
        for ($i = 0; $i < count($this->navi[$j]['Subnavi']); $i++) {
            if (!empty($this->navi[$j]['Subnavi'][$i]) && $this->navi[$j]['Subnavi'][$i]['Modul'] == '') {
                $name = $this->I18n_get_real($this->navi[$j]['Subnavi'][$i]['Seite']);
                $seite_folder = $this->path_encode($name);
                $edit_button = Html::a(SELF_URL . '?edit_page=' . $i . '&edit=' . $j, $name . $this->images['edit'], array('onclick' => "editor({$i},{$j});return false"));
                $working_version_button = Html::a(SELF_URL . '?workingversion&edit_page=' . $i . '&edit=' . $j, $name . $this->images['edit'], array('onclick' => "window.open('/Admin/SeiteEdit?workingversion&edit_page={$i}&edit={$j}','Editor','resizable=yes,status=no');return false"));
                $vorschau_button = ' ' . Html::a('/' . rawurlencode($rubrik_folder) . '/' . rawurlencode($seite_folder) . '/Arbeitsversion/', 'Vorschau');
                $golive_button = ' | ' . Html::a(SELF_URL . '?golive&edit_page=' . $i . '&edit=' . $j, 'Go Live!');
                $navi_table->add_td(array($edit_button, $working_version_button, $vorschau_button . $golive_button), array('style:padding-right:5px;'));
            }
        }
        $return_string .= $navi_table->flush_table();
        return $return_string;
    }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:31,代码来源:SeiteEdit.php

示例7: array

 function neu_form()
 {
     $this->form_scripts();
     $required = array();
     for ($i = 0; $i < count($this->fields); $i++) {
         if ($this->fields[$i]['required']) {
             $required[] = preg_replace('#[^\\w\\.]#', '_', $this->fields[$i]['name']);
         }
     }
     $required = General::array2js('required', $required);
     $form_tag = Form::form_tag(SELF . '?input', 'post', 'multipart/form-data', array('onsubmit' => 'return checkform()'));
     $form_close = Form::close_form();
     $this->scripts .= Html::script($required);
     //$this->scripts .= Html::script('',array('src'=>'/'.INSTALL_PATH.'/Module/BuddyListe/BuddyListe.js'));
     $spalten = 2;
     $table = new Table($spalten, array('id' => 'formtable'));
     $table->id_tbody('form_tbody');
     foreach ($this->fields as $field) {
         $show_name = $field['show_name'] != '' ? $field['show_name'] : $field['name'];
         $show_name = $field['required'] ? $show_name . Html::span('*', array('style' => 'color:red;cursor:help', 'title' => 'Dieses Feld muss ausgefüllt werden.')) : $show_name;
         $encoded_name = rawurlencode($field['name']);
         $id = Html::html_legal_id($field['name']);
         switch ($field['input_type']) {
             case 'text':
                 $parameters = array();
                 $parameters['id'] = $id;
                 if (isset($field['length'])) {
                     $parameters['size'] = $field['length'];
                     $parameters['maxlength'] = $field['length'];
                 } else {
                     $parameters['size'] = 40;
                 }
                 $input = Form::add_input('text', $encoded_name, '', $parameters);
                 break;
             case 'select':
                 $select = new Select($encoded_name, array('id' => $id));
                 $select->add_option('--Bitte auswählen--');
                 foreach ($field['options'] as $option) {
                     $select->add_option(rawurlencode($option), $option);
                 }
                 if ($field['sonstiges']) {
                     $select->add_option('', 'Sonstige:', array('onclick' => 'sonstig_input(this,\'' . rawurlencode($encoded_name) . '\')'));
                 }
                 $input = $select->flush_select();
                 break;
             case 'check':
                 $input = '';
                 foreach ($field['options'] as $option) {
                     $input .= Form::add_input('checkbox', $encoded_name . '[]', rawurlencode($option)) . ' ' . $option . '<br />';
                 }
                 break;
             case 'textarea':
                 $input = Form::add_textarea($encoded_name, '', array('id' => $id, 'cols' => '35', 'rows' => '2', 'onfocus' => 'textarea_grow(\'' . $id . '\')', 'onblur' => 'textarea_shrink(\'' . $id . '\')'));
                 break;
         }
         $table->add_td(array($show_name, $input));
     }
     $fileinput = Form::add_input('file', 'bild[0]');
     $table->add_td(array('Bild 1', $fileinput . Html::a('javascript:;', Html::img('/RheinaufCMS/Module/BuddyListe/edit_add.png', 'Plus', array('title' => 'Noch ein Bild', 'onclick' => 'add_file_upload()')))));
     $table->add_td(array(Form::add_input('submit', 'submit_new_buddyentry', 'Eintragen')), array('style' => 'border-top:1px solid #33466B'));
     $page = new Template(INSTALL_PATH . '/Module/BuddyListe/Templates/Form.template.html');
     $vars['form'] = $form_tag . $table->flush_table() . $form_close;
     return $page->parse_template('TEMPLATE', $vars);
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:64,代码来源:BuddyListe.php

示例8: install

 function install()
 {
     if (isset($_POST['cat_submit'])) {
         $create_categorytable_sql = "CREATE TABLE `RheinaufCMS>Kalender>Kategorien` (\n\t\t\t\t\t\t\t\t\t\t\t`id` INT NOT NULL ,\n\t\t\t\t\t\t\t\t\t\t\t`Name` TEXT NOT NULL ,\n\t\t\t\t\t\t\t\t\t\t\t`Gruppen` TEXT NOT NULL ,\n\t\t\t\t\t\t\t\t\t\t\t`event` TINYINT DEFAULT '0' NOT NULL,\n\t\t\t\t\t\t\t\t\t\t\tPRIMARY KEY ( `id` )\n\t\t\t\t\t\t\t\t\t\t\t)";
         $this->connection->db_query($create_categorytable_sql);
         $cat_array = unserialize(urldecode($_POST['categories']));
         for ($i = 0; $i < count($cat_array); $i++) {
             $id = $i;
             $name = $cat_array[$i]['Name'];
             $event = $cat_array[$i]['event'];
             $gruppen = '';
             $insert_cat_sql = "INSERT INTO `RheinaufCMS>Kalender>Kategorien`\n\t\t\t\t\t\t\t\t\t\t\t\t( `id` , `Name` , `Gruppen` , `event` )\n\t\t\t\t\t\t\t\t\t\tVALUES \t('{$id}', '{$name}', '{$gruppen}', '{$event}')";
             $this->connection->db_query($insert_cat_sql);
         }
         $create_datatable_sql = "CREATE TABLE `RheinaufCMS>Kalender>Termine` (\n\t\t\t\t\t\t\t\t\t  `id` int(10) NOT NULL auto_increment,\n\t\t\t\t\t\t\t\t\t  `wann` timestamp(14) NOT NULL,\n\t\t\t\t\t\t\t\t\t  `wer_ueber` varchar(100) NOT NULL default '',\n\t\t\t\t\t\t\t\t\t  `wer_text` longtext NOT NULL,\n\t\t\t\t\t\t\t\t\t  `presse` text,\n\t\t\t\t\t\t\t\t\t  `cafe_logo` varchar(100) NOT NULL default '',\n\t\t\t\t\t\t\t\t\t  `bild` varchar(100) NOT NULL default '',\n\t\t\t\t\t\t\t\t\t  `was` varchar(200) NOT NULL default '',\n\t\t\t\t\t\t\t\t\t  `kostet` varchar(10) NOT NULL default '',\n\t\t\t\t\t\t\t\t\t  `verantwortlich` text NOT NULL,\n\t\t\t\t\t\t\t\t\t  `pass` varchar(30) NOT NULL default '',\n\t\t\t\t\t\t\t\t\t  `event` tinyint(1) default '0',\n\t\t\t\t\t\t\t\t\t  PRIMARY KEY  (`id`),\n\t\t\t\t\t\t\t\t\t  UNIQUE KEY `pass` (`pass`),\n\t\t\t\t\t\t\t\t\t  KEY `wann` (`wann`),\n\t\t\t\t\t\t\t\t\t  KEY `event` (`event`),\n\t\t\t\t\t\t\t\t\t  KEY `was` (`was`)\n\t\t\t\t\t\t\t\t\t) TYPE=MyISAM ";
         $this->connection->db_query($create_datatable_sql);
         Module::install('KalenderAdmin', true);
     } else {
         $img_apply = Html::img('/' . INSTALL_PATH . '/Libraries/Icons/16x16/apply.png', 'Speichern');
         $img_apply_path = '/' . INSTALL_PATH . '/Libraries/Icons/16x16/apply.png';
         $img_add = Html::img('/' . INSTALL_PATH . '/Libraries/Icons/16x16/edit_add.png', 'Neu');
         $img_add_path = '/' . INSTALL_PATH . '/Libraries/Icons/16x16/edit_add.png';
         $return_string = '';
         $form = new Form();
         $return_string .= $form->form_tag('/Admin/Module?new=KalenderAdmin');
         $table = new Table(2);
         $table->add_caption('Kalender einrichten');
         if (isset($_POST['categories'])) {
             $cat_array = unserialize(urldecode($_POST['categories']));
         }
         if (isset($_POST['new_category'])) {
             $new = array('Name' => $_POST['new_category']['Name'], 'event' => $_POST['new_category']['event'] ? 1 : 0);
             $cat_array[] = $new;
         }
         for ($i = 0; $i < count($cat_array); $i++) {
             $table->add_td(array($cat_array[$i]['Name'], $cat_array[$i]['event']));
         }
         if (isset($_POST['newcategory'])) {
             $new_cat_name = Form::add_input('text', "new_category[Name]");
             $new_cat_event = Form::add_input('checkbox', "new_category[event]", 1);
             $newcategory_submit = Form::add_input('image', 'newcategory_submit', 'Speichern', array('src' => $img_apply_path));
             $table->add_td(array($new_cat_name, $new_cat_event . $newcategory_submit));
         }
         $cat_input = Form::add_input('hidden', 'categories', urlencode(serialize($cat_array)));
         $add_button = Form::add_input('image', 'newcategory', 'Kategorie hinzufügen', array('src' => $img_add_path));
         $table->add_td(array(array(2 => $add_button . 'Neue Kategorie' . $cat_input)));
         $all_submit = Form::add_input('image', 'cat_submit', 'Speichern', array('src' => $img_apply_path));
         $table->add_td(array(array(2 => $all_submit . 'Speichern')));
         $return_string .= $table->flush_table() . $form->close_form();
         print $return_string;
     }
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:52,代码来源:KalenderAdmin.php

示例9: current


//.........这里部分代码省略.........
                            } else {
                                $GLOBALS['scripts'] .= Html::script('xinha_editors.push("' . $id . '")');
                            }
                        }
                        break;
                    case 'upload':
                        $attr_array['id'] = $id;
                        $input = $value ? $value . Form::add_input('hidden', $encoded_name, $value, $attr_array) . Html::br() . Html::span('Neue Datei verknüpfen:', array('class' => 'klein')) . Html::br() : '';
                        $input .= Form::add_input('file', $encoded_name . '_upload');
                        break;
                    case 'custom':
                        $input = $col['custom_input'];
                        break;
                    case 'timestamp':
                        $this->calendar_script();
                        $attr_array['id'] = 'tag_' . $GLOBALS['input_id'];
                        $attr_array['size'] = '2';
                        $input = Form::add_input('text', $encoded_name . '_tag', ($tag = Date::tag($value)) != 0 && $value != '' ? $tag : '', $attr_array) . '.';
                        $attr_array['id'] = 'monat_' . $GLOBALS['input_id'];
                        $attr_array['size'] = '2';
                        $input .= Form::add_input('text', $encoded_name . '_monat', ($monat = Date::monat($value)) != 0 && $value != '' ? $monat : '', $attr_array) . '.';
                        $attr_array['id'] = 'jahr_' . $GLOBALS['input_id'];
                        $attr_array['size'] = '2';
                        $input .= Form::add_input('text', $encoded_name . '_jahr', ($jahr = Date::jahr($value)) != 0 && $value != '' ? $jahr : '', $attr_array) . '&emsp;';
                        $attr_array['id'] = 'stunde_' . $GLOBALS['input_id'];
                        $attr_array['size'] = '2';
                        $input .= Form::add_input('text', $encoded_name . '_stunde', ($stunde = Date::stunde($value)) != 0 && $value != '' ? $stunde : '', $attr_array) . ':';
                        $attr_array['id'] = 'minute_' . $GLOBALS['input_id'];
                        $attr_array['size'] = '2';
                        $input .= Form::add_input('text', $encoded_name . '_minute', ($minute = Date::minute($value)) != 0 && $value != '' ? $minute : '', $attr_array);
                        $input .= Form::add_input('hidden', $encoded_name, $value, array('id' => $id));
                        $input .= Form::add_input('button', '', 'Kalender', array('id' => 'trigger_' . $GLOBALS['input_id']));
                        $script = '
						Calendar.setup(
							{
								inputField : "' . $id . '", // ID of the input field
								ifFormat : "%Y/%m/%d", // the date format
								button : "trigger_"+' . $GLOBALS['input_id'] . ', // ID of the button
								showsTime : false,
								timeFormat : "24",
								showOthers : true,
								onSelect : onSelect,
								onUpdate : onUpd,
								inputId : ' . $GLOBALS['input_id'] . ',
								prevInput : "test"

							}
						);
						timefields.push("' . $id . '");
				';
                        $input .= Html::script($script);
                        break;
                    case 'email':
                        preg_match('/(.*?)<?([0-9a-z.+-]{2,}\\@[0-9a-z.-]{2,}\\.[a-z]{2,6})>?/', $value, $matches);
                        $name_value = trim($matches[1]);
                        $mail_value = $matches[2];
                        $attr_array['id'] = 'name_' . $GLOBALS['input_id'];
                        $input = 'Name ' . Form::add_input('text', $encoded_name . '_name', $name_value, $attr_array);
                        $attr_array['id'] = 'mail_' . $GLOBALS['input_id'];
                        $input .= 'E-Mail ' . Form::add_input('text', $encoded_name . '_mail', $mail_value, $attr_array);
                        break;
                    case 'info':
                        $input = $col['value'];
                        $hidden_inputs .= Form::add_input('hidden', $encoded_name, $value, $attr_array);
                        break;
                    case 'hidden':
                        $attr_array['id'] = $id;
                        $hidden_inputs .= Form::add_input('hidden', $encoded_name, $value, $attr_array);
                        $input = '';
                        break;
                    case 'ignore':
                        unset($input);
                        break;
                }
                if ($col['required'] && $input) {
                    if ($col['type'] == 'timestamp') {
                        $input .= Html::script("\nrequired_fields.push('" . 'tag_' . $GLOBALS['input_id'] . "');");
                        $input .= Html::script("\nrequired_fields.push('" . 'monat_' . $GLOBALS['input_id'] . "');");
                        $input .= Html::script("\nrequired_fields.push('" . 'jahr_' . $GLOBALS['input_id'] . "');");
                    } else {
                        $input .= Html::script("\nrequired_fields.push('{$id}');");
                    }
                }
                if ($input) {
                    $table->add_td(array(Form::add_label($id, $show_name), $input));
                }
                $GLOBALS['input_id']++;
            }
        }
        $input = $this->submit_button ? $this->submit_button : Form::add_input('submit', 'submit', 'Eintragen', array('class' => 'button'));
        if ($edit) {
            $input .= Form::add_input('hidden', 'edit_id', $edit);
        }
        $input .= Form::add_input('hidden', 'submit', 'submit');
        $input .= $hidden_inputs;
        $table->add_td(array('', $input));
        $return .= $table->flush_table();
        $return .= Form::close_form();
        return $return;
    }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:101,代码来源:FormScaffold.php

示例10: array

 function pages_table($j)
 {
     $return_string .= Form::form_tag($_SERVER['REDIRECT_URL'] . '?edit=' . $j, 'post', 'application/x-www-form-urlencoded', array('onsubmit' => 'return dublette(document.getElementById(\'new_page_name\').value,\'seiten\')'));
     $navi_table = new Table(3);
     $navi_table->add_caption('Seiten in ' . $this->I18n_get_real($this->navi[$j]['Rubrik']));
     $navi_table->add_th(array('', 'Name', ''));
     for ($i = 0; $i < count($this->navi[$j]['Subnavi']); $i++) {
         if (isset($_GET['edit_page']) && $_GET['edit_page'] == $i && !isset($_GET['visible'])) {
             $name = $this->navi[$j]['Subnavi'][$i]['Seite'];
             $name_input = $_SESSION['RheinaufCMS_User']['Group'] == 'dev' ? Form::add_input('text', 'name', $name) : Html::bold($name) . Form::add_input('hidden', 'name', $name);
             if ($this->navi[$j]['Subnavi'][$i]['Show'] == 1) {
                 $visible_checked = array('checked' => 'checked', 'title' => 'Sichtbarkeit im Hauptmenü');
             } else {
                 $visible_checked = array('title' => 'Sichtbarkeit im Hauptmenü');
             }
             $visble_checkbox = Form::add_input('checkbox', 'Show', 1, $visible_checked);
             $id = Form::add_input('hidden', 'page_id', $i);
             $old_name = Form::add_input('hidden', 'oldname', $this->navi[$j]['Subnavi'][$i]['Seite']);
             $apply_button = Form::add_input('image', 'submit_edit_page', 'Speichern', array('src' => $this->images['img_apply_path'], 'alt' => 'Speichern', 'title' => 'Speichern'));
             $navi_table->add_td(array($id . $old_name . $visble_checkbox, $name_input, $apply_button . $this->buttons['cancel_page']));
             $module_select = $this->modules_select(preg_replace("/\\(.*/", "", $this->navi[$j]['Subnavi'][$i]['Modul']));
             if ($module_select) {
                 $navi_table->add_td(array('', Html::bold('Modul') . Html::br() . $module_select));
             }
             $ext_link_input = Html::bold('URL ') . '(optional) ' . Html::br() . Form::add_input('text', 'ext_link', rawurldecode($this->navi[$j]['Subnavi'][$i]['ext_link']), array('id' => 'ext_link_page'));
             $navi_table->add_td(array('', $ext_link_input, isset($_GET['browse']) ? '' : Html::br() . Html::a($_SERVER['REDIRECT_URL'] . '?browse&amp;edit_page=' . $i . '&amp;edit=' . $j, $this->images['browse'])));
             if (isset($_GET['browse'])) {
                 $navi_table->add_td(array('', $this->make_tree('ext_link_page')));
             }
             $navi_table->add_td(array('', $this->groups_select($_GET['edit'], $i)));
         } else {
             if (!empty($this->navi[$j]['Subnavi'][$i]) && $this->navi[$j]['Subnavi'][$i]['Seite'] != 'index') {
                 if ($this->navi[$j]['Subnavi'][$i]['Show'] == 0) {
                     $visible_img = $this->images['invisible'];
                     $visible_button = Html::a($_SERVER['REDIRECT_URL'] . '?visible=1&amp;edit_page=' . $i . '&amp;edit=' . $j, $visible_img);
                 } else {
                     $visible_img = $this->images['visible'];
                     $visible_button = Html::a($_SERVER['REDIRECT_URL'] . '?visible=0&amp;edit_page=' . $i . '&amp;edit=' . $j, $visible_img);
                 }
                 $modul = $this->navi[$j]['Subnavi'][$i]['Modul'] != '' ? $this->images['modul'] : '';
                 $locked = $this->navi[$j]['Subnavi'][$i]['Show_to'] != '' ? $this->images['locked'] : '';
                 $international = strstr($this->navi[$j]['Subnavi'][$i]['Seite'], '{I18n') ? $this->images['intern'] : '';
                 $name = $this->I18n_get_real($this->navi[$j]['Subnavi'][$i]['Seite']);
                 $edit_button = Html::a($_SERVER['REDIRECT_URL'] . '?edit_page=' . $i . '&amp;edit=' . $j, $this->images['edit']);
                 $delete_button = Html::a($_SERVER['REDIRECT_URL'] . '?delete_page=' . $i . '&amp;edit=' . $j, $this->images['delete'], array('onclick' => "return delete_confirm('{$name}')"));
                 $navi_table->add_td(array($visible_button, $modul . $locked . $international . $name, $edit_button . $delete_button));
             }
         }
     }
     $add_page_button = Html::a($_SERVER['REDIRECT_URL'] . '?newpage&amp;edit=' . $j, $this->images['new_file'] . 'Neue Seite');
     $reihenfolge_button = Html::a($_SERVER['REDIRECT_URL'] . '?reorder_pages&amp;edit=' . $j, $this->images['order'] . 'Reihenfolge ändern');
     if (isset($_GET['newpage'])) {
         $name_input = Form::add_input('text', 'new_name', '', array('title' => 'Name', 'id' => 'new_page_name'));
         $visble_check = Form::add_input('checkbox', 'Show', 1, array('checked' => 'checked', 'title' => 'Sichtbarkeit im Hauptmenü'));
         $count = Form::add_input('hidden', 'count', count($this->navi));
         $apply_button = Form::add_input('image', 'submit_new_page', 'Speichern', array('src' => $this->images['img_apply_path'], 'alt' => 'Speichern', 'title' => 'Speichern'));
         $navi_table->add_td(array($visble_check, $count . $name_input, $apply_button . $this->buttons['cancel_page']));
         $ext_link_input = Html::bold('URL ') . '(optional) ' . Html::br() . Form::add_input('text', 'ext_link', $this->navi[$i]['ext_link'], array('id' => 'ext_link_page'));
         $navi_table->add_td(array('', $ext_link_input, isset($_GET['browse']) ? '' : Html::br() . Html::a($_SERVER['REDIRECT_URL'] . '?browse&amp;newpage&amp;edit=' . $j, $this->images['browse'])));
         if (isset($_GET['browse'])) {
             $navi_table->add_td(array('', $this->make_tree('ext_link_page')));
         }
         $navi_table->add_td(array('', $this->groups_select()));
     } else {
         $navi_table->add_td(array(array(2 => $add_page_button)));
         $navi_table->add_td(array(array(2 => $reihenfolge_button)));
     }
     $return_string .= $navi_table->flush_table();
     $return_string .= Form::close_form();
     return $return_string;
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:71,代码来源:NaviEdit.php

示例11: Table

 function select_room()
 {
     $table = new Table(5);
     $new_room_button = Html::a('/Admin/RheinaufExhibitionAdmin/Rooms?new', 'Neuer Raum', array('class' => 'button'));
     $order_rooms_button = Html::a('/Admin/RheinaufExhibitionAdmin/Rooms?orderrooms', 'Räume anordnen', array('class' => 'button'));
     foreach ($this->rooms as $room) {
         $name = $room['Roomname'];
         $add_button = Html::a(SELF . '?add=' . $room['RoomId'], 'Bilder hinzufügen', array('class' => 'button'));
         $order_button = Html::a(SELF . '?order=' . $room['RoomId'], 'Bilder anordnen/löschen', array('class' => 'button'));
         $edit_button = Html::a(SELF . '?edit=' . $room['RoomId'], 'Bearbeiten', array('class' => 'button'));
         $rename_button = Html::a(SELF . '?rename_room=' . $room['RoomId'], 'Umbenennen', array('class' => 'button'));
         $loeschen_button = Html::a(SELF . '?deleteroom=' . $room['RoomId'], 'Löschen', array('class' => 'button', 'onclick' => "return confirm('Wirklich löschen?')"));
         $table->add_td(array($name, $add_button, $order_button, $rename_button, $loeschen_button));
     }
     return Html::h(2, 'Bitte auswählen:') . $table->flush_table() . $new_room_button . $order_rooms_button;
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:16,代码来源:rooms.php

示例12: Table

 function select_exhibition()
 {
     $table = new Table(5);
     $new_exhibition_button = Html::a('/Admin/RheinaufExhibitionAdmin/Exhibitions?new', 'Neue Ausstellung', array('class' => 'button'));
     $order_exhibitions_button = Html::a('/Admin/RheinaufExhibitionAdmin/Exhibitions?orderexhibitions', 'Ausstellungen anordnen', array('class' => 'button'));
     foreach ($this->exhibitions as $exhibition) {
         $name = $exhibition['Exhibitionname'];
         $add_button = Html::a(SELF . '?add=' . $exhibition['ExhibitionId'], 'Räume hinzufügen', array('class' => 'button'));
         $order_button = Html::a(SELF . '?order=' . $exhibition['ExhibitionId'], 'Räume anordnen/löschen', array('class' => 'button'));
         $edit_button = Html::a(SELF . '?edit=' . $exhibition['ExhibitionId'], 'Bearbeiten', array('class' => 'button'));
         $rename_button = Html::a(SELF . '?rename_exhibition=' . $exhibition['ExhibitionId'], 'Umbenennen', array('class' => 'button'));
         $loeschen_button = Html::a(SELF . '?deleteexhibition=' . $exhibition['ExhibitionId'], 'Löschen', array('class' => 'button', 'onclick' => "return confirm('Wirklich löschen?')"));
         $table->add_td(array($name, $add_button, $order_button, $rename_button, $loeschen_button));
     }
     return Html::h(2, 'Bitte auswählen:') . $table->flush_table() . $new_exhibition_button . $order_exhibitions_button;
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:16,代码来源:exhibitions.php

示例13: Table

 function frontend_module_table()
 {
     $this->frontend_not_installed = RheinaufFile::dir_array(INSTALL_PATH . '/Module', false, 'php');
     $return_string = '';
     $table = new Table(1);
     $table->add_caption('Frontend-Module');
     $installed_modules = array();
     foreach ($this->frontend_installed as $installed) {
         $installed_modules[] = $installed['Name'];
     }
     foreach ($this->frontend_not_installed as $not_installed) {
         $not_installed = preg_replace('#(.*?).php$#', "\$1", $not_installed);
         if (!in_array($not_installed, $installed_modules)) {
             $table->add_td(array('<em>' . $not_installed . '</em>' . Html::a('/Admin/Module?newfrontend=' . rawurlencode($not_installed), '&gt;&gt;', array('title' => 'Installieren'))));
         }
     }
     foreach ($this->frontend_installed as $installed) {
         $table->add_td(array($installed['Name']));
     }
     $this->return .= $table->flush_table();
 }
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:21,代码来源:Module.php

示例14: array


//.........这里部分代码省略.........
                            $this->xinha_scripts();
                        }
                        break;
                    case 'upload':
                        $input = '';
                        $value = $values[$key];
                        $entries = array();
                        if (!is_array($value)) {
                            $entries = explode('&delim;', $value);
                        } else {
                            $entries = $value;
                        }
                        $upload_folder = '';
                        if (is_string($this->upload_folder)) {
                            $this->upload_folder = array($this->upload_folder);
                        }
                        foreach ($this->upload_folder as $col_name) {
                            $upload_folder .= $values[$col_name];
                        }
                        $upload_folder .= '/';
                        if (count(General::trim_array($entries)) > 0) {
                            $subtable = new Table(3);
                            foreach ($entries as $file) {
                                $img_info = @getimagesize($this->upload_path . $upload_folder . $file);
                                if ($img_info) {
                                    $thumb = Html::img(SELF_URL . '?img=' . rawurlencode($upload_folder . $file) . '&amp;x=100', $file);
                                } else {
                                    $thumb = '';
                                }
                                $check = Form::add_input('hidden', $encoded_name . '[]', $file);
                                $check .= Html::br() . Form::add_input('checkbox', $encoded_name . '_delfile[]', $file, array("onclick" => "confirmDelPic(this)")) . ' Datei löschen';
                                $subtable->add_td(array($thumb, $file . $check));
                            }
                            $input .= $subtable->flush_table();
                            if ($col['upload_max_count']) {
                                $input .= Html::span("Maximal " . $col['upload_max_count'] . " Dateien" . Html::br(), array('class' => 'klein'));
                            }
                        }
                        if ($col['upload_max_count'] && count(General::trim_array($entries)) >= $col['upload_max_count']) {
                            continue;
                        }
                        $attr_array['id'] = $id;
                        //$input = ($value) ? $value.Form::add_input('hidden',$encoded_name,$value,$attr_array).Html::br().Html::span('Neue Datei verknüpfen:',array('class'=>'klein')).Html::br():'';
                        $input .= Form::add_input('file', $encoded_name . '_upload[]');
                        //	if ($col['upload_max_count'])
                        //	{
                        $input .= Form::add_input('submit', 'reentry', 'Hochladen');
                        //	}
                        if ($col['upload_extensions']) {
                            $input .= Html::br() . Html::span("Erlaubte Erweiterungen: " . implode(', ', $col['upload_extensions']), array('class' => 'klein'));
                        }
                        if ($col['upload_size']) {
                            $input .= Html::br() . Html::span("Maximale Dateigröße: " . $col['upload_size'] . 'KB', array('class' => 'klein'));
                        }
                        break;
                    case 'EFM':
                        break;
                    case 'custom':
                        $input = $col['custom_input'];
                        break;
                    case 'timestamp':
                        $this->calendar_script();
                        $attr_array['id'] = 'tag_' . $GLOBALS['input_id'];
                        $attr_array['size'] = '2';
                        $input = Form::add_input('text', $encoded_name . '_tag', ($tag = Date::tag($value)) != 0 && $value != '' ? $tag : '', $attr_array) . '.';
                        $attr_array['id'] = 'monat_' . $GLOBALS['input_id'];
开发者ID:BackupTheBerlios,项目名称:rheinaufcms-svn,代码行数:67,代码来源:Scaffold.php


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