Esempio n. 1
0
?>
<!-- main header end -->
<!-- main sidebar -->
<?php 
include_once 'includes/sidemenu.php';
?>
<!-- main sidebar end -->

<?php 
$faxObjCon = new faxController();
if (isset($_REQUEST['submit'])) {
    $faxId = $faxObjCon->copyFiles($_POST, $_FILES);
    if (isset($_POST['hidd_values'])) {
        $arrToUserIds = explode(",", $_POST['hidd_values']);
        for ($i = 0; $i < count($arrToUserIds); $i++) {
            $faxObjCon->insertToFaxIds($arrToUserIds[$i], $faxId);
        }
    } else {
        $arrToId = $_POST['hidd_values'];
        $faxObjCon->insertToFaxIds($arrToId, $faxId);
    }
    header("location:inbox.php");
}
if ($_GET['action'] == "delete" && $_GET['faxsId'] != "") {
    $faxObjCon->deleteFax($_GET['faxsId']);
    header("location:inbox.php");
}
?>

<style>
/*for autocomplete css*/
Esempio n. 2
0
 if ($uploadfile != '') {
     $_POST['attachment_id'] = substr($uploadfile, 0, -1);
 } else {
     $_POST['attachment_id'] = '';
 }
 $_POST['message_body'] = $_POST['reply_message'];
 $_POST['message_subject'] = "Reply:" . $_POST['reply_subject'];
 $_POST['saved_pdf_file'] = $newsavedPdf . ".pdf";
 $faxId = $faxObjCon->copyFiles($_POST, $_FILES);
 //echo $html1;
 $pdf->WriteHTML($html, false, 0, true, 0);
 $pdf->WriteHTML($html1, false, 0, true, 0);
 $pdf->Output($_SERVER['DOCUMENT_ROOT'] . 'nf/upload_dir/savedpdfs/' . $newsavedPdf . '.pdf', 'F');
 $_POST['saved_pdf_file'] = $newsavedPdf . ".pdf";
 $faxObjCon->sendReply($_POST);
 $faxObjCon->insertToFaxIds($_POST['to_id'], $faxId);
 //echo "<pre>";print_r($_POST); echo "</pre>";
 //echo $to_faxid;
 //echo "<br>";
 //echo $newsavedPdf.'.pdf';
 // Updating the file uploads pdf name
 /*$collectionUp = $db->nf_fax_replys;
 $Update_fax_vals = array("saved_pdf_file" => $newsavedPdf.".pdf");
 $updateRes = $collectionUp->update(array('to_id' => $to_faxid), array('$set' => $Update_fax_vals));*/
 /*if(is_array($finalUserToIds)){              
       for($i=0;$i<count($finalUserToIds);$i++){            
           $faxObjCon->insertToFaxIds($finalUserToIds[$i],$faxId); 
       }
   }else{        
           $arrToId = $finalUserToIds;
           $faxObjCon->insertToFaxIds($arrToId,$faxId);    
Esempio n. 3
0
        } else {
            if (is_numeric($toIds)) {
                $finalUserIds[] = $toIds;
            }
        }
    }
    if (isset($_POST['hidd_values']) && !empty($_POST['hidd_values'])) {
        $arrHidIds = explode(",", $_POST['hidd_values']);
        $finalUserToIds = array_merge($finalUserIds, $arrHidIds);
    } else {
        $finalUserToIds = $finalUserIds;
    }
    $faxId = $faxObjCon->copyFiles($_POST, $_FILES);
    if (is_array($finalUserToIds)) {
        for ($i = 0; $i < count($finalUserToIds); $i++) {
            $faxObjCon->insertToFaxIds($finalUserToIds[$i], $faxId);
        }
    } else {
        $arrToId = $finalUserToIds;
        $faxObjCon->insertToFaxIds($arrToId, $faxId);
    }
    header("location:inbox.php");
}
// if(isset($_GET['action']) && ($_GET['action'] == "delete") && isset($_GET['faxsId']) && ($_GET['faxsId']!="" ))
// {
//     $faxObjCon->deleteFax($_GET['faxsId']);
//     header("location:inbox.php");
// }
if ($_POST['submit_reply'] == "reply") {
    // print_r($_FILES);
    // print_r($_POST);exit;