Jump to content


rober's Content

There have been 244 items by rober (Search limited from 25/02/2019)



Ordernar por                Order  

#186154 Tutorial - Sistema De Login

Posted by rober on 13/09/2003, 02:19 in Artigos, Dicas e Tutoriais de PHP

Alguem me tira uma duvida!!!
o sistema de login pode impedir bloquear acesso a determinadas paginas... typow só usuários cadastrados ???

eu já olhei todos os posts.. li e reli e naum consegui fazer o teste de acesso funcionar... o maximo q consegui foi a mensagem usuário não logado... mas mesmo assim ele mostrou o conteudo da pagina restrita... alguem mi da uma mão é urgente



#152004 Tutorial - Sistema De Login

Posted by rober on 23/07/2003, 03:10 in Artigos, Dicas e Tutoriais de PHP

Uma sujestão....

eu acompanhei o tuturial e fiz o script.. primeiramente parabens muito bm bolado..uma coisa que estou desenvolvendo é o campo IP ...tpow na hora do cadastro a eu pego o ip ($REMOTE_ADDR) e salvo na mesma bd e quando pessoa executa o login denovo dou um UPDATE na tabela é atualizo o IP


**** PS ainda nam comecei a fazer....... mas tem geito sim neh ?



#236697 Usuarios

Posted by rober on 23/11/2003, 10:48 in Artigos, Dicas e Tutoriais de PHP

aiaiai....agora fiquei com a pulga atráz da orelha . . . .
Será que tem com somar o número de usuários q estão em todas as áreas do site... typow um está no index.php outro no fotos.php outro nos forum.php e fazer um resultado só

. . . .

Será que tem



#268053 Php5

Posted by rober on 31/12/2003, 11:43 in PHP

Mas e onde podemos encontrar mais materias sobre o SQLite e onde o baixar , é o phpmyadmin, srá q saira algum algum parecido com ele para o SQLite ?



#302843 O Que Falta Na Internet?

Posted by rober on 19/02/2004, 03:55 in BrainStorm Design

Eu acho que falta na pArte de hardware alguma placa que de pra sentir o cheiro,
Tipow, tem a webcam que vc ve a pessoa que está do outro lado, dava pra inventar uma placa que emitise o mesmo cheiro do outro usuário

PS... AINDA NAUM SEI PRA QUE ISSO, completamente sem noção :D :D :D :D :D



#221804 Função Fopen

Posted by rober on 02/11/2003, 14:01 in PHP

quero exibir tudo typow...

dah linha 1 data Ip hora todos os campos



#221764 Função Fopen

Posted by rober on 02/11/2003, 13:09 in PHP

Eu gostaria de fazer ele exibir o útimo resultado . . . . só que não consegui dai eu postei a parte de gravação para ver como eles são inseridos



#222156 Função Fopen

Posted by rober on 02/11/2003, 18:31 in PHP

<?php
$gb_data ="data.txt" ;
  $dados = fopen ("$gb_data", "r");
  while (!feof ($dados)) {
    $linha[] = fgets ($dados, 500);
    $i++;
  }
  if (feof ($dados)) {
    $ultimoValor = $i - 1;
    echo $linha[1]; // modifiquei aqui
  }

/* r = Permissão para Leitura Somente.
w = Permissão para Gravar (Cria o Arquivo caso ele não exista);
a = Permissão para Adicionar mais Coisas ao Arquivo...
*/
?>


ele naum estava imrpimindo nada dai fiz um modificação " echo $linha[1]; // modifiquei aqui
"
ele imrimio tudo
20030915192559|15.09.2003|19:25|127.0.0.1|Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)|h_rober|s|s|s|h_rober||||||
como faço pra dar um explode na var $linha e explorar o sinais "|"



#221426 Função Fopen

Posted by rober on 01/11/2003, 23:06 in PHP

[QUOTE]<
<?php


session_start();

$gb_name = " "; //
$gb_data = "data.txt"; //
$gb_psswd = ""; //
$gb_mail = ""; //


include("languages/portugues_brasil.inc.php"); // Linguagem
# include("languages/portugues_brasil.inc.php");


// Configuracoes: true = Ativado, false = Desativado
$user=$login ;
$gb_flthtml = true; // Codigos html (recomendo: true)
$gb_url2lnk = false; // Converter url em links
$gb_smiley = true; // Smileys
$gb_fltbdwrd = true; // Filtro de palavras
$gb_privmsg = true; // msg privada
$gb_fltspam = false; // controle de spam

$gb_msgpg = 10; // mensagens por pagina
$gb_lngwrd = 35; //
$gb_lngmsg = 500; //
# não mexa sem conhecimento
############################################################
# Funcões

