コード例 #1
0
function send_hw_msg($school_id, $phone, $section_id, $home_work)
{
    $role = "student";
    $user_id = _get_stu_id_by_ph($phone, $section_id);
    echo "<br>" . $home_work . "sent to :" . $phone . "<br>";
    SendSMSTransaction($school_id, $phone, $home_work, $role, $user_id);
}
コード例 #2
0
                    array_push($new_sec, $section_id);
                }
            }
            //update the section
            // new_sec.len=0 {hold =0, is send =1}
        }
        // end of on hold
        // ck the count of missedcall
        foreach ($section_ids as $section_id) {
            $school_id = _get_sch_id_by_section($section_id);
            if (is_hw_uploaded($section_id, $date)) {
                $home_work = _frame_hw($section_id, $date);
                $role = "student";
                $user_id = _get_stu_id_by_ph($phone, $section_id);
                echo "<br>msg sent to :" . $phone;
                SendSMSTransaction($school_id, $phone, $home_work, $role, $user_id);
            } else {
                // get section id -
                $home_work = " Dear Parents,Homework msg will be sent as soon as it is uploaded.Thank YOU. ";
                $role = "student";
                $user_id = _get_stu_id_by_ph($phone, $section_id);
                _update_onhold($missed_call_id);
                SendSMSTransaction($school_id, $phone, $home_work, $role, $user_id);
            }
        }
        // end of for each
        // send msg to parents : if section!-"" , update hold, inset section ,send msg to parents
        _update_missed_call_stat($missed_call_id);
    }
}
// end of while