Пример #1
0
<?php

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');
$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 . ' &nbsp; ' . $dlast_name . '</h2></td></tr>';