function flt_tags ($text, $html){
if ($html) {
$text = strip_tags($text);
$text = htmlspecialchars($text);}
$text = ereg_replace("\|", "", $text);
$text = ereg_replace("\r", "", $text);
$text = ereg_replace("\n", "<br> ", $text);
$text = stripslashes($text);
$text = trim($text);
return $text;
}

function flt_bdwrd ($text, $badwords){
foreach ($badwords as $badword){
$text = str_replace ($badword, "***", $text);}
return $text;
}

function flt_smiley ($text){
$text = ereg_replace(" :)", " <img src=\"images/sm01.gif\" width=\"15\" height=\"15\" alt=\":)\" border=\"0\">", $text);
$text = ereg_replace(" :D", " <img src=\"images/sm02.gif\" width=\"15\" height=\"15\" alt=\":D\" border=\"0\">", $text);
$text = ereg_replace(" 8)", " <img src=\"images/sm03.gif\" width=\"15\" height=\"15\" alt=\"8)\" border=\"0\">", $text);
$text = ereg_replace(" ;)", " <img src=\"images/sm04.gif\" width=\"15\" height=\"15\" alt=\";)\" border=\"0\">", $text);
$text = ereg_replace(" :P", " <img src=\"images/sm05.gif\" width=\"15\" height=\"15\" alt=\":P\" border=\"0\">", $text);
$text = ereg_replace(" :o", " <img src=\"images/sm06.gif\" width=\"15\" height=\"15\" alt=\":o\" border=\"0\">", $text);
$text = ereg_replace(" :\(", " <img src=\"images/sm07.gif\" width=\"15\" height=\"15\" alt=\":(\" border=\"0\">", $text);
$text = ereg_replace(" :)", " <img src=\"images/sm01.gif\" width=\"15\" height=\"15\" alt=\":)\" border=\"0\">", $text);
$text = ereg_replace(" 110", " <img src=\"images/10.gif\" alt=\"110\" border=\"0\">", $text);
$text = ereg_replace(" 2100", " <img src=\"images/100.gif\" alt=\":100\" border=\"0\">", $text);
$text = ereg_replace(" 3101", " <img src=\"images/101.gif\" alt=\":101\" border=\"0\">", $text);
$text = ereg_replace(" 4102", " <img src=\"images/102.gif\" alt=\":102\" border=\"0\">", $text);
$text = ereg_replace(" 5105", " <img src=\"images/105.gif\" alt=\":105\" border=\"0\">", $text);
$text = ereg_replace(" 6106", " <img src=\"images/106.gif\" alt=\":106\" border=\"0\">", $text);
$text = ereg_replace(" 7107", " <img src=\"images/107.gif\" alt=\":107\" border=\"0\">", $text);
$text = ereg_replace(" 8108", " <img src=\"images/108.gif\" alt=\":108\" border=\"0\">", $text);
$text = ereg_replace(" 9110", " <img src=\"images/110.gif\" alt=\":110\" border=\"0\">", $text);
$text = ereg_replace(" 0112", " <img src=\"images/112.gif\" alt=\":112\" border=\"0\">", $text);
$text = ereg_replace(" 1117", " <img src=\"images/117.gif\" alt=\":117\" border=\"0\">", $text);
$text = ereg_replace(" 2118", " <img src=\"images/118.gif\" alt=\":118\" border=\"0\">", $text);
$text = ereg_replace(" 3119", " <img src=\"images/119.gif\" alt=\":119\" border=\"0\">", $text);
$text = ereg_replace(" 4120", " <img src=\"images/120.gif\" lt=\":120\" border=\"0\">", $text);
$text = ereg_replace(" 147", " <img src=\"images/147.gif\" alt=\"147\" border=\"0\">", $text);
$text = ereg_replace(" 161", " <img src=\"images/161.gif\" alt=\"161\" border=\"0\">", $text);
$text = ereg_replace(" 178", " <img src=\"images/178.gif\" alt=\"178\" border=\"0\">", $text);
$text = ereg_replace(" :19", " <img src=\"images/19.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :22", " <img src=\"images/22.gif\" alt=\"22\" border=\"0\">", $text);
$text = ereg_replace(" :27", " <img src=\"images/27.gif\" alt=\"27\" border=\"0\">", $text);
$text = ereg_replace(" :11", " <img src=\"images/11.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :1w5", " <img src=\"images/115.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :1y7", " <img src=\"images/127.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :1r0", " <img src=\"images/130.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :1i8", " <img src=\"images/138.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :1p8", " <img src=\"images/148.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :1o9", " <img src=\"images/149.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :1q6", " <img src=\"images/156.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :1a9", " <img src=\"images/159.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :1s9", " <img src=\"images/169.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :1d0", " <img src=\"images/180.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k1k", " <img src=\"images/2amor.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k2k", " <img src=\"images/amor1.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k3k", " <img src=\"images/bomba.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k4k", " <img src=\"images/brabo.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k5k", " <img src=\"images/chona.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k6k", " <img src=\"images/chora.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k7k", " <img src=\"images/desint.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k8k", " <img src=\"images/embura.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k9k", " <img src=\"images/estrela.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k10k", " <img src=\"images/estu.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k11k", " <img src=\"images/festa.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k12k", " <img src=\"images/garga.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k13k", " <img src=\"images/gatinho.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k14k", " <img src=\"images/hambur.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k15k", " <img src=\"images/icq.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k16k", " <img src=\"images/inter.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k17k", " <img src=\"images/negativo.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k18k", " <img src=\"images/palha.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k19k", " <img src=\"images/porq.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k20k", " <img src=\"images/positivo.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k21k", " <img src=\"images/prese.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k22k", " <img src=\"images/sono.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k23k", " <img src=\"images/timi.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k24k", " <img src=\"images/timido+.gif\" alt=\"19\" border=\"0\">", $text);
$text = ereg_replace(" :k25k", " <img src=\"images/xau.gif\" alt=\"19\" border=\"0\">", $text);
return $text;
}

