$warning[] = $I18N->msg('no_permission');
                }
            } else {
                $warning[] = $I18N->msg('pool_file_not_found');
            }
        }
    } else {
        $warning = $I18N->msg('pool_selectedmedia_error');
    }
}
// *************************************** SUBPAGE: "" -> MEDIEN ANZEIGEN
if ($subpage == '') {
    $cats_sel = new rex_mediacategory_select();
    $cats_sel->setSize(1);
    $cats_sel->setStyle('class="rex-form-select"');
    $cats_sel->setName("rex_file_category");
    $cats_sel->setId("rex_file_category");
    $cats_sel->addOption($I18N->msg('pool_kats_no'), "0");
    $cats_sel->setSelected($rex_file_category);
    echo $cat_out;
    if (is_array($warning)) {
        if (count($warning) > 0) {
            echo rex_warning_block(implode('<br />', $warning));
        }
        $warning = '';
    } else {
        if ($warning != '') {
            echo rex_warning($warning);
            $warning = '';
        }
    }
/**
 * Ausgabe des Medienpool Formulars
 */
function rex_mediapool_Mediaform($form_title, $button_title, $rex_file_category, $file_chooser, $close_form)
{
    global $I18N, $REX, $subpage, $ftitle, $warning, $info;
    $s = '';
    $cats_sel = new rex_mediacategory_select();
    $cats_sel->setStyle('class="rex-form-select"');
    $cats_sel->setSize(1);
    $cats_sel->setName('rex_file_category');
    $cats_sel->setId('rex_file_category');
    $cats_sel->addOption($I18N->msg('pool_kats_no'), "0");
    $cats_sel->setAttribute('onchange', 'this.form.submit()');
    $cats_sel->setSelected($rex_file_category);
    if (isset($warning) and $warning != "") {
        $s .= rex_warning($warning);
        $warning = "";
    }
    if (isset($info) and $info != "") {
        $s .= rex_info($info);
        $info = "";
    }
    if (!isset($ftitle)) {
        $ftitle = '';
    }
    $add_file = '';
    if ($file_chooser) {
        $devInfos = '';
        if ($REX['USER']->hasPerm('advancedMode[]')) {
            $devInfos = '<span class="rex-form-notice">
         ' . $I18N->msg('phpini_settings') . ':<br />
         ' . (rex_ini_get('file_uploads') == 0 ? '<span>' . $I18N->msg('pool_upload') . ':</span> <em>' . $I18N->msg('pool_upload_disabled') . '</em><br />' : '') . '
         <span>' . $I18N->msg('pool_max_uploadsize') . ':</span> ' . OOMedia::_getFormattedSize(rex_ini_get('upload_max_filesize')) . '<br />
         <span>' . $I18N->msg('pool_max_uploadtime') . ':</span> ' . rex_ini_get('max_input_time') . 's
       </span>';
        }
        $add_file = '
                <div class="rex-form-row">
                  <p class="rex-form-file">
                    <label for="file_new">' . $I18N->msg('pool_file_file') . '</label>
                    <input class="rex-form-file" type="file" id="file_new" name="file_new" size="30" />
                    ' . $devInfos . '
                  </p>
                </div>';
    }
    $arg_fields = '';
    foreach (rex_request('args', 'array') as $arg_name => $arg_value) {
        $arg_fields .= '<input type="hidden" name="args[' . $arg_name . ']" value="' . $arg_value . '" />' . "\n";
    }
    $arg_fields = '';
    $opener_input_field = rex_request('opener_input_field', 'string');
    if ($opener_input_field != '') {
        $arg_fields .= '<input type="hidden" name="opener_input_field" value="' . htmlspecialchars($opener_input_field) . '" />' . "\n";
    }
    $add_submit = '';
    if ($close_form) {
        $add_submit = '<input type="submit" class="rex-form-submit" name="saveandexit" value="' . $I18N->msg('pool_file_upload_get') . '"' . rex_accesskey($I18N->msg('pool_file_upload_get'), $REX['ACKEY']['SAVE']) . ' />';
    }
    $s .= '
      <div class="rex-form" id="rex-form-mediapool-other">
        <form action="index.php" method="post" enctype="multipart/form-data">
          <fieldset class="rex-form-col-1">
            <legend>' . $form_title . '</legend>
            <div class="rex-form-wrapper">
              <input type="hidden" name="page" value="mediapool" />
              <input type="hidden" name="media_method" value="add_file" />
              <input type="hidden" name="subpage" value="' . $subpage . '" />
              ' . $arg_fields . '
              
              <div class="rex-form-row">
                <p class="rex-form-text">
                  <label for="ftitle">' . $I18N->msg('pool_file_title') . '</label>
                  <input class="rex-form-text" type="text" size="20" id="ftitle" name="ftitle" value="' . htmlspecialchars(stripslashes($ftitle)) . '" />
                </p>
              </div>
              
              <div class="rex-form-row">
                <p class="rex-form-select">
                  <label for="rex_file_category">' . $I18N->msg('pool_file_category') . '</label>
                  ' . $cats_sel->get() . '
                </p>
              </div>

              <div class="rex-clearer"></div>';
    // ----- EXTENSION POINT
    $s .= rex_register_extension_point('MEDIA_FORM_ADD', '');
    $s .= $add_file . '
              <div class="rex-form-row">
                <p class="rex-form-submit">
                 <input class="rex-form-submit" type="submit" name="save" value="' . $button_title . '"' . rex_accesskey($button_title, $REX['ACKEY']['SAVE']) . ' />
                 ' . $add_submit . '
                </p>
              </div>

              <div class="rex-clearer"></div>
            </div>
          </fieldset>
        ';
    if ($close_form) {
        $s .= '</form></div>' . "\n";
    }
    return $s;
}
示例#3
0
// zugriff auf categorien
$sel_cat = new rex_category_select(false, false, false, false);
$sel_cat->setMultiple(1);
$sel_cat->setStyle('class="rex-form-select"');
$sel_cat->setSize(20);
$sel_cat->setName('userperm_cat[]');
$sel_cat->setId('userperm-cat');
$userperm_cat = rex_request('userperm_cat', 'array');
$allmcats = rex_request('allmcats', 'int');
$userperm_cat_read = rex_request('userperm_cat_read', 'array');
// zugriff auf mediacategorien
$sel_media = new rex_mediacategory_select(false);
$sel_media->setMultiple(1);
$sel_media->setStyle('class="rex-form-select"');
$sel_media->setSize(20);
$sel_media->setName('userperm_media[]');
$sel_media->setId('userperm-media');
$userperm_media = rex_request('userperm_media', 'array');
// zugriff auf sprachen
$sel_sprachen = new rex_select();
$sel_sprachen->setMultiple(1);
$sel_sprachen->setStyle('class="rex-form-select"');
$sel_sprachen->setSize(3);
$sel_sprachen->setName('userperm_sprachen[]');
$sel_sprachen->setId('userperm-sprachen');
$sqlsprachen = rex_sql::factory();
$sqlsprachen->setQuery('select * from ' . $REX['TABLE_PREFIX'] . 'clang order by id');
for ($i = 0; $i < $sqlsprachen->getRows(); $i++) {
    $name = $sqlsprachen->getValue('name');
    $sel_sprachen->addOption($name, $sqlsprachen->getValue('id'));
    $sqlsprachen->next();
$linkButton->setValue($REX['ADDON']['hr4you_sync']['settings']['default_article_id']);
$linkButton->setAttribute('name', 'settings[default_article_id]');
echo $linkButton->getHtml();
?>
						</div>
					</div>

					<div class="rex-form-row">
						<p class="rex-form-col-a rex-form-select">
							<label for="default_media_category_id"><?php 
echo $I18N->msg('d2u_stellenmarkt_hr4you_sync_settings_default_media_category_id');
?>
</label>
							<?php 
$mediaCatSelect = new rex_mediacategory_select($check_perm = false);
$mediaCatSelect->setName('settings[default_media_category_id]');
$mediaCatSelect->setSize(1);
$mediaCatSelect->setStyle('class="rex-form-select"');
$mediaCatSelect->setSelected($REX['ADDON']['hr4you_sync']['settings']['default_media_category_id']);
echo $mediaCatSelect->get();
?>
						</p>
					</div>

					<div class="rex-form-row">
						<p class="rex-form-col-a rex-form-select">
							<label for="default_job_category_id"><?php 
echo $I18N->msg('d2u_stellenmarkt_hr4you_sync_settings_default_job_category_id');
?>
</label>
							<?php 
示例#5
0
                $warning[] = '<b>' . $I18N->msg('pool_file_not_found') . '</b>';
            }
        }
        if ($countDeleted) {
            $info[] = '<b>' . $I18N->msg('pool_files_deleted', $countDeleted) . '</b>';
        }
    } else {
        $warning = '<b>' . $I18N->msg('pool_selectedmedia_error') . '</b>';
    }
}
// *************************************** SUBPAGE: "" -> MEDIEN ANZEIGEN
if ($subpage == '') {
    $cats_sel = new rex_mediacategory_select();
    $cats_sel->setSize(1);
    $cats_sel->setStyle('class="rex-form-select"');
    $cats_sel->setName('rex_file_category');
    $cats_sel->setId('rex_file_category');
    $cats_sel->addOption($I18N->msg('pool_kats_no'), '0');
    $cats_sel->setSelected($rex_file_category);
    echo $cat_out;
    if (is_array($warning) && count($warning) > 0) {
        $warning = implode('<br />', $warning);
    }
    if (is_string($warning) && $warning != '') {
        echo rex_warning_block($warning);
        $warning = '';
    }
    if (is_array($info) && count($info) > 0) {
        $info = implode('<br />', $info);
    }
    if (is_string($info) && $info != '') {