<div class="dbx-content"><?php if ( current_user_can('publish_posts') ) : ?>
<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); checked($post->post_status, 'future'); ?> /> <?php _e('Published') ?></label>
<?php endif; ?>
	  <label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post->post_status, 'draft'); ?> /> <?php _e('Draft') ?></label>
	  <label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></div>
</fieldset>

<?php if ( current_user_can('edit_posts') ) : ?>
<fieldset id="posttimestampdiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post Timestamp'); ?></h3>
<div class="dbx-content"><?php touch_time(($action == 'edit')); ?></div>
</fieldset>
<?php endif; ?>

<?php 
$authors = get_editable_authors( $current_user->id ); // TODO: ROLE SYSTEM
if ( $authors && count( $authors ) > 1 ) :
?>
<fieldset id="authordiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post Author'); ?></h3>
<div class="dbx-content">
<select name="post_author_override" id="post_author_override">
<?php
foreach ($authors as $o) :
$o = get_userdata( $o->ID );
if ( $post->post_author == $o->ID || ( empty($post_ID) && $user_ID == $o->ID ) ) $selected = 'selected="selected"';
else $selected = '';
echo "<option value='$o->ID' $selected>$o->display_name</option>";
endforeach;
?>
</select>
<h3 class="dbx-handle"><?php _e('Post Status') ?></h3> 
<div class="dbx-content"><?php if ( current_user_can('publish_posts') ) : ?>
<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); ?> /> <?php _e('Published') ?></label>
<?php endif; ?>
	  <label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post->post_status, 'draft'); ?> /> <?php _e('Draft') ?></label>
	  <label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></div>
</fieldset>

<?php if ( current_user_can('edit_posts') ) : ?>
<fieldset id="posttimestampdiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post Timestamp'); ?>:</h3>
<div class="dbx-content"><?php touch_time(($action == 'edit')); ?></div>
</fieldset>
<?php endif; ?>

<?php if ( $authors = get_editable_authors( $current_user->id ) ) : // TODO: ROLE SYSTEM ?>
<fieldset id="authordiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post author'); ?>:</h3>
<div class="dbx-content">
<select name="post_author_override" id="post_author_override">
<?php 
foreach ($authors as $o) :
$o = get_userdata( $o->ID );
if ( $post->post_author == $o->ID || ( empty($post_ID) && $user_ID == $o->ID ) ) $selected = 'selected="selected"';
else $selected = '';
echo "<option value='$o->ID' $selected>$o->display_name</option>";
endforeach;
?>
</select>
</div>
</fieldset>
<fieldset id="posttimestampdiv" class="dbx-box">
<h3 class="dbx-handle"><?php 
    _e('Post Timestamp');
    ?>
</h3>
<div class="dbx-content"><?php 
    touch_time($action == 'edit');
    ?>
</div>
</fieldset>
<?php 
}
?>

<?php 
$authors = get_editable_authors($current_user->id);
// TODO: ROLE SYSTEM
if ($authors && count($authors) > 1) {
    ?>
<fieldset id="authordiv" class="dbx-box">
<h3 class="dbx-handle"><?php 
    _e('Post Author');
    ?>
</h3>
<div class="dbx-content">
<select name="post_author_override" id="post_author_override">
<?php 
    foreach ($authors as $o) {
        $o = get_userdata($o->ID);
        if ($post->post_author == $o->ID || empty($post_ID) && $user_ID == $o->ID) {
            $selected = 'selected="selected"';
<?php

require_once ICL_PLUGIN_PATH . '/sitepress.php';
$active_languages = $sitepress->get_active_languages();
$languages = $sitepress->get_languages();
global $userdata, $current_user, $wp_version;
if (version_compare(preg_replace('#-RC[0-9]+$#', '', $wp_version), '3.1', '>=')) {
    $users = get_users();
} else {
    $users = @get_editable_authors($userdata->ID);
}
if ($user_language = get_user_meta($current_user->data->ID, 'icl_admin_language', true)) {
    $lang_details = $sitepress->get_language_details($user_language);
    $user_language = $lang_details['display_name'];
} else {
    $user_language = __('the default language', 'sitepress');
}
?>
<div class="wrap">
    <div id="icon-wpml" class="icon32"><br /></div>
    <h2><?php 
echo __('Setup WPML', 'sitepress');
?>
</h2>    
    
    <h3><?php 
echo __('Comments translation', 'sitepress');
?>
</h3>    
    <br />
    <p><?php