1
jrjperu
live help
  • 2005/3/15 19:52

  • jrjperu

  • Just popping in

  • Posts: 11

  • Since: 2004/1/14


file chat.php
---------------------------------------------------
include("config.php") ;
include $lang;

$glob = get_cfg_var (register_globals);
if($glob != true){
include("patch.php");
}


if(!isset($action)){
$action = "";
}

if ($nome == ""){
$nome = $string_28;//Guest
}
if ($action == "novo") {
if ( file_exists( "transcricao.php" ))
{
echo "";
exit ;
}
$tp = time();
$fp = fopen ("vida.php", "w+");
fwrite ($fp, $tp);
fclose ($fp);
$fp = fopen ("transcricao.php", "w+");
fwrite ($fp, "


" . $nome . ", " . $string_39 . "");
fclose ($fp);

// Duplica
$fp = fopen ("transcricao2.php", "w+");
fwrite ($fp, "


" . $nome . ", " . $string_39 . "");
fclose ($fp);

// Triplica
$fp = fopen ("transcricao3.php", "w+");
fwrite ($fp, "" . $string_4 . "


" . $nome . ", " . $string_39 . "");
fclose ($fp);

}
if ($action == "") {
$tp = time();
$fp = fopen ("vida.php", "w+");
fwrite ($fp, $tp);
fclose ($fp);
}
?>
<? echo "$string_4"; ?> - <? echo "$string_29"; ?> ...............................................................









2
jrjperu
Re: live help
  • 2005/3/15 19:55

  • jrjperu

  • Just popping in

  • Posts: 11

  • Since: 2004/1/14


FILE chat_baixo.php
--------------------------------------------------------
include("config.php") ;
include $lang;
$glob = get_cfg_var (register_globals);
if($glob != true){
include("patch.php");
}
if(!isset($action)){
$action = "";
}

if ($action == "sair"){
print " \n";
}
if(!isset($mensagem)){
$mensagem = "";
}
if ($mensagem != "" ) {
$mensagem = str_replace("\'", "'", "$mensagem");
$mensagem = str_replace("\\\"", "\"", "$mensagem");

$fp = fopen ("transcricao.php", "r");
$fs = filesize ("transcricao.php");
$bytes = $fs;
$buffer = fread($fp, $bytes);
fclose ($fp);

////////////
$numero_de_linhas = $num_linhas; //aqui entra o numero de linhas desejado

$array_chat = explode("
", $buffer);
$counter = count ($array_chat);

if($counter <= $numero_de_linhas){
$desejo = 1;
}else{
$desejo = $counter - $numero_de_linhas;
}
//echo "";


$texto = $array_chat[0] . "
"; // cabecalho

for ($i=$desejo; $i<=$counter; $i++) {
$texto .= $array_chat[$i] . "
";
};


$buffer = rtrim($texto,"
");
////////////

$mensagem_formatada = "" . $nome . " : " . $mensagem . "
\n";
$fp = fopen ("transcricao.php", "w");
fwrite ($fp, $buffer);
//fwrite ($fp, "
\n");
fwrite ($fp, $mensagem_formatada);
fclose ($fp);


/// duplica
$fp = fopen ("transcricao2.php", "r");
$fs = filesize ("transcricao2.php");
$bytes = $fs;
$buffer = fread($fp, $bytes);
fclose ($fp);
////////////
$numero_de_linhas = $num_linhas; //aqui entra o numero de linhas desejado

$array_chat = explode("
", $buffer);
$counter = count ($array_chat);

if($counter <= $numero_de_linhas){
$desejo = 1;
}else{
$desejo = $counter - $numero_de_linhas;
}
//echo "";


$texto = $array_chat[0] . "
"; // cabecalho

for ($i=$desejo; $i<=$counter; $i++) {
$texto .= $array_chat[$i] . "
";
};


$buffer = rtrim($texto,"
");
////////////
$mensagem_formatada = "" . $nome . " : " . $mensagem . "
";
$fp = fopen ("transcricao2.php", "w");
fwrite ($fp, $buffer);
//fwrite ($fp, "
");
fwrite ($fp, $mensagem_formatada .
"
");
fclose ($fp);





/// Triplica
$fp = fopen ("transcricao3.php", "r");
$fs = filesize ("transcricao3.php");
$bytes = $fs;
$buffer = fread($fp, $bytes);
fclose ($fp);

$mensagem_formatada = "" . $nome . " : " . $mensagem . "
";
$fp = fopen ("transcricao3.php", "w");
fwrite ($fp, $buffer);
//fwrite ($fp, "
");
fwrite ($fp, $mensagem_formatada .
"
");
fclose ($fp);

}
?>



















:



" onclick="envia()" style="cursor:hand; margin:1; border-width:1; border-style:solid;">



" onclick="save()" style="cursor:hand; margin:1; border-width:1; border-style:solid;">    " onclick="sair()" style="cursor:hand; margin:1; border-width:1; border-style:solid;">






 





3
jrjperu
Re: live help
  • 2005/3/15 19:58

  • jrjperu

  • Just popping in

  • Posts: 11

  • Since: 2004/1/14


file config.php
----------------------------------------------------------

/*Login para o operador*/
/*Login for operator*/
$login = "admin";

/*Senha para o operador*/
/*Password for operator!*/
$senha = "chat";

/*Tempo (em segundos) para verificar nova chamada
Recomendado: 10 */
/*Time (in seconds) for verification of new calls
Recommended: 10 */
$tempo_chamadas = 10;

/*Tempo (em segundos) para atualizar a janela de chat
Recomendado: 5 */
/*Time (in seconds) for update of the windows of chat
Recommended: 5 */
$tempo_chats = 5;

/*Cor usada pelo visitante no Chat*/
/*Color that will be used by the Visitor in the Chat*/
$cor_usuario = "000000";

/*Cor usada pelo operador no Chat*/
/*Color that will be used by the Operator in the Chat*/
$cor_operador = "FF9900";

/*The URL of the Chat = "http://www.yourdomain.com/livehelp/"; */
$url_chat = "http://www.yourdomain.com/livehelp";

/*The URL of its Site = "http://www.yourdomain.com/"; */
$pagina_inicial = "http://www.yourdomain.com";

/*
Email para onde deve ser enviadas as mensagens caso o operador esteja OFFLINE
Não esqueca de colocar uma "\" antes do "@"

Email for where the messages must be sent case the Operator is OFFLINE
don't forget to place one "\" before "@"
*/
$mail = "your@mail.com";

/*
Tempo (em segundos) para iniciar nova sessao de chat.
Minimo recomendado: 60

Time (in seconds) for the release of new session of chat.
Recommended minimum: 60
*/
$tempo = 60;

/*
Numero de linhas que aparecem na janela de chat
Recomendado: 15

Number of lines show on window chat
Recommended: 15
*/
$num_linhas = 15;

/*
Pasta atual
Current folder
*/
$var_status_image = "help";

/*
Linguagem
Language


language_english.php

*/
$lang = "language_english.php";



$var_js_function = "fun_" . $var_status_image;
$var_js_window = "var_window" . $var_status_image;
$demo = "off";


?>

Login

Who's Online

424 user(s) are online (332 user(s) are browsing Support Forums)


Members: 0


Guests: 424


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits