Added Pokal and Playoff Data Input + Page
This commit is contained in:
parent
498804f3e0
commit
950fbe1755
8 changed files with 193 additions and 4 deletions
|
|
@ -801,10 +801,6 @@ class UsersController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$rankingDisplay = Tipp::gshirt_table();
|
||||
$usernames = User::getNames();
|
||||
$roundnames = array();
|
||||
|
|
@ -819,4 +815,82 @@ class UsersController extends Controller
|
|||
public function no_payment() {
|
||||
return view ('users.no_payment');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function playoff_report() {
|
||||
if (Auth::guest()) { return redirect("/"); }
|
||||
|
||||
$season=Season::getCurrent();
|
||||
$seasonId=$season->id;
|
||||
|
||||
$sql="select playoff_report from seasons where id=$seasonId";
|
||||
$result = DB::select($sql);
|
||||
|
||||
$playoff_report = $result[0]->playoff_report ?? 'Playoff Daten: Noch keine.';
|
||||
|
||||
return view ('users.playoff_report', compact('playoff_report'));
|
||||
}
|
||||
|
||||
public function playoff_report_edit() {
|
||||
if (!Auth::user()->admin) { return redirect("/"); }
|
||||
|
||||
$season=Season::getCurrent();
|
||||
$seasonId=$season->id;
|
||||
|
||||
$sql="select playoff_report from seasons where id=$seasonId";
|
||||
$result = DB::select($sql);
|
||||
|
||||
$playoff_report = $result[0]->playoff_report ?? 'Playoff Daten: Noch keine.';
|
||||
|
||||
return view ('users.playoff_report_edit', compact('playoff_report'));
|
||||
}
|
||||
public function store_playoff() {
|
||||
$playoff_report = str_replace("'", "", request('playoff'));
|
||||
$season=Season::getCurrent();
|
||||
$seasonId=$season->id;
|
||||
|
||||
DB::update("UPDATE seasons SET playoff_report='$playoff_report' WHERE id=$seasonId;");
|
||||
return redirect("/users/playoff");
|
||||
}
|
||||
|
||||
|
||||
public function pokal_report() {
|
||||
if (Auth::guest()) { return redirect("/"); }
|
||||
|
||||
$season=Season::getCurrent();
|
||||
$seasonId=$season->id;
|
||||
|
||||
$sql="select pokal_report from seasons where id=$seasonId";
|
||||
$result = DB::select($sql);
|
||||
|
||||
$pokal_report = $result[0]->pokal_report ?? 'Pokal Daten: Noch keine.';
|
||||
|
||||
return view ('users.pokal_report', compact('pokal_report'));
|
||||
}
|
||||
|
||||
public function pokal_report_edit() {
|
||||
if (!Auth::user()->admin) { return redirect("/"); }
|
||||
|
||||
$season=Season::getCurrent();
|
||||
$seasonId=$season->id;
|
||||
|
||||
$sql="select pokal_report from seasons where id=$seasonId";
|
||||
$result = DB::select($sql);
|
||||
|
||||
$pokal_report = $result[0]->pokal_report ?? 'Pokal Daten: Noch keine.';
|
||||
|
||||
return view ('users.pokal_report_edit', compact('pokal_report'));
|
||||
}
|
||||
|
||||
public function store_pokal() {
|
||||
$pokal_report = str_replace("'", "", request('pokal'));
|
||||
$season=Season::getCurrent();
|
||||
$seasonId=$season->id;
|
||||
|
||||
DB::update("UPDATE seasons SET pokal_report='$pokal_report' WHERE id=$seasonId;");
|
||||
//return view('users.pokal_report', compact('pokal_report'));
|
||||
return redirect("/users/pokal");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue