|
0) { $i=0; foreach($a_dialplan_includes as $row) { if ($row["dialplanincludeid"] == $faxid) { $order = $row['order']; unset($a_dialplan_includes[$i]); } $i++; } } //delete the dialplan include details. aka. child data if (count($a_dialplan_includes_details) > 0) { $i=0; foreach($a_dialplan_includes_details as $row) { if ($row["dialplanincludeid"] == $faxid) { unset($a_dialplan_includes_details[$i]); } $i++; } } if (file_exists("/usr/local/freeswitch/conf/dialplan/default/".$order."_".$faxname.".xml")){ unlink("/usr/local/freeswitch/conf/dialplan/default/".$order."_".$faxname.".xml"); } //remove fax entries unset($a_fax[$_GET['id']]); write_config(); header("Location: freeswitch_fax.php"); exit; } } } if ($_GET['a'] == "download") { session_cache_limiter('public'); if ($_GET['type'] = "fax_file") { if (file_exists($dir_fax.$_GET['filename'])) { $fd = fopen($dir_fax.$_GET['filename'], "rb"); if ($_GET['t'] == "bin") { header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Description: File Transfer"); header('Content-Disposition: attachment; filename="'.$_GET['filename'].'"'); } else { $file_ext = substr($_GET['filename'], -3); if ($file_ext == "png") { header("Content-Type: image/png"); } } header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Content-Length: " . filesize($dir_fax.$_GET['filename'])); fpassthru($fd); } } exit; } else { //echo $dir_fax.$_GET['filename']; } if ($_GET['act'] == "del") { if ($_GET['type'] == 'fax_file') { //if ($a_fax[$_GET['id']]) { $tmp_file_array = split("\.",$_GET['filename']); $file_name = $tmp_file_array[0]; $file_ext = $tmp_file_array[1]; unlink_if_exists($dir_fax.$file_name.".pdf"); unlink_if_exists($dir_fax.$file_name.".png"); unlink_if_exists($dir_fax.$file_name.".tif"); //unset($a_fax[$_GET['id']]); write_config(); header("Location: freeswitch_fax.php"); exit; //} } } include("head.inc"); ?>
$v_project_label: FAX\n"; ?>
|