admin_header.php

Lars J. Croff, 06/10/2011 12:34 pm

Download (81 kB)

 
1
<?php
2
# admin_header.php - VICIDIAL administration header
3
#
4
# Copyright (C) 2010  Matt Florell <vicidial@gmail.com>    LICENSE: AGPLv2
5
# 
6
7
# CHANGES
8
# 90310-0709 - First Build
9
# 90508-0542 - Added Call Menu option, changed script to use long PHP tags
10
# 90514-0605 - Added audio prompt selection functions
11
# 90530-1206 - Changed List Mix to allow for 40 mixes and a default populate option
12
# 90531-2339 - Added Dynamic options for Call Menu
13
# 90612-0852 - Changed relative links
14
# 90635-0943 - Added javascript for dynamic menus in In-Groups
15
# 90627-0548 - Added no-agent-no-queue options
16
# 90628-1016 - Added Text-to-speech options
17
# 90830-2213 - Added Music On Hold options
18
# 90904-1534 - Added launch_moh_chooser
19
# 90916-2334 - Added Voicemail options
20
# 91223-1030 - Added VIDPROMPT options for in-group routing in Call Menus
21
# 100311-2210 - Added callcard_enabled Admin element
22
# 100428-1039 - Added custom fields display
23
# 100507-1339 - Added copy carrier submenu
24
# 100616-2350 - Added VIDPROMPT call menu options
25
# 100728-0904 - Changed Lead Loader link to the new 3rd gen lead loader
26
# 100802-2127 - Changed Admin to point to links page instead of Phones listings
27
# 100831-2255 - Added password strength checking function
28
# 100914-1311 - Removed other links for reports-only users
29
# 101022-1323 - Added IGU_selectall function
30
# 101107-1133 - Added auto-refresh code
31
# 110215-1720 - Added the Add a new lead link
32
# 110322-1228 - Added user ID logged in as next to Logout link
33
#
34
35
36
######################### SMALL HTML HEADER BEGIN #######################################
37
if($short_header)
38
        {
39
echo "<meta name=\"GOAutoDial\" content=\"GOAutoDial Inc. http://www.goautodial.com\" />\n";
40
echo "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE8\">\n";
41
echo "<link rel=\"shortcut icon\" href=\"../goautodial/images/g_page_icon.ico\" >\n";
42
echo "<link rel=\"icon\" type=\"image/png\" href=\"../goautodial/images/g_icon_05.png\" >\n";
43
echo "<link rel=\"stylesheet\" type=\"text/css\" media=\"screen, print, projection\"  href=\"../csslibs/goiframe2.css\"></link>\n";
44
echo "<script type=\"text/javascript\" src=\"../includes/goiframe2.js\"></script>\n";
45
        ?>
46
<div id="header">
47
        <div id="gologo"><a href="http://goautodial.com" title="GOAutoDial Inc.- Empowering The Next Generation Contact Center" target="_blank"></a></div>
48
    <div id="gomenu">
49
<?php
50
$stmt="SELECT user_level from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW';";
51
if ($DB) {echo "|$stmt|\n";}
52
if ($non_latin > 0) { $rslt=mysql_query("SET NAMES 'UTF8'");}
53
$rslt=mysql_query($stmt, $link);
54
$row=mysql_fetch_row($rslt);
55
$GOuser_level=$row[0];
56
57
if         ($GOuser_level>8)
58
{
59
?>
60
        <div id="adminbutton"><a href="admin.php?gouser=<?php echo $PHP_AUTH_USER; ?>&gopass=<?php echo $PHP_AUTH_PW; ?>" title="Vicidial Admin" id="admin">Vicidial Admin</a></div>
61
        <div id="goadminbutton"><a href="../admin.php?gouser=<?php echo $PHP_AUTH_USER; ?>&gopass=<?php echo $PHP_AUTH_PW; ?>" title="GO Admin" id="goadmin">GO Admin</a></div>
62
<?php
63
}
64
else
65
{
66
?>
67
        <div id="adminbuttons"><a href="admin.php?gouser=<?php echo $PHP_AUTH_USER; ?>&gopass=<?php echo $PHP_AUTH_PW; ?>" title="Vicidial Admin" id="admin">Vicidial Admin</a></div>
68
<?php
69
}
70
?>
71
        <div id="phpmyadminbutton"><a href="../phpmyadmin/" target="_blank" title="phpMyAdmin" id="phpmyadmin">phpMyAdmin</a></div>
72
        <div id="supportbutton"><a href="http://goautodial.com/support-ticket/" target="_blank" title="Support Center" id="support">Support Center</a></div>
73
        <!--<div id="systembutton"><a href="#" onclick="goToURL('goautodial/g_sys_stats_cti2.php','system')" title="System Information" id="system">System Info</a></div>-->
74
        <div id="forcelogout"><a href="../admin.php?force_logout=1" title="Logout">Logout</a></div>
75
    </div>
76
    <div id="bannertext">
77
     <p>Vicidial Admin</p>
78
    </div>
79
</div>
80
81
<div id="contents" align="center">    
82
        <TABLE CELLPADDING=0 CELLSPACING=0 BGCOLOR="#616161"><TR>
83
        <TD><!--// <IMG SRC="vicidial_admin_web_logo_small.gif" WIDTH=71 HEIGHT=22>//--> &nbsp; </TD>
84
        <?php if ($reports_only_user < 1) {
85
                ?>
86
        <TD> &nbsp; <A HREF="admin.php" ALT="Users"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Users</B></A> &nbsp; </TD>
87
        <TD> &nbsp; <A HREF="admin.php?ADD=10" ALT="Campaigns"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Campaigns</B></A> &nbsp; </TD>
88
        <TD> &nbsp; <A HREF="admin.php?ADD=100" ALT="Lists"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Lists</B></A> &nbsp; </TD>
89
        <TD> &nbsp; <A HREF="admin.php?ADD=1000000" ALT="Scripts"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Scripts</B></A> &nbsp; </TD>
90
        <TD> &nbsp; <A HREF="admin.php?ADD=10000000" ALT="Filters"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Filters</B></A> &nbsp; </TD>
91
        <TD> &nbsp; <A HREF="admin.php?ADD=1000" ALT="Inbound"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Inbound</B></A> &nbsp; </TD>
92
        <TD> &nbsp; <A HREF="admin.php?ADD=100000" ALT="User Groups"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>User Groups</B></A> &nbsp; </TD>
93
        <TD> &nbsp; <A HREF="admin.php?ADD=10000" ALT="Remote Agents"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Remote Agents</B></A> &nbsp; </TD>
94
        <TD> &nbsp; <A HREF="admin.php?ADD=999998" ALT="Admin"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Admin</B></A> &nbsp; </TD>
95
        <?php 
96
                } 
97
        else 
98
                { ?>
99
        <TD width=600> &nbsp; &nbsp; </TD>
100
        <?php } ?>
101
        <TD> &nbsp; <A HREF="admin.php?ADD=999999" ALT="Reports"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Reports</B></A> &nbsp; </TD>
102
        </TR>
103
        </TABLE>
104
        <?php
105
        }
