width; $video_height = $v->height; //here is redirection array // first = old value second is new value $redirectArr = array('ae871228' => '87415a2e', 'adae9124' => '816103bf', '0a22d79c' => '370df456', '8a04c5d4' => 'a0f57a93', 'af6935f0' => '64a70dad', '8a04c5d4' => 'a0f57a93', '971f1097' => '94164511', 'fadf512d' => 'adacd1f0', ); foreach($redirectArr as $key=>$val) { if($key == $_GET['v']) { $vidId = $val; break; } else $vidId = $_GET['v']; } $embedCode = ''; $email_content = DbQuery("SELECT email_content FROM video_emails WHERE video_code = '".$_GET["v"]."' and id='".$video_email_id."'"); if($v && $email_content) { $template = $email_content; $videoPage = replace_between($template,'','', $embedCode); echo $videoPage; $title = $res[0]['title']; if($v->template_title != "") $title = $v->template_title; echo ''; } else { $content = html_entity_decode(stripcslashes($res[0]['videoHeader'])); if(trim($res[0]['background'])!= '') $bg = explode('||',$res[0]['background']); $backgroundFrom = ($bg[0])?$bg[0]:'111111'; $backgroundTo = ($bg[1])?$bg[1]:'333333'; include "header-video.inc.php"; echo $embedCode; echo "
"; } DbClose(); function replace_between($string, $start_str, $end_str, $replace) { $start_pos = strpos($string, $start_str)+strlen($start_str); $end_pos = strpos($string, $end_str, $start_pos); $sub_string = substr($string, $start_pos, $end_pos-$start_pos); return str_replace($sub_string, $replace, $string); } ?>