Размер файла: 24.32Kb
- <?php
- //
- // topocolors.php
- // rev005
- //
- include('config.php');
- include('lang/'.$idioma.'.php');
- include('funciones.php');
-
- function extraer($para) {
- global $background, $textcolor;
- $linea=file('css/'.$para);
- foreach($linea as $value) {
- if(stristr($value,'TOPo')) {
- $aux=explode('TOPo',$value);
- if($aux[1]=='background') $background[$aux[2]]=$aux[3];
- if($aux[1]=='textcolor') $textcolor[$aux[2]]=$aux[3];
- }
- }
- for($i=0;$i<=8;$i++) {
- if(!isset($background[$i])) return 0;
- if(!isset($textcolor[$i])) return 0;
- }
- return 1;
- }
-
- if($pass!=$adminPass OR $login!=$adminLogin) {
- $modo="666";
- if($pass!="") $HTML.='<br><center><span class="titulo">Incorrect user/pass !!!</span></center>';
- $HTML.='<form action="admin.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">'.$_Login_.'</td><td><INPUT TYPE="text" name="login" size="40"></td></tr>';
- $HTML.='<tr class="0"><td align="right" class="texto0">'.$_Pass_.'</td><td class="minitexto0"><INPUT TYPE="password" name="pass" maxlength="50" size="40"></tr>';
- $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="frames">';
- $HTML.='<tr class="1"><td> </td><td><input type="submit" class="boton"></td></tr>';
- $HTML.='</table></form>';
- setcookie("cookieLogin",$adminLogin,time()+1800,"/");
- setcookie("cookiePass",$adminPass,time()+1800,"/");
- }
-
- if(isset($background[rand(0,8)]) AND isset($textcolor[rand(0,8)])) {
- //Comprobamos integridad y rellenamos huecos
- } else {
- //Cargamos variables desde $fileCSS
- if(!isset($fileCSS)) $fileCSS='topo.css';
- if(!extraer($fileCSS)) {
- $HTML.='<p class="titulo" align="center">'.$_InvalidCSS_.'</p>';
- $modo=$_Load_;
- }
- }
-
- //Generamos archivo CSS con variables cargadas.
- $CSS="/* Please, edit this file using TOPoColors in the Control Panel */";
- $CSS.="BODY {\n";
- $CSS.=" background-repeat : no-repeat;\n";
- $CSS.=" background-position : center;\n";
- $CSS.=" background-color: ".$background[3]."; /*TOPobackgroundTOPo3TOPo".$background[3]."TOPo*/\n";
- $CSS.=" margin : 1px;\n";
- $CSS.=" font-family : Arial;\n";
- $CSS.=" font-size : 12px;\n";
- $CSS.=" color : ".$textcolor[0]."; /*TOPotextcolorTOPo0TOPo".$textcolor[0]."TOPo*/\n";
- $CSS.=" font-weight : bold;\n";
- $CSS.="}\n";
- $CSS.="A:LINK, A:ACTIVE, A:FOCUS, A:VISITED {\n";
- $CSS.=" font-weight : bold;\n";
- $CSS.=" color : ".$textcolor[5]."; /*TOPotextcolorTOPo5TOPo".$textcolor[5]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.="A:HOVER {\n";
- $CSS.=" text-decoration : underline;\n";
- $CSS.=" color : ".$textcolor[6]."; /*TOPotextcolorTOPo6TOPo".$textcolor[6]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.="TABLE.estructura {\n";
- $CSS.=" background-color : ".$background[3]."; /*TOPobackgroundTOPo3TOPo".$background[3]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.="TABLE {\n";
- $CSS.=" background-color : ".$background[2]."; /*TOPobackgroundTOPo2TOPo".$background[2]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.="TD.2 {\n";
- $CSS.=" background-color : ".$background[2]."; /*TOPobackgroundTOPo2TOPo".$background[2]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.="TD.1 {\n";
- $CSS.=" background-color : ".$background[1]."; /*TOPobackgroundTOPo1TOPo".$background[1]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.="TD.0 {\n";
- $CSS.=" background-color : ".$background[0]."; /*TOPobackgroundTOPo0TOPo".$background[0]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.="TR.2 {\n";
- $CSS.=" background-color : ".$background[2]."; /*TOPobackgroundTOPo2TOPo".$background[2]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.="TR.1 {\n";
- $CSS.=" background-color : ".$background[1]."; /*TOPobackgroundTOPo1TOPo".$background[1]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.="TR.0 {\n";
- $CSS.=" background-color : ".$background[0]."; /*TOPobackgroundTOPo0TOPo".$background[0]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.="INPUT {\n";
- $CSS.=" background-color : ".$background[6]."; /*TOPobackgroundTOPo6TOPo".$background[6]."TOPo*/\n";
- $CSS.=" color : ".$textcolor[4]."; /*TOPotextcolorTOPo4TOPo".$textcolor[4]."TOPo*/\n";
- $CSS.=" border : 2px ridge Black;\n";
- $CSS.=" font-size : 10px;\n";
- $CSS.=" font-family : Verdana, Arial;\n";
- $CSS.=" font-weight : normal;\n";
- $CSS.="}\n";
- $CSS.="INPUT.boton {\n";
- $CSS.=" background-color : ".$background[7]."; /*TOPobackgroundTOPo7TOPo".$background[7]."TOPo*/\n";
- $CSS.=" color : ".$textcolor[7]."; /*TOPotextcolorTOPo7TOPo".$textcolor[7]."TOPo*/\n";
- $CSS.=" border : 1px ridge ".$background[7]."; /*TOPobackgroundTOPo7TOPo".$background[7]."TOPo*/\n";
- $CSS.=" font : Arial;\n";
- $CSS.=" font-size : 12px;\n";
- $CSS.=" font-weight : bold;\n";
- $CSS.=" height : auto;\n";
- $CSS.="}\n";
- $CSS.="INPUT.reloj {\n";
- $CSS.=" background-color : ".$background[0]."; /*TOPobackgroundTOPo0TOPo".$background[0]."TOPo*/\n";
- $CSS.=" border-style: none;\n";
- $CSS.=" font-family : Arial;\n";
- $CSS.=" font-size : 12px;\n";
- $CSS.=" font-weight : bold;\n";
- $CSS.=" color : ".$textcolor[0]."; /*TOPotextcolorTOPo0TOPo".$textcolor[0]."TOPo*/\n";
- $CSS.=" height : auto;\n";
- $CSS.="}\n";
- $CSS.="INPUT.miniboton {\n";
- $CSS.=" background-color : ".$background[8]."; /*TOPobackgroundTOPo8TOPo".$background[8]."TOPo*/\n";
- $CSS.=" color : ".$textcolor[8]."; /*TOPotextcolorTOPo8TOPo".$textcolor[8]."TOPo*/\n";
- $CSS.=" border : 1px ridge ".$background[8]."; /*TOPobackgroundTOPo8TOPo".$background[8]."TOPo*/\n";
- $CSS.=" font-size : 9px;\n";
- $CSS.=" font-weight : bold;\n";
- $CSS.=" height : auto;\n";
- $CSS.=" font : Arial;\n";
- $CSS.="}\n";
- $CSS.="TEXTAREA {\n";
- $CSS.=" background-color : ".$background[6]."; /*TOPobackgroundTOPo6TOPo".$background[6]."TOPo*/\n";
- $CSS.=" color : ".$textcolor[4]."; /*TOPotextcolorTOPo4TOPo".$textcolor[4]."TOPo*/\n";
- $CSS.=" border : 2px ridge Black;\n";
- $CSS.=" font-size : smaller;\n";
- $CSS.=" font-family : Verdana, Arial;\n";
- $CSS.="}\n";
- $CSS.="SELECT {\n";
- $CSS.=" background-color : ".$background[6]."; /*TOPobackgroundTOPo6TOPo".$background[6]."TOPo*/\n";
- $CSS.=" color : ".$textcolor[4]."; /*TOPotextcolorTOPo4TOPo".$textcolor[4]."TOPo*/\n";
- $CSS.=" border : 2px ridge Black;\n";
- $CSS.=" font-size : 10px;\n";
- $CSS.=" font-family : Verdana, Arial;\n";
- $CSS.=" font-weight : normal;\n";
- $CSS.="}\n";
- $CSS.="OPTION.enable {\n";
- $CSS.=" background-color : #77FF77;\n";
- $CSS.=" font-weight : bold;\n";
- $CSS.=" color : Black;\n";
- $CSS.="}\n";
- $CSS.="OPTION.disable {\n";
- $CSS.=" background-color : #FF7777;\n";
- $CSS.=" font-weight : bold;\n";
- $CSS.=" color : Black;\n";
- $CSS.="}\n";
- $CSS.=".titulo {\n";
- $CSS.=" font-family : Arial;\n";
- $CSS.=" font-size : 16px;\n";
- $CSS.=" font-weight : bold;\n";
- $CSS.=" color : ".$textcolor[2]."; /*TOPotextcolorTOPo2TOPo".$textcolor[2]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.=".minititulo {\n";
- $CSS.=" font-family : Arial;\n";
- $CSS.=" font-size : 12px;\n";
- $CSS.=" font-weight : bold;\n";
- $CSS.=" color : ".$textcolor[2]."; /*TOPotextcolorTOPo2TOPo".$textcolor[2]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.=".texto0 {\n";
- $CSS.=" font-family : Arial;\n";
- $CSS.=" font-size : 12px;\n";
- $CSS.=" font-weight : bold;\n";
- $CSS.=" color : ".$textcolor[0]."; /*TOPotextcolorTOPo0TOPo".$textcolor[0]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.=".texto1 {\n";
- $CSS.=" font-family : Arial;\n";
- $CSS.=" font-size : 12px;\n";
- $CSS.=" font-weight : bold;\n";
- $CSS.=" color : ".$textcolor[1]."; /*TOPotextcolorTOPo1TOPo".$textcolor[1]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.=".minitexto0 {\n";
- $CSS.=" font-family : Arial;\n";
- $CSS.=" font-size : 8pt;\n";
- $CSS.=" font-weight : normal;\n";
- $CSS.=" color : ".$textcolor[0]."; /*TOPotextcolorTOPo0TOPo".$textcolor[0]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.=".minitexto1 {\n";
- $CSS.=" font-family : Arial;\n";
- $CSS.=" font-size : 8pt;\n";
- $CSS.=" font-weight : normal;\n";
- $CSS.=" color : ".$textcolor[1]."; /*TOPotextcolorTOPo1TOPo".$textcolor[1]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.=".in {\n";
- $CSS.=" font-family : Arial;\n";
- $CSS.=" color : ".$background[4]."; /*TOPobackgroundTOPo4TOPo".$background[4]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.=".out {\n";
- $CSS.=" font-family : Arial;\n";
- $CSS.=" color : ".$background[5]."; /*TOPobackgroundTOPo5TOPo".$background[5]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.="TD.bar1 {\n";
- $CSS.=" background-color : ".$background[4]."; /*TOPobackgroundTOPo4TOPo".$background[4]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.="TD.bar2 {\n";
- $CSS.=" background-color : ".$background[5]."; /*TOPobackgroundTOPo5TOPo".$background[5]."TOPo*/\n";
- $CSS.="}\n";
- $CSS.=".textobar {\n";
- $CSS.=" font-family : Arial;\n";
- $CSS.=" font-size : 8pt;\n";
- $CSS.=" font-weight : normal;\n";
- $CSS.=" color : ".$textcolor[3]."; /*TOPotextcolorTOPo3TOPo".$textcolor[3]."TOPo*/\n";
- $CSS.="}\n";
-
-
- if($modo=="frames" OR $modo=="") {
- $HTML.='<html><head>';
- $HTML.='<meta http-equiv="Pragma" content="no-cache">';
- $HTML.='<meta http-equiv="no-cache">';
- $HTML.='<meta http-equiv="Expires" content="-1">';
- $HTML.='<meta http-equiv="Cache-Control" content="no-cache">';
- $HTML.='<title>'.$topNombre.'</title>';
- $HTML.='<frameset rows="200,*" cols="*" frameborder="NO" border="0" framespacing="0">';
- $HTML.='<frame name="interface" noresize scrolling="NO" src="topocolors.php?modo=interface&fileCSS='.$fileCSS.'&login='.$login.'&pass='.$pass.'">';
- $HTML.='<frame name="preview" noresize src="topocolors.php?modo='.$_Preview_.'&fileCSS='.$fileCSS.'&login='.$login.'&pass='.$pass.'" marginheight="0">';
- $HTML.='</frameset>';
- $HTML.='</head></html>';
- echo $HTML;
- exit();
- }
-
- if($modo=="interface") {
- $HTML.='<table class="estructura" width="95%" align="center" border="0" cellspacing="1" cellpadding="5">';
- $HTML.='<form name="colores" action="topocolors.php" method="post" target="preview">';
- $HTML.='<caption><span class="titulo">'.$_TOPoColorsEditor_.': '.$fileCSS.'</span></caption>';
- $HTML.='<tr class="texto1">';
- $HTML.='<td colspan="2" align="center" valign="middle">|--<INPUT>--|</td>';
- $HTML.='<td colspan="2" align="center" valign="middle">|--'.$_Link_.'--|</td>';
- $HTML.='<td align="right" valign="middle">'.$_Texts_.'>></td>';
- $HTML.='<td id="textcolor2" title=".titulo" align="center" valign="middle" bgcolor="'.$textcolor[2].'"><INPUT type="text" name="textcolor[2]" value="'.$textcolor[2].'" size="10" maxlength="10" onBlur="textcolor2.bgColor=value;"></td>';
- $HTML.='<td id="textcolor0" title=".texto0" align="center" valign="middle" bgcolor="'.$textcolor[0].'"><INPUT type="text" name="textcolor[0]" value="'.$textcolor[0].'" size="10" maxlength="10" onBlur="textcolor0.bgColor=value;"></td>';
- $HTML.='<td id="textcolor1" title=".texto1" align="center" valign="middle" bgcolor="'.$textcolor[1].'"><INPUT type="text" name="textcolor[1]" value="'.$textcolor[1].'" size="10" maxlength="10" onBlur="textcolor1.bgColor=value;"></td>';
- $HTML.='</tr>';
- $HTML.='<tr class="texto1">';
- $HTML.='<td id="textcolor4" title="INPUT" align="center" valign="middle" bgcolor="'.$textcolor[4].'"><INPUT type="text" name="textcolor[4]" value="'.$textcolor[4].'" size="10" maxlength="10" onBlur="textcolor4.bgColor=value;"></td>';
- $HTML.='<td id="background6" title="INPUT" align="center" valign="middle" bgcolor="'.$background[6].'"><INPUT type="text" name="background[6]" value="'.$background[6].'" size="10" maxlength="10" onBlur="background6.bgColor=value;"></td>';
- $HTML.='<td id="textcolor5" title="a:link" align="center" valign="middle" bgcolor="'.$textcolor[5].'"><INPUT type="text" name="textcolor[5]" value="'.$textcolor[5].'" size="10" maxlength="10" onBlur="textcolor5.bgColor=value;"></td>';
- $HTML.='<td id="textcolor6" title="a:over" align="center" valign="middle" bgcolor="'.$textcolor[6].'"><INPUT type="text" name="textcolor[6]" value="'.$textcolor[6].'" size="10" maxlength="10" onBlur="textcolor6.bgColor=value;"></td>';
- $HTML.='<td align="right" valign="middle">'.$_Ratio2_.'>></td>';
- $HTML.='<td id="background4" title=".in" align="center" valign="middle" bgcolor="'.$background[4].'"><INPUT type="text" name="background[4]" value="'.$background[4].'" size="10" maxlength="10" onBlur="background4.bgColor=value;"></td>';
- $HTML.='<td id="background5" title=".out" align="center" valign="middle" bgcolor="'.$background[5].'"><INPUT type="text" name="background[5]" value="'.$background[5].'" size="10" maxlength="10" onBlur="background5.bgColor=value;"></td>';
- $HTML.='<td id="textcolor3" title="textobar" align="center" valign="middle" bgcolor="'.$textcolor[3].'"><INPUT type="text" name="textcolor[3]" value="'.$textcolor[3].'" size="10" maxlength="10" onBlur="textcolor3.bgColor=value;"></td>';
- $HTML.='</tr>';
- $HTML.='<tr class="texto1">';
- $HTML.='<td colspan="2" align="center" valign="middle">|--'.$_Button_.'--|</td>';
- $HTML.='<td colspan="2" align="center" valign="middle">|--'.$_MiniButton_.'--|</td>';
- $HTML.='<td align="right" valign="middle">'.$_BackGrounds_.'>></td>';
- $HTML.='<td id="background3" title="BODY.background" align="center" valign="middle" bgcolor="'.$background[3].'"><INPUT type="text" name="background[3]" value="'.$background[3].'" size="10" maxlength="10" onBlur="background3.bgColor=value;"></td>';
- $HTML.='<td id="background0" title=".0" align="center" valign="middle" bgcolor="'.$background[0].'"><INPUT type="text" name="background[0]" value="'.$background[0].'" size="10" maxlength="10" onBlur="background0.bgColor=value;"></td>';
- $HTML.='<td align="left" valign="middle"><<'.$_BackGrounds_.'</td>';
- $HTML.='</tr>';
- $HTML.='<tr class="texto1">';
- $HTML.='<td id="textcolor7" title="INPUT.boton" align="center" valign="middle" bgcolor="'.$textcolor[7].'"><INPUT type="text" name="textcolor[7]" value="'.$textcolor[7].'" size="10" maxlength="10" onBlur="textcolor7.bgColor=value;"></td>';
- $HTML.='<td id="background7" title="INPUT.boton" align="center" valign="middle" bgcolor="'.$background[7].'"><INPUT type="text" name="background[7]" value="'.$background[7].'" size="10" maxlength="10" onBlur="background7.bgColor=value;"></td>';
- $HTML.='<td id="textcolor8" title="INPUT.miniboton" align="center" valign="middle" bgcolor="'.$textcolor[8].'"><INPUT type="text" name="textcolor[8]" value="'.$textcolor[8].'" size="10" maxlength="10" onBlur="textcolor8.bgColor=value;"></td>';
- $HTML.='<td id="background8" title="INPUT.miniboton" align="center" valign="middle" bgcolor="'.$background[8].'"><INPUT type="text" name="background[8]" value="'.$background[8].'" size="10" maxlength="10" onBlur="background8.bgColor=value;"></td>';
- $HTML.='<td align="right" valign="middle">'.$_BackGrounds_.'>></td>';
- $HTML.='<td id="background1" title=".1" align="center" valign="middle" bgcolor="'.$background[1].'"><INPUT type="text" name="background[1]" value="'.$background[1].'" size="10" maxlength="10" onBlur="background1.bgColor=value;"></td>';
- $HTML.='<td id="background2" title=".2" align="center" valign="middle" bgcolor="'.$background[2].'"><INPUT type="text" name="background[2]" value="'.$background[2].'" size="10" maxlength="10" onBlur="background2.bgColor=value;"></td>';
- $HTML.='<td align="left" valign="middle"><<'.$_BackGrounds_.'</td>';
- $HTML.='</tr>';
- $HTML.='<tr><td colspan="9" align="center">';
- $HTML.='<INPUT class="boton" type="submit" name="modo" value="'.$_Preview_.'">';
- $HTML.=' <INPUT class="boton" type="submit" name="modo" value="'.$_Load_.'">';
- if($fileCSS!='topo.css') $HTML.=' <INPUT class="boton" type="submit" name="modo" value="'.$_Save_.'">';
- $HTML.=' <INPUT class="boton" type="submit" name="modo" value="'.$_SaveAs_.'">';
- if($fileCSS!='topo.css') $HTML.=' <INPUT class="boton" type="submit" name="modo" value="'.$_Delete_.'">';
- $HTML.='</td></tr>';
- $HTML.='<INPUT TYPE="HIDDEN" name="fileCSS" value="'.$fileCSS.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$login.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$pass.'">';
- $HTML.='</form></table>';
- }
-
- if($modo==$_Preview_) {
- echo '<html><head>';
- echo '<STYLE>'.$CSS.'</STYLE></head>';
- echo '<table align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
- echo '<tr>';
- echo '<td class="2"><INPUT type="text" value="INPUT" size="10"></td>';
- echo '<td class="2"><TEXTAREA row="3" col="10"></TEXTAREA></td>';
- echo '<td class="1"><INPUT type="text" value="INPUT" size="10"></td>';
- echo '<td class="1"><TEXTAREA row="3" col="10"></TEXTAREA></td>';
- echo '<td class="0"><INPUT type="text" value="INPUT" size="10"></td>';
- echo '<td class="0"><TEXTAREA row="3" col="10"></TEXTAREA></td>';
- echo '</tr>';
- echo '<tr>';
- echo '<td colspan="2" align="center" class="2"><INPUT type="button" class="boton" value=".boton"> <INPUT type="button" class="miniboton" value=".miniboton"></td>';
- echo '<td colspan="2" align="center" class="1"><INPUT type="button" class="boton" value=".boton"> <INPUT type="button" class="miniboton" value=".miniboton"></td>';
- echo '<td colspan="2" align="center" class="0"><INPUT type="button" class="boton" value=".boton"> <INPUT type="button" class="miniboton" value=".miniboton"></td>';
- echo '</tr>';
- echo '</table>';
- echo '<span class="titulo"><center>'.$_Preview_.'</center></span>';
- include('html/top1.htm');
- foreach($background as $value) echo '<br>'.$value;
- foreach($textcolor as $value) echo '<br>'.$value;
- echo '</body></html>';
- exit();
- }
-
- if($modo==$_Load_) {
- $directorio=opendir('css');
- if($file=readdir($directorio)) {
- do {
- $ext=strrchr($file,'.');
- $aux=explode('.',$file);
- if ($file != "." AND $file != ".." AND ($ext==".css" OR $ext==".CSS")) {
- $css[$i++]=$file;
- }
- } while ($file = readdir($directorio));
- closedir($directorio);
- } else {
- $css[0]="Donґt found CSS files";
- }
- $HTML.='<table width="50%" class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
- $HTML.='<form action="topocolors.php" method="post" target="_top">';
- $HTML.='<caption><span class="titulo">'.$_TOPoColorsEditor_.'</span></caption>';
- $HTML.='<tr class="2"><td class="texto1" align="center" valign="middle">'.$_Load_.'</td></tr>';
- $HTML.='<tr class="0"><td align="center"><SELECT name="fileCSS">';
- foreach($css as $value) {
- $HTML.='<OPTION value="'.$value.'"';
- if($value==$fileCSS) $HTML.=' selected';
- $HTML.='>'.$value.'</OPTION>';
- }
- $HTML.='</SELECT></td></tr>';
- $HTML.='<tr class="2"><td align="center" valign="middle"><input type="button" class="boton" value="'.$_Return_.'" onClick="history.go(-1)"> <INPUT type="submit" class="boton" value="'.$_Load_.'"></td></tr>';
- $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="frames">';
- $HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$login.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$pass.'">';
- $HTML.='</form></table>';
- }
-
- if($modo==$_Save_) {
- $fp=fopen('css/'.$fileCSS,"w");
- $ok=fwrite($fp,$CSS);
- fclose($fp);
- $HTML='ERROR:<br>File: TOPoColors.php<br>modo=save';
- if($ok) {
- $HTML.='<table width="50%" class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
- $HTML='<form action="topocolors.php" method="post">';
- $HTML.='<caption><span class="titulo">'.$_TOPoColorsEditor_.'</span></caption>';
- $HTML.='<tr class="0"><td align="center" valign="middle"><br>'.$_UpdateData_.'<br> </td></tr>';
- $HTML.='<tr class="1"><td align="center" valign="middle"><br><INPUT TYPE="SUBMIT" class="boton" value="'.$_Return_.'"><br> </td></tr>';
- $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="'.$_Preview_.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="fileCSS" value="'.$fileCSS.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$login.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$pass.'">';
- $HTML.='</form></table>';
- }
- }
-
- if($modo==$_SaveAs_) {
- if(isset($nombre)) {
- if($nombre=='topo') $nombre.=rand(1,9);
- $fp=fopen('css/'.$nombre.'.css',"w");
- $ok=fwrite($fp,$CSSdata);
- fclose($fp);
- $HTML='ERROR:<br>File: TOPoColors.php<br>modo=saveas';
- if($ok) {
- $HTML.='<table width="50%" class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
- $HTML='<form action="topocolors.php" method="post" target="_top">';
- $HTML.='<caption><span class="titulo">'.$_TOPoColorsEditor_.'</span></caption>';
- $HTML.='<tr class="0"><td align="center" valign="middle"><br>'.$_UpdateData_.'<br> </td></tr>';
- $HTML.='<tr class="1"><td align="center" valign="middle"><br><INPUT TYPE="SUBMIT" class="boton" value="'.$_Return_.'"><br> </td></tr>';
- $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="frames">';
- $HTML.='<INPUT TYPE="HIDDEN" name="fileCSS" value="'.$nombre.'.css">';
- $HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$login.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$pass.'">';
- $HTML.='</form></table>';
- }
- } else {
- $nombre=time();
- $HTML='<form action="topocolors.php" method="post" target="_top">';
- $HTML.='<table width="50%" class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
- $HTML.='<caption><span class="titulo">'.$_TOPoColorsEditor_.'</span></caption>';
- $HTML.='<tr class="2"><td class="texto1" align="center">'.$_SaveAs_.'</td></tr>';
- $HTML.='<tr class="0"><td align="center">'.$_NewDesign_.' <INPUT type="text" name="nombre" value="'.$nombre.'"></td></tr>';
- $HTML.='<tr class="2"><td align="center"><INPUT TYPE="button" class="boton" value="'.$_Return_.'" onClick="window.history.back()"> <INPUT TYPE="SUBMIT" class="boton" value="'.$_Save_.'"></td></tr>';
- $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="'.$_SaveAs_.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="CSSdata" value="'.$CSS.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$login.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$pass.'">';
- $HTML.='</table></form>';
- }
- }
-
-
- if($modo==$_Delete_) {
- if($confirmado) {
- $ok=unlink('css/'.$fileCSS);
- $HTML='ERROR:<br>File: TOPoColors.php<br>modo=delete';
- if($ok) {
- $HTML='<form action="topocolors.php" method="post" target="_top">';
- $HTML.='<table width="50%" class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
- $HTML.='<caption><span class="titulo">'.$_TOPoColorsEditor_.'</span></caption>';
- $HTML.='<tr class="0"><td align="center" valign="middle"><br>'.$_UpdateData_.'<br> </td></tr>';
- $HTML.='<tr class="1"><td align="center" valign="middle"><br><INPUT TYPE="SUBMIT" class="boton" value="'.$_Return_.'"><br> </td></tr>';
- $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="frames">';
- $HTML.='<INPUT TYPE="HIDDEN" name="fileCSS" value="topo.css">';
- $HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$login.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$pass.'">';
- $HTML.='</table></form>';
- }
- } else {
- $HTML='<form action="topocolors.php" method="post" target="_top">';
- $HTML.='<table width="50%" class="texto0" align="center" border="0" bgcolor="Black" cellspacing="1" cellpadding="5">';
- $HTML.='<caption><span class="titulo">'.$_TOPoColorsEditor_.'</span></caption>';
- $HTML.='<tr class="2"><td class="texto1" align="center">'.$_Delete_.'</td></tr>';
- $HTML.='<tr class="0"><td align="center" class="texto0">'.$_Confirm_.'</td></tr>';
- $HTML.='<tr class="2"><td align="center"><input type="button" class="boton" value="'.$_Return_.'" onClick="history.go(-1)"> <input type="submit" class="boton" value=" '.$_Yes_.' "></td></tr>';
- $HTML.='<INPUT TYPE="HIDDEN" name="modo" value="'.$_Delete_.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="confirmado" value="1">';
- $HTML.='<INPUT TYPE="HIDDEN" name="fileCSS" value="'.$fileCSS.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="login" value="'.$login.'">';
- $HTML.='<INPUT TYPE="HIDDEN" name="pass" value="'.$pass.'">';
- $HTML.='</table></form>';
- }
- }
-
- include('html/header.php');
- echo $HTML;
- echo '</body></html>';
- ?>