| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 
 | <?
session_start();  // Démarrage de la session. A placer obligatoirement avant tout code html
$username = $_GET['username'];//On récupère les données envoyées par la méthode POST du formulaire d'identification
$id = $_GET['id'];//On récupère les données envoyées par la méthode POST du formulaire d'identification
$Nnamepage = $_GET['Nnamepage']; // depuis index.php
$Nnamepage_FR = $_GET['Nnamepage_FR']; // depuis index.php
$Nset = $_GET['Nset']; // depuis index.php
$Nid = $_GET['Nid']; // depuis index.php
$Language = $_GET['Language']; // Depuis carte/carteVO.php
 
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="Details" content="">
		<meta name="author" content="K">
		<meta name="robots" content="index,follow">
		<meta name="keywords" content=""/>
		<link rel="stylesheet" href="Css.css" />
		<title>Collection</title>
	</head>
<body>
<?php
///si l'utilisateur est connecté, on affiche le control panel
if(isset($_SESSION['username']))
{
echo '<div id="log_in"><table border="0" width="600">';
include ("log_ok.php");
echo '</table></div>';
}
else
{
//Sinon, on affiche le panel de login
echo '<div id="log_in"><table border="0" width="600">';
include("log_in.php");
echo '</table></div>';
header("Location: index.php");
 
}
try
{	
// initialisation des variables 
require_once('_connexion.php'); 
// connection à la DB
$bdd = new PDO('mysql:host='.$host.';dbname='.$bdd.'', ''.$user.'', ''.$pass.'') or die ("Impossible de se connecter");
}
catch(Exception $e)
{// En cas d'erreur, on affiche un message et on arrête tout
        die('Erreur : '.$e->getMessage());
}// Si tout est ok, on continu
 
$collection= mysql_query ('SELECT 
CKey, Cid, Cusername, Ctab, NKey_card, Cqty, Clanguage, Cetat, Ccote, Ccommentaire, Creserved, Cdate,
Ncards.Nname,
Ncards.Nname_FR,
Ncards.Nset,
Ncards.Nrarity,
Ncards.Nnumber,
Nsets.Nname_FR as "NSetName_FR",
Nsets.Nname as "NSetName"
FROM collection
left outer join Ncards on collection.NKey_card = Ncards.NKey
left outer join Nsets on Ncards.Nset = Nsets.Ncode
WHERE Cid = \''.$_SESSION['userid'].'\'
order by Ncards.Nset, Ncards.Nname_FR ');
 
//-----------------------------------------------------------------------
echo '<style> <!--body{	background-color: #d9d4d0;}	--></style>'; 
 
echo '<div id="Header"><table border=0 width=300>';
include("Header.php");
echo '</table></div>';
echo '<div id="search"><table border=0 width=900>';
include("search.php");
echo '</table></div>';
 
echo '<div id="classeur"><table border=0 width=900 class=txt><tr>
<td width=320>Nom</td>
<td witdh=30 align="center">Édition</td>
<td witdh=10 align="center">Langue</td>
<td witdh=10 align="center">État</td>
<td witdh=30 align="center">Qté</td>
<td witdh=40 align="center">Côte</td>
<td>Commentaire</td>
<td>Réservée</td>
</tr>';
 
$linenumber = 0;
while($datacollection = mysql_fetch_array($collection))
{
echo '<style>
a:hover { 
	color:red;
	text-decoration:none;
}
</style>';
if ($data["Nname_FR"] ==''){$Nname = $data["Nname"];} else {$Nname = $data["Nname_FR"];}
 
$linenumber = $linenumber+1;
if ($linenumber%2==1){ 
echo '<tr bgcolor="#EEEEEE">';} elseif ($linenumber%2<>1){ echo '<tr>';}
if ($data["NSetName_FR"] =='' ) {$NSetName = $data["NSetName"]; } else {$NSetName = $data["NSetName_FR"]; }
 
echo '<form action="collection_modif_process.php" method="post">';
echo '<td>'.$datacollection['Nname'].'</td>
<td align="center"><img src="/pics/pics_page/'.$datacollection["Nset"].'/'.$datacollection["Nrarity"].'.png"></a></td>
<td><SELECT name="Clanguage[]" size="1">
		<OPTION VALUE="FR"'; if($datacollection['Clanguage']=='FR'){echo 'selected="selected"';} echo '>Français</OPTION>
		<OPTION VALUE="VO"'; if($datacollection['Clanguage']=='VO'){echo 'selected="selected"';} echo '>Anglais</OPTION>
		<OPTION VALUE="DE"'; if($datacollection['Clanguage']=='DE'){echo 'selected="selected"';} echo '>Allemand</OPTION>
		<OPTION VALUE="IT"'; if($datacollection['Clanguage']=='IT'){echo 'selected="selected"';} echo '>Italien</OPTION>
		<OPTION VALUE="ES"'; if($datacollection['Clanguage']=='ES'){echo 'selected="selected"';} echo '>Espagnol</OPTION>
		<OPTION VALUE="PT"'; if($datacollection['Clanguage']=='PT'){echo 'selected="selected"';} echo '>Portugais</OPTION>
		<OPTION VALUE="CN"'; if($datacollection['Clanguage']=='CN'){echo 'selected="selected"';} echo '>Chinois</OPTION>
		<OPTION VALUE="JP"'; if($datacollection['Clanguage']=='JP'){echo 'selected="selected"';} echo '>Japonais</OPTION>
		<OPTION VALUE="KR"'; if($datacollection['Clanguage']=='KR'){echo 'selected="selected"';} echo '>Koréen</OPTION>
		<OPTION VALUE="RU"'; if($datacollection['Clanguage']=='RU'){echo 'selected="selected"';} echo '>Russe</OPTION>
</SELECT></td>
<td><SELECT name="Cetat[]" size="1">
		<OPTION VALUE="M"'; if($datacollection['Cetat']=='M'){echo 'selected="selected"';} echo '>Mint</OPTION>
		<OPTION VALUE="NM"'; if($datacollection['Cetat']=='NM'){echo 'selected="selected"';} echo '>Near Mint</OPTION>
		<OPTION VALUE="EX"'; if($datacollection['Cetat']=='EX'){echo 'selected="selected"';} echo '>Excellent</OPTION>
		<OPTION VALUE="GO"'; if($datacollection['Cetat']=='GO'){echo 'selected="selected"';} echo '>Good</OPTION>
		<OPTION VALUE="PL"'; if($datacollection['Cetat']=='PL'){echo 'selected="selected"';} echo '>Played</OPTION>
		<OPTION VALUE="PO"'; if($datacollection['Cetat']=='PO'){echo 'selected="selected"';} echo '>Poor</OPTION>
</SELECT></td>';
 
echo '<td align="right">'.$datacollection['Cqty'].'</td>
<td><input size="5" maxlength="4" format="NNNN" style="text-align: right" type="text" value ="'.$datacollection['Ccote'].'" name="Ccote[]"></td>
<td><input size="12" type="text" value ="'.$datacollection['Ccommentaire'].'" name="Ccommentaire[]"></td>';
if ($datacollection['Creserved'] == '1') {$Creserved="checked=checked";} elseif ($datacollection['Creserved'] == '0') {$Creserved="";} 
echo '<td width=10 align=center><input type="checkbox" '.$Creserved.' name="Creserved[]"></td>';
echo '
	<input type="hidden" name="Cid[]" id="Cid" value="'.$datacollection["Cid"].'"/>
	<input type="hidden" name="CKey[]" id="CKey" value="'.$datacollection["CKey"].'"/>
	<input type="hidden" name="Cusername[]" id="Cusername" value="'.$_SESSION['username'].'"/>
</tr>';
}
echo '<tr><td><table border=1>
<tr><td><input type="submit" name="Submit" value="Valider les modifications" /></td></tr>
</table></td></tr></form></form>
</table></div>';
?> |