<?php
include "include/config.inc.php";
if(!isset($_SESSION['s_activId']))
{
  header('location:checkLogin.php');
}

$userArray = array();
$i=0;

$selUserQry = "SELECT userId,userName,password,userType
                 FROM user
             ORDER BY userName";
$selUserQryRes = mysql_query($selUserQry);
while($dataRow = mysql_fetch_array($selUserQryRes))
{
	$userArray[$i]['userId']   = $dataRow['userId'];
	$userArray[$i]['userName'] = $dataRow['userName'];
	$userArray[$i]['password'] = $dataRow['password'];
	$userArray[$i]['userType'] = $dataRow['userType'];
	$i++;
}
include("bottom.php");
$smarty->assign('userArray',$userArray);  
$smarty->display('userList.tpl');  
?>