Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

_Juliana_

Sistema de suporte - Chat

Recommended Posts

Tem um sistema de suporte funcionando perfeitamente, mas ele não apaga as conversas anteriores, nem armazena o suporte, por cliente, em um BD.Alguém sabe me dar uma idéia do que fazer?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Tem um sistema de suporte funcionando perfeitamente, mas ele não apaga as conversas anteriores, nem armazena o suporte, por cliente, em um BD.Alguém sabe me dar uma idéia do que fazer?

Doce _Juliana_,Poderias ser mais clara em vosso questionamento!Queres ajuda para alterar o sistema existente?você têm os fontes do sistema?No aguardo!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Querido jothaz,Esse é o fonte da página que quero alterar:

<!--#include file="common.asp" --><%Dim usrID			'Holds logged in users IDDim Username		'Holds logged in usernameDim addpass		'Holds admin passwordDim login			'Holds the value of the event either login or emptyDim rs			'New folha de registrousrID = CLng(Request.querystring("ID"))username = Request.querystring("username")addpass = Request.querystring ("addpass")login = Request.querystring ("event")%><%	'If the query string login is login then user has just eneterd IF login = "login" AND addpass <> strAdminPass THEN%><%'Open a new connection to the databaseadoCon.Open cString'Create new SQL stringstrSQL= "SELECT tblChat.RoomID, tblChat.Speaker, tblChat.Speach FROM tblChat;"'Create a new folha de registroset rs=server.CreateObject("ADODB.Recordset")'Set cursor and locktypesRs.CursorType = 2Rs.LockType = 3'Open folha de registro, execute SQL stringrs.open strSQL,adoCon,3,3'Add a new recordrs.AddNew'Set the roomID to the users IDrs.fields("RoomID")=usrID'Set the speakers field to blankrs.fields("Speaker")=""'Set the speach field to the welcome messagers.fields("Speach")="<Center><font color=blue><b>"&strTxtWelcome2&" "&Username&", "&strTxtPleaseWait&"</b></font></center>"'Updaters.Update'Close and cleanrs.CloseadoCon.close'Redirect back to ths page but witout the login eventResponse.redirect("chat_main.asp?ID="&usrID&"&addpass="&addpass&"&username="&username)%><% ELSE%><%END IF%><HTML>	<head><!--#include file="style/style.asp" --><script language="JavaScript">var countDownInterval=<%=intRefreshRate%>;var c_reloadwidth=200</script><ilayer id="c_reload" width=&{c_reloadwidth}; ><layer id="c_reload2" width=&{c_reloadwidth}; left=0 top=0></layer></ilayer><script>var countDownTime=countDownInterval+1;function countDown(){countDownTime--;if (countDownTime <=0){countDownTime=countDownInterval;clearTimeout(counter)window.location.reload()return}if (document.all)document.all.countDownText.innerText = countDownTime+" ";else if (document.getElementById)document.getElementById("countDownText").innerHTML=countDownTime+" "else if (document.layers){ document.c_reload.document.c_reload2.document.write('<table  width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="hidden"><b id="countDownText">'+countDownTime+'</b></td></tr></table>')document.c_reload.document.c_reload2.document.close()}counter=setTimeout("countDown()", 1000);}function startit(){if (document.all||document.getElementById)document.write('<table  width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="hidden"><b id="countDownText">'+countDownTime+'</b></td></tr></table>')countDown()}if (document.all||document.getElementById)startit()elsewindow.onload=startit</script>	</head><body marginheight="0" marginwidth="0" topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0" ><table  width="100%" border="0" cellspacing="0" cellpadding="0">	<tr>		<td width="10"></td>		<td>					<%'Open a new connection to the databaseadoCon.Open cString'Create a new SQL stringstrSQL="SELECT * FROM tblChat WHERE RoomID="&usrID&" ORDER BY ID DESC"'Create a new folha de registroset rs=server.CreateObject("ADODB.Recordset")'Open the folha de registro and SQL stringrs.open strSQL,adoCon,3,3'Loop until the folha de registro is empty only printing ones where room ID equals current IDDo While not rs.EOF%><b> <% Response.Write (rs("Speaker")) %> </b><% Response.Write (rs("Speach"))%><BR><%     'Move to the next record in the recordset     rs.MoveNext'Loop eventLoop 'Close and cleanrs.CloseSet rs = NothingadoCon.close%>									</td>			</tr>		</table></body>

Quero que tenha algo nesse código que apague conversas anteriores mas armazene em um BD (ACCESS).

Compartilhar este post


Link para o post
Compartilhar em outros sites

Querido jothaz,Esse é o fonte da página que quero alterar:

<!--#include file="common.asp" --><%Dim usrID			'Holds logged in users IDDim Username		'Holds logged in usernameDim addpass		'Holds admin passwordDim login			'Holds the value of the event either login or emptyDim rs			'New folha de registrousrID = CLng(Request.querystring("ID"))username = Request.querystring("username")addpass = Request.querystring ("addpass")login = Request.querystring ("event")%><%	'If the query string login is login then user has just eneterd IF login = "login" AND addpass <> strAdminPass THEN%><%'Open a new connection to the databaseadoCon.Open cString'Create new SQL stringstrSQL= "SELECT tblChat.RoomID, tblChat.Speaker, tblChat.Speach FROM tblChat;"'Create a new folha de registroset rs=server.CreateObject("ADODB.Recordset")'Set cursor and locktypesRs.CursorType = 2Rs.LockType = 3'Open folha de registro, execute SQL stringrs.open strSQL,adoCon,3,3'Add a new recordrs.AddNew'Set the roomID to the users IDrs.fields("RoomID")=usrID'Set the speakers field to blankrs.fields("Speaker")=""'Set the speach field to the welcome messagers.fields("Speach")="<Center><font color=blue><b>"&strTxtWelcome2&" "&Username&", "&strTxtPleaseWait&"</b></font></center>"'Updaters.Update'Close and cleanrs.CloseadoCon.close'Redirect back to ths page but witout the login eventResponse.redirect("chat_main.asp?ID="&usrID&"&addpass="&addpass&"&username="&username)%><% ELSE%><%END IF%><HTML>	<head><!--#include file="style/style.asp" --><script language="JavaScript">var countDownInterval=<%=intRefreshRate%>;var c_reloadwidth=200</script><ilayer id="c_reload" width=&{c_reloadwidth}; ><layer id="c_reload2" width=&{c_reloadwidth}; left=0 top=0></layer></ilayer><script>var countDownTime=countDownInterval+1;function countDown(){countDownTime--;if (countDownTime <=0){countDownTime=countDownInterval;clearTimeout(counter)window.location.reload()return}if (document.all)document.all.countDownText.innerText = countDownTime+" ";else if (document.getElementById)document.getElementById("countDownText").innerHTML=countDownTime+" "else if (document.layers){ document.c_reload.document.c_reload2.document.write('<table  width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="hidden"><b id="countDownText">'+countDownTime+'</b></td></tr></table>')document.c_reload.document.c_reload2.document.close()}counter=setTimeout("countDown()", 1000);}function startit(){if (document.all||document.getElementById)document.write('<table  width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="hidden"><b id="countDownText">'+countDownTime+'</b></td></tr></table>')countDown()}if (document.all||document.getElementById)startit()elsewindow.onload=startit</script>	</head><body marginheight="0" marginwidth="0" topmargin="0" rightmargin="0" bottommargin="0" leftmargin="0" ><table  width="100%" border="0" cellspacing="0" cellpadding="0">	<tr>		<td width="10"></td>		<td>					<%'Open a new connection to the databaseadoCon.Open cString'Create a new SQL stringstrSQL="SELECT * FROM tblChat WHERE RoomID="&usrID&" ORDER BY ID DESC"'Create a new folha de registroset rs=server.CreateObject("ADODB.Recordset")'Open the folha de registro and SQL stringrs.open strSQL,adoCon,3,3'Loop until the folha de registro is empty only printing ones where room ID equals current IDDo While not rs.EOF%><b> <% Response.Write (rs("Speaker")) %> </b><% Response.Write (rs("Speach"))%><BR><%     'Move to the next record in the recordset     rs.MoveNext'Loop eventLoop 'Close and cleanrs.CloseSet rs = NothingadoCon.close%>									</td>			</tr>		</table></body>
Quero que tenha algo nesse código que apague conversas anteriores mas armazene em um BD (ACCESS).
Bom agora ficou mais claro que se trata do 13º trabalho de Hérules!! http://forum.imasters.com.br/public/style_emoticons/default/natal_biggrin.gif Vou analisar o código e verei o que posso sugerir. Isto vai demorar um pouco mas assim que teiver um idéia post aqui.t+

Compartilhar este post


Link para o post
Compartilhar em outros sites

Aí, meu chefe deu umas dicas mas não entendi bem...Usar variável de sessão, e uma id aleatória (tipo um código) que, sendo diferente cada vez que entra, deixaria a tela em branco.Como é isso?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Eu já conheço esse script. Foi o que chegou mais perto do que eu queria. Acho que mais que isso, impossível.rsAgora tudo o que eu quiser vai ter que ser comigo mesmo.Mas mesmo assim, valeu!

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.