************************************** 0) { $error='An error has occurred. the music could not be found or has been removed'; $proceed = false; } else { $result = @mysql_fetch_array($query); $music_title=$result["mus_title"]; $m_id=$result["m_id"]; $music_type=$result["mus_type"]; $music_category=$result["mus_category"]; $music_no_of_views=$result["mus_no_of_views"]; $music_tags=$result["mus_tags"]; $music_length=$result["mus_length"]; $music_date=$result["mus_date"]; $music_play = $result["mus_music"]; $music_id = $result["mus_id"]; $music_desc=$result["mus_desc"]; $music_votes=$result["mus_rating_no_votes"]; $music_language=$result["mus_language"]; $music_country=$result["mus_country"]; $music_no_of_views_yearly = $result["mus_no_of_views_yearly"]; $music_no_of_views_weekly = $result["mus_no_of_views_weekly"]; $music_owner_id=$result["m_id"]; $music_owner=$result["m_name"]; $url=WEB_ROOT.'play.php?mid='.base64_encode($mid);//send to friend url $music_und18=$result["mus_und_18"]; //get members personal information $today =strtotime(date('Y-m-d')); $today += 24 * 60 * 60 * 15; // add 15 days $after15days = date("Y-m-d", $today); $today=date('Y-m-d'); /// $sql22 = "SELECT sponser_id FROM tbl_publicity WHERE user_id=$music_owner_id and pub_status='active' AND pub_date <='$after15days'"; //echo $sql22; $result22 = dbQuery($sql22); if(mysql_num_rows($result22) == 0) { $sponsorlogo=default_img; } else { $row22 = @mysql_fetch_array($result22); $music_sponsor_id=$row22["sponser_id"]; $sql11 = "SELECT m_logo FROM tbl_member WHERE m_id = $music_sponsor_id"; $query11 = @mysql_query($sql11); @$result11 = @mysql_fetch_array($query11); $member_logo = $result11["m_logo"]; if($member_logo ==) { $sponsorlogo='usarylogo.jpg'; } else { $sponsorlogo=$member_logo; } } //resize logo for dispaly in on player if (!file_exists("./logo/tmp")) mkdir('./logo/tmp'); if (file_exists(SRV_ROOT."logo/tmp/".$sponsorlogo)) unlink(SRV_ROOT."logo/tmp/".$sponsorlogo); $handle = new Upload('./logo/'.$sponsorlogo); // then we check if the file has been "uploaded" properly // in our case, it means if the file is present on the local file system if ($handle->uploaded) { // now, we start a serie of processes, with different parameters // we use a little function TestProcess() to avoid repeting the same code too many times function TestProcess(&$handle) { $handle->Process('./logo/tmp/'); if ($handle->processed) { $sponsorlogo=$handle->file_dst_name; } } $handle->file_overwrite = true; $handle->image_resize = true; $handle->image_ratio_fill = true; $handle->image_y = 147; $handle->image_x = 300; TestProcess($handle); } /// //echo $member_logo.$music_sponsor_id; //update video counter $referer1 =; $referer1 = mysql_real_escape_string(@$_SERVER['HTTP_REFERER']); if((substr_count($referer1, 'play.php')==0) && ($referer1!=)) { $music_no_of_views = $music_no_of_views + 1; $music_no_of_views_yearly = $music_no_of_views_yearly + 1; $music_no_of_views_weekly = $music_no_of_views_weekly + 1; $vv=; $vvcount=0; $vv=$result["mus_visitors"]; $vistor=explode(',',$vv); $vvcount=count($vistor); if(isset($_SESSION["user_id"])) { $user=$_SESSION["user_id"]; if(!in_array($user,$vistor)) { if($vv==) { $vv=$user; } else { $vv=$vv.','.$user; } } } /*$sql = "UPDATE tbl_music SET mus_no_of_views = $music_no_of_views, mus_visitors='$vv',mus_visitors_count=$vvcount WHERE mus_id = $mid"; */ $sql = "UPDATE tbl_music SET mus_no_of_views = $music_no_of_views, mus_no_of_views_yearly =$music_no_of_views_yearly,mus_no_of_views_weekly=$music_no_of_views_weekly, mus_visitors='$vv', mus_visitors_count=$vvcount WHERE mus_id = $mid"; $query = @mysql_query($sql); } //get channel name //$sql = "SELECT * FROM channels WHERE channel_id = $channel"; //$query = @mysql_query($sql); //@$result = @mysql_fetch_array($query); //$channel_name = $result["channel_name"]; //get music rating stars $stars_array = stars_array($mid);//call the stars function (results returned as array) $star1 = $stars_array[1]; $star2 = $stars_array[2]; $star3 = $stars_array[3]; $star4 = $stars_array[4]; $star5 = $stars_array[5]; } } ?> Add to favouritesAdd to favorites Send to friendSend to friend Open in small windowOpen in small window * The File is not suitable for under-18s.