I have added couple new tables to the database to for advertising. The database is all set up and working properly, but I am looking for a way I can add that data to my site. How can I do this? For example, I tried modifing class.video_player.php and I tried to add the new variables to the tpl files but it does not work. Is there an easy way to do this?
class video_player {
var $video_name;
var $server_id;
var $flvideo;
var $video_id;
var $video_info;
var $sponsor_name;
var $linking_code;
var $xml_link;
var $banner_1;
var $banner_2;
var $banner_3;
var $ADV_result;
function get_player_code($video_id) {
global $config;
$sql = "SELECT * FROM `video` WHERE `VID`=$video_id";
$result = mysql_query($sql) or mysql_die($sql);
if (mysql_num_rows($result) == 0) {
return 'video not found';
}
$video_info = mysql_fetch_assoc($result);
$this->video_info = $video_info;
$vtype = $video_info['vtype'];
$this->video_name = $video_info['vdoname'];
$this->server_id = $video_info['server_id'];
$this->flvideo = $video_info['flvdoname'];
$this->video_id = $video_info['VID'];
$video_UID = $video_info['UID'];
$sql_ADV = "SELECT * FROM `signup`, `_SPONSOR` WHERE signup.ADVERT=_SPONSOR.sponsor_id AND signup.UID=$video_UID";
$result_ADV = mysql_query($sql_ADV) or mysql_die($sql_ADV);
$ADV_result = mysql_fetch_assoc($result_ADV);
$sponsor_name = $ADV_result['sponsor_name'];
$linking_code = $ADV_result['linking_code'];
$xml_link = $ADV_result['xml_link'];
$banner_1 = $ADV_result['banner_1'];
$banner_2 = $ADV_result['banner_2'];
$banner_3 = $ADV_result['banner_3'];
switch ($vtype) {
case 0:
return $this->vshare_player();
break;
case 1:
return $this->youtube();
break;
case 2:
return $this->flv_url();
break;
Bookmarks