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
|
<? include("top.php"); ?>
<!-- start site main content --> <section id="mainContent" style='margin-top: 70px;'> <? include("scrollnews.php"); ?>
<!-- start main content bottom --> <div class="content_bottom"> <div class="col-lg-8 col-md-8"> <!-- start content bottom left --> <div class="content_bottom_left">
<!-- start business category ALTRE NOTIZIE 2 --> <div class="single_category "> <div class="archive_style_1"> <h2> <span class="bold_line"><span></span></span> <span class="solid_line"></span> <span class="title_text" href="#"> GALLERIA VIDEO </h2> </div> <? include("admin/setConn.php"); $special = new class_utility();
$namedb = "Sql603025_1"; //PAGINE $result = mysql_db_query($namedb, $sql, $db); $count = mysql_query("SELECT COUNT(ID) FROM galleriavideo"); $res_count = mysql_fetch_row($count); $tot_records = $res_count[0]; $per_page = 20; $tot_pages = ceil($tot_records / $per_page); $current_page = (!$_GET['page']) ? 1 : (int)$_GET['page']; $primo = ($current_page - 1) * $per_page; //FINE PAGINE
if ($db == FALSE) die ("Errore nella connessione."); $sql = "SELECT * FROM galleriavideo ORDER BY Data_e_ora DESC, ID DESC LIMIT $primo, $per_page"; $result = mysql_db_query($namedb, $sql, $db); $i=1; $p=1;
while($results = mysql_fetch_array($result)){ $ID = $results["ID"]; $titolo = $special->specialChars($results["titolo"]); $url = $results["url"]; $descrizione = $special->specialChars($results["descrizione"]); $urlimage = $results["URLimg"]; $IDvideo = estraiCodice($url); # call youtube api function $youtube = youtube("https://www.youtube.com/watch?v=".$IDvideo.""); # title $youtube->title; # duration in seconds #video description $youtube->description; # thumbnail url High Quality $youtube->thumbnail->hqDefault; # thumbnail url Small Quality $youtube->thumbnail->sqDefault; # video rating out of five $youtube->rating; # total likes $youtube->likeCount; # video category $youtube->category; # total view $youtube->viewCount; # time upload time $youtube->uploaded;
$thumb = $youtube->thumbnail->hqDefault; if($i==1){ echo "<div class='business_category_left '><ul class='small_catgNohr'>"; } if($i==2) { echo "<div class='business_category_right '><ul class='small_catgNohr'>"; } echo "<li>"; echo "<div class='media '>"; echo " <a class='media-left' href='video.php?ID=".$ID."'>"; $verifica= strstr ($thumb, 'hqdefault'); if($verifica){ echo " <img src='".$thumb."' alt='Le video notizie di Euroroma'>"; }else{ echo " <img src='".$urlimage."' alt='Le video notizie di Euroroma'>"; } echo " </a>"; echo " <div class='media-body'>"; echo " <h4 class='media-heading'><a href='video.php?ID=".$ID."'>".$titolo."</a></h4> "; echo " <div class='comments_box'>"; echo " <span class='meta_more'><a href='video.php?ID=".$ID."'>Guarda il video...</a></span>"; echo " <span class='glyphicon glyphicon-facetime-video' aria-hidden='true'></span>"; echo " </div>"; echo " </div>"; echo "</div>"; echo "</li>"; echo "</ul></div>"; if($i==2) { $i=0; echo "<div class='row'<span class='title_text2' href='#'></span></div>"; if($p==3){ echo "<br><a href='http://www.emporioantonelli.it' target='_blank'><img src='images/bannerEmporioAntonelli.jpg' width='100%' class='img-responsive'></a><br>"; } if($p==6){ echo "<br><script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script><!-- Responsive orizzontale 1 --><ins class='adsbygoogle'style='display:block' data-ad-client='ca-pub-5549117216645456' data-ad-slot='5436023121' data-ad-format='auto'></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script><br>"; } if($p==9){ echo "<br><script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script><!-- Responsive orizzontale 1 --><ins class='adsbygoogle'style='display:block' data-ad-client='ca-pub-5549117216645456' data-ad-slot='5436023121' data-ad-format='auto'></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script><br>"; } $p++; } $i++; }
mysql_close($db);
include("admin/paginazionevideo.php"); // in questa cella inseriamo la paginazione print "<table width='95%' height='20' border='0' cellpadding='0' cellspacing='0' class='articoli'>"; print " <tr>\n <td height=\"30\" valign=\"center\" align=\"center\" class=\"pagine\">$paginazione</td>\n"; print " </tr>\n</table>"; ?>
</div> <!-- End business category --> </div><!--End content_bottom_left--> </div> <? include("menudx.php");?> </div><!-- end main content bottom --> </section><!-- End site main content --> </div> <!-- /.container --> <? include("foot.php");?>
|