-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsites.html
More file actions
132 lines (116 loc) · 4.56 KB
/
sites.html
File metadata and controls
132 lines (116 loc) · 4.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<<
if reload="ERROR" then reload="REQUEST" /if
expand file="functions.lib" /expand
>>
<html>
<head>
<link rel="stylesheet" type="text/css" href="<<syspublicurl+dirname(page)>>chat.css?random=<<random(1000,9999)>>" media="all">
<title>Live Answers - Sites</title>
</head>
<body>
<<displaymenu("Sites")>>
<div class="setup">
<center>
<b>Configure Live Talk to handle requests for multiple websites.</b><br> <br>
<<
if message<>'ERROR' then
display '
<div style="color: red;">
<a href="'+page+'"><img src="images/disconnect.gif" width="12" height="12" border="0" title="Clear Error"></a> '+message+'<br> <br>
</div>' /display
/if
message='ERROR'
>>
<<ci_edit("chat.css",800,600,"<i>Edit Cascading Style Sheet (CSS)</i>",'',"TRUE")>><br> <br>
<form action="saveit" method="post">
<<
copy file="chat_companies.csv" ts="," to chat_companies /copy
a[1]='' a[2]='' a[3]=''
chat_companies=append(chat_companies,a)
for name=chat_companies rownum=x do
chat_companies[3,x]=replaceall(chat_companies[3,x],"<br>",lf)
display ^
<table cellpadding="3" cellspacing="0" border="0">
<tr><td colspan="2" bgcolor="#CCCCCC">^ /display
if chat_companies[2,x]="" or chat_companies[2,x]="ERROR" then
display '<b>To add another website fill in these fields and click Save.</b>' /display
else
display '<a href="saveit" name="chat_companydelete" value="'+x+'"><img src="images/disconnect.gif" border="0" width="12" height="12"></a> <b>'+chat_companies[1,x]+'</b> <i>('+chat_companies[2,x]+')</i>' /display
/if
display ^</td></tr>
<tr>
<td bgcolor="#cccccc" valign="top" style="width: 350px;">
^ /display
if chat_companies[2,x]="" or chat_companies[2,x]="ERROR" then
else
display '' /display
/if
display ^
<br> <br>Referrer Substring<br>
<input type="text" name="chat_companies[1,^+x+^]" style="width: 350px;"><br>
<i>(where the request is coming from)</i><br> <br>
Short Company Name<br>
<input type="text" name="chat_companies[2,^+x+^]" style="width: 350px;"><br>
<i>(for CSR to determine what site is requesting help)</i><br> <br>
Company Decription<br>
<textarea name="chat_companies[3,^+x+^]" style="width: 350px; height: 150px;" wrap="off"></textarea><br>
</td>
^ /display
if chat_companies[2,x]="" or chat_companies[2,x]="ERROR" then
display ^
<td bgcolor="#aaaaaa">
<div class="chatboxr"><div class="userinfo">
This is a preview area. Fill in the fields to the left to preview.
</div></div>
</td>
^ /display
else
display ^
<td bgcolor="#aaaaaa">Preview Area (Web Visitors see this) ^+ci_popup(lower("logos/"+aestivafilename(chat_companies[2,x])),'add/modify logo')+^
<div class="chatboxr">
<div class="userinfo">^+ci_img(lower("logos/"+aestivafilename(chat_companies[2,x])),'','','FALSE')+^<br>^+replaceall(chat_companies[3,x],lf,'<br>')+^</div>
<div class="reptext">Welcome, this is John P. Bodie. I am a sample representative. May I help you?</div>
<div class="usertext">Hello, I am John Q. Smith. I need help buying lots of stuff from you. What do you sell?</div>
<div class="userinfo">Informative text looks like this</div>
<div class="reptext">We sell widget tools for fixing widgets.</div>
<div class="usertext">Thanks for your help. Bye.</div>
</div>
</td>
^ /display
/if
display ^
</tr>
<tr><td colspan="2"> </td></tr>
</table>
^ /display
/for
>>
<input type="submit" name="mybutton" value="Save">
</form>
</center>
</div>
</body>
</html>
<<overlay saveit
message=""
if chat_companydelete<>"ERROR" then
if isfile(lower("logos/"+aestivafilename(chat_companies[2,chat_companydelete]))) then
temp=ci_rmfile(lower("logos/"+aestivafilename(chat_companies[2,chat_companydelete])))
/if
chat_companies[2,chat_companydelete]=""
message=message+"Record Deleted<br>"
/if
chat_companydelete="ERROR"
for name=chat_companies rownum=x do
chat_companies[3,x]=replaceall(chat_companies[3,x],lf,"<br>")
if chat_companies[2,x]="" or chat_companies[2,x]="ERROR" then
chat_companies[1,x]='' chat_companies[2,x]='' chat_companies[3,x]=''
/if
/for
chat_companies=nodups(chat_companies)
chat_companies=reversesortcol(chat_companies,2)
if chat_companies[2,rows(chat_companies)]="" then chat_companies=delrow(chat_companies,rows(chat_companies)) /if
copy chat_companies to file="chat_companies.csv" ts="," /copy
message=message+"Changes saved<br>"
goto page
>>