Created
February 20, 2014 04:28
-
-
Save RSquaredSoftware/9107108 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GNU nano 1.3.12 File: Avatar_backup.php | |
<?php | |
### /poundteam/Avatar1.php | |
### | |
### Purpose: Play sounds in agent meetme room and kill them based on button press of agent on this page. | |
### | |
### Files will be edited via "edit_avatars.php". Further documentation there. | |
### | |
### /poundteam/Avatar1.php?avatar=Avatar1 | |
### /vicidial/admin.php | |
### /agc/vicidial.php?relogin=YES&session_epoch=1382401138&session_id=8600067&session_name=1382401119_X10115570535&VD_login=&VD_campaign=AVATAR&phone_login=&phone_pass=&VD_pass= | |
define('DEBUG', false); | |
require_once("scripts/Avatar1_functions.php"); | |
require_once("../vicidial/dbconnect.php"); | |
$DBLink = new mysqli($VARDB_server, $VARDB_user, $VARDB_pass, $VARDB_database, $VARDB_port); | |
header("Content-type: text/html; charset=utf-8"); | |
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 | |
header("Pragma: no-cache"); // HTTP/1.0 | |
$version = '0.5.1'; | |
$build = '000001'; | |
if (isset($_GET['avatar'])) { | |
$avatarname = $_GET['avatar']; | |
} else { | |
$avatarname = 'Avatar1'; | |
} | |
$session_id = $_GET['session_id']; | |
$server_ip = $_GET['server_ip']; | |
$Query = "select id from avatars where upper(name)=upper('$avatarname')"; | |
$avatars_id = GetData($DBLink, $Query); | |
$Query = "select * from avatar where active='Y' and avatars_id='{$avatars_id[0]['id']}' order by sort"; | |
$avatars = GetData($DBLink, $Query); | |
echo "<!DOCTYPE html><html>\n"; | |
echo '<head><script type="text/javascript" src="scripts/Avatar1.js"></script>'; | |
echo "<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>\n"; | |
echo "<!-- VERSION: $version --- BUILD: $build -->\n"; | |
echo "<title>$avatarname</title>\n"; | |
echo "</head><body>\n"; | |
echo "<center><table cellspacing=3>\n"; | |
echo "<tr bgcolor=#015B91><td align='center'><font color=white>$avatarname</font></td><td colspan=4 align=center><font color=white><b>Avatar Dialing by PoundTeam <button name=click onclick=\"loadXMLDoc('cancel')\" id='cancel'>cancel</Button><input type$ | |
$counter = 0; | |
foreach ($avatars as $avatar) { | |
if ($avatar['align'] == 'V') { | |
// THIS avatar is V | |
if ($align == 'H') { | |
// Previous avatar was H, end previous cell (it will have been left open) | |
echo "</td>"; | |
} | |
$align = 'V'; | |
echo "<tr bgcolor=#B6D3FC><td align=right><button name=click onclick=\"loadXMLDoc('{$avatar['filename']}')\" id='{$avatar['filename']}'>{$avatar['button_text']}</Button></td><td colspan='4' align=left>{$avatar['script']}</td>\n"; | |
echo "</tr>"; | |
$counter++; | |
if ($counter == 20) { | |
// Every 20 vertical lines, put in a Cancel so one will always be visible | |
$counter = 0; | |
echo "<tr bgcolor=#015B91><td align='center'><font color=white>$avatarname</font> <button name=click onclick=\"loadXMLDoc('cancel')\" id='cancel'>cancel</Button></td><td colspan=4 align=center><font color=white><b>Avatar Dialing by Pou$ | |
} | |
} elseif ($avatar['align'] == 'H') { | |
// THIS avatar is H | |
if ($align == 'V') { | |
// Previous was V, set up for "first H" | |
echo "<tr><td></td><td>"; | |
} | |
echo "<button name=click onclick=\"loadXMLDoc('{$avatar['filename']}')\" id='{$avatar['filename']}'>{$avatar['button_text']}</Button> \n"; | |
$align = 'H'; | |
} elseif ($avatar['align'] == 'X') { | |
// THIS avatar is X (which is "start a new line" of H) | |
echo "<tr><td>"; | |
echo "<button name=click onclick=\"loadXMLDoc('{$avatar['filename']}')\" id='{$avatar['filename']}'>{$avatar['button_text']}</Button> \n"; | |
echo "</td><td>"; | |
$align = 'H'; | |
} | |
} | |
echo "<tr bgcolor=#015B91><td colspan=5 align=center><font color=white><b>Avatar Dialing by PoundTeam <button name=click onclick=\"loadXMLDoc('cancel')\" id='cancel'>cancel</Button>"; | |
echo "</table></center>\n"; | |
if (DEBUG) { | |
echo "<pre>GET "; | |
print_r($_GET); | |
echo "POST "; | |
print_r($_POST); | |
echo $debug; | |
} | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment