1
jrjperu
test
  • 2007/4/25 21:16

  • jrjperu

  • Just popping in

  • Posts: 11

  • Since: 2004/1/14


test



2
jrjperu
Notes:
  • 2005/3/15 20:57

  • jrjperu

  • Just popping in

  • Posts: 11

  • Since: 2004/1/14


This script must be installed on the same server as your WebSite
Your website's server must support PHP

Instructions for Installation:

Create a folder called 'livehelp' on your webserver (e.g. www.yourdomain.com/livehelp/)
Change the permissions on the new folder to give write permission (chmod:777) or (chmod:755)
Open the 'config.php' file in a text editor and modify the variables to suit your needs
Optionally, you can replace the chat logo with your own. The logo picture is called 'logo.jpg' and 'chat_logo.jpg' (150 x 60 pixels)
Upload all the files in the following modes:

In Binary mode:
aviso.wav
logo.jpg
chat_logo.jpg
offline.jpg
online.jpg

Remainder in text mode (ASCII):

Make the following files writeable (chmod:777) or (chmod:755)

vida.php
status_image.php



3
jrjperu
live help
  • 2005/3/15 20:54

  • jrjperu

  • Just popping in

  • Posts: 11

  • Since: 2004/1/14


File o_chat_baixo.php
-----------------------------------------------------------
<?php
$glob = get_cfg_var (register_globals);
if($glob != true){
include("patch.php");
}
if(!isset($action)){
$action = "";
}
include("config.php") ;
include $lang;

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

