Exemplo n.º 1
0
        $db->query('UPDATE ' . $db->prefix . 'comments SET commenter_id=1 WHERE commenter_id IN (' . implode(',', $user_ids) . ')') or error('Unable to mark comments as guest comments', __FILE__, __LINE__, $db->error());
    }
    // Regenerate the users info cache
    generate_users_info_cache();
    $users_pruned = count($user_ids);
    message_backstage(__('Pruning complete, all users that matched the requirements have been pruned.', 'luna'));
}
// Get the first comment ID from the db
$result = $db->query('SELECT id FROM ' . $db->prefix . 'comments ORDER BY id ASC LIMIT 1') or error('Unable to fetch thread info', __FILE__, __LINE__, $db->error());
if ($db->num_rows($result)) {
    $first_id = $db->result($result);
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Maintenance', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('maintenance', 'prune');
?>

<form class="form-horizontal" id="notiprune" method="post" action="<?php 
echo $_SERVER['REQUEST_URI'];
?>
">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
_e('Prune notifications', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" name="notiprune" tabindex="8"><span class="fa fa-fw fa-recycle"></span> <?php 
_e('Prune', 'luna');
?>
</button></span></h3>
Exemplo n.º 2
0
    generate_update_cache();
    require FORUM_CACHE_DIR . 'cache_update.php';
}
$result = $db->query('SELECT SUM(num_topics), SUM(num_posts) FROM ' . $db->prefix . 'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $db->error());
list($stats['total_topics'], $stats['total_posts']) = array_map('intval', $db->fetch_row($result));
if ($stats['total_posts'] == 0) {
    $stats['total_posts'] == '0';
}
if ($stats['total_topics'] == 0) {
    $stats['total_topics'] == '0';
}
$action = isset($_GET['action']) ? $_GET['action'] : null;
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Index', 'luna'));
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('backstage', 'index');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
}
if (substr(sprintf('%o', fileperms(FORUM_ROOT . 'config.php')), -4) > '644') {
    ?>
<div class="alert alert-warning"><?php 
    _e('The config file is writeable at this moment, you might want to set the CHMOD to 640 or 644.', 'luna');
    ?>
</div>
<?php 
}
if ($install_file_exists) {
    ?>
<div class="alert alert-warning">
	<p><?php 
Exemplo n.º 3
0
    confirm_referrer('backstage/theme.php');
    $default_style = htmlspecialchars($_GET["default_style"]);
    $db->query('UPDATE ' . $db->prefix . 'users SET style=\'' . $default_style . '\' WHERE id > 0') or error('Unable to set style settings', __FILE__, __LINE__, $db->error());
    $db->query('UPDATE ' . $db->prefix . 'config SET conf_value = \'' . $default_style . '\' WHERE conf_name = \'o_default_style\'') or error('Unable to update default style', __FILE__, __LINE__, $db->error());
    // Regenerate the config cache
    if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
        require LUNA_ROOT . 'include/cache.php';
    }
    generate_config_cache();
    clear_feed_cache();
    redirect('backstage/theme.php?saved=true');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Style', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('settings', 'theme');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
}
?>
<div class="row">
	<div class="col-md-3">
		<div class="panel panel-default panel-current">
			<div class="panel-heading">
				<h3 class="panel-title"><?php 
_e('Current theme', 'luna');
?>
</h3>
			</div>
