- Joined
- Apr 11, 2009
- Messages
- 920
- Reaction score
- 463
Bulgarian
Code:
Здравейте на всички,
от много време не съм качвал нищо, за което съжалявам, но си имах причина. Та това е клас/библиотека в която може да намерите всичко за вашият собствен Mu Web, всичко нужно от А до Я, ест това е само Public release, и повечето работи не са направени докрай
Оригинален размер на файл-а в редове е 5624, а Public е само 1704
[B][SIZE="4"]ПРОЧЕТИ:[/SIZE][/B] Няма да помагам и обяснявам на никой как се работи с класове и функции, моля този файл да се ползва само от хора които знаят как се работи и могат сами да си подкарват всичко от него ;]
[B][SIZE="4"]Copyright:[/SIZE][/B]Всичко е писано от мен с много идеи от моите приятели overLucked и StoneAngel, а Уеб-а който няма да бъде release-нат е по идея на StoneAngel
English
Code:
Hello to everyone,
from a long time I didn't release anything and I am really sorry about that, but I had my own problems that need to solve. So, that's php library file that includes everything that you need for creating your own Mu Online Website it contains everything from A to Z (warp,reset,register...), but I want you to know that's only Public release, that means does not have everything on 100%. Original file size is 5624 rows in public there's only 1704 but it's enought to have normally working website ;]
[B][SIZE="4"]READ:[/SIZE][/B] I will not teach anyone how to work with that file, so please only people that have some experience to work and test it.
[B][SIZE="4"]Copyright:[/SIZE][/B]Everything is created by Me with a lot of ideas from my friends overLucked and StoneAngel. This project is developed from StoneAngel's idea ;]
Може да видите как изглежда из цялостно като се вкара кода в някой дизайн ;]
HOT -> UPDATE 0.1
DEFCON Security Class
Code:
class defcon_library{
//Deffense state 1
function defcon(){
$backupdir = "backup";
echo "<meta http-equiv='REFRESH' content='5;URL=./'>";
if(!is_dir($backupdir)){
print "<b>".ucfirst($backupdir)."</b> not exist in main directory!";
print "<br/>I want to create a <b><a href='?func=create'>new</a></b> one";
}
else{
$dirscan = scandir("./");
$num = 1;
foreach($dirscan as $value){
if(!preg_match("/.php/s", $value)){continue;}
else{
$addfile = $num++;
if(!is_file("./$backupdir/filelist.beam")){
$backupfile = fopen("./$backupdir/filelist.beam", "w");
}
else{
$value = basename($value, ".php");
$vzemi = @file_get_contents($value.".php");
$vzemi2 = @file_get_contents($backupdir."/".(hash_file('sha512', $value.".php")));
if(!file_exists($backupdir."/".(hash_file('sha512', $value.".php")))){
$error = 1;
$status = "<font color='#ffae00'>Not exist</font>";
}
elseif(!file_exists($value.".php")){
$error = 1;
$status = "<font color='red'>Deleted</font>";
}
elseif(base64_decode($vzemi2) != $vzemi){
$error = 1;
$status = "<font color='red'>Missing/Change</font> | <a href='?func=restore'>Restore it</a>";
}
elseif($error == 0){
$status = "<font color='green'>OK</font>";
$backupfile = fopen("./$backupdir/filelist.beam", "w+");
fwrite($backupfile, $addfile);
@fclose($backupfile);
}
else{}
print ucfirst($value)."- <a href='?func=backup&fileid=$value.php'>Copy it</a> | <a href='?func=remove&fileid=$value.php'>Remove it</a> | Status: $status<br/>";
}
}
}
}
//Create directory function
if(htmlspecialchars(addslashes($_GET[func])) == "create"){
mkdir("./$backupdir") or die("<br/>Can't create <b>".ucfirst($backupdir)."</b>, Windows do not allowed it");
print "<br/><b>".ucfirst($backupdir)."</b> is created";
echo "<meta http-equiv='REFRESH' content='2;URL=./'>";
}
//Remove function
elseif(htmlspecialchars(addslashes($_GET[func])) == "remove"){
unlink(htmlspecialchars(addslashes($_GET[fileid])));
print "<br/><b>".ucfirst(htmlspecialchars(addslashes($_GET[fileid])))."</b> is removed from main directory!";
echo "<meta http-equiv='REFRESH' content='2;URL=./'>";
}
//Backup function
elseif(htmlspecialchars(addslashes($_GET[func])) == "backup"){
if(file_exists(hash_file('sha512', $file))){
print "<br/><b>".ucfirst(htmlspecialchars(addslashes($_GET[fileid])))."</b> exists in <b>".ucfirst($backupdir)."</b> directory!";
echo "<meta http-equiv='REFRESH' content='2;URL=./'>";
}
else{
$file = htmlspecialchars(addslashes($_GET[fileid]));
$file = hash_file('sha512', $file);
$getcontent = file_get_contents(htmlspecialchars(addslashes($_GET[fileid])));
$getcontent = base64_encode($getcontent);
$newfile = fopen("./$backupdir/$file", "w");
fwrite($newfile, $getcontent);
@fclose($newfile);
print "<br/><b>".ucfirst(htmlspecialchars(addslashes($_GET[fileid])))."</b> is store in <b>".ucfirst($backupdir)."</b> directory!";
echo "<meta http-equiv='REFRESH' content='2;URL=./'>";
}
}
}
}
Attachments
Last edited: