Moved htaccess configuration in apache main config

This commit is contained in:
keplyx 2019-07-25 09:04:48 +02:00
parent 2ee1c8fe5d
commit c0515a88bd
19 changed files with 96 additions and 96 deletions

View file

@ -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]

View file

@ -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>

10
.idea/webServers.xml Normal file
View file

@ -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>

View file

@ -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

View file

@ -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

View file

@ -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);
}

24
ajax/write/master.php Normal file
View file

@ -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);
}

24
ajax/write/planning.php Normal file
View file

@ -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);
}

25
ajax/write/scores.php Normal file
View file

@ -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);
}

View file

@ -1 +0,0 @@
Options -Indexes

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View file

@ -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']);
}
);
}
}

View file

@ -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) {
}
}
);
}
}

View file

@ -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) {
}
}
);
}
}

View file

@ -1 +0,0 @@
Options -Indexes

View file

@ -1,2 +0,0 @@
admin:$apr1$kQeLzJ44$jOg93m9Vbz6FRkj.ViuIf.

1
includes/pass/.htpass_master Executable file
View file

@ -0,0 +1 @@
master:$apr1$infHioAH$.fpTd.P9M23jG3dMLM4ha.

2
includes/pass/.htpass_planning Executable file
View file

@ -0,0 +1,2 @@
master:$apr1$infHioAH$.fpTd.P9M23jG3dMLM4ha.
admin:$apr1$kQeLzJ44$jOg93m9Vbz6FRkj.ViuIf.

3
includes/pass/.htpass_scores Executable file
View file

@ -0,0 +1,3 @@
master:$apr1$infHioAH$.fpTd.P9M23jG3dMLM4ha.
admin:$apr1$kQeLzJ44$jOg93m9Vbz6FRkj.ViuIf.
prof:$apr1$le.qklCM$DXph5TAfGT4fjbyejzv1J0