<?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 . ' ' . $dlast_name . '</h2></td></tr>';
$users = array(); foreach ($selectedBatches as $batch) { $fetchUsers = DatabaseFunctions::getInstance()->getMultipleUsersDetails($Settings->getBatch($batch)); if (!is_array($fetchUsers)) { $fetchUsers = array(); } $users = array_merge($users, $fetchUsers); } foreach ($users as $user) { DatabaseFunctions::getInstance()->deleteUser($user['Username']); $success[] = "Deleting " . $user['Username']; // Maybe delete user from batch as we go to ensure if we fail // at any point the batch is correct? } // Delete batch from settings using existing cron function CronFunctions::getInstance()->clearOldBatches(); } } /* ** Process creation of batches ** */ if (isset($_POST['createticketssubmit'])) { $error = validate_form(); if ($error) { $user['numberoftickets'] = clean_int($_POST['numberoftickets']); $user['MaxMb'] = \Grase\Locale::localeNumberFormat(clean_number($_POST['MaxMb'])); $user['Max_Mb'] = \Grase\Locale::localeNumberFormat(clean_number($_POST['Max_Mb'])); if ($_POST['Max_Mb'] == 'inherit') { $user['Max_Mb'] = 'inherit'; } $user['MaxTime'] = \Grase\Locale::localeNumberFormat(clean_int($_POST['MaxTime'])); $user['Max_Time'] = \Grase\Locale::localeNumberFormat(clean_int($_POST['Max_Time'])); if ($_POST['Max_Time'] == 'inherit') {
} $condensePreviousMonthsResults = CronFunctions::getInstance()->condensePreviousMonthsAccounting(); if ($condensePreviousMonthsResults) { echo "{$condensePreviousMonthsResults}\n"; } $clearOldPostDataResults = CronFunctions::getInstance()->clearOldPostAuth(); if ($clearOldPostDataResults) { echo "{$clearOldPostDataResults}\n"; } $clearPostAuthMACRejectResults = CronFunctions::getInstance()->clearPostAuthMacRejects(); if ($clearPostAuthMACRejectResults) { echo "{$clearPostAuthMACRejectResults}\n"; } if (isset($_GET['deleteoutoftimeusers']) && $_GET['deleteoutoftimeusers']) { $deleteOutOfTimeUsersResults = CronFunctions::getInstance()->deleteOutOfTimeUsers(); if ($deleteOutOfTimeUsersResults) { echo "{$deleteOutOfTimeUsersResults}\n"; } } if (isset($_GET['deleteoutofdatausers']) && $_GET['deleteoutofdatausers']) { $deleteOutOfDataUsersResults = CronFunctions::getInstance()->deleteOutOfDataUsers(); if ($deleteOutOfDataUsersResults) { echo "{$deleteOutOfDataUsersResults}\n"; } } $clearOldBatchesResults = CronFunctions::getInstance()->clearOldBatches(); if ($clearOldBatchesResults) { echo "{$clearOldBatchesResults}\n"; } echo CronFunctions::getInstance()->activateExpireAfterLogin();
<?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(); $date = date('d-m-Y'); $consultdatetime = date('m-d-Y', strtotime($date . '+3 days')); $query = "SELECT * FROM appointment_doctor WHERE (STR_TO_DATE( date_appt, '%m-%d-%Y' )) > '{$consultdatetime}' && `appt_report`=0"; $getApptDate = mysql_query("SELECT * FROM appointment_doctor WHERE (STR_TO_DATE( date_appt, '%d-%d-%Y' )) > '{$consultdatetime}' && `appt_report`=0") or die(mysql_error()); while ($rowss = mysql_fetch_object($getApptDate)) { $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");
public function actionProcessPayout() { $db_ext = new DbExt(); $paypal_client_id = yii::app()->functions->getOptionAdmin('wd_paypal_client_id'); $paypal_client_secret = yii::app()->functions->getOptionAdmin('wd_paypal_client_secret'); $paypal_config = Yii::app()->functions->getPaypalConnectionWithdrawal(); dump($paypal_config); $Paypal = new Paypal($paypal_config); $Paypal->debug = true; $website_title = yii::app()->functions->getOptionAdmin('website_title'); $cron = new CronFunctions(); if ($res = $cron->getPayoutToProcess()) { if (is_array($res) && count($res) >= 1) { foreach ($res as $val) { $withdrawal_id = $val['withdrawal_id']; $api_raw_response = ''; $status_msg = ''; dump($val); switch ($val['payment_method']) { case "paypal": dump("Process paypal"); //if (!empty($paypal_client_id) && !empty($paypal_client_secret)){ if (is_array($paypal_config) && count($paypal_config) >= 1) { if ($val['account'] != "") { $Paypal->params['RECEIVERTYPE'] = "EmailAddress"; $Paypal->params['CURRENCYCODE'] = "USD"; $Paypal->params['EMAILSUBJECT'] = "=You have a payment from " . $website_title; $Paypal->params['L_EMAIL0'] = $val['account']; $Paypal->params['L_AMT0'] = normalPrettyPrice($val['amount']); $Paypal->params['L_UNIQUEID0'] = str_pad($val['withdrawal_id'], 10, "0"); if ($pay_resp = $Paypal->payout()) { dump($pay_resp); if ($pay_resp['ACK'] == "Success") { $status_msg = 'paid'; $api_raw_response = json_encode($pay_resp); } else { $api_raw_response = json_encode($pay_resp); $status_msg = $pay_resp['L_LONGMESSAGE0']; } } else { $status_msg = $Paypal->getError(); } } else { $status_msg = t("Paypal account is empty"); } } else { $status_msg = t("Payout settings for paypal not yet set"); } break; case "bank": $status_msg = 'paid'; break; } echo "<h3>Update status</h3>"; dump($api_raw_response); dump($status_msg); $params_update = array('date_process' => date('c'), 'api_raw_response' => $api_raw_response, 'status' => $status_msg); dump($params_update); if ($db_ext->updateData("{{withdrawal}}", $params_update, 'withdrawal_id', $withdrawal_id)) { echo "<h2>Update ok</h2>"; } else { echo "<h2>Update Failed</h2>"; } if ($status_msg == "paid") { // send email $subject = yii::app()->functions->getOptionAdmin('wd_template_process_subject'); if (empty($subject)) { $subject = t("Your Request for Withdrawal has been Processed"); } if ($merchant_info = Yii::app()->functions->getMerchant($val['merchant_id'])) { $merchant_email = $merchant_info['contact_email']; $tpl = yii::app()->functions->getOptionAdmin('wd_template_process'); $tpl = smarty("merchant-name", $merchant_info['restaurant_name'], $tpl); $tpl = smarty("payout-amount", standardPrettyFormat($val['amount']), $tpl); $tpl = smarty("payment-method", $val['payment_method'], $tpl); $tpl = smarty("acoount", $val['account'], $tpl); dump($tpl); if (!empty($tpl)) { sendEmail($merchant_email, '', $subject, $tpl); } } } } } } else { dump("No record to process"); } }
<?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'); $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()); } }
<?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/mayo-config.php'); require_once '/var/www/cron-functions/functions.php'; //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;">';