106
######################### SMALL HTML HEADER END #######################################
107
108
109
######################### FULL HTML HEADER BEGIN #######################################
110
else
111
{
112
if ($hh=='users') 
113
        {$users_hh="bgcolor =\"$users_color\""; $users_fc="$users_font"; $users_bold="$header_selected_bold";}
114
        else {$users_hh=''; $users_fc='WHITE'; $users_bold="$header_nonselected_bold";}
115
if ($hh=='campaigns') 
116
        {$campaigns_hh="bgcolor=\"$campaigns_color\""; $campaigns_fc="$campaigns_font"; $campaigns_bold="$header_selected_bold";}
117
        else {$campaigns_hh=''; $campaigns_fc='WHITE'; $campaigns_bold="$header_nonselected_bold";}
118
if ($SSoutbound_autodial_active > 0)
119
        {
120
        if ($hh=='lists') 
121
                {$lists_hh="bgcolor=\"$lists_color\""; $lists_fc="$lists_font"; $lists_bold="$header_selected_bold";}
122
                else {$lists_hh=''; $lists_fc='WHITE'; $lists_bold="$header_nonselected_bold";}
123
        }
124
if ($hh=='ingroups') 
125
        {$ingroups_hh="bgcolor=\"$ingroups_color\""; $ingroups_fc="$ingroups_font"; $ingroups_bold="$header_selected_bold";}
126
        else {$ingroups_hh=''; $ingroups_fc='WHITE'; $ingroups_bold="$header_nonselected_bold";}
127
if ($hh=='remoteagent') 
128
        {$remoteagent_hh="bgcolor=\"$remoteagent_color\""; $remoteagent_fc="$remoteagent_font"; $remoteagent_bold="$header_selected_bold";}
129
        else {$remoteagent_hh=''; $remoteagent_fc='WHITE'; $remoteagent_bold="$header_nonselected_bold";}
130
if ($hh=='usergroups') 
131
        {$usergroups_hh="bgcolor=\"$usergroups_color\""; $usergroups_fc="$usergroups_font"; $usergroups_bold="$header_selected_bold";}
132
        else {$usergroups_hh=''; $usergroups_fc='WHITE'; $usergroups_bold="$header_nonselected_bold";}
133
if ($hh=='scripts') 
134
        {$scripts_hh="bgcolor=\"$scripts_color\""; $scripts_fc="$scripts_font"; $scripts_bold="$header_selected_bold";}
135
        else {$scripts_hh=''; $scripts_fc='WHITE'; $scripts_bold="$header_nonselected_bold";}
136
if ($SSoutbound_autodial_active > 0)
137
        {
138
        if ($hh=='filters') 
139
                {$filters_hh="bgcolor=\"$filters_color\""; $filters_fc="$filters_font"; $filters_bold="$header_selected_bold";}
140
                else {$filters_hh=''; $filters_fc='WHITE'; $filters_bold="$header_nonselected_bold";}
141
        }
142
if ($hh=='admin') 
143
        {$admin_hh="bgcolor=\"$admin_color\""; $admin_fc="$admin_font"; $admin_bold="$header_selected_bold";}
144
        else {$admin_hh=''; $admin_fc='WHITE'; $admin_bold="$header_nonselected_bold";}
145
if ($hh=='reports') 
146
        {$reports_hh="bgcolor=\"$reports_color\""; $reports_fc="$reports_font"; $reports_bold="$header_selected_bold";}
147
        else {$reports_hh=''; $reports_fc='WHITE'; $reports_bold="$header_nonselected_bold";}
148
149
echo "</title>\n";
150
echo "<script language=\"Javascript\">\n";
151
echo "var field_name = '';\n";
152
echo "var user = '$PHP_AUTH_USER';\n";
153
echo "var pass = '$PHP_AUTH_PW';\n";
154
echo "var epoch = '" . date("U") . "';\n";
155
156
if ($TCedit_javascript > 0)
157
        {
158
         ?>
159
160
        function run_submit()
161
                {
162
                calculate_hours();
163
                var go_submit = document.getElementById("go_submit");
164
                if (go_submit.disabled == false)
165
                        {
166
                        document.edit_log.submit();
167
                        }
168
                }
169
170
        // Calculate login time
171
        function calculate_hours() 
172
                {
173
                var now_epoch = '<?php echo $StarTtimE ?>';
174
                var i=0;
175
                var total_percent=0;
176
                var SPANlogin_time = document.getElementById("LOGINlogin_time");
177
                var LI_date = document.getElementById("LOGINbegin_date");
178
                var LO_date = document.getElementById("LOGOUTbegin_date");
179
                var LI_datetime = LI_date.value;
180
                var LO_datetime = LO_date.value;
181
                var LI_datetime_array=LI_datetime.split(" ");
182
                var LI_date_array=LI_datetime_array[0].split("-");
183
                var LI_time_array=LI_datetime_array[1].split(":");
184
                var LO_datetime_array=LO_datetime.split(" ");
185
                var LO_date_array=LO_datetime_array[0].split("-");
186
                var LO_time_array=LO_datetime_array[1].split(":");
187
188
                // Calculate milliseconds since 1970 for each date string and find diff
189
                var LI_sec = ( ( (LI_time_array[2] * 1) * 1000) );
190
                var LI_min = ( ( ( (LI_time_array[1] * 1) * 1000) * 60 ) );
191
                var LI_hour = ( ( ( (LI_time_array[0] * 1) * 1000) * 3600 ) );
192
                var LI_date_epoch = Date.parse(LI_date_array[0] + '/' + LI_date_array[1] + '/' + LI_date_array[2]);
193
                var LI_epoch = (LI_date_epoch + LI_sec + LI_min + LI_hour);
194
                var LO_sec = ( ( (LO_time_array[2] * 1) * 1000) );
195
                var LO_min = ( ( ( (LO_time_array[1] * 1) * 1000) * 60 ) );
196
                var LO_hour = ( ( ( (LO_time_array[0] * 1) * 1000) * 3600 ) );
197
                var LO_date_epoch = Date.parse(LO_date_array[0] + '/' + LO_date_array[1] + '/' + LO_date_array[2]);
198
                var LO_epoch = (LO_date_epoch + LO_sec + LO_min + LO_hour);
199
                var temp_LI_epoch = (LI_epoch / 1000 );
200
                var temp_LO_epoch = (LO_epoch / 1000 );
201
                var epoch_diff = ( (LO_epoch - LI_epoch) / 1000 );
202
                var temp_diff = epoch_diff;
203
204
                document.getElementById("login_time").innerHTML = "ERROR, Please check date fields";
205
206
                var go_submit = document.getElementById("go_submit");
207
                go_submit.disabled = true;
208
                // length is a positive number and no more than 24 hours, datetime is earlier than right now
209
                if ( (epoch_diff < 86401) && (epoch_diff > 0) && (temp_LI_epoch < now_epoch) && (temp_LO_epoch < now_epoch) )
210
                        {
211
                        go_submit.disabled = false;
212
213
                        hours = Math.floor(temp_diff / (60 * 60)); 
214
                        temp_diff -= hours * (60 * 60);
215
216
                        mins = Math.floor(temp_diff / 60); 
217
                        temp_diff -= mins * 60;
218
219
                        secs = Math.floor(temp_diff); 
220
                        temp_diff -= secs;
221
222
                        document.getElementById("login_time").innerHTML = hours + ":" + mins;
223
224
                        var form_LI_epoch = document.getElementById("LOGINepoch");
225
                        var form_LO_epoch = document.getElementById("LOGOUTepoch");
226
                        form_LI_epoch.value = (LI_epoch / 1000);
227
                        form_LO_epoch.value = (LO_epoch / 1000);
228
                        }
229
                }
230
231
232
233
        <?php
234
        }
235
######################
236
# ADD=31 or 34 and SUB=29 for list mixes
237
######################
238
if ( ( ($ADD==34) or ($ADD==31) or ($ADD==49) ) and ($SUB==29) and ($LOGmodify_campaigns==1) and ( (eregi("$campaign_id",$LOGallowed_campaigns)) or (eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) 
239
        {
240
241
        ?>
242
        // List Mix status add and remove
243
        function mod_mix_status(stage,vcl_id,entry) 
244
                {
245
                if (stage=="ALL")
246
                        {
247
                        var count=0;
248
                        var ROnew_statuses = document.getElementById("ROstatus_X_" + vcl_id);
249
250
                        while (count < entry)
251
                                {
252
                                var old_statuses = document.getElementById("status_" + count + "_" + vcl_id);
253
                                var ROold_statuses = document.getElementById("ROstatus_" + count + "_" + vcl_id);
254
255
                                old_statuses.value = ROnew_statuses.value;
256
                                ROold_statuses.value = ROnew_statuses.value;
257
                                count++;
258
                                }
259
                        }
260
                else
261
                        {
262
                        if (stage=="EMPTY")
263
                                {
264
                                var count=0;
265
                                var ROnew_statuses = document.getElementById("ROstatus_X_" + vcl_id);
266
267
                                while (count < entry)
268
                                        {
269
                                        var old_statuses = document.getElementById("status_" + count + "_" + vcl_id);
270
                                        var ROold_statuses = document.getElementById("ROstatus_" + count + "_" + vcl_id);
271
                                        
272
                                        if (ROold_statuses.value.length < 3)
273
                                                {
274
                                                old_statuses.value = ROnew_statuses.value;
275
                                                ROold_statuses.value = ROnew_statuses.value;
276
                                                }
277
                                        count++;
278
                                        }
279
                                }
280
281
                        else
282
                                {
283
                                var mod_status = document.getElementById("dial_status_" + entry + "_" + vcl_id);
284
                                if (mod_status.value.length < 1)
285
                                        {
286
                                        alert("You must select a status first");
287
                                        }
288
                                else
289
                                        {
290
                                        var old_statuses = document.getElementById("status_" + entry + "_" + vcl_id);
291
                                        var ROold_statuses = document.getElementById("ROstatus_" + entry + "_" + vcl_id);
292
                                        var MODstatus = new RegExp(" " + mod_status.value + " ","g");
293
                                        if (stage=="ADD")
294
                                                {
295
                                                if (old_statuses.value.match(MODstatus))
296
                                                        {
297
                                                        alert("The status " + mod_status.value + " is already present");
298
                                                        }
299
                                                else
300
                                                        {
301
                                                        var new_statuses = " " + mod_status.value + "" + old_statuses.value;
302
                                                        old_statuses.value = new_statuses;
303
                                                        ROold_statuses.value = new_statuses;
304
                                                        mod_status.value = "";
305
                                                        }
306
                                                }
307
                                        if (stage=="REMOVE")
308
                                                {
309
                                                var MODstatus = new RegExp(" " + mod_status.value + " ","g");
310
                                                old_statuses.value = old_statuses.value.replace(MODstatus, " ");
311
                                                ROold_statuses.value = ROold_statuses.value.replace(MODstatus, " ");
312
                                                }
313
                                        }
314
                                }
315
                        }
316
                }
317
318
        // List Mix percent difference calculation and warning message
319
        function mod_mix_percent(vcl_id,entries) 
320
                {
321
                var i=0;
322
                var total_percent=0;
323
                var percent_diff='';
324
                while(i < entries)
325
                        {
326
                        var mod_percent_field = document.getElementById("percentage_" + i + "_" + vcl_id);
327
                        temp_percent = mod_percent_field.value * 1;
328
                        total_percent = (total_percent + temp_percent);
329
                        i++;
330
                        }
331
332
                var mod_diff_percent = document.getElementById("PCT_DIFF_" + vcl_id);
333
                percent_diff = (total_percent - 100);
334
                if (percent_diff > 0)
335
                        {
336
                        percent_diff = '+' + percent_diff;
337
                        }
338
                var mix_list_submit = document.getElementById("submit_" + vcl_id);
339
                if ( (percent_diff > 0) || (percent_diff < 0) )
340
                        {
341
                        mix_list_submit.disabled = true;
342
                        document.getElementById("ERROR_" + vcl_id).innerHTML = "<font color=red><B>The Difference % must be 0</B></font>";
343
                        }
344
                else
345
                        {
346
                        mix_list_submit.disabled = false;
347
                        document.getElementById("ERROR_" + vcl_id).innerHTML = "";
348
                        }
349
350
                mod_diff_percent.value = percent_diff;
351
                }
352
353
        function submit_mix(vcl_id,entries) 
354
                {
355
                var h=1;
356
                var j=1;
357
                var list_mix_container='';
358
                var mod_list_mix_container_field = document.getElementById("list_mix_container_" + vcl_id);
359
                while(h < 41)
360
                        {
361
                        var i=0;
362
                        while(i < entries)
363
                                {
364
                                var mod_list_id_field = document.getElementById("list_id_" + i + "_" + vcl_id);
365
                                var mod_priority_field = document.getElementById("priority_" + i + "_" + vcl_id);
366
                                var mod_percent_field = document.getElementById("percentage_" + i + "_" + vcl_id);
367
                                var mod_statuses_field = document.getElementById("status_" + i + "_" + vcl_id);
368
                                if (mod_priority_field.value==h)
369
                                        {
370
                                        list_mix_container = list_mix_container + mod_list_id_field.value + "|" + j + "|" + mod_percent_field.value + "|" + mod_statuses_field.value + "|:";
371
                                        j++;
372
                                        }
373
                                i++;
374
                                }
375
                        h++;
376
                        }
377
                mod_list_mix_container_field.value = list_mix_container;
378
                var form_to_submit = document.getElementById("" + vcl_id);
379
                form_to_submit.submit();
380
                }
381
        <?php
382
        }
383
        ?>
384
        var weak = Image();
385
        weak.src = "images/weak.png";
386
        var medium = Image();
387
        medium.src = "images/medium.png";
388
        var strong = Image();
389
        strong.src = "images/strong.png";
390
391
        function pwdChanged(pwd_field_str, pwd_img_str) 
392
                {
393
                var pwd_field = document.getElementById(pwd_field_str);
394
                var pwd_img = document.getElementById(pwd_img_str);
395
396
                var strong_regex = new RegExp( "^(?=.{8,})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])", "g" );
397
                var medium_regex = new RegExp( "^(?=.{6,})(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9]))).*$", "g" );
398
399
                if (strong_regex.test(pwd_field.value) ) 
400
                        {
401
                        if (pwd_img.src != strong.src)
402
                                {pwd_img.src = strong.src;}
403
                        } 
404
                else if (medium_regex.test( pwd_field.value) ) 
405
                        {
406
                        if (pwd_img.src != medium.src) 
407
                                {pwd_img.src = medium.src;}
408
                        }
409
                else 
410
                        {
411
                        if (pwd_img.src != weak.src) 
412
                                {pwd_img.src = weak.src;}
413
                        }
414
                }
415
416
        function openNewWindow(url) 
417
                {
418
                window.open (url,"",'width=620,height=300,scrollbars=yes,menubar=yes,address=yes');
419
                }
420
        function scriptInsertField() 
421
                {
422
                openField = '--A--';
423
                closeField = '--B--';
424
                var textBox = document.scriptForm.script_text;
425
                var scriptIndex = document.getElementById("selectedField").selectedIndex;
426
                var insValue =  document.getElementById('selectedField').options[scriptIndex].value;
427
                if (document.selection) 
428
                        {
429
                        //IE
430
                        textBox = document.scriptForm.script_text;
431
                        insValue = document.scriptForm.selectedField.options[document.scriptForm.selectedField.selectedIndex].text;
432
                        textBox.focus();
433
                        sel = document.selection.createRange();
434
                        sel.text = openField + insValue + closeField;
435
                        } 
436
                else if (textBox.selectionStart || textBox.selectionStart == 0) 
437
                        {
438
                        //Mozilla
439
                        var startPos = textBox.selectionStart;
440
                        var endPos = textBox.selectionEnd;
441
                        textBox.value = textBox.value.substring(0, startPos)
442
                        + openField + insValue + closeField
443
                        + textBox.value.substring(endPos, textBox.value.length);
444
                        }
445
                else 
446
                        {
447
                        textBox.value += openField + insValue + closeField;
448
                        }
449
                }
450
451
        <?php
452
453
#### Javascript for auto-generate of user ID Button
454
if ( ($SSadmin_modify_refresh > 1) and (preg_match("/^3|^4/",$ADD)) )
455
        {
456
        ?>
457
        var ar_seconds=<?php echo "$SSadmin_modify_refresh;"; ?>
458
459
        function modify_refresh_display()
460
                {
461
                if (ar_seconds > 0)
462
                        {
463
                        ar_seconds = (ar_seconds - 1);
464
                        document.getElementById("refresh_countdown").innerHTML = "<font color=black> screen refresh in: " + ar_seconds + " seconds</font>";
465
                        setTimeout("modify_refresh_display()",1000);
466
                        }
467
                }
468
469
        <?php
470
        }
471
472
#### Javascript for auto-generate of user ID Button
473
if ( ($ADD==1) or ($ADD=="1A") )
474
        {
475
        ?>
476
        function user_auto()
477
                {
478
                var user_toggle = document.getElementById("user_toggle");
479
                var user_field = document.getElementById("user");
480
                if (user_toggle.value < 1)
481
                        {
482
                        user_field.value = 'AUTOGENERATEZZZ';
483
                        user_field.disabled = true;
484
                        user_toggle.value = 1;
485
                        }
486
                else
487
                        {
488
                        user_field.value = '';
489
                        user_field.disabled = false;
490
                        user_toggle.value = 0;
491
                        }
492
                }
493
494
        function user_submit()
495
                {
496
                var user_field = document.getElementById("user");
497
                user_field.disabled = false;
498
                document.userform.submit();
499
                }
500
501
        <?php
502
        }
503
504
#### Javascript for auto-generate of user ID Button
505
else
506
        {
507
        ?>
508
        function launch_chooser(fieldname,stage,vposition)
509
                {
510
                var audiolistURL = "./non_agent_api.php";
511
                var audiolistQuery = "source=admin&function=sounds_list&user=" + user + "&pass=" + pass + "&format=selectframe&stage=" + stage + "&comments=" + fieldname;
512
                var Iframe_content = '<IFRAME SRC="' + audiolistURL + '?' + audiolistQuery + '"  style="width:740;height:440;background-color:white;" scrolling="NO" frameborder="0" allowtransparency="true" id="audio_chooser_frame' + epoch + '" name="audio_chooser_frame" width="740" height="460" STYLE="z-index:2"> </iframe>';
513
514
                document.getElementById("audio_chooser_span").style.position = "absolute";
515
                document.getElementById("audio_chooser_span").style.left = "220px";
516
                document.getElementById("audio_chooser_span").style.top = vposition + "px";
517
                document.getElementById("audio_chooser_span").style.visibility = 'visible';
518
                document.getElementById("audio_chooser_span").innerHTML = Iframe_content;
519
                }
520
521
        function launch_moh_chooser(fieldname,stage,vposition)
522
                {
523
                var audiolistURL = "./non_agent_api.php";
524
                var audiolistQuery = "source=admin&function=moh_list&user=" + user + "&pass=" + pass + "&format=selectframe&stage=" + stage + "&comments=" + fieldname;
525
                var Iframe_content = '<IFRAME SRC="' + audiolistURL + '?' + audiolistQuery + '"  style="width:740;height:440;background-color:white;" scrolling="NO" frameborder="0" allowtransparency="true" id="audio_chooser_frame' + epoch + '" name="audio_chooser_frame" width="740" height="460" STYLE="z-index:2"> </iframe>';
526
527
                document.getElementById("audio_chooser_span").style.position = "absolute";
528
                document.getElementById("audio_chooser_span").style.left = "220px";
529
                document.getElementById("audio_chooser_span").style.top = vposition + "px";
530
                document.getElementById("audio_chooser_span").style.visibility = 'visible';
531
                document.getElementById("audio_chooser_span").innerHTML = Iframe_content;
532
                }
533
534
        function launch_vm_chooser(fieldname,stage,vposition)
535
                {
536
                var audiolistURL = "./non_agent_api.php";
537
                var audiolistQuery = "source=admin&function=vm_list&user=" + user + "&pass=" + pass + "&format=selectframe&stage=" + stage + "&comments=" + fieldname;
538
                var Iframe_content = '<IFRAME SRC="' + audiolistURL + '?' + audiolistQuery + '"  style="width:740;height:440;background-color:white;" scrolling="NO" frameborder="0" allowtransparency="true" id="audio_chooser_frame' + epoch + '" name="audio_chooser_frame" width="740" height="460" STYLE="z-index:2"> </iframe>';
539
540
                document.getElementById("audio_chooser_span").style.position = "absolute";
541
                document.getElementById("audio_chooser_span").style.left = "220px";
542
                document.getElementById("audio_chooser_span").style.top = vposition + "px";
543
                document.getElementById("audio_chooser_span").style.visibility = 'visible';
544
                document.getElementById("audio_chooser_span").innerHTML = Iframe_content;
545
                }
546
547
        function close_chooser()
548
                {
549
                document.getElementById("audio_chooser_span").style.visibility = 'hidden';
550
                document.getElementById("audio_chooser_span").innerHTML = '';
551
                }
552
553
554
        function user_submit()
555
                {
556
                var user_field = document.getElementById("user");
557
                user_field.disabled = false;
558
                document.userform.submit();
559
                }
560
561
        <?php
562
        }
563
564
### Javascript for shift end-time calculation and display
565
if ( ($ADD==131111111) or ($ADD==331111111) or ($ADD==431111111) )
566
        {
567
        ?>
568
        function shift_time()
569
                {
570
                var start_time = document.getElementById("shift_start_time");
571
                var end_time = document.getElementById("shift_end_time");
572
                var length = document.getElementById("shift_length");
573
574
                var st_value = start_time.value;
575
                var et_value = end_time.value;
576
                while (st_value.length < 4) {st_value = "0" + st_value;}
577
                while (et_value.length < 4) {et_value = "0" + et_value;}
578
                var st_hour=st_value.substring(0,2);
579
                var st_min=st_value.substring(2,4);
580
                var et_hour=et_value.substring(0,2);
581
                var et_min=et_value.substring(2,4);
582
                if (st_hour > 23) {st_hour = 23;}
583
                if (et_hour > 23) {et_hour = 23;}
584
                if (st_min > 59) {st_min = 59;}
585
                if (et_min > 59) {et_min = 59;}
586
                start_time.value = st_hour + "" + st_min;
587
                end_time.value = et_hour + "" + et_min;
588
589
                var start_time_hour=start_time.value.substring(0,2);
590
                var start_time_min=start_time.value.substring(2,4);
591
                var end_time_hour=end_time.value.substring(0,2);
592
                var end_time_min=end_time.value.substring(2,4);
593
                start_time_hour=(start_time_hour * 1);
594
                start_time_min=(start_time_min * 1);
595
                end_time_hour=(end_time_hour * 1);
596
                end_time_min=(end_time_min * 1);
597
598
                if (start_time.value == end_time.value)
599
                        {
600
                        var shift_length = '24:00';
601
                        }
602
                else
603
                        {
604
                        if ( (start_time_hour > end_time_hour) || ( (start_time_hour == end_time_hour) && (start_time_min > end_time_min) ) )
605
                                {
606
                                var shift_hour = ( (24 - start_time_hour) + end_time_hour);
607
                                var shift_minute = ( (60 - start_time_min) + end_time_min);
608
                                if (shift_minute >= 60) 
609
                                        {
610
                                        shift_minute = (shift_minute - 60);
611
                                        }
612
                                else
613
                                        {
614
                                        shift_hour = (shift_hour - 1);
615
                                        }
616
                                }
617
                        else
618
                                {
619
                                var shift_hour = (end_time_hour - start_time_hour);
620
                                var shift_minute = (end_time_min - start_time_min);
621
                                }
622
                        if (shift_minute < 0) 
623
                                {
624
                                shift_minute = (shift_minute + 60);
625
                                shift_hour = (shift_hour - 1);
626
                                }
627
628
                        if (shift_hour < 10) {shift_hour = '0' + shift_hour}
629
                        if (shift_minute < 10) {shift_minute = '0' + shift_minute}
630
                        var shift_length = shift_hour + ':' + shift_minute;
631
                        }
632
        //        alert(start_time_hour + '|' + start_time_min + '|' + end_time_hour + '|' + end_time_min + '|--|' + shift_hour + ':' + shift_minute + '|' + shift_length + '|');
633
634
                length.value = shift_length;
635
                }
636
637
        <?php
638
        }
639
640
641
### Javascript for shift end-time calculation and display
642
if ( ($ADD==3111) or ($ADD==4111) or ($ADD==5111) )
643
        {
644
        ?>
645
        function IGU_selectall(temp_count,temp_fields)
646
                {
647
                var fields_array=temp_fields.split('|');
648
                var inc=0;
649
                while (temp_count >= inc)
650
                        {
651
                        if (fields_array[inc].length > 0)
652
                                {
653
                                document.getElementById(fields_array[inc]).checked=true;
654
                        //        document.admin_form.fields_array[inc].checked=true;
655
                                }
656
                        inc++;
657
                        }
658
                }
659
660
        <?php
661
        }
662
663
664
### select list contents generation for dynamic route displays in call menu and in-group screens
665
if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511) or ($ADD==3111) or ($ADD==2111) or ($ADD==2011) or ($ADD==4111) or ($ADD==5111) )
666
        {
667
        $stmt="select menu_id,menu_name from vicidial_call_menu order by menu_id;";
668
        $rslt=mysql_query($stmt, $link);
669
        $menus_to_print = mysql_num_rows($rslt);
670
        $call_menu_list='';
671
        $i=0;
672
        while ($i < $menus_to_print)
673
                {
674
                $row=mysql_fetch_row($rslt);
675
                $call_menu_list .= "<option value=\"$row[0]\">$row[0] - $row[1]</option>";
676
                $i++;
677
                }
678
679
        $stmt="select did_pattern,did_description,did_route from vicidial_inbound_dids where did_active='Y' order by did_pattern;";
680
        $rslt=mysql_query($stmt, $link);
681
        $dids_to_print = mysql_num_rows($rslt);
682
        $did_list='';
683
        $i=0;
684
        while ($i < $dids_to_print)
685
                {
686
                $row=mysql_fetch_row($rslt);
687
                $did_list .= "<option value=\"$row[0]\">$row[0] - $row[1] - $row[2]</option>";
688
                $i++;
689
                }
690
691
        $stmt="select group_id,group_name from vicidial_inbound_groups where active='Y' and group_id NOT LIKE \"AGENTDIRECT%\" order by group_id;";
692
        $rslt=mysql_query($stmt, $link);
693
        $ingroups_to_print = mysql_num_rows($rslt);
694
        $ingroup_list='';
695
        $i=0;
696
        while ($i < $ingroups_to_print)
697
                {
698
                $row=mysql_fetch_row($rslt);
699
                $ingroup_list .= "<option value=\"$row[0]\">$row[0] - $row[1]</option>";
700
                $i++;
701
                }
702
703
        $stmt="select campaign_id,campaign_name from vicidial_campaigns where active='Y' order by campaign_id;";
704
        $rslt=mysql_query($stmt, $link);
705
        $IGcampaigns_to_print = mysql_num_rows($rslt);
706
        $IGcampaign_id_list='';
707
        $i=0;
708
        while ($i < $IGcampaigns_to_print)
709
                {
710
                $row=mysql_fetch_row($rslt);
711
                $IGcampaign_id_list .= "<option value=\"$row[0]\">$row[0] - $row[1]</option>";
712
                $i++;
713
                }
714
715
        $IGhandle_method_list = '<option>CID</option><option>CIDLOOKUP</option><option>CIDLOOKUPRL</option><option>CIDLOOKUPRC</option><option>ANI</option><option>ANILOOKUP</option><option>ANILOOKUPRL</option><option>VIDPROMPT</option><option>VIDPROMPTLOOKUP</option><option>VIDPROMPTLOOKUPRL</option><option>VIDPROMPTLOOKUPRC</option><option>CLOSER</option><option>3DIGITID</option><option>4DIGITID</option><option>5DIGITID</option><option>10DIGITID</option>';
716
717
        $IGsearch_method_list = '<option value="LB">LB - Load Balanced</option><option value="LO">LO - Load Balanced Overflow</option><option value="SO">SO - Server Only</option>';
718
719
        $stmt="select login,server_ip,extension,dialplan_number from phones where active='Y' order by login,server_ip;";
720
        $rslt=mysql_query($stmt, $link);
721
        $phones_to_print = mysql_num_rows($rslt);
722
        $phone_list='';
723
        $i=0;
724
        while ($i < $phones_to_print)
725
                {
726
                $row=mysql_fetch_row($rslt);
727
                $phone_list .= "<option value=\"$row[0]\">$row[0] - $row[1] - $row[2] - $row[3]</option>";
728
                $i++;
729
                }
730
        }
731
732
# dynamic options for options in call_menu screen
733
if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511) )
734
        {
735
736
        ?>
737
        function call_menu_option(option,route,value,value_context,chooser_height)
738
                {
739
                var call_menu_list = '<?php echo $call_menu_list ?>';
740
                var ingroup_list = '<?php echo $ingroup_list ?>';
741
                var IGcampaign_id_list = '<?php echo $IGcampaign_id_list ?>';
742
                var IGhandle_method_list = '<?php echo $IGhandle_method_list ?>';
743
                var IGsearch_method_list = '<?php echo $IGsearch_method_list ?>';
744
                var did_list = '<?php echo $did_list ?>';
745
                var phone_list = '<?php echo $phone_list ?>';
746
                var selected_value = '';
747
                var selected_context = '';
748
                var new_content = '';
749
750
                var select_list = document.getElementById("option_route_" + option);
751
                var selected_route = select_list.value;
752
                var span_to_update = document.getElementById("option_value_value_context_" + option);
753
754
                if (selected_route=='CALLMENU')
755
                        {
756
                        if (route == selected_route)
757
                                {
758
                                selected_value = '<option SELECTED value="' + value + '">' + value + "</option>\n";
759
                                }
760
                        else
761
                                {value='';}
762
                        new_content = '<span name=option_route_link_' + option + ' id=option_route_link_' + option + "><a href=\"./admin.php?ADD=3511&menu_id=" + value + "\">Call Menu: </a></span><select size=1 name=option_route_value_" + option + " id=option_route_value_" + option + " onChange=\"call_menu_link('" + option + "','CALLMENU');\">" + call_menu_list + "\n" + selected_value + '</select>';
763
                        }
764
                if (selected_route=='INGROUP')
765
                        {
766
                        if (value_context.length < 10)
767
                                {value_context = 'CID,LB,998,TESTCAMP,1,,,,';}
768
                        var value_context_split =                value_context.split(",");
769
                        var IGhandle_method =                        value_context_split[0];
770
                        var IGsearch_method =                        value_context_split[1];
771
                        var IGlist_id =                                        value_context_split[2];
772
                        var IGcampaign_id =                                value_context_split[3];
773
                        var IGphone_code =                                value_context_split[4];
774
                        var IGvid_enter_filename =                value_context_split[5];
775
                        var IGvid_id_number_filename =        value_context_split[6];
776
                        var IGvid_confirm_filename =        value_context_split[7];
777
                        var IGvid_validate_digits =                value_context_split[8];
778
779
                        if (route == selected_route)
780
                                {
781
                                selected_value = '<option SELECTED>' + value + '</option>';
782
                                }
783
784
                        new_content = '<input type=hidden name=option_route_value_context_' + option + ' id=option_route_value_context_' + option + ' value="' + selected_value + '">';
785
                        new_content = new_content + '<span name=option_route_link_' + option + 'id=option_route_link_' + option + '>';
786
                        new_content = new_content + '<a href="admin.php?ADD=3111&group_id=' + value + '">In-Group:</a> </span>';
787
                        new_content = new_content + '<select size=1 name=option_route_value_' + option + ' id=option_route_value_' + option + ' onChange="call_menu_link("' + option + '","INGROUP");">';
788
                        new_content = new_content + '' + ingroup_list + "\n" + selected_value + '</select>';
789
                        new_content = new_content + ' &nbsp; Handle Method: <select size=1 name=IGhandle_method_' + option + ' id=IGhandle_method_' + option + '>';
790
                        new_content = new_content + '' + IGhandle_method_list + "\n" + '<option SELECTED>' + IGhandle_method + '</select>';
791
                        new_content = new_content + ' &nbsp; <a href="javascript:openNewWindow(\'admin.php?ADD=99999#vicidial_call_menu-ingroup_settings\')"><IMG SRC="help.gif" WIDTH=20 HEIGHT=20 BORDER=0 ALT="HELP" ALIGN=TOP></a>';
792
                        new_content = new_content + '<BR>Search Method: <select size=1 name=IGsearch_method_' + option + ' id=IGsearch_method_' + option + '>';
793
                        new_content = new_content + '' + IGsearch_method_list + "\n" + '<option SELECTED>' + IGsearch_method + '</select>';
794
                        new_content = new_content + ' &nbsp; List ID: <input type=text size=5 maxlength=14 name=IGlist_id_' + option + ' id=IGlist_id_' + option + ' value="' + IGlist_id + '">';
795
                        new_content = new_content + '<BR>Campaign ID: <select size=1 name=IGcampaign_id_' + option + ' id=IGcampaign_id_' + option + '>';
796
                        new_content = new_content + '' + IGcampaign_id_list + "\n" + '<option SELECTED>' + IGcampaign_id + '</select>';
797
                        new_content = new_content + ' &nbsp; Phone Code: <input type=text size=5 maxlength=14 name=IGphone_code_' + option + ' id=IGphone_code_' + option + ' value="' + IGphone_code + '">';
798
                        new_content = new_content + "<BR> &nbsp; VID Enter Filename: <input type=text name=IGvid_enter_filename_" + option + " id=IGvid_enter_filename_" + option + " size=40 maxlength=255 value=\"" + IGvid_enter_filename + "\"> <a href=\"javascript:launch_chooser('IGvid_enter_filename_" + option + "','date'," + chooser_height + ");\">audio chooser</a>";
799
                        new_content = new_content + "<BR> &nbsp; VID ID Number Filename: <input type=text name=IGvid_id_number_filename_" + option + " id=IGvid_id_number_filename_" + option + " size=40 maxlength=255 value=\"" + IGvid_id_number_filename + "\"> <a href=\"javascript:launch_chooser('IGvid_id_number_filename_" + option + "','date'," + chooser_height + ");\">audio chooser</a>";
800
                        new_content = new_content + "<BR> &nbsp; VID Confirm Filename: <input type=text name=IGvid_confirm_filename_" + option + " id=IGvid_confirm_filename_" + option + " size=40 maxlength=255 value=\"" + IGvid_confirm_filename + "\"> <a href=\"javascript:launch_chooser('IGvid_confirm_filename_" + option + "','date'," + chooser_height + ");\">audio chooser</a>";
801
                        new_content = new_content + ' &nbsp; VID Digits: <input type=text size=3 maxlength=3 name=IGvid_validate_digits_' + option + ' id=IGvid_validate_digits_' + option + ' value="' + IGvid_validate_digits + '">';
802
                        }
803
                if (selected_route=='DID')
804
                        {
805
                        if (route == selected_route)
806
                                {
807
                                selected_value = '<option SELECTED value="' + value + '">' + value + "</option>\n";
808
                                }
809
                        else
810
                                {value='';}
811
                        new_content = '<span name=option_route_link_' + option + ' id=option_route_link_' + option + '><a href="admin.php?ADD=3311&did_pattern=' + value + '">DID:</a> </span><select size=1 name=option_route_value_' + option + ' id=option_route_value_' + option + " onChange=\"call_menu_link('" + option + "','DID');\">" + did_list + "\n" + selected_value + '</select>';
812
                        }
813
                if (selected_route=='HANGUP')
814
                        {
815
                        if (route == selected_route)
816
                                {
817
                                selected_value = value;
818
                                }
819
                        else
820
                                {value='vm-goodbye';}
821
                        new_content = "Audio File: <input type=text name=option_route_value_" + option + " id=option_route_value_" + option + " size=40 maxlength=255 value=\"" + selected_value + "\"> <a href=\"javascript:launch_chooser('option_route_value_" + option + "','date'," + chooser_height + ");\">audio chooser</a>";
822
                        }
823
                if (selected_route=='EXTENSION')
824
                        {
825
                        if (route == selected_route)
826
                                {
827
                                selected_value = value;
828
                                selected_context = value_context;
829
                                }
830
                        else
831
                                {value='8304';}
832
                        new_content = "Extension: <input type=text name=option_route_value_" + option + " id=option_route_value_" + option + " size=20 maxlength=255 value=\"" + selected_value + "\"> &nbsp; Context: <input type=text name=option_route_value_context_" + option + " id=option_route_value_context_" + option + " size=20 maxlength=255 value=\"" + selected_context + "\"> ";
833
                        }
834
                if (selected_route=='PHONE')
835
                        {
836
                        if (route == selected_route)
837
                                {
838
                                selected_value = '<option SELECTED value="' + value + '">' + value + "</option>\n";
839
                                }
840
                        else
841
                                {value='';}
842
                        new_content = 'Phone: <select size=1 name=option_route_value_' + option + ' id=option_route_value_' + option + '>' + phone_list + "\n" + selected_value + '</select>';
843
                        }
844
                if (selected_route=='VOICEMAIL')
845
                        {
846
                        if (route == selected_route)
847
                                {
848
                                selected_value = value;
849
                                }
850
                        else
851
                                {value='';}
852
                        new_content = "Voicemail Box: <input type=text name=option_route_value_" + option + " id=option_route_value_" + option + " size=12 maxlength=10 value=\"" + selected_value + "\"> <a href=\"javascript:launch_vm_chooser('option_route_value_" + option + "','date'," + chooser_height + ");\">voicemail chooser</a>";
853
                        }
854
                if (selected_route=='AGI')
855
                        {
856
                        if (route == selected_route)
857
                                {
858
                                selected_value = value;
859
                                }
860
                        else
861
                                {value='';}
862
                        new_content = "AGI: <input type=text name=option_route_value_" + option + " id=option_route_value_" + option + " size=80 maxlength=255 value=\"" + selected_value + "\"> ";
863
                        }
864
865
                if (new_content.length < 1)
866
                        {new_content = selected_route}
867
868
                span_to_update.innerHTML = new_content;
869
                }
870
871
        function call_menu_link(option,route)
872
                {
873
                var selected_value = '';
874
                var new_content = '';
875
876
                var select_list = document.getElementById("option_route_value_" + option);
877
                var selected_value = select_list.value;
878
                var span_to_update = document.getElementById("option_route_link_" + option);
879
880
                if (route=='CALLMENU')
881
                        {
882
                        new_content = "<a href=\"admin.php?ADD=3511&menu_id=" + selected_value + "\">Call Menu:</a>";
883
                        }
884
                if (route=='INGROUP')
885
                        {
886
                        new_content = "<a href=\"admin.php?ADD=3111&group_id=" + selected_value + "\">In-Group:</a>";
887
                        }
888
                if (route=='DID')
889
                        {
890
                        new_content = "<a href=\"admin.php?ADD=3311&did_pattern=" + selected_value + "\">DID:</a>";
891
                        }
892
893
                if (new_content.length < 1)
894
                        {new_content = selected_route}
895
896
                span_to_update.innerHTML = new_content;
897
                }
898
899
        <?php
900
        }
