Просмотр файла index.php

Размер файла: 4.05Kb
<?php
function color_show1($text) {
$text=str_replace('<br />','',$text);
$arr=array('ff0000','ff6200','ff8000','ffc400','adcc00','5fcc00','11cc00','5fcc00','adcc00','ffc400','ff6200','ff0000','ff6200','ff8000','ffc400','adcc00','5fcc00','11cc00','5fcc00','adcc00','ffc400','ff6200','ff0000','ff6200','ff8000','ffc400','adcc00','5fcc00','11cc00','5fcc00','adcc00','ffc400','ff6200','ff0000','ff6200','ff8000','ffc400','adcc00','5fcc00','11cc00','5fcc00','adcc00','ffc400','ff6200','ff0000','ff6200','ff8000','ffc400','adcc00','5fcc00','11cc00','5fcc00','adcc00','ffc400','ff6200','ff0000','ff6200','ff8000','ffc400','adcc00','5fcc00','11cc00','5fcc00','adcc00','ffc400','ff6200','ff0000','ff6200','ff8000','ffc400','adcc00','5fcc00','11cc00','5fcc00','adcc00','ffc400','ff6200','ff0000','ff6200','ff8000','ffc400','adcc00','5fcc00','11cc00','5fcc00','adcc00','ffc400','ff6200'
);
$str='';
$text=iconv('utf-8','windows-1251',$text);
for ($i=0; $i<strlen($text); $i++) {
$str.='<font color="#'.$arr[$i].'">'.$text[$i].'</font>';
}
$str=iconv('windows-1251','utf-8',$str);
return $str;
}
$host=$_SERVER['HTTP_HOST'];
echo '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>Импорт</title>
<style type="text/css">
body {
background: #222222;
color: #C2A983;
margin: 2px;
textalign: center;
font: normal 0.7em Comic Sans MS,sansserif,Arial;
}
a:link,a:visited {
color: gray;
text-decoration: underline;
}
a:active,a:hover {
color: orange;
textdecoration: 3em;
background: transparent;
}
.pesan {
padding: 3px;
margin: 2px;
border:1px solid #777777;
}
.catatan {
background: mediumstlategray;
color: #c0c0c0;
padding: 3px;
margin: 2px;
border:1px solid #353535;
}
input , select , form {
margin: 2px 0px;
}
input , textarea {
padding: 1px 1px 0px 1px;
border: 1px solid #c0c0c0;
background: #000000;
color: yellow;
text-align: center;
font-size: normal;
}
.number {
-wap-input-format: "*N";
}
.menu {
border: #777777 1px solid;
color: fuchsia;
background: #454545;
padding: 3px;
margin: 2px;
}
.reply {
padding: 2px;
background: #000000;
color: #c0c0c0;
margin: 2px;
}
.quote {
padding: 2px;
background: #353535;
color: orange;
margin: 2px;
}
.time {
border: #777777 1px solid;
background: #000000;
padding: 1px;
margin: 2px;
}
.name {
border: #000000 1px solid;
color: yellow;
}
.bawah {
border: #777777 1px solid;
margin: 2px;
padding: 3px;
background: #151515;
color: lime;
}
</style></head><body>
<div class="time"><center>'.color_show1(ucfirst($host)).'</center></div>
<div class="pesan">
<div class="name"><center>
<span style="background: #000000;text-shadow:blue 0.1em 0.1em 0.1em"><font size=50>Импорт</span></font></center></div>
<center>
';
$text='';
if (!empty($_POST['file'])) {
$text.='<hr />
';
$file=htmlspecialchars($_POST['file']);
$path_parts=pathinfo($file);
$filetype=@$path_parts['extension'];
$basename=@$path_parts['basename'];
if (!preg_match('/jpg|jpeg|gif|png|wbmp|bmp|sis|zip|txt|jar|jad|3gp|mp3|mid|midi|rar|amr|sisx|avi|mp4|wav|exe|ico|pdf|tar|gz|tgz|nth|thm|js|css|xml|dat/i',$filetype)) {
$text.='Расширение файла запрещено!<br />';
} else if (copy($file,$basename)) {
$text.='Загруженный файл: <a href="'.$basename.'">'.$basename.'</a><br />';
} else {
$text.='Погрузка не удалась!<br />
';
}}
$file=@$file?$file:'http://';
echo '<form method="post">
Адрес файла:<br />
<textarea cols="25" rows="3" name="file">'.$file.'</textarea><br />
<input type="submit" value="Импорт" /></form>
'.$text.'
</center></div>
<div class="menu"><center>
<a href="/">Главная</a>
</center></div>
<div class="bawah"><center>
'.color_show1('Script Created by Proton').' (<a href="http://wap-svoboda.com">http://wap-svoboda.com</a>)<br />
'.color_show1('Design by Slastiona').'<br />
<b>&copy; '.date("Y",time()).' '.color_show1(ucfirst($host)).'</b><br />
</center></div>
';

?>