<?php
// check rights
if ($login->check_rights()>=3):
// loading of reqired classes
include CLASSES_PATH."Options.php";
// creating of instances
$options=new Options();
if (isset($_POST["submit"])) { $status->print_success(LANG_ACTION_WAS_SUCCESSFULLY_COMPLETED); }
?>

<h2><?php echo LANG_OPTIONS; ?></h2>

<form action="./admin.php?f=options" method="post">

<div>

<p><strong><?php echo LANG_LANGUAGE_SELECTION; ?>:</strong><br />
<select name="lang" style="width: 100px;">
<?php $options->print_languages($config_variables->get("lang")); ?>
</select>
</p>

<p><strong><?php echo LANG_THEME_SELECTION; ?>:</strong><br />
<select name="theme" style="width: 200px;">
<?php $options->print_themes($config_variables->get("themes")); ?>
</select>
</p>

</div>

<div>

<p><strong><?php echo LANG_DATE_AND_TIME_FORMAT; ?>:</strong><br /><input type="text" name="date_format" value="<?php echo $config_variables->get("date_format"); ?>" style="width: 100px;" /></p>

</div>

<div>

<p><strong><?php echo LANG_SITENAME; ?>:</strong><br /><input type="text" name="sitename" value="<?php echo $config_variables->get("sitename"); ?>" style="width: 300px;" /></p>

<p><strong><?php echo LANG_TABLE_WITH_USERS; ?>:</strong><br /><input type="radio" name="table_users" value="kboard_users"<?php if (TABLE_USERS=="kboard_users") { echo " checked=\"checked\""; } ?> /> kboard_users <input type="radio" name="table_users" value="kcms_users"<?php if (TABLE_USERS=="kcms_users") { echo " checked=\"checked\""; } ?> /> kcms_users</p>

<p><strong><?php echo LANG_NUMBER_OF_ITEMS_ON_ONE_PAGE; ?>:</strong><br /><input type="text" name="paging_number" value="<?php echo $config_variables->get("paging_number"); ?>" style="width: 50px;" /></p>

</div>

<div>

<p><strong><?php echo LANG_ACCESS_OPTIONS; ?>:</strong></p>

<p><select name="locked_forums_writing_rights"><?php $options->print_rights($config_variables->get("locked_forums_writing_rights")); ?></select> <?php echo LANG_REQUIRED_RIGHTS_FOR_WRITE_TO_THE_LOCKED_FORUMS; ?></p>

<p><select name="locked_topics_writing_rights"><?php $options->print_rights($config_variables->get("locked_topics_writing_rights")); ?></select> <?php echo LANG_REQUIRED_RIGHTS_FOR_WRITE_TO_THE_LOCKED_TOPICS; ?></p>

<p><select name="topic_delete_rights"><?php $options->print_rights($config_variables->get("topic_delete_rights")); ?></select> <?php echo LANG_REQUIRED_RIGHTS_FOR_DELETE_TOPIC; ?></p>

<p><select name="post_delete_rights"><?php $options->print_rights($config_variables->get("post_delete_rights")); ?></select> <?php echo LANG_REQUIRED_RIGHTS_FOR_DELETE_POST; ?></p>

<p><select name="topic_lock_and_unlock_rights"><?php $options->print_rights($config_variables->get("topic_lock_and_unlock_rights")); ?></select> <?php echo LANG_REQUIRED_RIGHTS_FOR_LOCKING_AND_UNLOCKING_TOPICS; ?></p>

<p><select name="items_replace_rights"><?php $options->print_rights($config_variables->get("items_replace_rights")); ?></select> <?php echo LANG_REQUIRED_RIGHTS_FOR_REPLACING_ITEMS; ?></p>

</div>

<div>

<p><strong><?php echo LANG_CUSTOM_TOP_LINKS; ?>:</strong><br /><textarea name="top_links" cols="" rows="" style="width: 700px; height: 100px;"><?php echo $config_variables->get("top_links"); ?></textarea></p>

</div>

<div>

<p><input type="submit" name="submit" value="<?php echo LANG_SAVE_CHANGES; ?>" /></p>

</div>

</form>

<?php else: $access_denied=1; endif; ?>