901
902
### Javascript for dynamic in-group option value entries
903
if ( ($ADD==3111) or ($ADD==2111) or ($ADD==2011) or ($ADD==4111) or ($ADD==5111) )
904
        {
905
906
        ?>
907
        function dynamic_call_action(option,route,value,chooser_height)
908
                {
909
                var call_menu_list = '<?php echo $call_menu_list ?>';
910
                var ingroup_list = '<?php echo $ingroup_list ?>';
911
                var IGcampaign_id_list = '<?php echo $IGcampaign_id_list ?>';
912
                var IGhandle_method_list = '<?php echo $IGhandle_method_list ?>';
913
                var IGsearch_method_list = '<?php echo $IGsearch_method_list ?>';
914
                var did_list = '<?php echo $did_list ?>';
915
                var selected_value = '';
916
                var selected_context = '';
917
                var new_content = '';
918
919
                var select_list = document.getElementById(option + "");
920
                var selected_route = select_list.value;
921
                var span_to_update = document.getElementById(option + "_value_span");
922
923
                if (selected_route=='CALLMENU')
924
                        {
925
                        if (route == selected_route)
926
                                {
927
                                selected_value = '<option SELECTED value="' + value + '">' + value + "</option>\n";
928
                                }
929
                        else
930
                                {value = '';}
931
                        new_content = '<span name=' + option + '_value_link id=' + option + '_value_link><a href="./admin.php?ADD=3511&menu_id=' + value + '">Call Menu: </a></span><select size=1 name=' + option + '_value id=' + option + "_value onChange=\"dynamic_call_action_link('" + option + "','CALLMENU');\">" + call_menu_list + "\n" + selected_value + '</select>';
932
                        }
933
                if (selected_route=='INGROUP')
934
                        {
935
                        if ( (route != selected_route) || (value.length < 10) )
936
                                {value = 'SALESLINE,CID,LB,998,TESTCAMP,1,,,,';}
937
                        var value_split = value.split(",");
938
                        var IGgroup_id =                                value_split[0];
939
                        var IGhandle_method =                        value_split[1];
940
                        var IGsearch_method =                        value_split[2];
941
                        var IGlist_id =                                        value_split[3];
942
                        var IGcampaign_id =                                value_split[4];
943
                        var IGphone_code =                                value_split[5];
944
                        var IGvid_enter_filename =                value_split[6];
945
                        var IGvid_id_number_filename =        value_split[7];
946
                        var IGvid_confirm_filename =        value_split[8];
947
                        var IGvid_validate_digits =                value_split[9];
948
949
                        if (route == selected_route)
950
                                {
951
                                selected_value = '<option SELECTED>' + IGgroup_id + '</option>';
952
                                }
953
954
                        new_content = new_content + '<span name=' + option + '_value_link id=' + option + '_value_link><a href="admin.php?ADD=3111&group_id=' + IGgroup_id + '">In-Group:</a> </span> ';
955
                        new_content = new_content + '<select size=1 name=IGgroup_id_' + option + ' id=IGgroup_id_' + option + " onChange=\"dynamic_call_action_link('IGgroup_id_" + option + "','INGROUP');\">";
956
                        new_content = new_content + '' + ingroup_list + "\n" + selected_value + '</select>';
957
                        new_content = new_content + ' &nbsp; Handle Method: <select size=1 name=IGhandle_method_' + option + ' id=IGhandle_method_' + option + '>';
958
                        new_content = new_content + '' + IGhandle_method_list + "\n" + '<option SELECTED>' + IGhandle_method + '</select>';
959
                        new_content = new_content + '<BR>Search Method: <select size=1 name=IGsearch_method_' + option + ' id=IGsearch_method_' + option + '>';
960
                        new_content = new_content + '' + IGsearch_method_list + "\n" + '<option SELECTED>' + IGsearch_method + '</select>';
961
                        new_content = new_content + ' &nbsp; List ID: <input type=text size=5 maxlength=14 name=IGlist_id_' + option + ' id=IGlist_id_' + option + ' value="' + IGlist_id + '">';
962
                        new_content = new_content + '<BR>Campaign ID: <select size=1 name=IGcampaign_id_' + option + ' id=IGcampaign_id_' + option + '>';
963
                        new_content = new_content + '' + IGcampaign_id_list + "\n" + '<option SELECTED>' + IGcampaign_id + '</select>';
964
                        new_content = new_content + ' &nbsp; Phone Code: <input type=text size=5 maxlength=14 name=IGphone_code_' + option + ' id=IGphone_code_' + option + ' value="' + IGphone_code + '">';
965
                //        new_content = new_content + "<BR> &nbsp; VID Enter Filename: <input type=text name=IGvid_enter_filename_" + option + " id=IGvid_enter_filename_" + option + " size=40 maxlength=255 value=\"" + IGvid_enter_filename + "\"> <a href=\"javascript:launch_chooser('IGvid_enter_filename_" + option + "','date'," + chooser_height + ");\">audio chooser</a>";
966
                //        new_content = new_content + "<BR> &nbsp; VID ID Number Filename: <input type=text name=IGvid_id_number_filename_" + option + " id=IGvid_id_number_filename_" + option + " size=40 maxlength=255 value=\"" + IGvid_id_number_filename + "\"> <a href=\"javascript:launch_chooser('IGvid_id_number_filename_" + option + "','date'," + chooser_height + ");\">audio chooser</a>";
967
                //        new_content = new_content + "<BR> &nbsp; VID Confirm Filename: <input type=text name=IGvid_confirm_filename_" + option + " id=IGvid_confirm_filename_" + option + " size=40 maxlength=255 value=\"" + IGvid_confirm_filename + "\"> <a href=\"javascript:launch_chooser('IGvid_confirm_filename_" + option + "','date'," + chooser_height + ");\">audio chooser</a>";
968
                //        new_content = new_content + ' &nbsp; VID Digits: <input type=text size=3 maxlength=3 name=IGvid_validate_digits_' + option + ' id=IGvid_validate_digits_' + option + ' value="' + IGvid_validate_digits + '">';
969
970
                        }
971
                if (selected_route=='DID')
972
                        {
973
                        if (route == selected_route)
974
                                {
975
                                selected_value = '<option SELECTED value="' + value + '">' + value + "</option>\n";
976
                                }
977
                        else
978
                                {value = '';}
979
                        new_content = '<span name=' + option + '_value_link id=' + option + '_value_link><a href="admin.php?ADD=3311&did_pattern=' + value + '">DID:</a> </span><select size=1 name=' + option + '_value id=' + option + "_value onChange=\"dynamic_call_action_link('" + option + "','DID');\">" + did_list + "\n" + selected_value + '</select>';
980
                        }
981
                if (selected_route=='MESSAGE')
982
                        {
983
                        if (route == selected_route)
984
                                {
985
                                selected_value = value;
986
                                }
987
                        else
988
                                {value = 'nbdy-avail-to-take-call|vm-goodbye';}
989
                        new_content = "Audio File: <input type=text name=" + option + "_value id=" + option + "_value size=40 maxlength=255 value=\"" + value + "\"> <a href=\"javascript:launch_chooser('" + option + "_value','date'," + chooser_height + ");\">audio chooser</a>";
990
                        }
991
                if (selected_route=='EXTENSION')
992
                        {
993
                        if ( (route != selected_route) || (value.length < 3) )
994
                                {value = '8304,default';}
995
                        var value_split = value.split(",");
996
                        var EXextension =        value_split[0];
997
                        var EXcontext =                value_split[1];
998
999
                        new_content = "Extension: <input type=text name=EXextension_" + option + " id=EXextension_" + option + " size=20 maxlength=255 value=\"" + EXextension + "\"> &nbsp; Context: <input type=text name=EXcontext_" + option + " id=EXcontext_" + option + " size=20 maxlength=255 value=\"" + EXcontext + "\"> ";
1000
                        }
1001
                if (selected_route=='VOICEMAIL')
1002
                        {
1003
                        if (route == selected_route)
1004
                                {
1005
                                selected_value = value;
1006
                                }
1007
                        else
1008
                                {value = '101';}
1009
                        new_content = "Voicemail Box: <input type=text name=" + option + "_value id=" + option + "_value size=12 maxlength=10 value=\"" + value + "\"> <a href=\"javascript:launch_vm_chooser('" + option + "_value','date'," + chooser_height + ");\">voicemail chooser</a>";
1010
                        }
1011
1012
                if (new_content.length < 1)
1013
                        {new_content = selected_route}
1014
1015
                span_to_update.innerHTML = new_content;
1016
                }
1017
1018
        function dynamic_call_action_link(field,route)
1019
                {
1020
                var selected_value = '';
1021
                var new_content = '';
1022
1023
                if ( (route=='CALLMENU') || (route=='DID') )
1024
                        {var select_list = document.getElementById(field + "_value");}
1025
                if (route=='INGROUP')
1026
                        {
1027
                        var select_list = document.getElementById(field + "");
1028
                        field = field.replace(/IGgroup_id_/, "");
1029
                        }
1030
                var selected_value = select_list.value;
1031
                var span_to_update = document.getElementById(field + "_value_link");
1032
1033
                if (route=='CALLMENU')
1034
                        {
1035
                        new_content = '<a href="admin.php?ADD=3511&menu_id=' + selected_value + '">Call Menu:</a>';
1036
                        }
1037
                if (route=='INGROUP')
1038
                        {
1039
                        new_content = '<a href="admin.php?ADD=3111&group_id=' + selected_value + '">In-Group:</a>';
1040
                        }
1041
                if (route=='DID')
1042
                        {
1043
                        new_content = '<a href="admin.php?ADD=3311&did_pattern=' + selected_value + '">DID:</a>';
1044
                        }
1045
1046
                if (new_content.length < 1)
1047
                        {new_content = selected_route}
1048
1049
                span_to_update.innerHTML = new_content;
1050
                }
1051
1052
        <?php
1053
        }
1054
echo "</script>\n";
1055
echo "<meta name=\"GOAutoDial\" content=\"GOAutoDial Inc. http://www.goautodial.com\" />\n";
1056
echo "<link rel=\"shortcut icon\" href=\"../goautodial/images/g_page_icon.ico\" >\n";
1057
echo "<link rel=\"icon\" type=\"image/png\" href=\"../goautodial/images/g_icon_05.png\" >\n";
1058
echo "<link rel=\"stylesheet\" type=\"text/css\" media=\"screen, print, projection\"  href=\"../csslibs/goiframe2.css\"></link>\n";
1059
echo "<script type=\"text/javascript\" src=\"../includes/goiframe2.js\"></script>\n";
1060
echo "</head>\n";
1061
if ( ($SSadmin_modify_refresh > 1) and (preg_match("/^3|^4/",$ADD)) )
1062
        {
1063
        echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onLoad=\"modify_refresh_display();\">\n";
1064
        }
1065
else
1066
        {
1067
        echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
1068
        }
1069
1070
echo "<!-- INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL -->\n";
1071
1072
$stmt="SELECT admin_home_url,enable_tts_integration,callcard_enabled,custom_fields_enabled from system_settings;";
1073
$rslt=mysql_query($stmt, $link);
1074
$row=mysql_fetch_row($rslt);
1075
$admin_home_url_LU =                $row[0];
1076
$SSenable_tts_integration = $row[1];
1077
$SScallcard_enabled =                $row[2];
1078
$SScustom_fields_enabled =        $row[3];
1079
1080
?>
1081
<div id="header">
1082
        <div id="gologo"><a href="http://goautodial.com" title="GOAutoDial Inc.- Empowering The Next Generation Contact Center" target="_blank"></a></div>
