//class file calling from attorney panel //require_once('/var/www/rao/mayo-config.php'); require_once '/var/www/cron-functions/functions.php'; //require_once('/var/www/rao/attorney/classes/meshed.php'); $getdata = new CronFunctions(); $document_messages = mysql_query("SELECT members.id AS rd_id, hire_staff.hire_id AS hd_id, hire_staff.form_id AS hf_id, plantiff_case_type_info.id AS pid, plantiff_case_type_info.form_id AS fid\n\tFROM hire_staff, members, plantiff_case_type_info\n\tWHERE hire_staff.id NOT \n\tIN (\n\t\tSELECT DISTINCT form_id\n\t\tFROM appointment_doctor\n\t)\n\tAND members.id = hire_staff.hire_id && members.designation =3\n\tAND plantiff_case_type_info.form_id = hire_staff.form_id\n\tAND plantiff_case_type_info.case_type =2") or die(mysql_error()); while ($docs = mysql_fetch_object($document_messages)) { $attManId = $docs->rd_id; $form_id = $docs->fid; $a = $getdata->GetInfoPlantiffInformation("plantiff_name", $form_id); $b = ucwords($a); $d_o_b = $getdata->GetInfoPlantiffInformation("p_d_o_b", $form_id); $home_phone = $getdata->GetInfoPlantiffInformation("p_home_no", $form_id); $work_phone = $getdata->GetInfoPlantiffInformation("p_office_no", $form_id); $mob_no = $getdata->GetInfoPlantiffInformation("p_mob_no", $form_id); $dfirst_name = ucwords($getdata->GetObjectById($attManId, "first_name")); $dlast_name = ucwords($getdata->GetObjectById($attManId, "last_name")); $emails = $getdata->GetObjectById($attManId, "email_id"); $message = ""; $message .= '<html><body>'; $message .= '<img src="/images/logo.png" alt="From Mayo to Doctor – New Referral" />'; $message .= '<table rules="all" cellpadding="0" cellspacing="5" border="0" style="font-size:17px;color:#000; border:1px solid #0665be; border-radius:5px;">'; $message .= '<tr><td style="background: none repeat scroll 0 0 #3a9df8;border-top-left-radius: 5px;border-top-right-radius: 5px;color: #fff;font: 15px MemphisLTStd-Medium;padding: 15px 0;text-align: center;">'; $message .= '<h1>From Mayo to ' . $getdata->GetObjectById($attManId, "first_name") . ' – New Referral</h1></td></tr>'; $message .= '<tr><td align="center"><h2 style="color:#f6801f;">Mesh Cases</h2></td></tr>'; $message .= '<tr><td><h2>Dear Dr. ' . $dfirst_name . ' ' . $dlast_name . '</h2></td></tr>'; $message .= '<tr><td align="center">Mayo Surgical would like to refer a client for Consultation. Here is the client information:</td></tr>'; $message .= '<tr><td><table cellpadding="0" cellspacing="2" border="0" width="60%" style="color:#000"><tr><td><strong>Client Name:</strong></td><td><strong>' . $b . '</strong></td></tr> <tr><td><strong>Home Phone:</strong></td><td><strong>' . $home_phone . '</strong></td></tr><tr><td><strong>Work Phone:</strong></td><td><strong>' . $work_phone . '</strong></td></tr><tr><td><strong>Cell Phone:</strong></td><td><strong>' . $mob_no . '</strong></td></tr></table></td></tr>'; $message .= '<tr><td>1. Please Login and review the medical records available at mayosurgical.com</td></tr>'; $message .= '<tr><td>2. Please Login and enter the appointment date once set, by clicking on the appointment tab in the main menu.</td></tr>'; $message .= '<tr><td>3. Please UPLOAD or fax the following information once completed:</td></tr>';
ini_set('display_errors', 1); error_reporting(E_ALL); require_once '/var/www/config/mayo-config.php'; //class file calling from attorney panel //require_once('/var/www/rao/mayo-config.php'); require_once '/var/www/cron-functions/functions.php'; //require_once('/var/www/rao/attorney/classes/meshed.php'); $date = date('Y-m-d h:i:s'); //$date = "2015-04-12 20:32:57"; $currentDate = strtotime($date); echo "<br/>"; $futureDate = $currentDate - 60 * 1; echo $formatDate = date("Y-m-d H:i:s", $futureDate); $getdata = new CronFunctions(); $sql = mysql_query("SELECT a.*,b.* FROM plantiff_information as a, plantiff_case_type_info as b where a.form_id=b.form_id and b.date_time > '{$formatDate}' ") or die(mysql_error()); if (mysql_num_rows($sql) > 0) { while ($row = mysql_fetch_object($sql)) { echo $plantiff_name = $row->plantiff_name; echo $form_id = $row->form_id; $user_id = $row->id; $att_id = $row->attorney_id; $designationid = $getdata->GetObjectById($user_id, 'designation'); $desgname = $getdata->getRoleByRoleId($designationid); $check = mysql_query("SELECT * FROM `message_sent` WHERE `form_id`='{$form_id}'") or die(mysql_error()); if (mysql_num_rows($check) < 1) { $messageSaved = $desgname . " has submitted a new Application. The New Client name is " . $plantiff_name . "."; $message = mysql_query("INSERT INTO `message_sent` (`form_id`,`user_id`,`sent_by`,`main_user_id`,`message`,`date_message`) VALUES ('{$form_id}','{$user_id}','{$att_id}','{$att_id}','{$messageSaved}',now())") or die(mysql_error()); } } }
$form_id = $rowss->form_id; $user_id = $rowss->user_id; $doctor_id = $rowss->main_user_id; $app_type = $rowss->app_type; $due_by_date = $rowss->due_by_date; $date_appt = $rowss->date_appt; if (isset($due_by_date) && $due_by_date != " ") { list($c, $d) = explode("/", $due_by_date); } if (isset($date_appt)) { list($e, $f) = explode("/", $date_appt); } /* get all doctor email id and there names using the functions */ echo $emails = $getdata->GetObjectById($doctor_id, "email_id"); /* Cient information */ $abcd = $getdata->GetInfoPlantiffInformation("plantiff_name", $form_id); echo $client_named = ucwords($abcd); $d_o_b = $getdata->GetInfoPlantiffInformation("p_d_o_b", $form_id); $home_phone = $getdata->GetInfoPlantiffInformation("p_home_no", $form_id); $work_phone = $getdata->GetInfoPlantiffInformation("p_office_no", $form_id); $mob_no = $getdata->GetInfoPlantiffInformation("p_mob_no", $form_id); $dfirst_name = ucwords($getdata->GetObjectById($doctor_id, "first_name")); $dlast_name = ucwords($getdata->GetObjectById($doctor_id, "last_name")); $case_type = $getdata->Getcidbyformid($form_id); $message = ""; $message .= '<html><body>'; $message .= '<table rules="all" cellpadding="0" cellspacing="5" border="0" style="font-size:17px;color:#000; border:1px solid #0665be; border-radius:5px;">';
//require_once('/var/www/attorney/classes/meshed.php'); $getdata = new CronFunctions(); echo $date = date('Y-m-d'); echo $billingdate = date('Y-m-d', strtotime($date . '+1 days')); echo "SELECT a.*,b.* from plantiff_information as a,`u_fwd_final_billing` as b WHERE STR_TO_DATE( fwd_date, '%Y-%m-%d' ) >'2015-03-22' and b.flag_accept=0 and a.form_id=b.fid GROUP BY b.fid"; $document_messages = mysql_query("SELECT a.*,b.* from plantiff_information as a,`u_fwd_final_billing` as b WHERE STR_TO_DATE( fwd_date, '%Y-%m-%d' ) >'2015-03-22' and b.flag_accept=0 and a.form_id=b.fid GROUP BY b.fid") or die(mysql_error()); while ($docs = mysql_fetch_object($document_messages)) { echo $attManId = $docs->underwriter_id; $form_id = $docs->fid; $a = $getdata->GetInfoPlantiffInformation("plantiff_name", $form_id); $b = ucwords($a); $d_o_b = $getdata->GetInfoPlantiffInformation("p_d_o_b", $form_id); $home_phone = $getdata->GetInfoPlantiffInformation("p_home_no", $form_id); $work_phone = $getdata->GetInfoPlantiffInformation("p_office_no", $form_id); $mob_no = $getdata->GetInfoPlantiffInformation("p_mob_no", $form_id); $dfirst_name = ucwords($getdata->GetObjectById($attManId, "first_name")); $dlast_name = ucwords($getdata->GetObjectById($attManId, "last_name")); echo $emails = $getdata->GetObjectById($attManId, "email_id"); $message = ""; $message .= '<html><body>'; $message .= '<img src="/images/logo.png" alt="From Mayo to Underwriter – Payment Not Received" />'; $message .= '<table rules="all" cellpadding="0" cellspacing="5" border="0" style="font-size:17px;color:#000; border:1px solid #0665be; border-radius:5px;">'; $message .= '<tr><td style="background: none repeat scroll 0 0 #3a9df8;border-top-left-radius: 5px;border-top-right-radius: 5px;color: #fff;font: 15px MemphisLTStd-Medium;padding: 15px 0;text-align: center;">'; $message .= '<h1>From Mayo to ' . $dfirst_name . ' ' . $dlast_name . ' – Payment not Received</h1></td></tr>'; $message .= '<tr><td><h2>Dear ' . $dfirst_name . ' ' . $dlast_name . '</h2></td></tr>'; $message .= '<tr><td align="center">Mayo Surgical LLC and affiliates have not received payment for services provided for ' . $b . '.</td></tr>'; $message .= '<tr><td><table cellpadding="0" cellspacing="2" border="0" width="60%" style="color:#000; font-size:15px;"><tr><td><h3>Client Name:</h3></td><td><h3>' . $b . '</h3></td></tr> <tr><td><h3>Home Phone:</h3></td><td><h3>' . $home_phone . '</h3></td></tr><tr><td><h3>Work Phone:</h3></td><td><h3>' . $work_phone . '</h3></td></tr><tr><td><h3>Cell Phone:</h3></td><td><h3>' . $mob_no . '</h3></td></tr></table></td></tr>'; $message .= '<tr><td>Please send payment immediately.</td></tr>'; $message .= '<tr><td>Thank you,</td></tr>'; $message .= '<tr><td>Mayo Surgical LLC and affiliates</td></tr>'; $message .= '<tr><td>Please login into <a href="https://mayosurgical.com">Mayo Surgical</a> for further information.</td></tr>';