<?php

if( isset($_GET['website']) )
{ 
   $website = $_GET['website'];    
}
else
{
 $website = 'all'; 
}
 
$Expired=1;
 

//连接MySQL
$conn = @mysql_connect("localhost", "gili0512", "nIJ9qatVBLKS");

if($conn == FALSE)
{	
  print_r("连接数据库失败!");
  exit;
}

//选择数据库
mysql_select_db("gili0512_livecheck");

if($website=='all')
{
  //执行SQL
  $result = @mysql_query("SELECT * FROM installinfotj order by id asc");


  if(mysql_num_rows($result) > 0)
  {
    While($row = mysql_fetch_array($result))
    {
       print_r($row["id"].",".$row["Platform"].",".$row["Website"].",".$row["Date"].",".$row["ExeName"].",".$row["Status"]);
       print_r("<br />");
    }
  }
  else
  {
    print_r("没找到该序列号！");
  }

  //释放结果集
  mysql_free_result($result);
}
else
{
 //执行SQL
  $result = @mysql_query("SELECT * FROM installinfotj where website =".$website);


  if(mysql_num_rows($result) > 0)
  {
    print_r("Count:".mysql_num_rows($result)."<br />");

    While($row = mysql_fetch_array($result))
    {
       print_r($row["id"].",".$row["Platform"].",".$row["Website"].",".$row["Date"].",".$row["ExeName"].",".$row["Status"]);
       print_r("<br />");
    }
  }
  else
  {
    print_r("没找到该序列号！");
  }

  //释放结果集
  mysql_free_result($result);
}


//关闭连接
mysql_close();

  print_r("关闭连接！");

?> 
