Initial commit

This commit is contained in:
2020-01-27 08:56:08 +01:00
commit b7525048d6
27129 changed files with 3409855 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="game-end.html" server="51.254.220.106//web/" local="131351945400000000" remote="131351945400000000" />
<file name="game-fail.html" server="51.254.220.106//web/" local="131351945400000000" remote="131351945400000000" />
<file name="game-max-participate.html" server="51.254.220.106//web/" local="131351945400000000" remote="131351945400000000" />
<file name="game-success.html" server="51.254.220.106//web/" local="131351945400000000" remote="131351945400000000" />
<file name="game.html" server="51.254.220.106//web/" local="131351945400000000" remote="131351945400000000" />
</dwsync>

View File

@@ -0,0 +1,79 @@
{extends file="layout.tpl"}
{* Body Class *}
{block name="body-class"}page-game{/block}
{* Page Title *}
{block name='no-return-functions' append}
{loop name="game.seo.title" type="game" id=$game_id limit="1"}
{$page_title = {$TITLE}}
{/loop}
{/block}
{* Breadcrumb *}
{block name='no-return-functions' append}
{$breadcrumbs = []}
{loop type="game" name="game_breadcrumb" id=$game_id limit="1"}
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> "#"]}
{/loop}
{/block}
{* Content *}
{block name="main-content"}
{if $game_id}
<div class="main">
{loop name="game.details" type="game" id=$game_id limit=1}
<article id="game" class="col-main" role="main">
<h1 id="main-label" class="page-header">{$TITLE}</h1>
<h2>{intl l="Thanks for your participation" d='contest.fo.default'}</h2>
<p>{intl l="See you" d='contest.fo.default'}</p>
{if $FRIEND_OPTION}
<div>
<h2>{intl l="You can invite some(s) friend to add chance to win" d='contest.fo.default'}</h2>
{for $var=1 to $FRIEND_MAX_OPTION}
<div>
<input type="email" class="friend">
</div>
{/for}
<button class="btn btn-primary" id="submit-friend">{intl l="Envoyer"}</button>
</div>
{/if}
<div class="btn-group text-center">
<a class="btn btn-primary" href="{url path="/"}">{intl l="Go home"}</a>
</div>
</article>
{/loop}
</div>
{/if}
{/block}
{block name="javascript-initialization"}
{if $FRIEND_OPTION}
<script>
(function ($) {
$("#submit-friend").on("click",function(){
var friends = [];
$(".friend").each(function(){
friends.push($(this).val());
});
$.ajax({
method: "POST",
url: "{url path="contest/game/invite/{$game_id}/{$part_id}"}",
data:{
"friends": friends
}
}).always(function () {
$("#loading-event").remove();
});
});
})(jQuery);
</script>
{/if}
{/block}

View File

@@ -0,0 +1,45 @@
{extends file="layout.tpl"}
{* Body Class *}
{block name="body-class"}page-game{/block}
{* Page Title *}
{block name='no-return-functions' append}
{loop name="game.seo.title" type="game" id=$game_id limit="1"}
{$page_title = {$TITLE}}
{/loop}
{/block}
{* Breadcrumb *}
{block name='no-return-functions' append}
{$breadcrumbs = []}
{loop type="game" name="game_breadcrumb" id=$game_id limit="1"}
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> "#"]}
{/loop}
{/block}
{* Content *}
{block name="main-content"}
{if $game_id}
<div class="main">
{loop name="game.details" type="game" id=$game_id limit=1}
<article id="game" class="col-main" role="main">
<h1 id="main-label" class="page-header">{$TITLE}</h1>
<h2>{intl l="Fail" d='contest.fo.default'}</h2>
<p>{intl l="You have too mutch error try another time." d='contest.fo.default'}</p>
<p>{intl l="See you" d='contest.fo.default'}</p>
<div class="btn-group text-center">
<a class="btn btn-default"
href="{url path="/contest/game/{$game_id}"}">{intl l="Go Back" d='contest.fo.default'}</a>
<a class="btn btn-primary" href="{url path="/"}">{intl l="Go home"}</a>
</div>
</article>
{/loop}
</div>
{/if}
{/block}

View File

@@ -0,0 +1,29 @@
{extends file="layout.tpl"}
{* Body Class *}
{block name="body-class"}page-game{/block}
{* Page Title *}
{block name='no-return-functions' append}
{loop name="game.seo.title" type="game" id=$game_id limit="1"}
{$page_title = {$TITLE}}
{/loop}
{/block}
{* Breadcrumb *}
{block name='no-return-functions' append}
{$breadcrumbs = []}
{loop type="game" name="game_breadcrumb" id=$game_id limit="1"}
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> "#"]}
{/loop}
{/block}
{* Content *}
{block name="main-content"}
{if $game_id}
<div class="main">
{include file="include/game-max-participate-content.html"}
</div>
{/if}
{/block}

View File