<?php 
$current_theme = $luna_config['o_default_style'];
Exemplo n.º 4
0
function message_backstage($message, $no_back_link = false, $http_status = null)
{
    global $luna_config;
    // Did we receive a custom header?
    if (!is_null($http_status)) {
        header('HTTP/1.1 ' . $http_status);
    }
    $page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Info', 'luna'));
    define('FORUM_ACTIVE_PAGE', 'admin');
    require 'header.php';
    load_admin_nav('info', 'info');
    ?>
<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title"><?php 
    _e('Info', 'luna');
    ?>
</h3>
	</div>
	<div class="panel-body">
		<p><?php 
    echo $message;
    ?>
</p>
	</div>
</div>
<?php 
    exit;
}
Exemplo n.º 5
0
    header("Location: update.php");
}
if (file_exists(LUNA_CACHE_DIR . 'cache_update.php')) {
    include LUNA_CACHE_DIR . 'cache_update.php';
}
if (!defined('LUNA_UPDATE_LOADED') || $last_check_time > time() + 60 * 60 * 24) {
    if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
        require LUNA_ROOT . 'include/cache.php';
    }
    generate_update_cache();
    require LUNA_CACHE_DIR . 'cache_update.php';
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Update', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('backstage', 'update');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
}
?>
<div class="row">
	<div class="col-sm-4 col-md-3">
		<form method="post" action="update.php">
			<input type="hidden" name="form_sent" value="1" />
			<fieldset>
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title"><?php 
_e('Update ring', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="save"><span class="fa fa-fw fa-check"></span> <?php 
Exemplo n.º 6
0
            $db->query('UPDATE ' . $db->prefix . 'config SET conf_value=' . $value . ' WHERE conf_name=\'o_' . $db->escape($key) . '\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
        }
    }
    // Regenerate the config cache
    if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
        require LUNA_ROOT . 'include/cache.php';
    }
    generate_config_cache();
    clear_feed_cache();
    redirect('backstage/settings.php?saved=true');
}
$timestamp = time();
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Global settings', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('settings', 'settings');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
}
?>
<form class="form-horizontal" method="post" action="settings.php">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
_e('Essentials', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="save"><span class="fa fa-fw fa-check"></span> <?php 
_e('Save', 'luna');
?>
</button></span></h3>
		</div>
Exemplo n.º 7
0
    redirect('backstage/ranks.php');
} elseif (isset($_POST['remove'])) {
    $id = intval(key($_POST['remove']));
    $db->query('DELETE FROM ' . $db->prefix . 'ranks WHERE id=' . $id) or error('Unable to delete rank', __FILE__, __LINE__, $db->error());
    // Regenerate the ranks cache
    if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
        require LUNA_ROOT . 'include/cache.php';
    }
    generate_ranks_cache();
    redirect('backstage/ranks.php');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Ranks', 'luna'));
$focus_element = array('ranks', 'new_rank');
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('users', 'ranks');
if ($luna_config['o_ranks'] == 0) {
    ?>
<div class="alert alert-danger">
	<?php 
    echo sprintf(__('<strong>User ranks is disabled in %s.</strong>', 'luna'), '<a href="features.php">' . __('Features', 'luna') . '</a>');
    ?>
</div>
<?php 
}
?>
<div class="row">
	<form id="ranks" method="post" action="ranks.php">
		<div class="col-sm-4">
			<div class="panel panel-default">
				<div class="panel-heading">
Exemplo n.º 8
0
        $mail_message = str_replace('<password>', $password, $mail_message);
        $mail_message = str_replace('<login_url>', $luna_config['o_base_url'] . '/login.php', $mail_message);
        $mail_message = str_replace('<board_mailer>', $luna_config['o_board_title'], $mail_message);
        luna_mail($email1, $mail_subject, $mail_message);
    }
    // Regenerate the users info cache
    if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
        require LUNA_ROOT . 'include/cache.php';
    }
    generate_users_info_cache();
    redirect('backstage/users.php?user_created=true');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Users', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('users', 'tools');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
}
if (isset($_GET['user_created'])) {
    echo '<div class="alert alert-success">' . __('User created', 'luna') . '</div>';
}
if (isset($_GET['user_failed'])) {
    echo '<div class="alert alert-danger">' . __('Failed to create user, no password was given.', 'luna') . '</div>';
}
?>
<form class="form-horizontal" method="post" action="<?php 
echo $_SERVER['REQUEST_URI'];
?>
">
	<div class="panel panel-default">
Exemplo n.º 9
0
        }
        if ($cur_item['name'] == '') {
            message_backstage(__('You must give your menu item a title.', 'luna'));
        } elseif ($cur_item['url'] == '') {
            message_backstage(__('You must give your menu item an URL.', 'luna'));
        } elseif ($cur_item['order'] == '' || preg_match('%[^0-9]%', $cur_item['order'])) {
            message_backstage(__('Position must be a positive integer value.', 'luna'));
        } else {
            $db->query('UPDATE ' . $db->prefix . 'menu SET url=\'' . $db->escape($cur_item['url']) . '\', name=\'' . $db->escape($cur_item['name']) . '\', disp_position=' . $cur_item['order'] . ', visible=\'' . $cur_item['visible'] . '\' WHERE id=' . intval($item_id)) or error('Unable to update menu', __FILE__, __LINE__, $db->error());
        }
    }
    redirect('backstage/menu.php');
}
$result = $db->query('SELECT * FROM ' . $db->prefix . 'menu ORDER BY disp_position') or error('Unable to fetch menu items', __FILE__, __LINE__, $db->error());
require 'header.php';
load_admin_nav('settings', 'menu');
?>
<div class="row">
	<div class="col-sm-4 col-md-3">
		<form method="post" action="menu.php?action=add_item">
			<fieldset>
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title"><?php 
_e('New menu item', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="add_item"><span class="fa fa-fw fa-plus"></span> <?php 
_e('Add', 'luna');
?>
</button></span></h3>
					</div>
Exemplo n.º 10
0
            $sort_by = 'subject ASC';
            break;
        default:
            $sort_by = 'last_post DESC';
            break;
    }
    // Determine the thread offset (based on $_GET['p'])
    $num_pages = ceil($cur_forum['num_topics'] / $luna_user['disp_topics']);
    $p = !isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages ? 1 : intval($_GET['p']);
    $start_from = $luna_user['disp_topics'] * ($p - 1);
    // Generate paging links
    $paging_links = paginate($num_pages, $p, 'moderate.php?fid=' . $fid);
    $page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Moderate', 'luna'));
    define('FORUM_ACTIVE_PAGE', 'admin');
    require 'header.php';
    load_admin_nav('content', 'moderate');
    ?>
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
    _e('Moderate content', 'luna');
    ?>
</h3>
		</div>
		<div class="jumbotron jumbotron-moderate-forum">
			<h2 class="inline-block"><?php 
    printf(__('Moderating "%s"', 'luna'), luna_htmlspecialchars($cur_forum['forum_name']));
    ?>
</h2><span class="pull-right moderate-pagination"><?php 
    echo $paging_links;
    ?>
Exemplo n.º 11
0
            $cur_cat['name'] = luna_trim($cur_cat['name']);
            $cur_cat['order'] = luna_trim($cur_cat['order']);
            if ($cur_cat['name'] == '') {
                message_backstage(__('You must enter a name', 'luna'));
            }
            if ($cur_cat['order'] == '' || preg_match('%[^0-9]%', $cur_cat['order'])) {
                message_backstage(__('Position must be a positive integer value.', 'luna'));
            }
            $db->query('UPDATE ' . $db->prefix . 'categories SET cat_name=\'' . $db->escape($cur_cat['name']) . '\', disp_position=' . $cur_cat['order'] . ' WHERE id=' . intval($cat_id)) or error('Unable to update category', __FILE__, __LINE__, $db->error());
        }
        redirect('backstage/board.php?saved=true');
    }
    $page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Board', 'luna'));
    define('FORUM_ACTIVE_PAGE', 'admin');
    require 'header.php';
    load_admin_nav('content', 'board');
    if (isset($_GET['saved'])) {
        echo '<div class="alert alert-success">' . __('Your settings have been saved.', 'luna') . '</div>';
    }
    ?>
<div class="row">
	<div class="col-lg-4">
		<form method="post" action="board.php?action=add_forum">