function test_lngwrd ($text, $lng){
$test = explode(" ", $text);
foreach ($test as $word){
if (strlen($word) > $lng){$tmp = true;}}
if ($tmp){return $tmp;}
}

function test_lngmsg ($text, $lng){
if (strlen($text) > $lng){$tmp = true;}
if ($tmp){return $tmp;}
}

function test_email($email){
if (eregi("^([a-z]|[0-9]|\.|-|_)+@([a-z]|[0-9]|\.|-|_)+\.([a-z]|[0-9]){2,3}$", $email, $arr_vars) &&
!eregi("(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)", $email, $arr_vars)){
return true;}
else {return false;}
}

############################################################
# Codigos

if($action == "msgnew"){
if ($spam && $gb_fltspam){$msg_txt = $lgerr[4]; $msg_cap = $lgerr[0]; $id="message";} else {
if($name & $message){
$name = flt_tags ($name,1);
$email = flt_tags ($email,1);
$page = flt_tags ($page,1);
$message = flt_tags ($message,$gb_flthtml);
$index = date("YmdHis",time());
$day = date("d.m.Y",time());
$time = date("H:i",time());
if (test_lngwrd($message,$gb_lngwrd)){$msg_txt = $lgerr[1]; $msg_cap = $lgerr[0]; $id="message";}
elseif (test_lngmsg($message,$gb_lngmsg)){$msg_txt = $lgerr[2]; $msg_cap = $lgerr[0]; $id="message";}
elseif ($private) {
$mail_msg =
"---------------------------------------------------------------\n".
"The folowning information was submitted on\n".
"$day $time\n".
"---------------------------------------------------------------\n".
"De: $name\n".
"Email: $email\n".
"Para: $page\n".
"Message: $message.\n".
"---------------------------------------------------------------\n".
"Remote host: $REMOTE_HOST \n".
"Remote address: $REMOTE_ADDR \n".
"User Agent: $HTTP_USER_AGENT \n".
"---------------------------------------------------------------\n";
mail($gb_mail, "Torpedo Privado", $mail_msg, "De: $name <$email>");
$msg_txt = $lgpri[1]; $msg_cap = $lgpri[0]; $id="messagem";
session_register("spam");
$spam = true;
}
else {
$data = fopen($gb_data, "a");
fwrite($data, "$index|$day|$time|$REMOTE_ADDR|$HTTP_USER_AGENT|$name|$email|$page|$message|$login||||||\r\n");
fclose($data);
session_register("spam");
$spam = true;
}
}
else{$msg_txt = $lgerr[3]; $msg_cap = $lgerr[0]; $id = "message";}
}
}

if($action == "logon"){
if ($password == $gb_psswd){
session_register("psswd");
$psswd = $password;
}
else {$msg_txt = $lgerr[5]; $msg_cap = $lgerr[0]; $id="message";}
}

if($msgdelete || $msgdelete == "0" ){
if ($psswd == $gb_psswd){
$data = file($gb_data);
rsort ($data);
unset($data[$msgdelete]);
$fp = fopen($gb_data,"w");
foreach ($data as $row){fputs($fp, $row);}
fclose($fp);
}
else{$msg_txt = $lgerr[6]; $msg_cap = $lgerr[0]; $id="message";}
}

if($msgedit || $msgedit == "0" ){
if ($psswd == $gb_psswd){
$id = "edit";
}
else{$msg_txt = $lgerr[7]; $msg_cap = $lgerr[0]; $id="message";}
}

