mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Replacing alerts with ICEcoder.message
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("&","&",$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>");
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user