Changeset 137

Show
Ignore:
Timestamp:
23/09/06 15:27:47 (7 years ago)
Author:
dez
Message:

Prettifies ShortURI component (dez)
Changes to games component

Files:
3 modified

Legend:

Unmodified
Added
Removed
  • components/games.php

    r131 r137  
    11<?php 
    22 
    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); 
    105 
    116 
    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); 
    227$output = $smarty->fetch("games.tpl"); 
    238$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} 
    61<h2>SUCS Games Server</h2> 
    72<p>Being a member of SUCS gives you exclusive access to our games server. 
     
    2419{/foreach} 
    2520</ul> 
    26 {/if} 
  • templates/uri.tpl

    r127 r137  
    88 
    99{if $session->loggedin} 
    10 <h2>Create a ShortURI</h2> 
    1110 
     11<div class="box" style="width: 80%; margin: auto;"> 
     12<div class="boxhead"><h2>Create a ShortURI</h2></div> 
     13<div class="boxcontent"> 
    1214<form class="admin" action="{$path}" method="POST"> 
    1315        <div class="row"> 
     
    2224        <div class="clear"></div> 
    2325</form> 
     26</div> 
     27<div class="hollowfoot"><div><div></div></div></div> 
     28</div> 
    2429{/if} 
    2530