1){echo "There is more than one claim number for this client and third party. Please select which claim number to use. "; $_SESSION['selected_claims']=$selected_claims; return 1; } if($count_selected==0) { if($_SESSION['CLthird_co_pro'] != "SELF") { error_message("There is no case or claim number associated with this client and that third party!");} else {$_SESSION['selected_claims']=array("");return 1;} } } }///end else }/////END FUNC GET CLAIM ///////////////////FUNCTION INPUT_CLIENT_USERNAME function input_client_username() { global $servpro_id, $start_appt, $number_appts, $claim_add, $update_CL, $PHP_SELF; echo "
";///////FORM echo "Enter the username of the client to be booked in the space below, select who to bill and click submit:
"; echo ""; echo ""; echo " Province: "; echo " "; if(!empty($_SESSION['CLthird_co_pro'])) { echo ""; } third_co_list(); echo ""; $array_selected_claims=$_SESSION['selected_claims']; if(count($array_selected_claims) > 1) { echo "Claim no: "; } } echo ""; //echo ""; echo "
Update this client's registration here. Add claim number here."; echo "
"; }////////////////END FUNCTION //////////////////FUNCTION REGISTER_CLIENT_USERNAME function register_client_username($name_in_box, $clients_db, $userCLprov) { $link_id = db_connect('appointments_db'); if(!$link_id) die(sql_error()); $queryCLname = "SELECT CL_id, CLemail FROM $clients_db WHERE CL_id = '$name_in_box'"; $resultCLname = mysql_query($queryCLname); $marknoname = mysql_num_rows($resultCLname); if(!$resultCLname) error_message(sql_error()); if(!$marknoname) error_message("No such username, check the client username and province"); else { $query_dataCLname = mysql_fetch_array($resultCLname); $_SESSION['userCLid']=$query_dataCLname["CL_id"]; $_SESSION['userCLprov']=$userCLprov; } } ///////////////END FUNCTION /////////////////FUNCTION GET_MULT function get_mult($servpro_id, $number_appts, $start_appt) { global $apptdb; $link_id = db_connect('appointments_db'); if(!$link_id) die(sql_error()); $tempuserCL = $_SESSION['userCLid']; $querymult = "SELECT appt_id, date_format(day, '%a %b %e %Y'), time, Assmt, Agent_id, client_id, bill_to, auth_by_3rd, location FROM $apptdb WHERE (Agent_id='$servpro_id' AND appt_id='$start_appt')"; $resultmult = mysql_query($querymult); if(!$resultmult) error_message(sql_error()); echo "
";///////FORM echo ""; table_head(); $query_datamult = mysql_fetch_array($resultmult); $datimemult = $query_datamult["date_format(day, '%a %b %e %Y')"]; $datimemult .= " "; $datimemult .= $query_datamult["time"]; $appt_id = $query_datamult["appt_id"]; $day = $query_datamult["date_format(day, '%a %b %e %Y')"]; //$time = $query_datamult["time"]; $Agent_id = $query_datamult["Agent_id"]; $client_id = $query_datamult["client_id"]; $location=$query_datamult["location"]; $bill_to=$query_datamult["bill_to"]; $auth=$query_datamult["auth_by_3rd"]; list($timex1, $timex2, $timex3)=explode(":" , $query_datamult["time"]); $pm=0; if ($timex1 > 11) {$pm=1;} if($timex1 > 12) {$timex1 -= 12;} echo ""; echo ""; echo $day; echo ""; echo ""; echo $timex1 . ":" . $timex2 . " "; if($pm == 1) {echo "PM";} else {echo "AM";} if($Assmt) {echo "
Assessment";} echo ""; echo "book cancel"; echo ""; if($client_id != "BLOCKED") { echo "$client_id"; } else { echo $client_id; echo ""; } echo "$bill_to"; echo ""; if($auth==0){echo "DK";} if($auth==1){echo "Y";} if($auth==-1){echo "N";} echo "$location"; echo "\n"; ///strtotime() to convert to unix time $untimemult = strtotime($datimemult); // echo $timenextmult; echo "untimemult is " . $untimemult; //echo "
"; $countermult = $number_appts - 1; //echo "countermult is " . $countermult . "
"; /////////////HERE IS THE COUNTER//////////////////////// for ($counter=0; $counter <= $countermult; $counter++) { $dalightbefore = date('I', $untimemult); $untimemult += 604800; ////this is one week $dalightafter = date('I', $untimemult); if($dalightbefore - $dalightafter == 1) {$untimemult += 3600;} if($dalightbefore - $dalightafter == -1) {$untimemult -=3600;} $timenextmult = strftime('%H:%M:%S', $untimemult); $daynextmult = strftime('%Y-%m-%d', $untimemult); $tempuserCL=$_SESSION['userCLid']; //echo $tempuserCL . "
"; $querymult2="SELECT appt_id, date_format(day, '%a %b %e %Y'), time, Assmt, Agent_id, client_id, location, bill_to, lastaccess, auth_by_3rd FROM $apptdb WHERE (Agent_id='$servpro_id' AND (day = '$daynextmult' AND time = '$timenextmult')) AND (client_id IS NULL OR client_id='$tempuserCL') AND Assmt = 0"; $resultmult2=mysql_query($querymult2); if(!$resultmult2) error_message(sql_error()); $query_datamult2 = mysql_fetch_array($resultmult2); $marker=1; $marker = mysql_num_rows($resultmult2); if(!$marker) {//////IF NO NEXT APPT echo ""; echo "Next appointment unavailable. Other options below! "; //echo "code here to get range of apointments FOR THE DAY"; $tempuserCL=$_SESSION['userCLid']; $querymult3="SELECT appt_id, date_format(day, '%a %b %e %Y'), time, Assmt, Agent_id, client_id, location, bill_to, lastaccess, auth_by_3rd FROM $apptdb WHERE (Agent_id='$servpro_id' AND day = '$daynextmult') AND (client_id IS NULL OR client_id='$tempuserCL') AND Assmt = 0 ORDER BY time"; $resultmult3=mysql_query($querymult3); if(!$resultmult3) error_message(sql_error()); $ifnoapptsthatday=mysql_num_rows($resultmult3); if($ifnoapptsthatday==0) {echo ""; echo "Ooops, no more appointments that day!"; } /////////NOW GO THRU AND DISPLAY ALL RESULTS FROM SUBSEARCH FOR DAY while($query_datamult3=mysql_fetch_array($resultmult3)) { $appt_id=$query_datamult3["appt_id"]; $day=$query_datamult3["date_format(day, '%a %b %e %Y')"]; //$time=$query_datamult3["time"]; $Agent_id=$query_datamult3["Agent_id"]; $client_id=$query_datamult3["client_id"]; $location=$query_datamult3["location"]; $bill_to=$query_datamult3["bill_to"]; $auth=$query_datamult3["auth_by_3rd"]; $pm=0; list($timex4, $timex5, $timex6)=explode(":" , $query_datamult3["time"]); $pm=0; if ($timex4 > 12) {$pm=1; $timex4 -= 12;} echo ""; echo ""; echo $day; echo ""; echo ""; echo $timex4 . ":" . $timex5; if($pm==1){echo " PM";} else {echo " AM";} echo ""; echo "book cancel"; echo ""; if($client_id != "BLOCKED") { echo "$client_id"; } else { echo $client_id; echo ""; } echo "$bill_to"; echo ""; if($auth==0){echo "DK";} if($auth==1){echo "Y";} if($auth==-1){echo "N";} echo "$location"; echo ""; } } else {///display results of the regular search //$query_datamult2=mysql_fetch_array($resultmult2); //if(empty($mult_array)) $mult_array = array($query_datamult2); // else // { //$mult_array[$counter] = $query_datamult2; //$stringu = implode(", ", $query_datamult2); $appt_id = $query_datamult2["appt_id"]; $day = $query_datamult2["date_format(day, '%a %b %e %Y')"]; //$time = $query_datamult2["time"]; $Agent_id = $query_datamult2["Agent_id"]; $client_id = $query_datamult2["client_id"]; $location=$query_datamult2["location"]; $bill_to=$query_datamult2["bill_to"]; $auth=$query_datamult2["auth_by_3rd"]; $lastaccess=$query_datamult2["lastaccess"]; list($timex4, $timex5, $timex6)=explode(":" , $query_datamult2["time"]); $pm=0; if ($timex4 > 12) {$pm = 1; $timex4 -= 12;} echo ""; echo ""; echo $day; echo ""; echo ""; echo $timex4 . ":" . $timex5 . " "; if($pm == 1) {echo "PM";} else {echo "AM";} if($Assmt) {echo "
Assessment";} echo ""; echo "book cancel"; echo ""; if($client_id != "BLOCKED") { echo "$client_id"; } else { echo $client_id; echo ""; } echo "$bill_to"; echo ""; if($auth==0){echo "DK";} if($auth==1){echo "Y";} if($auth==-1){echo "N";} echo "$location"; echo ""; } } echo ""; echo ""; echo ""; echo ""; echo " "; } /////////////////END FUNCTION GET MULTIPLE APPOINTMENTS //////////FUNCTION TO GET BOOKED ARRAY INTO DATABASE function into_database($app_id) { global $todaytime2; if($_SESSION['userProprov']=="BC"){$authdb="auth_by_3rd";} else if($_SESSION['userProprov']=="AB"){$authdb="auth_by_3rd_ab";} else if($_SESSION['userProprov']=="SK"){$authdb="auth_by_3rd_sk";} else if($_SESSION['userProprov']=="MB"){$authdb="auth_by_3rd_mb";} else if($_SESSION['userProprov']=="ON"){$authdb="auth_by_3rd_on";} else if($_SESSION['userProprov']=="QC"){$authdb="auth_by_3rd_qc";} else if($_SESSION['userProprov']=="NB"){$authdb="auth_by_3rd_nb";} else if($_SESSION['userProprov']=="NS"){$authdb="auth_by_3rd_ns";} else if($_SESSION['userProprov']=="PE"){$authdb="auth_by_3rd_pe";} else if($_SESSION['userProprov']=="NL"){$authdb="auth_by_3rd_nl";} else if($_SESSION['userProprov']=="YK"){$authdb="auth_by_3rd_yk";} else if($_SESSION['userProprov']=="NW"){$authdb="auth_by_3rd_nw";} else if($_SESSION['userProprov']=="NV"){$authdb="auth_by_3rd_nv";} $into_query="INSERT INTO $authdb VALUES(NULL, '$todaytime2', '$app_id', 0)"; $into_var=mysql_query($into_query); if(!$into_var) error_message("Failed to put appt into auth database"); } //////////END FUNCTION TO GET BOOKED ARRAY INTO DATABASE ///////////GET THIRD EMAIL ///////////GET THIRD EMAIL function get_third_email_from_client($client) { global $clients_db; $link_id = db_connect("appointments_db"); $query = "SELECT CLthird_co1, third_party_email1, CLthird_co2, third_party_email2, CLthird_co3, third_party_email3, CLthird_co4, third_party_email4, CLthird_co5, third_party_email5 FROM $clients_db WHERE CL_id = '$client'"; $result = mysql_query($query); if(!mysql_num_rows($result)) {return 'SELF';} else { $query_data = mysql_fetch_array($result); $CLthird_co1=$query_data['CLthird_co1']; $third_party_email1=$query_data['third_party_email1']; $CLthird_co2=$query_data['CLthird_co2']; $third_party_email2=$query_data['third_party_email2']; $CLthird_co3=$query_data['CLthird_co3']; $third_party_email3=$query_data['third_party_email3']; $CLthird_co4=$query_data['CLthird_co4']; $third_party_email4=$query_data['third_party_email4']; $CLthird_co5=$query_data['CLthird_co5']; $third_party_email5=$query_data['third_party_email5']; $tempcopro=$_SESSION['CLthird_co_pro']; if($CLthird_co1==$tempcopro){$third_email=$third_party_email1;} if($CLthird_co2==$tempcopro){$third_email=$third_party_email2;} if($CLthird_co3==$tempcopro){$third_email=$third_party_email3;} if($CLthird_co4==$tempcopro){$third_email=$third_party_email4;} if($CLthird_co5==$tempcopro){$third_email=$third_party_email5;} return $third_email; } }////END FUNC GET THIRD EMAIL ///////////AUTH SEND EMAIL function auth_send_email($to_hold_booked_auth, $client) { global $todaytime2, $pageforauth, $clients_db; $to_hold_3_email=get_third_email_from_client($client); $secure_mail_subject = "Authorization requested"; $secure_mail_body = ""; $secure_mail_body .= "Authorization has been requested for an appointments or appointments for claim or reference number: "; $claim_no_for_auth_email=chop($_SESSION['CLclaim_no']); if(!empty($claim_no_for_auth_email)) {$secure_mail_body .= $claim_no_for_auth_email;} else {$secure_mail_body .= "not entered";} $secure_mail_body .= ". Click on the link below to view and authorize sessions \r\n"; $secure_mail_body .= "or to deny authorization\r\n"; $secure_mail_body .= ""; $secure_mail_body .= "authorization request"; $secure_mail_body .= ""; $secure_mail_header = "From: admin@psycorps.com\n"; $secure_mail_header .= "Reply-to: admin@psycorps.com\n"; $secure_mail_header .= "MIME-Version: 1.0\r\n"; $secure_mail_header .= "Content-type: text/html"; $secure_mail_header .= "\r\n\r\n"; array_walk($to_hold_booked_auth, 'into_database'); reset($to_hold_booked_appts); mail($to_hold_3_email, $secure_mail_subject, $secure_mail_body, $secure_mail_header); }////END AUTH SEND EMAIL //////function show gif function show_gif() { global $CL_login, $CL_logout_pro, $third_login, $logout_script, $Pro_login, $root_page, $CL_logout_pro_mult; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; //echo ""; echo ""; echo ""; echo ""; echo "
"; echo ""; echo ""; echo ""; echo ""; if (!empty($_SESSION['userProid'])) {echo ""; echo ""; } else {echo ""; echo ""; } echo ""; echo "CURRENT CLIENT:
"; echo $_SESSION['userCLid']; echo "
" . $_SESSION['CLclaim_no_selected']; echo "
"; echo "
"; if (!empty($_SESSION['userCLid'])) { echo ""; echo ""; } else {echo ""; echo ""; } echo ""; //echo ""; //echo ""; echo ""; echo "
"; } function table_head() { ?>
":00", ":30:00" => ":30", ":15:00" => ":15"); $datime3=strtr($datime2,$translation); $datime=$datime1 . " " . $datime3; return $datime; }//////////////////END FUNC TO GET APPT DATE AND TIME FROM APPT_ID //////////////////FUNCTION TO EMAIL EVERYBODY function email_everybody($to_hold_email, $to_hold_booked, $to_hold_canceled, $to_hold_blocked, $reply_to) { //global $email_addresses, $booked, $canceled; $s_email_addresses = implode(",", $to_hold_email); $s_booked = implode(", ", $to_hold_booked); $s_canceled = implode(", ", $to_hold_canceled); $s_blocked = implode(", ", $to_hold_blocked); $s_email_message_body = "This is a message from psycorps.com.\n"; if($s_booked){$s_email_message_body .= "The following appts have been booked: "; $s_email_message_body .= $s_booked; $s_email_message_body .= ".\n";} if($s_canceled){$s_email_message_body .= "The following appts have been canceled: " . $s_canceled . ".\n";} if($s_blocked){$s_email_message_body .= "The following appts have been blocked: "; $s_email_message_body .= $s_blocked; $s_email_message_body .= ".\n";} $s_email_message_body .= "You may wish to check the www.psycorps.com website "; $s_email_message_body .= "for your updated schedule.\n"; $s_email_subject="Changed appts"; //echo "EMAIL ADDRESSES: " . $s_email_addresses; //echo $s_email_message_body; mail($s_email_addresses, $s_email_subject, $s_email_message_body, $reply_to); } //////////END FUNCTION TO EMAIL EVERYBODY //////////body//////BODY////BODY/////BODY session_start(); //session_register("user3id1"); //session_register("userCLid"); //session_register("userProid"); //session_register("pro_enter"); //$_SESSION['userProid']='zsaper'; //autoreload(); echo ""; echo""; echo ""; echo ""; if($_SESSION['userProprov']=="BC"){$servProdb="service_providers";$apptdb="appointments";} else if($_SESSION['userProprov']=="AB"){$servProdb="service_providers_ab";$apptdb="appointments_ab";} else if($_SESSION['userProprov']=="SK"){$servProdb="service_providers_sk";$apptdb="appointments_sk";} else if($_SESSION['userProprov']=="MB"){$servProdb="service_providers_mb";$apptdb="appointments_mb";} else if($_SESSION['userProprov']=="ON"){$servProdb="service_providers_on";$apptdb="appointments_on";} else if($_SESSION['userProprov']=="QC"){$servProdb="service_providers_qc";$apptdb="appointments_qc";} else if($_SESSION['userProprov']=="NS"){$servProdb="service_providers_ns";$apptdb="appointments_ns";} else if($_SESSION['userProprov']=="NB"){$servProdb="service_providers_nb";$apptdb="appointments_nb";} else if($_SESSION['userProprov']=="PE"){$servProdb="service_providers_pe";$apptdb="appointments_pe";} else if($_SESSION['userProprov']=="NL"){$servProdb="service_providers_nl";$apptdb="appointments_nl";} else if($_SESSION['userProprov']=="YK"){$servProdb="service_providers_yk";$apptdb="appointments_yk";} else if($_SESSION['userProprov']=="NW"){$servProdb="service_providers_nw";$apptdb="appointments_nw";} else if($_SESSION['userProprov']=="NV"){$servProdb="service_providers_nv";$apptdb="appointments_nv";} $todaytime=time(); global $Pro_login, $add_appointment; if($_POST['SUBMIT_CLIENT']=='1') { $userCLprov=$_POST['userCLprov']; if($userCLprov=="BC"){$clients_db = "clients";} else if($userCLprov=="AB"){$clients_db = "clients_ab";} else if($userCLprov=="SK"){$clients_db = "clients_sk";} else if($userCLprov=="MB"){$clients_db = "clients_mb";} else if($userCLprov=="ON"){$clients_db = "clients_on";} else if($userCLprov=="QC"){$clients_db = "clients_qc";} else if($userCLprov=="NB"){$clients_db = "clients_nb";} else if($userCLprov=="NS"){$clients_db = "clients_ns";} else if($userCLprov=="PE"){$clients_db = "clients_pe";} else if($userCLprov=="NL"){$clients_db = "clients_nl";} else if($userCLprov=="YK"){$clients_db = "clients_yk";} else if($userCLprov=="NW"){$clients_db = "clients_nw";} else if($userCLprov=="NV"){$clients_db = "clients_nv";} else {$clients_db = "clients";} $name_in_box=$_POST['client_username']; if($name_in_box=='') { unset($_SESSION['userCLid']); unset($_SESSION['CLthird_co_pro']); unset($_SESSION['userCLprov']); } else { register_client_username($name_in_box, $clients_db, $userCLprov); $_SESSION['CLthird_co_pro']=$_POST['CLthird_co']; $_SESSION['CLclaim_no_selected']=$_POST['CLclaim_no_selected']; $_SESSION['CLclaim_no']=get_claim_from_client($name_in_box); } } else if($_POST) { $userCLprov=$_SESSION['userCLprov']; if($userCLprov=="BC"){$clients_db = "clients";} else if($userCLprov=="AB"){$clients_db = "clients_ab";} else if($userCLprov=="SK"){$clients_db = "clients_sk";} else if($userCLprov=="MB"){$clients_db = "clients_mb";} else if($userCLprov=="ON"){$clients_db = "clients_on";} else if($userCLprov=="QC"){$clients_db = "clients_qc";} else if($userCLprov=="NB"){$clients_db = "clients_nb";} else if($userCLprov=="NS"){$clients_db = "clients_ns";} else if($userCLprov=="PE"){$clients_db = "clients_pe";} else if($userCLprov=="NL"){$clients_db = "clients_nl";} else if($userCLprov=="YK"){$clients_db = "clients_yk";} else if($userCLprov=="NW"){$clients_db = "clients_nw";} else if($userCLprov=="NV"){$clients_db = "clients_nv";} $link_id = db_connect('appointments_db'); if(!$link_id) die(sql_error()); $dbnom=$servProdb; $email="Proemail"; $case_id="Pro_id"; $to_hold_email_addresses[] = get_userid_email($email, $case_id, $_SESSION['userProid'], $dbnom); $to_hold_email_addresses[] = "admin@psycorps.com"; while (list($lvar, $lvalue) = each($_POST)) { ////////BOOK////BOOK/////BOOK if ($lvalue=="book") { if(!$_SESSION['userCLid'] && $timeround==0) { echo "
Enter the user id of the client you want to book."; echo " Note that you can only book appointments for one client at a time."; echo "
If the client you want to book is not yet registered, register them "; echo "here."; //error_reload("Enter the user id of the client you want to book. Note that you can only book appointments for one client at a time"); $stop_email = 1; } else if($_SESSION['userCLid'] && $timeround==0) { $dbnom=$clients_db; $email="CLemail"; $case_id="CL_id"; $to_hold_email_addresses[] = get_userid_email($email, $case_id, $_SESSION['userCLid'], $dbnom); $temppro_enter=$_SESSION['userCLid']; $user3id_3=$_SESSION['CLthird_co_pro']; if(empty($user3id_3)){$user3id_3='SELF';} $bookquery="UPDATE $apptdb SET client_id='$temppro_enter', bill_to='$user3id_3' WHERE appt_id='$lvar' and client_id IS NULL"; $bookresult=mysql_query($bookquery); $numrowsresult=mysql_affected_rows($link_id); if(!$numrowsresult) {error_message("Appt already booked. Reload page."); } if($user3id_3 != 'SELF') { $to_hold_booked_auth[]=$lvar; } } else if($_SESSION['userCLid'] && $timeround != 0) { $temppro_enter=$_SESSION['userCLid']; $bookquery="UPDATE $apptdb SET client_id='$temppro_enter', bill_to='$user3id_3' WHERE appt_id='$lvar' and client_id IS NULL"; $bookresult=mysql_query($bookquery); $numrowsresult=mysql_affected_rows($link_id); if(!$numrowsresult) {error_message("Appt already booked. Reload page."); } if($user3id_3 != 'SELF') { $to_hold_booked_auth[]=$lvar; } } else {} $timeround=1; $to_hold_booked_appts[]=get_datime_fr_appt_id($lvar); } //////CANCEL/////CANCEL////CANCEL else if ($lvalue=="cancel") {$cquery1="SELECT client_id FROM $apptdb WHERE appt_id='$lvar'"; $clresult1=mysql_query($cquery1); if(!$clresult1) error_message(sql_error()); $clresult2=mysql_fetch_array($clresult1); if (!$to_hold_canceled_array) ///initialize array { $to_hold_canceled_array = array ($lvar => $clresult2["client_id"]);//prob here } else { $to_hold_canceled_array[$lvar]=$clresult2["client_id"];//appt-client pairs } $cancelquery="UPDATE $apptdb SET client_id=NULL, bill_to=NULL, auth_by_3rd=0 WHERE appt_id='$lvar'"; $cancelresult=mysql_query($cancelquery); if(!$cancelresult) error_message(sql_error()); } /////BLOCK/////BLOCK////BLOCK else if ($lvalue=="block") { $blockquery="UPDATE $apptdb SET client_id='BLOCKED', bill_to=NULL WHERE appt_id='$lvar' and client_id IS NULL"; $blockresult=mysql_query($blockquery); if(!$blockresult) error_message(sql_error()); $to_hold_blocked_appts[]=get_datime_fr_appt_id($lvar); } else { } }///end of while asort($to_hold_canceled_array);//appt-client pairs sorted by client if ($to_hold_canceled_array) { $client_now = "nonsuch"; foreach ($to_hold_canceled_array as $apptc => $eclient) { if($client_now == "nonsuch") { $clientcancelarray = array ($eclient => array ($apptc)); $client_now = $eclient; } else if ($eclient != $client_now) { $clientcancelarray[$eclient] = array ($apptc); $client_now = $eclient; } else { array_push ($clientcancelarray[$eclient], $apptc); } }//end of foreach to_hold_canceled foreach ($clientcancelarray as $clientname => $arrayofappts) { $dbnom=$clients_db; $email="CLemail"; $case_id="CL_id"; if ($clientname != "BLOCKED") {$email_addresses2[] = get_userid_email($email, $case_id, $clientname, $dbnom);} $email_body2 = "This is a message from psycorps.com. "; $email_body2 .= "The following appts have been canceled: \n"; foreach($arrayofappts as $key => $valueappt) { $email_body2 .= get_datime_fr_appt_id($valueappt); $email_body2 .= " \n"; } $email_body2 .= "\n You may want to check www.psycorps.com for updated appts."; $dbnom=$servProdb; $email="Proemail"; $case_id="Pro_id"; $email_addresses2[] = get_userid_email($email, $case_id, $_SESSION['userProid'], $dbnom); $email_addresses2[] = "admin@psycorps.com"; $reply_to_fields2="From: admin@psycorps.com"; $email_addresses2i = implode(",", $email_addresses2); $email_subject2 = "canceled appointment(s)"; mail($email_addresses2i, $email_subject2, $email_body2, $reply_to_fields2); $email_addresses2 = array(""); }///end of foreach clientcancelarray }//end of processing to_hold_canceled_array $reply_to_fields="From: admin@psycorps.com";///\nReply-to: admin@psycorps.com"; if(!$email_addresses2 && !$stop_email) { email_everybody($to_hold_email_addresses, $to_hold_booked_appts, $to_hold_canceled_appts, $to_hold_blocked_appts, $reply_to_fields); if(!empty($to_hold_booked_auth)) { auth_send_email($to_hold_booked_auth, $temppro_enter); } } else { } $_SESSION['pro_enter2']=$_SESSION['userCLid']; //$_SESSION['userCLid']="";///empty pro_enter_cl_id variable after the http_post processed autoreload(); $stop_email = 0; $timeround=0; } // } if(isset($_SESSION['userProid'])) { show_gif(); echo "

Appointment booking method Patent Pending"; echo "
Add appointments

"; input_client_username(); get_mult($_SESSION['userProid'], $_GET['no_appts'], $_GET['first_appt']); } else { echo "
There is no service provider logged in. If you are a service provider, log in here"; } echo "

Appointment booking method Patent Pending

"; ?>
day time book/cancel/block client bill to auth? location