From ce4110cfa2f9820ec00bcdbe845b38013e4a06c7 Mon Sep 17 00:00:00 2001 From: andres_paglayan Date: Fri, 21 Oct 2005 19:00:17 +0000 Subject: [PATCH] other features added --- interface/batchcom/batchCSV.php | 2 +- interface/batchcom/batchEmail.php | 53 +++++++++++++++++++++++++++++++++-- interface/batchcom/batchPhoneList.php | 42 ++++++++++++++++++++++++++- interface/batchcom/batchcom.php | 12 ++++++++ 4 files changed, 105 insertions(+), 4 deletions(-) diff --git a/interface/batchcom/batchCSV.php b/interface/batchcom/batchCSV.php index ad68bc73b..e78041177 100644 --- a/interface/batchcom/batchCSV.php +++ b/interface/batchcom/batchCSV.php @@ -33,7 +33,7 @@ $today=date('Y-m-d:H:i:s'); $filename="CSVdata-".$today.".csv"; header('Pragma: private'); header('Cache-control: private, must-revalidate'); -header("Content-type: text/text"); +header("Content-type: text/comma-separated-values"); header("Content-Disposition: attachment; filename=".$filename); print $file; exit() diff --git a/interface/batchcom/batchEmail.php b/interface/batchcom/batchEmail.php index 52460cefd..2c88e8813 100644 --- a/interface/batchcom/batchEmail.php +++ b/interface/batchcom/batchEmail.php @@ -1,5 +1,54 @@ \ No newline at end of file +?> + + + + + + topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0> +Batch Communication Tool +

+ +\r\n"; + $headers .= "From: <$email_sender>\r\n"; + $headers .= "Reply-to: <$email_sender>\r\n"; + $headers .= "X-Priority: 3\r\n"; + $headers .= "X-Mailer: PHP mailer\r\n"; + + if ( mail ('',$email_subject,$email_body,$headers)) { + + echo ("
Email sent to $pt_name at $pt_email"); + + } else { + $m_error=TRUE; + $m_error_count++; + } + +} + +if ($m_error) { + echo ("
Could not send email due to a server problem, $m_error_count emails not sent
"); +} + +?> diff --git a/interface/batchcom/batchPhoneList.php b/interface/batchcom/batchPhoneList.php index 52460cefd..83d7e0884 100644 --- a/interface/batchcom/batchPhoneList.php +++ b/interface/batchcom/batchPhoneList.php @@ -1,5 +1,45 @@ + + + + + + topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0> +Batch Communication Tool +

+ +"); //will do css + +echo ("Name "); +echo ("DOB "); +echo ("Home"); +echo ("Work "); +echo ("Contact "); +echo ("$Cell \n"); + + +while ($row=sqlFetchArray($res)) { + + echo ("${row['title']} "); + echo ("${row['fname']} "); + echo ("${row['lname']} "); + echo ("${row['DOB']} "); + echo ("${row['phone_home']} "); + echo ("${row['phone_biz']} "); + echo ("${row['phone_contact']} "); + echo ("${row['phone_cell']} \n"); +} + +echo (""); ?> \ No newline at end of file diff --git a/interface/batchcom/batchcom.php b/interface/batchcom/batchcom.php index c308a6b18..6bcf111de 100644 --- a/interface/batchcom/batchcom.php +++ b/interface/batchcom/batchcom.php @@ -97,6 +97,13 @@ if ($_POST['form_action']=='Process') { $sql.=" $and patient_data.hipaa_mail='YES' "; } + switch ($_POST['process_type']): + case $choices[1]: // Email + $and=where_or_and ($and); + $sql.=" $and patient_data.email IS NOT NULL "; + break; + endswitch; + // add to complete query sintax $sql.=' GROUP BY patient_data.pid'; @@ -211,6 +218,11 @@ if ($_POST['form_action']=='Process') { } ?> +
(Fill here only if sending email notification to patients). +
Email Sender: +
Email Subject: +
Email Text, Usable Tag: ***NAME*** , i.e. Dear ***NAME*** +

-- 2.11.4.GIT