1083
    <div id="gomenu">
1084
<?php
1085
$stmt="SELECT user_level from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW';";
1086
if ($DB) {echo "|$stmt|\n";}
1087
if ($non_latin > 0) { $rslt=mysql_query("SET NAMES 'UTF8'");}
1088
$rslt=mysql_query($stmt, $link);
1089
$row=mysql_fetch_row($rslt);
1090
$GOuser_level=$row[0];
1091
1092
if         ($GOuser_level>8)
1093
{
1094
?>
1095
        <div id="adminbutton"><a href="admin.php?gouser=<?php echo $PHP_AUTH_USER; ?>&gopass=<?php echo $PHP_AUTH_PW; ?>" title="Vicidial Admin" id="admin">Vicidial Admin</a></div>
1096
        <div id="goadminbutton"><a href="../admin.php?gouser=<?php echo $PHP_AUTH_USER; ?>&gopass=<?php echo $PHP_AUTH_PW; ?>" title="GO Admin" id="goadmin">GO Admin</a></div>
1097
<?php
1098
}
1099
else
1100
{
1101
?>
1102
        <div id="adminbuttons"><a href="goautodial-admin/admin.php?gouser=<?php echo $PHP_AUTH_USER; ?>&gopass=<?php echo $PHP_AUTH_PW; ?>" title="Vicidial Admin" id="admin">Vicidial Admin</a></div>
1103
<?php
1104
}
1105
?>
1106
        <div id="phpmyadminbutton"><a href="../phpmyadmin/" target="_blank" title="phpMyAdmin" id="phpmyadmin">phpMyAdmin</a></div>