if($msgreplace){
if ($psswd == $gb_psswd){
$data = file($gb_data);
rsort ($data);
$message = flt_tags ($message,$gb_flthtml);
$comment = flt_tags ($comment,0);
$data[$num] = "$index|$day|$time|$ip|$browser|$name|$email|$page|$message|$comment|$user\r\n";
$fp = fopen($gb_data,"w");
foreach ($data as $row){fputs($fp, $row);}
fclose($fp);
}
else{$msg_txt = $lgerr[6]; $msg_cap = $lgerr[0]; $id="message";}
}

############################################################
# HTML code
?>
<html>

<head>
<script language="JavaScript" type="text/javascript">
<!--
function setsmiley(which){
document.newmessage.message.value = document.newmessage.message.value + which;
}
//-->
</SCRIPT>
<script LANGUAGE="JavaScript">
function news(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=440,height=335,left = 299.5,top = 221.5');");
}
</script>
<meta http-equiv="Content-Language" content="pt-br">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>.:: MuTuM ViP ::.O Seu site Vip
</title>
</head>

<body topmargin="0" leftmargin="0" bgcolor="#E6BF99" link="#000000" vlink="#000000" alink="#000000">

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="512" id="AutoNumber1">
<!--DWLayoutTable-->
<tr>
<td colspan="2" style="border-bottom-style: solid; border-bottom-width: 1">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber2" width="712">
<tr>
<td rowspan="2" bgcolor="#FFFFFF" width="126"> <a href="index.htm">
<img border="0" src="images/logo1.jpg" width="117" height="100"></a></td>
<td width="663"> <img border="0" src="images/topo_novo_mutum1.jpg" width="654" height="73"></td>
</tr>
<tr>
<td width="663"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber3" width="87%">
<tr>
<td width="100%" bgcolor="#FFFFFF" style="border-right-style: solid; border-right-width: 1"><a href="index.htm">
<img border="0" src="images/home.jpg" width="80" height="28"></a><a href="aniversariantes.htm"><img border="0" src="images/aniversariantes.jpg" width="120" height="28"></a><a href="torpedos.php"><img border="0" src="images/topedos.jpg" width="79" height="28"></a><a href="agenda.htm"><img border="0" src="images/agenda.jpg" width="62" height="28"></a><a href="fotos.php"><img border="0" src="images/cobertura5.jpg" width="87" height="28"></a><a href="especial.htm"><img border="0" src="images/especial.jpg" width="69" height="28"></a><a href="equipe.htm"><img border="0" src="images/equipe.jpg" width="69" height="28"></a><a href="contato.htm"><img border="0" src="images/contato.jpg" width="87" height="28"></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6BF99" style="border-top-style: solid; border-top-width: 1">
<p align="left"><font face="Verdana" size="1"><b><a style="text-decoration: none" href="mailto:pasquetto@madsound.net?subject=Contactar Web Desiger &gt; Origem Mutum Vip &lt;"><font color="#000000">Designer
by Lucas Pasquetto</font></a><font color="#000000"><a style="text-decoration: none" href="mailto:webdesigner@mutumvip.com.br?subject=Contactar Web Desiger &gt; Origem Mutum Vip &lt;">/Sandro
Florêncio</a></font></b></font></td>
</tr>
<tr>
<td width="748" height="1671" valign="top" style="border-bottom-style: solid; border-bottom-width: 1">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber4">
<tr>
<td valign="top"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
<tr>
<td width="100%" style="border-bottom-style: none; border-bottom-width: medium">
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--Nova Mutum/MTWWW.MUTUMVIP.COM.BR-->
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--Nova Mutum/MTWWW.MUTUMVIP.COM.BR-->
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--Nova Mutum/MTWWW.MUTUMVIP.COM.BR-->
<p><img border="1" src="images/logo_index1.gif" width="160" height="140"></td>
</tr>
<tr>
<td width="100%" bgcolor="#D08840" style="border-left-style:solid; border-left-width:1; border-right-style:solid; border-right-width:1; border-top-style:none; border-top-width:medium; border-bottom-style:solid; border-bottom-width:1">
<p align="center"><b><font face="Verdana" size="1">Torpedos
Vip</font></b></td>
</tr>
<tr>
<td width="97%" style="border-top-style: solid; border-top-width: 1; border-right-style:solid; border-right-width:1; border-bottom-style:solid; border-bottom-width:1" align="center" bgcolor="#F1DDC9">
<font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font color="#0000ff">ATENÇÃO:</font></b>
As opiniões e mensagens aqui encontradas não refletem de maneira
alguma o pensamento da Equipe do MutumVip. Além de passar por
um filtro de palavras indiscretas, as mensagens maldosas aqui
encontradas serão deletadas assim que detectadas.</font> </td>
</tr>
<tr>
<td width="100%" style="border-top-style: solid; border-top-width: 1">&nbsp;
</td>
</tr>
<tr>
<td width="100%">&nbsp;</td>
</tr>
</table></td>
<td valign="top"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="94%" id="AutoNumber6">
<tr>
<td width="1%">&nbsp;</td>
<td width="99%"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="585" id="AutoNumber7" height="78">
<tr>
<td width="583" height="1" valign="top"> <table width="98%" border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" id="AutoNumber10" style="border-collapse: collapse">
<!--DWLayoutTable-->
<tr>
<td width="99%" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium">&nbsp;
</td>
<td width="1%"></td>
</tr>
<tr>
<td bgcolor="#D08840" style="border-style: solid; border-width: 1">
<b><font face="Verdana" size="2">.:: Torpedos Vip
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::</font></b></td>
<td></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF" style="border-style: solid; border-width: 1">
<table border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td width="500">&nbsp;</td>
<td width="1">&nbsp;</td>
</tr>
<tr>
<td valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="500" height="1458" valign="top">
<table width="455" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td width="500" height="1458" valign="top">
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<!--DWLayoutTable-->
<tr>
<td width="131" height="12"></td>
<td width="239" colspan="2" valign="top" class="fontmini"><a href="torpedos.php?id=new"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&gt;&gt;CLIQUE
AQUI PARA ENVIAR O SEU&lt;&lt;</font></a></td>
<td width="125"></td>
</tr>
<tr>
<td height="18" colspan="2" valign="top" class="fontmini">
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<?php
$data = file($gb_data);
$maxmsg = count($data);
print ("$lgtxt[6]: $maxmsg");
?>
</font></td>
<td colspan="2" align="right" valign="top" class="fontmini"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<?php
rsort ($data);
If(!$pg){$pg=0;}
If($pg==0){print("<font color=\"#DDDDDD\">&laquo; $lgtxt[4]</font>");}
else{$tmp = $pg -1; print("<a href=\"$PHP_SELF?pg=$tmp\">&laquo; $lgtxt[4]</a>");}
$tmp = $pg * $gb_msgpg + $gb_msgpg; print(" | ");
if ($maxmsg > $tmp){$tmp = $pg + 1; print ("<a href=\"$PHP_SELF?pg=$tmp\">$lgtxt[5] &raquo;</a>");}
else {print("<font color=\"#DDDDDD\">$lgtxt[5] &raquo;</font>");}
?>
</font></td>
</tr>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="#333333">
<?php
############################################################
# Error message

