Re: [contact] ajout paramètres

On vient depuis le fiche.php :


Code PHP :
Pour copier le contenu exact du code,
Veuillez citer le message
  1. <?php
  2.  
  3.  
  4. if (!(defined('__KWS__'))) {die ('Erreur d\'appel de fichier.');}
  5.  
  6.  
  7. echo '<head>
  8. <script type="text/javascript" src="modules/ads/js/prototype.js"></script>
  9. <script type="text/javascript" src="modules/ads/js/scriptaculous.js?load=effects,builder"></script>
  10. <script type="text/javascript" src="modules/ads/js/lightbox.js"></script>
  11. <link rel="stylesheet" href="modules/ads/js/lightbox.css" type="text/css" media="screen" />
  12. </head>';
  13.  
  14.  
  15.  
  16. if (get_grade() >= GRD_VISIT)
  17.     {
  18.          if ($int_fiche !='')
  19.          {
  20.           $id = $int_fiche;
  21.          }
  22.          else
  23.          {
  24.           $id = $_GET['int_id'];
  25.          }
  26.      
  27.     $req1 = reqmysql("SELECT * FROM `ads_annonce` WHERE `id`='".$id."' ;");
  28.     if(mysql_num_rows($req1) > 0) {
  29.         $row1 = mysql_fetch_array($req1);
  30.         
  31.             $req2 = reqmysql("SELECT * FROM `ads_membre` WHERE `pseudo`='".$row1['pseudo']."' ;");
  32.     if(mysql_num_rows($req2) > 0) {
  33.         $row2 = mysql_fetch_array($req2);
  34.         
  35.             $req3 = reqmysql("SELECT `avatar` FROM `users` WHERE `id`='".$row2['avatar']."' ;");
  36.     if(mysql_num_rows($req3) > 0) {
  37.         $row3 = mysql_fetch_array($req3);
  38.  
  39.     $req4 = reqmysql("SELECT `id` FROM `ads_genre` WHERE `cat`='".$row1['cat']."' ;");
  40.     if(mysql_num_rows($req4) > 0)
  41.         $row4 = mysql_fetch_array($req4);
  42.         
  43. if ($K_user->pseudo != $row1['pseudo'])
  44. {
  45. reqmysql('UPDATE `ads_annonce` SET `vue` =vue+1 WHERE `id`="'.$row1['id'].'" ;');
  46. }
  47.  
  48. bloc_head('Annonce : '.ax($row1['annonce']).'');
  49.  
  50. echo '<img src="modules/ads/images/puce.png" alt="puce" />  <a href="index.php?mod=ads&ac=page&int_id='.ax($row4['id']).'&int_scat='.ax($row1['soucat']).'&sql_classe=0">Précédent</a>';
  51. echo '<table>
  52. <tr>
  53. <td colspan=2 height=80>
  54. <center><span style="font-size:20px;font-weight:bold;color:#733674;">Titre de l\'annonce : '.ax($row1['annonce']).'</span></center>
  55. </td>
  56. </tr>
  57. <tr>
  58. <td height=300 width=360 valign=top>
  59. <fieldset style="width:295px;height:355px"><span style="font-size:14px;font-weight:bold;color:#000000;">Vendeur :</span>
  60. <br /><br /><table><tr><td><img src="'.$row3['avatar'].'" alt="Avatar" /></td><td><span style="font-size:14px;font-weight:bold;color:#000000;">   '.ax($row1['pseudo']).'</span></td></tr></table>
  61. <br />
  62. <ul style="font-size:11px;font-weight:bold;color:#733674;">
  63. <li>Inscrit le :'.ax(Kws_date('d/m/y',$row1['date'])).'</li>
  64. <li>Annonces émises : '.$row2['nbr_annonce'].'</li>';
  65. $noteVendeur =''.$row2['note'].' / 10'; 
  66. echo '<li>Note pour ce vendeur : '.$noteVendeur.'</li>
  67. </ul><br />';
  68.  
  69.  
  70. $note = ax($row2['note']);
  71.  
  72. if ($note <= 2)
  73. {
  74.   $etoile="0";
  75. }
  76. if ($note > 2 and $note <= 4)
  77. { 
  78.   $etoile="1"; 
  79. }
  80. if ($note > 4 and $note <= 5)
  81. {
  82.   $etoile="2";
  83. }
  84. if ($note > 5 and $note <= 7)
  85. { 
  86.   $etoile="3"; 
  87. }
  88. if ($note > 7 and $note <= 9)
  89. {
  90.   $etoile="4";
  91. }
  92. if ($note  > 9)
  93. { 
  94.   $etoile="5"; 
  95. }
  96. $reg_note = number_format($note, 1, ',', ' ');
  97.                if ($note=='0')
  98.                {
  99.                echo '
  100.  
  101.                <img src="modules/ads/images/puce.png" /> <b>Pas encore de vote!</b><br />
  102.                ';
  103.                }
  104.                else
  105.                {
  106.                echo '
  107.                <center><img src="modules/ads/images/'.ax($etoile).'.png?'.time().'" alt="Note : '.$noteVendeur.' title="Note : '.$noteVendeur.'"/></center><br />
  108.                ';
  109.                }
  110.  
  111. echo '<form action="index.php?mod=ads&ac=vote&int_id='.$row1['id'].'&sql_avote='.ax($row1['pseudo']).'" method="post" enctype="multipart/form-data" style="margin:0px;">
  112.   Voter : <select name="int_vote" onchange=this.form.submit()>
  113.                        <option value="" >Je vote!  </option>
  114.                        <option value="1">1  </option>
  115.                        <option value="2">2  </option>
  116.                        <option value="3">3  </option>
  117.                        <option value="4">4  </option>
  118.                        <option value="5">5  </option>
  119.                        <option value="6">6  </option>
  120.                        <option value="7">7  </option>
  121.                        <option value="8">8   </option>
  122.                        <option value="9">9  </option>
  123.                        <option value="10">10  </option>
  124.   </select>
  125. <noscript><div style="text-align:center;"><input type="submit" value="Changer la description" /></div></noscript>
  126. </form>
  127. <br />';
  128. //<a href="index.php?mod=ads&ac=annonce&sql_pseudo='.ax($row2['pseudo']).'"><span style="font-size:11px;font-weight:bold;color:#733674;">Voir toutes ses annonces</span></a>
  129. echo'</td>
  130. <td height=300 width=360 valign=top>
  131. <fieldset style="width:295px;height:355px"><span style="font-size:14px;font-weight:bold;color:#000000;">Description de l\'annonce :</span>
  132. <br /><br /><div style="height:200px;padding:0px 30px;overflow: auto;">'.ax($row1['description']).'</div>
  133. <span style="font-size:14px;font-weight:bold;color:#000000;">Contacter le vendeur :</span><ul style="font-size:14px;font-weight:bold;color:#733674;">';
  134.  
  135.  
  136. if (get_grade() < GRD_MEMBR)
  137.  {
  138.   if (ax($row1['contact'])== "mail" OR ax($row1['contact'])== "mailmp")
  139.     {
  140.     echo '<li><a href="index.php?mod=ads&ac=mail&sql_mailto='.$row2['pseudo'].'&int_obj='.$row1['id'].'"><span style="font-size:13px;font-weight:bold;color:#000000;">Par mail</span></a></li>';
  141.     }
  142.    Else
  143.     { 
  144.     echo '<span style="font-size:13px;font-weight:bold;color:#000000;">Réservé aux membres!</span>';
  145.     }
  146.  } 
  147. Else
  148.   {
  149.     if (ax($row1['contact'])== "mail" OR ax($row1['contact'])== "mailmp")
  150.     {
  151.     echo '<li><a href="index.php?mod=ads&ac=mail&sql_mailto='.$row2['pseudo'].'&int_obj='.$row1['id'].'"><span style="font-size:13px;font-weight:bold;color:#000000;">Par mail</span></a></li>';
  152.     }
  153.     if (ax($row1['contact'])== "mp" OR ax($row1['contact'])== "mailmp")
  154.     {
  155.         echo '<li><a href="index.php?mod=espace_membre&ac=message&id='.ax($row2['avatar']).'"><span style="font-size:13px;font-weight:bold;color:#000000;">Par MP</span></a></li>';
  156.     }
  157.   }
  158. echo '</ul></fieldset>
  159. </td>
  160. </tr>
  161. <tr>
  162. <td width=310>
  163. <fieldset style="width:245px;height:72px;">
  164.  
  165. <ul style="font-size:11px;font-weight:bold;color:#733674;">
  166. <li>Déposée le : '.Kws_date('d/m/y',$row1['date']).'
  167. <li>Lieu : '.ax($row1['lieu']).'</li>
  168. <li>Prix : '.ax($row1['prix']).' CHF</li>
  169. <li>Annonce vue : '.$row1['vue'].' fois</li>
  170. </fieldset>
  171. </td>
  172.  
  173. <td width=310 height=80>
  174. <fieldset style="width:245px;height:72px;text-align:center;"><br /><br />';
  175.  
  176. if ($row1['image'] !='')
  177. {
  178. echo '<a href="modules/ads/annonce/'.$row1['image'].'" rel="lightbox" title="'.stripslashes($row1['titre']).'"><span style="font-size:11px;font-weight:bold;color:#733674;">Pour voir le produit <br />Cliquer ici</span></a>';
  179. }
  180. else
  181. {
  182. echo '<center><b>Pas d\'image pour cette annonce</b></center>';
  183. }
  184. echo '</fieldset>
  185. </td>
  186. </tr>
  187.  
  188. </table>';
  189.  
  190. }
  191. }
  192.     }
  193.     }
  194. close_table();
  195. ?>


Sujet écrit par ricky le vendredi 1er février 2013 à 14:35

[ Imprimer ] - [ Fermer la fenêtre ]