1107
        <div id="supportbutton"><a href="http://goautodial.com/support-ticket/" target="_blank" title="Support Center" id="support">Support Center</a></div>
1108
        <!--<div id="systembutton"><a href="#" onclick="goToURL('goautodial/g_sys_stats_cti2.php','system')" title="System Information" id="system">System Info</a></div>-->
1109
        <div id="forcelogout"><a href="../admin.php?force_logout=1" title="Logout">Logout</a></div>
1110
    </div>
1111
    <div id="bannertext">
1112
     <p>Vicidial Admin</p>
1113
    </div>
1114
</div>
1115
1116
<CENTER>
1117
<div id="contents">
1118
1119
<TABLE BGCOLOR=white cellpadding=0 cellspacing=0 id="mainTable">
1120
<!-- BEGIN SIDEBAR NAVIGATION -->
1121
<TR><TD VALIGN=TOP WIDTH=170 BGCOLOR=#616161 ALIGN=CENTER>
1122
<!--<IMG SRC="./vicidial_admin_web_logo.gif" WIDTH=170 HEIGHT=45 ALT="VICIDIAL logo">-->
1123
<!--<B><FONT FACE="ARIAL,HELVETICA" COLOR=white>ADMINISTRATION</FONT></B>--><BR style="font-size: 6px">
1124
        <TABLE CELLPADDING=2 CELLSPACING=0 BGCOLOR=#616161 WIDTH=160>
