Start GPC application

This commit is contained in:
nemunaire 2013-12-31 11:40:02 +01:00
commit 4de88fb175
10 changed files with 2091 additions and 0 deletions

View file

@ -0,0 +1,8 @@
function Album(elt)
{
this.id = elt.getAttribute("id");
this.type = parseInt(elt.getAttribute("type"));
this.titre = elt.getAttribute("titre");
if (elt.hasAttribute("couleur"))
this.color = elt.getAttribute("couleur");
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,28 @@
<?php
//Définition de la constante anti-hacking
define("INDEX", 1);
ob_start();
//Inclusion de l'API Onyx
require_once(trim(file_get_contents('../../.onyx')));
require_once(ONYX.'include/functions.php');
$SESS = new Session();
ob_end_clean();
$nom = gpc('auteur', 'post');
$bdd = new BDD();
$bdd->escape($nom);
$chanteurs = $bdd->query("SELECT artiste FROM gsm_titres WHERE artiste LIKE '$nom%' GROUP BY artiste;");
$bdd->deconnexion();
if (!empty($chanteurs) && !empty($nom))
{
print "<ul>\n";
foreach ($chanteurs as $chanteur)
{
print ' <li>'.$chanteur["artiste"]."</li>\n";
}
print "</ul>";
}
?>

View file

@ -0,0 +1,45 @@
function Chanson(elt)
{
this.albums = new Array();
if (elt)
{
this.id = elt.getAttribute("id");
this.titre = elt.getAttribute("titre");
this.artiste = elt.getAttribute("artiste");
for (var albm in elt.getElementsByTagName("inalbum"))
{
if (albm.isInt())
this.albums.push(elt.getElementsByTagName("inalbum")[albm].getAttribute("id"));
}
}
}
Chanson.prototype.inAlbum = function(idAlbum, types)
{
for (var i = 0; i < this.albums.length; i++)
{
if (
(typeof(idAlbum) == 'undefined' || this.albums[i] == idAlbum) &&
(typeof(types) == 'undefined' || types.in_array(GSM_liste_CDs[this.albums[i]].type))
)
return true;
}
return false;
}
Chanson.prototype.search = function(titre, artiste, album, types)
{
if (
(titre == '' || this.titre.toLowerCase().indexOf(titre.toLowerCase()) >= 0) &&
(artiste == '' || this.artiste.toLowerCase().indexOf(artiste.toLowerCase()) >= 0)
)
{
for (var i = 0; i < this.albums.length; i++)
{
if (album == '' || GSM_liste_CDs[this.albums[i]].titre.toLowerCase().indexOf(album.toLowerCase()) >= 0)
return (types.length == 0 || types.in_array(GSM_liste_CDs[this.albums[i]].type));
}
}
return false;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

View file

@ -0,0 +1,101 @@
.front
{
border: solid 1px black;
display: table-cell;
height: 12cm;
text-align: center;
vertical-align: middle;
width: 12cm;
}
.front .title, .front .cd
{
font-size: 60px;
font-family: sans-serif;
font-weight: bolder;
text-transform: uppercase;
}
.sp
{
margin: 1cm 0;
}
.back
{
border: solid 1px black;
display: table;
height: 11.8cm;
width: 15.3cm;
}
.back .title
{
font-variant: small-caps
}
.back .center .title
{
font-size: 14px;
font-weight: bolder;
}
.back .left, .back .right
{
display: block;
height: 11.8cm;
text-align: left;
vertical-align: top;
width: 0.8cm;
}
.back .left
{
border-right: dashed 1px gray;
float: left;
}
.back .right
{
border-left: dashed 1px gray;
float: right;
}
.back .left .title, .back .right .title
{
font-size: 13pt;
font-weight: bolder;
margin-top: 5.5cm;
margin-left: -5.15cm;
position: absolute;
}
.back .left .title
{
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
transform: rotate(-90deg);
text-align: center;
width: 11.1cm;
}
.back .right .title
{
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
transform: rotate(90deg);
text-align: center;
width: 11cm;
}
.back .center
{
text-align: center;
}
.back ol
{
text-align: left;
}
.back .author
{
float: right;
width: 45%;
}

View file

@ -0,0 +1,24 @@
body
{
font-family: serif;
font-size: 10px;
margin: auto;
width: 18cm;
}
h1 {
display: none;
}
menu {
display: none;
}
.back .center
{
overflow:hidden;
height: 11.1cm;
}
.back .center ol
{
-webkit-margin-before: 0.5em;
}

View file

@ -0,0 +1,345 @@
html {
height: 100%;
}
body {
background: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.31, #ffa2a1),
color-stop(0.90, #ffd3d3)
);
background: -moz-linear-gradient(
center bottom,
#ffa2a1 31%,
#ffd3d3 90%
);
font-family: serif;
margin-bottom: 10px;
min-height: 80%;
}
a:link, a:visited {
text-decoration: none;
color:#000000;
}
h1 {
text-align: center;
margin-left: 250px;
}
.pagination a:link, .pagination a:visited {
text-decoration: none;
color:#FFFFFF;
}
.pagination a:hover, a:hover {
text-decoration: underline;
}
.news {
background: -webkit-gradient(
linear,
left top,
right bottom,
color-stop(0.31, #ffa2a1),
color-stop(0.66, #ffdcdb)
);
background: -moz-linear-gradient(
right bottom,
#ffa2a1 31%,
#ffdcdb 66%
);
border: 2px solid #ff6062;
border-radius: 17px;
box-shadow: 3px 4px 5px #444466;
height: 127px;
margin: auto;
padding: 20px;
text-align: left;
width: 75%;
}
.vp {
color: orange;
}
menu {
background: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.31, #ffa2a1),
color-stop(0.90, #ffd3d3)
);
background: -moz-linear-gradient(
center bottom,
#ffa2a1 31%,
#ffd3d3 90%
);
border-right: 2px dotted white;
color:#FFFFFF;
font-weight: bold;
height: 100%;
left: 0px;
list-style: none;
margin: 0;
padding: 0;
position: fixed;
text-align: center;
top: 0px;
width: 250px;
}
menu h2 {
margin-left: 69px;
}
menu > li {
margin-bottom: 40px;
text-align: center;
width: 250px;
}
menu > li ul {
margin-left: 20px;
}
menu > li li {
margin-top: 5px;
}
menu li[onclick] {
cursor: pointer;
}
menu li[onclick]:hover {
text-decoration: underline;
}
label {
font-weight: bold;
}
label:hover {
text-decoration: underline;
}
form {
background: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.31, #cc6d1d),
color-stop(0.95, #ff8f26)
);
background: -moz-linear-gradient(
center bottom,
#cc6d1d 31%,
#ff8f26 95%
);
border: 1px solid #ff9b42;
border-radius: 25px;
box-shadow: 2px 2px 5px #553333;
}
form#addAlbms, form#rechTitles {
margin: auto;
padding: 13px;
text-align: left;
width: 400px;
}
form#addAlbms div, form#rechTitles div {
text-align: center;
}
form#rechTitles input[type=text] {
width: 234px;
}
form#rechTitles input[type=checkbox] {
margin-left: 120px;
}
form#addAlbms div label, form#rechTitles div label {
margin-right: 4px;
}
form#addAlbms div#testColor {
background-color: black;
border: solid 1px black;
display: inline-block;
height: 1em;
margin-left: 5px;
margin-bottom: -4px;
width: 2em;
}
form#ajout {
height: 182px;
margin: 10px auto;
padding: 13px;
text-align: left;
width: 642px;
}
form#ajout input[type=text] {
width: 444px;
}
form#ajout select {
margin-right: 10px;
}
form#ajout label {
float: left;
display: block;
font-weight: bold;
margin: 10px 7px 10px 0;
text-align: right;
width: 110px;
}
form#ajout label:hover {
text-decoration: underline;
}
input[type=text], select {
margin: 10px 0;
transition: background 0.75s;
-moz-transition: background 0.75s;
-webkit-transition: background 0.75s;
-o-transition: background 0.75s;
}
input, select {
background: #FF6600;
border: #CA2A20 solid 1px;
border-radius: 3px;
margin-top: 5px;
}
input:hover, input:focus, select:hover, select:focus {
background: #CC6600;
}
input.erreur, select.erreur {
background: #CC0000;
}
div#GSM_menu {
background: url(backmenu.png);
color:#FFFFFF;
top: 0px;
font-weight: bold;
height: 1200px;
padding-top: 30px;
position: fixed;
text-align: center;
left: 0px;
width: 250px;
}
div#GSM_menu h2 {
margin-bottom: 40px;
}
div#contenu {
margin-left: 250px;
text-align: center;
}
.table {
border: 1px solid black;
border-radius: 10px;
box-shadow: 3px 3px 5px #666666;
margin: auto;
}
.table .body div {
transition: background 500ms;
-moz-transition: background 500ms;
-webkit-transition: background 500ms;
-o-transition: background 500ms;
}
.table .body div.elt0 {
background: #ec7d60;
}
.table .body div.elt1 {
background: #f68063;
}
.table .body div:hover {
background: #fa8022;
}
.table.cols2 div span {
display: inline-block;
width: 40%;
}
.table.cols3 div span {
display: inline-block;
width: 40%;
}
.table.cols3 div span+span+span {
width: 20%;
}
.table div.lign {
display: inline-block;
width: 100%;
}
.table .head {
background: #f26340;
border-bottom: 1px solid black;
border-radius: 10px 10px 0 0;
font-weight: bolder;
display: block;
text-align: center;
width: 100%;
}
.table .foot { border-radius: 0 0 10px 10px; }
.table.stats {
float: left;
margin: 0 1%;
width: 31%;
}
.table#list {
width: 83%;
}
.table#list .head {
cursor: pointer;
}
.table .body div {
cursor: pointer;
}
.pagination {
background: #f26340;
border: 1px solid black;
color: white;
margin: auto;
width: 442px;
}
.pagination.top {
border-radius: 10px 10px 0 0;
border-bottom: none;
}
.pagination.bottom {
border-top: none;
border-radius: 0 0 10px 10px;
box-shadow: 0px 2px 7px #666666;
}
.pagination a {
cursor: pointer;
padding: 0 5px;
}
.front, .back
{
background: white;
}
.back .center
{
overflow:auto;
}
.back ol li:hover
{
background-color: teal;
}
div.autocomplete
{
margin-top: 20px;
margin-left: 6px;
}