<?php 
    $result = $db->query('SELECT id, cat_name FROM ' . $db->prefix . 'categories ORDER BY disp_position') or error('Unable to fetch category list', __FILE__, __LINE__, $db->error());
    if ($db->num_rows($result) > 0) {
        ?>
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title"><?php 
        _e('Add forum', 'luna');
Exemplo n.º 12
0
            }
            $db->query('UPDATE ' . $db->prefix . 'config SET conf_value=' . $value . ' WHERE conf_name=\'o_' . $db->escape($key) . '\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
        }
    }
    // Regenerate the config cache
    if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
        require FORUM_ROOT . 'include/cache.php';
    }
    generate_config_cache();
    clear_feed_cache();
    redirect('backstage/features.php?saved=true');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Features', 'luna'));
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('settings', 'features');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success"><h4>' . __('Your settings have been saved.', 'luna') . '</h4></div>';
}
?>
<form class="form-horizontal" method="post" action="features.php">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
_e('General', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="save"><span class="fa fa-fw fa-check"></span> <?php 
_e('Save', 'luna');
?>
</button></span></h3>
		</div>
Exemplo n.º 13
0
        $result = $db->query('SELECT comment_id FROM ' . $db->prefix . 'reports WHERE id=' . $zap_id) or error('Unable to fetch report info', __FILE__, __LINE__, $db->error());
        $comment_id = $db->result($result);
        $db->query('UPDATE ' . $db->prefix . 'comments SET marked = 0 WHERE id=' . $comment_id) or error('Unable to zap report', __FILE__, __LINE__, $db->error());
    }
    // Delete old reports (which cannot be viewed anyway)
    $result = $db->query('SELECT zapped FROM ' . $db->prefix . 'reports WHERE zapped IS NOT NULL ORDER BY zapped DESC LIMIT 10,1') or error('Unable to fetch read reports to delete', __FILE__, __LINE__, $db->error());
    if ($db->num_rows($result) > 0) {
        $zapped_threshold = $db->result($result);
        $db->query('DELETE FROM ' . $db->prefix . 'reports WHERE zapped <= ' . $zapped_threshold) or error('Unable to delete old read reports', __FILE__, __LINE__, $db->error());
    }
    redirect('backstage/reports.php');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Reports', 'luna'));
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('content', 'reports');
?>
<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title"><?php 
_e('New reports', 'luna');
?>
</h3>
	</div>
	<form method="post" action="reports.php?action=zap">
		<fieldset>
			<table class="table">
				<thead>
					<tr>
						<th class="col-xs-2"><?php 
_e('Reported by', 'luna');
Exemplo n.º 14
0
    }
    $tablecount = $counter;
    // Optimize All
    for ($i = 1; $i <= $tablecount; $i++) {
        $sql = 'OPTIMIZE TABLE ' . $tables[$i];
        if (!($result = $db->query($sql))) {
            message_backstage(__('SQL error, optimize failed.', 'luna'));
        }
    }
    message_backstage('All tables optimized');
} else {
    $action = isset($_GET['action']) ? $_GET['action'] : null;
    $page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Database', 'luna'));
    define('LUNA_ACTIVE_PAGE', 'admin');
    require 'header.php';
    load_admin_nav('maintenance', 'database');
    ?>
<form class="form-horizontal" method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
    _e('Backup', 'luna');
    ?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="backupstart"><span class="fa fa-fw fa-floppy-o"></span> <?php 
    _e('Start backup', 'luna');
    ?>
</button></span></h3>
		</div>
Exemplo n.º 15
0
        // Only update values that have changed
        if (array_key_exists('p_' . $key, $luna_config) && $luna_config['p_' . $key] != $input) {
            $db->query('UPDATE ' . $db->prefix . 'config SET conf_value=' . $input . ' WHERE conf_name=\'p_' . $db->escape($key) . '\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
        }
    }
    // Regenerate the config cache
    if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
        require FORUM_ROOT . 'include/cache.php';
    }
    generate_config_cache();
    redirect('backstage/permissions.php?saved=true');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Permissions', 'luna'));
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('users', 'permissions');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success"><h4>' . __('Your settings have been saved.', 'luna') . '</h4></div>';
}
?>
<form class="form-horizontal" method="post" action="permissions.php">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
_e('Posting', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="save"><span class="fa fa-fw fa-check"></span> <?php 
_e('Save', 'luna');
?>
</button></span></h3>
		</div>
Exemplo n.º 16
0
					</div>
				</span>
			<?php 
    }
    ?>
		</div>
	</form>
</div>
<?php 
    require 'footer.php';
} else {
    $page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Users', 'luna'));
    $focus_element = array('find_user', 'form[username]');
    define('FORUM_ACTIVE_PAGE', 'admin');
    require 'header.php';
    load_admin_nav('users', 'users');
    if (isset($_GET['saved'])) {
        echo '<div class="alert alert-success"><h4>' . __('Your settings have been saved.', 'luna') . '</h4></div>';
    }
    if (isset($_GET['deleted'])) {
        echo '<div class="alert alert-danger"><h4>' . __('The user has been deleted.', 'luna') . '</h4></div>';
    }
    ?>
<form id="find_user" method="get" action="users.php">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
    _e('User search', 'luna');
    ?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="find_user"><span class="fa fa-fw fa-search"></span> <?php 
    _e('Search', 'luna');
Exemplo n.º 17
0
    $php_accelerator = '<a href="http://' . __('www.php-accelerator.co.uk/', 'luna') . '">' . __('ionCube PHP Accelerator', 'luna') . '</a>';
} elseif (ini_get('apc.enabled')) {
    $php_accelerator = '<a href="http://' . __('www.php.net/apc/', 'luna') . '">' . __('Alternative PHP Cache (APC)', 'luna') . '</a>';
} elseif (ini_get('zend_optimizer.optimization_level')) {
    $php_accelerator = '<a href="http://' . __('www.zend.com/products/guard/zend-optimizer/', 'luna') . '">' . __('Zend Optimizer', 'luna') . '</a>';
} elseif (ini_get('eaccelerator.enable')) {
    $php_accelerator = '<a href="http://' . __('www.eaccelerator.net/', 'luna') . '">' . __('eAccelerator', 'luna') . '</a>';
} elseif (ini_get('xcache.cacher')) {
    $php_accelerator = '<a href="http://' . __('xcache.lighttpd.net/', 'luna') . '">' . __('XCache', 'luna') . '</a>';
} else {
    $php_accelerator = __('N/A', 'luna');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Server statistics', 'luna'));
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('backstage', 'stats');
?>
<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title"><?php 
_e('Luna version information', 'luna');
?>
</h3>
	</div>
	<table class="table">
		<thead>
			<tr>
				<th class="col-md-3"></th>
				<th class="col-md-3"><?php 
_e('Version', 'luna');
?>
Exemplo n.º 18
0
} elseif (isset($_POST['remove'])) {
    confirm_referrer('backstage/censoring.php');
    $id = intval(key($_POST['remove']));
    $db->query('DELETE FROM ' . $db->prefix . 'censoring WHERE id=' . $id) or error('Unable to delete censor word', __FILE__, __LINE__, $db->error());
    // Regenerate the censoring cache
    if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) {
        require LUNA_ROOT . 'include/cache.php';
    }
    generate_censoring_cache();
    redirect('backstage/censoring.php');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Censoring', 'luna'));
$focus_element = array('censoring', 'new_search_for');
define('LUNA_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('content', 'censoring');
?>
<div class="row">
	<div class="col-sm-4">
		<form id="censoring" method="post" action="censoring.php">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title"><?php 
_e('Add word', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="add_word" tabindex="3"><span class="fa fa-fw fa-plus"></span> <?php 
_e('Add', 'luna');
?>
</button></span></h3>
				</div>
					<fieldset>
Exemplo n.º 19
0
/*
 * Copyright (C) 2013-2015 Luna
 * Based on code by FluxBB copyright (C) 2008-2012 FluxBB
 * Based on code by Rickard Andersson copyright (C) 2002-2008 PunBB
 * Licensed under GPLv3 (http://getluna.org/license.php)
 */
define('FORUM_ROOT', '../');
require FORUM_ROOT . 'include/common.php';
if (!$luna_user['is_admmod']) {
    header("Location: login.php");
}
$action = isset($_GET['action']) ? $_GET['action'] : null;
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Update', 'luna'));
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('backstage', 'about');
?>
<div class="row">
	<div class="col-sm-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">About Luna 1.2 Cornflower Blue</h3>
			</div>
			<div class="panel-body">
				<section class="release-notes">
					<div class="container">
						<p class="meta"><span class="release-version">1.2.3</span></p><h2>Cornflower Blue Update 3</h2>
						<ul class="changes">
							<li><div class="change-label-container"><em class="change-label change-improved">Improved</em></div>Improved security on token hash</li>
							<li><div class="change-label-container"><em class="change-label change-improved">Improved</em></div>Pruning forums will now also decrease the comment count</li>
							<li><div class="change-label-container"><em class="change-label change-improved">Improved</em></div>General UI improvements in Backstage</li>
Exemplo n.º 20
0
				<button class="btn btn-danger" type="submit" name="del_group"><span class="fa fa-fw fa-trash"></span> <?php 
        echo __('Delete', 'luna');
        ?>
</button>
			</p>
		</form>
	</div>
</div>
<?php 
    }
    require 'footer.php';
} else {
    $page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('User groups', 'luna'));
    define('FORUM_ACTIVE_PAGE', 'admin');
    require 'header.php';
    load_admin_nav('users', 'groups');
    ?>
