1
0
mirror of https://github.com/e107inc/e107.git synced 2025-02-13 11:04:38 +01:00

77 lines
2.2 KiB
PHP
Raw Normal View History

2009-11-19 09:52:35 +00:00
<?php
2006-12-02 04:36:16 +00:00
/*
2009-11-17 13:48:46 +00:00
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
2009-11-17 13:48:46 +00:00
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
2009-11-17 13:48:46 +00:00
2009-11-19 09:52:35 +00:00
require_once ('../../class2.php');
if(!getperms('1'))
{
header('location:'.e_BASE.'index.php');
exit();
2006-12-02 04:36:16 +00:00
}
2009-11-19 09:52:35 +00:00
require_once (e_HANDLER.'userclass_class.php');
include_lan(e_PLUGIN.'newforumposts_main/languages/'.e_LANGUAGE.'.php');
require_once (e_ADMIN.'auth.php');
$frm = e107::getForm();
2013-03-04 13:08:30 +01:00
$mes = e107::getMessage();
2009-11-19 09:52:35 +00:00
if(isset($_POST['updatesettings']))
{
2013-03-04 13:08:30 +01:00
$pref['nfp_display'] = intval($_POST['nfp_display']);
$pref['nfp_caption'] = $tp->toDB($_POST['nfp_caption']);
$pref['nfp_amount'] = intval($_POST['nfp_amount']);
$pref['nfp_layer'] = intval(vartrue($_POST['nfp_layer']));
$pref['nfp_posts'] = intval(vartrue($_POST['nfp_posts']));
$pref['nfp_layer_height'] = intval(($_POST['nfp_layer_height'] ? $_POST['nfp_layer_height'] : 200));
2006-12-02 04:36:16 +00:00
save_prefs();
}
2009-11-19 09:52:35 +00:00
$ns->tablerender($caption, $mes->render() . $text);
2009-11-19 09:52:35 +00:00
$text = "
2006-12-02 04:36:16 +00:00
<form method='post' action='".e_SELF."?".e_QUERY."' id='menu_conf_form'>
2013-03-04 13:08:30 +01:00
<table class='table adminform'>
<colgroup span='2'>
<col class='col-label' />
<col class='col-control' />
</colgroup>
2006-12-02 04:36:16 +00:00
<tr>
2013-03-04 13:08:30 +01:00
<td>".NFPM_L4."</td>
<td>".$frm->select('nfp_display', array(0 => NFPM_L5, 1 => NFPM_L6, 2 => NFPM_L7), $pref['nfp_display'])."</td>
2006-12-02 04:36:16 +00:00
</tr>
<tr>
2013-03-04 13:08:30 +01:00
<td>".NFPM_L8.":</td>
<td>".$frm->text('nfp_caption', $pref['nfp_caption'], '100', array('class' => 'tbox input-text span3'))."</td>
2006-12-02 04:36:16 +00:00
</tr>
<tr>
2013-03-04 13:08:30 +01:00
<td>".NFPM_L9.": </td>
<td>".$frm->text('nfp_amount', $pref['nfp_amount'], '3')."</td>
</tr>
2006-12-02 04:36:16 +00:00
<tr>
2013-03-04 13:08:30 +01:00
<td>".NFPM_L14."</td>
<td>".$frm->radio_switch('nfp_posts', $pref['nfp_posts'], LAN_YES, LAN_NO)."<span class='field-help'>".NFPM_L15."</span></td>
</tr>
2006-12-02 04:36:16 +00:00
<tr>
2013-03-04 13:08:30 +01:00
<td>".NFPM_L10."</td>
<td>".$frm->radio_switch('nfp_layer', $pref['nfp_layer'], LAN_YES, LAN_NO)."<br />
".NFPM_L11.": ".$frm->text('nfp_layer_height', $pref['nfp_layer_height'], '3')."</td>
2006-12-02 04:36:16 +00:00
</tr>
</table>
<div class='buttons-bar center'>
".$frm->admin_button('updatesettings', LAN_UPDATE, 'update')."
</div>
2013-03-04 13:08:30 +01:00
</form>";
2006-12-02 04:36:16 +00:00
$ns->tablerender(NFPM_L12, $text);
2009-11-19 09:52:35 +00:00
require_once (e_ADMIN."footer.php");
?>