Permalink
Browse files

v3.0.5 - Add option to export user data

-v3.0.5.
-Add option to the settings page for exporting user data (logs, cache, bookmarks, notes, ect...)
  • Loading branch information...
zelon88 committed Jan 30, 2019
1 parent a1effac commit b7963dcdb43a0d6091f60c6644f41f16fcf22d98
Showing with 35 additions and 11 deletions.
  1. +8 −1 CHANGELOG.txt
  2. +2 −2 compatibilityCore.php
  3. +24 −7 settingsCore.php
  4. +1 −1 versionInfo.php
@@ -1,5 +1,12 @@
COMMIT 1/29/2019
v3.0.5 - Add option to export user data

-v3.0.5.
-Add option to the settings page for exporting user data (logs, cache, bookmarks, notes, ect...)

----------
COMMIT 1/5/2019
v3.0.4 - Fix bugs with backupCore.
v3.0.4 - Fix bugs with backupCore.

-v3.0.4.
-Fix bugs with backupCore on and around lines 61, 81, and 88.
@@ -2,8 +2,8 @@
/*
HRCLOUD2 VERSION INFORMATION
THIS VERSION : v3.0.4
WRITTEN ON : 1/5/2019
THIS VERSION : v3.0.5
WRITTEN ON : 1/29/2019
*/
// / -----------------------------------------------------------------------------------
@@ -309,8 +309,6 @@ function selectChanged(id1, id2) {
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
exec('nativefier -n "HRCloud2-Client" -a "'.$GenClientCPU.'" -p "'.$GenClientOS.'" "'.$GenClientURL.$GenClientHomepage.'" "'.$GenClientDir.'"');
@copy ('index.html', $ClientInstallDir.'/'.$GenClientOS.'/index.html');
@system("/bin/chmod -R 0755 $CloudLoc");
@system("/bin/chmod -R 0755 $InstLoc");
if (file_exists($GenClientDir)) {
foreach ($iterator = new \RecursiveIteratorIterator (
new \RecursiveDirectoryIterator ($GenClientDir, \RecursiveDirectoryIterator::SKIP_DOTS),
@@ -329,15 +327,15 @@ function selectChanged(id1, id2) {
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
exec('cd '.$GenClientDir.'; zip -r -o '.$GenClientZip.' '.$GenClientPre.$GenClientOS1.'-'.$GenClientCPU);
if (!file_exists($GenClientZip)) {
$txt = 'ERROR!!! HRC2SettingsCore197, Could not create the Client App zip file on '.$Time.'.';
$txt = 'ERROR!!! HRC2SettingsCore197, Could not create the Client App zip file on '.$Time.'!';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
die($txt); }
if (!is_dir($GenClientDir)) {
$txt = 'ERROR!!! HRC2SettingsCore201, Could not create the Client App build folder on '.$Time.'.';
$txt = 'ERROR!!! HRC2SettingsCore201, Could not create the Client App build folder on '.$Time.'!';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
die($txt); } }
if (!in_array($GenClientOS, $SupportedClientOS) or !in_array($GenClientCPU, $SupportedClientCPU)) {
$txt = 'ERROR!!! HRC2SettingsCore189, Invalid Client App Settings specified on '.$Time.'.';
$txt = 'ERROR!!! HRC2SettingsCore189, Invalid Client App Settings specified on '.$Time.'!';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND); } }
@copy($GenClientZip, $GenClientTempZip);
if (is_dir($GenClientDir.'HRCloud2-Client-'.$GenClientOS1.'-'.$GenClientCPU)) {
@@ -352,7 +350,24 @@ function selectChanged(id1, id2) {
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / The following code loads the backupCore to perform an admin on-demand backup,
// / The following code generates a copy of the users AppData directory to their cloud drive in .zip format.
if (isset($_POST['downloadAppData'])) {
if (is_dir($LogLoc)) {
$archDst = $CloudUsrDir.'User-Data_'.$Date.'.zip';
$archTempDst = $CloudTmpDir.'User-Data_'.$Date.'.zip';
$txt = 'OP-Act: Executing "zip -j '.$archDst.' '.$LogLoc.' -x *Shared*" on '.$Time.'.';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
shell_exec('cd '.$CloudUsrDir.'; zip -r '.$archDst.' .AppData -x *Shared*');
@copy($archDst, $archTempDst);
echo('Generated a copy of your User Data to your Cloud Drive! | <a href="'.$URL.'/HRProprietary/HRCloud2/DATA/'.$UserID.'/User-Data_'.$Date.'.zip"><strong>Download Now</strong></a>.'.$br.'</hr>'); }
else {
$txt = 'ERROR!!! HRC2SettingsCore360, Could not generate a User Data package on '.$Time.'!';
$MAKELogFile = file_put_contents($LogFile, $txt.PHP_EOL, FILE_APPEND);
die($txt); } }
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / The following code loads the backupCore to perform an admin on-demand backup
if (isset($_POST['backupUserDataNow'])) {
if (!file_exists(realpath(dirname(__FILE__)).'/backupCore.php')) die ('</head><body>ERROR!!! HRC2SettingsCore355, Cannot process the HRCloud2 Backup Core file (backupCore.php)!<br /></body></html>');
else require(realpath(dirname(__FILE__)).'/backupCore.php');
@@ -366,7 +381,6 @@ function selectChanged(id1, id2) {
echo('Modified Files Replaced: '.$BackupReplacedFiles.$hr); }
// / -----------------------------------------------------------------------------------
// / -----------------------------------------------------------------------------------
// / Set the echo value for the "Data Comrpession" option.
if ($DataCompression == '0' or $DataCompression == '' or !isset($DataCompression)) $DCURL = 'Disabled';
@@ -492,6 +506,9 @@ function selectChanged(id1, id2) {
<div align='left'>
<form action="settingsCore.php" method="post" name='NEWAppSettings' id='NEWAppSettings'>

<p alt="Generate an archive of my user specific data." title="Generate an archive of my user specific data." style="padding-left:15px;"> Export User Data: </p>
<p style="float:center; padding-left:10%;"><input type='submit' name='downloadAppData' id='downloadAppData' value=' Export User Data' style="padding-left:30px; padding: 2px; border: 1px solid black" onclick="toggle_visibility('loading');"/></p>

<p alt="Generate a Desktop client App for your device." title="Generate a client App for your device." style="padding-left:15px;"><strong></strong> Desktop App: </p>
<p>
<select id="GenClientOS" name="GenClientOS" style="float:left; padding-left:30px; width:30%;">
@@ -1,4 +1,4 @@
<?php
// / This file contains the current HRCloud2 version for auto-update purposes.
// /
$Version = 'v3.0.4';
$Version = 'v3.0.5';

0 comments on commit b7963dc

Please sign in to comment.