<div class="row">
	<div class="col-sm-4">
		<div class="panel panel-default">
			<form id="groups" method="post" action="groups.php">
				<div class="panel-heading">
					<h3 class="panel-title"><?php 
    echo __('Add new group', 'luna');
    ?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="add_group" tabindex="2"><span class="fa fa-fw fa-plus"></span> <?php 
    echo __('Add', 'luna');
    ?>
</button></span></h3>
				</div>
				<div class="panel-body">
Exemplo n.º 21
0
            }
            $db->query('UPDATE ' . $db->prefix . 'config SET conf_value=' . $value . ' WHERE conf_name=\'o_' . $db->escape($key) . '\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
        }
    }
    // Regenerate the config cache
    if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
        require FORUM_ROOT . 'include/cache.php';
    }
    generate_config_cache();
    clear_feed_cache();
    redirect('backstage/email.php?saved=true');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Global settings', 'luna'));
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('settings', 'email');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success"><h4>' . __('Your settings have been saved.', 'luna') . '</h4></div>';
}
?>
<form class="form-horizontal" method="post" action="email.php">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
_e('Contact settings', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="save"><span class="fa fa-fw fa-check"></span> <?php 
_e('Save', 'luna');
?>
</button></span></h3>
		</div>
Exemplo n.º 22
0
            }
            $db->query('UPDATE ' . $db->prefix . 'config SET conf_value=' . $value . ' WHERE conf_name=\'o_' . $db->escape($key) . '\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
        }
    }
    // Regenerate the config cache
    if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
        require FORUM_ROOT . 'include/cache.php';
    }
    generate_config_cache();
    clear_feed_cache();
    redirect('backstage/appearance.php?saved=true');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Appearance', 'luna'));
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('settings', 'appearance');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success"><h4>' . __('Your settings have been saved.', 'luna') . '</h4></div>';
}
?>
<form class="form-horizontal" method="post" action="appearance.php">
	<input type="hidden" name="form_sent" value="1" />
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
_e('Display settings', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="save"><span class="fa fa-fw fa-check"></span> <?php 
_e('Save', 'luna');
?>
</button></span></h3>
Exemplo n.º 23
0
            }
            $db->query('UPDATE ' . $db->prefix . 'config SET conf_value=' . $value . ' WHERE conf_name=\'o_' . $db->escape($key) . '\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
        }
    }
    // Regenerate the config cache
    if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
        require FORUM_ROOT . 'include/cache.php';
    }
    generate_config_cache();
    clear_feed_cache();
    redirect('backstage/registration.php?saved=true');
}
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Admin', 'luna'), __('Registration', 'luna'));
define('FORUM_ACTIVE_PAGE', 'admin');
require 'header.php';
load_admin_nav('settings', 'registration');
if (isset($_GET['saved'])) {
    echo '<div class="alert alert-success"><h4>' . __('Your settings have been saved.', 'luna') . '</h4></div>';
}
?>
<form class="form-horizontal" method="post" action="registration.php">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title"><?php 
_e('Registration', 'luna');
?>
<span class="pull-right"><button class="btn btn-primary" type="submit" name="save"><span class="fa fa-fw fa-check"></span> <?php 
_e('Save', 'luna');
?>
</button></span></h3>
		</div>