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
| 1. <?
2. if(trim($r["youtube_link"])!='')
3. {
4. echo '<div style="float:left;margin-top:5px;">
5. <object width="490" height="325">
6. <param name="movie" value="'.$r['youtube_link'].'"></param>
7. <param name="allowFullScreen" value="true"></param>
8. <param name="allowscriptaccess" value="always"></param>
9. <param name="wmode" value="transparent" /></param>
10. <embed src="'.$r['youtube_link'].'" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" allowfullscreen="true" width="490" height="325"></embed>
11. </object>
12. </div>';
13. }
14. else
15. {
16. $tab_photos=array();
17. for($i=1;$i<=1;$i++)
18. {
19. $path_img2 = 'photos/'.$r["id"].'_'.$i.'.jpg';
20. if(file_exists($path_img2))
21. {
22. $tab_photos[]=array($i,$id_resto,$path_img2);
23. }
24. }
25. $cpt=1;
26. foreach($tab_photos as $val)
27. {
28. echo '<div style="float:left;margin-top:5px;width:490px;background-image:url(fondhaut.jpg); background-repeat:repeat-x;">
29. <center><img src="'.$val[2].'" width="300" height="325"/></center>
30. </div>';
31. }
32. }
33. else
34. {
35. echo'<div style="float:left;width:540px;height:75px;margin:12px 5px 0px 15px;">non disponible</div>';
36. }
37. ?> |
Partager