} catch (InvalidArgumentException $e) { $okt->error->set(__('c_c_error_writing_configuration')); $okt->error->set($e->getMessage()); } } } /* Affichage ----------------------------------------------------------*/ # Liste des langues $rsLanguages = $okt->languages->getLanguages(); $aLanguages = array(); while ($rsLanguages->fetch()) { $aLanguages[html::escapeHTML($rsLanguages->title)] = $rsLanguages->code; } # Liste des fuseaux horraires $aTimezones = dt::getZones(true, true); # Liste des icônes $aFlags = array(); foreach (new DirectoryIterator(OKT_PUBLIC_PATH . '/img/flags/') as $oFileInfo) { if ($oFileInfo->isDot() || !$oFileInfo->isFile() || $oFileInfo->getExtension() !== 'png') { continue; } $aFlags[str_replace('.png', '', $oFileInfo->getFilename())] = $oFileInfo->getFilename(); } natsort($aFlags); # Titre de la page $okt->page->addGlobalTitle(__('c_a_config_l10n')); # Javascript $okt->page->tabs(); $okt->page->validate('add-language-form', array(array('id' => 'add_title', 'rules' => array('required: true')), array('id' => 'add_code', 'rules' => array('required: true', 'minlength: 2')))); $okt->page->validate('edit-language-form', array(array('id' => 'edit_title', 'rules' => array('required: true')), array('id' => 'edit_code', 'rules' => array('required: true', 'minlength: 2'))));
echo '<p class="message">' . __('Blog has been successfully created.') . '</p>'; } if (!empty($_GET['upd'])) { echo '<p class="message">' . __('Blog has been successfully updated.') . '</p>'; } echo '<div class="multi-part" id="params" title="' . __('Parameters') . '">' . '<h3>' . __('Parameters') . '</h3>' . '<form action="' . $action . '" method="post" id="blog-form">'; echo '<fieldset><legend>' . __('Blog details') . '</legend>' . $core->formNonce(); if ($core->auth->isSuperAdmin()) { echo '<p><label class="required" title="' . __('Required field') . '">' . __('Blog ID:') . form::field('blog_id', 30, 32, html::escapeHTML($blog_id)) . '</label></p>' . '<p class="form-note">' . __('At least 2 characters using letters, numbers or symbols.') . ' ' . __('Please note that changing your blog ID may require changes in your public index.php file.') . '</p>'; } echo '<p><label class="required" title="' . __('Required field') . '">' . __('Blog name:') . form::field('blog_name', 30, 255, html::escapeHTML($blog_name)) . '</label></p>'; if ($core->auth->isSuperAdmin()) { echo '<p><label class="required" title="' . __('Required field') . '">' . __('Blog URL:') . form::field('blog_url', 30, 255, html::escapeHTML($blog_url)) . '</label></p>' . '<p><label>' . __('URL scan method:') . form::combo('url_scan', $url_scan_combo, $blog_settings->url_scan) . '</label></p>' . '<p><label>' . __('Blog status:') . form::combo('blog_status', $status_combo, $blog_status) . '</label></p>'; } echo '<p class="area"><label for="blog_desc">' . __('Blog description:') . '</label>' . form::textarea('blog_desc', 60, 5, html::escapeHTML($blog_desc)) . '</p>' . '</fieldset>'; echo '<fieldset><legend>' . __('Blog configuration') . '</legend>' . '<div class="two-cols">' . '<div class="col">' . '<p><label>' . __('Blog editor name:') . form::field('editor', 30, 255, html::escapeHTML($blog_settings->editor)) . '</label></p>' . '<p><label>' . __('Default language:') . form::combo('lang', $lang_combo, $blog_settings->lang, 'l10n') . '</label></p>' . '<p><label>' . __('Blog timezone:') . form::combo('blog_timezone', dt::getZones(true, true), html::escapeHTML($blog_settings->blog_timezone)) . '</label></p>' . '</div>' . '<div class="col">' . '<p><label>' . __('Copyright notice:') . form::field('copyright_notice', 30, 255, html::escapeHTML($blog_settings->copyright_notice)) . '</label></p>' . '<p><label>' . __('New post URL format:') . form::combo('post_url_format', $post_url_combo, html::escapeHTML($blog_settings->post_url_format)) . '</label></p>' . '<p><label class="classic">' . form::checkbox('enable_xmlrpc', '1', $blog_settings->enable_xmlrpc) . __('Enable XML/RPC interface') . '</label>' . ' - <a href="#xmlrpc">' . __('more information') . '</a></p>' . '</div>' . '</div>' . '<br class="clear" />' . '</fieldset>'; echo '<fieldset><legend>' . __('Comments and trackbacks') . '</legend>' . '<div class="two-cols">' . '<div class="col">' . '<p><label class="classic">' . form::checkbox('allow_comments', '1', $blog_settings->allow_comments) . __('Accept comments') . '</label></p>' . '<p><label class="classic">' . form::checkbox('comments_pub', '1', !$blog_settings->comments_pub) . __('Moderate comments') . '</label></p>' . '<p><label class="classic">' . sprintf(__('Leave comments open for %s days'), form::field('comments_ttl', 2, 3, $blog_settings->comments_ttl)) . '</label></p>' . '<p class="form-note">' . __('Leave blank to disable this feature.') . '</p>' . '<p><label class="classic">' . form::checkbox('wiki_comments', '1', $blog_settings->wiki_comments) . __('Wiki syntax for comments') . '</label></p>' . '</div>' . '<div class="col">' . '<p><label class="classic">' . form::checkbox('allow_trackbacks', '1', $blog_settings->allow_trackbacks) . __('Accept trackbacks') . '</label></p>' . '<p><label class="classic">' . form::checkbox('trackbacks_pub', '1', !$blog_settings->trackbacks_pub) . __('Moderate trackbacks') . '</label></p>' . '<p><label class="classic">' . sprintf(__('Leave trackbacks open for %s days'), form::field('trackbacks_ttl', 2, 3, $blog_settings->trackbacks_ttl)) . '</label></p>' . '<p class="form-note">' . __('Leave blank to disable this feature.') . '</p>' . '<p><label class="classic">' . form::checkbox('comments_nofollow', '1', $blog_settings->comments_nofollow) . __('Add "nofollow" relation on comments and trackbacks links') . '</label></p>' . '</div>' . '</div>' . '<br class="clear" />' . '</fieldset>'; echo '<fieldset><legend>' . __('Blog presentation') . '</legend>' . '<div class="two-cols">' . '<div class="col">' . '<p><label>' . __('Date format:') . form::field('date_format', 30, 255, html::escapeHTML($blog_settings->date_format)) . '</label></p>' . '<p><label>' . __('Time format:') . form::field('time_format', 30, 255, html::escapeHTML($blog_settings->time_format)) . '</label></p>' . '<p><label class="classic">' . form::checkbox('use_smilies', '1', $blog_settings->use_smilies) . __('Display smilies on entries and comments') . '</label></p>' . '</div>' . '<div class="col">' . '<p><label class="classic">' . sprintf(__('Display %s entries per page'), form::field('nb_post_per_page', 2, 3, $blog_settings->nb_post_per_page)) . '</label></p>' . '<p><label class="classic">' . sprintf(__('Display %s entries per feed'), form::field('nb_post_per_feed', 2, 3, $blog_settings->nb_post_per_feed)) . '</label></p>' . '<p><label class="classic">' . sprintf(__('Display %s comments per feed'), form::field('nb_comment_per_feed', 2, 3, $blog_settings->nb_comment_per_feed)) . '</label></p>' . '<p><label class="classic">' . form::checkbox('short_feed_items', '1', $blog_settings->short_feed_items) . __('Truncate feeds') . '</label></p>' . '</div>' . '</div>' . '<br class="clear" />' . '</fieldset>'; echo '<fieldset><legend>' . __('Media and images') . '</legend>' . '<div class="two-cols">' . '<div class="col">' . '<h4>' . __('Generated image sizes (in pixels)') . '</h4>' . '<p class="field"><label>' . __('Thumbnails:') . ' ' . form::field('media_img_t_size', 3, 3, $blog_settings->media_img_t_size) . '</label></p>' . '<p class="field"><label>' . __('Small:') . ' ' . form::field('media_img_s_size', 3, 3, $blog_settings->media_img_s_size) . '</label></p>' . '<p class="field"><label>' . __('Medium:') . ' ' . form::field('media_img_m_size', 3, 3, $blog_settings->media_img_m_size) . '</label></p>' . '</div>' . '<div class="col">' . '<h4><label for="media_img_title_pattern">' . __('Inserted image title') . '</label></h4>' . '<p>' . __('This defines image tag title when you insert it in a post from the media manager. It is retrieved from the picture\'s metadata.') . '</p>' . '<p>' . form::combo('media_img_title_pattern', $img_title_combo, html::escapeHTML($blog_settings->media_img_title_pattern)) . '</p>' . '</div>' . '</div>' . '</fieldset>'; echo '<fieldset><legend>' . __('Search engines robots policy') . '</legend>'; foreach ($robots_policy_options as $k => $v) { echo '<p><label class="classic">' . form::radio(array('robots_policy'), $k, $blog_settings->robots_policy == $k) . ' ' . $v . '</label></p>'; } echo '</fieldset>'; # --BEHAVIOR-- adminBlogPreferencesForm $core->callBehavior('adminBlogPreferencesForm', $core, $blog_settings); echo '<p><input type="submit" accesskey="s" value="' . __('save') . '" />' . (!$standalone ? form::hidden('id', $blog_id) : '') . '</p>' . '</form>'; if ($core->auth->isSuperAdmin() && $blog_id != $core->blog->id) { echo '<form action="blog_del.php" method="post">' . '<p><input type="submit" value="' . __('Delete this blog') . '" />' . form::hidden(array('blog_id'), $blog_id) . $core->formNonce() . '</p>' . '</form>'; } # XML/RPC information
<div class="two-cols"> <p class="field col"><label for="add_language"><?php _e('c_c_Language'); ?> </label> <?php echo form::select('add_language', $aLanguages, html::escapeHTML($add_language)); ?> </p> <p class="field col"><label for="add_timezone"><?php _e('c_c_Timezone'); ?> </label> <?php echo form::select('add_timezone', dt::getZones(true, true), html::escapeHTML($add_timezone)); ?> </p> </div> <?php if ($okt->users->config->enable_custom_fields) { ?> <div class="two-cols"> <?php # début Okatea : boucle sur les champs while ($rsFields->fetch()) { ?> <div class="col"><?php echo $rsFields->getHtmlField($aPostedData);
if (!empty($_GET['upd'])) { dcPage::success(__('User has been successfully updated.')); } if (!empty($_GET['add'])) { dcPage::success(__('User has been successfully created.')); } echo '<form action="' . $core->adminurl->get("admin.user") . '" method="post" id="user-form">' . '<div class="two-cols">' . '<div class="col">' . '<h3>' . __('User profile') . '</h3>' . '<p><label for="user_id" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('User ID:') . '</label> ' . form::field('user_id', 20, 255, html::escapeHTML($user_id)) . '</p>' . '<p class="form-note">' . __('At least 2 characters using letters, numbers or symbols.') . '</p>'; if ($user_id == $core->auth->userID()) { echo '<p class="warning">' . __('Warning:') . ' ' . __('If you change your username, you will have to log in again.') . '</p>'; } echo '<div class="pw-table">' . '<p class="pw-cell">' . '<label for="new_pwd" ' . ($user_id != '' ? '' : 'class="required"') . '>' . ($user_id != '' ? '' : '<abbr title="' . __('Required field') . '">*</abbr> ') . ($user_id != '' ? __('New password:'******'Password:'******'</label>' . form::password('new_pwd', 20, 255, '', '', '', false, ' data-indicator="pwindicator" ') . '</p>' . '<div id="pwindicator">' . ' <div class="bar"></div>' . ' <p class="label no-margin"></p>' . '</div>' . '</div>' . '<p class="form-note">' . __('Password must contain at least 6 characters.') . '</p>' . '<p><label for="new_pwd_c" ' . ($user_id != '' ? '' : 'class="required"') . '>' . ($user_id != '' ? '' : '<abbr title="' . __('Required field') . '">*</abbr> ') . __('Confirm password:'******'</label> ' . form::password('new_pwd_c', 20, 255) . '</p>'; if ($core->auth->allowPassChange()) { echo '<p><label for="user_change_pwd" class="classic">' . form::checkbox('user_change_pwd', '1', $user_change_pwd) . ' ' . __('Password change required to connect') . '</label></p>'; } $super_disabled = $user_super && $user_id == $core->auth->userID(); echo '<p><label for="user_super" class="classic">' . form::checkbox('user_super', '1', $user_super, '', '', $super_disabled) . ' ' . __('Super administrator') . '</label></p>' . '<p><label for="user_name">' . __('Last Name:') . '</label> ' . form::field('user_name', 20, 255, html::escapeHTML($user_name)) . '</p>' . '<p><label for="user_firstname">' . __('First Name:') . '</label> ' . form::field('user_firstname', 20, 255, html::escapeHTML($user_firstname)) . '</p>' . '<p><label for="user_displayname">' . __('Display name:') . '</label> ' . form::field('user_displayname', 20, 255, html::escapeHTML($user_displayname)) . '</p>' . '<p><label for="user_email">' . __('Email:') . '</label> ' . form::field('user_email', 20, 255, html::escapeHTML($user_email)) . '</p>' . '<p class="form-note">' . __('Mandatory for password recovering procedure.') . '</p>' . '<p><label for="user_url">' . __('URL:') . '</label> ' . form::field('user_url', 30, 255, html::escapeHTML($user_url)) . '</p>' . '</div>' . '<div class="col">' . '<h3>' . __('Options') . '</h3>' . '<h4>' . __('Interface') . '</h4>' . '<p><label for="user_lang">' . __('Language:') . '</label> ' . form::combo('user_lang', $lang_combo, $user_lang, 'l10n') . '</p>' . '<p><label for="user_tz">' . __('Timezone:') . '</label> ' . form::combo('user_tz', dt::getZones(true, true), $user_tz) . '</p>' . '<h4>' . __('Edition') . '</h4>' . '<p><label for="user_post_format">' . __('Preferred format:') . '</label> ' . form::combo('user_post_format', $formaters_combo, $user_options['post_format']) . '</p>' . '<p><label for="user_post_status">' . __('Default entry status:') . '</label> ' . form::combo('user_post_status', $status_combo, $user_post_status) . '</p>' . '<p><label for="user_edit_size">' . __('Entry edit field height:') . '</label> ' . form::field('user_edit_size', 5, 4, (int) $user_options['edit_size']) . '</p>'; # --BEHAVIOR-- adminUserForm $core->callBehavior('adminUserForm', isset($rs) ? $rs : null); echo '</div>' . '</div>'; echo '<p class="clear vertical-separator"><label for="your_pwd" class="required">' . '<abbr title="' . __('Required field') . '">*</abbr> ' . __('Your password:'******'</label>' . form::password('your_pwd', 20, 255) . '</p>' . '<p class="clear"><input type="submit" name="save" accesskey="s" value="' . __('Save') . '" />' . ($user_id != '' ? '' : ' <input type="submit" name="saveplus" value="' . __('Save and create another') . '" />') . ($user_id != '' ? form::hidden('id', $user_id) : '') . $core->formNonce() . '</p>' . '</form>'; if ($user_id) { echo '<div class="clear fieldset">' . '<h3>' . __('Permissions') . '</h3>'; if (!$user_super) { echo '<form action="' . $core->adminurl->get("admin.user.actions") . '" method="post">' . '<p><input type="submit" value="' . __('Add new permissions') . '" />' . form::hidden(array('redir'), $core->adminurl->get("admin.user", array('id' => $user_id))) . form::hidden(array('action'), 'blogs') . form::hidden(array('users[]'), $user_id) . $core->formNonce() . '</p>' . '</form>'; $permissions = $core->getUserPermissions($user_id); $perm_types = $core->auth->getPermissionsTypes(); if (count($permissions) == 0) { echo '<p>' . __('No permissions so far.') . '</p>'; } else { foreach ($permissions as $k => $v) { if (count($v['p']) > 0) {
throw new Exception(__("Passwords don't match")); } $cur->user_pwd = $_POST['new_pwd']; } # --BEHAVIOR-- adminBeforeUserUpdate $core->callBehavior('adminBeforeUserUpdate', $cur, $core->auth->userID()); # Udate user $core->updUser($core->auth->userID(), $cur); # --BEHAVIOR-- adminAfterUserUpdate $core->callBehavior('adminAfterUserUpdate', $cur, $core->auth->userID()); http::redirect('preferences.php?upd=1'); } catch (Exception $e) { $core->error->add($e->getMessage()); } } /* DISPLAY -------------------------------------------------------- */ dcPage::open($page_title, dcPage::jsLoad('js/_preferences.js') . dcPage::jsConfirmClose('user-form') . $core->callBehavior('adminPreferencesHeaders')); if (!empty($_GET['upd'])) { echo '<p class="message">' . __('Personal information has been successfully updated.') . '</p>'; } echo '<h2>' . $page_title . '</h2>'; echo '<form action="preferences.php" method="post" id="user-form">' . '<fieldset><legend>' . __('User preferences') . '</legend>' . '<div class="two-cols">' . '<div class="col">' . '<p><label>' . __('Last Name:') . form::field('user_name', 20, 255, html::escapeHTML($user_name), '', 2) . '</label></p>' . '<p><label>' . __('First Name:') . form::field('user_firstname', 20, 255, html::escapeHTML($user_firstname), '', 3) . '</label></p>' . '<p><label>' . __('Display name:') . form::field('user_displayname', 20, 255, html::escapeHTML($user_displayname), '', 4) . '</label></p>' . '<p><label>' . __('Email:') . form::field('user_email', 20, 255, html::escapeHTML($user_email), '', 5) . '</label></p>' . '<p><label>' . __('URL:') . form::field('user_url', 30, 255, html::escapeHTML($user_url), '', 6) . '</label></p>' . '</div>' . '<div class="col">' . '<p><label>' . __('Preferred format:') . form::combo('user_post_format', $formaters_combo, $user_options['post_format'], '', 7) . '</label></p>' . '<p><label>' . __('Default entry status:') . form::combo('user_post_status', $status_combo, $user_post_status, '', 8) . '</label></p>' . '<p><label>' . __('Entry edit field height:') . form::field('user_edit_size', 5, 4, (int) $user_options['edit_size'], '', 9) . '</label></p>' . '<p><label>' . __('User language:') . form::combo('user_lang', $lang_combo, $user_lang, 'l10n', 10) . '</label></p>' . '<p><label>' . __('User timezone:') . form::combo('user_tz', dt::getZones(true, true), $user_tz, '', 11) . '</label></p>' . '<p><label class="classic">' . form::checkbox('user_wysiwyg', 1, $user_options['enable_wysiwyg'], '', 12) . ' ' . __('Enable WYSIWYG mode') . '</label></p>' . '</div>' . '</div>' . '<br class="clear" />' . '</fieldset>'; # --BEHAVIOR-- adminPreferencesForm $core->callBehavior('adminPreferencesForm', $core); if ($core->auth->allowPassChange()) { echo '<fieldset>' . '<legend>' . __('Change your password') . '</legend>' . '<p><label>' . __('New password:'******'new_pwd', 20, 255, '', '', 30) . '</label></p>' . '<p><label>' . __('Confirm password:'******'new_pwd_c', 20, 255, '', '', 31) . '</label></p>' . '</fieldset>' . '<fieldset>' . '<p>' . __('If you want to change your email or password you must provide your current password.') . '</p>' . '<p><label>' . __('Your password:'******'cur_pwd', 20, 255, '', '', 32) . '</label></p>' . '</fieldset>'; } echo '<p class="clear">' . $core->formNonce() . '<input type="submit" accesskey="s" value="' . __('Save') . '" tabindex="33" /></p>' . '</form>'; dcPage::helpBlock('core_user_pref'); dcPage::close();
} # Replace default favorites by current set (super admin only) if (!empty($_POST['replace']) && $core->auth->isSuperAdmin()) { $user_favs = $core->favs->getFavoriteIDs(false); $core->favs->setFavoriteIDs($user_favs, true); if (!$core->error->flag()) { dcPage::addSuccessNotice(__('Default favorites have been successfully updated.')); $core->adminurl->redirect("admin.user.preferences", array(), '#user-favorites'); } } /* DISPLAY -------------------------------------------------------- */ dcPage::open($page_title, dcPage::jsLoad('js/_preferences.js') . ($user_acc_nodragdrop ? '' : dcPage::jsLoad('js/_preferences-dragdrop.js')) . dcPage::jsLoad('js/jquery/jquery-ui.custom.js') . dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js') . dcPage::jsLoad('js/jquery/jquery.pwstrength.js') . '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . "\$(function() {\n" . "\t\$('#new_pwd').pwstrength({texts: ['" . sprintf(__('Password strength: %s'), __('very weak')) . "', '" . sprintf(__('Password strength: %s'), __('weak')) . "', '" . sprintf(__('Password strength: %s'), __('mediocre')) . "', '" . sprintf(__('Password strength: %s'), __('strong')) . "', '" . sprintf(__('Password strength: %s'), __('very strong')) . "']});\n" . "});" . "\n//]]>\n" . "</script>\n" . dcPage::jsPageTabs($default_tab) . dcPage::jsConfirmClose('user-form') . $core->callBehavior('adminPreferencesHeaders'), dcPage::breadcrumb(array(html::escapeHTML($core->auth->userID()) => '', $page_title => ''))); # User profile echo '<div class="multi-part" id="user-profile" title="' . __('My profile') . '">'; echo '<h3>' . __('My profile') . '</h3>' . '<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="user-form">' . '<p><label for="user_name">' . __('Last Name:') . '</label>' . form::field('user_name', 20, 255, html::escapeHTML($user_name)) . '</p>' . '<p><label for="user_firstname">' . __('First Name:') . '</label>' . form::field('user_firstname', 20, 255, html::escapeHTML($user_firstname)) . '</p>' . '<p><label for="user_displayname">' . __('Display name:') . '</label>' . form::field('user_displayname', 20, 255, html::escapeHTML($user_displayname)) . '</p>' . '<p><label for="user_email">' . __('Email:') . '</label>' . form::field('user_email', 20, 255, html::escapeHTML($user_email)) . '</p>' . '<p><label for="user_url">' . __('URL:') . '</label>' . form::field('user_url', 30, 255, html::escapeHTML($user_url)) . '</p>' . '<p><label for="user_lang">' . __('Language for my interface:') . '</label>' . form::combo('user_lang', $lang_combo, $user_lang, 'l10n') . '</p>' . '<p><label for="user_tz">' . __('My timezone:') . '</label>' . form::combo('user_tz', dt::getZones(true, true), $user_tz) . '</p>'; if ($core->auth->allowPassChange()) { echo '<h4 class="vertical-separator pretty-title">' . __('Change my password') . '</h4>' . '<div class="pw-table">' . '<p class="pw-cell"><label for="new_pwd">' . __('New password:'******'</label>' . form::password('new_pwd', 20, 255, '', '', '', false, ' data-indicator="pwindicator" ') . '</p>' . '<div id="pwindicator">' . ' <div class="bar"></div>' . ' <p class="label no-margin"></p>' . '</div>' . '</div>' . '<p><label for="new_pwd_c">' . __('Confirm new password:'******'</label>' . form::password('new_pwd_c', 20, 255) . '</p>' . '<p><label for="cur_pwd">' . __('Your current password:'******'</label>' . form::password('cur_pwd', 20, 255) . '</p>' . '<p class="form-note warn">' . __('If you have changed your email or password you must provide your current password to save these modifications.') . '</p>'; } echo '<p class="clear vertical-separator">' . $core->formNonce() . '<input type="submit" accesskey="s" value="' . __('Update my profile') . '" /></p>' . '</form>' . '</div>'; # User options : some from actual user profile, dashboard modules, ... echo '<div class="multi-part" id="user-options" title="' . __('My options') . '">'; echo '<form action="' . $core->adminurl->get("admin.user.preferences") . '#user-options" method="post" id="opts-forms">' . '<h3>' . __('My options') . '</h3>'; echo '<div class="fieldset">' . '<h4>' . __('Interface') . '</h4>' . '<p><label for="user_ui_enhanceduploader" class="classic">' . form::checkbox('user_ui_enhanceduploader', 1, $user_ui_enhanceduploader) . ' ' . __('Activate enhanced uploader in media manager') . '</label></p>' . '<p><label for="user_acc_nodragdrop" class="classic">' . form::checkbox('user_acc_nodragdrop', 1, $user_acc_nodragdrop) . ' ' . __('Disable javascript powered drag and drop for ordering items') . '</label></p>' . '<p class="clear form-note">' . __('If checked, numeric fields will allow to type the elements\' ordering number.') . '</p>'; echo '<p><label for="user_ui_media_by_page" class="classic">' . __('Number of elements displayed per page in media manager:') . '</label> ' . form::field('user_ui_media_by_page', 5, 3, (int) $user_ui_media_by_page) . '</p>'; echo '<p><label for="user_ui_media_nb_last_dirs" class="classic">' . __('Number of recent folders proposed in media manager:') . '</label> ' . form::field('user_ui_media_nb_last_dirs', 5, 3, (int) $user_ui_media_nb_last_dirs) . '</p>' . '<p class="clear form-note">' . __('Leave empty to ignore, displayed only if Javascript is enabled in your browser.') . '</p>'; if ($core->auth->isSuperAdmin()) { echo '<p><label for="user_ui_hide_std_favicon" class="classic">' . form::checkbox('user_ui_hide_std_favicon', 1, $user_ui_hide_std_favicon) . ' ' . __('Do not use standard favicon') . '</label> ' . '<span class="clear form-note warn">' . __('This will be applied for all users') . '.</span>' . '</p>'; //Opera sucks; } echo '</div>';
} } /* DISPLAY -------------------------------------------------------- */ dcPage::open($page_title, dcPage::jsConfirmClose('user-form') . $core->callBehavior('adminUserHeaders')); if (!empty($_GET['upd'])) { echo '<p class="message">' . __('User has been successfully updated.') . '</p>'; } if (!empty($_GET['add'])) { echo '<p class="message">' . __('User has been successfully created.') . '</p>'; } echo '<h2><a href="users.php">' . __('Users') . '</a> › ' . $page_title . '</h2>'; if ($user_id == $core->auth->userID()) { echo '<p class="warning">' . __('Warning:') . ' ' . __('If you change your username, you will have to log in again.') . '</p>'; } echo '<form action="user.php" method="post"id="user-form">' . '<fieldset><legend>' . __('User information') . '</legend>' . '<div class="two-cols">' . '<div class="col">' . '<p><label class="required" title="' . __('Required field') . '">' . __('Username:'******' ' . form::field('user_id', 20, 255, html::escapeHTML($user_id), '', 2) . '</label></p>' . '<p class="form-note">' . __('At least 2 characters using letters, numbers or symbols.') . '</p>' . '<p><label>' . ($user_id != '' ? __('New password:'******'Password:'******' ' . form::password('new_pwd', 20, 255, '', '', 3) . '</label></p>' . '<p><label>' . __('Confirm password:'******' ' . form::password('new_pwd_c', 20, 255, '', '', 4) . '</label></p>' . '<p><label>' . __('Last Name:') . ' ' . form::field('user_name', 20, 255, html::escapeHTML($user_name), '', 5) . '</label></p>' . '<p><label>' . __('First Name:') . ' ' . form::field('user_firstname', 20, 255, html::escapeHTML($user_firstname), '', 6) . '</label></p>' . '<p><label>' . __('Display name:') . ' ' . form::field('user_displayname', 20, 255, html::escapeHTML($user_displayname), '', 7) . '</label></p>' . '<p><label>' . __('Email:') . ' ' . form::field('user_email', 20, 255, html::escapeHTML($user_email), '', 8) . '</label></p>' . '</div>' . '<div class="col">' . '<p><label>' . __('URL:') . ' ' . form::field('user_url', 30, 255, html::escapeHTML($user_url), '', 8) . '</label></p>' . '<p><label>' . __('Preferred format:') . ' ' . form::combo('user_post_format', $formaters_combo, $user_options['post_format'], '', 9) . '</label></p>' . '<p><label>' . __('Default entry status:') . ' ' . form::combo('user_post_status', $status_combo, $user_post_status, '', 10) . '</label></p>' . '<p><label>' . __('Entry edit field height:') . ' ' . form::field('user_edit_size', 5, 4, (int) $user_options['edit_size'], '', 11) . '</label></p>' . '<p><label>' . __('User language:') . ' ' . form::combo('user_lang', $lang_combo, $user_lang, 'l10n', 12) . '</label></p>' . '<p><label>' . __('User timezone:') . ' ' . form::combo('user_tz', dt::getZones(true, true), $user_tz, '', 13) . '</label></p>' . '<p><label class="classic">' . form::checkbox('user_super', '1', $user_super, '', 14) . ' ' . __('Super administrator') . '</label></p>' . '</div>' . '</div>' . '</fieldset>'; # --BEHAVIOR-- adminUserForm $core->callBehavior('adminUserForm', isset($rs) ? $rs : null); echo '<fieldset>' . '<p><label>' . __('Your password:'******'your_pwd', 20, 255, '', '', 15) . '</label></p>' . '</fieldset>' . '<p class="clear"><input type="submit" accesskey="s" value="' . __('Save') . '" tabindex="16" />' . ($user_id != '' ? form::hidden('id', $user_id) : '') . $core->formNonce() . '</p>' . '</form>'; if ($user_id) { echo '<fieldset class="clear"><legend>' . __('Permissions') . '</legend>'; $permissions = $core->getUserPermissions($user_id); $perm_types = $core->auth->getPermissionsTypes(); if (count($permissions) == 0) { echo '<p>' . __('No permissions.') . '</p>'; } else { foreach ($permissions as $k => $v) { if (count($v['p']) > 0) { echo '<h4><a href="blog.php?id=' . html::escapeHTML($k) . '">' . html::escapeHTML($v['name']) . '</a> (' . html::escapeHTML($k) . ') - ' . '<a href="permissions.php?blog_id[]=' . $k . '&user_id[]=' . $user_id . '">' . __('change permissions') . '</a></h4>'; echo '<ul>'; foreach ($v['p'] as $p => $V) {
/** * Affichage de la page de profil utilisateur. * */ public function usersProfile() { # module actuel $this->okt->page->module = 'users'; $this->okt->page->action = 'profile'; # page désactivée ? if (!$this->okt->users->config->enable_profile_page) { $this->serve404(); } # invité non convié if ($this->okt->user->is_guest) { http::redirect(html::escapeHTML(usersHelpers::getLoginUrl(usersHelpers::getProfileUrl()))); } # données utilisateur $rsUser = $this->okt->users->getUser($this->okt->user->id); $aUserProfilData = array('id' => $this->okt->user->id, 'username' => $rsUser->username, 'email' => $rsUser->email, 'civility' => $rsUser->civility, 'lastname' => $rsUser->lastname, 'firstname' => $rsUser->firstname, 'language' => $rsUser->language, 'timezone' => $rsUser->timezone, 'password' => '', 'password_confirm' => ''); unset($rsUser); # Champs personnalisés $aPostedData = array(); $aFieldsValues = array(); if ($this->okt->users->config->enable_custom_fields) { $this->rsAdminFields = $this->okt->users->fields->getFields(array('status' => true, 'admin_editable' => true, 'language' => $this->okt->user->language)); # Liste des champs utilisateur $this->rsUserFields = $this->okt->users->fields->getFields(array('status' => true, 'user_editable' => true, 'language' => $this->okt->user->language)); # Valeurs des champs $rsFieldsValues = $this->okt->users->fields->getUserValues($this->okt->user->id); while ($rsFieldsValues->fetch()) { $aFieldsValues[$rsFieldsValues->field_id] = $rsFieldsValues->value; } # Initialisation des données des champs while ($this->rsUserFields->fetch()) { switch ($this->rsUserFields->type) { default: case 1: # Champ texte # Champ texte case 2: # Zone de texte $aPostedData[$this->rsUserFields->id] = !empty($_POST[$this->rsUserFields->html_id]) ? $_POST[$this->rsUserFields->html_id] : (!empty($aFieldsValues[$this->rsUserFields->id]) ? $aFieldsValues[$this->rsUserFields->id] : ''); break; case 3: # Menu déroulant $aPostedData[$this->rsUserFields->id] = isset($_POST[$this->rsUserFields->html_id]) ? $_POST[$this->rsUserFields->html_id] : (!empty($aFieldsValues[$this->rsUserFields->id]) ? $aFieldsValues[$this->rsUserFields->id] : ''); break; case 4: # Boutons radio $aPostedData[$this->rsUserFields->id] = isset($_POST[$this->rsUserFields->html_id]) ? $_POST[$this->rsUserFields->html_id] : (!empty($aFieldsValues[$this->rsUserFields->id]) ? $aFieldsValues[$this->rsUserFields->id] : ''); break; case 5: # Cases à cocher $aPostedData[$this->rsUserFields->id] = !empty($_POST[$this->rsUserFields->html_id]) && is_array($_POST[$this->rsUserFields->html_id]) ? $_POST[$this->rsUserFields->html_id] : (!empty($aFieldsValues[$this->rsUserFields->id]) ? $aFieldsValues[$this->rsUserFields->id] : ''); break; } } } # Suppression des cookies if (!empty($_REQUEST['cookies'])) { $aCookies = array_keys($_COOKIE); unset($aCookies[OKT_COOKIE_AUTH_NAME]); foreach ($aCookies as $c) { unset($_COOKIE[$c]); setcookie($c, null); } http::redirect(html::escapeHTML(usersHelpers::getProfileUrl())); } # Formulaire de changement de mot de passe if (!empty($_POST['change_password']) && $this->okt->checkPerm('change_password')) { $aUserProfilData['password'] = !empty($_POST['edit_password']) ? $_POST['edit_password'] : ''; $aUserProfilData['password_confirm'] = !empty($_POST['edit_password_confirm']) ? $_POST['edit_password_confirm'] : ''; $this->okt->users->changeUserPassword($aUserProfilData); http::redirect(html::escapeHTML(usersHelpers::getProfileUrl())); } # Formulaire de modification de l'utilisateur envoyé if (!empty($_POST['form_sent'])) { $aUserProfilData = array('id' => $this->okt->user->id, 'username' => isset($_POST['edit_username']) ? $_POST['edit_username'] : '', 'email' => isset($_POST['edit_email']) ? $_POST['edit_email'] : '', 'civility' => isset($_POST['edit_civility']) ? $_POST['edit_civility'] : '', 'lastname' => isset($_POST['edit_lastname']) ? $_POST['edit_lastname'] : '', 'firstname' => isset($_POST['edit_firstname']) ? $_POST['edit_firstname'] : '', 'language' => isset($_POST['edit_language']) ? $_POST['edit_language'] : '', 'timezone' => isset($_POST['edit_timezone']) ? $_POST['edit_timezone'] : ''); if ($this->okt->users->config->merge_username_email) { $aUserProfilData['username'] = $aUserProfilData['email']; } # peuplement et vérification des champs personnalisés obligatoires if ($this->okt->users->config->enable_custom_fields) { $this->okt->users->fields->getPostData($this->rsUserFields, $aPostedData); } if ($this->okt->users->updUser($aUserProfilData)) { # -- CORE TRIGGER : adminModUsersProfileProcess $this->okt->triggers->callTrigger('adminModUsersProfileProcess', $this->okt, $_POST); if ($this->okt->users->config->enable_custom_fields) { while ($this->rsUserFields->fetch()) { $this->okt->users->fields->setUserValues($this->okt->user->id, $this->rsUserFields->id, $aPostedData[$this->rsUserFields->id]); } } http::redirect(html::escapeHTML(usersHelpers::getProfileUrl())); } } # fuseaux horraires $aTimezone = dt::getZones(true, true); # langues $aLanguages = $this->getLanguages(); # title tag $this->okt->page->addTitleTag(__('c_c_user_profile')); # titre de la page $this->okt->page->setTitle(__('c_c_user_profile')); # titre SEO de la page $this->okt->page->setTitleSeo(__('c_c_user_profile')); # fil d'ariane if (!$this->isDefaultRoute(__CLASS__, __FUNCTION__)) { $this->okt->page->breadcrumb->add(__('c_c_user_profile'), usersHelpers::getProfileUrl()); } # affichage du template echo $this->okt->tpl->render($this->okt->users->getProfileTplPath(), array('aUserProfilData' => $aUserProfilData, 'aTimezone' => $aTimezone, 'aLanguages' => $aLanguages, 'aCivilities' => $this->getCivities(false), 'rsAdminFields' => $this->rsAdminFields, 'rsUserFields' => $this->rsUserFields, 'aPostedData' => $aPostedData, 'aFieldsValues' => $aFieldsValues)); }
<p class="field col"><label for="edit_email" title="' . __('c_c_required_field') . '" class="required">' . __('c_c_Email') . '</label>' . form::text('edit_email', 40, 255, html::escapeHTML($edit_email)) . '</p> <p class="field col"><label for="edit_active">' . form::checkbox('edit_active', 1, $edit_active) . ' ' . __('c_c_status_Active') . '</label></p> </div> <div class="three-cols"> <p class="field col"><label for="edit_civility">' . __('c_c_Civility') . '</label>' . form::select('edit_civility', $aCivilities, $edit_civility) . '</p> <p class="field col"><label for="edit_lastname">' . __('c_c_Name') . '</label>' . form::text('edit_lastname', 40, 255, html::escapeHTML($edit_lastname)) . '</p> <p class="field col"><label for="edit_firstname">' . __('c_c_First_name') . '</label>' . form::text('edit_firstname', 40, 255, html::escapeHTML($edit_firstname)) . '</p> </div> <div class="two-cols"> <p class="field col"><label for="edit_language">' . __('c_c_Language') . '</label>' . form::select('edit_language', $aLanguages, html::escapeHTML($edit_language)) . '</p> <p class="field col"><label for="edit_timezone">' . __('c_c_Timezone') . '</label>' . form::select('edit_timezone', dt::getZones(true, true), html::escapeHTML($edit_timezone)) . '</p> </div>'; $aEditTabs[10]['content'] .= ' <div class="two-cols">'; if ($aEditPageInfos['bWaitingValidation']) { $aEditTabs[10]['content'] .= '<p class="col">' . __('m_users_user_in_wait_of_validation') . ', <a href="module.php?m=users&action=edit&id=' . $aEditPageInfos['iUserId'] . '&valide=1">' . __('m_users_validate_this_user') . '</a>.</p>'; } else { $aEditTabs[10]['content'] .= '<p class="field col"><label for="edit_group_id">' . __('c_c_Group') . '</label>' . form::select('edit_group_id', $groups_array, $edit_group_id) . '</p>'; } $aEditTabs[10]['content'] .= '</div>'; if ($okt->users->config->enable_custom_fields) { $aEditTabs[10]['content'] .= '<div class="two-cols">'; while ($rsFields->fetch()) { $aEditTabs[10]['content'] .= '<div class="col">' . $rsFields->getHtmlField($aPostedData) . '</div>'; } $aEditTabs[10]['content'] .= '</div>';
if ($status != '200') { // Might be 404 (URL not found), 670 (blog not online), ... echo '<p class="form-note warn">' . sprintf(__('The URL of blog or the URL scan method might not be well set (<code>%s</code> return a <strong>%s</strong> status).'), $file, $status) . '</p>'; } else { if (substr($content, 0, 6) != '<?xml ') { // Not well formed XML feed echo '<p class="form-note warn">' . sprintf(__('The URL of blog or the URL scan method might not be well set (<code>%s</code> does not return an ATOM feed).'), $file) . '</p>'; } } } catch (Exception $e) { $core->error->add($e->getMessage()); } echo '<p><label for="blog_status">' . __('Blog status:') . '</label>' . form::combo('blog_status', $status_combo, $blog_status) . '</p>'; } echo '<p class="area"><label for="blog_desc">' . __('Blog description:') . '</label>' . form::textarea('blog_desc', 60, 5, html::escapeHTML($blog_desc)) . '</p>' . '</div>'; echo '<div class="fieldset"><h4>' . __('Blog configuration') . '</h4>' . '<div class="two-cols">' . '<div class="col">' . '<p><label for="editor">' . __('Blog editor name:') . '</label>' . form::field('editor', 30, 255, html::escapeHTML($blog_settings->system->editor)) . '</p>' . '<p><label for="lang">' . __('Default language:') . '</label>' . form::combo('lang', $lang_combo, $blog_settings->system->lang, 'l10n') . '</p>' . '<p><label for="blog_timezone">' . __('Blog timezone:') . '</label>' . form::combo('blog_timezone', dt::getZones(true, true), html::escapeHTML($blog_settings->system->blog_timezone)) . '</p>' . '<p><label for="copyright_notice">' . __('Copyright notice:') . '</label>' . form::field('copyright_notice', 30, 255, html::escapeHTML($blog_settings->system->copyright_notice)) . '</p>' . '</div>' . '<div class="col">' . '<p><label for="post_url_format">' . __('New post URL format:') . '</label>' . form::combo('post_url_format', $post_url_combo, html::escapeHTML($blog_settings->system->post_url_format)) . '</p>' . '<p><label for="note_title_tag">' . __('HTML tag for the title of the notes on the blog:') . '</label>' . form::combo('note_title_tag', $note_title_tag_combo, $blog_settings->system->note_title_tag) . '</p>' . '<p><label for="enable_xmlrpc" class="classic">' . form::checkbox('enable_xmlrpc', '1', $blog_settings->system->enable_xmlrpc) . __('Enable XML/RPC interface') . '</label>' . '</p>'; echo '<p class="form-note info">' . __('XML/RPC interface allows you to edit your blog with an external client.') . '</p>'; if ($blog_settings->system->enable_xmlrpc) { echo '<p>' . __('XML/RPC interface is active. You should set the following parameters on your XML/RPC client:') . '</p>' . '<ul>' . '<li>' . __('Server URL:') . ' <strong><code>' . sprintf(DC_XMLRPC_URL, $core->blog->url, $core->blog->id) . '</code></strong></li>' . '<li>' . __('Blogging system:') . ' <strong><code>Movable Type</code></strong></li>' . '<li>' . __('User name:') . ' <strong><code>' . $core->auth->userID() . '</code></strong></li>' . '<li>' . __('Password:'******' <strong><code><' . __('your password') . '></code></strong></li>' . '<li>' . __('Blog ID:') . ' <strong><code>1</code></strong></li>' . '</ul>'; } echo '</div>' . '</div>' . '<br class="clear" />' . '</div>'; echo '<div class="fieldset"><h4>' . __('Comments and trackbacks') . '</h4>' . '<div class="two-cols">' . '<div class="col">' . '<p><label for="allow_comments" class="classic">' . form::checkbox('allow_comments', '1', $blog_settings->system->allow_comments) . __('Accept comments') . '</label></p>' . '<p><label for="comments_pub" class="classic">' . form::checkbox('comments_pub', '1', !$blog_settings->system->comments_pub) . __('Moderate comments') . '</label></p>' . '<p><label for="comments_ttl" class="classic">' . sprintf(__('Leave comments open for %s days') . '.', form::field('comments_ttl', 2, 3, $blog_settings->system->comments_ttl)) . '</label></p>' . '<p class="form-note">' . __('No limit: leave blank.') . '</p>' . '<p><label for="wiki_comments" class="classic">' . form::checkbox('wiki_comments', '1', $blog_settings->system->wiki_comments) . __('Wiki syntax for comments') . '</label></p>' . '<p><label for="comment_preview_optional" class="classic">' . form::checkbox('comment_preview_optional', '1', $blog_settings->system->comment_preview_optional) . __('Preview of comment before submit is not mandatory') . '</label></p>' . '</div>' . '<div class="col">' . '<p><label for="allow_trackbacks" class="classic">' . form::checkbox('allow_trackbacks', '1', $blog_settings->system->allow_trackbacks) . __('Accept trackbacks') . '</label></p>' . '<p><label for="trackbacks_pub" class="classic">' . form::checkbox('trackbacks_pub', '1', !$blog_settings->system->trackbacks_pub) . __('Moderate trackbacks') . '</label></p>' . '<p><label for="trackbacks_ttl" class="classic">' . sprintf(__('Leave trackbacks open for %s days') . '.', form::field('trackbacks_ttl', 2, 3, $blog_settings->system->trackbacks_ttl)) . '</label></p>' . '<p class="form-note">' . __('No limit: leave blank.') . '</p>' . '<p><label for="comments_nofollow" class="classic">' . form::checkbox('comments_nofollow', '1', $blog_settings->system->comments_nofollow) . __('Add "nofollow" relation on comments and trackbacks links') . '</label></p>' . '</div>' . '<br class="clear" />' . '</div>' . '<br class="clear" />' . '</div>'; echo '<div class="fieldset"><h4>' . __('Blog presentation') . '</h4>' . '<div class="two-cols">' . '<div class="col">' . '<p><label for="date_format">' . __('Date format:') . '</label> ' . form::field('date_format', 30, 255, html::escapeHTML($blog_settings->system->date_format)) . form::combo('date_format_select', $date_formats_combo, '', '', '', false, 'title="' . __('Pattern of date') . '"') . '</p>' . '<p class="chosen form-note">' . __('Sample:') . ' ' . dt::str(html::escapeHTML($blog_settings->system->date_format)) . '</p>' . '<p><label for="time_format">' . __('Time format:') . '</label>' . form::field('time_format', 30, 255, html::escapeHTML($blog_settings->system->time_format)) . form::combo('time_format_select', $time_formats_combo, '', '', '', false, 'title="' . __('Pattern of time') . '"') . '</p>' . '<p class="chosen form-note">' . __('Sample:') . ' ' . dt::str(html::escapeHTML($blog_settings->system->time_format)) . '</p>' . '<p><label for="use_smilies" class="classic">' . form::checkbox('use_smilies', '1', $blog_settings->system->use_smilies) . __('Display smilies on entries and comments') . '</label></p>' . '<p><label for="no_search" class="classic">' . form::checkbox('no_search', '1', $blog_settings->system->no_search) . __('Disable internal search system') . '</label></p>' . '</div>' . '<div class="col">' . '<p><label for="nb_post_for_home" class="classic">' . sprintf(__('Display %s entries on home page'), form::field('nb_post_for_home', 2, 3, $blog_settings->system->nb_post_for_home)) . '</label></p>' . '<p><label for="nb_post_per_page" class="classic">' . sprintf(__('Display %s entries per page'), form::field('nb_post_per_page', 2, 3, $blog_settings->system->nb_post_per_page)) . '</label></p>' . '<p><label for="nb_post_per_feed" class="classic">' . sprintf(__('Display %s entries per feed'), form::field('nb_post_per_feed', 2, 3, $blog_settings->system->nb_post_per_feed)) . '</label></p>' . '<p><label for="nb_comment_per_feed" class="classic">' . sprintf(__('Display %s comments per feed'), form::field('nb_comment_per_feed', 2, 3, $blog_settings->system->nb_comment_per_feed)) . '</label></p>' . '<p><label for="short_feed_items" class="classic">' . form::checkbox('short_feed_items', '1', $blog_settings->system->short_feed_items) . __('Truncate feeds') . '</label></p>' . '<p><label for="inc_subcats" class="classic">' . form::checkbox('inc_subcats', '1', $blog_settings->system->inc_subcats) . __('Include sub-categories in category page and category posts feed') . '</label></p>' . '</div>' . '</div>' . '<br class="clear" />' . '</div>'; echo '<div class="fieldset"><h4 id="medias-settings">' . __('Media and images') . '</h4>' . '<p class="form-note warning">' . __('Please note that if you change current settings bellow, they will now apply to all new images in the media manager.') . ' ' . __('Be carefull if you share it with other blogs in your installation.') . '</p>' . '<div class="two-cols">' . '<div class="col">' . '<h5>' . __('Generated image sizes (in pixels)') . '</h5>' . '<p class="field"><label for="media_img_t_size">' . __('Thumbnail') . '</label> ' . form::field('media_img_t_size', 3, 3, $blog_settings->system->media_img_t_size) . '</p>' . '<p class="field"><label for="media_img_s_size">' . __('Small') . '</label> ' . form::field('media_img_s_size', 3, 3, $blog_settings->system->media_img_s_size) . '</p>' . '<p class="field"><label for="media_img_m_size">' . __('Medium') . '</label> ' . form::field('media_img_m_size', 3, 3, $blog_settings->system->media_img_m_size) . '</p>' . '<h5>' . __('Default size of the inserted video (in pixels)') . '</h5>' . '<p class="field"><label for="media_video_width">' . __('Width') . '</label> ' . form::field('media_video_width', 3, 3, $blog_settings->system->media_video_width) . '</p>' . '<p class="field"><label for="media_video_height">' . __('Height') . '</label> ' . form::field('media_video_height', 3, 3, $blog_settings->system->media_video_height) . '</p>' . '<h5>' . __('Flash player') . '</h5>' . '<p><label for="media_flash_fallback">' . form::checkbox('media_flash_fallback', '1', $blog_settings->system->media_flash_fallback) . __('Insert Flash player fallback for video (mp4 or m4v) and audio (mp3) media') . '</label></p>' . '<p class="form-note info">' . __('For flv video, the Flash player will be anyway inserted.') . '</p>' . '</div>' . '<div class="col">' . '<h5>' . __('Default image insertion attributes') . '</h5>' . '<p class="vertical-separator"><label for="media_img_title_pattern">' . __('Inserted image title') . '</label>' . form::combo('media_img_title_pattern', $img_title_combo, html::escapeHTML($blog_settings->system->media_img_title_pattern)) . '</p>' . '<p><label for="media_img_use_dto_first" class="classic">' . form::checkbox('media_img_use_dto_first', '1', $blog_settings->system->media_img_use_dto_first) . __('Use original media date if possible') . '</label></p>' . '<p><label for="media_img_no_date_alone" class="classic">' . form::checkbox('media_img_no_date_alone', '1', $blog_settings->system->media_img_no_date_alone) . __('Do not display date if alone in title') . '</label></p>' . '<p class="form-note info">' . __('It is retrieved from the picture\'s metadata.') . '</p>' . '<p class="field vertical-separator"><label for="media_img_default_size">' . __('Size of inserted image:') . '</label>' . form::combo('media_img_default_size', $img_default_size_combo, html::escapeHTML($blog_settings->system->media_img_default_size) != '' ? html::escapeHTML($blog_settings->system->media_img_default_size) : 'm') . '</p>' . '<p class="field"><label for="media_img_default_alignment">' . __('Image alignment:') . '</label>' . form::combo('media_img_default_alignment', $img_default_alignment_combo, html::escapeHTML($blog_settings->system->media_img_default_alignment)) . '</p>' . '<p><label for="media_img_default_link">' . form::checkbox('media_img_default_link', '1', $blog_settings->system->media_img_default_link) . __('Insert a link to the original image') . '</label></p>' . '</div>' . '</div>' . '<br class="clear" />' . '</div>'; echo '<div class="fieldset"><h4>' . __('Search engines robots policy') . '</h4>'; $i = 0; foreach ($robots_policy_options as $k => $v) { echo '<p><label for="robots_policy-' . $i . '" class="classic">' . form::radio(array('robots_policy', 'robots_policy-' . $i), $k, $blog_settings->system->robots_policy == $k) . ' ' . $v . '</label></p>'; $i++; } echo '</div>';