View file members.php

File size: 30.88Kb
<?php
//
//  members.php
//  rev016
//
include('config.php');
include('lang/'.$idioma.'.php');
include('funciones.php');

if($modo=="join") {
    if($paso==1) {
		$ID=time();
        $HTML='<form action="members.php" method="post">';
        $HTML.='<table align="center" class="texto0" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
        $HTML.='<caption><span class="titulo">'.$_NewMember_.'</span></caption>';
        $HTML.='<tr><td align="right" class="1">'.$_WebTitle_.'</td><td class="0"><INPUT TYPE="TEXT" name="web" maxlength="64" size="40" onBlur="validate(this,\'text\',\'\''.$_WebTitle_.'\');"></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_WebURL_.'</td><td class="0"><INPUT TYPE="TEXT" name="webURL" value="http://" maxlength="100" size="60" onBlur="validate(this,\'url\',\'http://\');"><br><span class="minitexto0">(max.50)</span></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_Description_.'</td><td class="0"><INPUT TYPE="TEXT" name="descripcion" maxlength="'.$maxDescripcion.'" size="60" onBlur="validate(this,\'text\',\''.$_Description_.'\');"><br><span class="minitexto0">(max.'.$maxDescripcion.')</span></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_Email_.'</td><td class="0"><INPUT TYPE="TEXT" name="email" maxlength="64" size="40" onBlur="validate(this,\'email\',\'[email protected]\');"></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_BannerURL_.'</td><td class="0"><INPUT TYPE="TEXT" name="bannerURL" value="http://" maxlength="100" size="60" onBlur="validate(this,\'url\',\'http://\');"><br><span class="minitexto0">(max.50)</span></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_BannerWidth_.'</td><td class="0"><INPUT TYPE="TEXT" name="bannerAncho" value="'.$maxBannerAncho.'" maxlength="3" size="4" onBlur="validate(this,\'numberMin\',\''.$maxBannerAncho.'\',1);"></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_BannerHeight_.'</td><td class="0"><INPUT TYPE="TEXT" name="bannerAlto" value="'.$maxBannerAlto.'" maxlength="3" size="4" onBlur="validate(this,\'numberMin\',\''.$maxBannerAlto.'\',1);"></td></tr>';
        $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="join">';
        $HTML.='<INPUT TYPE="HIDDEN" name="paso" value="2">';
		$HTML.='<INPUT TYPE="HIDDEN" name="ID" value="'.$ID.'">';
        $HTML.='<tr class="2"><td>&nbsp;</td><td><input type="submit" class="boton"></td></tr>';
        $HTML.='</table></form>';
    }
    if($paso==2) {
        //Comprobaciones previas sobre las variables aсadidas.
		if($web=="") $web=time();
		if($webURL=="") $webURL='http://VACIO';
		if($email=="") $email=$adminEmail;
        //do {		Generamos la ID ъnica en el formulario.
        //    $ID=time();
        //} while(index("search",$ID,0,0));
		$old=array('<','>');
		$new=array('&lt;','&gt;');
		$web=str_replace($old,$new,$web);
		$descripcion=str_replace($old,$new,$descripcion);
        //Generaciуn de un password aleatorio
        srand((double)microtime()*1000000);
        $aux=rand(5,8);
        $pass="";
        for($i=1;$i<=$aux;$i++) $pass.=chr(rand(97,122));
        //Guardamos los datos de $IDinfo.php
		//$bannerAncho=string("int",$bannerAncho,$maxBannerAncho);
		//$bannerAlto=string("int",$bannerAlto,$maxBannerAlto);		
        $data="<?php\n";
        $data.="\$pass='".$pass."';\n";
        $data.="\$email='".$email."';\n";
        $data.="\$web='".$web."';\n";
        $data.="\$webURL='".$webURL."';\n";
        $data.="\$descripcion='".$descripcion."';\n";
        $data.="\$bannerURL='".$bannerURL."';\n";
        $data.="\$bannerAncho=".$bannerAncho.";\n";
        $data.="\$bannerAlto=".$bannerAlto.";\n";
        $data.="?>";
        $fp=fopen("data/".$ID."info.php","w");
        flock($fp,2);
        fwrite($fp,$data);
        fclose($fp);
        @chmod("data/".$ID."info.php",0666);
        //Generamos los archivos asociados
		if(index("search",$ID,0,0)) {
			index("change",$ID,$web,1-$validacion);		//Modificamos el нndice
		} else {
        	index("write",$ID,$web,1-$validacion);      //Aсadimos la web al нndice.
		}
        datos("reset",$ID,0);           //Creamos su archivo de datos.
        ip("reset",$ID,0);              //Archivo de IPs.
        notas("reset",$ID,0,0);         //Archivo de puntuaciones.
        comentarios("reset",$ID,0,0);   //Archivo de comentarios.
        //Generaciуn del cуdigo de votaciуn
        $URLcode=$topURL."in.php?ID=".$ID;
		$GetCodeMail='<A HREF="'.$URLcode.'" TARGET="_blank"><IMG SRC="'.$voteURL.'" border="0"></A>';
        $_GetCode_=str_replace('%%URLcode%%',$URLcode,$_GetCode_);
        $_GetCode_=str_replace('%%URLvote%%',$voteURL,$_GetCode_);
        $_mailed_=str_replace('%%email%%',$email,$_mailed_);
        if($sendMail) {
        	//Mandamos los emails necesarios.
            $to = $email;
            $subject=$topNombre;
            $text=$_NewMember_."\n\n";
            $text.=$_WebTitle_.": ".$web."\n";
			$text.=$_Pass_.": ".$pass."\n";
			$text.=$_WebURL_.": ".$webURL."\n";			
            $text.=$_ID_.": ".$ID."\n";
            $text.=$_Code_.": ".$GetCodeMail."\n";
            $text.="----------------------------------------------------\n";
            $text.=$topNombre."\n";
            $text.=$adminEmail."\n";
            $text.=$topURL."\n";
            $text.="----------------------------------------------------\n";
            @mail($to,$subject,$text);
			@mail($adminEmail,$subject,$text);
		}
        $HTML='<table align="center" class="texto0" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
        $HTML.='<caption><span class="titulo">'.$_NewMember_.'</span></caption>';
        $HTML.='<tr><td align="right" class="1">'.$_ID_.'<br>'.$_Pass_.'</td><td class="0">'.$ID.'<br>'.$pass.'</td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_WebTitle_.'</td><td class="0"><a href="'.$webURL.'" target="_blank">'.stripslashes($web).'</a></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_Description_.'</td><td class="0">'.stripslashes($descripcion).'</td></tr>';
        $HTML.='<tr><td align="right" class="1">Banner<br>'.$bannerAncho.'x'.$bannerAlto.'</td><td class="0"><img src="'.$bannerURL.'" width="'.$bannerAncho.'" height="'.$bannerAlto.'"></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_Code_.'</td><td class="0">'.$_GetCode_.'</td></tr>';
        $HTML.='</table>';
        if($sendMail) $HTML.='<br><table align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5"><tr class="2"><td align="center" class="texto1">'.$_mailed_.'</td></tr></table>';
    }

}

if($modo=="forget") {
    if($paso==0) {
        $HTML='<form action="members.php" method="post">';
        $HTML.='<br><table align="center" border="0" cellspacing="1" cellpadding="5">';
        $HTML.='<caption><span class="titulo">'.$_ForgetScreen_.'</span></caption>';
        $HTML.='<tr class="1"><td align="center" class="texto0">'.$_SelectSite_.'</td></tr>';
        $HTML.='<tr class="0"><td align="center" class="texto0"><SELECT name="ID">'.index("select",0,0,0).'</SELECT></td></tr>';
		$HTML.='<INPUT TYPE="HIDDEN" name="modo" value="forget">';
        $HTML.='<INPUT TYPE="HIDDEN" name="paso" value="1">';
        $HTML.='<tr class="1"><td><input type="submit" class="boton" value="'.$_SendPass_.'"></td></tr>';
        $HTML.='</table></form>';
    }
    if($paso==1) {
		include("data/".$ID."info.php");
		$URLcode=$topURL."in.php?ID=".$ID;
		$GetCodeMail='<A HREF="'.$URLcode.'" TARGET="_blank"><IMG SRC="'.$voteURL.'" border="0"></A>';
        if($sendMail) {
        	//Mandamos los emails necesarios.
            $to = $email;
            $subject=$topNombre;
            $text=$_ForgetScreen_."\n\n";
            $text.=$_WebTitle_.": ".$web."\n";
			$text.=$_Pass_.": ".$pass."\n";
			$text.=$_WebURL_.": ".$webURL."\n";			
            $text.=$_ID_.": ".$ID."\n";
            $text.=$_Code_.": ".$GetCodeMail."\n";
            $text.="----------------------------------------------------\n";
            $text.=$topNombre."\n";
            $text.=$adminEmail."\n";
            $text.=$topURL."\n";
            $text.="----------------------------------------------------\n";
            @mail($to,$subject,$text);
		}
        $HTML.='<br><table align="center" border="0" cellspacing="1" cellpadding="5">';
        $HTML.='<caption><span class="titulo">'.$_ForgetScreen_.'</span></caption>';
        $HTML.='<tr class="1"><td align="center" class="texto0">'.$_PassMailedTo_.'</td></tr>';
        $HTML.='<tr class="0"><td align="center" class="texto0">'.$web.'<br>'.$email.'</td></tr>';
        $HTML.='<tr class="2"><td align="center"><input type="button" class="boton" value="'.$_Close_.'" onClick="window.close(this);"></td></tr>';		
        $HTML.='</table>';
    }
}

