Skip to content

Commit

Permalink
-v2.4-HRStreamer to v0.8. HRAI to v5.6. Many fixes
Browse files Browse the repository at this point in the history
-v2.4.
-Add user fonts and default fonts to the settings page and config file, respectively.
-Users can now select their default fonts to use within the HRC2 GUI and Apps.
-The client browser must support the selected font and the app developer must choose to utilize them.
-Re-factor the way commonCore handles and looks for unassigned values. 
-Improve reliability/security. Reduce errors.
-Error check the HTML of main pages and iframe pages.
-Add $CLPerms and $ILPerms settings in the settings page and the config file.
-Admins can now set the permission levels to use for specific directories that HRC2 manages.
-Add $ApacheUser and $ApacheGrouo settings to the settings page and config file.
-Admins can now set the user and group for Apache to use when modifying files.
-Fix inconsistencies with relative/absolute paths throughought some of the more obscure GUI elemnts.
-Improve cross-platform liklihood of sucess and altername install directory support.
-Renamed some variables to avoid polluting existing variables and to improve consistency ($HRAIAudio to $defaultHRAIAudio in config.php).

-HRStreamer to v0.8.
-Integrate default and user selected fonts.
-Improve cross platform and alternate install directory support.

-HRAI to v5.6.
-Integrate default and user selected fonts.
  • Loading branch information
