Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
P
PIMA
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Déploiement
Releases
Registre de conteneur
Registre de modèles
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Groupe PIMA 15
PIMA
Validations
d19b1b6f
Valider
d19b1b6f
rédigé
5 years ago
par
mattgoss
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
petites modifications
parent
d3d288c3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
config/pima.sql
+31
-26
31 ajouts, 26 suppressions
config/pima.sql
favoris.php
+25
-1
25 ajouts, 1 suppression
favoris.php
result_search.php
+2
-2
2 ajouts, 2 suppressions
result_search.php
avec
58 ajouts
et
29 suppressions
config/pima.sql
+
31
−
26
Voir le fichier @
d19b1b6f
-- phpMyAdmin SQL Dump
-- version 4.
8.5
-- version 4.
9.0.1
-- https://www.phpmyadmin.net/
--
-- Hôte :
127.0.0.1:3306
-- Généré le : mer. 18 déc. 2019 à
18:15
-- Hôte :
localhost:8889
-- Généré le : mer. 18 déc. 2019 à
21:34
-- Version du serveur : 5.7.26
-- Version de PHP : 7.
2.1
8
-- Version de PHP : 7.
3.
8
SET
SQL_MODE
=
"NO_AUTO_VALUE_ON_ZERO"
;
SET
AUTOCOMMIT
=
0
;
START
TRANSACTION
;
SET
time_zone
=
"+00:00"
;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */
;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */
;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */
;
/*!40101 SET NAMES utf8mb4 */
;
--
-- Base de données : `pima`
--
...
...
@@ -28,8 +20,7 @@ SET time_zone = "+00:00";
-- Structure de la table `categorie`
--
DROP
TABLE
IF
EXISTS
`categorie`
;
CREATE
TABLE
IF
NOT
EXISTS
`categorie`
(
CREATE
TABLE
`categorie`
(
`id_categorie`
int
(
2
)
NOT
NULL
,
`nom_categorie`
varchar
(
30
)
NOT
NULL
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
;
...
...
@@ -52,20 +43,25 @@ INSERT INTO `categorie` (`id_categorie`, `nom_categorie`) VALUES
-- Structure de la table `favoris`
--
DROP
TABLE
IF
EXISTS
`favoris`
;
CREATE
TABLE
IF
NOT
EXISTS
`favoris`
(
CREATE
TABLE
`favoris`
(
`id_artiste`
int
(
11
)
NOT
NULL
,
`id_user`
int
(
11
)
NOT
NULL
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
;
--
-- Déchargement des données de la table `favoris`
--
INSERT
INTO
`favoris`
(
`id_artiste`
,
`id_user`
)
VALUES
(
4
,
2
);
-- --------------------------------------------------------
--
-- Structure de la table `influenceurs`
--
DROP
TABLE
IF
EXISTS
`influenceurs`
;
CREATE
TABLE
IF
NOT
EXISTS
`influenceurs`
(
CREATE
TABLE
`influenceurs`
(
`id_artiste`
int
(
11
)
NOT
NULL
,
`nom_artiste`
varchar
(
30
)
NOT
NULL
,
`sexe`
varchar
(
1
)
NOT
NULL
,
...
...
@@ -73,8 +69,7 @@ CREATE TABLE IF NOT EXISTS `influenceurs` (
`tag_instagram`
varchar
(
30
)
NOT
NULL
,
`nb_youtube`
int
(
11
)
NOT
NULL
,
`nb_instagram`
int
(
11
)
NOT
NULL
,
`id_categorie`
int
(
11
)
NOT
NULL
,
PRIMARY
KEY
(
`id_artiste`
)
`id_categorie`
int
(
11
)
NOT
NULL
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
;
--
...
...
@@ -118,8 +113,7 @@ INSERT INTO `influenceurs` (`id_artiste`, `nom_artiste`, `sexe`, `tag_youtube`,
-- Structure de la table `users`
--
DROP
TABLE
IF
EXISTS
`users`
;
CREATE
TABLE
IF
NOT
EXISTS
`users`
(
CREATE
TABLE
`users`
(
`id_user`
int
(
11
)
NOT
NULL
,
`nom`
varchar
(
30
)
NOT
NULL
,
`prenom`
varchar
(
30
)
NOT
NULL
,
...
...
@@ -137,8 +131,19 @@ INSERT INTO `users` (`id_user`, `nom`, `prenom`, `mail`, `mdp`, `bday`) VALUES
(
2
,
'GOSSET'
,
'Matthieu'
,
'matthieu.gosset@yahoo.fr'
,
'matthieu'
,
'1998-04-25'
),
(
3
,
'sellambin'
,
'hugo'
,
'hugo91@gmail.com'
,
'hugohugoo'
,
'2004-12-04'
),
(
4
,
'Caille'
,
'Louis'
,
'louis.caille@hotmail.fr'
,
'helloworld'
,
'1998-08-13'
);
COMMIT
;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */
;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */
;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */
;
--
-- Index pour les tables déchargées
--
--
-- Index pour la table `favoris`
--
ALTER
TABLE
`favoris`
ADD
PRIMARY
KEY
(
`id_artiste`
,
`id_user`
);
--
-- Index pour la table `influenceurs`
--
ALTER
TABLE
`influenceurs`
ADD
PRIMARY
KEY
(
`id_artiste`
);
\ No newline at end of file
Ce diff est replié.
Cliquez pour l'agrandir.
favoris.php
+
25
−
1
Voir le fichier @
d19b1b6f
...
...
@@ -26,6 +26,30 @@ if (isset($_SESSION["authent"]) && $_SESSION['authent'] == 0){
</tr>
</thead>
<tbody>
<?php
function
number_format_short
(
$n
,
$precision
=
1
)
{
if
(
$n
<
900
)
{
$n_format
=
number_format
(
$n
,
$precision
);
$suffix
=
''
;
}
else
if
(
$n
<
900000
)
{
$n_format
=
number_format
(
$n
/
1000
,
$precision
);
$suffix
=
'K'
;
}
else
if
(
$n
<
900000000
)
{
$n_format
=
number_format
(
$n
/
1000000
,
$precision
);
$suffix
=
'M'
;
}
else
if
(
$n
<
900000000000
)
{
$n_format
=
number_format
(
$n
/
1000000000
,
$precision
);
$suffix
=
'B'
;
}
else
{
$n_format
=
number_format
(
$n
/
1000000000000
,
$precision
);
$suffix
=
'T'
;
}
if
(
$precision
>
0
)
{
$dotzero
=
'.'
.
str_repeat
(
'0'
,
$precision
);
$n_format
=
str_replace
(
$dotzero
,
''
,
$n_format
);
}
return
$n_format
.
$suffix
;}
?>
<?php
$result
=
mysqli_query
(
$link
,
"SELECT nom_artiste, nb_youtube + nb_instagram as nb, tag_instagram FROM influenceurs NATURAL JOIN favoris WHERE nb_youtube != 0 && nb_instagram != 0 && id_user = "
.
$_SESSION
[
"id"
]
.
" ORDER BY nb DESC LIMIT 10"
);
$compt
=
1
;
...
...
@@ -34,7 +58,7 @@ if (isset($_SESSION["authent"]) && $_SESSION['authent'] == 0){
<tr
onclick=
"document.location = 'page_globale.php?user=
<?=
$row
[
'tag_instagram'
]
?>
';"
class=
"table-click"
>
<th
scope=
"row"
>
<?=
$compt
?>
</th>
<td
class=
"text-right"
>
<?php
if
(
$compt
==
1
)
:
?>
<i
class=
"fas fa-medal"
></i>
<?php
endif
;
?>
<?=
$row
[
'nom_artiste'
]
?>
</td>
<td
class=
"text-right"
>
<?=
$row
[
'nb'
]
?>
</td>
<td
class=
"text-right"
>
<?=
number_format_short
(
$row
[
'nb'
]
,
$precision
=
1
)
?>
</td>
</tr>
<?php
$compt
=
$compt
+
1
;
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
result_search.php
+
2
−
2
Voir le fichier @
d19b1b6f
...
...
@@ -108,9 +108,9 @@ $(document).ready(function(){
</td>
<?php
if
(
$_SESSION
[
"authent"
]
==
1
){
?>
<!-- ADD TO FAVORITE BUTTON -->
<td>
<!--
<td>
<span id = heart><i class="fa fa-heart-o fa-2x" aria-hidden="true"></i> </span>
</td>
</td>
-->
<?php
}
?>
</tr>
<?php
}
}
?>
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter