File size: 6.66Kb
<?
error_reporting(E_ALL & ~E_NOTICE);
include"../config.php";
include"../include/head.php";
$pas=substr($HTTP_POST_VARS["pas"],0,50);
if($pas!=$passnews){
echo'Введите пароль админа:<form method=post><input type=password name=pas><input type="submit"></form>';
};
if($pas==$passnews){
echo'
Импорт (файл сохраняется в папке adminpanel)<br/></p>
<form method="get" action="import.php">
<p align="left">Введите URL:<br/>
<input name="url" type="text" emptyok="true" title="URL" maxlength="999" value="http://"/><br/>
Сохранить как:<br/>
<input name="to" type="text" emptyok="true" title="name" maxlength="999" value="."/>
<br/>
<input value="импортировать" name="do" type="submit"/></form>
<postfield name="url" value="$(url)"/>
<postfield name="to" value="$(to)"/>
<postfield name="url1" value="$(url1)"/>
<postfield name="to1" value="$(to1)"/>
</go> ';
echo '<a href="phpinfo.php">PHPinfo</a><br>';
echo '<a href="html_redactor.php">Визуальный html редактор</a><br>';
?>
<tr><td width=15%></td>
<td width=80%>
<script language="JavaScript">
<!--
function logType(form) {
var url = ("ftp://"+form.host.value+"/")
if(form.logtype[0].checked == true) {
checkPass(form)
}
if((form.logtype[1].checked == true) && (form.verify[1].checked == true)) {
openFtp(form,url)
}
if((form.logtype[1].checked == true) && (form.verify[0].checked == true)) {
if(confirm("Now Loggin On To " + url + " anonymously")) {
openFtp(form,url)
}
}
}
function checkPass(form) {
var ip = (form.host.value)
var user = (form.user.value)
var pass = (form.pass.value)
var uspass = (user + ":" + pass)
var url = ("ftp://" +uspass+ "@" +ip)
if((form.user.value == "") && (form.pass.value == "")) {
alert('You Must Enter A Username And A Password \n Before You May Continue');
document.form.user.focus()
}
if((form.user.value == "") && (form.pass.value != "")) {
alert('Enter A Username!');
document.form.user.focus()
}
if((form.pass.value == "") && (form.user.value != "")) {
alert('Enter A Password!');
document.form.pass.focus()
}
if((form.pass.value != "") && (form.user.value != "") && (form.verify[0].checked == true)) {
if(confirm("Now Loggin On To ftp://" + ip + "/ Using \n Username: " + user + " \n Password: " + pass + "")) {
openFtp(form,url)
}
}
if((form.pass.value != "") && (form.user.value != "") && (form.verify[1].checked == true)) {
openFtp(form,url)
}
}
function openFtp(form,url) {
var locbar = ("no")
var butbar = ("no")
var menbar = ("no")
var statbar = ("no")
if(form.statbar[0].checked == true) {
statbar = "yes"
}
if(form.menbar[0].checked == true) {
menbar = "yes"
}
if(form.butbar[0].checked == true) {
butbar = "yes"
}
if(form.locbar[0].checked == true) {
locbar = "yes"
}
window.open(url, "", "resizable=yes,location=" + locbar + ",toolbar=" + butbar + ",scrollbars=yes,menubar=" + menbar + ",status=" + statbar + "")
}
//-->
</script>
<table width=450 border=0 cellspacing=0 cellpadding=0>
<tr>
<td bgcolor=cfcfcf>
<table width="100%" border=0 cellspacing=1 cellpadding=3>
<tr>
<td bgcolor=f5f5f5 align=center><br>
<table border=0><tr><td>
<FORM name="form">
<span lang="ru"><font color="#696969">Логин</font></span> <input type="radio" name="logtype" value="user" checked></td><td COLSPAN=2 ALIGN=MIDDLE>
<font color=696969><span lang="ru">Анонимный логин</span>:</font> <input type="radio" name="logtype" value="anon"></td></tr><tr><td>
<font color=696969><span lang="ru">Имя </span>:</font></td><td><input type="text" style="width: 105px;" name="user" size=8 OnFocus="window.status=('Now Enter A Username')" OnBlur="window.status=('');"></td><td>
<span lang="ru"><font color="#696969">Пароль</font></span><font color=696969>:</font></td><td><input type="password" style="width: 105px;" name="pass" size=8 OnFocus="window.status=('Now Enter A Password')" OnBlur="window.status=('')" ></td></tr><tr><td>
<font color=696969><span lang="ru">Вход</span>:</font></td><td>
<span lang="ru"><font color="#696969">Да</font></span> <input type="radio" name="verify" value="yes" checked><span lang="ru"><font color="#696969">Нет</font></span> <input type="radio" name="verify" value="no"></td><td COLSPAN=2 ALIGN=MIDDLE> </td></tr><tr><td COLSPAN=4 ALIGN=MIDDLE><br>
<span lang="ru"><font color="#696969">Свойства Окна</font></span></td></tr><tr><td>
<font color=696969><span lang="ru">Место</span>:</font></td><td>
<span lang="ru"><font color="#696969">Да</font></span> <input type="radio" name="locbar" value="yes"><span lang="ru"><font color="#696969">Нет</font></span> <input type="radio" name="locbar" value="no" checked></td><td>
<font color=696969><span lang="ru">Кнопки</span>:</font></td><td>
<span lang="ru"><font color="#696969">Да</font></span> <input type="radio" name="butbar" value="yes" checked><span lang="ru"><font color="#696969">Нет</font></span> <input type="radio" name="butbar" value="no"></td></tr><tr><td>
<font color=696969><span lang="ru">Меню</span>:</font></td><td>
<span lang="ru"><font color="#696969">Да</font></span> <input type="radio" name="menbar" value="yes" checked><span lang="ru"><font color="#696969">Нет</font></span> <input type="radio" name="menbar" value="no"></td><td>
<font color=696969><span lang="ru">Статус</span>:</font></td><td>
<span lang="ru"><font color="#696969">Да</font></span> <input type="radio" name="statbar" value="yes" checked><span lang="ru"><font color="#696969">Нет</font></span> <input type="radio" name="statbar" value="no"></td></tr><tr><td COLSPAN=2><input type="TEXT" style="width: 205px;" name="host" value="www.site_name.ru" size=15></td><td colspan=2> <input type="button" name="scroll" value=" Соединиться " OnFocus="window.status=('Click To Log On To My FTP')" OnBlur="window.status=('')" onClick="logType(this.form)" style="font-size: 78%"></td></FORM></tr></table></td></tr></table></td></tr></table>
</td></tr>
<tr><td colspan=2 align=center>
<?php
echo'
Добавление новости:
<form action=?id=add method=post><textarea cols=85 rows=14 name=new></textarea><br/><input type=submit value=Сохранить></form>
';
};
$novost=substr($HTTP_POST_VARS["new"],0,1000);
$date=date("H:i d,m,y",time());
if($id==add){echo"";
$open=fopen("../data/news.dat","w");
fwrite($open,"$date:::::$novost");
fclose($open);
echo'<font color="#FF0000">';
echo'Новость успешно добавлена!';
echo'</font>';
};
include"../include/foot.php";
?>