<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth;

class meetings_SINGLE_Controller extends Controller
{
    public $selfName = 'meetings_SINGLE_Controller';

	// GET /meetings/view/{uid}/ACTION_putLobby
	public function ACTION_putLobby(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		return response()->view('admin/meetings_SINGLE/ACTION_putLobby', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /meetings/view/{uid}/ACTION_putTargetLobbyPro
	public function ACTION_putTargetLobbyPro(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		return response()->view('admin/meetings_SINGLE/ACTION_putTargetLobbyPro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /meetings/view/{uid}/ACTION_putTitle
	public function ACTION_putTitle(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		return response()->view('admin/meetings_SINGLE/ACTION_putTitle', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /meetings/view/{uid}/ACTION_putStrangerInfo
	public function ACTION_putStrangerInfo(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		return response()->view('admin/meetings_SINGLE/ACTION_putStrangerInfo', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /meetings/view/{uid}/ACTION_putMeetingNumber
	public function ACTION_putMeetingNumber(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		return response()->view('admin/meetings_SINGLE/ACTION_putMeetingNumber', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /meetings/view/{uid}/SUB_dashboard
	public function SUB_dashboard(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		return response()->view('admin/meetings_SINGLE/SUB_dashboard', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /meetings/view/{uid}/SUB_meeting_participants
	public function SUB_meeting_participants(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		$subRecords = DB::table('meeting_participant')->where('meeting_id', $record->id)->get();
		return response()->view('admin/meetings_SINGLE/SUB_meeting_participants', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /meetings/view/{uid}/SUB_meeting_invitations
	public function SUB_meeting_invitations(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		$subRecords = DB::table('meeting_invitation')->where('meeting_id', $record->id)->get();
		return response()->view('admin/meetings_SINGLE/SUB_meeting_invitations', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /meetings/view/{uid}/SUB_meeting_rings
	public function SUB_meeting_rings(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		$subRecords = DB::table('meeting_ring')->where('meeting_id', $record->id)->get();
		return response()->view('admin/meetings_SINGLE/SUB_meeting_rings', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /meetings/view/{uid}/SUB_meeting_knocks
	public function SUB_meeting_knocks(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		$subRecords = DB::table('meeting_knock')->where('meeting_id', $record->id)->get();
		return response()->view('admin/meetings_SINGLE/SUB_meeting_knocks', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /meetings/view/{uid}/SUB_meeting_messages
	public function SUB_meeting_messages(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		$subRecords = DB::table('meeting_message')->where('meeting_id', $record->id)->get();
		return response()->view('admin/meetings_SINGLE/SUB_meeting_messages', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /meetings/view/{uid}/ACTION_meeting_participantsAddNew
	public function ACTION_meeting_participantsAddNew(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		return response()->view('admin/meetings_SINGLE/ACTION_meeting_participantsAddNew', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /meetings/view/{uid}/ACTION_meeting_invitationsAddNew
	public function ACTION_meeting_invitationsAddNew(Request $request, $uid) {
		$record = DB::table('meeting')->where('uid', $uid)->first();
		return response()->view('admin/meetings_SINGLE/ACTION_meeting_invitationsAddNew', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}
}
