Commit
This commit is contained in:
		
							parent
							
								
									082ba1c709
								
							
						
					
					
						commit
						d10736bdb9
					
				| @ -81,11 +81,11 @@ class AccessControl | ||||
|     { | ||||
|         if ($this->app->user->loggedIn && $this->app->user->powerLevel >= $powerLevel) | ||||
|         { | ||||
|             echo "Authorized!"; | ||||
|             # code...
 | ||||
|         } else { | ||||
|             http_response_code(401); | ||||
|             $this->app->view("template/header", ["title" => "Ingen tilgang!"]); | ||||
|             $this->app->view("Core/AccessControl/unauthorized"); | ||||
|             $this->app->view("App/Core/AccessControl/unauthorized"); | ||||
|             $this->app->view("template/footer"); | ||||
|             die(); | ||||
|         } | ||||
|  | ||||
| @ -1,32 +0,0 @@ | ||||
| <h1>Lagtabell</h1> | ||||
| <br> | ||||
| <table> | ||||
|     <tr> | ||||
|         <th>#</th>
 | ||||
|         <th>Navn</th> | ||||
|         <th>Bedrift</th> | ||||
|         <th>Kortnummer</th> | ||||
|         <th>Leder</th> | ||||
|         <th>Telefon</th> | ||||
|         <th>Deltagere</th> | ||||
|         <th>Runder</th> | ||||
|         <th>Bestetid</th> | ||||
|     </tr> | ||||
|     <?php | ||||
|     $i = 0;  | ||||
|     foreach ($teams as $team) { | ||||
|         $i++; | ||||
|         echo '<tr>'; | ||||
|         echo "<td>" . $i . "</td>"; | ||||
|         echo "<td>" . htmlspecialchars($team->name) . "</td>"; | ||||
|         echo "<td>" . htmlspecialchars($team->company) . "</td>"; | ||||
|         echo "<td>" . htmlspecialchars($team->cardnumber) . "</td>"; | ||||
|         echo "<td>" . htmlspecialchars($team->leader) . "</td>"; | ||||
|         echo "<td>" . htmlspecialchars($team->phone) . "</td>"; | ||||
|         echo "<td>" . htmlspecialchars($team->participants) . "</td>"; | ||||
|         echo "<td>" . htmlspecialchars($team->rounds) . "</td>"; | ||||
|         echo "<td>" . "Ukjent" . "</td>"; | ||||
|         echo '</tr>'; | ||||
|     } | ||||
|     ?>
 | ||||
| </table> | ||||
| @ -39,7 +39,6 @@ | ||||
|             <ul> | ||||
|                 <li><a href="<?=$this->config['root_url']?>index.php">Forside</a></li> | ||||
|                 <li><a href="<?=$this->config['root_url']?>example.php">Eksempel</a></li> | ||||
|                 <li><a href="<?=$this->config['root_url']?>teamtable/index.php">Se lagene</a></li> | ||||
|             </ul> | ||||
| 
 | ||||
|             <?php if ($this->user->loggedIn): ?>
 | ||||
|  | ||||
| @ -1,10 +1,4 @@ | ||||
| <?php | ||||
| $app = require '../../app/inc.php'; | ||||
| <?php $app = require '../../app/inc.php'; | ||||
| 
 | ||||
| $model = $app->model('Teamtable'); | ||||
| 
 | ||||
| $teams = $model->getAll(); | ||||
| 
 | ||||
| $app->view('template/header', ['title' => 'Lagtabell']); | ||||
| $app->view('pages/teamtable/index', ["teams" => $teams]); | ||||
| $app->view('template/footer'); | ||||
| // redirect
 | ||||
| $app->redirect('edit/'); | ||||
		Reference in New Issue
	
	Block a user