Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: live help support script


Message #1 by "lee pey ling" <watermelon_lee@l...> on Thu, 23 Jan 2003 10:16:52
Dear Lee,
               you might want to check out the php internet relay chat 
project:
http://www.phpwizard.net/projects/phpIRC/
you can look at working code - even if you decide to re-invent the 
wheel. If you do go ahead with the project you need to look seriously 
into the security aspects of it.

Mark


Datatal AB - Gauffin, Jonas wrote:

>Didn't you say that you wanted a chat? Then you just show everything that both persons (you and the customer have said).
>
>Have one table that stores chat requests:
>chat_request
>============
>requestid int not null auto_increment primary key
>custid int not null
>userid int not null default 0
>status int not null default 0
>
>Status i 0 for requests that havent been answered, 1 for ongoing sessions and 2 for closed sessions
>Custid is the customers id
>UserID is your id (or any other employees id)
>
>Next create a chat_log table:
>requestid int not null primary key
>date_written int not null,
>Type int not null
>
>Date_written is when this entry was inserted to the table
>Type, 0 = customer, 1 = employee. That is who it was that said something
>
>And to show the chat for each client, just do a simple select:
>Select * from chat_log WHERE requestid=XX order by date_written desc
>
>This is a typical case:
>
>1.Customer 
>  The customer requests a chat. 
>  A) Insert a chat_request with a custid.
>  B) Fetch requestid and store it in a session variable
>
>2. You
>   Your page show a pending chatrequest (fetch pending requests with: select * from chat_request where status=0)
>
>3. You
>   a) You accepts the request (update chat_request set status=1, userid=XX where requestid=x)
>   b) You save the requestid in a sessionvariable
>
>4. Customer
>   Sees that the chat is started (status=1 for the users chat_request)
>
>5. Both parties inserts chat entries into chat_log and both parties shows the complete log
>
>Got it?
>   
>
>>-----Ursprungligt meddelande-----
>>Från: lee pey ling [mailto:watermelon_lee@l...] 
>>Skickat: den 23 januari 2003 11:41
>>Till: professional php
>>Ämne: [pro_php] Re: SV: Re: SV: live help support script
>>
>>
>>dear sir,
>>     i also hav the idea using = database.  but, my problem 
>>is, how can i 
>>show the interface?  i mean, the interface should be one 
>>question follow 
>>by one answer.  how should i arrange them?  if i call from 
>>database, it 
>>can't show like tat.
>>     that's what i can't figure out.
>>
>>
>
>




  Return to Index