Ver videos

[insert_php]
$conn = mysqli_connect(‘localhost’, ‘ismet_gestion’, ‘I5m3tG3s/*-‘,’crmdata’);
$sql = «SELECT descripcio FROM videos WHERE video_id = «.$_GET[«idv»];
$res = mysqli_query($conn,$sql);
$titol = mysqli_fetch_assoc($res);
$sql = «SELECT visionats_id FROM video_visionats WHERE e_mail = ‘».$_GET[«ev»].»‘ AND video_id = «.$_GET[«idv»];
$res = mysqli_query($conn,$sql);
if ($row = mysqli_fetch_assoc($res))
{
$sql2 = «SELECT fitxer_video, ample_video, alt_video, aspect_ratio FROM videos WHERE video_id = «.$_GET[«idv»];
$res2 = mysqli_query($conn,$sql2);
if ($row2 = mysqli_fetch_assoc($res2))
{
$sql3 = «UPDATE video_visionats SET visionats = visionats + 1 WHERE visionats_id = «.$row[«visionats_id»];
mysqli_query($conn, $sql3);
echo ‘

‘.$titol[«descripcio»].’

‘;
$videos = explode(‘@@’, $row2[«fitxer_video»]);
for ($i=1;$i<=$videos[0];$i++) { if ($videos[0] <> 1)
{
echo ‘

Parte ‘.$i.’

‘;
}
echo ‘‘;
/*echo ‘[evp_embed_video url=»‘.$videos[$i].'» width=»‘.$row2[«ample_video»].'» class=»functional» ratio=»‘.$row2[«aspect_ratio»].'»]’;*/
echo »;
}
echo ‘


‘;
}
}
mysqli_close($conn);
[/insert_php]