if ($id=="message"){?>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bordercolor="#000000" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#FFCC00" colspan="2" align="center" class="fontnorm"><b><?php print($msg_cap);?></b></td>
</tr>
<tr>
<td bgcolor="#FFCC00" colspan="2" align="center" class="fontnorm">
<p><br>
<?php print($msg_txt);?><br>
<br>
</p></td>
</tr>
</table>
<?php }

############################################################
# Admin logon

elseif ($id=="admin"){?>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bordercolor="#000000" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#FFCC00" colspan="2" align="center" class="fontnorm"><b><?php print($lgtxt[20]);?></b></td>
</tr>
<tr>
<td bgcolor="#FFCC00" colspan="2" align="center" class="fontnorm">
<p><?php print($lgtxt[21]);?><br>
<form method="post" action="<?php print $PHP_SELF ?>">
<input type="password" name="password">
<input name="action" type="hidden" value="logon">
<input type="submit" name="Submit" value="<?php print($lgtxt[22]);?>">
</form>
<br> <p></p></td>
</tr>
</table>
<?php }

############################################################
# Editar mensagens

elseif ($id=="edit"){
$data = file($gb_data);
rsort ($data);
$info = explode("|",$data[$msgedit]);
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
<form method="post" action="<?php print $PHP_SELF ?>">
<tr bgcolor="#FFCC00">
<td colspan="2" align="center" class="fontnorm"><b><?php print("$lgtxt[29]");?></b></td>
</tr>
<tr bgcolor="#FFCC00">
<td width="130" align="right" class="fontnorm"><?php print("$lgtxt[25]");?>
:</td>
<td width="363"> <input type="text" name="day" size="40" value="<?php print("$info[1]"); ?>"></td>
</tr>
<tr bgcolor="#FFCC00">
<td width="130" align="right" class="fontnorm"><?php print("$lgtxt[26]");?>
:</td>
<td width="363"> <input type="text" name="time" size="40" value="<?php print("$info[2]"); ?>"></td>
</tr>
<tr bgcolor="#FFCC00">
<td width="130" align="right" class="fontnorm"><?php print("$lgtxt[27]");?>
:</td>
<td width="363"> <input type="text" name="ip" size="40" value="<?php print("$info[3]"); ?>"></td>
</tr>
<tr bgcolor="#FFCC00">
<td width="130" align="right" class="fontnorm"><?php print("$lgtxt[28]");?>
:</td>
<td width="363"> <input type="text" name="browser" size="40" value="<?php print("$info[4]"); ?>"></td>
</tr>
<tr bgcolor="#FFCC00">
<td width="130" align="right" class="fontnorm"><?php print("$lgtxt[8]");?>
:</td>
<td width="363"> <input type="text" name="name" size="40" value="<?php print("$info[5]"); ?>"></td>
</tr>
<tr bgcolor="#FFCC00">
<td align="right" class="fontnorm">Usu&aacute;rio</td>
<td><input name="usr" type="text" id="usr" value="<?php print("$info[9]"); ?>" size="40" disabled></td>
</tr>
<tr bgcolor="#FFCC00">
<td width="130" align="right" class="fontnorm"><?php print("$lgtxt[9]");?>
:</td>
<td width="363"> <input type="text" name="email" size="40" value="<?php print("$info[6]"); ?>"></td>
</tr>
<tr bgcolor="#FFCC00">
<td width="130" align="right" class="fontnorm"><?php print("$lgtxt[10]");?>
:</td>
<td width="363"> <input type="text" name="page" size="40" value="<?php print("$info[7]"); ?>"></td>
</tr>
<tr bgcolor="#FFCC00">
<td width="130" align="right" class="fontnorm"><?php print("$lgtxt[11]");?>
:</td>
<td width="363"> <textarea name="message" cols="40" rows="5"><?php print("$info[8]"); ?></textarea></td>
</tr>
<tr bgcolor="#FFCC00">
<td width="130" align="right" class="fontnorm"><?php print("$lgtxt[30]");?>
:</td>
<td width="363"> <textarea name="comment" cols="40" rows="5" disabled>Desabilitado



</textarea></td>
</tr>
<tr bgcolor="#FFCC00">
<td width="130"> <input type="hidden" name="index" value="<?php print("$info[0]"); ?>">
<input type="hidden" name="num" value="<?php print("$msgedit"); ?>"></td>
<td width="363"> <input type="submit" name="msgreplace" value="<?php print("$lgtxt[14]");?>"></td>
</tr>
</form>
</table>
<?php }

