Jump to content


contrata-se

Member Since 12/07/2006
Offline Last Active 15/09/2007, 09:57
-----

Posts I've Made

In Topic: Sistema Inovador Para Freelancers E Webmasters!

09/03/2007, 22:43

Pelo que eu vi no sistema, se o freelancer arrumar por fora ele é banido do sistema, ai não poderá mais participar de futuros lances, muito interessante e realmente inovador, esse sistema pelo que to vendo vai dar o que falar ainda, e se não bastasse a galera ta gostando, não sei a quantia de cadastros que tem, mas que é muito legal isso é sim, pois tem muitos webmasters procurando bons freelancers e bons freelancers procurando bons trabalhos, realmente a idéia é muito boa;.. eu gostei e vou me cadastrar la...

In Topic: Replace Duvida Cruel

19/02/2007, 01:25

vamos la..
o que eu quero fazer eh o seguinte adicionar varios nome ai cada vez que os usuarios que tiverem os nomes adicionados ai eles seriam mudados... vamos explicar com detalhes...

voce entra no mural de recados e posta uma mensagem => procuro pessoas para amizades => ai entra uma pessoa ma intencionada e posta usando seu nome => procuro relação sexual a 3 => automaticamente todos pensaram que foi voce porque ele esta usando o seu nome, como usar um cadastro é ruim porque quase ninguem curti ficar se cadastrando, resolvi fazer isso em replace, voce entra e vamos supor que vc queira ter seu nick diferente manda um e-mail com o nick e senha que quer, ai pronto na hora de postar eh so postar

nicksenha e o sistema muda pra nick com cor diferente...

deu pra entender agora???

abraços

In Topic: Replace

22/10/2006, 09:14

nesse codigo como eu faco?:?

#!/usr/bin/perl

$ver = 'Chat versao 2.0';
require './jcode.pl';

# タイトル名
$title = "Chat TodosAqui.net";

# タイトル文字の色
$t_color = "#008040";

# 背景色、文字色等を指定
$bground = "#FE9901"; # 壁紙を使用する場合 (http://から記述)
$bgcolor = "#FE9901"; # 背景色
$text = "#000000"; # 文字色
$link = "#0000FF"; # リンク色(訪問済)
$vlink = "#800080"; #  〃  (既訪問)
$alink = "#DD0000"; #  〃  (訪問中)

# 最大保有記事数
$max = 20;

# 戻り先のURL (http://から記述してもよい)
$homepage = 'http://www.todosaqui.net';

# タグの許可 (0=no 1=yes)
$tagkey = 1;

# スクリプト名 (この掲示板のファイル名)
$script = "./chat.cgi";

# ログファイル(フルパスで記述する場合は / から始まるパス)
$logfile = "./i-chat.log";

# 参加者ファイル(フルパスで記述する場合は / から始まるパス)
$memfile = "./member.dat";

# methodの形式 (POST or GET)
$method = 'POST';

# 入退室のあいさつ
$in_msg = ' Acabou de entrar na sala'; # 入室あいさつ
$out_msg = ' acabou de sair da sala'; # 退室あいさつ

# 発言後フォーカスをフォームへ自動移動 (0=no 1=yes)
$jvfocus = 1;

# ファイルロックの指定 (0=no 1=yes)
$lockkey = 0;

# ロックファイル名(フルパスで記述する場合は / から始まるパス)
$lockfile = "./lock/i-chat.lock";

$mail = "bruno@todosaqui.net" ;
#============#
# 設定完了 #
#============#

# メイン処理
&decode;
if ($mode eq "regist" && $com) { &regist; }
elsif ($mode eq 'into') { &regist('into'); }
elsif ($mode eq 'out') { &out; }
&html;

#--------------#
# 記事表示部 #
#--------------#
sub html {
# 表示開始
&header;

if ($mode eq 'into' || $mode eq 'regist') {
print "<form name=\"windy\" method=\"$method\" action=\"$script\">\n";
print "<input type=hidden name=mode value=\"regist\">\n";
print "<input type=hidden name=name value=\"$name\" istyle=\"3\">\n";
print "<input type=hidden name=email value=\"$email\" istyle=\"3\">\n";
print "<center>■$title</center><br>";

print "<font color=red><center>■(LpG)!!gata.tatuada!!■<br>■TodosAqui.net■<br>■So LOVE■<br>■Te amo muito■</center></font>";

print "<input type=text name=comment size=16 istyle=\"3\"><br>";
print "<input type=submit value=\"Enviar/Atualizar\">";
print "</form></select>\n";
print "<form method=\"$method\" action=\"$script\">\n";
print "<input type=hidden name=mode value=\"out\">\n";
print "<input type=hidden name=name value=\"$name\">\n";
print "<input type=submit value=\"Sair\"></form>\n";
# 参加者表示
&member;
print "<hr>($num) usuarios online <br>\n";
}
else {
# クッキーを取得
&get_cookie;

print "[<a href=\"$homepage\">TOP</a>]\n";
print "<center><font color=\"$t_color\">$title</font><hr></center>\n";
print "<form method=\"$method\" action=\"$script\">\n";
print "<input type=hidden name=mode value=\"into\">\n";
print "Nome<br>\n";
print "<input type=text name=name size=16 value=\"$c_name\" istyle=\"3\"><br>\n";
print "E-mail<br>\n";
print "<input type=text name=email size=16 value=\"$c_email\" istyle=\"3\"><br>\n";
print "<input type=submit value=\"Entrar na sala\">\n";
print "</form>\n";

}

# ログを展開
open(IN,"$logfile") || &error("Open Error : $logfile");
while (<IN>) {
$head = $point;
local($date,$name,$mail,$com,$color,$ip) = split(/<>/);

if ($mail) { $name = "<a href=\"mailto\:$mail\">$name</a> "; }

print "<hr>$name>$com<br> $date \n";

}
close(IN);

# 著作権表示(削除禁止)
print "<hr><center><!-- $ver -->\n";
print "- <a href='http://www.todosaqui.net/' target='_top'>TodosAqui.net</a> -\n";
print "</center>\n";
print "<P align=right>$ver\n</body></html>\n";
exit;
}

#--------------------#
# ログ書き込み処理 #
#--------------------#
sub regist {
# 名前の入力がなければエラー
if ($in{'name'} eq "") { &error("Coloque seu nome"); }

if ($_[0] eq 'into') {
&set_cookie;

$n_name = "TodosAqui.net informa";
$com = "<font color=red>$name</font>" . "$in_msg";
$n_email = "";
$n_color = $text;
}
elsif ($_[0] eq 'out') {
$n_name = "TodosAqui.net informa";
$com = "$name" . "$out_msg";
$n_email = "";
$n_color = $text;
}
else {
$n_name = $name;
$n_email = $email;
$n_color = $color;
}

# ファイルロック
if ($lockkey) { &lock; }

# ログを読み込み
open(IN,"$logfile") || &error("Open Error : $logfile");
@lines = <IN>;
close(IN);

# 最大記事数処理
while ($max <= @lines) { pop(@lines); }

# ログ更新処理
unshift (@lines,"$date<>$n_name<>$n_email<>$com<>$n_color<>$addr<>\n");
open(OUT,">$logfile") || &error("Write Error : $logfile");
print OUT @lines;
close(OUT);

# ロック解除
if ($lockkey) { &unlock; }
}

#------------#
# 退室処理 #
#------------#
sub out {
&regist('out');

&header;
print "<center>$name、obrigado por usar nosso chat。<br>\n";
print "[<a href=\"$homepage\" target=\"_top\">Voltar</a>]</center><P>\n";
print "</body></html>\n";
exit;
}

#----------------#
# デコード処理 #
#----------------#
sub decode {
if ($ENV{'REQUEST_METHOD'} eq "POST") {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
} else { $buffer = $ENV{'QUERY_STRING'}; }
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

# 文字コード変換
&jcode'convert(*value,'sjis');

# タグ処理
if ($tagkey) {
$value =~ s/<!--(.|\n)*-->//g;
$value =~ s/<>/&lt;&gt;/g;
} else {
$value =~ s/</&lt;/g;
$value =~ s/>/&gt;/g;
$value =~ s/\"/&quot;/g;
}

$value =~ s/\n//g;
$value =~ s/\r//g;
$value =~ s/\t//g;

$in{$name} = $value;
}

$name = $in{'name'};
$com = $in{'comment'};
$email = $in{'email'};
$mode = $in{'mode'};
$color = $in{'color'};

# 時間の取得
$ENV{'TZ'} = "JST-9";
$times = time;
($sec,$min,$hour,$mday,$mon) = localtime($times);

# 日時のフォーマット
$date = sprintf("%02d/%02d-%02d:%02d:%02d",$mon+1,$mday,$hour,$min,$sec);

# IPアドレスを取得
$addr = $ENV{'REMOTE_ADDR'};
if ($name eq "") { $name = $addr; }
}

#------------------#
# クッキーの発行 #
#------------------#
sub set_cookie {
# クッキーは60日間有効
($secg,$ming,$hourg,$mdayg,$mong,$yearg,$wdayg) = gmtime(time + 60*24*60*60);

@mons = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
@week = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

$gm_date = sprintf("%s\, %02d-%s-%04d %02d:%02d:%02d GMT",
$week[$wdayg],$mdayg,$mons[$mong],$yearg+1900,$hourg,$ming,$secg);
$cook = "name\:$name\,email\:$email\,color\:$color";
print "Set-Cookie: WINDY=$cook; expires=$gm_date\n";
}

#------------------#
# クッキーを取得 #
#------------------#
sub get_cookie {
$cookie = $ENV{'HTTP_COOKIE'};

@pairs = split(/;/, $cookie);
foreach $pair (@pairs) {
local($name, $value) = split(/=/, $pair);
$name =~ s/ //g;
$DUMMY{$name} = $value;
}
@pairs = split(/,/, $DUMMY{'WINDY'});
foreach $pair (@pairs) {
local($name, $value) = split(/:/, $pair);
$COOKIE{$name} = $value;
}
$c_name = $COOKIE{'name'};
$c_email = $COOKIE{'email'};
$c_color = $COOKIE{'color'};

if ($in{'name'}) { $c_name = $in{'name'}; }
if ($in{'email'}) { $c_email = $in{'email'}; }
if ($in{'color'}) { $c_color = $in{'color'}; }
}

#--------------#
# エラー処理 #
#--------------#
sub error {
if ($lockflag) { &unlock; }

&header;
print "<center><h3>ERROR !</h3>\n";
print "<font color=red><B>$_[0]</B></font></center>\n";
print "</body></html>\n";
exit;
}

#--------------#
# ロック処理 #
#--------------#
sub lock {
$lockflag=1;
local($retry) = 5;
while (!mkdir($lockfile, 0755)) {
if (--$retry <= 0) { &error('LOCK is BUSY'); }
sleep(1);
}
$lockflag=1;
}

#--------------#
# ロック解除 #
#--------------#
sub unlock {
rmdir($lockfile);
$lockflag=0;
}

#------------------#
# HTMLのヘッダー #
#------------------#
sub header {
print "Content-type: text/html\n\n";
print "<html>\n<head>\n";
print "<META HTTP-EQUIV=\"Content-type\" CONTENT=\"text/html; charset=Shift_JIS\">\n";

# 発言後フォーカスをフォームへ自動移動 (kapiさん式)
if (($jvfocus && $mode eq 'into') || ($jvfocus && $mode eq 'regist')) {

$focus = " onLoad=\"return textfocus()\"";
print "<script language=\"JavaScript\">\n";
print "<!--\n";
print "function textfocus(){\n";
print "document.windy.comment.focus();\n";
print "return true;\n";
print "}\n";
print "//-->\n";
print "</script>\n";
}

print "<title>$title</title></head>\n";
print "<body background=\"$bground\" bgcolor=\"$bgcolor\" text=\"$text\" link=\"$link\" vlink=\"$vlink\" alink=\"$alink\"$focus>\n";
}

#--------------#
# 在室者処理 #
#--------------#
sub member {
open(IN,"$memfile") || &error("Open Error : $memfile");
@data = <IN>;
close(IN);

$member="";
@new=();
$flag=0;
$flag2=0;
foreach (@data) {
($time2,$name2,$host2) = split(/<>/);
# 60秒以上発言のない者は削除
if ($times-60 > $time2) { next; }
elsif ($host2 eq "$addr") {
# 退室者は削除
if ($_[0] eq 'bye') { next; }

# ホスト名が同一であれば時間と名前を更新
$_ = "$times<>$name<>$addr<>\n";
$name2 = $name;
$flag=1;
}
# 更新用配列 @new に追加
if ($name2 ne "$host2") {
push(@new,$_);

# 参加者表示用文字列を作成
if (!$flag2) { $member .= "$name2◇"; $flag2=1; }
else { $member .= "$name2◆"; $flag2=0; }
}
}
# 新規参加者を追加
if (!$flag && !$bye) {
if ($name ne "$host") {
push(@new,"$times<>$name<>$addr<>\n");
if (!$flag2) { $member .= "$name◇"; }
else { $member .= "$name◆"; }
}
}
# 参加者数を認識
$num = @new;

# ファイル更新
open(OUT,">$memfile") || &error("Write Error : $memfile");
eval "flock(OUT,2);";
truncate(OUT,0);
seek(OUT,0,0);
print OUT @new;
close(OUT);
}


In Topic: Erro No Mysql

20/10/2006, 08:57

resolvido...

muito obrigado...

In Topic: Erro Na Paginacao

19/10/2006, 12:50

nao esta funcionando de jeito nenhum
eh como se todas as paginas mostrasse o mesmo resultado e mostra todas os resultados na mesma pagina

IPB Skin By Virteq