diff options
author | Guillaume Mazoyer <respawneral@gmail.com> | 2014-05-29 14:28:48 +0200 |
---|---|---|
committer | Guillaume Mazoyer <respawneral@gmail.com> | 2014-05-29 14:28:48 +0200 |
commit | 1a3e5a5bb861f59cbcdede94a82f0984e97ea002 (patch) | |
tree | 519d53ff3981c161b18d00ef0ca3caf85387f5c1 /includes | |
parent | f8b05a1fed71b89b1cd7524e4f64b317af1ab7a4 (diff) |
Apache 2.4 configuration to avoid to access the config.php file.
First import of the whole source code (quite monolithic for now).
Update configuration example.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/style.css | 63 | ||||
-rw-r--r-- | includes/utils.js | 41 |
2 files changed, 104 insertions, 0 deletions
diff --git a/includes/style.css b/includes/style.css new file mode 100644 index 0000000..caf7a34 --- /dev/null +++ b/includes/style.css @@ -0,0 +1,63 @@ +body { + font-size: 1em; + background-color: #FFFFFF; +} +.header_bar { + color: #000000; + text-align: center; + margin-bottom: 1em; +} +.footer_bar { + color: #000000; + font-size: 1.2em; + text-align: center; + margin-top: 1em; + width: 50%; + margin-left: auto; + margin-right: auto; +} +.logo { + text-align: center; + padding: 1%; +} +.content { + color: #000000; + font-size: 1.1em; + text-align: center; + width: 50%; + display: block; + margin-left: auto; + margin-right: auto; +} +.confirm { + width: 50%; + margin-left: auto; + margin-right: auto; +} +.loading { + margin-top: 1em; + width: 50%; + margin-left: auto; + margin-right: auto; +} +.reset { + width: 25%; + margin-left: auto; + margin-right: auto; +} +pre { + color: #FFFFFF; + background-color: #000000; + text-decoration: none; + width: 70%; + margin-left: auto; + margin-right: auto; +} +a { + color: #000000; + text-decoration: none; +} +a:hover { + color: #000000; + text-decoration: none; +} diff --git a/includes/utils.js b/includes/utils.js new file mode 100644 index 0000000..3bcde51 --- /dev/null +++ b/includes/utils.js @@ -0,0 +1,41 @@ +$(function() { + // hide the optional parameters field + $('.result').hide(); + $('.loading').hide(); + + // show and hide loading bar + $(document).ajaxStart(function() { + $('.loading').show(); + }); + $(document).ajaxStop(function() { + $('.loading').hide(); + }); + + // validate the parameters field + $('#input-params').on('input', function() { + var cmd = $('#query').val(); + }); + + // reset the view to the default one + $('#backhome').click(function() { + $('.content').slideDown(); + $('.result').slideUp(); + }); + + // send an ajax request that will get the info on the router + $('form').on('submit', function(e) { + e.preventDefault(); + + $.ajax({ + type: 'post', + url: 'execute.php', + data: $('form').serialize() + }).done(function(response, state, xhr) { + $('#output').text(response); + $('.content').slideUp(); + $('.result').slideDown(); + }).fail(function(xhr, state, error) { + alert('The following error occured: ' + state, error); + }); + }); +}); |