############################################################
# Add entry

elseif ($id=="new"){?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
<form name="newmessage" method="post" action="<?php print $PHP_SELF ?>">
<tr bgcolor="#EBEBEB">
<td colspan="2" align="center" class="fontnorm"><b><?php print("$lgtxt[7]");?></b></td>
</tr>
<tr bgcolor="#EBEBEB">
<td width="130" align="right" class="fontnorm"><?php print("$lgtxt[8]");?>
:</td>
<td width="363"> <input name="name"type="text" class="form_campos" value="<?php echo $login ; ?>" size="40" maxlength="30"></td>
</tr>
<tr bgcolor="#EBEBEB">
<td width="130" align="right" class="fontnorm"><?php print("$lgtxt[9]");?>
:</td>
<td width="363"> <input class="form_campos" type="text" name="email" maxlength="40" size="40"></td>
</tr>
<tr bgcolor="#EBEBEB">
<td align="right" class="fontnorm"><?php print("$lgtxt[10]");?></td>
<td><input name="page" type="text" class="form_campos" id="page" value="" size="40" maxlength="40"></td>
</tr>
<tr bgcolor="#EBEBEB">
<td width="130" align="right" class="fontnorm">
IP:</td>
<td width="363"><input disabled class="form_campos" type="text" name="page22" maxlength="40" value="<?php echo $REMOTE_ADDR ; ?>" size="40">
</td>
</tr>
<tr bgcolor="#EBEBEB">
<td width="130" align="right" class="fontnorm"><?php print("$lgtxt[11]");?></td>
<td width="363" class="fontnorm">
<textarea class="form_campos" name="message" cols="40" rows="5"></textarea>
<?php if ($gb_privmsg){?>
<br> <input type="checkbox" name="private" value="true">
<?php print("$lgtxt[12]");?>
<?php }?>
</td>
</tr>
<?php if ($gb_smiley){?>
<tr bgcolor="#EBEBEB">
<td width="130">&nbsp;</td>
<td width="363"> <a href="java script:setsmiley(' 2100')" onFocus="filter:blur()"><img src="images/100.gif" alt="100(" border="0"></a>
<a href="java script:setsmiley(' 3101')" onFocus="filter:blur()"><img src="images/101.gif" alt=":101" border="0"></a>
<a href="java script:setsmiley(' 4102')" onFocus="filter:blur()"><img src="images/102.gif" alt=":102" border="0"></a>
<a href="java script:setsmiley(' 5105')" onFocus="filter:blur()"><img src="images/105.gif" alt="105" border="0"></a>
<a href="java script:setsmiley(' 6106')" onFocus="filter:blur()"><img src="images/106.gif" alt="106(" border="0"></a>
<a href="java script:setsmiley(' 7107')" onFocus="filter:blur()"><img src="images/107.gif" alt=":107" border="0"></a>
<a href="java script:setsmiley(' 8108')" onFocus="filter:blur()"><img src="images/108.gif" alt=":108" border="0"></a>
<a href="java script:setsmiley(' 9110')" onFocus="filter:blur()"><img src="images/110.gif" alt="110" border="0"></a>
<a href="java script:setsmiley(' 0112')" onFocus="filter:blur()"><img src="images/112.gif" alt="112(" border="0"></a>
<a href="java script:setsmiley(' 1117')" onFocus="filter:blur()"><img src="images/117.gif" alt=":117" border="0"></a>
<a href="java script:setsmiley(' 2118')" onFocus="filter:blur()"><img src="images/118.gif" alt="118" border="0"></a>
<a href="java script:setsmiley(' 3119')" onFocus="filter:blur()"><img src="images/119.gif" alt="119(" border="0"></a>
<a href="java script:setsmiley(' 4120')" onFocus="filter:blur()"><img src="images/120.gif" alt=":120" border="0"></a>
<a href="java script:setsmiley(' 147')" onFocus="filter:blur()"><img src="images/147.gif" alt="147(" border="0"></a>
<a href="java script:setsmiley(' 161')" onFocus="filter:blur()"><img src="images/161.gif" alt="161" border="0"></a>
<a href="java script:setsmiley(' 178')" onFocus="filter:blur()"><img src="images/178.gif" alt="178" border="0"></a>
<a href="java script:setsmiley(' :19')" onFocus="filter:blur()"><img src="images/19.gif" alt="19(" border="0"></a>
<a href="java script:setsmiley(' :11')" onFocus="filter:blur()"><img src="images/11.gif" alt=":190" border="0"></a>
<a href="java script:setsmiley(' :22')" onFocus="filter:blur()"><img src="images/22.gif" alt="22(" border="0"></a>
<a href="java script:setsmiley(' :27')" onFocus="filter:blur()"><img src="images/27.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :1w5')" onFocus="filter:blur()"><img src="images/115.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :1y7')" onFocus="filter:blur()"><img src="images/127.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :1r0')" onFocus="filter:blur()"><img src="images/130.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :1i8')" onFocus="filter:blur()"><img src="images/138.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :1p8')" onFocus="filter:blur()"><img src="images/148.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :1o9')" onFocus="filter:blur()"><img src="images/149.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :1q6')" onFocus="filter:blur()"><img src="images/156.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :1a9')" onFocus="filter:blur()"><img src="images/159.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :1s9')" onFocus="filter:blur()"><img src="images/169.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :1d0')" onFocus="filter:blur()"><img src="images/180.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :k1k')" onFocus="filter:blur()"><img src="images/2amor.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :k2k')" onFocus="filter:blur()"><img src="images/amor1.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :k3k')" onFocus="filter:blur()"><img src="images/bomba.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :k4k')" onFocus="filter:blur()"><img src="images/brabo.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :k5k')" onFocus="filter:blur()"><img src="images/chona.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :k6k')" onFocus="filter:blur()"><img src="images/chora.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :k7k')" onFocus="filter:blur()"><img src="images/desint.gif" alt="27" border="0"></a>
<a href="java script:setsmiley(' :k8k')" onFocus="filter:blur()"><img src="images/embura.gif" alt="27" border="0"></a>



#222167 Função Fopen

Posted by rober on 02/11/2003, 18:44 in PHP

Eu voou transformar este sistema em mysql acho q será mais facil

. . . .

. . . .

MUITO OBRIGADO PELA AJUda . .
. .



#221704 Função Fopen

Posted by rober on 02/11/2003, 12:14 in PHP

Vcs pediram para eu postar o cod neh rsrsrs :D

. . . . aqui ele armazena no txt acho q é isso

$data = fopen($gb_data, "a");
fwrite($data, "$index|$day|$time|$REMOTE_ADDR|$HTTP_USER_AGENT|$name|$email|$page|$message|$login||||||\r\n");
fclose($data);




#217472 Função Fopen

Posted by rober on 26/10/2003, 18:31 in PHP

<?php
$abre = "data.txt";
$linhas = fgets ($abre, "100");
echo $linhas ;
/* r = Permissão para Leitura Somente.
w = Permissão para Gravar (Cria o Arquivo caso ele não exista);
a = Permissão para Adicionar mais Coisas ao Arquivo...
*/
?>


seria isso ???

ele continua naum buscando nada e dando a mesma exibição na tela

"Resource id #1"



#217460 Função Fopen

Posted by rober on 26/10/2003, 18:12 in PHP

eu coloquei assim :

<?php
$abre = fopen ("data.txt", "r");
echo $abre ;
/* r = Permissão para Leitura Somente.
w = Permissão para Gravar (Cria o Arquivo caso ele não exista);
a = Permissão para Adicionar mais Coisas ao Arquivo...
*/
?>

dai ele me resultou na seguinte impressão na tela :

Resource id #1

e não imprimio o texto da database



#217481 Função Fopen

Posted by rober on 26/10/2003, 18:41 in PHP

uma coisa as informações são gravadas entre "|"
ex :

|$a|$b|$c| existe como eu escolher qual var eu exibir



#217441 Função Fopen

Posted by rober on 26/10/2003, 17:53 in PHP

Olá... eu tenho um sistema de torpedos (guestbook) com a base de dados txt...(bloco de notas) eu gostaria de fazer a opção de mostra o ultimo post mas para isso eu presisaria usar a função fopen para abrilo e mostrar os resultados... mas não consegui alguem a sitaxe da funçao para que eu possa estar tentando ?

vlews



#217649 Função Fopen

Posted by rober on 26/10/2003, 21:29 in PHP

Skual...

desculpa estar te enchendo o saco mas eu fucei fucei

e ele naum imprimio nada na tela..e tbm naum apareceu nada...



#202189 Utilizando Imagens

Posted by rober on 05/10/2003, 18:17 in PHP

tah tudo em english...naum tem em portugues....e qual q eu baixo ?



#202136 Utilizando Imagens

Posted by rober on 05/10/2003, 17:27 in PHP

como instalar a biblioteca gd..typow..peguei ela e naumsei oque fazer com os arquivos



#221304 Imagens Aleatorias

Posted by rober on 01/11/2003, 20:49 in PHP

falta de paciencia pra pensar um pouco mais... brigado pela chamada de atenção



#221288 Imagens Aleatorias

Posted by rober on 01/11/2003, 20:32 in PHP

usa a função rand() para fazer a randominização delas

<?php
$num = rand (1,3) ; // gera um numero aleatorio entr 1 e 3 //
if($num==1){
echo"<img src='imgem1.gif'>" ;
}
elseif($num==2){
echo"<img src='imgem2.gif'>" ;
}
elseif($num==3){
echo"<img src='imgem3.gif'>" ;
} // assim vai indo


?>




#304592 Php + Apache

Posted by rober on 22/02/2004, 00:10 in PHP

Eu digo,
Na tela principal está escrito uma label Server (server_info,host_info...)
Todos os campos ali estão vazios
e no campo textarea mais acima (label myOBDC)
ele está dizendo Not Found driver 3.51 Not Found ?

Isso é normal ?? e como faço pra trocar senha e login do servidor mysql ?



#304601 Php + Apache

Posted by rober on 22/02/2004, 00:26 in PHP

Conectou blz instalei a gd já, agora tirei minhas duvidas, consegui rodar dois php na minha maquina, agora vou desisntalar o easy e deixar o 5 e 4 instalados, muito obrigado pela ajuda
Só mais uma coisa, o mysql não é preciso instalr duas vezes neh ? somente uma exato ?



#304574 Php + Apache

Posted by rober on 21/02/2004, 23:43 in PHP

ffmm2003
Bravo !!!
Foi só colokar o arquivo na pasta sapi e vuola rodou, tem mais algum parametro que devo configurar no php.ini ou no propio apache?



#304538 Php + Apache

Posted by rober on 21/02/2004, 23:10 in PHP

" sintaxe error line 193
canot load d:/php/sapi/php4apache.dll Into server : <127> não foi possivel encontrar o procedimento epecificado "

esse é o erro acho que é na hora de carregar o php,

(o php foi dezipado d:/php)
apache instalado(d:/apache)



#304586 Php + Apache

Posted by rober on 22/02/2004, 00:00 in PHP

ffmm2003,
Ok brigado, foi bem utili pra mim esse seu ultimo post
Eu instalei o mysql 3.23.58 na pasta d:/mysql
executei o arquivo bin/winmysqladmin.exe
ele ficou verde, como eu faço para adicionar um servidor ? tipow o localhost




IPB Skin By Virteq