<?php
if(!isset($_SESSION)) 
session_start();
if(!isset($_SESSION['admin_wsvc']))
{
header("location: admin.php");
}
include 'common/header.php';
$error = "";
 ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- TemplateBeginEditable name="doctitle" -->
<title>Edit Bad Words: <?php echo(get_title()) ?></title>
</head>
<body class="metrouicss" onload="prettyPrint()">
<div class="container" style="width:940px;margin: auto">
<div class="page">
<div class="nav-bar" style="background:<?php echo(retColor()); ?>">
    <div class="nav-bar-inner padding10">
        <span class="pull-menu"></span>

        <a href="<?php echo(rootpath()) ?>"><span class="element brand">
            <img class="place-left" src="images/logo32.png" style="height: 20px"/>
           <?php echo(get_title()) ?>
        </span></a>
    </div>
</div>
</div>

    <div class="page secondary with-sidebar">
        <div class="page-header">
            <div class="page-header-content">
                <h1>Edit Bad Words</h1>
                <a href="#" onclick="window.history.back();" class="back-button big page-back"></a>
            </div>
        </div>

        <?php include 'inc/sidebar.php'; ?>
        <div class="page-region">
            <div class="page-region-content">
                <div class="span5" style="padding-top:50px">
                     <div class="grid">
					 <div class="row">
					 <?php
if(isset($_POST['words']))
{
$words = $_POST["words"];
update_badwords($words);
}
?>
<form action="badwords.php" method="post">
<h3>Enter Comma Separated Bad Words</h3>  
 <div class="input-control textarea span6">
        <textarea name="words"><?php echo(get_badwords()) ?></textarea>
    </div>  
<input type="submit" class="bg-color-green" value="Update">
</form>
</div>
<?php               
if(isset($_POST['words']))
{
?>
<span class="label success">Bad Words Updated Successfully</span>
<?php 
}
?>
 </div>

				</div>
            </div>
        </div>
    </div>

<?php include 'common/footer.php'; ?>