diff --git a/.htaccess b/.htaccess deleted file mode 100644 index 5a316e7..0000000 --- a/.htaccess +++ /dev/null @@ -1,12 +0,0 @@ -Redirect /~accueil_insa/new/ /~accueil_insa/ - -# Turn mod_rewrite on -RewriteEngine On - -# To externally redirect /dir/foo.php to /dir/foo -RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC] -RewriteRule ^ %1 [R,L,NC] - -## To internally redirect /dir/foo to /dir/foo.php -RewriteCond %{REQUEST_FILENAME}.php -f [NC] -RewriteRule ^ %{REQUEST_URI}.php [L] diff --git a/.idea/deployment.xml b/.idea/deployment.xml index 94c5ee6..da561bb 100644 --- a/.idea/deployment.xml +++ b/.idea/deployment.xml @@ -1,14 +1,4 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> - <component name="PublishConfigData" serverName="Site Accueil INSA"> - <serverData> - <paths name="Site Accueil INSA"> - <serverdata> - <mappings> - <mapping local="$PROJECT_DIR$" web="/site-accueil-insa" /> - </mappings> - </serverdata> - </paths> - </serverData> - </component> + <component name="PublishConfigData" serverName="Accueil INSA" /> </project> \ No newline at end of file diff --git a/.idea/webServers.xml b/.idea/webServers.xml new file mode 100644 index 0000000..5f35ad9 --- /dev/null +++ b/.idea/webServers.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="WebServers"> + <option name="servers"> + <webServer id="3342f72e-8416-4ed6-bd95-5cea25d59ef8" name="Accueil INSA" url="http://localhost/site-accueil-insa"> + <fileTransfer port="0" mountedRoot="$PROJECT_DIR$" accessType="MOUNT" /> + </webServer> + </option> + </component> +</project> \ No newline at end of file diff --git a/admin/.htaccess b/admin/.htaccess deleted file mode 100644 index 226f938..0000000 --- a/admin/.htaccess +++ /dev/null @@ -1,6 +0,0 @@ -AuthName "MDP ?" -AuthType Basic -#AuthUserFile /home/keplyx/Web/site-accueil-insa/includes/.htpassajax -AuthUserFile C:\wamp64\www\site-accueil-insa\includes\.htpassajax -#AuthUserFile /home_clubs/accueil_insa/public_html/includes/.htpassajax #production only -require valid-user diff --git a/ajax/write/.htaccess b/ajax/write/.htaccess deleted file mode 100644 index b0b8831..0000000 --- a/ajax/write/.htaccess +++ /dev/null @@ -1,7 +0,0 @@ -AuthName "MDP ?" -AuthType Basic -AuthUserFile C:\wamp64\www\site-accueil-insa\includes\.htpassajax - -#AuthUserFile /home/keplyx/Web/site-accueil-insa/includes/.htpassajax -#AuthUserFile /home_clubs/accueil_insa/public_html/includes/.htpassajax #production only -require valid-user diff --git a/ajax/write/index.php b/ajax/write/index.php deleted file mode 100644 index c24ad52..0000000 --- a/ajax/write/index.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php -require_once '../../classes/dao.php'; - - -if (isset($_GET['function'])) { - if ($_GET['function'] == "save_scores") - save_scores(); - elseif ($_GET['function'] == "save_map_info") - save_map_info(); - elseif ($_GET['function'] == "save_day_activities") - save_day_activities(); -} else - show_error(); - - -function save_scores() { - if (isset($_GET['lines']) && isset($_GET['team'])) { - $dao = new Dao('../'); - $dao->save_scores($_GET['lines'], $_GET['team']); - echo "Réussite"; - } else - show_error(); -} - -function save_map_info() { - if (isset($_GET['selector']) && isset($_GET['info'])) { - $dao = new Dao('../'); - $dao->save_map_info($_GET['selector'], $_GET['info']); - echo "Réussite"; - } else { - show_error(); - } -} - -function save_day_activities() { - if (isset($_GET['day']) && isset($_GET['entries'])) { - $dao = new Dao('../'); - $dao->save_day_activities($_GET['day'], $_GET['entries']); - echo "Réussite"; - } else { - show_error(); - } -} - - - -function show_error() { - echo "Échec : "; - var_dump($_GET); -} \ No newline at end of file diff --git a/ajax/write/master.php b/ajax/write/master.php new file mode 100644 index 0000000..3f38b97 --- /dev/null +++ b/ajax/write/master.php @@ -0,0 +1,24 @@ +<?php +require_once '../../classes/dao.php'; + + +if (isset($_GET['function'])) { + if ($_GET['function'] == "save_day_activities") + save_day_activities(); +} else + show_error(); + +function save_day_activities() { + if (isset($_GET['day']) && isset($_GET['entries'])) { + $dao = new Dao('../'); + $dao->save_day_activities($_GET['day'], $_GET['entries']); + echo "Réussite"; + } else { + show_error(); + } +} + +function show_error() { + echo "Échec : "; + var_dump($_GET); +} diff --git a/ajax/write/planning.php b/ajax/write/planning.php new file mode 100644 index 0000000..b8c3288 --- /dev/null +++ b/ajax/write/planning.php @@ -0,0 +1,24 @@ +<?php +require_once '../../classes/dao.php'; + + +if (isset($_GET['function'])) { + if ($_GET['function'] == "save_map_info") + save_map_info(); +} else + show_error(); + +function save_map_info() { + if (isset($_GET['selector']) && isset($_GET['info'])) { + $dao = new Dao('../'); + $dao->save_map_info($_GET['selector'], $_GET['info']); + echo "Réussite"; + } else { + show_error(); + } +} + +function show_error() { + echo "Échec : "; + var_dump($_GET); +} diff --git a/ajax/write/scores.php b/ajax/write/scores.php new file mode 100644 index 0000000..ba4fb76 --- /dev/null +++ b/ajax/write/scores.php @@ -0,0 +1,25 @@ +<?php +require_once '../../classes/dao.php'; + + +if (isset($_GET['function'])) { + if ($_GET['function'] == "save_scores") + save_scores(); +} else + show_error(); + +function save_scores() +{ + if (isset($_GET['lines']) && isset($_GET['team'])) { + $dao = new Dao('../'); + $dao->save_scores($_GET['lines'], $_GET['team']); + echo "Réussite"; + } else + show_error(); +} + + +function show_error() { + echo "Échec : "; + var_dump($_GET); +} diff --git a/assets/.htaccess b/assets/.htaccess deleted file mode 100755 index 5a928f6..0000000 --- a/assets/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Options -Indexes diff --git a/assets/images/teams/boomsouffle.jpg b/assets/images/teams/boomsouffle.jpg new file mode 100644 index 0000000..7c7c60f Binary files /dev/null and b/assets/images/teams/boomsouffle.jpg differ diff --git a/assets/js/mapManager.js b/assets/js/mapManager.js index 1573fcd..b2bafbf 100644 --- a/assets/js/mapManager.js +++ b/assets/js/mapManager.js @@ -11,7 +11,7 @@ $(document).ready(function () { 'info': info, }; $.get( - "../ajax/write", + "../ajax/write/master.php", object, function (data) { alert(data); @@ -41,4 +41,4 @@ function getMapInfo(selector) { $('#descriptionInput').val(data[0]['description']); } ); -} \ No newline at end of file +} diff --git a/assets/js/planningManager.js b/assets/js/planningManager.js index 60b837d..7e7538b 100644 --- a/assets/js/planningManager.js +++ b/assets/js/planningManager.js @@ -141,7 +141,7 @@ function saveDayActivities() { "entries": currentActivities, }; $.get( - "../ajax/write", + "../ajax/write/planning.php", object, function (data) { alert(data); @@ -164,4 +164,4 @@ function getDayActivities(day) { } } ); -} \ No newline at end of file +} diff --git a/assets/js/statsManager.js b/assets/js/statsManager.js index 39b52cd..f9d086b 100755 --- a/assets/js/statsManager.js +++ b/assets/js/statsManager.js @@ -23,7 +23,7 @@ $(document).ready(function () { "lines": lines, }; $.get( - "../ajax/write", + "../ajax/write/scores.php", object, function (data) { alert(data); @@ -92,4 +92,4 @@ function getScores(team) { } } ); -} \ No newline at end of file +} diff --git a/includes/.htaccess b/includes/.htaccess deleted file mode 100755 index 5a928f6..0000000 --- a/includes/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Options -Indexes diff --git a/includes/.htpassajax b/includes/.htpassajax deleted file mode 100755 index c69aab6..0000000 --- a/includes/.htpassajax +++ /dev/null @@ -1,2 +0,0 @@ -admin:$apr1$kQeLzJ44$jOg93m9Vbz6FRkj.ViuIf. - diff --git a/includes/pass/.htpass_master b/includes/pass/.htpass_master new file mode 100755 index 0000000..1c3f241 --- /dev/null +++ b/includes/pass/.htpass_master @@ -0,0 +1 @@ +master:$apr1$infHioAH$.fpTd.P9M23jG3dMLM4ha. diff --git a/includes/pass/.htpass_planning b/includes/pass/.htpass_planning new file mode 100755 index 0000000..846578d --- /dev/null +++ b/includes/pass/.htpass_planning @@ -0,0 +1,2 @@ +master:$apr1$infHioAH$.fpTd.P9M23jG3dMLM4ha. +admin:$apr1$kQeLzJ44$jOg93m9Vbz6FRkj.ViuIf. diff --git a/includes/pass/.htpass_scores b/includes/pass/.htpass_scores new file mode 100755 index 0000000..a9415be --- /dev/null +++ b/includes/pass/.htpass_scores @@ -0,0 +1,3 @@ +master:$apr1$infHioAH$.fpTd.P9M23jG3dMLM4ha. +admin:$apr1$kQeLzJ44$jOg93m9Vbz6FRkj.ViuIf. +prof:$apr1$le.qklCM$DXph5TAfGT4fjbyejzv1J0 \ No newline at end of file