$sql = 'UPDATE ' . MARSHRUT_DATA_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE meeting_id = ' . $id; $db->sql_query($sql); } //Повышение репутации (сделать участников массивом) if ($config['rp_enable'] && $meet_tekush_km == 0) { //include_once($phpbb_root_path . 'includes/functions_reputation.' . $phpEx); add_rep_meeting($vicherk_rows, $id, $meet_organizator, $meeting_coorg); $_RESULT['success'] = true; exit($user->lang['RP_MEET_ADD'] . '<br />' . sprintf($user->lang['RP_MEET_ADD_S'], $config['rp_meeting_bonus'], $config['rp_meeting_auth_bonus']) . '<br /><br />' . sprintf($user->lang['MEET_CHANGE_KM'], $meeting_km)); } $_RESULT['success'] = true; if ($meeting_informer == 1 && $group_id[0] == -1 && $meeting_anonce != 1 || $user->data['user_id'] == 2) { include_once $phpbb_root_path . 'informer.' . $phpEx; create_informer($id, 'inf_create'); } exit(sprintf($user->lang['MEET_CHANGE_KM'], $meeting_km)); } } else { if ($mode == 'pagination') { $config['posts_per_page'] = $user->data['user_posts_per_page']; $per_page = $config['posts_per_page']; $start_item = request_var('page', 0); $id = request_var('id', 0); $sql = 'SELECT COUNT(meeting_id) AS num_posts FROM ' . MEETING_COMMENT_TABLE . ' WHERE meeting_id = ' . $id; $result = $db->sql_query($sql); $count = $total_comments = (int) $db->sql_fetchfield('num_posts'); $pages = ceil($count / $per_page);
generate_text_for_storage($mgpn, $bbcode_uid, $bbcode_bitfield, $flags, $allow_bbcode, $allow_urls, $allow_smilies); $mgna = preg_replace("'<[\\/\\!]*?[^<>]*?>'si", "", $meeting_guest_name[$i]); generate_text_for_storage($mgna, $bbcode_uid, $bbcode_bitfield, $flags, $allow_bbcode, $allow_urls, $allow_smilies); if ($mgpn != '' && $mgna != '') { $sql = "INSERT INTO " . MEETING_GUESTNAMES_TABLE . " (meeting_id, user_id, guest_prename, guest_name)\n\t\t\t\t\tVALUES ({$id}, {$meeting_user}, '{$mgpn}', '{$mgna}')"; $db->sql_query($sql); $guest_counter++; } } if ($guest_counter != $meeting_guests) { $meeting_guests = $guest_counter; $sql = "UPDATE " . MEETING_USER_TABLE . "\n\t\t\t\tSET meeting_guests = {$guest_counter}\n\t\t\t\tWHERE meeting_id = {$id}\n\t\t\t\tAND user_id = {$meeting_user}"; $db->sql_query($sql); } include_once $phpbb_root_path . 'informer.' . $phpEx; create_informer($id, 'upd'); } if ($mode == 'sign' || $sign) { } // --------------- EMAIL ----------------- /* if ($meeting_config['meeting_notify'] || $meeting_notify) { $sql = "SELECT m.meeting_subject, u.user_email FROM " . MEETING_DATA_TABLE . " m, " . USERS_TABLE . " u WHERE m.meeting_id = $id AND m.meeting_by_user = u.user_id"; $result = $db->sql_query($sql); $db->sql_freeresult($result); while ($row = $db->sql_fetchrow($result)) {
} //if (!empty($im_status)) { imagedestroy($im_status) }; //imagedestroy($im_status); //if (!empty($hard_image)) { imagedestroy($hard_image) }; if (is_resource($hard_image)) { imagedestroy($hard_image); } if (is_resource($onbike_image)) { imagedestroy($onbike_image); } } return; } // END CREATE if ($mode == 'test') { create_informer($id, 'test'); } function delete_informer($id) { /* global $user; if($user->data['user_id'] == 2) { trigger_error('33'); } */ if (file_exists("userpix/image/informer" . $id . ".png")) { @chmod('userpix/image', 0777); unlink("userpix/image/informer" . $id . ".png"); @chmod('userpix/image', 0755); } return;
$db->sql_freeresult($result); } if ($marshrut_formeeting == $id || $marshrut_formeeting == $next_id) { $sql = "UPDATE " . MARSHRUT_DATA_TABLE . "\n\t\t\tSET marshrut_geo1 = " . ($datageo[1]['geoid'] ? $datageo[1]['geoid'] : 0) . ",\n\t\t\t\tmeeting_geocheck_1 = " . $datageo[1]['chk'] . ",\n\t\t\t\tmarshrut_geo2 = " . ($datageo[2]['geoid'] ? $datageo[2]['geoid'] : 0) . ",\n\t\t\t\tmeeting_geocheck_2 = " . $datageo[2]['chk'] . ",\n\t\t\t\tmarshrut_geo3 = " . ($datageo[3]['geoid'] ? $datageo[3]['geoid'] : 0) . ",\n\t\t\t\tmeeting_geocheck_3 = " . $datageo[3]['chk'] . "\n\t\t\tWHERE meeting_id = " . $id; $db->sql_query($sql); } // ------------------- // END Äîáàâëåíèå Òàéíèêîâ // ------------------- // ------------------- // Информер // ------------------- if ($meeting_informer == 1 && $group_id[0] == -1 && $meeting_anonce != 1 || $user->data['user_id'] == 2) { $meetID = $id == 0 ? $next_id : $id; include_once $phpbb_root_path . 'informer.' . $phpEx; create_informer($meetID, 'inf_create'); } else { include_once $phpbb_root_path . 'informer.' . $phpEx; delete_informer($meetID, 'inf_del'); } // ------------------- // END Информер // ------------------- // Óâåäîìëåíèå î Íîâîé Ïîêàòóøêå //if($id == 0 && $user->data['user_id'] !=2) if (!$id || $id == 0) { $txt_data = get_textdate($next_id); //ðåãèîí $sql = "SELECT region_name\n\t\t\tFROM " . REGION_TABLE . "\n\t\t\tWHERE region_id =" . $meeting_region; $result = $db->sql_query($sql); while ($region_row = $db->sql_fetchrow($result)) {