Witam,
Zajmuję się grą MuOnline i firma Sky Team stworzyła skrypt strony do Tej gry. Ja go sobie edytuje i udostępniam moje poprawki innym. W panelu Admina znajduje się opcja do Update skryptu. Lecz link nie działa bo ta firma już dawno padła 2006rok. I chciałbym pozmieniać tak aby się to łączyło z moim ftp i mógbym udostępniać innym moje modyfikacje Ect.
Poniżej daje skrypt php z admina
<?
{
}
?>
<?
{
echo '<div style="text-align:center;"><h2 class=highlight>SkyTeam Page AutoUpdate Tool</h2>'; $update_server = @file_get_contents('http://lorencia.com/acemu/update_server_info.txt'); if(empty($update_server)) echo 'Update server connect failed. Try again.'; else
{
if(substr($update_server,0,19) != 'STMPUPDATE_VERSIONS') echo '<br>Downloaded file header incorrect!'; elseif(!isset($_GET['download_files'])) {
$file = explode("\n",$update_server); $kolory = array('505050','707070'); echo '<table style="margin:auto;"><form action=index.php?strona=pageadmin/site_update&download_files=1 method=post>'; for($x=1;$x<count($file);++$x) //go check files..
{
echo '<tr style="background-color:#'.$kolory[$x%2].'">'; $checksum = explode('<#>',$file[$x]); if(!file_exists($checksum[0
])) echo '<td><b>'.$checksum[0].'</b></td><td><b><font color=#00FFFF>File missing</font></b></td><td><input type=checkbox name=files[] value="'.$checksum[0].'"></td>'; elseif(chop($checksum[1
]) == md5_file($checksum[0
])) echo '<td><b>'.$checksum[0].'</b></td><td><b><font color=#00FF00>File correct</font></b></td><td><input type=checkbox disabled></td>'; else echo '<td><b>'.$checksum[0].'</b></td><td><b><font color=#FF5050 title="MD5 Hash '.md5_file($checksum[0]).'">File NOT correct</font></b></td><td><input type=checkbox name=files[] value="'.$checksum[0].'"></td>'; }
echo '<input type=submit value="Update Selected"></form>'; }
elseif($_GET['download_files'] == '1')
{
$file = explode("\n",$update_server); for($x=1;$x<count($file);++$x) //go check files..
{
$files_save[$x] = explode('<#>',$file[$x]); $files_save[$x] = $files_save[$x][0];
}
for($x=0;$x<count($_POST['files']);++$x)
{
die('HACK: file not avalable!'); $plik_content = @file_get_contents('http://lorencia.com/acemu/sourses/'.$_POST['files'][$x].'.txt'); if(empty($plik_content)) echo $_POST['files'][$x].' - This file is not avalable for download<br>'; else
{
$header = substr($plik_content,0
,15
); $content = substr($plik_content,15
,(strlen($plik_content)-14
)); if($header != 'ST_UPDATE_FILE|') echo $_POST['files'][$x].' - Downloaded file is not correct<br>'.$content; else
{
@copy($_POST['files'][$x],$_POST['files'][$x].'~'); $content = gzuncompress
($content) or
die('DECOMPRESSION ERROR!!'); $n = fopen($_POST['files'][$x],'w'); echo $_POST['files'][$x].' - File Updated. Old file saved under '.$_POST['files'][$x].'~<br>'; }
}
}
}
else echo 'You'r Means?'; }
}
?>
up.