~daker/+junk/SCP

« back to all changes in this revision

Viewing changes to backoffice/tpl/edit_dtpole.php

  • Committer: Adnane Belmadiaf
  • Date: 2011-02-25 18:05:22 UTC
  • Revision ID: daker@ubuntu.com-20110225180522-o05q6vtol0h5trhf
* Second commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
    <td style="padding-top: 5px;" width="86%" valign="top">
2
 
    <?php
3
 
        if(!empty($_POST['titre'])) {
4
 
        $classe = 'msg_ok';
5
 
        $msg = array();
6
 
        $titre = addslashes($_POST['titre']);
7
 
        $id = @$_POST['id'];
8
 
 
9
 
        $sql = "UPDATE `pole` SET  `titre` = '".$titre."' where id= ".$id.";";
10
 
        
11
 
        if(mysql_query($sql))
12
 
            array_push($msg,'P�le �dit� avec succ�s.');
13
 
            else
14
 
            array_push($msg,'Echec de mise � jour. (Erreur MySQL) ');
15
 
        
16
 
        affiche_msg($msg,$classe);
17
 
        }
18
 
        ?>
19
 
        <div class="setting_title">Editer un p�le</div>
20
 
        <div id="Container">
21
 
        <?php
22
 
            if(isset($_GET['Id']))
23
 
            {
24
 
            $id = intval($_GET['Id']);
25
 
            $rqtPart=mysql_query("SELECT * FROM `pole` WHERE `id`=$id") or die(mysql_error());
26
 
            $rowrqtPart=mysql_fetch_array($rqtPart);
27
 
        ?>
28
 
            <form action="" method="post" enctype="multipart/form-data">
29
 
                <table width="780" border="0" cellpadding="3" cellspacing="2">
30
 
                    <tbody>
31
 
                        <tr>
32
 
                            <td width="100">Titre :</td>
33
 
                            <td><input type="hidden" name="id" value="<?php echo $rowrqtPart['id'];?>"><input type="text" name="titre" value="<?php echo stripslashes($rowrqtPart['titre']);?>" size="35"></td>
34
 
                        </tr>
35
 
                    
36
 
                    </tbody>
37
 
                </table>
38
 
                <input type="submit" name="Valider" value="Valider">&nbsp;<input type="reset" name="Annuler" value="Annuler">
39
 
            </form>
40
 
            <?php
41
 
}
42
 
else
43
 
echo "Id invalide";
44
 
?>
45
 
        </div>
46
 
    </td>
 
 
b'\\ No newline at end of file'