######################################################################################
##
## Program :
## Description :
## Programmer : äªÂÃѵ¹ì Êع·ÃÇÔÀÒµ
## Email : webmaster@sixhead.net,sixheadz@hotmail.com
## Website : http://www.sixhead.net
## Date :
## Modify log :
##
######################################################################################
#####################################################################
#### start setup ####
$template_detail = "template_detail.html";
#### end of setup ####
#####################################################################
#####################################################################
#### start program ####
require "_config.php";
require "_module.php";
ob_start();
global $tp;
@$db = mysql_connect($db_host,$db_user,$db_pass);
mysql_select_db($config_db_name);
if (!$db) { echo "Error connect to Database: " . mysql_error(); ob_end_flush(); exit; }
$sql = "SELECT * FROM $config_table_program WHERE (ID = $id)";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
$flag_th = "";
if ($row[NATION] == "TH") {
$flag_th = " ";
$tp[flag_th] = $flag_th;
}
$tp[ID] = $row[ID];
$tp[NAME] = ucfirst($row[NAME]);
$tp[COMPANY] = $row[COMPANY]; if ($row[COMPANY_URL]) { $tp[COMPANY] = "$row[COMPANY]"; }
list($DATE_ADD) = split(" ", $row[DATE_ADD]);
$tp[DATE_ADD] = $DATE_ADD;
$tp[LICENSE] = $row[LICENSE];
$tp[URL] = urlencode($row[URL]);
$tp[DESCRIPTION] = $row[DESCRIPTION];
$tp[DESCRIPTION] = stripslashes($tp[DESCRIPTION]);
$tp[DOWNLOAD_ALL] = Gen_Comify($row[DOWNLOAD_ALL]);
$tp[SIZE] = Gen_File_Size($row[SIZE]);
$tp[QUALITY] = "";
$vote[$row[S1]] = "1";
$vote[$row[S2]] = "2";
$vote[$row[S3]] = "3";
$vote[$row[S4]] = "4";
$vote[$row[S5]] = "5";
ksort ($vote);
$tp[average] = end($vote);
if ($row[URL_MIRROR]) {
$MIRROR = preg_split('/\|/', $row[URL_MIRROR], -1, PREG_SPLIT_NO_EMPTY);
foreach ($MIRROR as $mirror) {
$tp[URL_MIRROR] .= "$mirror
";
}
$tp[MIRROR_MESSAGE] = "More download links";
$tp[MIRROR_LINK] = "