@@ -0,0 +1,38 @@
{extends file="layout.tpl"}
{* Body Class *}
{block name="body-class"}page-game{/block}
{* Page Title *}
{block name='no-return-functions' append}
{loop name="game.seo.title" type="game" id=$game_id limit="1"}
{$page_title = {$TITLE}}
{/loop}
{/block}
{* Breadcrumb *}
{block name='no-return-functions' append}
{$breadcrumbs = []}
{loop type="game" name="game_breadcrumb" id=$game_id limit="1"}
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> "#"]}
{/loop}
{/block}
{* Content *}
{block name="main-content"}
{if $game_id}
<div class="main">
{loop name="game.details" type="game" id=$game_id limit=1}
<article id="game" class="col-main" role="main">
<h1 id="main-label" class="page-header">{$TITLE}</h1>
<h2>{intl l="Success" d='contest.fo.default'}</h2>
<p>{intl l="You correctly anwser of questions" d='contest.fo.default'}</p>
<p>{intl l="You receivle shortlyy a message if you win !" d='contest.fo.default'}</p>
<p>{intl l="See you" d='contest.fo.default'}</p>
<a class="btn btn-primary center-block" href="{url path="/"}">{intl l="Go home"}</a>
</article>
{/loop}
</div>
{/if}
{/block}

View File

@@ -0,0 +1,132 @@
{extends file="layout.tpl"}
{* Body Class *}
{block name="body-class"}page-game{/block}
{* Page Title *}
{block name='no-return-functions' append}
{loop name="game.seo.title" type="game" id=$game_id limit="1"}
{$page_title = {$TITLE}}
{/loop}
{/block}
{* Breadcrumb *}
{block name='no-return-functions' append}
{$breadcrumbs = []}
{loop type="game" name="game_breadcrumb" id=$game_id limit="1"}
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> "#"]}
{/loop}
{/block}
{block name="meta"}
{loop name="game.meta" type="game" id=$game_id limit=1}
{if !$VISIBLE}
<meta name="robots" content="noindex">
<meta name="googlebot" content="noindex">
{/if}
{/loop}
{/block}
{* Content *}
{block name="main-content"}
{if $game_id}
<div class="main">
{loop name="game.details" type="game" id=$game_id limit=1}
<article id="game" class="col-main" role="main">
<h1 id="main-label" class="page-header">{$TITLE}</h1>
{if $DESCRIPTION}
<div class="description">
{$DESCRIPTION nofilter}
</div>
{/if}
<ul class="list-unstyled">
{loop type="question" name="game.question" game_id=$ID visible=true}
<li>
<article id="question-{$ID}" class="question" data-id="{$ID}">
<h2>{$TITLE}</h2>
{if $DESCRIPTION}
<div class="little-description">
{$DESCRIPTION nofilter}
</div>
{/if}
<ul class="list-inline">
{loop type="answer" name="question.answer" question_id=$ID visible=true}
<li>
<div class="form-group">
<label>{$TITLE}</label>
<input type="radio" class="radio" name="question-{$QUESTION_ID}"
value="{$ID}" require/>
</div>
</li>
{/loop}
</ul>
</article>
</li>
{/loop}
</ul>
{loop type="auth" name="customer_test" role="CUSTOMER"}
<input id="customer_id" type="text" class="hidden" value="{customer attr="id"}" />
{/loop}
{elseloop rel="customer_test"}
<input id="email" type="email" placeholder="email" class="form-control" require/>
{/elseloop}
<div class="btn-group text-center">
<button id="validate-game" class="btn btn-primary">{intl l="Validate"}</button>
</div>
</article>
{/loop}
</div>
{/if}
{/block}
{block name="javascript-initialization"}
<script>
(function ($) {
$("#validate-game").on("click", function () {
var data = {
questions : {}
};
var game_is_correct = true;
$(".question").each(function () {
var $this = $(this);
var value = $this.find('input:checked').val();
if (value) {
data.questions[$this.attr("data-id")] = value;
}else {
game_is_correct = false;
$this.addClass("has-error");
}
});
var $mail = $("#email");
if($mail.length > 0){
if($mail.val()){
data["email"] = $mail.val();
}else{
$mail.addClass("has-error");
}
}
var $customer = $("#customer_id");
if($customer.length > 0){
data["customer_id"] = $customer.val();
}
if(game_is_correct){
$.post("{url path="/contest/game/{$game_id}"}",data,function(data){
if(data.url){
window.location = data.url;
}
if(data.code=="9999"){
$(".main").html(data.html);
}
}).fail(function(data) {
});
}
});
})(jQuery);
</script>
{/block}

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="game-max-participate-content.html" server="51.254.220.106//web/" local="131351945400000000" remote="131351945400000000" />
</dwsync>

View File

@@ -0,0 +1,13 @@
{loop name="game.details" type="game" id=$game_id limit=1}
<article id="game" class="col-main" role="main">
<h1 id="main-label" class="page-header">{$TITLE}</h1>
<h2>{intl l="You already participate to this game with the email : %email" email=$email d='contest.fo.default'}</h2>
<p>{intl l="Max participation is %max" max=$MAX_PARTICIPATE_OPTION d='contest.fo.default'}</p>
<p>{intl l="See you" d='contest.fo.default'}</p>
<a class="btn btn-primary center-block" href="{url path="/"}">{intl l="Go home"}</a>
</article>
{/loop}