//login.php
Admin login ";
}
}
if($_GET['status']=="nieuw")
{
echo "";
echo "";
echo "Bestandsnaam: ";
echo " ";
echo " ";
echo "
";
}
if($_GET['status']=="wijzigen")
{
echo "";
echo "";
if($safe_mode=="uit")
{
echo "\n";
} else {
echo "\n";
}
echo "".basename($_REQUEST['bestandnaam'])." ";
echo " ";
echo " ";
echo "
";
}
if($_GET['status']=="save")
{
$site=stripslashes($_REQUEST['files']);
if($_GET['sta']=="")
{
$fp=fopen($_REQUEST['bestandnaam'],"w");
}
else
{
$fp=fopen("../".$_REQUEST['bestandnaam'],"w");
}
fputs($fp,$site);
fclose($fp);
echo "";
?>
Bezig met opslaan
}
exit;
?>
//beveiliging.php
include("gebruikers.php");
$secrednaam=$HTTP_COOKIE_VARS['username'];
if($secrednaam!="")
{
list($naamgg,$wachtwoord2,$emailgg)=split(",",$gebruiker[$secrednaam]);
if($HTTP_COOKIE_VARS["password"] == $wachtwoord2)
{
$login="true";
}
else
{
header("Location: login.php");
}
}
else
{
header("Location: login.php");
}
?>
//cookie.php
include("gebruikers.php");
$naampg=$_POST['naam'];
if($gebruiker[$naampg]!="")
{
list($naamgg,$wachtwoord2,$emailgg)=split(",",$gebruiker[$naampg]);
if($_POST[wachtwoord] == $wachtwoord2)
{
setcookie("username", $HTTP_POST_VARS["naam"], 0, "/");
setcookie("password", $HTTP_POST_VARS["wachtwoord"], 0, "/");
header("location: index.php");
}
}
else
{
header("location: login.php");
}
?>
//gebruikers.php
$gebruiker['root']="root,admin,none@none.com";
?>
//mail.php
include("beveiliging.php"); ?>
}
if(($_POST["Send"]=="Verzenden") && ($status=="nieuw")){ //mailtjes verzenden
$mailserver=fsockopen($smtp,$smtp_port,&$errno,&$errstr,30);
$buffer=fgets($mailserver,512);
if($auth="login"){
$buffer="AUTH LOGIN\n";
fputs($mailserver,$buffer);
$buffer=fgets($mailserver,512);
$buffer=base64_encode($user)."\n";
fputs($mailserver,$buffer);
$buffer=fgets($mailserver,512);
$buffer=base64_encode($pass)."\n";
fputs($mailserver,$buffer);
$buffer=fgets($mailserver,512);
}elseif($auth="plain"){
$buffer="AUTH PLAIN ".base64_encode("$popl".chr(0)."$popl".chr(0)."$popw")."\n";
fputs($mailserver,$buffer);
$buffer=fgets($mailserver,512);
}
$buffer="MAIL FROM: $from\r\n";
fputs($mailserver,$buffer);
$buffer=fgets($mailserver,512);
$buffer="RCPT TO: $to\r\n";
fputs($mailserver,$buffer);
$buffer=fgets($mailserver,512);
$buffer="DATA\r\n";
fputs($mailserver,$buffer);
$buffer=fgets($mailserver,512);
$buffer="From: $fromname <$from>\r\n";
fputs($mailserver,$buffer);
$buffer="To: $toname <$to>\r\n";
fputs($mailserver,$buffer);
$buffer="Subject: $subject\r\n";
fputs($mailserver,$buffer);
$buffer="Content-Type: text/plain; charset=iso-8859-1\r\n\r\n"; //Voor html mail: "Content-Type: text/html; charset=iso-8859-1\r\n\r\n"
fputs($mailserver,$buffer);
$buffer="$bericht\r\n";
fputs($mailserver,$buffer);
$buffer="\r\n.\r\n";
fputs($mailserver,$buffer);
$buffer=fgets($mailserver,512);
}
// verbinding maken met mailserver en Status controleren!
// open socket to server and check connection status
$mailserver=fsockopen($pop3,$pop3_port,&$errno,&$errstr,30);
if(!$mailserver) {
print("
Connection failed!");
exit;
} else {
$buffer=fgets($mailserver,512);
// USER
$buffer="USER $popl\n";
fputs($mailserver,$buffer);
$buffer=fgets($mailserver,512);
// PASS
$buffer="PASS $popw\n";
fputs($mailserver,$buffer);
// Authentification OK/ERR
$buffer=fgets($mailserver,512);
if (substr($buffer,0,4)=="-ERR") {
printf("
Gebruikersnaam of wachtwoord zijn onjuist!
Dit kun je instellen bij Admin->Options
");
fclose($mailserver);
exit;
// Authentification OK
} else {
//print "$popl@$pop3";
if($mailid==""){ //maillijst weergeven
if($delid<>""){ //mailtjes verwijderen
$buffer="DELE $delid\n";
fputs($mailserver,$buffer);
header("Location: ".$_SERVER["PHP_SELF"]);
}
echo " ";
$buffer="STAT\n";
fputs($mailserver,$buffer);
$buffer=fgets($mailserver,512);
$mailsum=substr($buffer,4,2);
$mailmem=substr($buffer,6,strlen($buffer)-6);
print("Aantal mailtjes $mailsum Totale grootte $mailmem bytes
");
if(!$_GET['mailid'])
{
echo("Van Onderwerp Datum Bijlage ");
for($nr=1;$nr<=$mailsum;$nr++){
$buffer="RETR $nr\n";
fputs($mailserver,$buffer);
$bijlage=false;
while($buffer<>".\r\n"){
$buffer=fgets($mailserver,512);
if(substr($buffer,0,5)=="From:"){$from=htmlspecialchars(substr($buffer,6,strlen($buffer)));}
if(substr($buffer,0,8)=="Subject:"){$subject=htmlspecialchars(substr($buffer,9,strlen($buffer)));}
if(substr($buffer,0,5)=="Date:"){$date=htmlspecialchars(substr($buffer,6,strlen($buffer)));}
if(substr($buffer,0,13)=="Content-Type:"){
$type=substr($buffer,14,strpos($buffer,";")-14);
if($type!="text/plain" and $type!="text/html"){$bijlage=true;}
}
//Content-Type: is bijvoorbeeld image/jpeg
if($bijlage and strpos($buffer,"\tname=\"")!==false){$bijlagenaam[]=substr($buffer,strpos($buffer,"name=")+6,strpos($buffer,"\"\r\n")-strpos($buffer,"name=")-6);}
}
echo("$from $subject ".$date." ");
if($bijlage==true){
//echo("JA");
for($i=0;$i".$bijlagenaam[$i]."
");
}
}else{
echo("nee");
}
echo(" Delete ");
}
echo("
");
}
if($status=="nieuw")
{
?>">
From: Name:
To: Name:
Subject: Authentification:
Bericht: (alleen tekst)
".\r\n"){
$buffer=fgets($mailserver,512);
if(substr($buffer,0,13)=="Content-Type:"){ $type=substr($buffer,14,strpos($buffer,";")-14);}
if(strpos($buffer,"\tname=\"")!==false){
if($file==substr($buffer,strpos($buffer,"name=")+6,strpos($buffer,"\"\r\n")-strpos($buffer,"name=")-6)){$a=1;}
}
if($a==2 and strpos($buffer,"--")!==false){$a=3;}
if($a==2){$data.=base64_decode($buffer);}
if($a==1 and $buffer=="\r\n"){$a=2;}
}
header ("Content-type: $type");
header ("Content-Disposition: attachment; filename=$file");
echo($data);
$a=0;
$type="";
$tekst="";
$base64=false;
$buffer="RETR ".$_GET['mailid']."\n";
fputs($mailserver,$buffer);
while($buffer<>".\r\n"){
$buffer=fgets($mailserver,512);
if(substr($buffer,0,24)=="Content-Type: text/plain"){$type="text";$tekst="";$a=0;}
if(substr($buffer,0,23)=="Content-Type: text/html"){$type="html";$tekst="";$a=0;}
if($a==1 and $type=="text" and $buffer==".\r\n"){$a=2;}
if($a==0 and $type=="html" and (strpos(strtolower($buffer),"")!==false OR strpos(strtolower(base64_decode($buffer)),"")!==false)){$a=1;}
if($a==1 and $type=="text"){$tekst.=nl2br(htmlspecialchars($buffer));}
if($a==1 and $type=="html"){
if($base64){
$tekst.=base64_decode($buffer);
}else{
$tekst.=$buffer;
}
}
if($a==0 and $type=="text" and $buffer=="\r\n"){$a=1;}
if($a==1 and $type=="html" and strpos(strtolower($buffer),"")!==false){$a=2;}
if(strpos($buffer,"Content-Transfer-Encoding: base64")!==false){$base64=true;}
//echo($buffer);
echo $tekst;
}
}
$buffer="QUIT\n";
fputs($mailserver, $buffer);
$buffer=fgets($mailserver,512);
fclose($mailserver);
}
}
}
?>
//wijzig.php
$ipin=$_SERVER['REMOTE_ADDR'];
$out=mysql_fetch_object(mysql_query("select * from loggedin where ip = '$ipin'"));
$out2=mysql_fetch_object(mysql_query("select * from sites where sitenaam = '".$out->sitenaam."'"));
$loggedin="n";
if($out->sitenaam==$out2->sitenaam){
if($out->wachtwoord==$out2->wachtwoord ){
$loggedin="j";
}else{
$loggedin="n";
}
}else{
$loggedin="n";
}
if(empty($out->sitenaam)){
$loggedin="n";}
if(empty($out2->sitenaam)){
$loggedin="n";}
$site=$out->sitenaam;
if($loggedin=="j"){
#############################################################
?>
admin voorbeeld pagina
$a=$_GET['a'];
if($a=="out"){
mysql_query("DELETE FROM loggedin WHERE sitenaam='$site'");
header("location:?page=beheer");
}
?>design pagina's tekst persoonlijke instellingen
$showsite=mysql_fetch_object(mysql_query("select * from sites where sitenaam='$site'"));
$siteid=$showsite->id;
$query=mysql_query("select * from pagina where siteid='$siteid'");
$i=1;
while($showpage1=mysql_fetch_object($query)){
$id[$i]=$showpage1->id;
$i++;
}
$j=1;
$query2=mysql_query("select * from pagina where siteid='$siteid'");
while($showpage=mysql_fetch_object($query2)){
$voor=$j+1;
$achter=$j-1;
echo"".$showpage->naam."
";
$j++;
}
?>
pagina toevoegen Bekijken
Wijzigen
Eigen host
--Instellen
--Uploaden statestieken pagina instellingen Pagina name: echo $site; ?>
uitloggen dit onderdeel komt later meer instellingen komen
als dat nodig is
klik hier voor meer uitleg
Als u bugs vind, of iets mist op deze pagina neem contact met ons op
#############################################################
}else{
$a=$_GET['a'];
if(!empty($a)){
if(!empty($_POST['name'])){
if(!empty($_POST['pass'])){
$name=$_POST['name'];
$pass=$_POST['pass'];
$siteshow=mysql_fetch_object(mysql_query("select * from sites where sitenaam = '$name'"));
if($pass==$siteshow->wachtwoord){
$ip=$_SERVER['REMOTE_ADDR'];
$datum=date('d');
mysql_query("INSERT INTO `loggedin` ( `id` , `sitenaam` , `wachtwoord` , `ip` , `datum` ) VALUES ('', '$name', '$pass', '$ip', '$datum');");
header("location:?page=beheer");
}else{
echo "uw wachtwoord klopt niet";
}
}else{
echo "u heeft geen wachtwoord in gevuld";
}
}else{
"u heeft geen site naam in gevuld";
}
}else{
?>site naam
wachtwoord
}}
?>
//vars.php
$versie=1.4;
?>
//uploaden.php
include("beveiliging.php"); ?>
include("config.php");
$root = $_SERVER["DOCUMENT_ROOT"]."/".$homedir;
$status=$_REQUEST['status'];
$map=$_REQUEST['map'];
$bestand=$_REQUEST['bestand'];
chdir($root);
$openmap = opendir($root);
while($item = readdir($openmap)) {
If (is_dir($item)) $mappen[] = $item;
}
if($status=="") {
echo "";
echo "";
echo "De map waar je het wilt uploaden
";
echo "Bestand ";
echo "
";
}
if($status=="uploaden") {
if(move_uploaded_file($HTTP_POST_FILES['bestand']['tmp_name'],"$map/".$HTTP_POST_FILES['bestand']['name']))
{
$file=$HTTP_POST_FILES['bestand']['name'];
$grote=$HTTP_POST_FILES['bestand']['size'];
$type=$HTTP_POST_FILES['bestand']['type'];
echo "$file is ge-upload
";
echo "";
echo "Naam: $file ";
echo "Grote: $grote ";
echo "Type: $type ";
echo "
";
}}
?>
//users.php
include("beveiliging.php");
if($HTTP_COOKIE_VARS['username']=="root")
{ ?>
include("gebruikers.php");
$aantal=count($gebruiker);
$status=$_REQUEST['status'];
if($status==""){
echo "Aantal Admin users:".$aantal."
";
echo "";
echo "Naam E-mail ";
foreach ($gebruiker as $key)
{
list($naam,$wachtwoord,$email)=split(",",$key);
echo "$naam $email ";
}
echo " ";
echo "
";
}
if($status=="del")
{
if($aantal > 1)
{
echo $_REQUEST['naam']." verwijdert dit kun je niet meer ongedaan maken";
$file=file("gebruikers.php");
$data='';
for($i=0; $i
}
else
{
echo "Je moet minstens 1 gebruiker houden
";
}
}
if($status=="new")
{
echo "";
echo "";
echo "Naam ";
echo "wachtwoord ";
echo "E-mail ";
echo " ";
echo "
";
}
if($status=="save")
{
$file=file("gebruikers.php");
$data='';
for($i=1; $i");
fclose($fp);
echo "Gebruiker toegevoegt
";
?>
}
}
else
{
echo "Alleen root heeft deze rechten";
}
?>
//sql.php
include("beveiliging.php");
include("config.php");
mysql_connect($host,$dbuser,$dbpass);
mysql_select_db($db);
if($_GET['tabel'])
{
$sql="SELECT * FROM `".$_GET['tabel']."`";
$res=mysql_query($sql);
echo "";
echo "Mysql:
\$sql='$sql'; ";
echo "
";
$velden=mysql_num_fields($res);
echo "";
echo "";
while($veld = mysql_fetch_field($res))
{ echo "".$veld->name." ";
} echo "Opties ";
while($data=mysql_fetch_array($res))
{ echo "";
for($i=0; $i<$velden; $i++)
{ $title=htmlentities($data[$i]);
$title=str_replace("\"",""",$title);
echo "".substr(htmlentities($data[$i]),0,100)." "; }
echo " ";
echo " "; }
echo "
";
echo "
";
if(mysql_num_rows($res)!="1")
{ echo "Er zijn ".mysql_num_rows($res)." resultaten in ".$_GET['tabel'].""; }
else { echo "Er is ".mysql_num_rows($res)." resultaat in ".$_GET['tabel'].""; }
echo "
";
} else { $tab = mysql_list_tables($db);
while ($row = mysql_fetch_row($tab)) {
echo "$row[0]
"; }}
?>
//updates.php
include("beveiliging.php"); ?>
include("vars.php");
echo "Dit is versie $versie
";
echo "zijn er updates?
";
$file=file("http://jacob.slompinfo.nl/versions.txt");
if($versie < $file[0])
{
echo "Er is een update
";
echo "Versie $file[0]
";
echo "Omschrijving
";
echo "$file[1]
";
echo "$file[2]
";
list($url, $text)=split("\t",$file[3]);
if($url && $text)
{
echo "$text";
}
else
{
echo "Nog niet te downloaden";
}
}
else
{
echo "Geen nieuwe updates";
}
?>
//phpinfo.php
include("beveiliging.php"); ?>
phpinfo();
?>
//index.php
include("config.php");
include("beveiliging.php");
include("vars.php");
if($mysql=="")
{
header("Location: opties.php");
}
?>Admin systeem A d m i n Bestanden MySQL Webmail
if($HTTP_COOKIE_VARS['username']=="root"){
?>Admin
}
else
{
?>Admin
}
?>About Uitloggen
include("config.php");
if($mysql=="ja")
{
mysql_connect($host,$dbuser,$dbpass) or die("Je wachtwoord of gebruikersnaam is onjuist ga naar admin->options om ze te wijzigen");
mysql_select_db($db) or die ("");
$tab = mysql_list_tables($db);
while ($row = mysql_fetch_row($tab)) {
echo "$row[0]
"; }
}
else
{
echo "geen mysql beschikbaar";
}
?>
if($webmail=="ja")
{
?>Lezen
Deleten
Nieuw Bericht
}
else
{
echo "Webmail niet geschikbaar kijk bij admin->options";
}
?>