1125
        <?php if ($reports_only_user < 1) {
1126
                ?>
1127
        <!-- USERS NAVIGATION -->
1128
        <TR WIDTH=160><TD <?php echo $users_hh ?> WIDTH=160>
1129
        <a href="<?php echo $ADMIN ?>?ADD=0"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $users_fc ?> SIZE=<?php echo $header_font_size ?>><?php echo $users_bold ?>Users</a>
1130
        </TD></TR>
1131
        <?php if (strlen($users_hh) > 1) { 
1132
                ?>
1133
        <TR BGCOLOR=<?php echo $users_color ?>><TD ALIGN=LEFT>
1134
         &nbsp; <a href="<?php echo $ADMIN ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>>Show Users </a>
1135
        </TR><TR BGCOLOR=<?php echo $users_color ?>><TD ALIGN=LEFT>
1136
         &nbsp; <a href="<?php echo $ADMIN ?>?ADD=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>>Add A New User </a>
1137
        </TR><TR BGCOLOR=<?php echo $users_color ?>><TD ALIGN=LEFT>
1138
         &nbsp; <a href="<?php echo $ADMIN ?>?ADD=1A"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>>Copy User </a>
1139
        </TR><TR BGCOLOR=<?php echo $users_color ?>><TD ALIGN=LEFT>
1140
         &nbsp; <a href="<?php echo $ADMIN ?>?ADD=550"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>>Search For A User </a>
1141
        </TR><TR BGCOLOR=<?php echo $users_color ?>><TD ALIGN=LEFT>
1142
         &nbsp; <a href="./user_stats.php?user=<?php echo $user ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>>User Stats </a>
1143
        </TR><TR BGCOLOR=<?php echo $users_color ?>><TD ALIGN=LEFT>
1144
         &nbsp; <a href="./user_status.php?user=<?php echo $user ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>>User Status </a>
1145
        </TR><TR BGCOLOR=<?php echo $users_color ?>><TD ALIGN=LEFT>
1146
         &nbsp; <a href="./AST_agent_time_sheet.php?agent=<?php echo $user ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>>Time Sheet </a> </TD></TR>
1147
         <?php
1148
        if ( ($SSuser_territories_active > 0) or ($user_territories_active > 0) )
1149
                { ?>
1150
1151
        </TR><TR BGCOLOR=<?php echo $users_color ?>><TD ALIGN=LEFT>
1152
         &nbsp; <a href="./user_territories.php?agent=<?php echo $user ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>>User Territories </a> </TD></TR>
1153
1154
        <?php } 
1155
          } 
1156
        ?>
1157
        <!-- CAMPAIGNS NAVIGATION -->
1158
        <TR><TD <?php echo $campaigns_hh ?>>
1159
        <a href="<?php echo $ADMIN ?>?ADD=10"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $campaigns_fc ?> SIZE=<?php echo $header_font_size ?>><?php echo $campaigns_bold ?>Campaigns</a>
1160
        </TD></TR>
1161
        <?php
1162
        if (strlen($campaigns_hh) > 1) 
1163
                { 
1164
                if ($sh=='basic') {$sh='list';}
1165
                if ($sh=='detail') {$sh='list';}
1166
                if ($sh=='dialstat') {$sh='list';}
1167
1168
                if ($sh=='list') {$list_sh="bgcolor=\"$subcamp_color\""; $list_fc="$subcamp_font";}
1169
                        else {$list_sh=''; $list_fc='BLACK';}
1170
                if ($sh=='status') {$status_sh="bgcolor=\"$subcamp_color\""; $status_fc="$subcamp_font";}
1171
                        else {$status_sh=''; $status_fc='BLACK';}
1172
                if ($sh=='hotkey') {$hotkey_sh="bgcolor=\"$subcamp_color\""; $hotkey_fc="$subcamp_font";}
1173
                        else {$hotkey_sh=''; $hotkey_fc='BLACK';}
1174
                if ($sh=='recycle') {$recycle_sh="bgcolor=\"$subcamp_color\""; $recycle_fc="$subcamp_font";}
1175
                        else {$recycle_sh=''; $recycle_fc='BLACK';}
1176
                if ($sh=='autoalt') {$autoalt_sh="bgcolor=\"$subcamp_color\""; $autoalt_fc="$subcamp_font";}
1177
                        else {$autoalt_sh=''; $autoalt_fc='BLACK';}
1178
                if ($sh=='pause') {$pause_sh="bgcolor=\"$subcamp_color\""; $pause_fc="$subcamp_font";}
1179
                        else {$pause_sh=''; $pause_fc='BLACK';}
1180
                if ($sh=='listmix') {$listmix_sh="bgcolor=\"$subcamp_color\""; $listmix_fc="$subcamp_font";}
1181
                        else {$listmix_sh=''; $listmix_fc='BLACK';}
1182
                if ($sh=='preset') {$preset_sh="bgcolor=\"$subcamp_color\""; $preset_fc="$subcamp_font";}
1183
                        else {$preset_sh=''; $preset_fc='BLACK';}
1184
1185
                ?>
1186
                <TR BGCOLOR=<?php echo $campaigns_color ?>>
1187
                <TD ALIGN=LEFT <?php echo $list_sh ?>> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=10"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $list_fc ?> SIZE=<?php echo $subcamp_font_size ?>>Campaigns Main</a></TD>
1188
                </TR><TR BGCOLOR=<?php echo $campaigns_color ?>>
1189
                <TD ALIGN=LEFT <?php echo $status_sh ?>> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=32"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $status_fc ?> SIZE=<?php echo $subcamp_font_size ?>>Statuses</a></TD>
1190
                </TR><TR BGCOLOR=<?php echo $campaigns_color ?>>
1191
                <TD ALIGN=LEFT <?php echo $hotkey_sh ?>> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=33"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $hotkey_fc ?> SIZE=<?php echo $subcamp_font_size ?>>HotKeys</a></TD>
1192
                <?php
1193
                if ($SSoutbound_autodial_active > 0)
1194
                        {
1195
                        ?>
1196
                        </TR><TR BGCOLOR=<?php echo $campaigns_color ?>>
1197
                        <TD ALIGN=LEFT <?php echo $recycle_sh ?>> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=35"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $recycle_fc ?> SIZE=<?php echo $subcamp_font_size ?>>Lead Recycle</a></TD>
1198
                        </TR><TR BGCOLOR=<?php echo $campaigns_color ?>>
1199
                        <TD ALIGN=LEFT <?php echo $autoalt_sh ?>> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=36"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $autoalt_fc ?> SIZE=<?php echo $subcamp_font_size ?>>Auto-Alt Dial</a></TD>
1200
                        </TR><TR BGCOLOR=<?php echo $campaigns_color ?>>
1201
                        <TD ALIGN=LEFT <?php echo $listmix_sh ?>> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=39"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $listmix_fc ?> SIZE=<?php echo $subcamp_font_size ?>>List Mix</a></TD>
1202
                        <?php
1203
                        }
1204
                ?>
1205
                </TR><TR BGCOLOR=<?php echo $campaigns_color ?>>
1206
                <TD ALIGN=LEFT <?php echo $pause_sh ?>> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=37"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $pause_fc ?> SIZE=<?php echo $subcamp_font_size ?>>Pause Codes</a></TD>
1207
                </TR><TR BGCOLOR=<?php echo $campaigns_color ?>>
1208
                <TD ALIGN=LEFT <?php echo $preset_sh ?>> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=301"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $preset_fc ?> SIZE=<?php echo $subcamp_font_size ?>>Presets</a></TD>
1209
        <?php } 
1210
        ?>
1211
        <!-- LISTS NAVIGATION -->
1212
        <?php
1213
        if ($SSoutbound_autodial_active > 0)
1214
                {
1215
                ?>
1216
                <TR><TD ALIGN=LEFT <?php echo $lists_hh ?>><a href="<?php echo $ADMIN ?>?ADD=100"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $lists_fc ?> SIZE=<?php echo $header_font_size ?>><?php echo $lists_bold ?>Lists</a></TD></TR>
1217
                <?php
1218
                if (strlen($lists_hh) > 1) 
1219
                        { 
1220
                        if ($LOGdelete_from_dnc > 0) {$DNClink = 'Add-Delete DNC Number';}
1221
                        else {$DNClink = 'Add DNC Number';}
1222
                        ?>
1223
                        <TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT> &nbsp; 
1224
                        <a href="<?php echo $ADMIN ?>?ADD=100"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Lists </a>
1225
                        </TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT> &nbsp; 
1226
                        <a href="<?php echo $ADMIN ?>?ADD=111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New List </a>
1227
                        </TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT> &nbsp; 
1228
                        <a href="admin_search_lead.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Search For A Lead </a>
1229
                        </TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT> &nbsp; 
1230
                        <a href="admin_modify_lead.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Lead </a>
1231
                        </TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT> &nbsp; 
1232
                        <a href="<?php echo $ADMIN ?>?ADD=121"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> <?php echo $DNClink ?> </a>
1233
                        </TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT> &nbsp; 
1234
                        <a href="./admin_listloader_third_gen.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Load New Leads </a>
1235
                        <?php
1236
                        if ($SScustom_fields_enabled > 0)
1237
                                {
1238
                                ?>
1239
                                </TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT> &nbsp; 
1240
                                <a href="./admin_lists_custom.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> List Custom Fields </a>
1241
                                </TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT> &nbsp; 
1242
                                <a href="./admin_lists_custom.php?action=COPY_FIELDS_FORM"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Copy Custom Fields </a>
1243
                                <?php
1244
                                }
1245
                        ?>
1246
                        </TD></TR>
1247
                        <?php
1248
                        }
1249
                }
1250
        ?>
1251
        <!-- SCRIPTS NAVIGATION -->
1252
        <TR><TD <?php echo $scripts_hh ?>>
1253
        <a href="<?php echo $ADMIN ?>?ADD=1000000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $scripts_fc ?> SIZE=<?php echo $header_font_size ?>><?php echo $scripts_bold ?> Scripts </a>
1254
        </TD></TR>
1255
        <?php
1256
        if (strlen($scripts_hh) > 1) 
1257
                { 
1258
                ?>
1259
                <TR BGCOLOR=<?php echo $scripts_color ?>><TD ALIGN=LEFT> &nbsp; 
1260
                <a href="<?php echo $ADMIN ?>?ADD=1000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Scripts </a>
1261
                </TR><TR BGCOLOR=<?php echo $scripts_color ?>><TD ALIGN=LEFT> &nbsp; 
1262
                <a href="<?php echo $ADMIN ?>?ADD=1111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Script </a>
1263
                </TD></TR>
1264
                <?php } 
1265
        ?>
1266
        <!-- FILTERS NAVIGATION -->
1267
        <?php
1268
        if ($SSoutbound_autodial_active > 0)
1269
                {
1270
                ?>
1271
                <TR><TD ALIGN=LEFT <?php echo $filters_hh ?>><a href="<?php echo $ADMIN ?>?ADD=10000000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $filters_fc ?> SIZE=<?php echo $header_font_size ?>><?php echo $filters_bold ?> Filters </a></TD></TR>
1272
                <?php
1273
                if (strlen($filters_hh) > 1) 
1274
                        { 
1275
                        ?>
1276
                <TR BGCOLOR=<?php echo $filters_color ?>><TD ALIGN=LEFT> &nbsp; 
1277
                <a href="<?php echo $ADMIN ?>?ADD=10000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Filters </a>
1278
                </TR><TR BGCOLOR=<?php echo $filters_color ?>><TD ALIGN=LEFT> &nbsp; 
1279
                <a href="<?php echo $ADMIN ?>?ADD=11111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Filter </a>
1280
                </TD></TR>
1281
                <?php } 
1282
                }
1283
        ?>
1284
        <!-- INGROUPS NAVIGATION -->
1285
        <TR><TD <?php echo $ingroups_hh ?>>
1286
        <a href="<?php echo $ADMIN ?>?ADD=1000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $ingroups_fc ?> SIZE=<?php echo $header_font_size ?>><?php echo $ingroups_bold ?> Inbound </a>
1287
        </TD></TR>
1288
        <?php
1289
        if (strlen($ingroups_hh) > 1) 
1290
                {
1291
                if ($LOGdelete_from_dnc > 0) {$FPGlink = 'Add-Delete FPG Number';}
1292
                else {$FPGlink = 'Add FPG Number';}
1293
                ?>
1294
                <TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1295
                <a href="<?php echo $ADMIN ?>?ADD=1000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show In-Groups </a>
1296
                </TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1297
                <a href="<?php echo $ADMIN ?>?ADD=1111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New In-Group </a>
1298
                </TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1299
                <a href="<?php echo $ADMIN ?>?ADD=1211"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Copy In-Group </a><HR>
1300
                </TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1301
                <a href="<?php echo $ADMIN ?>?ADD=1300"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show DIDs </a>
1302
                </TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1303
                <a href="<?php echo $ADMIN ?>?ADD=1311"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New DID </a>
1304
                </TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1305
                <a href="<?php echo $ADMIN ?>?ADD=1411"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Copy DID </a><HR>
1306
                </TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1307
                <a href="<?php echo $ADMIN ?>?ADD=1500"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Call Menus </a>
1308
                </TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1309
                <a href="<?php echo $ADMIN ?>?ADD=1511"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Call Menu </a>
1310
                </TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1311
                <a href="<?php echo $ADMIN ?>?ADD=1611"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Copy Call Menu </a><HR>
1312
                </TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1313
                <a href="<?php echo $ADMIN ?>?ADD=1700"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Filter Phone Groups </a>
1314
                </TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1315
                <a href="<?php echo $ADMIN ?>?ADD=1711"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add Filter Phone Group </a>
1316
                </TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1317
                <a href="<?php echo $ADMIN ?>?ADD=171"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> <?php echo $FPGlink ?> </a>
1318
                </TD></TR>
1319
                <?php } 
1320
                ?>
1321
        <!-- USERGROUPS NAVIGATION -->
1322
        <TR><TD <?php echo $usergroups_hh ?>>
1323
        <a href="<?php echo $ADMIN ?>?ADD=100000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $usergroups_fc ?> SIZE=<?php echo $header_font_size ?>><?php echo $usergroups_bold ?> User Groups </a>
1324
        </TD></TR>
1325
        <?php
1326
        if (strlen($usergroups_hh) > 1)
1327
                { 
1328
                ?>
1329
                <TR BGCOLOR=<?php echo $usergroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1330
                <a href="<?php echo $ADMIN ?>?ADD=100000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show User Groups </a>
1331
                </TR><TR BGCOLOR=<?php echo $usergroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1332
                <a href="<?php echo $ADMIN ?>?ADD=111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New User Group </a>
1333
                </TR><TR BGCOLOR=<?php echo $usergroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1334
                <a href="group_hourly_stats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Group Hourly Report </a>
1335
                </TR><TR BGCOLOR=<?php echo $usergroups_color ?>><TD ALIGN=LEFT> &nbsp; 
1336
                <a href="user_group_bulk_change.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Bulk Group Change </a>
1337
                </TD></TR>
1338
                <?php } 
1339
        ?>
1340
        <!-- REMOTEAGENTS NAVIGATION -->
1341
        <TR><TD <?php echo $remoteagent_hh ?>>
1342
        <a href="<?php echo $ADMIN ?>?ADD=10000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $remoteagent_fc ?> SIZE=<?php echo $header_font_size ?>><?php echo $remoteagent_bold ?> Remote Agents </a>
1343
        </TD></TR>
1344
        <?php
1345
        if (strlen($remoteagent_hh) > 1) 
1346
                { 
1347
                ?>
1348
                <TR BGCOLOR=<?php echo $remoteagent_color ?>><TD ALIGN=LEFT> &nbsp; 
1349
                <a href="<?php echo $ADMIN ?>?ADD=10000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Remote Agents </a>
1350
                </TR><TR BGCOLOR=<?php echo $remoteagent_color ?>><TD ALIGN=LEFT> &nbsp; 
1351
                <a href="<?php echo $ADMIN ?>?ADD=11111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add New Remote Agents </a>
1352
                </TR><TR BGCOLOR=<?php echo $remoteagent_color ?>><TD ALIGN=LEFT> &nbsp; 
1353
                <a href="<?php echo $ADMIN ?>?ADD=12000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Extension Groups </a>
1354
                </TR><TR BGCOLOR=<?php echo $remoteagent_color ?>><TD ALIGN=LEFT> &nbsp; 
1355
                <a href="<?php echo $ADMIN ?>?ADD=12111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add Extension Group </a>
1356
                </TD></TR>
1357
        <?php } 
1358
        ?>
1359
        <!-- ADMIN NAVIGATION -->
1360
        <TR><TD <?php echo $admin_hh ?>>
1361
        <a href="<?php echo $ADMIN ?>?ADD=999998"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $admin_fc ?> SIZE=<?php echo $header_font_size ?>><?php echo $admin_bold ?> Admin </a>
1362
        </TD></TR>
1363
        <?php
1364
        if (strlen($admin_hh) > 1) 
1365
                { 
1366
                if ($sh=='times') {$times_sh="bgcolor=\"$times_color\""; $times_fc="$times_font";}
1367
                        else {$times_sh=''; $times_fc='BLACK';}
1368
                if ($sh=='shifts') {$shifts_sh="bgcolor=\"$shifts_color\""; $shifts_fc="$shifts_font";}
1369
                        else {$shifts_sh=''; $shifts_fc='BLACK';}
1370
                if ($sh=='templates') {$templates_sh="bgcolor=\"$templates_color\""; $templates_fc="$templates_font";}
1371
                        else {$templates_sh=''; $templates_fc='BLACK';}
1372
                if ($sh=='carriers') {$carriers_sh="bgcolor=\"$carriers_color\""; $carriers_fc="$carriers_font";}
1373
                        else {$carriers_sh=''; $carriers_fc='BLACK';}
1374
                if ($sh=='phones') {$phones_sh="bgcolor=\"$server_color\""; $phones_fc="$phones_font";}
1375
                        else {$phones_sh=''; $phones_fc='BLACK';}
1376
                if ($sh=='server') {$server_sh="bgcolor=\"$server_color\""; $server_fc="$server_font";}
1377
                        else {$server_sh=''; $server_fc='BLACK';}
1378
                if ($sh=='conference') {$conference_sh="bgcolor=\"$server_color\""; $conference_fc="$server_font";}
1379
                        else {$conference_sh=''; $conference_fc='BLACK';}
1380
                if ($sh=='settings') {$settings_sh="bgcolor=\"$settings_color\""; $settings_fc="$settings_font";}
1381
                        else {$settings_sh=''; $settings_fc='BLACK';}
1382
                if ($sh=='status') {$status_sh="bgcolor=\"$status_color\""; $status_fc="$status_font";}
1383
                        else {$status_sh=''; $status_fc='BLACK';}
1384
                if ($sh=='audio') {$audio_sh="bgcolor=\"$audio_color\""; $audio_fc="$audio_font";}
1385
                        else {$audio_sh=''; $audio_fc='BLACK';}
1386
                if ($sh=='moh') {$moh_sh="bgcolor=\"$moh_color\""; $moh_fc="$moh_font";}
1387
                        else {$moh_sh=''; $moh_fc='BLACK';}
1388
                if ($sh=='vm') {$vm_sh="bgcolor=\"$vm_color\""; $vm_fc="$vm_font";}
1389
                        else {$vm_sh=''; $vm_fc='BLACK';}
1390
                if ($sh=='tts') {$tts_sh="bgcolor=\"$tts_color\""; $tts_fc="$tts_font";}
1391
                        else {$tts_sh=''; $tts_fc='BLACK';}
1392
                if ($sh=='cc') {$cc_sh="bgcolor=\"$cc_color\""; $cc_fc="$cc_font";}
1393
                        else {$cc_sh=''; $cc_fc='BLACK';}
1394
1395
                ?>
1396
                <TR BGCOLOR=<?php echo $admin_color ?>>
1397
                <TD ALIGN=LEFT <?php echo $times_sh ?> COLSPAN=2> &nbsp; 
1398
                <a href="<?php echo $ADMIN ?>?ADD=100000000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $times_fc ?> SIZE=<?php echo $header_font_size ?>> Call Times </a></TD>
1399
                </TR><TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $shifts_sh ?>> &nbsp; 
1400
                <a href="<?php echo $ADMIN ?>?ADD=130000000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $shifts_fc ?> SIZE=<?php echo $header_font_size ?>> Shifts </a></TD>
1401
                </TR><TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $phones_sh ?>> &nbsp; 
1402
                <a href="<?php echo $ADMIN ?>?ADD=10000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $phones_fc ?> SIZE=<?php echo $header_font_size ?>> Phones </a></TD>
1403
                </TR><TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $templates_sh ?>> &nbsp; 
1404
                <a href="<?php echo $ADMIN ?>?ADD=130000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $templates_fc ?> SIZE=<?php echo $header_font_size ?>> Templates </a></TD>
1405
                </TR><TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $carriers_sh ?>> &nbsp; 
1406
                <a href="<?php echo $ADMIN ?>?ADD=140000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $carriers_fc ?> SIZE=<?php echo $header_font_size ?>> Carriers </a></TD>
1407
                </TR><TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $server_sh ?>> &nbsp; 
1408
                <a href="<?php echo $ADMIN ?>?ADD=100000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $server_fc ?> SIZE=<?php echo $header_font_size ?>> Servers </a></TD>
1409
                </TR><TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $conference_sh ?>> &nbsp; 
1410
                <a href="<?php echo $ADMIN ?>?ADD=1000000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $conference_fc ?> SIZE=<?php echo $header_font_size ?>> Conferences </a></TD>
1411
                </TR><TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $settings_sh ?>> &nbsp; 
1412
                <a href="<?php echo $ADMIN ?>?ADD=311111111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $settings_fc ?> SIZE=<?php echo $header_font_size ?>> System Settings </a></TD>
1413
                </TR><TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $status_sh ?>> &nbsp; 
1414
                <a href="<?php echo $ADMIN ?>?ADD=321111111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $status_fc ?> SIZE=<?php echo $header_font_size ?>> System Statuses </a></TD>
1415
                </TR><TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $vm_sh ?>> &nbsp; 
1416
                <a href="<?php echo $ADMIN ?>?ADD=170000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $vm_fc ?> SIZE=<?php echo $header_font_size ?>> Voicemail </a></TD>
1417
                </TR>
1418
                <?php if ( ($sounds_central_control_active > 0) or ($SSsounds_central_control_active > 0) )
1419
                        { ?>
1420
                        <TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $audio_sh ?>> &nbsp; 
1421
                        <a href="audio_store.php"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $audio_fc ?> SIZE=<?php echo $header_font_size ?>> Audio Store </a></TD>
1422
                        </TR>
1423
                        <TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $moh_sh ?>> &nbsp; 
1424
                        <a href="<?php echo $ADMIN ?>?ADD=160000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $moh_fc ?> SIZE=<?php echo $header_font_size ?>> Music On Hold </a></TD>
1425
                        </TR>
1426
1427
                <?php }
1428
                if ($SSenable_tts_integration > 0)
1429
                        { ?>
1430
                        <TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $tts_sh ?>> &nbsp; 
1431
                        <a href="<?php echo $ADMIN ?>?ADD=150000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $tts_fc ?> SIZE=<?php echo $header_font_size ?>> Text To Speech </a></TD>
1432
                        </TR>
1433
1434
                <?php }
1435
                if ($SScallcard_enabled > 0)
1436
                        { ?>
1437
                        <TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $cc_sh ?>> &nbsp; 
1438
                        <a href="callcard_admin.php"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $cc_fc ?> SIZE=<?php echo $header_font_size ?>> CallCard Admin </a></TD>
1439
                        </TR>
1440
1441
                <?php }
1442
                        }
1443
                }
1444
        ?>
1445
        <!-- REPORTS NAVIGATION -->
1446
        <TR><TD <?php echo $reports_hh ?>>
1447
        <a href="<?php echo $ADMIN ?>?ADD=999999"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $reports_fc ?> SIZE=<?php echo $header_font_size ?>><?php echo $reports_bold ?> Reports </a>
1448
        </TD></TR>
1449
        <TR><TD>&nbsp;  </TD></TR>
1450
        </TABLE>
1451
</TD><TD VALIGN=TOP WIDTH=<?php echo $page_width ?> BGCOLOR=#EFEFEF>
1452
<!-- END SIDEBAR NAVIGATION -->
1453
1454
<span style="position:absolute;left:300px;top:30px;z-index:1;visibility:hidden;" id="audio_chooser_span">
1455
1456
</span>
1457
1458
<TABLE BGCOLOR=#EFEFEF cellpadding=2 cellspacing=0 WIDTH=<?php echo $page_width ?> HEIGHT=15>
1459
<TR BGCOLOR=#616161><TD ALIGN=LEFT BGCOLOR=#616161><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><a href="<?php echo $admin_home_url_LU ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>HOME</a> | <A HREF="../agc/timeclock.php?referrer=admin"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1> Timeclock</A> | <a href="<?php echo $ADMIN ?>?force_logout=1"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>Logout</a> <FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>(<?php echo $PHP_AUTH_USER ?>)</FONT></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><?php echo date("l F j, Y G:i:s A") ?> &nbsp; </B></TD></TR>
1460
1461
<TR BGCOLOR=#616161>
1462
1463
1464
1465
1466
1467
1468
1469
</TR>
1470
        <?php
1471
        if (strlen($list_sh) > 1) { 
1472
                ?>
1473
        <TR BGCOLOR=<?php echo $subcamp_color ?>><TD ALIGN=LEFT COLSPAN=2><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subcamp_font_size ?>> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=10"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subcamp_font_size ?>> Show Campaigns </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<?php echo $ADMIN ?>?ADD=11"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subcamp_font_size ?>> Add A New Campaign </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<?php echo $ADMIN ?>?ADD=12"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subcamp_font_size ?>> Copy Campaign </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="./AST_timeonVDADallSUMMARY.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subcamp_font_size ?>> Real-Time Campaigns Summary </a></TD></TR>
1474
                <?php } 
1475
1476
        if (strlen($times_sh) > 1) { 
1477
                ?>
1478
        <TR BGCOLOR=<?php echo $times_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=100000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Call Times </a> &nbsp;| <a href="<?php echo $ADMIN ?>?ADD=111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Call Time </a> &nbsp;| <a href="<?php echo $ADMIN ?>?ADD=1000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show State Call Times </a> &nbsp;| <a href="<?php echo $ADMIN ?>?ADD=1111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New State Call Time </a></TD></TR>
1479
                <?php } 
1480
        if (strlen($shifts_sh) > 1) { 
1481
                ?>
1482
        <TR BGCOLOR=<?php echo $shifts_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=130000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Shifts </a> &nbsp;| <a href="<?php echo $ADMIN ?>?ADD=131111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Shift </a></TD></TR>
1483
                <?php } 
1484
        if (strlen($phones_sh) > 1) { 
1485
                ?>
1486
        <TR BGCOLOR=<?php echo $phones_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=10000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Phones </a>&nbsp;|&nbsp;<a href="<?php echo $ADMIN ?>?ADD=11111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Phone </a>&nbsp;|&nbsp;<a href="<?php echo $ADMIN ?>?ADD=12000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Phone Alias List </a>&nbsp;|&nbsp;<a href="<?php echo $ADMIN ?>?ADD=12111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Phone Alias </a>&nbsp;|&nbsp;<a href="<?php echo $ADMIN ?>?ADD=13000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Group Alias List </a>&nbsp;|&nbsp;<a href="<?php echo $ADMIN ?>?ADD=13111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Group Alias </a></TD></TR>
1487
                <?php }
1488
        if (strlen($conference_sh) > 1) { 
1489
                ?>
1490
        <TR BGCOLOR=<?php echo $conference_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=1000000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Conferences </a> &nbsp; | &nbsp; <a href="<?php echo $ADMIN ?>?ADD=1111111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Conference </a> &nbsp; | &nbsp; <a href="<?php echo $ADMIN ?>?ADD=10000000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show VICIDIAL Conferences </a> &nbsp; | &nbsp; <a href="<?php echo $ADMIN ?>?ADD=11111111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New VICIDIAL Conference </a></TD></TR>
1491
                <?php }
1492
        if ( (strlen($server_sh) > 1) and (strlen($admin_hh) > 1) ) { 
1493
                ?>
1494
        <TR BGCOLOR=<?php echo $server_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=100000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Servers </a> &nbsp; | &nbsp; <a href="<?php echo $ADMIN ?>?ADD=111111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Server </a></TD></TR>
1495
        <?php }
1496
        if ( (strlen($templates_sh) > 1) and (strlen($admin_hh) > 1) ) { 
1497
                ?>
1498
        <TR BGCOLOR=<?php echo $templates_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=130000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Templates </a> &nbsp; | &nbsp; <a href="<?php echo $ADMIN ?>?ADD=131111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Template </a></TD></TR>
1499
        <?php }
1500
        if ( (strlen($carriers_sh) > 1) and (strlen($admin_hh) > 1) ) { 
1501
                ?>
1502
        <TR BGCOLOR=<?php echo $carriers_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=140000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Carriers </a> &nbsp; | &nbsp; <a href="<?php echo $ADMIN ?>?ADD=141111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Carrier </a> &nbsp; | &nbsp; <a href="<?php echo $ADMIN ?>?ADD=140111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Copy A Carrier </a></TD></TR>
1503
        <?php }
1504
        if ( (strlen($tts_sh) > 1) and (strlen($admin_hh) > 1) ) { 
1505
                ?>
1506
        <TR BGCOLOR=<?php echo $tts_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=150000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show TTS Entries </a> &nbsp; | &nbsp; <a href="<?php echo $ADMIN ?>?ADD=151111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New TTS Entry </a></TD></TR>
1507
        <?php }
1508
        if ( (strlen($cc_sh) > 1) and (strlen($admin_hh) > 1) ) { 
1509
                ?>
1510
        <TR BGCOLOR=<?php echo $cc_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="callcard_admin.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> CallCard Summary </a> &nbsp; | &nbsp; <a href="callcard_admin.php?action=CALLCARD_RUNS"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Runs </a> &nbsp; | &nbsp; <a href="callcard_admin.php?action=CALLCARD_BATCHES"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Batches </a> &nbsp; | &nbsp; <a href="callcard_admin.php?action=SEARCH"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> CallCard Search </a> &nbsp; | &nbsp; <a href="callcard_report_export.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> CallCard Log Export </a> &nbsp; | &nbsp; <a href="callcard_admin.php?action=GENERATE"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> CallCard Generate New Numbers </a></TD></TR>
1511
        <?php }
1512
        if ( (strlen($moh_sh) > 1) and (strlen($admin_hh) > 1) ) { 
1513
                ?>
1514
        <TR BGCOLOR=<?php echo $moh_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=160000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show MOH Entries </a> &nbsp; | &nbsp; <a href="<?php echo $ADMIN ?>?ADD=161111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New MOH Entry </a></TD></TR>
1515
        <?php }
1516
        if ( (strlen($vm_sh) > 1) and (strlen($admin_hh) > 1) ) { 
1517
                ?>
1518
        <TR BGCOLOR=<?php echo $vm_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=170000000000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Voicemail Entries </a> &nbsp; | &nbsp; <a href="<?php echo $ADMIN ?>?ADD=171111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Voicemail Entry </a></TD></TR>
1519
        <?php }
1520
        if (strlen($settings_sh) > 1) { 
1521
                ?>
1522
        <TR BGCOLOR=<?php echo $settings_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=311111111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> System Settings </a></TD></TR>
1523
        <?php }
1524
        if ( (strlen($status_sh) > 1) and (!eregi('campaign',$hh) ) ) { 
1525
                ?>
1526
        <TR BGCOLOR=<?php echo $status_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="<?php echo $ADMIN ?>?ADD=321111111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> System Statuses </a> &nbsp; | &nbsp; <a href="<?php echo $ADMIN ?>?ADD=331111111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Status Categories </a> &nbsp; | &nbsp; <a href="<?php echo $ADMIN ?>?ADD=341111111111111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> QC Status Codes </a></TD></TR>
1527
        <?php }
1528
1529
        if ( ($ADD=='3') or ($ADD=='3') ) { 
1530
                ?>
1531
        <TR BGCOLOR=<?php echo $users_color ?>><TD ALIGN=LEFT COLSPAN=2> &nbsp; <a href="./user_stats.php?user=<?php echo $user ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>>User Stats </a> &nbsp; | &nbsp; <a href="./user_status.php?user=<?php echo $user ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>>User Status </a> &nbsp; | &nbsp; <a href="./AST_agent_time_sheet.php?agent=<?php echo $user ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>>Time Sheet </a> &nbsp; | &nbsp; <a href="./AST_agent_days_detail.php?user=<?php echo $user ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>>Days Status </a></TD></TR>
1532
        <?php }
1533
1534
        
1535
if (strlen($reports_hh) > 1) { 
1536
        ?>
1537
<TR BGCOLOR=<?php echo $reports_color ?>><TD ALIGN=LEFT COLSPAN=2><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>><B> &nbsp; </B></TD></TR>
1538
<?php } ?>
1539
1540
1541
<TR><TD ALIGN=LEFT COLSPAN=2 HEIGHT=2 BGCOLOR=#616161></TD></TR>
1542
<TR><TD ALIGN=LEFT COLSPAN=2>
1543
<?php 
1544
######################### FULL HTML HEADER END #######################################
1545
}