1 2 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
| <?php
include "base.php";
$where = array();
if (isset($_POST['master']) && (strlen($_POST['master']))) {
$where[] = "master='".mysql_real_escape_string($_POST['master'])."'";
}
if (isset($_POST['titre1'])) {
$where[] = "titre1 LIKE '%".mysql_real_escape_string($_POST['titre1'])."%'";
}
if (isset($_POST['titre2'])) {
$where[] = "titre2 LIKE '%".mysql_real_escape_string($_POST['titre2'])."%'";
}
$sql = 'SELECT * FROM films';
if ( ! empty($where)) {
$sql .= ' WHERE '.implode(' AND ', $where);
}
mysql_query("SET NAMES 'utf8'"); // évite de trainer des COLLATE partout
$data = mysql_query($sql);
if ( ! $data) {
die('Error : ' . mysql_error());
}
echo
'master',
$_POST['master'],
'<br />',
$_POST['duration'],
$_POST['lieu'],
$_POST['client'],
$_POST['nomclient'],
$_POST['titre1'],
$_POST['titre2'],
$_POST['prod'],
$_POST['reali'],
$_POST['monteur'],
$_POST['truq'],
$_POST['compo'],
$_POST['mus'],
$_POST['formorig'],
$_POST['standard'],
$_POST['speak1'],
$_POST['speak2'],
$_POST['v1'],
$_POST['v2'],
'<br />',
$_POST['contenu'],
'<br />',
$_POST['obs'],
'<table bgcolor="#FFF">';
while($row = mysql_fetch_assoc($data)): ?>
<tr>
<td class="champmasterlist">M <a href="affich-master.php?fiche=<?php echo $row['idfilm']; ?>"><?php echo $row['master']; ?></a></td>
<td class="champtitrelist"><a href="affich-master.php?fiche=<?php echo $row['idfilm']; ?>"><?php echo $row['titre1']; ?></a></td>
<td><?php echo $row['duration']; ?></td>
<td></td>
<td class="champtitrelist2"><?php echo $row['titre2']; ?></td>
<td><?php echo $row['date']; ?></td>
<td></td>
</tr>
<?php endwhile; ?> |
Partager