Merge branch 'master' of https://github.com/matthieupenchenat81/ModuleWeb
SRC/app/Http/Controllers/GameController.php
This commit is contained in:
commit
554ff59064
@ -3,7 +3,14 @@ import xml.etree.ElementTree as ET
|
|||||||
import MySQLdb as mdb
|
import MySQLdb as mdb
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
import os
|
import httplib
|
||||||
|
|
||||||
|
def exists(site, path):
|
||||||
|
c = httplib.HTTPConnection(site)
|
||||||
|
c.request('HEAD', path)
|
||||||
|
response = c.getresponse()
|
||||||
|
c.close()
|
||||||
|
return response.status == 200
|
||||||
|
|
||||||
def insert (cur, table, dict) :
|
def insert (cur, table, dict) :
|
||||||
keys = ""
|
keys = ""
|
||||||
@ -101,8 +108,7 @@ try :
|
|||||||
image = child.text.encode('utf-8')
|
image = child.text.encode('utf-8')
|
||||||
|
|
||||||
# On s'interesee qu'aux oeuvres ayant une image
|
# On s'interesee qu'aux oeuvres ayant une image
|
||||||
response = os.system("ping -c 1 " + "http://www.augustins.org/documents/10180/156407/"+image)
|
if image != "NULL" and exists('www.augustins.org','/documents/10180/156407/'+image):
|
||||||
if image != "NULL" and response == 0 :
|
|
||||||
if str(datation)+str(datation2) in listeDatation :
|
if str(datation)+str(datation2) in listeDatation :
|
||||||
iddatation = listeDatation[str(datation)+str(datation2)]
|
iddatation = listeDatation[str(datation)+str(datation2)]
|
||||||
else :
|
else :
|
||||||
|
@ -39,7 +39,6 @@ class AdminController extends Controller {
|
|||||||
public function addUser()
|
public function addUser()
|
||||||
{
|
{
|
||||||
$user = new Referent;
|
$user = new Referent;
|
||||||
|
|
||||||
$user->nom = Input::get('nom');
|
$user->nom = Input::get('nom');
|
||||||
$user->email = Input::get('email');
|
$user->email = Input::get('email');
|
||||||
$user->etablissement = Input::get('etablissement');
|
$user->etablissement = Input::get('etablissement');
|
||||||
|
@ -18,7 +18,9 @@
|
|||||||
}
|
}
|
||||||
function preload () {
|
function preload () {
|
||||||
game.load.spritesheet('balls', '{{ URL::to('imgs/puzzle/balls.png') }}', 17, 17);
|
game.load.spritesheet('balls', '{{ URL::to('imgs/puzzle/balls.png') }}', 17, 17);
|
||||||
game.load.image('trophee', '{{ URL::to('imgs/trophees/or.png') }}');
|
game.load.image('trophee3', '{{ URL::to('imgs/trophees/or.png') }}');
|
||||||
|
game.load.image('trophee2', '{{ URL::to('imgs/trophees/argent.png') }}');
|
||||||
|
game.load.image('trophee1', '{{ URL::to('imgs/trophees/bronze.png') }}');
|
||||||
|
|
||||||
for(i=1; i<=selection.length; i++) {
|
for(i=1; i<=selection.length; i++) {
|
||||||
game.load.spritesheet("tableau"+i, selection[i-1].src, selection[i-1].width/dimensions[0], selection[i-1].height/dimensions[1]);
|
game.load.spritesheet("tableau"+i, selection[i-1].src, selection[i-1].width/dimensions[0], selection[i-1].height/dimensions[1]);
|
||||||
@ -213,7 +215,7 @@
|
|||||||
var ratioImage = 0.8;
|
var ratioImage = 0.8;
|
||||||
var dimensions = [{{$dimension}}, {{$dimension}}];
|
var dimensions = [{{$dimension}}, {{$dimension}}];
|
||||||
var nbToPlay = {{$nbTab}};
|
var nbToPlay = {{$nbTab}};
|
||||||
|
var trophy = {{ $niveau }};
|
||||||
var images = [];
|
var images = [];
|
||||||
@foreach ($oeuvres as $i => $oeuvre)
|
@foreach ($oeuvres as $i => $oeuvre)
|
||||||
images.push("http://www.augustins.org/documents/10180/156407/{{ $oeuvre -> image}}");
|
images.push("http://www.augustins.org/documents/10180/156407/{{ $oeuvre -> image}}");
|
||||||
|
Reference in New Issue
Block a user