';
/*background-repeat: no-repeat;
background-size: 100% 100%;
background-color:rgba(0, 0, 0, 0.5);*/
/* "
*/
$cumulative_downloads = number_format($package->PkgDownloads, 0, ".", ",");
//build download link for downloads.php, encrypt link, add time stamp
$encryption = openssl_encrypt($package->PackageID, $ciphering,
$encryption_key, $options, $encryption_iv);
$time_key = "4".$unix_time."3";
$removefrom = array(":", " ", "'", "(", ")", ".", "[", "]", ",", "=", "+");
$download_name = str_replace($removefrom, "_",$package->PackageName);
$download_link = "/software/download.php?action=$encryption&v=$time_key&package=$download_name";
//format file size
$bytes = formatBytes($package->PkgFileSize, 2);
//get support options into a readable text block
$support_options = "::".$package->PkgSupportOptions;
$support_array = array();
if (strpos($support_options, "Online")>0){$support_array[] = "Online Documents";}
if (strpos($support_options, "Email")>0){$support_array[] = "Email Support";}
if (strpos($support_options, "Paid")>0){$support_array[] = "Paid Support";}
$support = implode(", ", $support_array);
//convert OS to readable
if ($package->PkgOS=="win7"){$os_display = "Windows 7 or Later";}
else if ($package->PkgOS=="win7"){$os_display = "Windows 8 or Later";}
else {$os_display = "Windows 10 or Later";}
$content .= $top_div.'
';
}
//otherwise, display all in summary format
//this should probably display a more summary version of the software
//and definitely needs pagination as we get over 8 or 10 softare packages
else {
$query = "SELECT * FROM `software_packages` where `PkgActive` = 1";
//if the query returns results, analyze it
if ($result = $dbi->query($query)){
while ($obj = $result->fetch_object()){
$package = new Pkg($dbi,$obj->PackageID);
$tmp_rating = (isset($package->PkgRating) ? $package->PkgRating : 5);
$cumulative_ratings = display_rating($tmp_rating);
$cumulative_reviews = display_reviews();
// .hero-logo {
// background-image: url("photographer.jpg"); /* The image used */
// background-color: #cccccc; /* Used if the image is unavailable */
// height: 500px; /* You must set a specified height */
// background-position: right; /* Center the image */
// background-repeat: no-repeat; /* Do not repeat the image */
// background-size: ; /* Resize the background image to cover the entire container */
// }
//get logo and screen shots
$screen_shots = "";
//create a time key by adding two random digits to the front and back of unix time so images can't be hotlinked
$time_key = "4".$unix_time."3";
foreach ($package->PkgScreenShots as $this_shot){
$screen_shots .= "
";
}
$support_docs_div = "";
if (isset($package->PkgSupportDocs)){
$support_docs_div = '
';
/*background-repeat: no-repeat;
background-size: 100% 100%;
background-color:rgba(0, 0, 0, 0.5);*/
/* "
*/
$cumulative_downloads = number_format($package->PkgDownloads, 0, ".", ",");
//build download link for downloads.php, encrypt link, add time stamp
$encryption = openssl_encrypt($package->PackageID, $ciphering,
$encryption_key, $options, $encryption_iv);
$time_key = "4".$unix_time."3";
$removefrom = array(":", " ", "'", "(", ")", ".", "[", "]", ",", "=", "+");
$download_name = str_replace($removefrom, "_",$package->PackageName);
$download_link = "/software/download.php?action=$encryption&v=$time_key&package=$download_name";
//format file size
$bytes = formatBytes($package->PkgFileSize, 2);
//get support options into a readable text block
$support_options = "::".$package->PkgSupportOptions;
$support_array = array();
if (strpos($support_options, "Online")>0){$support_array[] = "Online Documents";}
if (strpos($support_options, "Email")>0){$support_array[] = "Email Support";}
if (strpos($support_options, "Paid")>0){$support_array[] = "Paid Support";}
$support = implode(", ", $support_array);
//convert OS to readable
if ($package->PkgOS=="win7"){$os_display = "Windows 7 or Later";}
else if ($package->PkgOS=="win7"){$os_display = "Windows 8 or Later";}
else {$os_display = "Windows 10 or Later";}
$content .= $top_div.'
Software Package Details:
Reviews: '.$cumulative_reviews.' | Rating: '.$cumulative_ratings.'
Total Downloads: '.$cumulative_downloads.'
Description:
'.$package->PkgDescription.'
Support Options:
'.$support.'
Download Size: '.$bytes.'
Screen Shots / Previews:
'.$screen_shots.'
'.$support_docs_div.'
';
}
}
else {
$content .= '';
}
}
}
//otherwise check for pacakges which are viewable by the general public
else {
$load_new_html = '
';
$content = "
[Software Packages Available]
$load_new_html
$content";
//if there is a specific package selected, display it
//in the future, this should probably carry more information such as tutorials and rating/review details
if (isset($action) && is_numeric($action)){
$package = new Pkg($dbi,$action);
//if the package is publicly viewable or downloadable proceed
if ($package->PkgAccess > 0){
$tmp_rating = (isset($package->PkgRating) ? $package->PkgRating : 5);
$cumulative_ratings = display_rating($tmp_rating);
$cumulative_reviews = display_reviews();
//get logo and screen shots
$screen_shots = "";
//create a time key by adding two random digits to the front and back of unix time so images can't be hotlinked
$time_key = "4".$unix_time."3";
foreach ($package->PkgScreenShots as $this_shot){
$screen_shots .= "
";
}
$support_divs = ""; //the divs that go above the javascript
$support_code = ""; //the object variables that go inside the script
$iter = 0; //we have to number the variables and the divid's so they are different if more than 1 pdf
//installation and support documents have been removed from public view
$top_div = '
';
$cumulative_downloads = number_format($package->PkgDownloads, 0, ".", ",");
//build download link for downloads.php, encrypt link, add time stamp
$encryption = openssl_encrypt($package->PackageID, $ciphering,
$encryption_key, $options, $encryption_iv);
$time_key = "4".$unix_time."3";
$removefrom = array(":", " ", "'", "(", ")", ".", "[", "]", ",", "=", "+");
$download_name = str_replace($removefrom, "_",$package->PackageName);
$download_link = "/software/download.php?action=$encryption&v=$time_key&package=$download_name";
//if the package is publicly downloadable, allow it
if ($package->PkgAccess == 2){
$download_button = '
Download Now!';
}
else {
$download_button = '
Join the Community to Download!';
}
//format file size
$bytes = formatBytes($package->PkgFileSize, 2);
//get support options into a readable text block
$support_options = "::".$package->PkgSupportOptions;
$support_array = array();
if (strpos($support_options, "Online")>0){$support_array[] = "Online Documents";}
if (strpos($support_options, "Email")>0){$support_array[] = "Email Support";}
if (strpos($support_options, "Paid")>0){$support_array[] = "Paid Support";}
$support = implode(", ", $support_array);
//convert OS to readable
if ($package->PkgOS=="win7"){$os_display = "Windows 7 or Later";}
else if ($package->PkgOS=="win7"){$os_display = "Windows 8 or Later";}
else {$os_display = "Windows 10 or Later";}
$content .= $top_div.'
Software Package Details:
Reviews: '.$cumulative_reviews.' | Rating: '.$cumulative_ratings.'
Total Downloads: '.$cumulative_downloads.'
Description:
'.$package->PkgDescription.'
Support Options:
'.$support.'
Download Size: '.$bytes.'
'.$download_button.'
Screen Shots / Previews:
'.$screen_shots.'
Installation and support documents are only available to community members!
';
}
else {
$content .= $body_login_form;
}
}
//otherwise, display all in summary format
//this should probably display a more summary version of the software
//and definitely needs pagination as we get over 8 or 10 softare packages
else {
$query = "SELECT * FROM `software_packages` where `PkgActive` = 1 and `PkgAccess` > 0";
//if the query returns results, analyze it
if ($result = $dbi->query($query)){
while ($obj = $result->fetch_object()){
$package = new Pkg($dbi,$obj->PackageID);
$tmp_rating = (isset($package->PkgRating) ? $package->PkgRating : 5);
$cumulative_ratings = display_rating($tmp_rating);
$cumulative_reviews = display_reviews();
// .hero-logo {
// background-image: url("photographer.jpg"); /* The image used */
// background-color: #cccccc; /* Used if the image is unavailable */
// height: 500px; /* You must set a specified height */
// background-position: right; /* Center the image */
// background-repeat: no-repeat; /* Do not repeat the image */
// background-size: ; /* Resize the background image to cover the entire container */
// }
//get logo and screen shots
$screen_shots = "";
//create a time key by adding two random digits to the front and back of unix time so images can't be hotlinked
$time_key = "4".$unix_time."3";
foreach ($package->PkgScreenShots as $this_shot){
$screen_shots .= "
";
}
$support_docs_div = "";
if (isset($package->PkgSupportDocs)){
$support_docs_div = '
';
}
$top_div = '
';
$cumulative_downloads = number_format($package->PkgDownloads, 0, ".", ",");
//build download link for downloads.php, encrypt link, add time stamp
$encryption = openssl_encrypt($package->PackageID, $ciphering,
$encryption_key, $options, $encryption_iv);
$time_key = "4".$unix_time."3";
$removefrom = array(":", " ", "'", "(", ")", ".", "[", "]", ",", "=", "+");
$download_name = str_replace($removefrom, "_",$package->PackageName);
$download_link = "/software/download.php?action=$encryption&v=$time_key&package=$download_name";
//if the package is publicly downloadable, allow it
if ($package->PkgAccess == 2){
$download_button = '
Download Now!';
}
else {
$download_button = '
Join the Community to Download!';
}
//format file size
$bytes = formatBytes($package->PkgFileSize, 2);
//get support options into a readable text block
$support_options = "::".$package->PkgSupportOptions;
$support_array = array();
if (strpos($support_options, "Online")>0){$support_array[] = "Online Documents";}
if (strpos($support_options, "Email")>0){$support_array[] = "Email Support";}
if (strpos($support_options, "Paid")>0){$support_array[] = "Paid Support";}
$support = implode(", ", $support_array);
//convert OS to readable
if ($package->PkgOS=="win7"){$os_display = "Windows 7 or Later";}
else if ($package->PkgOS=="win7"){$os_display = "Windows 8 or Later";}
else {$os_display = "Windows 10 or Later";}
$content .= $top_div.'
Software Package Details:
Reviews: '.$cumulative_reviews.' | Rating: '.$cumulative_ratings.'
Total Downloads: '.$cumulative_downloads.'
Description:
'.$package->PkgDescription.'
Support Options:
'.$support.'
Download Size: '.$bytes.'
'.$download_button.'
Screen Shots / Previews:
'.$screen_shots.'
'.$support_docs_div.'
';
}
}
else {
$content .= 'There are currently no software packages available for non-members to download.
Please
Join the Community or Login to access our full line of software packages!
';
$content .= $body_login_form;
}
}
}
$content .= "