<?php
include(dirname(__FILE__)."/require.php");
if($ppurview[18]!=1)
{
  Header("Location: jump.php?id=25&jump=main.php");
  exit();
}
$phpcolor->table=$core_mysql_prefix."user";
$phpcolor->where="id = '".$_GET['id']."'";
if(isset($_GET['action']) and isset($_GET['id']) and $_GET['action'] == "yes")
{
  $phpcolor->field="state='1'";
  $phpcolor->upgrade();
  Header("Location: jump.php?id=24&jump=useraudit.php");
}
elseif(isset($_GET['action']) and isset($_GET['id']) and $_GET['action'] == "no")
{
  $phpcolor->delete();
  Header("Location: jump.php?id=24&jump=useraudit.php");
}
else
{
  if(!isset($_GET['page']))
    $_GET['page']=0;
  $phpcolor->field="*";
  $phpcolor->where="state = '3'";
  $count = $phpcolor->exist(2);
  $phpcolor->field="id,username,email,registered";
  $phpcolor->where="state = '3' limit ".($_GET['page']*20).",20";
  $user=$phpcolor->assignment();
  $page=pages($count,20,$_GET['page'],'useraudit','','','0');
  $tpl -> assign("user", $user);
  $tpl -> assign("page", $page);
  $tpl -> display("useraudit.htm");
}
?>