This commit is contained in:
SeekDaSky 2015-12-03 09:55:05 +01:00
commit bd75baa7bc
11 changed files with 601 additions and 0 deletions

1
.gitignore vendored Normal file → Executable file
View File

@ -1,3 +1,4 @@
/.idea /.idea
/.project /.project
/repositories/config.json /repositories/config.json
*.idea

41
Dashboard.php Executable file
View File

@ -0,0 +1,41 @@
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<title>Tableau de bord</title>
<meta charset='utf-8'/>
<meta name='description' value='Site de test'/>
<meta name='author' value='{xdrm} & SeekDaSky'/>
<link rel='stylesheet' href='css/global.css'/>
</head>
<body>
<!-- WRAPPER DE LA PAGE -->
<div id='WRAPPER'>
<!-- MENU DE LA PAGE -->
<nav id='MENU'>
<div id='ICON'></div>
<a id='dashboard'>Tableau de bord</a>
<a id='consultations'>Nouvelle consultation</a>
<a>Médecins</a>
</nav>
<!-- CONTAINER DE LA PAGE -->
<section id='CONTAINER'>
<!-- FIL D'ARIANE -->
<div id='BREADCRUMB'><a href='Dashboard.php'>Accueil</a> <a href='Test1.php'>Test1</a> <a href='test2.php'>test2</a> </div>
</section>
</div>
</body>
</html>

185
css/global.css Executable file
View File

@ -0,0 +1,185 @@
*{ margin: 0; padding: 0; }
a{
/* remove-a default properties */
text-decoration: none;
color: inherit;
}
body{
/* position */
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
/* background */
background-color: #e8e8e8;
/* foreground */
font-size: 14px;
font-family: 'Open Sans', 'sans serif';
color: #000;
}
/* WRAPPER DE LA PAGE */
#WRAPPER{
/* position */
display: block;
position: absolute;
top: 1em;
left: calc( 50% - 512px - 1em );
width: 1024px;
min-height: 50%;
margin: 2em;
/* border */
border: 1px solid #e2e2e2;
box-shadow: 0 0 5px #e2e2e2;
/* background */
background-color: #fff;
}
/* MENU DE LA PAGE */
#WRAPPER > #MENU{
/* position */
display: block;
position: absolute;
top: 0;
left: 0;
width: 225px;
height: 100%;
/* border */
border-right: 1px solid #e2e2e2;
border-bottom: 1px solid #e2e2e2;
/* background */
background-color: #fafafa;
}
/* LOGO DANS LE MENU */
#WRAPPER > #MENU > #ICON{
/* position */
position: relative;
width: 100%;
height: 100px;
/* background */
background-color: red;
}
/* LES LIENS DU MENU */
#WRAPPER > #MENU > a{
/* position */
display: inline-block;
position: relative;
width: calc( 100% - 3em );
padding-left: 3em;
padding-bottom: 1px;
/* background */
background-color: transparent;
/* foreground */
line-height: 2.5em;
/* extra */
cursor: pointer;
}
/* :hover / .active */
#WRAPPER > #MENU > a:hover,
#WRAPPER > #MENU > a.active{
background-color: #efefef !important;
color: #818181;
}
/* @first/@last */
#WRAPPER > #MENU > a:nth-child(2){ margin-top: 1em; }
#WRAPPER > #MENU > a:last-child{ margin-bottom: 1em; }
/* icones associées aux liens */
#WRAPPER > #MENU > a#consultations{
background: url(../src/consultation.svg) left 1em center no-repeat;
background-size: auto 1.5em;
}
#WRAPPER > #MENU > a#doctor{
background: url(../src/doctor.svg) left 1em center no-repeat;
background-size: auto 1.5em;
}
#WRAPPER > #MENU > a#dashboard{
background: url(../src/dashboard.svg) left 1em center no-repeat;
background-size: auto 1.5em;
}
/*************/
/* CONTAINER */
/*************/
#WRAPPER > #CONTAINER{
/* position */
display: block;
position: absolute;
top: 0;
left: 225px;
width: calc( 100% - 225px );
height: 100%;
}
/* FIL D'ARIANE */
#WRAPPER > #CONTAINER > #BREADCRUMB{
/* position */
display: inline-block;
position: relative;
width: calc( 100% - 2*2em - 2*.6em );
margin: 2em;
padding: .6em;
/* background */
background-color: #eee;
/* foreground */
color: #333;
}
#WRAPPER > #CONTAINER > #BREADCRUMB a:hover{
text-decoration: underline;
}
/* chevrons */
#WRAPPER > #CONTAINER > #BREADCRUMB a:before{
content: '';
/* position */
display: inline-block;
position: relative;
width: 1em;
height: .7em;
background: url(../src/right-arrow.svg) center center no-repeat;
background-size: 40% auto;
}
/* premier: maison au lien de chevron */
#WRAPPER > #CONTAINER > #BREADCRUMB a:first-child:before{
margin-right: 1em;
height: 1em;
background-image: url(../src/home.svg);
background-size: auto 100%;
}