zelon88 authored Mar 5, 2018
1 parent 1f0dd69 commit 92d29a5
Show file tree
Hide file tree
Showing 15 changed files with 285 additions and 106 deletions.
6 changes: 3 additions & 3 deletions appCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
// / -----------------------------------------------------------------------------------
// / The follwoing code checks for required core files and terminates if they are missing.
if (!file_exists(realpath(dirname(__FILE__)).'/sanitizeCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2AppCore5, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2AppCore5, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
die (); }
else {
require_once (realpath(dirname(__FILE__)).'/sanitizeCore.php'); }
if (!file_exists(realpath(dirname(__FILE__)).'/commonCore.php')) {
echo nl2br('ERROR!!! HRC2AppCore13, Cannot process the HRCloud2 Common Core file (commonCore.php).'."\n");
echo nl2br('<body>ERROR!!! HRC2AppCore13, Cannot process the HRCloud2 Common Core file (commonCore.php).'."\n".'</body></html>');
die (); }
else {
require_once (realpath(dirname(__FILE__)).'/commonCore.php'); }
if (!file_exists(realpath(dirname(__FILE__)).'/securityCore.php')) {
echo nl2br('ERROR!!! HRC2AppCore21, Cannot process the HRCloud2 Security Core file (securityCore.php).'."\n");
echo nl2br('<body>ERROR!!! HRC2AppCore21, Cannot process the HRCloud2 Security Core file (securityCore.php).'."\n".'</body></html>');
die (); }
else {
require_once (realpath(dirname(__FILE__)).'/securityCore.php'); }
Expand Down
13 changes: 6 additions & 7 deletions appIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,41 @@ function toggle_visibility(id) {
function goBack() {
window.history.back(); }
</script>

</head>
<?php
// / The follwoing code checks if the sanitizeCore.php file exists and
// / terminates if it does not.
if (!file_exists(realpath(dirname(__FILE__)).'/sanitizeCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2AppIndex20, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2AppIndex20, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
die (); }
else {
require_once (realpath(dirname(__FILE__)).'/sanitizeCore.php'); }

// / The follwoing code checks if the commonCore.php file exists and
// / terminates if it does not.
if (!file_exists(realpath(dirname(__FILE__)).'/commonCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2AppIndex28, Cannot process the HRCloud2 Common Core file (commonCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2AppIndex28, Cannot process the HRCloud2 Common Core file (commonCore.php)!'."\n".'</body></html>');
die (); }
else {
require_once (realpath(dirname(__FILE__)).'/commonCore.php'); }

// / The follwoing code checks if the appCore.php file exists and
// / terminates if it does not.
if (!file_exists(realpath(dirname(__FILE__)).'/appCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2AppIndex34, Cannot process the HRCloud2 App Core file (appCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2AppIndex34, Cannot process the HRCloud2 App Core file (appCore.php)!'."\n".'</body></html>');
die (); }
else {
require_once (realpath(dirname(__FILE__)).'/appCore.php'); }

// / The follwoing code checks if the securityCore.php file exists and
// / terminates if it does not.
if (!file_exists(realpath(dirname(__FILE__)).'/securityCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2AppIndex47, Cannot process the HRCloud2 Security file (securityCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2AppIndex47, Cannot process the HRCloud2 Security file (securityCore.php)!'."\n".'</body></html>');
die (); }
else {
require_once (realpath(dirname(__FILE__)).'/securityCore.php'); } ?>

</head>
<body>
<body style="font-family:<?php echo $Font; ?>;">
<div align="center">
<p><strong>HRCloud2 Apps</strong> <?php
// / Secutity related processing.\
Expand Down
6 changes: 4 additions & 2 deletions appLauncher.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,26 @@
<title>HRCloud2 | Apps </title>
<script type="text/javascript" src="/HRProprietary/HRCloud2/Applications/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="/HRProprietary/HRCloud2/Resources/HRC2-Lib.js"></script>
</head>
<?php
// / The follwoing code checks if the sanitizeCore.php file exists and
// / terminates if it does not.
if (!file_exists(realpath(dirname(__FILE__)).'/sanitizeCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2AL10, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2AL10, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
die (); }
else {
require_once (realpath(dirname(__FILE__)).'/sanitizeCore.php'); }

// / The follwoing code checks if the commonCore.php file exists and
// / terminates if it does not.
if (!file_exists(realpath(dirname(__FILE__)).'/commonCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2AL18, Cannot process the HRCloud2 Common Core file (commonCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2AL18, Cannot process the HRCloud2 Common Core file (commonCore.php)!'."\n".'</body></html>');
die (); }
else {
require_once (realpath(dirname(__FILE__)).'/commonCore.php'); }

include(realpath(dirname(__FILE__)).'/header.php'); ?>
<body style="font-family:<?php echo $Font; ?>;">
<div id="centerdiv" align='center' style="margin: 0 auto; max-width:820px;">
<?php if ($ShowHRAI == '1') { ?>
<div id="HRAIDiv" style="float: center; ">
Expand Down
73 changes: 47 additions & 26 deletions commonCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,20 +337,6 @@
$ClamLogDir = $SesLogDir.'/VirusLog_'.$ClamLogFileInc.'_'.$Date.'.txt'; }
// / -----------------------------------------------------------------------------------

// / -----------------------------------------------------------------------------------
// / The following code checks if ShowTips is enabled and loads a random Tip if needed.
if (!isset($ShowTips)) {
$ShowTips = '1'; }
if (file_exists($TipFile) && $ShowTips == '1') {
if ($ShowTips == '1') {
include ($TipFile);
$RandomTip = array_rand($Tips);
$Tip = $Tips[$RandomTip];
$Tips = null;
$RandomTip = null;
unset($Tips, $RandomTip); } }
// / -----------------------------------------------------------------------------------

// / -----------------------------------------------------------------------------------
// / The following code loads the user config file if it exists and creates one if it does not.
if (!file_exists($UserConfig)) {
Expand All @@ -368,8 +354,45 @@

// / -----------------------------------------------------------------------------------
// / The following code sets some default settings if none are specified by config.php.
if (!isset($defaultNickname ) or $defaultNickname == '') $defaultNickname = 'Commander';
if (!isset($defaultTimezone ) or $defaultTimezone == '') $defaultTimezone = 'America/New_York';
if (!isset($defaultNickname) or $defaultNickname == '') $defaultNickname = 'Commander';
if (!isset($defaultTimezone) or $defaultTimezone == '') $defaultTimezone = 'America/New_York';
if (!isset($defaultFont) or $defaultFont == '') $defaultFont = 'Helvetica';
if (!isset($defaultColorScheme) or $defaultColorScheme == '') $defaultColorScheme = '1';
if (!isset($defaultShowHRAI) or $defaultShowHRAI == '') $defaultShowHRAI = '';
if (!isset($defaultHRAIAudio) or $defaultHRAIAudio == '') $defaultHRAIAudio = '1';
if (!isset($defaultShowTips) or $defaultShowTips == '') $defaultShowTips = '1';
if (!isset($nickname) or $nickname == '') $nickname = $defaultNickname;
if (!isset($Timezone) or $Timezone == '') $Timezone = $defaultTimezone;
if (!isset($Font) or $Font == '') $Font = $defaultFont;
if (!isset($ColorScheme) or $ColorScheme == '') $defaultColorScheme = $defaultColorScheme;
if (!isset($ShowHRAI) or $ShowHRAI == '') $defaultShowHRAI = $ShowHRAI;
if (!isset($HRAIAudio) or $HRAIAudio == '') $defaultHRAIAudio = 'Helvetica';
if (!isset($ShowTips) or $ShowTips == '') $ShowTips = $defaultShowTips;
if (!isset($ApacheUser) or $ApacheUser == '') $ApacheUser = 'www-data';
if (!isset($ApacheGroup) or $ApacheGroup == '') $ApacheGroup = 'www-data';
if (!isset($CLPerms) or $CLPerms == '') $CLPerms = '0755';
if (!isset($ILPerms) or $ILPerms == '') $ILPerms = '0755';
// / -----------------------------------------------------------------------------------

// / -----------------------------------------------------------------------------------
// / The following code sets the date and time for the session.
$Now = time();
$Timezone = str_replace(' ', '_', $Timezone);
date_default_timezone_set($Timezone);
$Date = date("m_d_y");
$Time = date("F j, Y, g:i a");
// / -----------------------------------------------------------------------------------

// / -----------------------------------------------------------------------------------
// / The following code checks if ShowTips is enabled and loads a random Tip if needed.
if (file_exists($TipFile) && $ShowTips == '1') {
if ($ShowTips == '1') {
include ($TipFile);
$RandomTip = array_rand($Tips);
$Tip = $Tips[$RandomTip];
$Tips = null;
$RandomTip = null;
unset($Tips, $RandomTip); } }
// / -----------------------------------------------------------------------------------

// / -----------------------------------------------------------------------------------
Expand Down Expand Up @@ -405,6 +428,10 @@
$HP = $HighPerformanceAV;
$TH = $ThoroughAV;
$PS = $PersistentAV;
$AU = $ApacheUser;
$AG = $ApacheGroup;
$CLP = $CLPerms;
$ILP = $ILPerms;
include ($AdminConfig);
$AdminIDRAW = null;
$AdminID = null;
Expand All @@ -413,22 +440,16 @@
unset ($AdminIDRAW, $AdminID, $adminAppDataInstDir, $AdminConfig);
// / -----------------------------------------------------------------------------------

// / -----------------------------------------------------------------------------------
// / The following code resets the official time according to the Timezone entry in the user's config file.
if (!isset($Timezone) or $Timezone == '') $Timezone = $defaultTimezone;
$Now = time();
$Timezone = str_replace(' ', '_', $Timezone);
date_default_timezone_set($Timezone);
$Date = date("m_d_y");
$Time = date("F j, Y, g:i a");
// / -----------------------------------------------------------------------------------

// / -----------------------------------------------------------------------------------
// / The following code re-sets some variables for security. Just-in-case the UserConfig is compromised.
$VirusScan = $AV;
$HighPerformanceAV = $HP;
$ThoroughAV = $TH;
$PersistentAV = $PS;
$ApacheUser = $AU;
$ApacheGroup = $AG;
$CLPerms = $CLP;
$ILPerms = $ILP;
// / -----------------------------------------------------------------------------------

// / -----------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions compatibilityCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/*
HRCLOUD2 VERSION INFORMATION
THIS VERSION : v2.3.7
WRITTEN ON : 2/28/2018
THIS VERSION : v2.4
WRITTEN ON : 3/5/2018
*/

// / -----------------------------------------------------------------------------------
Expand Down
8 changes: 6 additions & 2 deletions help.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,26 @@
<title>HRCloud2 | Settings</title>
<script type="text/javascript" src="/HRProprietary/HRCloud2/Applications/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="/HRProprietary/HRCloud2/Resources/HRC2-Lib.js"></script>
</head>

<?php
if (!file_exists(realpath(dirname(__FILE__)).'/sanitizeCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2Help10, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2Help10, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
die (); }
else {
require(realpath(dirname(__FILE__)).'/sanitizeCore.php'); }

// / The follwoing code checks if the commonCore.php file exists and
// / terminates if it does not.
if (!file_exists(realpath(dirname(__FILE__)).'/commonCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2Help19, Cannot process the HRCloud2 Common Core file (commonCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2Help19, Cannot process the HRCloud2 Common Core file (commonCore.php)!'."\n".'</body></html>');
die (); }
else {
require(realpath(dirname(__FILE__)).'/commonCore.php'); }

include('header.php'); ?>

<body style="font-family:<?php echo $Font; ?>;">
<div id="centerdiv" align='center' style="margin: 0 auto; max-width:820px;">
<?php if ($ShowHRAI == '1') { ?>
<div id="HRAIDiv" style="float: center; ">
Expand Down
10 changes: 6 additions & 4 deletions helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@
function goBack() {
window.history.back(); }
</script>
</head>

<?php
// / The follwoing code checks if the sanitizeCore.php file exists and
// / terminates if it does not.
if (!file_exists(realpath(dirname(__FILE__)).'/sanitizeCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2Helper33, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2Helper33, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
die (); }
else {
require(realpath(dirname(__FILE__)).'/sanitizeCore.php'); }

// / The follwoing code checks if the commonCore.php file exists and
// / terminates if it does not.
if (!file_exists(realpath(dirname(__FILE__)).'/commonCore.php')) {
echo nl2br('ERROR!!! HRC2Helper35, Cannot process the HRCloud2 Common Core file (commonCore.php).'."\n");
echo nl2br('<body>ERROR!!! HRC2Helper35, Cannot process the HRCloud2 Common Core file (commonCore.php).'."\n".'</body></html>');
die (); }
else {
require(realpath(dirname(__FILE__)).'/commonCore.php'); }
?>
</head>
<body>

<body style="font-family:<?php echo $Font; ?>;">
<div align="center">
<h3>HRCloud2 Help</h3>
</div>
Expand Down
9 changes: 6 additions & 3 deletions index1.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,35 @@
<title>HRCloud2 | Home </title>
<script type="text/javascript" src="/HRProprietary/HRCloud2/Applications/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="/HRProprietary/HRCloud2/Resources/HRC2-Lib.js"></script>
</head>
<?php
// / The follwoing code checks if the sanitizeCore.php file exists and
// / terminates if it does not.
if (!file_exists('/var/www/html/HRProprietary/HRCloud2/sanitizeCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2Index1-10, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2Index1-10, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
die (); }
else {
require_once ('/var/www/html/HRProprietary/HRCloud2/sanitizeCore.php'); }

// / The follwoing code checks if the commonCore.php file exists and
// / terminates if it does not.
if (!file_exists('/var/www/html/HRProprietary/HRCloud2/commonCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2Index1-19, Cannot process the HRCloud2 Common Core file (commonCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2Index1-19, Cannot process the HRCloud2 Common Core file (commonCore.php)!'."\n".'</body></html>');
die (); }
else {
include_once ('/var/www/html/HRProprietary/HRCloud2/commonCore.php'); }

// / The follwoing code checks if the commonCore.php file exists and
// / terminates if it does not.
if (!file_exists('/var/www/html/HRProprietary/HRCloud2/appCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2AL34, Cannot process the HRCloud2 App Core file (appCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2AL34, Cannot process the HRCloud2 App Core file (appCore.php)!'."\n".'</body></html>');
die (); }
else {
require_once ('/var/www/html/HRProprietary/HRCloud2/appCore.php'); }

include('/var/www/html/HRProprietary/HRCloud2/header.php'); ?>

<body style="font-family:<?php echo $Font; ?>;">
<div id="centerdiv" align='center' style="margin: 0 auto; max-width:815px;">
<?php if ($ShowHRAI == '1') { ?>
<div id="HRAIDiv" style="float: center; ">
Expand Down
11 changes: 7 additions & 4 deletions index2.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" href="/HRProprietary/HRCloud2/favicon.ico">
<title>HRCloud2 | Home </title>
<script type="text/javascript" src="/HRProprietary/HRCloud2/Applications/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="/HRProprietary/HRCloud2/Resources/HRC2-Lib.js"></script>
</head>
<?php

// / The follwoing code checks if the sanitizeCore.php file exists and
// / terminates if it does not.
if (!file_exists('sanitizeCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2Index2-10, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2Index2-10, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
die (); }
else {
require_once ('sanitizeCore.php'); }

// / The follwoing code checks if the commonCore.php file exists and
// / terminates if it does not.
if (!file_exists('commonCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2Index2-19, Cannot process the HRCloud2 Common Core file (commonCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2Index2-19, Cannot process the HRCloud2 Common Core file (commonCore.php)!'."\n".'</body></html>');
die (); }
else {
require_once ('commonCore.php'); }

include('header.php'); ?>

<body style="font-family:<?php echo $Font; ?>;">
<div id="centerdiv" align='center' style="margin: 0 auto; max-width:820px;">
<?php if ($ShowHRAI == '1') { ?>
<div id="HRAIDiv" style="float: center; ">
Expand Down
5 changes: 3 additions & 2 deletions logs.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@
// / The follwoing code checks if the sanitizeCore.php file exists and
// / terminates if it does not.
if (!file_exists('sanitizeCore.php')) {
echo nl2br('</head><body>ERROR!!! HRC2Logs12, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
echo nl2br('<body>ERROR!!! HRC2Logs12, Cannot process the HRCloud2 Sanitization Core file (sanitizeCore.php)!'."\n".'</body></html>');
die (); }
else {
require('sanitizeCore.php'); }

// / The follwoing code checks if the commonCore.php file exists and
// / terminates if it does not.
if (!file_exists('commonCore.php')) {
echo nl2br('ERROR!!! HRC2Logs20, Cannot process the HRCloud2 Common Core file (commonCore.php).'."\n");
echo nl2br('<body>ERROR!!! HRC2Logs20, Cannot process the HRCloud2 Common Core file (commonCore.php).'."\n".'</body></html>');
die (); }
else {
require('commonCore.php'); }

include('header.php'); ?>
<body style="font-family:<?php echo $Font; ?>;">
<div id="centerdiv" align='center' style="margin: 0 auto; max-width:815px;">
<?php if ($ShowHRAI == '1') { ?>
<div id="HRAIDiv" style="float: center; ">
Expand Down
Loading

0 comments on commit 92d29a5

Please sign in to comment.