HEX
Server: Apache
System: Linux www3.pit.tblive.com 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User: awaldron (1020)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //home/awaldron/public_html/archive/demo/directory_extlist.php
<?php
session_start();

include("_functions.php");
echo dbconnect();

echo "<html><head><title>Print Friendly Extension List</title></head>\n";
echo "<body style=\"font-size:9px;font-family:Arial;\">\n";

	$sql = "SELECT * FROM tbl_employees WHERE is_employee=1 AND acct_confirmed=1 AND ext_display=1 AND ph_direct <> '' ORDER BY lname ASC";
	$result = mysql_query($sql);
	for ($i=0; $i <= mysql_num_rows($result); $i++) {
		$emp = mysql_fetch_array($result);
		if (($emp["lname"] == "") || ($emp["fname"] == "")) $comma = "";
		else $comma = ", ";
		$listarr[$i] = $emp["lname"].$comma.$emp["fname"]."|||";
		if ($emp["set_ext"] != 0) $listarr[$i] .= $emp["set_ext"];
		else $listarr[$i] .= substr(trim(str_replace(" ","",$emp["ph_direct"])),-4);
	}	
	sort($listarr);
	
	echo "<center>\n";

	echo "<table border=0 cellspacing=0 cellpadding=0 width=100%>\n";
	echo "<tr><td style=\"font-size:20px;font-family:Arial Black;\">".CMP_NAME_INF." Extension List</td>\n";
	echo "    <td style=\"font-size:14px;font-family:Arial;\" align=right valign=bottom><b>".date("l, F j, Y")."</b></td></tr>\n";
	echo "<tr><td height=1 colspan=2><img src=\"/gui/black.gif\" width=100% height=1></td></tr>\n";
	echo "</table>\n";
	
	echo "<table border=0 width=100% cellspacing=15 cellpadding=0>\n";
	//echo "<tr><td colspan=2>\n";
	//echo "<div style=\"border:solid 4px;padding:5px;font-size:10px;font-family:Arial;text-align:center;\">\n";
	//echo "<b>Vocollect Main: 412-829-8145 &nbsp; &nbsp; Toll Free: 1-866-862-6553<br>Marketing: 1-866-238-4810<br>Europe Main: (44) 01628552900</b><br>Healthcare Systems: 412-825-5400 &nbsp; &nbsp; Toll Free: 1-877-282-3456</div>\n";
	//echo "</td><td colspan=2>\n";
	//echo "<div style=\"border:solid 4px;padding:5px;font-size:10px;font-family:Arial;text-align:center;\">\n";
	//echo "<b>Direct Dial: 412 - 349 - (extension number)<br># = System Speed Dial (SSD's do not have a direct dial)<br>Trasfer directly to Voice Mail: Transfer, *9, xxxx</b><br>&nbsp;</div>\n";
	//echo "</td></tr>\n";
	echo "<tr>\n";
	
	$e = 0;
	for ($n=1; $n <= 4; $n++) {
		echo "<td valign=\"top\">\n";
		echo "<table border=0 cellspacing=0 cellpadding=0 width=100% style=\"font-size:9px;font-family:Verdana;\">\n";
		echo "<tr><td colspan=5 height=1><img src=\"/gui/black.gif\" width=100% height=1></td></tr>\n";
		
		$cells = count($listarr);
		for ($k=(ceil($cells/4)*($n-1)); $k < (ceil($cells/4)*$n); $k++) {
				$vals = explode("|||",$listarr[$k]);
				echo "<tr><td height=14 width=1><img src=\"/gui/black.gif\" width=1 height=14></td>\n";
				echo "    <td width=80%>&nbsp;".($vals[0]=="Front Desk (Security)"||$vals[0]=="IST Help Desk"?"<b>":"").$vals[0].($vals[0]=="Front Desk (Security)"||$vals[0]=="IST Help Desk"?"</b>":"")."&nbsp;</td>\n";
				echo "    <td height=14 width=1><img src=\"/gui/black.gif\" width=1 height=14></td>\n";
				echo "    <td width=20% align=\"center\">".$vals[1]."</td>\n";
				echo "    <td height=14 width=1><img src=\"/gui/black.gif\" width=1 height=14></td></tr>\n";
				echo "<tr><td colspan=5 height=1><img src=\"/gui/black.gif\" width=100% height=1></td></tr>\n";
		}
		
		echo "</table>";
		echo "</td>\n";
	}
	
	echo "</tr></table>\n";
	
	echo "<table border=0 cellspacing=2 cellpadding=0 style=\"font-size:10px\">\n";
	//echo "<tr><td colspan=8><b>Fax Numbers:</b></td></tr>\n";
	//echo "<tr><td colspan=8 height=1><img src=\"/gui/black.gif\" width=100% height=1></td></tr>\n";
	//echo "<tr><td><b>Main:</b></td><td>412-829-0972</td><td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>";
	//echo "    <td><b>Customer Service:</b></td><td>412-829-8097</td><td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>";
	//echo "    <td><b>Administration Service:</b></td><td>412-829-8040</td></tr>\n";
	//echo "<tr><td><b>701 Rodi Rd:</b></td><td>412-825-6234</td><td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>";
	//echo "    <td><b>Production:</b></td><td>412-829-0837</td><td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>";
	//echo "    <td><b>Engineering:</b></td><td>412-824-9465</td></tr>\n";
	//echo "<tr><td><b>Europe:</b></td><td>+44 (0) 1628 55 2901</td><td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>\n";
	//echo "    <td><b>Human Resources:</b></td><td>412-824-2815</td><td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>";
	//echo "    <td><b>Healthcare Systems:</b></td><td>412-825-6234</td><td></td></tr>";
	echo "</table>\n";
		
echo "</center>\n";
echo "</body></html>\n";
?>