|
|
|
MCSoft MCArchive ActiveX DLL |
Version
require_once("database.php");
function query_version($Prod_name)
{
//echo "dd";
$conn=login();
$result = mysql_query("SELECT Version FROM mcsoft_produkt WHERE Produkt_Name='$Prod_name'") or die("Anfrage fehlgeschlagen");
$num_rows = mysql_num_rows($result);
$line = mysql_fetch_array($result, MYSQL_NUM);
$version=$line[0];
//echo $version;
$pos=strpos($version, '.',0);
$pos=strpos($version, '.',$pos+1);
$pos=strpos($version, '.',$pos+1);
// Freigeben des Resultsets
mysql_free_result($result);
logout($conn);
return substr($version,0,$pos);
}
function query_shop($Prod_name, $GetField, $id)
{
//echo "dd";
$conn=login();
$result = mysql_query("SELECT $GetField FROM mcsoft_produkt WHERE Produkt_Name='$Prod_name'") or die("Anfrage fehlgeschlagen");
$num_rows = mysql_num_rows($result);
$line = mysql_fetch_array($result, MYSQL_NUM);
$version=str_replace("@ID", $id, $line[0]);
//echo $version;
// Freigeben des Resultsets
mysql_free_result($result);
logout($conn);
return $version;
}
function query_demo_avail($Prod_name)
{
//echo "dd";
$conn=login();
$result = mysql_query("SELECT Demo FROM mcsoft_produkt WHERE Produkt_Name='$Prod_name'") or die("Anfrage fehlgeschlagen");
$num_rows = mysql_num_rows($result);
$line = mysql_fetch_array($result, MYSQL_NUM);
$demo=$line[0];
//echo $demo;
// Freigeben des Resultsets
mysql_free_result($result);
logout($conn);
//echo filetype("download.mcsoft.at/".$demo);
if (strlen($demo)>1 )//&& (file_exists("download/".$demo) || file_exists("http://download.mcsoft.at/".$demo)))
return 1;
else
return 0;
}
function query_full_avail($Prod_name)
{
//echo "dd";
$conn=login();
$result = mysql_query("SELECT Link FROM mcsoft_produkt WHERE Produkt_Name='$Prod_name'") or die("Anfrage fehlgeschlagen");
$num_rows = mysql_num_rows($result);
$line = mysql_fetch_array($result, MYSQL_NUM);
$demo=$line[0];
//echo $demo;
// Freigeben des Resultsets
mysql_free_result($result);
logout($conn);
if (file_exists($demo))
return 1;
else
return 0;
}
function query_full_size($Prod_name)
{
//echo "dd";
$conn=login();
$result = mysql_query("SELECT Link FROM mcsoft_produkt WHERE Produkt_Name='$Prod_name'") or die("Anfrage fehlgeschlagen");
$num_rows = mysql_num_rows($result);
$line = mysql_fetch_array($result, MYSQL_NUM);
$demo=$line[0];
//echo $demo;
// Freigeben des Resultsets
mysql_free_result($result);
logout($conn);
if (file_exists($demo))
return floor(filesize($demo)/1024)."kB";
else
return "-";
}
function query_full_date($Prod_name)
{
//echo "dd";
$conn=login();
$result = mysql_query("SELECT Link FROM mcsoft_produkt WHERE Produkt_Name='$Prod_name'") or die("Anfrage fehlgeschlagen");
$num_rows = mysql_num_rows($result);
$line = mysql_fetch_array($result, MYSQL_NUM);
$demo=$line[0];
//echo $demo;
// Freigeben des Resultsets
mysql_free_result($result);
logout($conn);
if (file_exists($demo))
return date("d.m.Y", filemtime($demo));
else
return "-";
}
function query_full_sec($Prod_name)
{
//echo "dd";
$conn=login();
$result = mysql_query("SELECT Link FROM mcsoft_produkt WHERE Produkt_Name='$Prod_name'") or die("Anfrage fehlgeschlagen");
$num_rows = mysql_num_rows($result);
$line = mysql_fetch_array($result, MYSQL_NUM);
$demo=$line[0];
//echo $demo;
// Freigeben des Resultsets
mysql_free_result($result);
logout($conn);
if (file_exists($demo))
return date("U", filemtime($demo));
else
return "-";
}
function query_full_sort()
{
$arr = array ( "MCCrypt_Pro_FULL" => 0,
"MCCrypt_Pro_oSC" => 1,
"MCCrypt_Pro_oSCW" => 0,
"MCCrypt_Lite_FULL"=> 0,
"MCCrypt_Lite_oSC" => 0,
"MCCrypt_Lite_oSCW"=> 5,
"MCWipe" => 0,
"MCSign" => 0,
"MCSecureMail" => 0,
"MCKeyCard" => 7,
"MCMemoryKey" => 0,
"MCVPUSign" => 0,
"MCVPUVerify" => 0,
"MCNSMail" => 0,
"MCCrypt" => 0,
"MCCipher" => 0,
"MCRijndael" => 0,
"MCHash" => 0,
"MCMAC" => 0,
"MCWipe_DLL" => 0,
"MCArchive" => 0);
while(list($key, $val) = each($arr)) {
$arr [$key] = query_full_sec($key);
}
array_multisort ($arr, SORT_DESC);
$tmp="";
while(list($key, $val) = each($arr)) {
$date = query_full_date($key);
if (strcmp ( $tmp, $date)!=0)
{
if (strcmp ($date, "-")!=0)
{
if (strlen($tmp)!=0)
echo " | ";
echo "
".$date." ";
echo " | Produkt Name | Version | ";
$tmp=$date;
}
else
{
echo " ";
echo "
temporary offline ";
echo " | Produkt Name | Version | ";
$tmp=$date;
}
}
echo " | ".query_shop($key, "Produkt", "mccrypt")." | ".query_shop($key, "Version", "")." | ";
//echo "".$key.": ".query_shop($key, "Version", "")." ";
}
echo " ";
}
function query_mcsoft_down($Prod_name, $Vers)
{
$conn=login();
if (strcmp ( $Vers, "Full")==0)
$Vers="Link";
elseif (strcmp ( $Vers, "Demo")==0)
$Vers="Demo";
$result = mysql_query("SELECT $Vers FROM mcsoft_produkt WHERE Produkt_Name='$Prod_name'") or die("Anfrage fehlgeschlagen");
$row=mysql_fetch_array($result, MYSQL_ASSOC);
//echo $Vers;
// Freigeben des Resultsets
mysql_free_result($result);
$timestamp = date("d.m.Y H:i:s");
$ip = getenv ("REMOTE_ADDR"); // get the ip number of the user
$host = gethostbyaddr($_SERVER['REMOTE_ADDR']); // get the ip number of the user
$Temp=$row[$Vers];
if (file_exists($Temp))
$ret=mail("mcsoft@gmx.at", "Download: $Prod_name", "Produkt: $Temp\nTimestamp: $timestamp\nIP: $ip\nHOST: $host");
logout($conn);
return $row[$Vers];
}
?> | | | |