if($modo=="modify") {
    if(filesize("data/index.dat")<6) {
        $HTML.='<table align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5"><tr class="1"><td align="center" class="titulo">'.$_EmptyIndex_.'</td></tr></table>';
        $paso=-1;
    }
    if($paso==0) {
        $HTML='<form action="members.php" method="post">';
        $HTML.='<table align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
        $HTML.='<caption><span class="titulo">'.$_LoginScreen_.'</span></caption>';
        $HTML.='<tr class="1"><td align="right" class="texto0">'.$_WebTitle_.'</td><td><SELECT name="ID">'.index("select",0,0,0).'</SELECT></td></tr>';
        $HTML.='<tr class="0"><td align="right" class="texto0">'.$_Password_.'</td><td class="minitexto0"><INPUT TYPE="password" name="password" maxlength="50" size="40">';
		if($sendMail) $HTML.='<br>'.$_Forget_;
		$HTML.='</td></tr>';
        $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="modify">';
        $HTML.='<INPUT TYPE="HIDDEN" name="paso" value="1">';
        $HTML.='<tr class="1"><td>&nbsp;</td><td><input type="submit" class="boton"></td></tr>';
        $HTML.='</table></form>';
    }
    if($paso==1) {
        include("data/".$ID."info.php");
        //Generaciуn del cуdigo de votaciуn
        $URLcode=$topURL."in.php?ID=".$ID;
        $_GetCode_=str_replace('%%URLcode%%',$URLcode,$_GetCode_);
        $_GetCode_=str_replace('%%URLvote%%',$voteURL,$_GetCode_);
        $HTML='<form action="members.php" method="post">';
        $HTML.='<table align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
        $HTML.='<caption><span class="titulo">'.$_WebInfo_.'</span></caption>';
        $HTML.='<tr class="0"><td align="right" class="texto0">'.$_Password_.'</td><td><INPUT TYPE="password" name="passNEW" value="'.$pass.'" maxlength="50" size="40"></td></tr>';
        $HTML.='<tr class="1"><td align="right" class="texto0">'.$_WebTitle_.'</td><td><INPUT TYPE="TEXT" name="webNEW" value="'.$web.'" maxlength="50" size="40"></td></tr>';
        $HTML.='<tr class="0"><td align="right" class="texto0">'.$_WebURL_.'</td><td class="minitexto0"><INPUT TYPE="TEXT" name="webURLNEW" value="'.$webURL.'" maxlength="100" size="60"><br>(max.50)</td></tr>';
        $HTML.='<tr class="1"><td align="right" class="texto0">'.$_Description_.'</td><td class="minitexto0"><INPUT TYPE="TEXT" name="descripcionNEW" value="'.$descripcion.'" maxlength="'.$maxDescripcion.'" size="60"><br>(max.'.$maxDescripcion.')</td></tr>';
        $HTML.='<tr class="0"><td align="right" class="texto0">'.$_Email_.'</td><td><INPUT TYPE="TEXT" name="emailNEW" value="'.$email.'" maxlength="50" size="40"></td></tr>';
        $HTML.='<tr class="1"><td align="right" class="texto0">'.$_BannerURL_.'</td><td class="minitexto0"><INPUT TYPE="TEXT" name="bannerURLNEW" value="'.$bannerURL.'" maxlength="100" size="60"><br>(max.50)</td></tr>';
        $HTML.='<tr class="0"><td align="right" class="texto0">'.$_BannerWidth_.'</td><td class="minitexto0"><INPUT TYPE="TEXT" name="bannerAnchoNEW" value="'.$bannerAncho.'" maxlength="3" size="4"></td></tr>';
        $HTML.='<tr class="1"><td align="right" class="texto0">'.$_BannerHeight_.'</td><td class="minitexto0"><INPUT TYPE="TEXT" name="bannerAltoNEW" value="'.$bannerAlto.'" maxlength="3" size="4"></td></tr>';
        $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="modify">';
        $HTML.='<INPUT TYPE="HIDDEN" name="paso" value="2">';
        $HTML.='<INPUT TYPE="HIDDEN" name="ID" value="'.$ID.'">';
        $HTML.='<tr class="0"><td><input type="reset" class="boton"></td><td><input type="submit" class="boton"></td></tr>';
        $HTML.='<tr class="1"><td align="right" class="texto0">'.$_Code_.'</td><td class="texto1">'.$_GetCode_.'</td></tr>';
        $HTML.='</table></form>';
        if($pass<>$password) {
            $HTML='<br><table align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5"><tr class="0"><td align="center" class="titulo">'.$_ErrorLogin_.'</td></tr></table>';
            $paso=-1;
        }
    }
    if($paso==2) {
        include("data/".$ID."info.php");
        //Comprobaciones previas sobre las variables aсadidas.
		//$bannerAnchoNEW=string("int",$bannerAnchoNEW,$maxBannerAncho);
		//$bannerAltoNEW=string("int",$bannerAltoNEW,$maxBannerAlto);		
        //Guardamos los datos de $IDinfo.php
        $data="<?php\n";
        $data.="\$pass='".$passNEW."';\n";
        $data.="\$email='".$emailNEW."';\n";
        $data.="\$web='".$webNEW."';\n";
        $data.="\$webURL='".$webURLNEW."';\n";
        $data.="\$descripcion='".$descripcionNEW."';\n";
        $data.="\$bannerURL='".$bannerURLNEW."';\n";
        $data.="\$bannerAncho=".$bannerAnchoNEW.";\n";
        $data.="\$bannerAlto=".$bannerAltoNEW.";\n";
        $data.="?>";
        $fp=fopen("data/".$ID."info.php","w");
        flock($fp,2);
        fwrite($fp,$data);
        fclose($fp);
        @chmod("data/".$ID."info.php",0666);
        //Modificamos el нndice en caso de ser necesario.
        if($web<>$webNEW) index("change",$ID,$webNEW,1);
        //Generaciуn del cуdigo de votaciуn
        $URLcode=$topURL."/in.php?ID=".$ID;
        $_GetCode_=str_replace('%%URLcode%%',$URLcode,$_GetCode_);
        $_GetCode_=str_replace('%%URLvote%%',$voteURL,$_GetCode_);
        $_mailed_=str_replace('%%email%%',$email,$_mailed_);
        $HTML='<table align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
        $HTML.='<tr class="0"><td align="center" class="titulo">'.$_Succesfull_.'</td></tr>';
        $HTML.='</table>';
    }
}

if($modo=="delete") {
	if($login!=$adminLogin OR $pass!=$adminPass) exit("Access Denied!!");
	if($paso==0) {
		include("data/".$ID."info.php");
        $HTML='<form action="members.php" method="post">';
		$HTML.='<table width="70%" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
		$HTML.='<caption><span class="titulo">'.$_DeleteSite_.'</span></caption>';
		$HTML.='<tr class="2"><td align="center" class="texto1">'.$web.'</td></tr>';
		$HTML.='<tr class="0"><td align="center" class="texto0">'.$_Confirm_.'</td></tr>';
        $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="delete">';
        $HTML.='<INPUT TYPE="HIDDEN" name="paso" value="1">';
        $HTML.='<INPUT TYPE="HIDDEN" name="ID" value="'.$ID.'">';
		$HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$adminLogin.'">';
        $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$adminPass.'">';
		$HTML.='<tr class="1"><td align="center"><input type="button" class="boton" value="'.$_Return_.'" onClick="history.go(-1)">&nbsp;&nbsp;<input type="submit" class="boton" value=" '.$_Yes_.' "></td></tr>';
        $HTML.='</table></form>';
	}
	if($paso==1) {
		include("data/".$ID."info.php");
		index("delete",$ID,0,0);
        $HTML='<form action="admin.php" method="post">';
		$HTML.='<table width="50%" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
		$HTML.='<caption><span class="titulo">'.$_DeleteSite_.'</span></caption>';
		$HTML.='<tr class="2"><td align="center" class="texto1">'.$web.'</td></tr>';
		$HTML.='<tr class="0"><td align="center" class="texto0">'.$_SiteDeleted_.'</td></tr>';
        $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="WebSites">';
        $HTML.='<INPUT TYPE="HIDDEN" name="paso" value="1">';
		$HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$adminLogin.'">';
        $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$adminPass.'">';
		$HTML.='<tr class="1"><td align="center"><input type="submit" class="boton" value="'.$_Return_.'"></td></tr>';
        $HTML.='</table></form>';
	}
}