72
login.php Executable file
View File

@ -0,0 +1,72 @@
<!DOCTYPE html>
<?php /* [0] VERIFICATION DE CONNECTION
=============================================*/
$postVariablesAreSet = isset($_POST['username']) && isset($_POST['mail']) && isset($_POST['password']) && isset($_POST['co']); // si les variables POST existent
$postVariablesTypeOk = $postVariablesAreSet && is_string($_POST['username']) && is_string($_POST['mail']) && is_string($_POST['password']) && is_string($_POST['co']); // si ce sont des string
$postVariablesNEmpty = $postVariablesTypeOk && strlen($_POST['username']) > 1 && strlen($_POST['mail']) > 1 && strlen($_POST['password']) > 1 && strlen($_POST['co']) > 1; // si au moins 1 caractère
$usernameCheck = $postVariablesNEmpty && preg_match("/^[\w -]{3,10}$/i", $_POST['username']); // utilisateur -> "alphanum_- " -> 3 à 10 caractères
$mailCheck = $usernameCheck && preg_match("/^[\w\.-]+@[\w\.-]+\.[a-z]{2,4}$/i", $_POST['mail']); // mail -> bon format
$passwordCheck = $mailCheck && preg_match("/^[\w -]{8,50}$/i", $_POST['password']); // password -> "alphanum_- " -> 8 à 50 caractères
$coCheck = $passwordCheck && $_POST['co'] == 'Me connecter';
if( $coCheck ){ // si toutes les valeurs sont correctes
$user = array(); // on définit l'utilisateur
$user['name'] = $_POST['username'];
$user['mail'] = $_POST['mail'];
$user['password'] = $_POST['password'];
$user['hash'] = sha1($_POST['password']);
}
// retourne VRAI si l'utilisateur est connecté
function connected($user){ return ($user != null); }
?>
<html>
<head>
<title>Tests php</title>
<meta charset='utf-8'/>
<meta name='description' value='Site de test'/>
<meta name='author' value='{xdrm} & SeekDaSky'/>
<link rel='stylesheet' href='login.css'/>
</head>
<body>
<?php /* [1] AFFICHAGE DIFFÉRÉ SI CONNECTÉ
==============================================*/
echo "<form action='#auth' method='POST'>";
/* AFFICHAGE D'ERREURS */
if( $postVariablesAreSet ){ // si formulaire soumis
if( !$postVariablesNEmpty )
echo '<span class=error>Certains champs requis sont vides.</span>';
elseif( !$usernameCheck )
echo '<span class=error>Nom d\'utilisateur incorrect. (3 car. min)</span>';
elseif( !$mailCheck )
echo '<span class=error>Adresse mail incorrecte.</span>';
elseif( !$passwordCheck )
echo '<span class=error>Mot de passe incorrect. (8 car. min)</span>';
elseif( connected($user) )
echo '<span class=success>Vous êtes connectés.</span>';
}
echo "<input type='text' name='username' placeholder='username' " .( (connected($user)) ? "value='".$user['name']."'" : '' ).">";
echo "<input type='mail' name='mail' placeholder='mail' " .( (connected($user)) ? "value='".$user['mail']."'" : '' ).">";
echo "<input type='password' name='password' placeholder='password' ".( (connected($user)) ? "value='".$user['password']."'" : '' ).">";
echo "<input type='submit' name='co' value='Me connecter'>";
echo "</form>";
?>
</body>
</html>

