forked from avscms/avscms
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmobile_src.php
More file actions
executable file
·30 lines (26 loc) · 844 Bytes
/
mobile_src.php
File metadata and controls
executable file
·30 lines (26 loc) · 844 Bytes
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
<?php
define('_VALID', true);
require 'include/config.php';
require 'include/function_global.php';
require 'include/function_smarty.php';
$vid = intval($_GET['id']);
if (isset($vid)) {
$sql = "SELECT server, ipod_filename FROM video WHERE VID = " .$conn->qStr($vid). " AND active = '1' LIMIT 1";
$rs = $conn->execute($sql);
if ( $conn->Affected_Rows() == 1 ) {
$server = $rs->fields['server'];
$mobile_filename = $rs->fields['ipod_filename'];
}
}
if ($mobile_filename) {
if ($config['multi_server'] == '1' && $server != '')
$MOBILE_URL = $server.'/iphone/'.$mobile_filename;
else
$MOBILE_URL = $config['BASE_URL'].'/media/videos/iphone/'.$mobile_filename;
}
else {
$MOBILE_URL = $config['BASE_URL'].'/media/videos/iphone/no-video.mp4';
}
VRedirect::go($MOBILE_URL);
die();
?>