Replacing alerts with ICEcoder.message

This commit is contained in:
Matt Pass
2016-08-01 08:39:48 +01:00
parent 41f52cc3be
commit f15a1b1d8e
4 changed files with 6 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ include("settings.php");
$file = realpath($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['file'])));
// If it doesn't exist, or doesn't start with the $docRoot, stop here
if (!file_exists($file) || strpos(str_replace("\\","/",$file),$docRoot) !== 0) {
die("<script>alert('Sorry, that file doesn\'t appear to exist');</script>");
die("<script>top.ICEcoder.message('Sorry, that file doesn\'t appear to exist');</script>");
}
if (file_exists($file)) {

View File

@@ -59,7 +59,7 @@ for ($i=0; $i<count($allFiles); $i++) {
// Or a remote URL that doesn't start http
($_GET['action']=="getRemoteFile" && strpos($allFiles[$i],"http") !== 0)
) {
die("alert('Sorry! - problem with file requested');</script>");
die("top.ICEcoder.message('Sorry! - problem with file requested');</script>");
};
}
@@ -97,7 +97,7 @@ if ($_GET['action']=="load") {
ftpStart();
// Show user warning if no good connection
if (!$ftpConn || !$ftpLogin) {
die('alert("Sorry, no FTP connection to '.$ftpHost.' for user '.$ftpUser.'");top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>');
die('top.ICEcoder.message("Sorry, no FTP connection to '.$ftpHost.' for user '.$ftpUser.'");top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>');
exit;
}
// Get our file contents and close the FTP connection

View File

@@ -192,7 +192,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
$loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);
echo '<textarea name="loadedFile'.$i.'" id="loadedFile'.$i.'" style="display: none">'.str_replace("</textarea>","<ICEcoder:/:textarea>",str_replace("&","&amp;",$loadedFile)).'</textarea><br><br>'.PHP_EOL.PHP_EOL;
} else {
die("<script>alert('Sorry, that file doesn\'t appear to exist');</script>");
die("<script>top.ICEcoder.message('Sorry, that file doesn\'t appear to exist');</script>");
}
}
?>

View File

@@ -243,7 +243,7 @@ test = {
setTimeout(function() {
ICEcoder.closeTab(1,false,true);
console.log('TEST COMPLETE!');
alert('Test Complete!\n\nRan '+s+' of '+total+' tests OK.\nSee console for more details.');
top.ICEcoder.message('Test Complete!\n\nRan '+s+' of '+total+' tests OK.\nSee console for more details.');
},200);
} else {
testResult("- FAIL",title);
@@ -276,7 +276,7 @@ function displayResults(successful) {
function testStopped() {
unitTestResults.innerHTML += " - Test stopped";
alert("Test stopped, see console for details.");
top.ICEcoder.message("Test stopped, see console for details.");
}
</script>