$mensagem_formatada = "<font color=\"#" . $cor_operador . "\" face=\"Verdana\" size=\"2\"><b>" . $string_41 . "</b> : " . $string_35. "</font>";
$fp = fopen ("transcricao.php", "w+");
fwrite ($fp, $buffer);
fwrite ($fp, "<br>");
fwrite ($fp, $mensagem_formatada .
"
");
fclose ($fp);
// Duplica
$fp = fopen ("transcricao2.php", "r");
$fs = filesize ("transcricao2.php");
$bytes = $fs;
$buffer = fread($fp, $bytes);
fclose ($fp);

$mensagem_formatada = "<font color=\"#" . $cor_operador . "\" face=\"Verdana\" size=\"2\"><b>" . $string_41 . "</b> : " . $string_35. "</font>";
$fp = fopen ("transcricao2.php", "w+");
fwrite ($fp, $buffer);
fwrite ($fp, "<br>");
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 = "<font color=\"#" . $cor_operador . "\" face=\"Verdana\" size=\"2\"><b>" . $string_41 . "</b> : " . $string_35. "</font>";
$fp = fopen ("transcricao3.php", "w+");
fwrite ($fp, $buffer);
//fwrite ($fp, "<br>");
fwrite ($fp, $mensagem_formatada .
"
");
fclose ($fp);

print "<SCRIPT>window.top.close()</SCRIPT> \n";
exit;
}

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("<br>", $buffer);
$counter = count ($array_chat);

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


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

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


$buffer = rtrim($texto,"<br>");
////////////

$mensagem_formatada = "<font color=\"#" . $cor_operador . "\" face=\"Verdana\" size=\"2\"><b>" . $nome . "</b> : " . $mensagem . "</font><br>";
$fp = fopen ("transcricao.php", "w");
fwrite ($fp, $buffer);
//fwrite ($fp, "<br>");
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("<br>", $buffer);
$counter = count ($array_chat);

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


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

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


$buffer = rtrim($texto,"<br>");
////////////
$mensagem_formatada = "<font color=\"#" . $cor_operador . "\" face=\"Verdana\" size=\"2\"><b>" . $nome . "</b> : " . $mensagem . "</font><br>";
$fp = fopen ("transcricao2.php", "w");
fwrite ($fp, $buffer);
//fwrite ($fp, "<br>");
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 = "<font color=\"#" . $cor_operador . "\" face=\"Verdana\" size=\"2\"><b>" . $nome . "</b> : " . $mensagem . "</font><br>";
$fp = fopen ("transcricao3.php", "w");
fwrite ($fp, $buffer);
//fwrite ($fp, "<br>");
fwrite ($fp, $mensagem_formatada .
"
");
fclose ($fp);


}

?>
<html>

<head>
<title></title>
<!-- begin script -->
<SCRIPT LANGUAGE="JavaScript">
function converte_string(word){
return escape(word);
}
function sair() {
window.location = 'o_chat_baixo.php?action=sair';
}
function chat(){
window.parent.cima.location.reload();
msg.focus();
}
</script>
<!-- end script -->

<script>
function envia(){
window.location = 'o_chat_baixo.php?mensagem='+converte_string(msg.value) + '&nome=<? echo urlencode($nome); ?>';
}

function save() {
window.open("transcricao3.php","Save","scrollbars=yes,menubar=yes,top=100,left=200,width=420,height=300");
}
</script>
</head>

<body onload="chat()" bgcolor="#CCCCCC" text="black" link="blue" vlink="purple" alink="red" topmargin="3" marginheight="3">
<table border="0" width="384" align="center">
<tr>
<td width="374" height="26">
<p align="center"><font face="Verdana" size="2"><? echo "$string_30"; ?>:</font>&nbsp;<input type="text" name="msg" style="border-width:1; border-style:solid;" size="30">
<input type="submit" name="Entrar" value="<? echo "$string_31"; ?>" onclick="envia()" style="cursor:hand; margin:1; border-width:1; border-style:solid;">
<br><br><input type="button" name="Save" value="<? echo "$string_45"; ?>" onclick="save()" style="cursor:hand; margin:1; border-width:1; border-style:solid;">&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="Sair" value="<? echo "$string_10"; ?>" onclick="sair()" style="cursor:hand; margin:1; border-width:1; border-style:solid;"></p>
</td>
</tr>
</table>
</body>

</html>

-----------------------------------------------------------
file ocupado.php
-----------------------------------------------------------
<?php
//include("patch.php");
include("config.php");
include $lang;
?>
<html>

<head>
<title><? echo "$string_4"; ?></title>
</head>

<body bgcolor="white" text="black" link="black" vlink="black" alink="black">
<table align="center" border="1" cellspacing="0" width="396" bordercolordark="white" bordercolorlight="black">
<tr>
<td width="390" height="270" align="center">
<table border="0" width="386">
<tr>
<td width="380">
<p align="center"><img src="logo.jpg" width="150" height="57" border="0"></p>
</td>
</tr>
<tr>
<td width="380">
<p align="center">&nbsp;</p>
</td>
</tr>
<tr>
<td width="380">
<p align="center">&nbsp;</p>
</td>
</tr>
<tr>
<td width="380">
<p align="center"><font face="Verdana" size="2"><b><? echo $string_43; ?></b></font></p>
</td>
</tr>
<tr>
<td width="380">
<p>&nbsp;</p>
</td>
</tr>
<tr>
<td width="380">
<p align="center">
&nbsp;<input type="button" name="Entrar" value="<? echo "$string_10"; ?>" onclick="window.close()" style="cursor:hand; margin:1; border-width:1; border-style:solid;"></p>
</td>
</tr>
<tr>
<td width="380">
<p align="center"><font face="Verdana" size="1"><br><a href="https://xoops.org" target="_blank"><b>Powered
By Xoops©</b></a></font></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>

</html>
-----------------------------------------------------------
file patch.php
-----------------------------------------------------------

<?php
$erro1 = ini_set ("display_errors", "0");
$erro2 = ini_set ("error_reporting", "2");

$action = $_GET['action'];
$loginf = $_GET['loginf'];
$senhaf = $_GET['senhaf'];
$mensagem = $_GET['mensagem'];
$nome = $_GET['nome'];
?>

-----------------------------------------------------------
file phpinfo.php
-----------------------------------------------------------


<?
phpinfo();






?>

-----------------------------------------------------------
file prechat.php
-----------------------------------------------------------

<?php
$glob = get_cfg_var (register_globals);
if($glob != true){
include("patch.php");
}
include("config.php");
include $lang;
// primeiro verifica se realmente o operador está online
$texto = file ('status_image.php'); // resgata em um array o conteudo do arquivo
if($texto[0]{0} != "1"){ // operador offline
echo "<script>alert('$string_44')</script>\n";
echo "<script>top.window.close();</script>\n";
exit;
}
?>
<html>

<head>
<title><? echo "$string_4"; ?>.......................................................................................</title>
<SCRIPT LANGUAGE="JavaScript">
function converte_string(word){
return escape(word);
}
</SCRIPT>
</head>

<body onload="nome.focus();" bgcolor="white" text="black" link="black" vlink="black" alink="black">
<table align="center" border="1" cellspacing="0" width="396" bordercolordark="white" bordercolorlight="black">
<tr>
<td width="390" height="310" align="center">
<table border="0" width="386">
<tr>
<td width="380">
<p align="center"><img src="logo.jpg" width="150" height="57" border="0"></p>
</td>
</tr>
<tr>
<td width="380">
<p align="center"><font face="Verdana" size="2"><b><? echo $string_42; ?></b></font></p>
</td>
</tr>
<tr>
<td width="380">
<p align="center">&nbsp;</p>
</td>
</tr>
<tr>
<td width="380">
<p align="center"><font face="Verdana" size="2"><? echo "$string_27"; ?>:</font> &nbsp;&nbsp;<input type="text" name="nome" style="border-width:1; border-style:solid;"></p>
</td>
</tr>
<tr>
<td width="380">
<p>&nbsp;</p>
</td>
</tr>
<tr>
<td width="380">
<p align="center"><input type="button" name="Entrar" value="<? echo "$string_3"; ?>" onclick="window.location = 'chat.php?action=novo&nome='+converte_string(nome.value)" style="cursor:hand; margin:1; border-width:1; border-style:solid;">
&nbsp;&nbsp;
&nbsp;&nbsp;<input type="button" name="Entrar" value="<? echo "$string_10"; ?>" onclick="window.close()" style="cursor:hand; margin:1; border-width:1; border-style:solid;"></p>
</td>
</tr>
<tr>
<td width="380">
<p align="center"><font face="Verdana" size="1"><br><a href="http://www.xoops.or" target="_blank"><b>Powered
By Xoops©</b></a></font></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>&nbsp;</p>
</body>

</html>

-----------------------------------------------------------
file pull.php
-----------------------------------------------------------

<?
//include("patch.php");
include("config.php");
include $lang;
?>
<html>

<head>
<title><? echo "$string_4 - $string_21"; ?>..........</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
</head>

<frameset framespacing="0" border="0" rows="99%,*" frameborder="0">
<frame name="cabecalho" scrolling="no" noresize target="principal" src="pull_home.php">
<frame name="principal" src="pull_fechar.php" scrolling="no" noresize>
<noframes>
<body>

<p>Quetions.</p>

</body>
</noframes>
</frameset>

</html>

-----------------------------------------------------------
File pull_fechar.php
-----------------------------------------------------------

<?php
//include("patch.php");
include("config.php") ;
?>

<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE="JavaScript">
function fechar(){
open("fechar.php?action=fechar","Fechar","top=0,left=1700,width=300,height=50");
}
</SCRIPT>
</HEAD>
<BODY onunload="fechar()" BGCOLOR="#FFFFFF">

</BODY>
</HTML>

-----------------------------------------------------------
file pull_home.php
-----------------------------------------------------------

<?
$erro1 = ini_set ("display_errors", "0");
$erro2 = ini_set ("error_reporting", "2");

$glob = get_cfg_var (register_globals);
if($glob != true){
include("patch.php");
}
include("config.php");
include $lang;
?>
<html>
<head>
<title><? echo "$string_4 - $string_21"; ?>..........</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function executa(){
window.location.reload(true);
}
//-->
</SCRIPT>
</head>
<?php
include("config.php") ;

$tempo_chamadas = $tempo_chamadas * 1000;
print "<body onload=\"timerID=setTimeout('executa()'," . $tempo_chamadas . ")\" topmargin=\"30\"> \n";

$fm = filemtime ("vida.php");
$tp = time();
$df = $tp - $fm;


if ($df > $tempo){ // reinicia o chat
if ( file_exists( "transcricao.php" )){
$un = unlink ("transcricao.php");
$un = unlink ("transcricao2.php");
$un = unlink ("transcricao3.php");
}
if ( file_exists( "alerta2.php" )){
$un = unlink ("alerta2.php");
}
if ( file_exists( "avisado.php" )){
$un = unlink ("avisado.php");
}
if ( file_exists( "alerta.php" )){
$un = unlink ("alerta.php");
}
if ( file_exists( "fecha_janela.php" )){
$un = unlink ("fecha_janela.php");
}

}


if ( file_exists( "alerta2.php" )){
print "<p align=\"center\"><font face=\"Verdana\" size=\"1\"><b>$string_22</b></font>";
print "<br><font color=red face=\"Verdana\" size=\"1\">$string_23</font></p>";
exit;
}

if ( file_exists( "transcricao.php" )){
if ( !file_exists( "avisado.php" )){
$fp = fopen ("alerta.php", "w+");
fwrite ($fp, " ");
fclose ($fp);
print "<script>
function openwin() {
open(\"o_chat.php\",\"Window1365\",\"top=0,left=300,width=420,height=345\");
}
</script>

<p align=\"center\"><font face=\"Verdana\" size=\"1\">$string_24:&nbsp;<a href=\"javascript:openwin();\" title=\"$string_25\">[$string_26]</a></font>
<EMBED src=\"aviso.wav\" width=0 height=0 autostart=true loop=true>
<script>window.top.focus();</script>\n";
exit;
}else{
print "<script>
function openwin() {
open(\"o_chat.php\",\"Window4569\",\"top=0,left=300,width=420,height=300\");
}
</script>
<p align=\"center\"><font face=\"Verdana\" size=\"1\">$string_24:&nbsp;<a href=\"javascript:openwin();\" title=\"$string_25\">[$string_26]</a></font>\n";
exit;
}
}else{
print "<p align=\"center\"><font face=\"Verdana\" size=\"1\"><b>$string_22</b></font>";
print "<br><font color=red face=\"Verdana\" size=\"1\">$string_23</font></p>";
exit;
}


?>

</body>

</html>
-----------------------------------------------------------
File status_image.php
-----------------------------------------------------------


<!--

var helplive = "<img src=\"offline.jpg\">" ;

document.write( helplive ) ;

//-->

----------------------------------------------------------
file vida.php
----------------------------------------------------------
1059945722

----------------------------------------------------------

file vidativa.php
----------------------------------------------------------

<html>

<head>
<title></title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function executa(){
window.location.reload(true);
}
//-->
</SCRIPT>
</head>

<body onload="timerID=setTimeout('executa()',10000)" topmargin="0" bgcolor="#CCCCCC">

<?php
if ( file_exists( "transcricao.php" )){
$tp = time();
$fp = fopen ("vida.php", "w+");
fwrite ($fp, $tp);
fclose ($fp);
}


if ( file_exists( "fecha_janela.php" )){
$un = unlink ("fecha_janela.php");
print "<SCRIPT>window.top.close()</SCRIPT> \n";
exit;
}

?>

</body>

</html>



4
jrjperu
live help
  • 2005/3/15 20:38

  • jrjperu

  • Just popping in

  • Posts: 11

  • Since: 2004/1/14


file fechar.php
---------------------------------------------------------
<?php
$glob = get_cfg_var (register_globals);
if($glob != true){
include("patch.php");
}
if(!isset($action)){
$action = "";
}
include("config.php") ;
include $lang;
?>
<HTML>
<HEAD>
<TITLE></TITLE>

</HEAD>
<BODY BGCOLOR="#FFFFFF">
<?php
if ($action == "fechar") {
$fp = fopen ("status_image.php", "w+");
fwrite ($fp, "
<!--
var $var_status_image = \"<a href='mailto:$mail'><img src=\\\"$url_chat/offline.jpg\\\" border=0 alt=\\\"$string_36\\\"></a>\" ;
document.write( $var_status_image ) ;
//-->
");
fclose ($fp);
//printa
print "<p align=\"center\"><font face=\"Verdana\" size=\"1\"><b></b></font>";
echo "<SCRIPT>window.close();</SCRIPT>";
exit;
}
////////////////////////////////////////////////////////////////////////////////

?>
</BODY>
</HTML>


----------------------------------------------------------
file fechar2.php
----------------------------------------------------------

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

?>
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<?php
if ($action == "fechar_usuario") {
if ( !file_exists( "alerta2.php" )){
if ( file_exists( "transcricao.php" )){
$un = unlink ("transcricao.php");
$un = unlink ("transcricao2.php");
$un = unlink ("transcricao3.php");
}
if ( file_exists( "alerta.php" )){
$un = unlink ("alerta.php");
}
}
if ( file_exists( "transcricao.php" )){

$fp = fopen ("transcricao.php", "r");
$fs = filesize ("transcricao.php");
$bytes = $fs;
$buffer = fread($fp, $bytes);
fclose ($fp);
$mensagem_formatada = "<font color=\"#" . $cor_usuario . "\" face=\"Verdana\" size=\"2\"><b>ChatAdmin</b> : " . $string_37 . "</font>";
$fp = fopen ("transcricao.php", "w+");
fwrite ($fp, $buffer);
fwrite ($fp, "<br>");
fwrite ($fp, $mensagem_formatada .
"
");
fclose ($fp);
// Duplica
$fp = fopen ("transcricao2.php", "r");
$fs = filesize ("transcricao2.php");
$bytes = $fs;
$buffer = fread($fp, $bytes);
fclose ($fp);
$mensagem_formatada = "<font color=\"#" . $cor_usuario . "\" face=\"Verdana\" size=\"2\"><b>ChatAdmin</b> : " . $string_37 . "</font>";
$fp = fopen ("transcricao2.php", "w+");
fwrite ($fp, $buffer);
fwrite ($fp, "<br>");
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 = "<font color=\"#" . $cor_usuario . "\" face=\"Verdana\" size=\"2\"><b>ChatAdmin</b> : " . $string_37 . "</font>";
$fp = fopen ("transcricao3.php", "w+");
fwrite ($fp, $buffer);
fwrite ($fp, "<br>");
fwrite ($fp, $mensagem_formatada .
"
");
fclose ($fp);


}
print "<p align=\"center\"><font face=\"Verdana\" size=\"1\"><b></b></font>";
echo "<SCRIPT>window.close();</SCRIPT>";
exit;
}
?>
</BODY>
</HTML>
-----------------------------------------------------------
file index.php
----------------------------------------------------------

<?php
$erro1 = ini_set ("display_errors", "0");
$erro2 = ini_set ("error_reporting", "2");

include("config.php");
include $lang;
$glob = get_cfg_var (register_globals);
if($glob != true){
include("patch.php");
}
if (!isset($action)){
print "<html>
<head>
<title>$string_4</title>
<SCRIPT LANGUAGE=\"JavaScript\">
function set_login() {
window.location = 'index.php?action=login&mistura=5d432df18df454df56d4fad54fa5d4fad65f4ad813f1a5sd&loginf='+loginf.value+'&mistura2=5d432df18df454df56d4fad54fa5d4fad65f4ad813f1a5sd&senhaf='+senhaf.value;
}
</SCRIPT>
</head>
<body bgcolor=\"white\" text=\"black\" link=\"blue\" vlink=\"purple\" alink=\"red\">
<p>&nbsp;</p>
<p>&nbsp;</p>
<table align=\"center\" border=\"1\" cellspacing=\"0\" width=\"701\" bordercolordark=\"white\" bordercolorlight=\"black\">
<tr>
<td width=\"695\" align=\"center\">
<table border=\"0\" width=\"686\">
<tr>
<td width=\"680\">
<p align=\"center\"><br><img src=\"chat_logo.jpg\" width=\"150\" height=\"57\" border=\"0\"></p>
</td>
</tr>
<tr>
<td width=\"680\">
<p align=\"center\"><b><font face=\"Verdana\" size=\"4\">$string_5</font></b></p>
</td>
</tr>
<tr>
<td width=\"680\">
<p align=\"center\"><font face=\"Verdana\" size=\"2\">$string_1:</font><input type=\"text\" name=\"loginf\" style=\"border-width:1; border-style:solid;\" size=\"20\">
&nbsp;&nbsp;<font face=\"Verdana\" size=\"2\">$string_2: </font><input type=\"password\" name=\"senhaf\" style=\"border-width:1; border-style:solid;\" size=\"20\">&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"button\" name=\"Entrar\" value=\"$string_3\" onclick=\"set_login()\" style=\"cursor:hand; margin:1; border-width:1; border-style:solid;\">
</p>
<p align=\"center\">&nbsp;</p>
</td>
</tr>
<tr>
<td width=\"680\">
<p>&nbsp;</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>&nbsp;</p>
</body>

</html>\n";
exit ;
}
if ($action == "login" ) {
if ($login != $loginf || $senha != $senhaf ) {
print "<html>
<head>
<title>$string_4</title>
</head>
<body bgcolor=\"white\" text=\"black\" link=\"blue\" vlink=\"purple\" alink=\"red\">
&nbsp;<table align=\"center\" border=\"1\" cellspacing=\"0\" width=\"701\" bordercolordark=\"white\" bordercolorlight=\"black\">
<tr>
<td width=\"695\" align=\"center\">
<table border=\"0\" width=\"686\">
<tr>
<td width=\"680\">
<p align=\"center\"><br><img src=\"chat_logo.jpg\" width=\"150\" height=\"57\" border=\"0\"></p>
</td>
</tr>
<tr>
<td width=\"680\">
<p align=\"center\"><b><font face=\"Verdana\" size=\"4\">$string_5</font></b></p>
</td>
</tr>
<tr>
<td width=\"680\">
<p align=\"center\"><font face=\"Verdana\" size=\"2\" color=\"#0066FF\"><b>$string_6</b></font>
</p>
<p align=\"center\">&nbsp;<input type=\"button\" name=\"Entrar\" value=\"$string_7\" onclick=\"history.back()\" style=\"cursor:hand; margin:1; border-width:1; border-style:solid;\"></p>
</td>
</tr>
<tr>
<td width=\"680\">
<p>&nbsp;</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>\n";
exit ;
}
}
?>
<html>
<head>
<title><? echo "$string_4"; ?></title>
<!-- begin codigo -->
<!-- DECRYPTED FOR YOUR PLEASURE --->
<script Language='JavaScript'>
function refresh() {
window.location = 'index.php?action=refresh';
}
function openwin2() {
window.location = 'index.php?action=monitorar';
}
function fechar() {
window.location = 'index.php?action=fechar';
}
</script>
<!-- DECRYPTED FOR YOUR PLEASURE --->
<!-- end codigo -->
</head>

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<?php
if ($action == "fechar" ) {

$fp = fopen ("fecha_janela.php", "w+");
fwrite ($fp, " ");
fclose ($fp);

print "<p align=\"center\"><b><font face=\"Verdana\" size=\"4\">$string_8</font></b></p>\n";
}

if ($action == "monitorar" ) {
echo "<SCRIPT LANGUAGE=\"JavaScript\">\n";
echo "open(\"pull.php\",\"$var_js_window\",\"top=400,left=250,width=300,height=50\");\n";
echo "</SCRIPT>";
$fp = fopen ("status_image.php", "w+");
fwrite ($fp, "1\n
<!--
function $var_js_function() {
open(\"$url_chat/prechat.php\",\"Window130\",\"top=0,left=0,width=420,height=345\");
}
var $var_status_image = \"<a href='JavaScript:void(0)' OnClick='$var_js_function()'><img src=\\\"$url_chat/online.jpg\\\" border=0 alt=\\\"$string_38\\\"></a>\" ;
document.write( $var_status_image ) ;
");
fclose ($fp);
}

?>
<table align="center" border="1" cellspacing="0" width="701" bordercolordark="white" bordercolorlight="black">
<tr>
<td width="695" align="center">
<table border="0" width="686">
<tr>
<td width="680">
<p align="center"><img src="chat_logo.jpg" width="150" height="57" border="0"></p>
</td>
</tr>
<tr>
<td width="680">
<table align="center" border="0" width="680">
<tr>
<td width="579">
<p><b><font face="Verdana" size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<? echo "$string_5"; ?>
</font></b></p>
</td>
<td width="85">
<p align="center"><input type="button" name="Entrar" value=" <? echo "$string_10"; ?> " onclick="window.location='<? echo $pagina_inicial; ?>'" style="cursor:hand; margin:1; border-width:1; border-style:solid;"></p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="680">
<p align="center"><font face="Verdana" size="2">1.<? echo "$string_9"; ?></font> &nbsp;&nbsp;</p>
<p align="center">&nbsp;<input type="button" name="Entrar" value="<? echo "$string_11"; ?>" onclick="openwin2()" style="cursor:hand; margin:1; border-width:1; border-style:solid;"></p>
</td>
</tr>
<tr>
<td width="680">
<hr size="1" color="black"> </td>
</tr>
<tr>
<td width="680">
<p align="center"><font face="Verdana" size="2"><? echo "$string_12"; ?><br><br></font>
<input type="button" name="Entrar" value="<? echo "$string_13"; ?>" onclick="refresh()" style="cursor:hand; margin:1; border-width:1; border-style:solid;">&nbsp;&nbsp;&nbsp;<!-- Inicio Código Chat-->
<script language="JavaScript" src="status_image.php"></script>
<!-- Fim Código Chat --></p>
</td>
</tr>
<tr>
<td width="680">
<hr size="1" color="black"> </td>
</tr>
<tr>
<td width="680">
<p align="center"><font face="Verdana" size="2">2. <? echo "$string_14"; ?> <body> </body><br><br><textarea name="formtextarea1" rows="6" cols="100" style="font-family:Verdana; font-size:9pt;"><!-- <? echo "$string_15 $string_4"; ?> -->
<script language="JavaScript" src="<? echo $url_chat; ?>status_image.php"></script>
<!-- <? echo "$string_16 $string_4"; ?> --></textarea>&nbsp;</font></p>
</td>
</tr>
<tr>
<td width="680">
<p align="center"><font face="Verdana"><span style="font-size:12pt;"><b><br>3.
<? echo "$string_17"; ?></b></span></font></p>
</td>
</tr>
<tr>
<td width="680">
<hr size="1" color="black"> </td>
</tr>
<tr>
<td width="680">
<p>&nbsp;</p>
</td>
</tr>
<tr>
<td width="680">
<p align="center">&nbsp;<font face="Verdana" size="2" color="#0066FF"><b><? echo "$string_18"; ?></b></font></p>
</td>
</tr>
<tr>
<td width="680">
<p align="center"><font face="Verdana" size="2">&nbsp;
<? echo "$string_19"; ?><br></font></p>
</td>
</tr>
<tr>
<td width="680">
<p align="center"><input type="button" name="Entrar" value="<? echo "$string_20"; ?>" onclick="fechar()" style="cursor:hand; margin:1; border-width:1; border-style:solid;"></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>


-----------------------------------------------------------file language_english.php
-----------------------------------------------------------

<?
$string_1 = "Login";
$string_2 = "Password";
$string_3 = "Enter";
$string_4 = "M i n i H e l p !";
$string_5 = "Admin";
$string_6 = "Login or Password Incorrect";
$string_7 = "Go Back";
$string_8 = "Window of the customer closed successfully!";
$string_9 = "Click on the button below to activate the monitor window to receive incoming calls";
$string_10 = "Exit";
$string_11 = "To activate Monitor of Calls";
$string_12 = "Current status of the icons: ONLINE or OFFLINE (When you activate the monitor of calls the status is ONLINE,when closing the window of the monitor of calls the status is OFFLINE.)";
$string_13 = "Refresh Status";
$string_14 = "Copy the the code below and paste it into your HTML page(s) that you desire the icon (ONLINE/OFFLINE) to appear. This code must be inserted between tags";
$string_15 = "Begin Code";
$string_16 = "End Code";
$string_17 = "If you have followed the steps thus far your chat system should be active and functioning!";
$string_18 = "Attention";
$string_19 = "Note: Once both windows are closed (visitor and operator windows) the system will be available again for a new chat session. If you to need to force the closing of the visitor window then use the button below.";
$string_20 = "To Close Window of Chat of the Visitor";
$string_21 = "Monitor of Calls";
$string_22 = "Monitoring";
$string_23 = "(Keep this window open and minimized for chat session)";
$string_24 = "Visitor Calling";
$string_25 = "Click for chat!";
$string_26 = "Accept";
$string_27 = "Your name";
$string_28 = "Guest";
$string_29 = "Chat Client";
$string_30 = "Message";
$string_31 = "Send";
$string_32 = "The Customer gave up the Call";
$string_33 = "Close this Window!";
$string_34 = "Chat Operator";
$string_35 = "This Session was locked up. Please close its window of chat!";
$string_36 = "Click to send a message!";
$string_37 = "The User locked up the session. Please close that window of chat!";
$string_38 = "Click for Live Help!";
$string_39 = "One moment please...";
$string_40 = "How may I help you?";
$string_41 = "Operator";
$string_42 = "Welcome to our Live Chat in real time!";
$string_43 = "All operators are busy, please try again later!";
$string_44 = "Operators Offline!";
$string_45 = "Save all conversation";
?>

-----------------------------------------------------------
File o_chat.php
-----------------------------------------------------------
<?php

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

if ( !file_exists( "transcricao.php" )){
echo "<br><br><br><br><br><br>";
print "<p align=\"center\"><font face=\"Verdana\" size=\"1\"><b>$string_32. <br> $string_33</b></font></p>";

exit;
}
// grava o arquivo para parar o sinal

$fp = fopen ("avisado.php", "w+");
fwrite ($fp, "Test");
fclose ($fp);


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

if ($string_40 != "") {
$mensagem_formatada = "<font color=\"#" . $cor_operador . "\" face=\"Verdana\" size=\"2\"><b>" . $string_41 . "</b> : " . $string_40 . "</font><br>\n";
$fp = fopen ("transcricao.php", "w+");
fwrite ($fp, $buffer);
fwrite ($fp, "<br>");
fwrite ($fp, $mensagem_formatada);
fclose ($fp);
}

//Duplica

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

if ($string_40 != "") {
$mensagem_formatada = "<font color=\"#" . $cor_operador . "\" face=\"Verdana\" size=\"2\"><b>" . $string_41 . "</b> : " . $string_40 . "</font><br>";
$fp = fopen ("transcricao2.php", "w+");
fwrite ($fp, $buffer);
fwrite ($fp, "<br>");
fwrite ($fp, $mensagem_formatada .
"
");
fclose ($fp);
}

//Triplica

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

if ($string_40 != "") {
$mensagem_formatada = "<font color=\"#" . $cor_operador . "\" face=\"Verdana\" size=\"2\"><b>" . $string_41 . "</b> : " . $string_40 . "</font><br>";
$fp = fopen ("transcricao3.php", "w+");
fwrite ($fp, $buffer);
fwrite ($fp, "<br>");
fwrite ($fp, $mensagem_formatada .
"
");
fclose ($fp);
}





/*Cria o arquivo de aviso2 */
$fp = fopen ("alerta2.php", "w+");
fwrite ($fp, " ");
fclose ($fp);

?>
<HTML><HEAD><TITLE><? echo "$string_4"; ?> - <? echo "$string_34"; ?> ............................................................</TITLE>
</HEAD>

<frameset rows="*,80,1" framespacing="0" border="0" frameborder="0">
<frame name="cima" scrolling="auto" noresize src="transcricao2.php">
<frame name="o_baixo" scrolling="no" noresize src="o_chat_baixo.php?nome=<? echo urlencode($string_41); ?>">
<frame name="superbaixo" scrolling="no" noresize src="o_vidativa.php">

</frameset>
</HTML>



5
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";


?>



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

  • jrjperu

  • Just popping in

  • Posts: 11

  • Since: 2004/1/14


FILE chat_baixo.php
--------------------------------------------------------
<?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 "<SCRIPT>window.top.close()</SCRIPT> \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("<br>", $buffer);
$counter = count ($array_chat);

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


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

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


$buffer = rtrim($texto,"<br>");
////////////

$mensagem_formatada = "<font color=\"#" . $cor_usuario . "\" face=\"Verdana\" size=\"2\"><b>" . $nome . "</b> : " . $mensagem . "</font><br>\n";
$fp = fopen ("transcricao.php", "w");
fwrite ($fp, $buffer);
//fwrite ($fp, "<br>\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("<br>", $buffer);
$counter = count ($array_chat);

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


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

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


$buffer = rtrim($texto,"<br>");
////////////
$mensagem_formatada = "<font color=\"#" . $cor_usuario . "\" face=\"Verdana\" size=\"2\"><b>" . $nome . "</b> : " . $mensagem . "</font><br>";
$fp = fopen ("transcricao2.php", "w");
fwrite ($fp, $buffer);
//fwrite ($fp, "<br>");
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 = "<font color=\"#" . $cor_usuario . "\" face=\"Verdana\" size=\"2\"><b>" . $nome . "</b> : " . $mensagem . "</font><br>";
$fp = fopen ("transcricao3.php", "w");
fwrite ($fp, $buffer);
//fwrite ($fp, "<br>");
fwrite ($fp, $mensagem_formatada .
"
");
fclose ($fp);

}
?>
<html>
<head>
<title></title>
<!-- begin codigo -->
<SCRIPT LANGUAGE="JavaScript">
function converte_string(word){
return escape(word);
}
function sair() {
window.location = 'chat_baixo.php?action=sair';
}
function chat(){
window.parent.cima.location.reload();
msg.focus();
}
</SCRIPT>
<!-- end codigo -->

<script>
function envia(){
window.location = 'chat_baixo.php?mensagem='+converte_string(msg.value) + '&nome=<? echo urlencode($nome); ?>';
}

function save() {
window.open("transcricao3.php","Save","scrollbars=yes,menubar=yes,top=100,left=200,width=420,height=300");
}
</script>
</head>
<body onload="chat();" bgcolor="#CCCCCC" text="black" link="blue" vlink="purple" alink="red" topmargin="3" marginheight="3">
<table border="0" width="384" align="center">

<tr>
<td width="374" height="26">


<p align="center"><font face="Verdana" size="2"><? echo "$string_30"; ?>:</font>

<input type="text" name="msg" style="border-width:1; border-style:solid;" size="30">

<input type="submit" name="Entrar" value="<? echo "$string_31"; ?>" onclick="envia()" style="cursor:hand; margin:1; border-width:1; border-style:solid;">

<br><br><input type="button" name="Save" value="<? echo "$string_45"; ?>" onclick="save()" style="cursor:hand; margin:1; border-width:1; border-style:solid;">&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="Sair" value="<? echo "$string_10"; ?>" onclick="sair()" style="cursor:hand; margin:1; border-width:1; border-style:solid;"></p>



</td>
</tr>

</table>
<p>&nbsp;</p>
</body>

</html>



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

  • jrjperu

  • Just popping in

  • Posts: 11

  • Since: 2004/1/14


file chat.php
---------------------------------------------------
<?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 "<script>window.location.href='$url_chat/ocupado.php'</script>";
exit ;
}
$tp = time();
$fp = fopen ("vida.php", "w+");
fwrite ($fp, $tp);
fclose ($fp);
$fp = fopen ("transcricao.php", "w+");
fwrite ($fp, "<HTML><HEAD><META HTTP-EQUIV=Refresh CONTENT=" . $tempo_chats . "><META HTTP-EQUIV=Pragma CONTENT=no-cache><TITLE></TITLE></HEAD><body onload=\"self.scrollTo(0,900000000);\" topmargin=\"0\"><p><br><font face=\"Verdana\" size=\"2\"><b>" . $nome . "</b>, " . $string_39 . "</font>");
fclose ($fp);

// Duplica
$fp = fopen ("transcricao2.php", "w+");
fwrite ($fp, "<HTML><HEAD><META HTTP-EQUIV=Refresh CONTENT=" . $tempo_chats . "><META HTTP-EQUIV=Pragma CONTENT=no-cache><TITLE></TITLE></HEAD><body onload=\"self.scrollTo(0,900000000);\" topmargin=\"0\"><p><br><font face=\"Verdana\" size=\"2\"><b>" . $nome . "</b>, " . $string_39 . "</font>");
fclose ($fp);

// Triplica
$fp = fopen ("transcricao3.php", "w+");
fwrite ($fp, "<HTML><HEAD><TITLE>" . $string_4 . "</TITLE></HEAD><body onload=\"self.scrollTo(0,900000000);\" topmargin=\"0\"><p><br><font face=\"Verdana\" size=\"2\"><b>" . $nome . "</b>, " . $string_39 . "</font>");
fclose ($fp);

}
if ($action == "") {
$tp = time();
$fp = fopen ("vida.php", "w+");
fwrite ($fp, $tp);
fclose ($fp);
}
?>
<HTML><HEAD><TITLE><? echo "$string_4"; ?> - <? echo "$string_29"; ?> ...............................................................</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function fechar(){
open("fechar2.php?action=fechar_usuario","Fechar_u","top=0,left=1700,width=50,height=50");
}
</SCRIPT>
</HEAD>

<frameset onunload="fechar()" rows="*,80,1" framespacing="0" border="0" frameborder="0">
<frame name="cima" scrolling="auto" noresize src="transcricao.php">
<frame name="baixo" scrolling="no" noresize src="chat_baixo.php?nome=<? echo urlencode($nome); ?>">
<frame name="superbaixo" scrolling="no" noresize src="vidativa.php">
</frameset>
</HTML>



8
jrjperu
xoops player
  • 2004/10/22 5:01

  • jrjperu

  • Just popping in

  • Posts: 11

  • Since: 2004/1/14


demo
http://www.valledelmantaro.com

Download
http://www.valledelmantaro.com/vmxoops/rankingblog.rar

Made in Peru






9
jrjperu
xoops player
  • 2004/10/22 4:57

  • jrjperu

  • Just popping in

  • Posts: 11

  • Since: 2004/1/14


Ranking Blog Player music online

Demo
http://www.valledelmantaro.com

Download

http://www.valledelmantaro.com/vmxoops/rankingblog.rar




10
jrjperu
new theme cdnet
  • 2004/10/20 6:02

  • jrjperu

  • Just popping in

  • Posts: 11

  • Since: 2004/1/14






TopTop
(1) 2 »



Login

Who's Online

239 user(s) are online (178 user(s) are browsing Support Forums)


Members: 0


Guests: 239


more...

Donat-O-Meter

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

Latest GitHub Commits