if($modo=="validate") {
	if($login!=$adminLogin OR $pass!=$adminPass) exit("Access Denied!!");
	if($paso==0) {
		include("data/".$ID."info.php");
        $HTML='<form action="members.php" method="post">';
		$HTML.='<table width="70%" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
		$HTML.='<caption><span class="titulo">'.$_Validation_.'</span></caption>';
		$HTML.='<tr class="2"><td align="center" class="texto1">'.$web.'</td></tr>';
		$HTML.='<tr class="0"><td align="center" class="texto0">'.$_Confirm_.'</td></tr>';
        $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="validate">';
        $HTML.='<INPUT TYPE="HIDDEN" name="paso" value="1">';
        $HTML.='<INPUT TYPE="HIDDEN" name="ID" value="'.$ID.'">';
		$HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$adminLogin.'">';
        $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$adminPass.'">';
		$HTML.='<tr class="1"><td align="center"><input type="button" class="boton" value="'.$_Return_.'" onClick="history.go(-1)">&nbsp;&nbsp;<input type="submit" class="boton" value=" '.$_Yes_.' "></td></tr>';
        $HTML.='</table></form>';
	}
	if($paso==1) {
		include("data/".$ID."info.php");
		index("change",$ID,$web,1);
        $HTML='<form action="admin.php" method="post">';
		$HTML.='<table width="50%" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
		$HTML.='<caption><span class="titulo">'.$_Validation_.'</span></caption>';
		$HTML.='<tr class="2"><td align="center" class="texto1">'.$web.'</td></tr>';
		$HTML.='<tr class="0"><td align="center" class="texto0">'.$_SiteValidated_.'</td></tr>';
        $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="WebSites">';
        $HTML.='<INPUT TYPE="HIDDEN" name="paso" value="1">';
		$HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$adminLogin.'">';
        $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$adminPass.'">';
		$HTML.='<tr class="1"><td align="center"><input type="submit" class="boton" value="'.$_Return_.'"></td></tr>';
        $HTML.='</table></form>';
	}
}

if($modo=="visit") {
	include("data/".$ID."info.php");
	$OPCIONES='<script>window.open("'.$webURL.'","validacion")</script>';
	$select=index("select+",0,0,0);
	$OPCIONES.='<table align="center" border="0" cellspacing="0" cellpadding="8">';
	$OPCIONES.='<caption><span class="titulo">'.$_WebSites_.'</span></caption>';
	$OPCIONES.='<tr class="1"><td align="center">';
    $OPCIONES.='<table class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="2">';
	$OPCIONES.='<form action="admin.php" method="post" onSubmit="submitOnce(this);">';
	$OPCIONES.='<tr class="2"><td align="center" class="texto1">'.$_Enable_.'</td></tr>';
	$OPCIONES.='<tr><td align="center" class="0"><SELECT name="ID">'.index("select+",0,1,0).'</SELECT></td></tr>';
	$OPCIONES.='<INPUT TYPE="HIDDEN" name="modo" value="WebSites">';
    $OPCIONES.='<INPUT TYPE="HIDDEN" name="paso" value="1">';
    $OPCIONES.='<tr class="2"><td align="center"><input type="submit" class="boton"></td></tr>';
    $OPCIONES.='</form></table>';
	if($select) {
		$OPCIONES.='</td><td align="center">';
    	$OPCIONES.='<table class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="2">';
		$OPCIONES.='<form action="members.php" method="post" onSubmit="submitOnce(this);">';
   		$OPCIONES.='<tr class="2"><td align="center" class="texto1">'.$_Disable_.'</td></tr>';
		$OPCIONES.='<tr><td align="center" class="0"><SELECT name="ID">'.$select.'</SELECT></td></tr>';
		$OPCIONES.='<INPUT TYPE="HIDDEN" name="paso" value="0">';
		$OPCIONES.='<INPUT TYPE="HIDDEN" name="login" value="'.$login.'">';
		$OPCIONES.='<INPUT TYPE="HIDDEN" name="pass" value="'.$pass.'">';
		$OPCIONES.='<tr class="2"><td align="center">';
		$OPCIONES.='<SELECT name="modo"><option value="visit">'.$_Visit_.'</option><option value="validate">'.$_Validate_.'</option><option value="delete">'.$_Delete_.'</option></SELECT>';
		$OPCIONES.='&nbsp;<input type="submit" class="boton" value="OK"></td>';
		$OPCIONES.='</tr></form></table>';
	}
	$OPCIONES.='</td></tr></table>';
    if($ID) {
		include("data/".$ID."info.php");
        $OPCIONES.='<form action="members.php" method="post" onSubmit="submitOnce(this);">';
		$OPCIONES.='<table class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
		$OPCIONES.='<caption><span class="titulo">'.$_WebInfo_.'</span></caption>';
		$OPCIONES.='<tr class="2"><td class="texto1" align="center">ID: '.$ID.'</td><td class="texto1" align="center">'.$web.'&nbsp;<INPUT TYPE="BUTTON" class="miniboton" value="'.$_Info_.'" onClick="ventana(\'info.php?ID='.$ID.'\',\'_blank\',560,425)">&nbsp;<input type="button" class="miniboton" value="'.$_Visit_.'" onClick="window.open(\''.$webURL.'\',\'_blank\')"></td></tr>';
		$OPCIONES.='<tr><td align="right" class="1">'.$_Password_.'</td><td class="0"><INPUT TYPE="text" name="passNEW" value="'.$pass.'" maxlength="64" size="40" onBlur="validate(this,\'text\',\''.$pass.'\');"></td></tr>';
		$OPCIONES.='<tr><td align="right" class="1">'.$_WebTitle_.'</td><td class="0"><INPUT TYPE="TEXT" name="webNEW" value="'.str_replace(array('\"',"\'"),array('&Prime;','&prime;'),$web).'" maxlength="64" size="40" onBlur="validate(this,\'text\',\''.$web.'\');"></td></tr>';
		$OPCIONES.='<tr><td align="right" class="1">'.$_WebURL_.'</td><td class="0"><INPUT TYPE="TEXT" name="webURLNEW" value="'.$webURL.'" maxlength="100" size="60" onBlur="validate(this,\'url\',\''.$webURL.'\');"><br><span class="minitexto0">(max.100)</span></td></tr>';
		$OPCIONES.='<tr><td align="right" class="1">'.$_Description_.'</td><td class="0"><INPUT TYPE="TEXT" name="descripcionNEW" value="'.str_replace(array('\"',"\'"),array('&Prime;','&prime;'),$descripcion).'" maxlength="'.$maxDescripcion.'" size="60" onBlur="validate(this,\'text\',\''.$descripcion.'\');"><br><span class="minitexto0">(max.'.$maxDescripcion.')</span></td></tr>';
		$OPCIONES.='<tr><td align="right" class="1">'.$_Email_.'</td><td class="0"><INPUT TYPE="TEXT" name="emailNEW" value="'.$email.'" maxlength="50" size="40" onBlur="validate(this,\'email\',\''.$email.'\');">';
		if($sendMail) $OPCIONES.="&nbsp;<INPUT type=\"button\" class=\"miniboton\" value=\"".$_SendEmail_."\" onClick=\"ventana('".$topURL."admin.php?modo=mail&paso=1&ID=".$ID."&login=".$adminLogin."&pass=".$adminPass."','_blank',400,260)\"></td></tr>";
		$OPCIONES.='<tr><td align="right" class="1">'.$_BannerURL_.'</td><td class="0"><INPUT TYPE="TEXT" name="bannerURLNEW" value="'.$bannerURL.'" maxlength="100" size="60" onBlur="validate(this,\'url\',\''.$webURL.'\');"><br><span class="minitexto0">(max.50)</span></td></tr>';
		$OPCIONES.='<tr><td align="right" class="1">'.$_BannerWidth_.'</td><td class="0"><INPUT TYPE="TEXT" name="bannerAnchoNEW" value="'.$bannerAncho.'" maxlength="3" size="4" onBlur="validate(this,\'numberMin\',\''.$bannerAncho.'\',1);"></td></tr>';
		$OPCIONES.='<tr><td align="right" class="1">'.$_BannerHeight_.'</td><td class="0"><INPUT TYPE="TEXT" name="bannerAltoNEW" value="'.$bannerAlto.'" maxlength="3" size="4" onBlur="validate(this,\'numberMin\',\''.$bannerAlto.'\',1);"></td></tr>';
		$OPCIONES.='<INPUT TYPE="HIDDEN" name="modo" value="modify">';
		$OPCIONES.='<INPUT TYPE="HIDDEN" name="paso" value="2">';
		$OPCIONES.='<INPUT TYPE="HIDDEN" name="ID" value="'.$ID.'">';
		$OPCIONES.='<tr class="2"><td align="center" colspan="2"><input type="reset" class="boton">&nbsp;&nbsp;<input type="submit" class="boton">&nbsp;&nbsp;<input type="button" class="boton" value="'.$_Delete_.'" onClick="window.location.href=\'members.php?modo=delete&paso=0&ID='.$ID.'&login='.$adminLogin.'&pass='.$adminPass.'\'"></td></tr>';
		$OPCIONES.='</table></form>';
	}
	$MENU='<table class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
	$MENU.='<caption><span class="titulo">'.$_ControlPanel_.'</span></caption>';
	$MENU.='<tr class="1"><td align="center">';
	$MENU.='<a href="admin.php?modo=checkit">'.$_CheckIt_.'</a>';
	$MENU.='<br><a href="admin.php?modo=AdminInfo">'.$_AdminInfo_.'</a>';
	$MENU.='<br><a href="admin.php?modo=TopConfig">'.$_TopConfig_.'</a>';
	$MENU.='<br><a href="admin.php?modo=Customize">'.$_Customize_.'</a>';	
	$MENU.='<br><a href="admin.php?modo=Options">'.$_Options_.'</a>';
	$MENU.='<br><a href="admin.php?modo=BannerSystem">'.$_BannerSystem_.'</a>';
	$MENU.='<br><a href="admin.php?modo=WebSites">'.$_WebSites_.'</a>';
	$MENU.='<br><a href="index.php" target="_blank">'.$_ViewTop_.'</a>';
	$MENU.='</td></tr></table>';
	$MENU.='<table class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="2">';
	$MENU.='<caption><span class="minititulo">Info</span></caption>';
	$MENU.='<tr class="1"><td align="center">';
	$MENU.='<a href="http://www.php.net" target="_blank">PHP</a> v'.phpversion();
	$MENU.='<br><a href="http://www.eejj33.tk" target="_blank">TOPo</a> v'.$ver;
	$MENU.='</td></tr></table>';

	$HTML='<table class="estructura" border="0" cellspacing="1" cellpadding="5">';
	$HTML.='<tr><td align="center" valign="top">'.$MENU.'</td>';
	$HTML.='<td align="center">'.$OPCIONES.'</td></tr>';
	$HTML.='</table>';				
	
	
	
/*	$select=index("select+",0,0,0);
    $HTML.='<table align="center" border="0" cellspacing="0" cellpadding="8">';
    $HTML.='<caption><span class="titulo">'.$_WebSites_.'</span></caption>';
    $HTML.='<tr class="1"><td align="center">';
    $HTML.='<table class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="2">';
    $HTML.='<form action="admin.php" method="post">';
    $HTML.='<tr class="2"><td align="center" class="texto1">'.$_Enable_.'</td></tr>';
    $HTML.='<tr><td align="center" class="0"><SELECT name="ID">'.index("select+",0,1,0).'</SELECT></td></tr>';
    $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="WebSites">';
    $HTML.='<INPUT TYPE="HIDDEN" name="paso" value="1">';
    $HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$login.'">';
    $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$pass.'">';
    $HTML.='<tr class="2"><td align="center"><input type="submit" class="boton"></td></tr>';
    $HTML.='</form></table>';
    if($select) {
		$HTML.='</td><td align="center">';
        $HTML.='<table class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="2">';
		$HTML.='<form action="members.php" method="post">';
		$HTML.='<tr class="2"><td align="center" class="texto1">'.$_Disable_.'</td></tr>';
        $HTML.='<tr><td align="center" class="0"><SELECT name="ID">'.$select.'</SELECT></td></tr>';
        $HTML.='<INPUT TYPE="HIDDEN" name="paso" value="0">';
        $HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$login.'">';
        $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$pass.'">';
        $HTML.='<tr class="2"><td align="center">';
		$HTML.='<SELECT name="modo"><option value="visit">'.$_Visit_.'</option><option value="validate">'.$_Validate_.'</option><option value="delete">'.$_Delete_.'</option></SELECT>';
		$HTML.='&nbsp;<input type="submit" class="boton" value="OK"></td>';
        $HTML.='</tr></form></table>';
	}
	$HTML.='</td></tr></table>';
    if($ID) {
        include("data/".$ID."info.php");
        $HTML.='<form action="members.php" method="post">';
        $HTML.='<table class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
        $HTML.='<caption><span class="titulo">'.$_WebInfo_.'</span></caption>';
        $HTML.='<tr class="2"><td class="texto1" align="center">ID: '.$ID.'</td><td class="texto1" align="center">'.$web.'&nbsp;<INPUT TYPE="BUTTON" class="miniboton" value="'.$_Info_.'" onClick="ventana(\'info.php?ID='.$ID.'\',\'_blank\',560,400)">&nbsp;<input type="button" class="boton" value="'.$_Visit_.'" onClick="window.open(\''.$webURL.'\',\'_blank\')"></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_Password_.'</td><td class="0"><INPUT TYPE="text" name="passNEW" value="'.$pass.'" maxlength="50" size="40"></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_WebTitle_.'</td><td class="0"><INPUT TYPE="TEXT" name="webNEW" value="'.$web.'" maxlength="50" size="40"></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_WebURL_.'</td><td class="0"><INPUT TYPE="TEXT" name="webURLNEW" value="'.$webURL.'" maxlength="100" size="60"><br><span class="minitexto0">(max.50)</span></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_Description_.'</td><td class="0"><INPUT TYPE="TEXT" name="descripcionNEW" value="'.$descripcion.'" maxlength="'.$maxDescripcion.'" size="60"><br><span class="minitexto0">(max.'.$maxDescripcion.')</span></td></tr>';
		$HTML.="<tr><td align=\"right\" class=\"1\">".$_Email_."</td><td class=\"0\"><INPUT TYPE=\"TEXT\" name=\"emailNEW\" value=\"".$email."\" maxlength=\"50\" size=\"40\">&nbsp;<INPUT type=\"button\" class=\"miniboton\" value=\"".$_SendEmail_."\" onClick=\"ventana('".$topURL."admin.php?modo=mail&paso=1&ID=".$ID."&login=".$adminLogin."&pass=".$adminPass."','_blank',400,250)\"></td></tr>";
        $HTML.='<tr><td align="right" class="1">'.$_BannerURL_.'</td><td class="0"><INPUT TYPE="TEXT" name="bannerURLNEW" value="'.$bannerURL.'" maxlength="100" size="60"><br><span class="minitexto0">(max.50)</span></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_BannerWidth_.'</td><td class="0"><INPUT TYPE="TEXT" name="bannerAnchoNEW" value="'.$bannerAncho.'" maxlength="3" size="4"></td></tr>';
        $HTML.='<tr><td align="right" class="1">'.$_BannerHeight_.'</td><td class="0"><INPUT TYPE="TEXT" name="bannerAltoNEW" value="'.$bannerAlto.'" maxlength="3" size="4"></td></tr>';
        $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="modify">';
        $HTML.='<INPUT TYPE="HIDDEN" name="paso" value="2">';
        $HTML.='<INPUT TYPE="HIDDEN" name="ID" value="'.$ID.'">';
		$HTML.='<tr class="2"><td><input type="reset" class="boton"></td><td><input type="submit" class="boton">&nbsp;&nbsp;<input type="button" class="boton" value="'.$_Delete_.'" onClick="window.open(\''.$topURL.'members.php?modo=delete&paso=0&ID='.$ID.'&login='.$adminLogin.'&pass='.$adminPass.'\',\'content\')"></td></tr>';
        $HTML.='</table></form>';
    }
*/
	include('html/header.php');
	echo $HTML;
	echo '</body></html>';
	exit();
}

include('html/header.php');
if($modo!="validate" AND $modo!="delete") {
    if($showBannerTop==2 OR $showBannerBotton==2) $autoBanner=AutoBanner(1);
    if($showBannerTop==1) readfile("html/bannertop.htm");
    if($showBannerTop==2) echo '<CENTER>'.$autoBanner[0].'</CENTER>';
	echo '<br>';
}
if($modo=="join" and $showRules==1) include('html/rules.htm');
echo $HTML;
include('html/footer.php');
?>