<?php
include "../funcs.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd[/URL]">
<html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]">
<head>
<title>WCDDL-Admin</title>
<link rel="stylesheet" type="text/css" href="../cssfox.css" media="screen" />
</head>
<style type="text/css">
body {
padding:3px;
}
</style>
<body class="tborder">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
<tr class="header_bg">
<td valign="middle"><a href="../index.php"><img src="../images/logo.gif" border="0" alt="Forums" /></a></td>
<td align="right" id="header_right_cell">
</td>
</tr>
</table>
<div class="vb_navbar">
<a href="../admin/index.php">WCDDL Admin</a> | <a href="../news/index.php">WarezNews Admin</a> </div>
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center" class="tborder">
<tr>
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center"class="tborder">
<?php
$password = "admin"; //CHANGE THE PASSWORD
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
if ($action != "admin" && $action != "login" && $action!= "temp3"){
?>
<CENTER><H1>NEWS ADMIN CP</H1></CENTER>
<body bgcolor="#00000">
<center><table align=middle><td align=left width=20%>
<tr><td height="27" colspan="2"><FONT SIZE="4" COLOR="#ffffff">:: wcddl News ::</FONT></td><tr><td>LOGIN</td></tr><tr><form method=post action="?action=login"><td>Password:</td><td><input type=password name=pass> <input type=submit value=login></td></tr></form></table></center>
<?php
}
if ($action=="login"){
if ($pass==$password){
echo"Login successful";
$fd = fopen ("news.txt", "r");
$stuff = fread ($fd, filesize ("news.txt"));
fclose ($fd);
php?>
<td height="399" width="100%" valign="top">
<form method="post" action="?action=temp3&te=news.txt">
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td><font size="1">Edit News:</font></td>
</tr>
<tr>
<td width="100%">
<textarea name="cont" cols="70" rows="20"><?php echo $stuff ?></textarea>
</td>
</tr>
<tr>
<td width="86%">
<input type="submit" name="Submit" value="Save"><input type="button" name="Cancel" value="Cancel" onClick="javascript: history.back(1)">
</td>
</tr>
<tr>
</tr>
</table>
</form>
<?php
}else{
echo "<FONT SIZE=2 COLOR=red>Invalid Password</FONT>";
}
}
if ($action=="temp3") {
$cont=$HTTP_POST_VARS['cont'];
$cont=stripslashes($cont);
$fp = fopen("news.txt", "w");
fputs($fp, $cont);
fputs($fp, "\n");
fputs($fp, "");
fclose($fp);
php?>
<body bgcolor="#ccccc">
<BR><BR><font size="2">News Edited Successfully<BR></font>
<?php
}
?>
</div>
</table></tr></table>
</body>
</html>