parent
516332ef0e
commit
b1798554aa
@ -1,11 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="hyperset" uuid="f3ad65b0-7e35-4de2-b55e-7ccc655bac2b">
|
||||
<data-source source="LOCAL" name="hyperset" uuid="05bae439-a683-4973-8912-f08c670f10f1">
|
||||
<driver-ref>sqlite.xerial</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||
<jdbc-url>jdbc:sqlite:C:\wamp64\www\HyperSet\bdd\hyperset.db</jdbc-url>
|
||||
<jdbc-url>jdbc:sqlite:C:\wamp64\www\HyperSet\DAL\hyperset.db</jdbc-url>
|
||||
</data-source>
|
||||
<data-source source="LOCAL" name="hyperset [2]" uuid="3da3503c-0e28-452e-9d9c-0e54d386381b">
|
||||
<driver-ref>sqlite.xerial</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||
<jdbc-url>jdbc:sqlite:C:\wamp64\www\HyperSet\hyperset.db</jdbc-url>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
|
||||
class SQLiteTests
|
||||
class ScoreGateway
|
||||
{
|
||||
|
||||
private $pdo;
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 176 KiB |
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
session_start();
|
||||
|
||||
|
||||
require_once(__DIR__ . '/config/config.php');
|
||||
|
||||
require_once(__DIR__ . '/config/Autoload.php');
|
||||
|
||||
|
||||
Autoload::charger();
|
||||
|
||||
|
||||
new Controlleur();
|
||||
|
||||
|
||||
|
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ModelScore
|
||||
{
|
||||
private $gwScore;
|
||||
|
||||
public function __construct(){
|
||||
$pdo = (new SQLiteConnection())->connect();
|
||||
$this->gwScore= new ScoreGateway($pdo);
|
||||
|
||||
}
|
||||
|
||||
public function getHScore(){
|
||||
return $this->gwScore->getScore();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
<?php
|
@ -1,100 +0,0 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.submit {
|
||||
margin-top: 2em;
|
||||
font-size: 16px;
|
||||
padding: 1em 3em;
|
||||
background: #BADA55;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.submit:disabled {
|
||||
background: #C5DA83;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 1080px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.card {
|
||||
display: inline-block;
|
||||
width: 245px;
|
||||
margin-right: 5px;
|
||||
height: 200px;
|
||||
border: 2px solid #ccc;
|
||||
}
|
||||
.card:hover {
|
||||
border-color: #e2e2e2;
|
||||
}
|
||||
|
||||
.selected {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.game-board {
|
||||
width: 1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.shape {
|
||||
display: inline-block;
|
||||
width: 70px;
|
||||
height: 200px;
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-position: 15px;
|
||||
}
|
||||
|
||||
.diamond {
|
||||
clip-path: polygon(50% 15%, 100% 50%, 50% 85%, 0% 50%);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.wave {
|
||||
/*clip-path: polygon(5% 34%, 5% 20%, 79% 21%, 66% 61%, 98% 60%, 97% 73%, 19% 74%, 37% 34%);*/
|
||||
-moz-transform: skew(-30deg, 0deg);
|
||||
-webkit-transform: skew(-30deg, 0deg);
|
||||
-o-transform: skew(-30deg, 0deg);
|
||||
-ms-transform: skew(-30deg, 0deg);
|
||||
transform: skew(-30deg, 0deg);
|
||||
}
|
||||
|
||||
|
||||
.oval {
|
||||
clip-path: ellipse(40% 30% at 50% 50%);}
|
||||
|
||||
.green {
|
||||
background: green;
|
||||
}
|
||||
|
||||
|
||||
.yellow {
|
||||
background: yellow;
|
||||
}
|
||||
.gray {
|
||||
background: gray;
|
||||
}
|
||||
.blue {
|
||||
background: blue;
|
||||
}
|
||||
.red {
|
||||
background: red;
|
||||
}
|
||||
.purple {
|
||||
background: violet;
|
||||
}
|
||||
|
||||
/*solution pour avoir l'image en rainure ou vide a voir dans le css*/
|
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
|
||||
if(isset($listP)) {
|
||||
foreach ($listP as $sco) {
|
||||
echo $sco['score'] . ' ' . $sco['pseudo'] . '<br/>';
|
||||
}
|
||||
}
|
@ -0,0 +1,162 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.submit {
|
||||
margin-top: 2em;
|
||||
font-size: 16px;
|
||||
padding: 1em 3em;
|
||||
background: #BADA55;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.submit:disabled {
|
||||
background: #C5DA83;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 1080px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.card {
|
||||
display: inline-block;
|
||||
width: 245px;
|
||||
margin-right: 5px;
|
||||
height: 200px;
|
||||
border: 2px solid #ccc;
|
||||
}
|
||||
.card:hover {
|
||||
border-color: #e2e2e2;
|
||||
}
|
||||
|
||||
.selected {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.game-board {
|
||||
width: 1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.shape {
|
||||
display: inline-block;
|
||||
width: 70px;
|
||||
height: 200px;
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-position: 15px;
|
||||
}
|
||||
|
||||
.diamond {
|
||||
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
|
||||
height: 75%;
|
||||
width: 25%;
|
||||
margin-top: 10%;
|
||||
}
|
||||
|
||||
|
||||
.wave {
|
||||
/*clip-path: polygon(5% 34%, 5% 20%, 79% 21%, 66% 61%, 98% 60%, 97% 73%, 19% 74%, 37% 34%);/
|
||||
/*-moz-transform: scale(0.8) rotate(10deg) translate(15px, -1px) skew(-10deg, 8deg);
|
||||
-webkit-transform: scale(0.8) rotate(10deg) translate(15px, -1px) skew(-10deg, 8deg);
|
||||
-o-transform: scale(0.8) rotate(10deg) translate(15px, -1px) skew(-10deg, 8deg);
|
||||
-ms-transform: scale(0.8) rotate(10deg) translate(15px, -1px) skew(-10deg, 8deg);
|
||||
transform: scale(0.8) rotate(10deg) translate(15px, -1px) skew(-10deg, 8deg);*/
|
||||
|
||||
-webkit-border-radius: 20px 100px 20px 100px;
|
||||
-moz-border-radius: 20px 100px 20px 100px;
|
||||
border-radius: 20px 100px 20px 100px;
|
||||
|
||||
height: 75%;
|
||||
width: 25%;
|
||||
margin-top: 10%;
|
||||
border: 2px solid white;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.oval {
|
||||
border-radius: 40px / 50px;
|
||||
height: 75%;
|
||||
width: 25%;
|
||||
margin-top: 10%;
|
||||
border: 2px solid white;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.yellow {
|
||||
background: yellow;
|
||||
}
|
||||
.gray {
|
||||
background: gray;
|
||||
}
|
||||
.blue {
|
||||
background: blue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.green.filled {
|
||||
background: green;
|
||||
}
|
||||
|
||||
.red.filled {
|
||||
|
||||
background: red;
|
||||
}
|
||||
.purple.filled {
|
||||
background: purple;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.red.empty{
|
||||
border: 22px solid red;
|
||||
}
|
||||
|
||||
.green.empty {
|
||||
border: 22px solid green;
|
||||
}
|
||||
|
||||
.purple.empty {
|
||||
border: 22px solid purple;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.red.shaded{
|
||||
background: repeating-linear-gradient(-45deg, red, red 5px, white 5px, white 10px);
|
||||
border: 4px solid red;
|
||||
|
||||
}
|
||||
|
||||
.green.shaded {
|
||||
background: repeating-linear-gradient(-45deg, green, green 5px, white 5px, white 10px);
|
||||
border: 4px solid green;
|
||||
|
||||
}
|
||||
|
||||
.purple.shaded {
|
||||
background: repeating-linear-gradient(-45deg, purple, purple 5px, white 5px, white 10px);
|
||||
border: 4px solid purple;
|
||||
}
|
||||
|
||||
|
||||
/*solution pour avoir l'image en rainure ou vide a voir dans le css*/
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="dataSourceStorageLocal">
|
||||
<data-source name="hyperSet" uuid="a9b79ca2-26f4-4301-a76a-091a16a57814">
|
||||
<database-info product="" version="" jdbc-version="" driver-name="" driver-version="" dbms="SQLITE" exact-version="0" />
|
||||
<auth-required>false</auth-required>
|
||||
<schema-mapping />
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="hyperSet" uuid="a9b79ca2-26f4-4301-a76a-091a16a57814">
|
||||
<driver-ref>sqlite.xerial</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||
<jdbc-url>jdbc:sqlite:C:\wamp64\www\testBD\hyperSet.db</jdbc-url>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
</project>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/testBD.iml" filepath="$PROJECT_DIR$/.idea/testBD.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="f23385f8-3d2a-4244-bb56-9fc3d8136570" name="Default Changelist" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ComposerSettings">
|
||||
<execution>
|
||||
<executable />
|
||||
</execution>
|
||||
</component>
|
||||
<component name="DatabaseView">
|
||||
<option name="SHOW_INTERMEDIATE" value="true" />
|
||||
<option name="GROUP_DATA_SOURCES" value="true" />
|
||||
<option name="GROUP_SCHEMA" value="true" />
|
||||
<option name="GROUP_CONTENTS" value="false" />
|
||||
<option name="SORT_POSITIONED" value="false" />
|
||||
<option name="SHOW_EMPTY_GROUPS" value="false" />
|
||||
<option name="AUTO_SCROLL_FROM_SOURCE" value="false" />
|
||||
<option name="HIDDEN_KINDS">
|
||||
<set />
|
||||
</option>
|
||||
<expand />
|
||||
<select />
|
||||
</component>
|
||||
<component name="ProjectId" id="1cr50mYLWdYsPmwrLheJ14ipkF6" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showExcludedFiles" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="C:\wamp64\www\testBD" />
|
||||
</key>
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="C:\wamp64\www\testBD" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="f23385f8-3d2a-4244-bb56-9fc3d8136570" name="Default Changelist" comment="" />
|
||||
<created>1591273650865</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1591273650865</updated>
|
||||
<workItem from="1591273652302" duration="4293000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="1" />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state x="1233" y="239" key="#com.intellij.ide.util.MemberChooser" timestamp="1591274909264">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state x="1233" y="239" key="#com.intellij.ide.util.MemberChooser/0.0.1920.1040@0.0.1920.1040" timestamp="1591274909264" />
|
||||
<state x="1170" y="270" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1591276296127">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state x="1170" y="270" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1591276296127" />
|
||||
<state x="1268" y="338" key="NewPhpClassDialog" timestamp="1591274812208">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state x="1268" y="338" key="NewPhpClassDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1591274812208" />
|
||||
</component>
|
||||
</project>
|
@ -1,6 +0,0 @@
|
||||
PRAGMA foreign_keys=OFF;
|
||||
BEGIN TRANSACTION;
|
||||
CREATE TABLE HighScore ( id int PRIMARY KEY, pseudo varchar2(50) NOT NULL, score int NOT NULL);
|
||||
INSERT INTO HighScore VALUES(2,'Jack',80);
|
||||
INSERT INTO HighScore VALUES(1,'redko',100);
|
||||
COMMIT;
|
Binary file not shown.
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
require('SQLiteConnection.php');
|
||||
|
||||
require('SQLiteTests.php');
|
||||
|
||||
$pdo = (new SQLiteConnection())->connect();
|
||||
if ($pdo != null)
|
||||
echo "Connected to the SQLite database successfully! <br/>";
|
||||
else
|
||||
echo 'Whoops, could not connect to the SQLite database!';
|
||||
|
||||
$test = new SQLiteTests($pdo);
|
||||
|
||||
$scores = $test->getScore();
|
||||
|
||||
foreach ($scores as $sco){
|
||||
echo $sco['score'] .' '.$sco['pseudo'].'<br/>';
|
||||
}
|
||||
|
||||
?>
|
||||
<form name="test" method="get">
|
||||
Entrez votre pseudo : <input type="text" name="pseudo"/> <br/>
|
||||
Entrez votre score : <input type="number" name="score"/><br/>
|
||||
<input type="submit" name="valider" value="OK"/>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
if(isset($_GET['pseudo']) && !empty($_GET['pseudo']) && isset($_GET['score']) && !empty($_GET['score'])){
|
||||
$test->insert($_GET['pseudo'],$_GET['score']);
|
||||
}
|
Loading…
Reference in new issue