예제 #1
0
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['third_2_hh'])) {
     // *** Update or insert third_2 householder assignment ***
     $user_id = $_POST['third_2_hh'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, $meeting_type_id, $third_2_hh, $page_id);
     // meeting_type_id = 1, assign_type_id = 37, page_id = 3
 }
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['third_3'])) {
     // *** Update or insert third_3 assignment ***
     $user_id = $_POST['third_3'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, $meeting_type_id, $third_3, $page_id);
     // meeting_type_id = 1, assign_type_id = 16, page_id = 3
 }
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['third_3_hh'])) {
     // *** Update or insert third_3 householder assignment ***
     $user_id = $_POST['third_3_hh'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, $meeting_type_id, $third_3_hh, $page_id);
     // meeting_type_id = 1, assign_type_id = 38, page_id = 3
 }
 $cts_r =& cts_detail($monday);
 // Get the material for the TMS
 while ($cts_row = mysqli_fetch_array($cts_r)) {
     $song_1 = $cts_row['song_1'];
     $cbs = $cts_row['cbs'];
     $bible_read = '<a href="http://wol.jw.org/en/wol/l/r1/lp-e?q=' . $cts_row['bible_read'] . '" target="blank">' . $cts_row['bible_read'] . '</a>';
     $no_1 = '<a href="http://wol.jw.org/en/wol/l/r1/lp-e?q=' . $cts_row['no_1'] . '" target="blank">' . $cts_row['no_1'] . '</a>';
     $no_2 = $cts_row['no_2'] . ' (<a href="' . $cts_row['no_2_url'] . '" target="blank">' . $cts_row['no_2_source'] . '</a>)';
     $no_3 = $cts_row['no_3'] . ' (<a href="' . $cts_row['no_3_url'] . '" target="blank">' . $cts_row['no_3_source'] . '</a>)';
     $song_2 = $cts_row['song_2'];
     $sm_1 = $cts_row['sm_1'];
     $sm_2 = $cts_row['sm_2'];
     $sm_3 = $cts_row['sm_3'];
예제 #2
0
     // Assign user id to variable
     $conflict_msg =& handle_assignment_post($monday, $user_id, 1, $attend2_meet1, $page_id);
     // meeting_type_id = 2, assign_type_id = 29, page_id = 5
 }
 // ***  END Update or insert attend2_meet2 assignment ***
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['attend1_meet2'])) {
     // *** Update or insert attend1_meet1 assignment ***
     $user_id = $_POST['attend1_meet2'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, 2, $attend1_meet2, $page_id);
     // meeting_type_id = 1, assign_type_id = 30, page_id = 5
 }
 // ***  END Update or insert attend1_meet1 assignment ***
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['attend2_meet2'])) {
     // *** Update or insert attend2_meet1 assignment ***
     $user_id = $_POST['attend2_meet2'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, 2, $attend2_meet2, $page_id);
     // meeting_type_id = 1, assign_type_id = 31, page_id = 5
 }
 // *** END Update or insert attend2_meet1 assignment ***
 // *** END Handle the Forms. ***
 $r1 =& show_approved(attend);
 // *** Database query variables for forms select options ***
 $r2 =& show_approved(attend);
 // Query in functions filter for those approved for assignments
 $r3 =& show_approved(attend);
 $r4 =& show_approved(attend);
 // Database query variables for when assignment record exists. The query returns data from users table and assignments table.
 $row_attend1_meet1 =& assign_record_exists($monday, $page_id, $attend1_meet1);
 // attend1_meet2 query - page_id = 5 AND assign_type_id = 28
 $num_row_attend1_meet1 = mysqli_num_rows($row_attend1_meet1);
 $row_attend2_meet1 =& assign_record_exists($monday, $page_id, $attend2_meet1);
예제 #3
0
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['mic2_meet2'])) {
     // *** Update or insert mic2_meet2 assignment ***
     $user_id = $_POST['mic2_meet2'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, 2, $mic2_meet2, $page_id);
     // meeting_type_id = 2, assign_type_id = 23, page_id = 6
 }
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['mic1_meet1'])) {
     // *** Update or insert mic1_meet1 assignment ***
     $user_id = $_POST['mic1_meet1'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, 1, $mic1_meet1, $page_id);
     // meeting_type_id = 1, assign_type_id = 26, page_id = 6
 }
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['mic2_meet1'])) {
     // *** Update or insert mic2_meet1 assignment ***
     $user_id = $_POST['mic2_meet1'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, 1, $mic2_meet1, $page_id);
     // meeting_type_id = 1, assign_type_id = 27, page_id = 6
 }
 $r1 =& show_approved(sound_panel);
 // query in functions filter for those approved for assignments
 $r2 =& show_approved(stage);
 $r3 =& show_approved(mic);
 $r4 =& show_approved(mic);
 $r5 =& show_approved(sound_panel);
 $r6 =& show_approved(stage);
 $r7 =& show_approved(mic);
 $r8 =& show_approved(mic);
 // Database query variables for when assignment record exists. The query returns data from users table and assignments table.
 $row_sound_meet2 =& assign_record_exists($monday, $page_id, $sound_meet2);
 //page_id = 6 AND assign_type_id = 20 // sound_meet2 query
 $num_row_sound_meet2 = mysqli_num_rows($row_sound_meet2);
예제 #4
0
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['part_2'])) {
     // *** Update or insert part_2 assignment ***
     $user_id = $_POST['part_2'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, $meeting_type_id, $part_2, $page_id);
     // meeting_type_id = 1, assign_type_id = 18, page_id = 4
 }
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['part_3'])) {
     // *** Update or insert part_3 assignment ***
     $user_id = $_POST['part_3'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, $meeting_type_id, $part_3, $page_id);
     // meeting_type_id = 1, assign_type_id = 19, page_id = 4
 }
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['close_prayer'])) {
     // *** Update or insert close_prayer assignment ***
     $user_id = $_POST['close_prayer'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, $meeting_type_id, $close_prayer, $page_id);
     // meeting_type_id = 1, assign_type_id = 32, page_id = 4
 }
 $cts_r =& cts_detail($monday);
 // Get the material for the Service Meeting
 while ($cts_row = mysqli_fetch_array($cts_r)) {
     $sm_1 = $cts_row['sm_1'];
     $sm_2 = $cts_row['sm_2'];
     $sm_3 = $cts_row['sm_3'];
 }
 $r1 =& show_approved(serv_meet);
 $r2 =& show_approved(serv_meet);
 $r3 =& show_approved(serv_meet);
 $r4 =& show_approved(prayer);
 $row_part_1 =& assign_record_exists($monday, $page_id, $part_1);
 // Database query variables for when assignment record exists. The query returns data from users table and assignments table.
예제 #5
0
     // meeting_type_id = 2, assign_type_id = 40, page_id = 1
     handle_cong_theme_post($monday, $congr_id, $theme_id, 2, 40, 1);
     // meeting_type_id = 2, assign_type_id = 40, page_id = 1
 }
 // ***  END Update or insert local OUTGOING public speaker assignment ***
 // *** Update or insert chairman assignment ***
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['chairman'])) {
     $user_id = $_POST['chairman'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, 2, 2, 1);
     // meeting_type_id = 2, assign_type_id = 2, page_id = 1
 }
 // ***  END Update or insert public chairman assignment ***
 // *** Update or insert wtreader assignment ***
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST['wtreader'])) {
     $user_id = $_POST['wtreader'];
     $conflict_msg =& handle_assignment_post($monday, $user_id, 2, 4, 1);
     // meeting_type_id = 2, assign_type_id = 4, page_id = 1
 }
 // *** END Update or insert public wtreader assignment ***
 // *** VISITING SPEAKER
 if ($_SERVER['REQUEST_METHOD'] == 'POST' and !empty($_POST['visit_speaker']) and isset($_POST['visit_cong']) and isset($_POST['visit_theme'])) {
     $name = mysqli_real_escape_string($dbc, strip_tags($_POST['visit_speaker']));
     $congr_id = $_POST['visit_cong'];
     $theme_id = $_POST['visit_theme'];
     $phone = mysqli_real_escape_string($dbc, strip_tags($_POST['visit_speaker_phone']));
     $no_hosp = mysqli_real_escape_string($dbc, strip_tags($_POST['visit_no_hosp']));
     // Check if a visiting speaker record already exists - if so, update the record
     $query = "SELECT * FROM talks WHERE week_of = '{$monday}' AND outgoing = 0";
     $r = mysqli_query($dbc, $query) or die("MySQL error: " . mysqli_error($dbc) . "<hr>\nQuery: {$query}");
     $row = mysqli_fetch_array($r);
     if (mysqli_num_rows($r) > 0) {