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 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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
| <?php
if(isset($_POST['txtTitre'])){
$query = " INSERT INTO films (id ,titre ,description ,image ,link ,link2 ,allocine ,Date_add ,people ,language ,genre ,qualité)
VALUES ( NULL,
'".mysql_real_escape_string($_POST["txtTitre"])."',
'".mysql_real_escape_string($_POST["txtDescription"])."',
'".mysql_real_escape_string($_POST["txtImage"])."',
'".mysql_real_escape_string($_POST["txtMegaupload"])."',
'".mysql_real_escape_string($_POST["txtMegavideo"])."',
'".mysql_real_escape_string($_POST["txtAllocine"])."',
NOW(),
'".mysql_real_escape_string($_POST["txtPeople"])."',
'".mysql_real_escape_string($_POST["cboLanguage"])."',
'".mysql_real_escape_string($_POST["rbtnGenre"])."',
'".mysql_real_escape_string($_POST["rbtnQual"])."');";
if (isSet ($_POST['modifier']))
$requete = "UPDATE films SET titre=$txtTitre,"
."description='$txtDescription',image='$txtImage', link='$txtMegaupload',"
."link2='$txtMegavideo', allocine='$txtAllocine', people='$txtPeople',"
."languages='$cboLanguage', genre='$rbtnGenre', qualité='$rbtnQual'";
if (isSet($_POST['detruire']))
$requete = "DELETE FROM films WHERE titre='$titre'";
if (isSet ($_POST['inserer']))
echo "Insertion du film $titre ok .";
else if (isSet ($_POST['modifer']))
echo "Modifications du film $titre ok .";
else if (isSet ($_POST['detruire']))
echo "Destruction du film $titre ok.";
//echo $query;
mysql_connect('...','...','...') or die(mysql_error());
mysql_select_db('...') or die(mysql_error());
mysql_query($query)
or die(mysql_error());
@mysql_close($connection);
echo "La Requête '$requete' a été exécutée \n";
}
?>
</div>
<div class="nav_bo"><h3> <a href="BO_dep.php">Ajouter un film</a> | <a href="BO_bandanonce.php">Ajouter une bande annonce</a> |<a href="BO_news.php">Ajouter une actu</a> </h3> </div>
<titre><h1>Ajouter un Film</h1></titre>
<div class="formulaire_fl">
<form method="post" action="#" name="insertForm" enctype="multipart/form-data">
<table>
<tfoot>
<tr>
<th colspan="5" align="right" class="tblFooters">
</th>
</tr>
</tfoot>
<tbody>
<tr>
<td align="center">
Titre
</td>
<td>
<input type="text" name="txtTitre" id="txtTitre" value="" size="40" MAXLENGTH=255 class="textfield" id="field_2_3" />
</td>
</tr>
<tr>
<td align="center">
Description <br /> Résumé / synospis
</td>
<td>
<textarea name="txtDescription" id="txtDescription" rows="7" cols="40" dir="ltr" id="field_3_3" tabindex="7" ></textarea>
</td>
</tr>
<tr>
<td align="center">
Lien Image
</td>
<td>
<input type="text" name="txtImage" id="txtImage" value="" size="40" MAXLENGTH=255 class="textfield" tabindex="10" id="field_4_3"/>
</td>
</tr>
<tr>
<td align="center">
Lien MEGAUPLOAD
</td>
<td>
<input type="text" name="txtMegaupload" id="txtMegaupload" value="" size="40" MAXLENGTH=255 class="textfield" tabindex="13" id="field_5_3" />
</td>
</tr>
<tr>
<td align="center">
Lien MEGAVIDEO
</td>
<td>
<input type="text" name="txtMegavideo" id="txtMegavideo" value="" size="40" MAXLENGTH=255 class="textfield" tabindex="16" id="field_6_3" />
</td>
</tr>
<tr>
<td align="center">
Lien Allociné
</td>
<td>
<input type="text" name="txtallocine" id="txtallocine" value="" size="40" MAXLENGTH=255 class="textfield" tabindex="16" id="field_6_3" />
</td>
</tr>
<tr>
<td align="center">
Votre Pseudo
</td>
<td>
<input type="text" name="txtPeople" id="txtPeople" value="" size="20" class="textfield" tabindex="22" id="field_8_3" />
</td>
</tr>
<tr>
<td align="center">
language</span>
</td>
<td>
<SELECT name="cboLanguage" id="cboLanguage" size="1">
<OPTION>VF
<OPTION>VO
<OPTION>VOST
</SELECT>
</td>
</tr>
<tr>
<td align="center">
Genre
</td>
<td>
<!--
<SELECT name="cboGenre" id="cboGenre" size="1">
<OPTION>COMEDIE
<OPTION>DRAMES
<OPTION>HORREUR
<OPTION>ACTION
<OPTION>HISTOIRE
<OPTION>AMOUR
<OPTION>ANIMATION
</SELECT>
-->
<input type="checkbox" name="rbtnGenre" value="COMEDIE " />COMEDIE
<input type="checkbox" name="rbtnGenre" value="DRAMES " />DRAMES
<input type="checkbox" name="rbtnGenre" value="HORREUR " />HORREUR
<input type="checkbox" name="rbtnGenre" value="ACTION " />ACTION
<input type="checkbox" name="rbtnGenre" value="HISTOIRE " />HISTOIRE
<input type="checkbox" name="rbtnGenre" value="ANIMATION " />ANIMATION
<input type="checkbox" name="rbtnGenre" value="DOCUMENTAIRE " />DOCUMENTAIRE
<input type="checkbox" name="rbtnGenre" value="POLICIER " />POLICIER
<input type="checkbox" name="rbtnGenre" value="SPORTS " />SPORTS
<input type="checkbox" name="rbtnGenre" value="MUSIQUE " />MUSIQUE
</td>
</tr>
<tr>
<td align="center">
Qualité
</td>
<td>
<input type="checkbox" name="rbtnQual" value="HD" />HD
<input type="checkbox" name="rbtnQual" value="Tres bonne " />Tres bonne
<input type="checkbox" name="rbtnQual" value="Bonne " />Bonne
<input type="checkbox" name="rbtnQual" value="Moyenne " />Moyenne
<input type="checkbox" name="rbtnQual" value="Mauvaise " />Mauvaise
</td>
</tr>
</tbody></table><br /><br />
<p><h3><input type="submit" value="Envoyer le film" class="pane-list" name="inserer"/></p></h3><br>
<br>
<p><input type="submit" value="Modifier le film" name="modifier"></p>
<p><input type="submit" value="Supprimer le film" name="supprimeer"></p>
</form>
</div>
</div>
</div> |
Partager