예제 #1
0
    $delete = 'deleteType';
    $list->addColumn($delete, '', -1, array('', '<td>###VALUE###</td>'));
    $list->setColumnParams($delete, array('type_id' => '###id###', 'func' => 'delete'));
    $list->addLinkAttribute($delete, 'onclick', 'return confirm(\'' . $I18N->msg('delete') . ' ?\')');
    $list->setColumnFormat($delete, 'custom', create_function('$params', 'global $REX;
             $list = $params["list"];
             if($list->getValue("status") == 1)
             {
                 return \'' . $I18N->msg('imanager_type_system') . '\';
             }
             return $list->getColumnLink("' . $delete . '","' . $I18N->msg('imanager_type_delete') . '");'));
    $list->show();
} elseif ($func == 'add' || $func == 'edit' && $type_id > 0) {
    if ($func == 'edit') {
        $formLabel = $I18N->msg('imanager_type_edit');
    } elseif ($func == 'add') {
        $formLabel = $I18N->msg('imanager_type_create');
    }
    rex_register_extension('REX_FORM_CONTROL_FIElDS', 'rex_imanager_handle_form_control_fields');
    $form = rex_form::factory($REX['TABLE_PREFIX'] . '679_types', $formLabel, 'id=' . $type_id);
    $form->addErrorMessage(REX_FORM_ERROR_VIOLATE_UNIQUE_KEY, $I18N->msg('imanager_error_type_name_not_unique'));
    $field =& $form->addTextField('name');
    $field->setLabel($I18N->msg('imanager_type_name'));
    $field =& $form->addTextareaField('description');
    $field->setLabel($I18N->msg('imanager_type_description'));
    if ($func == 'edit') {
        $form->addParam('type_id', $type_id);
    }
    $form->show();
}
echo '</div>';
예제 #2
0
    $edit = 'editCol';
    $list->addColumn($edit, $I18N->msg('seo42_redirect_edit'), -1, array('', '<td>###VALUE###</td>'));
    $list->setColumnParams($edit, array('func' => 'edit', 'redirect_id' => $redirect_id, 'redirect_id' => '###id###'));
    $delete = 'deleteCol';
    $list->addColumn($delete, $I18N->msg('seo42_redirect_delete'), -1, array('', '<td>###VALUE###</td>'));
    $list->setColumnParams($delete, array('redirect_id' => '###id###', 'func' => 'delete'));
    $list->addLinkAttribute($delete, 'onclick', 'return confirm(\'' . $I18N->msg('seo42_redirect_delete_confirm') . '\');');
    $list->show();
} elseif ($func == 'add' || $func == 'edit' && $redirect_id > 0) {
    // rex form
    if ($func == 'edit') {
        $formLabel = $I18N->msg('seo42_redirect_redirect_edit');
    } elseif ($func == 'add') {
        $formLabel = $I18N->msg('seo42_redirect_redirect_add');
    }
    $form = rex_form::factory($REX['TABLE_PREFIX'] . 'redirects', $formLabel, 'id=' . $redirect_id);
    $form->addErrorMessage(REX_FORM_ERROR_VIOLATE_UNIQUE_KEY, $I18N->msg('seo42_redirect_redirect_exists'));
    // source url
    $field =& $form->addTextField('source_url');
    $field->setLabel($I18N->msg('seo42_redirect_source_url'));
    $field->setAttribute('id', 'source-url');
    // target url
    $field =& $form->addTextField('target_url');
    $field->setLabel($I18N->msg('seo42_redirect_target_url'));
    $field->setAttribute('id', 'target-url');
    if (seo42_utils::redirectsDoExpire() && $func == 'edit') {
        $field =& $form->addReadOnlyField('create_date');
        $field->setLabel($I18N->msg('seo42_redirect_create_date'));
        $field =& $form->addTextField('expire_date');
        $field->setLabel($I18N->msg('seo42_redirect_expire_date'));
    }
예제 #3
0
if ($func == '') {
    $list = rex_list::factory('
    SELECT v.vid, v.name, v.street, v.city 
    FROM ' . $REX['ADDON']['dbpref']['events'] . 'venues v
    ORDER BY vid
    LIMIT 10;');
    $imgHeader = '<a href="' . $list->getUrl(array('func' => 'add')) . '"><img src="media/metainfo_plus.gif" alt="add" title="add" /></a>';
    $list->setColumnSortable('name');
    $list->setColumnSortable('city');
    $list->addColumn($imgHeader, '<img src="media/metainfo.gif" alt="field" title="field" />', 0, array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
    $list->setColumnParams($imgHeader, array('func' => 'edit', 'vid' => '###vid###'));
    $list->setColumnLabel('name', 'Veranstaltungsort');
    $list->setColumnLabel('street', 'Stra&szlig;e');
    $list->setColumnLabel('city', 'Stadt');
    $list->removeColumn('vid');
    $list->setColumnLayout('eid', array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
    $list->setColumnParams('name', array('func' => 'edit', 'vid' => '###vid###'));
    $list->show();
} elseif ($func == 'edit' || $func == 'add') {
    $form = rex_form::factory($REX['ADDON']['dbpref']['events'] . 'venues', 'Veranstaltungsorte', 'vid=' . $vid);
    $field =& $form->addTextField('name');
    $field->setLabel('Veranstaltungsort');
    $field =& $form->addTextField('street');
    $field->setLabel('Stra&szlig;e');
    $field =& $form->addTextField('city');
    $field->setLabel('Stadt');
    if ($func == 'edit') {
        $form->addParam('eid', $id);
    }
    $form->show();
}
예제 #4
0
    $thIcon = '<a class="rex-i-element rex-i-generic-add" href="' . $list->getUrl(array('func' => 'add')) . '"><span class="rex-i-element-text">Ansicht erstellen</span></a>';
    $tdIcon = '<span class="rex-i-element rex-i-generic"><span class="rex-i-element-text">###name###</span></span>';
    $list->addColumn($thIcon, $tdIcon, 0, array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
    $list->setColumnParams($thIcon, array('func' => 'edit', 'article_id' => '###id###'));
    // functions column spans 2 data-columns
    $funcs = $I18N->msg('hide_startarticle_functions');
    $list->addColumn($funcs, $I18N->msg('hide_startarticle_edit'), -1, array('<th colspan="2">###VALUE###</th>', '<td>###VALUE###</td>'));
    $list->setColumnParams($funcs, array('func' => 'edit', 'article_id' => $article_id, 'article_id' => '###id###'));
    $delete = $I18N->msg('deleteCol');
    $list->addColumn($delete, $I18N->msg('hide_startarticle_delete'), -1, array('', '<td>###VALUE###</td>'));
    $list->setColumnParams($delete, array('article_id' => '###id###', 'func' => 'delete'));
    $list->addLinkAttribute($delete, 'onclick', 'return confirm(\'' . $I18N->msg('delete') . ' ?\')');
    $list->show();
} elseif ($func == 'add' || $func == 'edit' && $article_id > 0) {
    if ($func == 'edit') {
        $formLabel = $I18N->msg('hide_startarticle_formlabel_edit');
    } else {
        if ($func == 'add') {
            $formLabel = $I18N->msg('hide_startarticle_formlabel_add');
        }
    }
    $form = rex_form::factory($REX['TABLE_PREFIX'] . 'hidden_startarticles', $formLabel, 'id=' . $article_id);
    $form->addErrorMessage(REX_FORM_ERROR_VIOLATE_UNIQUE_KEY, $I18N->msg('hide_startarticle_article_exists'));
    $field =& $form->addLinkmapField('article_id');
    $field->setLabel($I18N->msg('hide_startarticle_select'));
    if ($func == 'edit') {
        $form->addParam('article_id', $article_id);
    }
    $form->show();
}
echo '</div>';
     $field->setLabel($I18N_STELLEN->msg('interne_bezeichnung'));
     // HR4YOU Katageorie ID
     if (OOPlugin::isAvailable('d2u_stellenmarkt', 'hr4you_sync')) {
         $field = $form->addTextField('hr4you_berufskategorie_id');
         $field->setLabel($I18N_STELLEN->msg('hr4you_berufskategorie_id'));
     }
     if ($func == 'edit') {
         $form->addParam('entry_id', $entry_id);
     }
     // Trigger für SEO42 Pathlist Update
     $form->addParam('seo42', 'update');
     $form->show();
 } else {
     // CLANG wird in variable $subform uebergeben; -1 da Sprachen mit ID 0 beginnen, PHP diesen Wert aber nicht uebermittelt
     $clang_id = $subform - 1;
     $form = rex_form::factory($REX['TABLE_PREFIX'] . 'd2u_stellenmarkt_kategorien_lang', $I18N_STELLEN->msg('kategorien') . " " . $REX['CLANG'][$clang_id], "kategorie_id = " . $entry_id . " AND clang_id = " . $clang_id, "post", false);
     // Formularauswahl
     $form->addRawField(raw_field("", $lang_chooser));
     // Kategorie ID
     $field = $form->addHiddenField('kategorie_id');
     $field->setValue($entry_id);
     // Clang ID
     $field = $form->addHiddenField('clang_id');
     $field->setValue($clang_id);
     // Name
     $field = $form->addTextField('name');
     $field->setLabel($I18N_STELLEN->msg('name'));
     $form->addParam('subform', $subform);
     if ($func == 'edit') {
         $form->addParam('entry_id', $entry_id);
     }
예제 #6
0
 } else {
     if ($func == 'deleteHashtag') {
         $id = rex_request('id', 'int');
         $del = rex_sql::factory();
         $del->setQuery('DELETE FROM ' . rex::getTablePrefix() . 'socialhub_instagram_hashtag WHERE `id` = "' . $id . '"');
         echo 'Hashtag wurde gelöscht';
         //todo: translate
     } else {
         if ($func == 'addTimeline' || $func == 'editTimeline') {
             $id = rex_request('id', 'int');
             if ($func == 'editTimeline') {
                 $formLabel = $this->i18n('instagram_settings_timelines_formcaption_edit');
             } elseif ($func == 'addTimeline') {
                 $formLabel = $this->i18n('instagram_settings_timelines_formcaption_add');
             }
             $form = rex_form::factory(rex::getTablePrefix() . 'socialhub_instagram_timeline', '', 'id=' . $id);
             //Start - add title-field
             $field = $form->addTextField('title');
             $field->setLabel($this->i18n('instagram_settings_timelines_label_title'));
             //End - add title-field
             //Start - add user_id-field
             $field = $form->addTextField('user_id');
             $field->setLabel($this->i18n('instagram_settings_timelines_label_user_id'));
             //End - add user_id-field
             if ($func == 'editTimeline') {
                 $form->addParam('id', $id);
             }
             $content = $form->get();
             $fragment = new rex_fragment();
             $fragment->setVar('class', 'edit', false);
             $fragment->setVar('title', $formLabel, false);
예제 #7
0
    $list->setColumnSortable('name');
    $list->setColumnSortable('city');
    $list->addColumn($imgHeader, '<img src="media/metainfo.gif" alt="field" title="field" />', 0, array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
    $list->setColumnParams($imgHeader, array('func' => 'edit', 'oid' => '###oid###'));
    $list->setColumnLabel('name', 'Veranstalter');
    $list->setColumnLabel('url', 'Website');
    $list->setColumnLabel('tel', 'Telefon');
    $list->setColumnLabel('email', 'Email-Adresse');
    $list->setColumnLabel('street', 'Stra&szlig;e');
    $list->setColumnLabel('city', 'Stadt');
    $list->removeColumn('oid');
    $list->setColumnLayout('eid', array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
    $list->setColumnParams('name', array('func' => 'edit', 'oid' => '###oid###'));
    $list->show();
} elseif ($func == 'edit' || $func == 'add') {
    $form = rex_form::factory($REX['ADDON']['dbpref']['events'] . 'orgs', 'Veranstalter', 'oid=' . $oid);
    $field =& $form->addTextField('name');
    $field->setLabel('Veranstalter');
    $field =& $form->addInputField('url', 'url');
    $field->setLabel('Website');
    $field =& $form->addInputField('email', 'email');
    $field->setLabel('Email-Adresse');
    $field =& $form->addInputField('tel', 'tel');
    $field->setLabel('Telefon');
    $field =& $form->addTextField('street');
    $field->setLabel('Stra&szlig;e');
    $field =& $form->addTextField('city');
    $field->setLabel('Stadt');
    if ($func == 'edit') {
        $form->addParam('eid', $id);
    }
예제 #8
0
                    return $list->getColumnLink("archive", buttonSetToArchive($list->getValue("id")));'));
    $list->setColumnFormat('article', 'custom', create_function('$params', '$list = $params["list"];
                    return displayArticle($list->getValue("article"));'));
    $list->setColumnSortable('name');
    $list->show();
}
// Hinzufuegen und Editieren
if ($func == "add" || $func == "edit") {
    // JS fuer Counter einfuegen
    print echo_js_for_counter($REX_NEWS_CONF['max_items']);
    $legend = "News anlegen";
    if ($func == 'edit') {
        $legend = "News editieren";
    }
    //  function factory($tableName, $fieldset, $whereCondition, $method = 'post', $debug = false, $class = null)
    $form = rex_form::factory(TBL_NEWS, $legend, 'id=' . $id, 'post', false, 'rex_form_news_extended2');
    $form->addParam('clang', $clang);
    if ($func == 'edit') {
        $form->addParam('id', $id);
    }
    // kategorie
    $field = $form->addSelectField('category');
    $field->setLabel("Kategorie");
    $select = $field->getSelect();
    $select->setMultiple(true);
    $select->setSize(3);
    $select->addOption("Bitte wählen", 99999);
    $qry = 'SELECT id, name from ' . TBL_NEWS_CATS;
    $sql = new rex_sql();
    $data = $sql->getArray($qry);
    if (is_array($data) && sizeof($data) > 0) {
예제 #9
0
    $list->setColumnSortable('name');
    $imgHeader = '<a href="' . $list->getUrl(array('func' => 'add')) . '"><img src="media/metainfo_plus.gif" alt="add" title="add" /></a>';
    // Hinzufuegen Button
    $list->addColumn($imgHeader, '<img src="media/metainfo.gif" alt="field" title="field" />', 0, array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
    // Edit Button unterhalb des hinzufuegen Buttons
    $list->setColumnParams($imgHeader, array('func' => 'edit', 'entry_id' => '###kontakt_id###'));
    // Labels
    $list->setColumnLabel('kontakt_id', $I18N_STELLEN->msg('id'));
    $list->setColumnLabel('name', $I18N_STELLEN->msg('name'));
    // Edit Funktion auf Zeileneintrag
    $list->setColumnParams('kontakt_id', array('func' => 'edit', 'entry_id' => '###kontakt_id###'));
    $list->setColumnParams('name', array('func' => 'edit', 'entry_id' => '###kontakt_id###'));
    // Liste anzeigen
    $list->show();
} elseif ($func == 'edit' || $func == 'add') {
    $form = rex_form::factory($REX['TABLE_PREFIX'] . 'd2u_stellenmarkt_kontakt', $I18N_STELLEN->msg('kontakte'), "kontakt_id = " . $entry_id, "post", false);
    // Formularauswahl
    $form->addRawField(raw_field("", $lang_chooser));
    // Name
    $field = $form->addTextField('name');
    $field->setLabel($I18N_STELLEN->msg('name'));
    // Bild
    $field = $form->addMediaField('bild');
    $field->setLabel($I18N_STELLEN->msg('bild'));
    // Telefon
    $field = $form->addTextField('telefon');
    $field->setLabel($I18N_STELLEN->msg('telefon'));
    // E-Mail
    $field = $form->addTextField('email');
    $field->setLabel($I18N_STELLEN->msg('email'));
    if ($func == 'edit') {
    $list->setColumnLayout('edit', ['<th class="rex-table-action" colspan="2">###VALUE###</th>', '<td class="rex-table-action">###VALUE###</td>']);
    $list->setColumnParams('edit', ['func' => 'edit', 'pid' => '###pid###']);
    $list->addColumn('delete', '<i class="rex-icon rex-icon-delete"></i> ' . $this->i18n('delete'));
    $list->setColumnLabel('delete', $this->i18n('function'));
    $list->setColumnLayout('delete', ['', '<td class="rex-table-action">###VALUE###</td>']);
    $list->setColumnParams('delete', ['func' => 'delete', 'wildcard_id' => '###id###']);
    $list->addLinkAttribute('delete', 'data-confirm', $this->i18n('delete') . ' ?');
    $content .= $list->get();
    $fragment = new rex_fragment();
    $fragment->setVar('title', $title);
    $fragment->setVar('content', $content, false);
    $content = $fragment->parse('core/page/section.php');
} else {
    $title = $func == 'edit' ? $this->i18n('edit') : $this->i18n('add');
    \rex_extension::register('REX_FORM_CONTROL_FIELDS', '\\Sprog\\Extension::wildcardFormControlElement');
    $form = rex_form::factory(rex::getTable('sprog_wildcard'), '', 'pid = ' . $pid);
    $form->addParam('pid', $pid);
    $form->setApplyUrl(rex_url::currentBackendPage());
    $form->setLanguageSupport('id', 'clang_id');
    $form->setEditMode($func == 'edit');
    if ($func == 'add' && rex::getUser()->getComplexPerm('clang')->hasAll()) {
        $field = $form->addTextField('wildcard', rex_request('wildcard_name', 'string', null));
        $field->setNotice($this->i18n('wildcard_without_tag'));
    } else {
        $field = $form->addReadOnlyField('wildcard', rex_request('wildcard_name', 'string', null));
    }
    $field->setLabel($this->i18n('wildcard'));
    $field->getValidator()->add('notEmpty', $this->i18n('wildcard_error_no_wildcard'));
    $field = $form->addTextAreaField('replace');
    $field->setLabel($this->i18n('wildcard_replace'));
    $content .= $form->get();
예제 #11
0
 } else {
     if ($func == 'deleteAccount') {
         $id = rex_request('id', 'int');
         $del = rex_sql::factory();
         $del->setQuery('DELETE FROM ' . rex::getTablePrefix() . 'socialhub_facebook_account WHERE `id` = "' . $id . '"');
         echo 'Account wurde gelöscht';
         //todo: translate
     } else {
         if ($func == 'addTimeline' || $func == 'editTimeline') {
             $id = rex_request('id', 'int');
             if ($func == 'editTimeline') {
                 $formLabel = $this->i18n('facebook_settings_timelines_formcaption_edit');
             } elseif ($func == 'addTimeline') {
                 $formLabel = $this->i18n('facebook_settings_timelines_formcaption_add');
             }
             $form = rex_form::factory(rex::getTablePrefix() . 'socialhub_facebook_timeline', '', 'id=' . $id);
             //Start - add title-field
             $field = $form->addTextField('title');
             $field->setLabel($this->i18n('facebook_settings_timelines_label_title'));
             //End - add title-field
             //Start - add user_id-field
             $field = $form->addTextField('user_id');
             $field->setLabel($this->i18n('facebook_settings_timelines_label_user_id') . ' <a href="http://findmyfbid.com/">' . $this->i18n('facebook_settings_timelines_label_user_id_help') . '</a>');
             //End - add user_id-field
             if ($func == 'editTimeline') {
                 $form->addParam('id', $id);
             }
             $content = $form->get();
             $fragment = new rex_fragment();
             $fragment->setVar('class', 'edit', false);
             $fragment->setVar('title', $formLabel, false);
예제 #12
0
    $list->addColumn($imgHeader, '<img src="media/metainfo.gif" alt="field" title="field" />', 0, array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
    $list->setColumnParams($imgHeader, array('func' => 'edit', 'eid' => '###eid###'));
    $list->setColumnLabel('date', 'Datum');
    $list->setColumnLabel('time', 'Zeit');
    $list->setColumnLabel('venue', 'Ort');
    $list->setColumnLabel('name', 'Veranstaltung');
    $list->removeColumn('description');
    $list->setColumnLabel('url', 'Webadresse');
    $list->setColumnLabel('organizer', 'Veranstalter');
    $list->setColumnlabel('age', 'Alter');
    $list->removeColumn('eid');
    $list->setColumnLayout('eid', array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
    $list->setColumnParams('name', array('func' => 'edit', 'eid' => '###eid###'));
    $list->show();
} elseif ($func == 'edit' || $func == 'add') {
    $form = rex_form::factory($REX['ADDON']['dbpref']['events'] . 'events', 'Termine', 'eid=' . $eid, 'post', false);
    $field =& $form->addTextField('name');
    $field->setLabel('Veranstaltung');
    $field =& $form->addTextAreaField('description');
    $field->setLabel('Beschreibung');
    $field =& $form->addInputField('date', 'date');
    $field->setLabel('Datum');
    $field =& $form->addInputField('time', 'time');
    $field->setLabel('Uhrzeit');
    $field =& $form->addSelectField('oid');
    $field->setLabel('Veranstalter');
    $select =& $field->getSelect();
    $select->setSize(1);
    $query = 'SELECT name as label, oid FROM ' . $REX['ADDON']['dbpref']['events'] . 'orgs';
    $select->addSqlOptions($query);
    $field =& $form->addSelectField('vid');
예제 #13
0
    // Hinzufuegen Button
    $list->addColumn($imgHeader, '<img src="media/metainfo.gif" alt="field" title="field" />', 0, array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
    // Edit Button unterhalb des hinzufuegen Buttons
    $list->setColumnParams($imgHeader, array('func' => 'edit', 'entry_id' => '###ort_id###'));
    // Labels
    $list->setColumnLabel('ort_id', $I18N_KURSE->msg('id'));
    $list->setColumnLabel('ortsname', $I18N_KURSE->msg('ortsname'));
    $list->setColumnLabel('kategoriename', $I18N_KURSE->msg('ort_kategorie'));
    // Edit Funktion auf Zeileneintrag
    $list->setColumnParams('ort_id', array('func' => 'edit', 'entry_id' => '###ort_id###'));
    $list->setColumnParams('ortsname', array('func' => 'edit', 'entry_id' => '###ort_id###'));
    $list->setColumnParams('kategoriename', array('func' => 'edit', 'entry_id' => '###ort_id###'));
    // Liste anzeigen
    $list->show();
} elseif ($func == 'edit' || $func == 'add') {
    $form = rex_form::factory($REX['TABLE_PREFIX'] . 'd2u_kurse_orte', $I18N_KURSE->msg('orte'), "ort_id = " . $entry_id, "post", false);
    // Name
    $field = $form->addTextField('name');
    $field->setLabel($I18N_KURSE->msg('name'));
    $field->setAttribute('maxlenght', '25');
    // Laengengrad
    $field = $form->addTextField('laengengrad');
    $field->setLabel($I18N_KURSE->msg('laengengrad'));
    // Breitengrad
    $field = $form->addTextField('breitengrad');
    $field->setLabel($I18N_KURSE->msg('breitengrad'));
    // Hinweis Geocoding
    $form->addRawField(raw_field('&nbsp;<br>&nbsp;', $I18N_KURSE->msg('hinweis_geocoding')));
    // Strasse
    $field = $form->addTextField('strasse');
    $field->setLabel($I18N_KURSE->msg('strasse'));
예제 #14
0
             return $str;'));
    $list->addColumn('delete', $I18N->msg('cronjob_delete'), -1, array('', '<td style="text-align:center;">###VALUE###</td>'));
    $list->setColumnParams('delete', array('func' => 'delete', 'oid' => '###id###'));
    $list->addLinkAttribute('delete', 'onclick', "return confirm('" . $I18N->msg('cronjob_really_delete') . "');");
    $list->addColumn('execute', $I18N->msg('cronjob_execute'), -1, array('', '<td style="text-align:center;">###VALUE###</td>'));
    $list->setColumnParams('execute', array('func' => 'execute', 'oid' => '###id###'));
    $list->setColumnFormat('execute', 'custom', create_function('$params', 'global $I18N;
             $list = $params["list"];
             if (strpos($list->getValue("environment"),"|1|") !== false && class_exists($list->getValue("type")))
                 return $list->getColumnLink("execute",$I18N->msg("cronjob_execute"));
             return "<span class=\\"rex-strike\\">".$I18N->msg("cronjob_execute")."</span>";'));
    $list->show();
} elseif ($func == 'edit' || $func == 'add') {
    require_once $REX['INCLUDE_PATH'] . '/addons/cronjob/classes/class.form.inc.php';
    $fieldset = $func == 'edit' ? $I18N->msg('cronjob_edit') : $I18N->msg('cronjob_add');
    $form = rex_form::factory(REX_CRONJOB_TABLE, $fieldset, 'id = ' . $oid, 'post', false, 'rex_cronjob_form');
    $form->addParam('oid', $oid);
    $form->setApplyUrl('index.php?page=cronjob');
    $form->setEditMode($func == 'edit');
    $form->addHiddenField('nexttime');
    $field =& $form->addSelectField('type');
    $field->setLabel($I18N->msg('cronjob_type'));
    $select =& $field->getSelect();
    $select->setSize(1);
    $typeFieldId = $field->getAttribute('id');
    $types = rex_cronjob_manager::getTypes();
    $cronjobs = array();
    foreach ($types as $class) {
        $cronjob = rex_cronjob::factory($class);
        if (rex_cronjob::isValid($cronjob)) {
            $cronjobs[$class] = $cronjob;
예제 #15
0
파일: effects.php 프로젝트: staabm/redaxo
    $content = $list->get();
    $footer = '<a class="btn btn-back" href="' . rex_url::currentBackendPage() . '">' . rex_i18n::msg('media_manager_back') . '</a>';
    $fragment = new rex_fragment();
    $fragment->setVar('title', rex_i18n::RawMsg('media_manager_effect_caption', $typeName), false);
    $fragment->setVar('content', $content, false);
    $fragment->setVar('footer', $footer, false);
    $content = $fragment->parse('core/page/section.php');
    echo $content;
} elseif ($func == 'add' && $type_id > 0 || $func == 'edit' && $effect_id > 0 && $type_id > 0) {
    $effectNames = rex_media_manager::getSupportedEffectNames();
    if ($func == 'edit') {
        $formLabel = rex_i18n::RawMsg('media_manager_effect_edit_header', htmlspecialchars($typeName));
    } elseif ($func == 'add') {
        $formLabel = rex_i18n::RawMsg('media_manager_effect_create_header', htmlspecialchars($typeName));
    }
    $form = rex_form::factory(rex::getTablePrefix() . 'media_manager_type_effect', '', 'id=' . $effect_id);
    // image_type_id for reference to save into the db
    $form->addHiddenField('type_id', $type_id);
    // effect prio
    $field = $form->addPrioField('priority');
    $field->setLabel(rex_i18n::msg('media_manager_effect_priority'));
    $field->setLabelField('effect');
    $field->setWhereCondition('type_id = ' . $type_id);
    // effect name als SELECT
    $field = $form->addSelectField('effect');
    $field->setLabel(rex_i18n::msg('media_manager_effect_name'));
    $select = $field->getSelect();
    $select->addOptions($effectNames, true);
    $select->setSize(1);
    $script = '
    <script type="text/javascript">
예제 #16
0
    $delete = 'deleteCol';
    $list->addColumn($delete, $I18N->msg('website_manager_website_delete'), -1, array('', '<td>###VALUE###</td>'));
    $list->setColumnParams($delete, array('website_id' => '###id###', 'func' => 'delete'));
    $list->addLinkAttribute($delete, 'onclick', 'alert(\'' . $I18N->msg('website_manager_website_delete_editmode') . '\'); return false;');
    $list->show();
    // prio switch
    rex_website_manager_prio_switch::printSwitch(array($I18N->msg('website_manager_prio_mode'), $I18N->msg('website_manager_prio_mode_on'), $I18N->msg('website_manager_prio_mode_off')), false);
} elseif ($func == 'add' || $func == 'edit' && $website_id > 0) {
    if ($func == 'edit') {
        $formLabel = $I18N->msg('website_manager_website_website_edit');
        $defaultId = null;
    } elseif ($func == 'add') {
        $formLabel = $I18N->msg('website_manager_website_website_add');
        $defaultId = '1';
    }
    $form = rex_form::factory('rex_website', $formLabel, 'id=' . $website_id);
    $form->addErrorMessage(REX_FORM_ERROR_VIOLATE_UNIQUE_KEY, $I18N->msg('website_manager_website_id_exists'));
    // color
    $field =& $form->addTextField('color');
    $field->setLabel($I18N->msg('website_manager_website_color'));
    $field->setAttribute('id', 'color-picker');
    $field->setAttribute('style', 'visibility: hidden; height: 20px;');
    // domain
    $field =& $form->addTextField('domain');
    $field->setLabel($I18N->msg('website_manager_website_domain'));
    // title
    $field =& $form->addTextField('title');
    $field->setLabel($I18N->msg('website_manager_website_title'));
    // start article id
    $field =& $form->addTextField('start_article_id', $defaultId);
    // addLinkmapField
예제 #17
0
    // Hinzufuegen Button
    $list->addColumn($imgHeader, '<img src="media/metainfo.gif" alt="field" title="field" />', 0, array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
    // Edit Button unterhalb des hinzufuegen Buttons
    $list->setColumnParams($imgHeader, array('func' => 'edit', 'entry_id' => '###kurskategorie_id###'));
    // Labels
    $list->setColumnLabel('kurskategorie_id', $I18N_KURSE->msg('id'));
    $list->setColumnLabel('kursname', $I18N_KURSE->msg('kategoriename'));
    $list->setColumnLabel('elternname', $I18N_KURSE->msg('elternkategorie'));
    // Edit Funktion auf Zeileneintrag
    $list->setColumnParams('kurskategorie_id', array('func' => 'edit', 'entry_id' => '###kurskategorie_id###'));
    $list->setColumnParams('kursname', array('func' => 'edit', 'entry_id' => '###kurskategorie_id###'));
    $list->setColumnParams('elternname', array('func' => 'edit', 'entry_id' => '###kurskategorie_id###'));
    // Liste anzeigen
    $list->show();
} elseif ($func == 'edit' || $func == 'add') {
    $form = rex_form::factory($REX['TABLE_PREFIX'] . 'd2u_kurse_kategorien', $I18N_KURSE->msg('kategorie'), "kurskategorie_id = " . $entry_id, "post", false);
    // Name
    $field = $form->addTextField('name');
    $field->setLabel($I18N_KURSE->msg('name'));
    $field->setAttribute('maxlenght', '25');
    // Farbe
    $field = $form->addTextField('farbe');
    $field->setLabel($I18N_KURSE->msg('farbe'));
    // Bild
    $field = $form->addMediaField('bild');
    $field->setLabel($I18N_KURSE->msg('bild'));
    // Elternkategorie
    $field = $form->addSelectField('eltern_kurskategorie_id');
    $field->setLabel($I18N_KURSE->msg('elternkategorie'));
    $elternkategorie = $field->getSelect();
    $elternkategorie->setSize(1);
예제 #18
0
            $list->setColumnParams('status', ['func' => 'setstatus', 'id' => '###id###', 'neuerstatus' => $sql->getValue('id')]);
            $status .= $list->getColumnLink('status', '<i class="rex-icon ' . $current . ' ' . $sql->getValue('icon') . ' "></i>');
            $sql->next();
        }
        $status .= "</div>";
        return $status;
    });
    $content = '<div id="aufgaben">' . $list->get() . '</div>';
    $fragment = new rex_fragment();
    $fragment->setVar('title', $this->i18n('aufgaben_title'));
    $fragment->setVar('content', $content, false);
    echo $fragment->parse('core/page/section.php');
} elseif ($func == 'edit' || $func == 'add') {
    $fieldset = $func == 'edit' ? $this->i18n('aufgaben_edit') : $this->i18n('aufgaben_add');
    $id = rex_request('id', 'int');
    $form = rex_form::factory(rex::getTablePrefix() . 'aufgaben', '', 'id=' . $id);
    $field = $form->addTextField('title');
    $field->setLabel($this->i18n('aufgaben_task'));
    $field->getValidator()->add('notEmpty', $this->i18n('aufgaben_title_empty'));
    $field = $form->addTextareaField('description', null, ['class' => 'form-control  markitupEditor-simple']);
    $field->setLabel($this->i18n('aufgaben_description'));
    $field = $form->addSelectField('category');
    $field->setLabel($this->i18n('aufgaben_category'));
    $field->setPrefix('<div class="rex-select-style">');
    $field->setSuffix('</div>');
    $field->getValidator()->add('notEmpty', $this->i18n('aufgaben_category_empty'));
    $select = $field->getSelect();
    $select->setSize(1);
    $query = 'SELECT category as label, id FROM rex_aufgaben_categories ORDER BY category';
    $select->addOption($this->i18n('aufgaben_please_choose'), '');
    $select->addSqlOptions($query);
예제 #19
0
파일: roles.php 프로젝트: skerbis/redaxo
    $list->setColumnLabel('edit', rex_i18n::msg('user_functions'));
    $list->setColumnLayout('edit', ['<th colspan="2">###VALUE###</th>', '<td>###VALUE###</td>']);
    $list->setColumnParams('edit', ['func' => 'edit', 'id' => '###id###']);
    $list->addColumn('funcs', '<i class="rex-icon rex-icon-delete"></i> ' . rex_i18n::msg('user_role_delete'));
    $list->setColumnLabel('funcs', rex_i18n::msg('user_functions'));
    $list->setColumnLayout('funcs', ['', '<td>###VALUE###</td>']);
    $list->setColumnParams('funcs', ['func' => 'delete', 'id' => '###id###']);
    $list->addLinkAttribute('funcs', 'data-confirm', rex_i18n::msg('delete') . ' ?');
    $content .= $list->get();
    $fragment = new rex_fragment();
    $fragment->setVar('title', $title);
    $fragment->setVar('content', $content, false);
    $content = $fragment->parse('core/page/section.php');
} else {
    $title = $func == 'edit' ? rex_i18n::msg('edit_user_role') : rex_i18n::msg('add_user_role');
    $form = rex_form::factory(rex::getTablePrefix() . 'user_role', $title, 'id = ' . $id);
    $form->addParam('id', $id);
    $form->setApplyUrl(rex_url::currentBackendPage());
    $form->setEditMode($func == 'edit');
    $field = $form->addTextField('name');
    $field->setLabel(rex_i18n::msg('name'));
    $field = $form->addTextAreaField('description');
    $field->setLabel(rex_i18n::msg('description'));
    $fieldContainer = $form->addContainerField('perms');
    $fieldContainer->setMultiple(false);
    $group = 'all';
    $fieldContainer->setActive($group);
    // Check all page permissions and add them to rex_perm if not already registered
    $registerImplicitePagePermissions = function ($pages) use(&$registerImplicitePagePermissions) {
        foreach ($pages as $page) {
            foreach ($page->getRequiredPermissions() as $perm) {
예제 #20
0
    $imgHeader = '<a href="' . $list->getUrl(array('func' => 'add')) . '"><img src="media/metainfo_plus.gif" alt="add" title="add" /></a>';
    // Hinzufuegen Button
    $list->addColumn($imgHeader, '<img src="media/metainfo.gif" alt="field" title="field" />', 0, array('<th class="rex-icon">###VALUE###</th>', '<td class="rex-icon">###VALUE###</td>'));
    // Edit Button unterhalb des hinzufuegen Buttons
    $list->setColumnParams($imgHeader, array('func' => 'edit', 'entry_id' => '###zielgruppe_id###'));
    // Labels
    $list->setColumnLabel('zielgruppe_id', $I18N_KURSE->msg('id'));
    $list->setColumnLabel('zielgruppen.name', $I18N_KURSE->msg('name'));
    $list->setColumnLabel('elternname', $I18N_KURSE->msg('elternkategorie'));
    // Edit Funktion auf Zeileneintrag
    $list->setColumnParams('zielgruppe_id', array('func' => 'edit', 'entry_id' => '###zielgruppe_id###'));
    $list->setColumnParams('name', array('func' => 'edit', 'entry_id' => '###zielgruppe_id###'));
    // Liste anzeigen
    $list->show();
} elseif ($func == 'edit' || $func == 'add') {
    $form = rex_form::factory($REX['TABLE_PREFIX'] . 'd2u_kurse_zielgruppen', $I18N_KURSE->msg('zielgruppen'), "zielgruppe_id = " . $entry_id, "post", false);
    // Name
    $field = $form->addTextField('name');
    $field->setLabel($I18N_KURSE->msg('name'));
    $field->setAttribute('maxlenght', '25');
    // Bild
    $field = $form->addMediaField('bild');
    $field->setLabel($I18N_KURSE->msg('bild'));
    // Elternkategorie
    $field = $form->addSelectField('eltern_zielgruppe_id');
    $field->setLabel($I18N_KURSE->msg('elternkategorie'));
    $elternkategorie = $field->getSelect();
    $elternkategorie->setSize(1);
    $elternkategorie->addOption($I18N_KURSE->msg('keine_eltern'), -1);
    $elternkategorie_sql = 'SELECT name, zielgruppe_id FROM ' . $REX['TABLE_PREFIX'] . 'd2u_kurse_zielgruppen ' . 'WHERE zielgruppe_id <> ' . $entry_id . ' ' . 'AND (eltern_zielgruppe_id < 0 OR eltern_zielgruppe_id IS NULL) ' . 'ORDER BY name';
    $elternkategorie->addSqlOptions($elternkategorie_sql);
예제 #21
0
    $list->show();
    // prio switch
    rex_prio_switch::printSwitch(array($I18N->msg('string_table_prio_mode'), $I18N->msg('string_table_prio_mode_on'), $I18N->msg('string_table_prio_mode_off')));
} elseif ($func == "add" || $func == "edit") {
    // remove delete button for non admins
    if ($REX['USER'] && !$REX['USER']->isAdmin()) {
        rex_register_extension('REX_FORM_CONTROL_FIElDS', function ($params) {
            $params['subject']['delete'] = null;
            return $params['subject'];
        });
    }
    $legend = $I18N->msg('add');
    if ($func == 'edit') {
        $legend = $I18N->msg('edit');
    }
    $form = rex_form::factory($REX['TABLE_PREFIX'] . 'string_table', $I18N->msg('string_table_string') . ' ' . $legend, 'id=' . $id, 'post', false, 'rex_form_extended');
    //$form->debug = true;
    $form->addParam('clang', $clang);
    if ($func == 'edit') {
        $form->addParam('id', $id);
    } elseif ($func == 'add') {
        $form->addHiddenField('priority', rex_string_table::getKeyCount() + 1);
    }
    // key
    if ($REX['USER'] && $REX['USER']->isAdmin()) {
        $field =& $form->addTextField('keyname');
    } else {
        $field =& $form->addReadOnlyField('keyname');
    }
    $field->setLabel($I18N->msg('string_table_keyname'));
    // value