Changeset 137
- Timestamp:
- 23/09/06 15:27:47 (7 years ago)
- Files:
-
- 3 modified
-
components/games.php (modified) (1 diff)
-
templates/games.tpl (modified) (2 diffs)
-
templates/uri.tpl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
components/games.php
r131 r137 1 1 <?php 2 2 3 // figure out which mode we should be in 4 $mode = "list"; // default to list 5 $games_index = array_search("Games", $pathlist); 6 if (isset($pathlist[$games_index + 1])) { 7 $mode = "display"; 8 $game_name = $pathlist[$games_index + 1]; 9 } 3 $games = $DB->GetAll("SELECT * FROM games"); 4 $smarty->assign("games", $games); 10 5 11 6 12 if ($mode == "display") {13 $game = $DB->GetAll("SELECT * FROM games WHERE name=?",array($game_name));14 $smarty->assign("game", $game[0]);15 } else {16 $games = $DB->GetAll("SELECT * FROM games");17 $smarty->assign("games", $games);18 }19 20 21 $smarty->assign("mode", $mode);22 7 $output = $smarty->fetch("games.tpl"); 23 8 $smarty->assign("title", "Games"); -
templates/games.tpl
r135 r137 1 {if isset($game)}2 <h2>{$game.name}</h2>3 <!-- <p>{$game.connect}</p>4 <p>{$game.details}</p> -->5 {else}6 1 <h2>SUCS Games Server</h2> 7 2 <p>Being a member of SUCS gives you exclusive access to our games server. … … 24 19 {/foreach} 25 20 </ul> 26 {/if} -
templates/uri.tpl
r127 r137 8 8 9 9 {if $session->loggedin} 10 <h2>Create a ShortURI</h2>11 10 11 <div class="box" style="width: 80%; margin: auto;"> 12 <div class="boxhead"><h2>Create a ShortURI</h2></div> 13 <div class="boxcontent"> 12 14 <form class="admin" action="{$path}" method="POST"> 13 15 <div class="row"> … … 22 24 <div class="clear"></div> 23 25 </form> 26 </div> 27 <div class="hollowfoot"><div><div></div></div></div> 28 </div> 24 29 {/if} 25 30