0
repositories/exemple_config.json Normal file → Executable file
View File

0
repositories/index.html Normal file → Executable file
View File

84
src/consultation.svg Executable file
View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="500"
height="500"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="Nouveau document 1">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="-28.667829"
inkscape:cy="386.34941"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-page="true"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-114.28125,-307.375)">
<g
id="g3272"
transform="matrix(0.99258024,0,0,0.99258024,0.84793854,0.43583907)">
<path
inkscape:connector-curvature="0"
id="path3212"
d="m 226.78125,582.375 c -35.23822,0 -66.68483,16.20229 -87.3125,41.5625 L 325.3125,749.21875 c 8.90501,-16.1099 13.96875,-34.63376 13.96875,-54.34375 0,-62.13204 -50.36797,-112.5 -112.5,-112.5 z m -98.5,58.15625 c -8.90639,16.11083 -14,34.63212 -14,54.34375 0,62.13203 50.36796,112.5 112.5,112.5 35.23562,0 66.68475,-16.20551 87.3125,-41.5625 L 128.28125,640.53125 z"
style="fill:#f7a93b;fill-opacity:1;stroke:none" />
<g
transform="matrix(0.90377336,0.42801134,-0.42801134,0.90377336,-245.92875,-350.08603)"
id="g3268">
<path
inkscape:connector-curvature="0"
style="fill:#f04b36;fill-opacity:1;stroke:none"
d="m 782.84375,377.28125 c -61.94433,-0.35946 -112.10929,49.24317 -112.46875,111.1875 -0.35946,61.94433 49.21192,112.07804 111.15625,112.4375 l 127.59375,0.75 0,-223.625 -126.28125,-0.75 z"
id="path3266" />
<path
inkscape:connector-curvature="0"
style="fill:#cfd0d1;fill-opacity:1;stroke:none"
d="m 934.375,378.15625 0,223.65625 129.5,0.75 c 61.9444,0.35946 112.1093,-49.21192 112.4688,-111.15625 0.3594,-61.94433 -49.2432,-112.10929 -111.1876,-112.46875 L 934.375,378.15625 z"
id="rect3235" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

146
src/dashboard.svg Executable file
View File

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="127.99999"
height="127.99999"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="dashboard.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="-16.221622"
inkscape:cy="69.562511"
inkscape:document-units="px"
inkscape:current-layer="g3363"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-923.62577,-394.41087)">
<g
id="g3363"
transform="matrix(1.0096696,0,0,1.0096696,-8.9311221,-5.0515213)">
<path
style="fill:#e04f5f;fill-opacity:1;stroke:none"
d="M 64 0 C 28.653772 0 0 28.653795 0 64 C 0 99.346228 28.653772 128 64 128 C 99.346228 128 128 99.346228 128 64 C 128 28.653795 99.346228 0 64 0 z M 64 14.28125 C 91.465893 14.28125 113.71875 36.534125 113.71875 64 C 113.71875 91.465893 91.465893 113.71875 64 113.71875 C 36.534107 113.71875 14.28125 91.465893 14.28125 64 C 14.28125 36.534125 36.534107 14.28125 64 14.28125 z "
transform="matrix(0.99042301,0,0,0.99042301,923.6258,395.63674)"
id="path3273" />
<g
id="g3082"
transform="matrix(1.3608093,0,0,1.3608093,-356.12442,-166.23032)">
<rect
style="fill:#afb5b6;fill-opacity:1;stroke:none"
id="rect3275"
width="2.3359859"
height="9.1545153"
x="985.84497"
y="479.85825" />
<g
id="g3335"
transform="translate(-100,0)">
<path
id="path3333"
d="m 1087,431.03125 c -4.5419,0 -8.8204,1.10262 -12.625,3 l 5.9688,12.28125 c 1.9914,-1.05672 4.2421,-1.6875 6.6562,-1.6875 7.95,0 14.4065,6.4563 14.4062,14.40625 0,0.13763 -0.027,0.26954 -0.031,0.40625 l 14.0625,0 c 0,-15.69071 -12.7468,-28.40625 -28.4375,-28.40625 z"
style="fill:#facb1b;fill-opacity:1;stroke:none"
inkscape:connector-curvature="0" />
<path
id="path3311"
d="m 1073.25,434.625 c -0.1431,0.0795 -0.2959,0.13687 -0.4375,0.21875 -8.4925,4.91058 -14.2187,14.07648 -14.2187,24.59375 l 14.0624,0 c 0,-0.13671 -0.031,-0.26862 -0.031,-0.40625 0,-5.0704 2.6362,-9.49668 6.5938,-12.0625 L 1073.25,434.625 z"
style="fill:#fa5655;fill-opacity:1;stroke:none"
inkscape:connector-curvature="0" />
</g>
<g
id="g3343"
transform="translate(140,0)">
<path
transform="translate(0.49107143,-0.80357143)"
d="m 852.00894,459.72824 c 0,2.78608 -2.25857,5.04464 -5.04465,5.04464 -2.78607,0 -5.04464,-2.25856 -5.04464,-5.04464 0,-2.78608 2.25857,-5.04464 5.04464,-5.04464 2.78608,0 5.04465,2.25856 5.04465,5.04464 z"
sodipodi:ry="5.0446429"
sodipodi:rx="5.0446429"
sodipodi:cy="459.72824"
sodipodi:cx="846.96429"
id="path3339"
style="fill:#3e3e3f;fill-opacity:1;stroke:none"
sodipodi:type="arc" />
<path
inkscape:connector-curvature="0"
id="path3341"
d="m 843.96061,455.29731 15.99475,-13.29227 -7.87787,18.95473 z"
style="fill:#3e3e3f;fill-opacity:1;stroke:none"
sodipodi:nodetypes="cccc" />
</g>
<rect
y="1039.9066"
x="375.2605"
height="9.1545153"
width="2.3359859"
id="rect3347"
style="fill:#afb5b6;fill-opacity:1;stroke:none"
transform="matrix(0.71343865,-0.7007177,0.7007177,0.71343865,0,0)" />
<rect
transform="matrix(0.00899507,-0.99995954,0.99995954,0.00899507,0,0)"
style="fill:#afb5b6;fill-opacity:1;stroke:none"
id="rect3349"
width="2.3359859"
height="9.1545153"
x="-460.62106"
y="1006.1044" />
<rect
transform="matrix(-0.71343865,-0.7007177,-0.7007177,0.71343865,0,0)"
style="fill:#afb5b6;fill-opacity:1;stroke:none"
id="rect3359"
width="2.3359859"
height="9.1545153"
x="-1032.8519"
y="-343.09863" />
<rect
y="-967.51373"
x="-478.37454"
height="9.1545153"
width="2.3359859"
id="rect3361"
style="fill:#afb5b6;fill-opacity:1;stroke:none"
transform="matrix(-0.00899507,-0.99995954,-0.99995954,0.00899507,0,0)" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

1
src/home.svg Executable file
View File

@ -0,0 +1 @@
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 32 32" height="32px" id="Layer_1" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><polygon fill="#D0D3D6" points="16,31 28,31 28,15 16,5.7 "/><polygon fill="#EEEDED" points="16,31 4,31 4,15 16,5.7 "/><rect fill="#B6312E" height="8" width="8" x="12" y="20"/><path d="M16,6.4l13.5,9.9l2.5-3.3L16,1" fill="#B6312E"/><path d="M16,1L0,13.1l2.5,3.3L16,6.4" fill="#DF4937"/></g></svg>

After

Width:  |  Height:  |  Size: 634 B

71
src/right-arrow.svg Executable file
View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="40.608002"
height="70.991997"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="Nouveau document 1">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6"
inkscape:cx="-21.876364"
inkscape:cy="-22.977195"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(79.704273,-522.0936)">
<text
xml:space="preserve"
style="font-size:144px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#666666;fill-opacity:1;stroke:none;font-family:Latin Modern Mono Light Cond;-inkscape-font-specification:Latin Modern Mono Light Cond"
x="-84.600273"
y="601.5816"
id="text3146"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3148"
x="-84.600273"
y="601.5816">&gt;</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB