DARKSTONE 0 Denunciar post Postado Julho 26, 2004 Bom galera to com u mbrema numa agenda aqui alguem em ajuda plis! eu cadstro e tp, num pula linha no formulario quando eu vejo o arquivo ele naum grava com as linahs puladas :/ <html><head><title>...</title><style type="text/css"><!--.verdana { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #000000;}a:link { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; text-decoration: none; color: #5DB5E9;}a:visited { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; text-decoration: none; color: #5DB5E9;}a:hover { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; text-decoration: underline overline; color: #5DB5E9;}a:active { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; text-decoration: none; color: #5DB5E9;}--></style></head><body class="verdana"><?phpextract($HTTP_GET_VARS); extract($HTTP_POST_VARS);$mo= "pwd.txt";$bd = fopen ($mo, "r"); $psord = fread ($bd, filesize ($mo)); fclose ($bd);$rop=base64_decode($psord);$vup=explode("||&@23||password>||&~||",$rop);$password=base64_decode($vup[0]);$day123 =date("d");$day12=date("dY");$month123 =date("D M"); $year123 =date("Y"); $todate="$month123:$day123:$year123";if ($action == ""){?><center><table align=middle><td align=left width=20%><tr> <td height="27" colspan="2"><img src="LOGIN.gif" width="134" height="33"></td> <tr> <td> </td> </tr><tr><form method=post action="?action=login"><td> <img src="senha.gif" width="60" height="20"></td><td><input type=password name=pass> <input type=submit value=Submit></td></tr></form></table></center><?php}if ($action=="login"){if(strlen($m)>="1"){$n=base64_decode($m);$pass=$n;}if ($pass==$password){echo "Sua senha foi aceita<br><hr>";$m=base64_encode($password);echo"<table width=100%><tr><td><table align=left width=80% border=0 cellspacing=1 bordercolor=#3E9ED6> font size=2 <tr bgcolor=#3E9ED6><td> Opções de Adm.</td></tr><tr font size=2 bgcolor=#f1f1f1><td><li><A HREF=?action=add_event&m=$m>Add Event</A></td></tr><tr bgcolor=#f1f1f1><td><li><A HREF=?action=edit_event&m=$m>Editar Evento</A></td></tr><tr bgcolor=#f1f1f1><td><li><A HREF=?action=change_password&m=$m>Mudar Senha</A></td></tr><tr bgcolor=#f1f1f1><td><li><A HREF=?action=admin_logout>Logout</A></td></tr></table></td></tr></table>";}else {$m=base64_encode($password);echo"<table width=100%><tr><td><table align=left width=80% border=0 cellspacing=1 bordercolor=#3E9ED6 font size=2 ><tr bgcolor=#3E9ED6><td>Admin Options</td></tr><tr bgcolor=#f1f1f1><td><li><A HREF=?action=add_event&m=$m>Add Event</A></td></tr><tr bgcolor=#f1f1f1><td><li><A HREF=?action=edit_event&m=$m>Editar Evento</A></td></tr><tr bgcolor=#f1f1f1><td><li><A HREF=?action=change_password&m=$m>Mudar Senha</A></td></tr><tr bgcolor=#f1f1f1><td><li><A HREF=?action=admin_logout>Logout</A></td></tr></table></td></tr></table>";echo "Digitou a senha errada, nhe nhe nheeee";}}if($action == "add_event") {$l=base64_decode($m);if ($l==$password){echo " <center><font face=verdana size=2>Adicionar Evento</center><br></font><form method=\"post\" action=\"?action=submit_event\"></center>";echo "<font face=verdana size=2>Nome do Evento:<BR> <input type=text value=\"\" name=ename size=35><br>ex.: Dia do Web designer</font><br><br>";echo "<font face=verdana size=2>Discription:<BR><textarea name=discription rows=5 cols=45></textarea><br>Discription of event, html is allowed.</font><br><br>";echo "<font size=2 face=verdana >Data do Evento:<BR>";?>Dia:<select name=day style="FONT-FAMILY: verdana; FONT-SIZE: 11px; FONT-WEIGHT: 200"> <option value="">Select <option value="1">01 <option value="2">02 <option value="3">03 <option value="4">04 <option value="5">05 <option value="6">06 <option value="7">07 <option value="8">08 <option value="9">09 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 <option value="21">21 <option value="22">22 <option value="23">23 <option value="24">24 <option value="25">25 <option value="26">26 <option value="27">27 <option value="28">28 <option value="29">29 <option value="30">30 <option value="31">31</select>Mês:<select name=month style="FONT-FAMILY: verdana; FONT-SIZE: 11x; FONT-WEIGHT: 200"><option value="">Selecione<option value="1">Janeiro<option value="2">Fevereiro<option value="3">Março<option value="4">Abril<option value="5">Maio<option value="6">Junho<option value="7">Julho<option value="8">Agosto<option value="9">Setembro<option value="10">Outubro<option value="11">Novembro<option value="12">Dezembro</select></span> Ano:<input type=text name="year" value="" size=4 maxlength=4 > <?php echo"<BR><BR> <BR>";echo "<input type=hidden name=m value=$m>";echo "<input type=submit value=Submit><BR></form>";}else{echo "Logar-se";}}if($action == "submit_event") {$l=base64_decode($m);$ename= str_replace ("|~~|","|~|", $ename);$discription= str_replace ("|~~|","|~|", $discription);if ($l==$password){$date="$month;$day;$year";if(strlen($date)<=4){echo "Você não especificou uam data. Seu TOP";}else{$fp = fopen ("calendar/".$month.$day.$year.".txt", "w");fwrite ($fp, "[event]");fwrite ($fp, $ename);fwrite ($fp, "|~~|");fwrite ($fp, $discription);fwrite ($fp, "|~~|");fwrite ($fp, $date);fwrite ($fp, "|~~|");fclose ($fp);print "<BR><BR><BR>Evento adicionado/editado com sucesso.<BR><BR><BR><a href=../recados/index.php>Clique Aqui</a>";}}else{echo "Logar-se";}}if($action=="edit_event"){$l=base64_decode($m);if ($l==$password){if($do=="delete"){if(file_exists("calendar/".$f)){unlink("calendar/".$f);echo "<CENTER><B>Evento deletado com sucesso</B></CENTER>";}else{echo "<CENTER><FONT FACE=verdana COLOR=red SIZE=2><B>Evento não foi deletado. Seu TOP.</B></FONT></CENTER>";}}$handle = @opendir("calendar");echo"<table width=80%><tr>";echo "<td bgcolor=#3E9ED6 font size=2 face=verdana ><CENTER><font face=verdana size=2> Editar / Deletar Evento(s)</CENTER></td></tr></table><table width=80%><tr><td align=middle><font face=verdana size=2>Dia - Mês - Ano)</td><td align=middle><font face=verdana size=2>Ação</td></tr>"; while (false !== ($file = readdir($handle))) {if ($file != "." && $file != "..") {$fd = fopen ("calendar/".$file, "r"); $stuff = fread ($fd, filesize ("calendar/".$file)); fclose ($fd);$read=explode("[event]",$stuff);$temp=explode("|~~|",$read[1]);$fog=explode(";",$temp[2]);echo"<tr bgcolor=#fxfxfx><td width=30%><table width=20%><td>$fog[0]-</td><td>$fog[1]-</td><td>$fog[2]</td></td></table><td>[<A HREF=?action=edit_e&m=$m&f=$file>EDITAR</A>]</td><td>[<a href=?action=edit_event&do=delete&m=$m&f=$file>DELETAR</a>]</td></tr>";}}closedir($handle);}else{echo "Logar-se";}}if($action=="edit_e"){$l=base64_decode($m);if ($l==$password){$fd = fopen ("calendar/".$f, "r"); $stuff = fread ($fd, filesize ("calendar/".$f)); fclose ($fd);$read=explode("[event]",$stuff);$temp=explode("|~~|",$read[1]);$ffo=explode(";",$temp[2]);echo " <center><font face=verdana size=2>Editar evento de $ffo[0] - $ffo[1] - $ffo[2] (M-D-Y)</center><br></font><form method=\"post\" action=\"?action=submit_event\"></center>";echo "<font face=verdana size=2>Nome dos Evento:<BR> <input type=text value=\"$temp[0]\" name=ename size=35><br>e.g. Christmas Day, My Birthday</font><br><br>";echo "<font face=verdana size=2>Descrição:<BR><textarea name=discription rows=5 cols=45>$temp[1]</textarea><br>Discription of event, html is allowed.</font><br><br>";echo "<input type=hidden name=month value=$ffo[0]><input type=hidden name=day value=$ffo[1]><input type=hidden name=year value=$ffo[2]>";echo "<input type=hidden name=m value=$m>";echo "<input type=submit value=Submit> <input type=reset value=Reset><BR></form>";}else{echo "Por favor Logar-se no sistema";}}if ($action=="change_password"){$l=base64_decode($m);if ($l==$password){echo "<table><form method=post action=?action=do_change_password><td width=30%>Enter new password</td><td width=70%><input type=password size=18 name=pwd></td><tr><td>Confirm new password</td><td><input type=password size=18 name=qwd></td><tr><td></td><td><input type=hidden name=m value=$m> <input type=submit value=Change></form></td><tr><td></td><td><a href=?action=login&m=$m>Back To main Menu</a></td></table>";}else{echo "Por favor Logar-se no sistema";}}if ($action=="do_change_password"){$l=base64_decode($m);if ($l==$password){if($pwd==$qwd && strlen($pwd)>="1"){$po="pwd.txt";$fgh=base64_encode($pwd);$asd=base64_encode($fgh."||&@23||password>||&~||");$vp = fopen ($po, "w");fwrite ($vp, "$asd");fclose($vp);echo "A Senha de acesso foi alterada com sucesso. <BR><BR> Você mostrou que naum é TOP <BR><a href=cadmin.php>Logue-se usando a nova senha</a>";}else{echo "Confirme o novo password...";}}else{echo "Por favor Logar-se no sistema";}}?><BR><CENTER></CENTER></body></html> plis me ajuda ai galera Compartilhar este post Link para o post Compartilhar em outros sites
michelsp 0 Denunciar post Postado Julho 26, 2004 Dê uma olhada em: http://br.php.net/nl2br E vem senão é isso. Flwwwwwwwwwww Compartilhar este post Link para o post Compartilhar em outros sites
DARKSTONE 0 Denunciar post Postado Julho 26, 2004 :( ei eu sou ini, eu so alterei o script, num uar esta funçãome ajuda ai plis Compartilhar este post Link para o post Compartilhar em outros sites
michelsp 0 Denunciar post Postado Julho 27, 2004 Q função você ñ sabe usar? A q eu especifiquei ou a q você postou?Se for a q eu especifiquei le o site q foi mencionado q tem todas info.Flwwwwwwww Compartilhar este post Link para o post Compartilhar em outros sites