ajourt type de source

pull/25/head
kevin.modejar 3 months ago
parent 342a9f1de8
commit 4c365356a2

@ -12,8 +12,8 @@ $base = '';
$login = '';
$mdp = '';
//$racine='/~kemondejar/WF-Website'; // /~kekentin/WF/WF-Website /~lebeaulato/WF-Website /~kemondejar/WF-Website
$racine='/WF-Website';
$racine='/~kemondejar/WF-Website'; // /~kekentin/WF/WF-Website /~lebeaulato/WF-Website /~kemondejar/WF-Website
//$racine='/WF-Website';
//$repImg='/home/UCA/kemondejar/public_html/WF-Website/public/images/';
$repImg='/';

@ -13,6 +13,8 @@
/*--main-light-gradient : linear-gradient(90deg, #AAB9CF, #BDD4E7);*/
--main-light-gradient : #84e4a9;
--main-light-other-color : #46BE73;
/* --main-light-gradient : #94d3ac;
--main-light-other-color : #75b48d; */
}
@ -23,7 +25,7 @@
/* Général */
body{
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
margin : 0%;
}

@ -27,7 +27,7 @@ body.light-mode .resultat {
/* ====== ECRAN DEFAUT ====== */
h1 {
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
text-align: center;
}

@ -61,7 +61,7 @@ body.light-mode a{
}
h1{
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
text-align: center;
font-size: 32px;
margin-top: 10%;
@ -71,7 +71,7 @@ p{
margin-top: 6%;
margin-bottom: 2%;
font-size: 20px;
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
}
.login{
@ -88,11 +88,11 @@ p{
font-size: 1em;
text-align: center;
padding-top: 1%;
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
}
.buttonSudmite{
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
border: none;
padding: 2%;
border-radius: 25px;

@ -33,7 +33,7 @@ body.dark-mode .imgModify{
body.light-mode .inputPasswd{
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
margin-top: 2%;
color: black;
}
@ -75,7 +75,7 @@ body.light-mode .login{
body.light-mode .inputPasswd{
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
margin-top: 2%;
color: black;
}
@ -88,7 +88,7 @@ body.light-mode .saveButtonPasswd {
/* ====== ECRAN DEFAUT ====== */
h1{
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
text-align: center;
font-size: 35px;
}
@ -97,7 +97,7 @@ p{
margin-top: 4%;
margin-bottom: 2%;
font-size: 20px;
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
}
::backdrop {
@ -108,12 +108,12 @@ p{
height: 60%;
font-size: 15px;
text-align: center;
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
}
.buttonSudmite{
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
border: none;
padding: 2%;
border-radius: 25px;
@ -127,7 +127,7 @@ p{
font-size: 15px;
text-align: center;
padding-top: 1%;
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
}
.login{
@ -153,7 +153,7 @@ p{
border-radius: 25px;
border: none;
font-size: 15px;
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
}

@ -22,7 +22,7 @@ body.dark-mode .submit-button {
body.dark-mode .buttonSudmite {
background: linear-gradient(90deg, #6100ff 0%, #1b0048 100%);
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
border: none;
color: white;
padding: 10px 20px;
@ -50,7 +50,7 @@ body.light-mode .answer {
/* ====== ECRAN DEFAUT ====== */
h1, h2, p {
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
text-align: center;
}

@ -160,7 +160,7 @@ body.light-mode .like-icon-none img {
background-color: #fff;
color: black;
display: flex;
font-family: "Lemon", sans-serif;
font-family: "roboto condensed", sans-serif;
flex-direction: column;
margin-bottom: 1vh;
border-radius: 20px;

@ -50,7 +50,7 @@ body.light-mode a{
/* ====== ECRAN DEFAULT ====== */
h1{
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
text-align: center;
font-size: 32px;
margin-top: 10%;
@ -68,7 +68,7 @@ p{
margin-top: 4%;
margin-bottom: 2%;
font-size: 20px;
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
}
.confirmer{
@ -87,7 +87,7 @@ p{
}
.btn{
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
border: none;
padding: 2%;
border-radius: 25px;
@ -101,7 +101,7 @@ p{
font-size: 1em;
text-align: center;
padding-top: 1%;
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
}
.createAccount{

@ -25,7 +25,7 @@ body.light-mode #box{
/* ====== ECRAN DEFAULT ====== */
h1, h2{
font-family: "Lemon", serif;
font-family: "roboto condensed", sans-serif;
text-align: center;
}

@ -1,6 +1,8 @@
<?php
namespace Entity;
use Enum\TypeSourceEnum;
class Quote{
private int $id;
@ -11,6 +13,7 @@
private string $dateSrc;
private int $like;
private string $langue;
private TypeSourceEnum $type;
/**
* @param int $id
@ -22,7 +25,7 @@
* @param int $like
* @param string $langue
*/
public function __construct(int $id, string $content, string $carac, string $imgPath, string $titleSrc, string $dateSrc, int $like, string $langue)
public function __construct(int $id, string $content, string $carac, string $imgPath, string $titleSrc, string $dateSrc, int $like, string $langue, TypeSourceEnum $type)
{
$this->id = $id;
$this->content = $content;
@ -32,6 +35,7 @@
$this->dateSrc = $dateSrc;
$this->like = $like;
$this->langue = $langue;
$this->type = $type;
}
/**
@ -162,7 +166,13 @@
$this->langue = $langue;
}
public function getType(): TypeSourceEnum{
return $this->type;
}
public function setType(TypeSourceEnum $type){
$this->type = $type;
}
}
?>

@ -3,6 +3,7 @@
use Entity\Quote;
use Gateway\QuoteGateway;
use Gateway\Gateway;
use Enum\TypeSourceEnum;
class QuoteModel extends Model
{
@ -12,7 +13,7 @@
if( count($res) == 0)
return new Quote(-1,"NULL","NULL","NULL","NULL","NULL",0,"Default");
else
return new Quote($res[0]["id_quote"],$res[0]["content"],$res[0]["caracter"],$res[0]["imgpath"],$res[0]["title"],$res[0]["dates"],$res[0]["likes"],$res[0]["langue"]);
return new Quote($res[0]["id_quote"],$res[0]["content"],$res[0]["caracter"],$res[0]["imgpath"],$res[0]["title"],$res[0]["dates"],$res[0]["likes"],$res[0]["langue"],TypeSourceEnum::Movie);
}
public function getSuggest(int $numpage, string $language):array{
@ -21,7 +22,7 @@
foreach($res as $q ){
$q["content"] = (strlen($q["content"]) > 153) ? substr($q["content"],0,150).'...' : $q["content"];
$tabQ[]= new Quote($q["id_quote"],$q["content"],$q["caracter"],$q["imgpath"],$q["title"],$q["dates"],$q["likes"],$q["langue"]) ;
$tabQ[]= new Quote($q["id_quote"],$q["content"],$q["caracter"],$q["imgpath"],$q["title"],$q["dates"],$q["likes"],$q["langue"],TypeSourceEnum::Movie) ;
}
return $tabQ;
}
@ -29,10 +30,10 @@
public function getQuoteOfTheDay(string $language):Quote{
$res = $this->gateway->getQuoteOfTheDay($language);
if( count($res) == 0)
return new Quote(-1,"NULL","NULL","NULL","NULL","NULL",0,"Default");
return new Quote(-1,"NULL","NULL","NULL","NULL","NULL",0,"Default",TypeSourceEnum::Movie);
else
$res["content"] = (strlen($res["content"]) > 153) ? substr($res["content"],0,150).'...' : $res["content"];
return new Quote($res["id_quote"],$res["content"],$res["caracter"],$res["imgpath"],$res["title"],$res["dates"],$res["likes"],$res["langue"]) ;
return new Quote($res["id_quote"],$res["content"],$res["caracter"],$res["imgpath"],$res["title"],$res["dates"],$res["likes"],$res["langue"],TypeSourceEnum::Movie) ;
}
public function getFavorites(string $userId): array {
@ -41,7 +42,7 @@
foreach($res as $q ){
$q["content"] = (strlen($q["content"]) > 153) ? substr($q["content"],0,150).'...' : $q["content"];
$tabQ[]= new Quote($q["id_quote"],$q["content"],$q["caracter"],$q["imgpath"],$q["title"],$q["dates"],$q["likes"],$q["langue"]) ;
$tabQ[]= new Quote($q["id_quote"],$q["content"],$q["caracter"],$q["imgpath"],$q["title"],$q["dates"],$q["likes"],$q["langue"],TypeSourceEnum::Movie) ;
}
return $tabQ;
}

@ -3,6 +3,7 @@
use Entity\Quote;
use Gateway\QuoteGateway;
use Gateway\Gateway;
use Enum\TypeSourceEnum;
class SearchModel extends Model
{
@ -14,7 +15,7 @@
foreach($res as $q ){
$q["content"] = (strlen($q["content"]) > 153) ? substr($q["content"],0,150).'...' : $q["content"];
$tabQ[]= new Quote($q["id_quote"],$q["content"],$q["caracter"],$q["imgpath"],$q["title"],$q["dates"],$q["likes"],$q["langue"]) ;
$tabQ[]= new Quote($q["id_quote"],$q["content"],$q["caracter"],$q["imgpath"],$q["title"],$q["dates"],$q["likes"],$q["langue"],TypeSourceEnum::Movie) ;
}
return $tabQ;
}

@ -1,4 +1,5 @@
<?php
use Enum\TypeSourceEnum;
global $twig;
@ -17,5 +18,6 @@
'nbLike' => $q->getLike(),
'idQuote' => $q->getId(),
'com' => $c,
'type' => $q->getType()->name,
'fav' => $f));
?>

@ -19,7 +19,7 @@
<div class="part2">
<div class="info">
<ul class="infoQuote">
<li>- {{sourceName}}</li>
<li>- {{sourceName}} ({{type}})</li>
<li>- {{nameCarac}}</li>
<li>- {{dateSortie}}</li>
</ul>

@ -1,4 +1,4 @@
<h1>▶ Your quote has been submitted successfully ◀</h1>
<h1>Votre citation a corectement été envoyé</h1>
<div>

Loading…
Cancel
Save