<?php echo getArt($conc, $arg, $s1, $s2); ?> </div> <div class="title"> Music</div> <div id="box" class="playlist" > <ul id="plid"> <?php echo getMusic($conc, $arg, $s1, $s2); ?> </ul> </div> <div class="title"> Videos</div> <div id="box" class="playlist" > <ul> <?php echo getVid($conc, $arg, $s1, $s2); $con->close_db_con($conc); ?> </ul> </div> </div></div></td></tr></table> </div> <input type="hidden" value="document.title= 'Muzik Kitchen | Search `<?php echo $arg; ?> `';processVars();" id="eval_script" />
$q = mysqli_query($conc, "SELECT videos.id,videos.user,videos.name,videos.info,videos.pict,videos.vid,videos.dl,videos.date,users.user FROM `videos` INNER JOIN users ON users.id = videos.user WHERE videos.user = {$uid} "); if (mysqli_num_rows($q) == 0) { echo "<div class='m_s_g'>No content has been added yet</div>"; } $n = 0; echo "<table><tr>"; while ($r = mysqli_fetch_array($q)) { $n++; echo "<td ><a href='./video-{$r['0']}' onclick='return setURI(\"video\",{$r['0']})' ><div style='background:url(" . PTH . "/img/load/ml.gif) no-repeat center;height:120px;width:120px;padding:10px;'><div style='background:url(" . PTH . "/prev/{$r['4']}) left;' class='vid_prev' title='{$r['3']}' onclick='playvideo(event)' prev='{$r['4']}' vid='{$r['0']}' video='{$r['5']}' info='{$r['3']}' owner='{$r['8']}' uid='{$uid}' vidname='{$r['2']}' vdate='" . gtime($r[7]) . "'>{$r['2']}<br/>{$r['3']}</div></div></a><br/></td>"; echo $n % 4 == 0 ? "</tr><tr>" : ""; } echo "</tr></table>"; $con->close_db_con($conc); exit; } switch ($type) { case 0: getArt($uuid); break; case 1: getMusic($uuid); break; case 2: getVid($uuid); break; default: $con->close_db_con($conc); exit("<div class='m_s_g'>Invalid argument</div>"); break; } $con->close_db_con($conc);
} function getMusic($con, $uid) { $q = mysqli_query($con, "SELECT * FROM `music` WHERE user = {$uid}"); if (mysqli_num_rows($q) == 0) { echo "<div class='m_s_g'>No content has been added yet</div>"; } while ($r = mysqli_fetch_array($q)) { echo "<a href='#' class='media_p' type='music' onclick='media_post(event,1)' title='{$r['3']}' tid='{$r['0']}'>{$r['2']}</a><br/>"; } } function getVid($con, $uid) { $q = mysqli_query($con, "SELECT * FROM `videos`WHERE user = {$uid} "); if (mysqli_num_rows($q) == 0) { echo "<div class='m_s_g'>No content has been added yet</div>"; } while ($r = mysqli_fetch_array($q)) { echo "<a href='#' class='media_p' type='video' onclick='media_post(event,1)' title='{$r['3']}' tid='{$r['0']}'>{$r['2']}</a><br/>"; } } $con = new db(); $conc = $con->c(); echo "<div style='height:200px;overflow-y:scroll;'><B>Your Art</b><hr/>"; getArt($conc, $uid); echo "<b>Your Music</b><hr/>"; getMusic($conc, $uid); echo "<b>Your Videos</b><hr/>"; getVid($conc, $uid); echo "</div>"; $con->close_db_con($conc);
$token = $part[1]; // sprintf("") MwXRTAsbJLnb0PbJ8uJxAdSivUU11wnKXxc= $whole = sprintf("{%s}_{%s}_{%s}", $sid, $vid, $token); // byte[] newbytes = System.Text.ASCIIEncoding.ASCII.GetBytes(whole); echo $new_ep = myEncoder($template2, base64_decode($whole), true); return [$new_ep, $sid, $token]; } function getVid($url) { // $strRegex = '/(?<=id_)(\w+)/'; $strRegex = '/(?<=id_)\\w+/'; preg_match($strRegex, $url, $matcher); // print_r($matcher); return $matcher[0]; } $vid = getVid("http://v.youku.com/v_show/id_XNzk2NTI0MzMy.html"); // echo if (DEBUG && is_file("av.info.txt")) { echo 'read file', PHP_EOL; $get_data_1 = file_get_contents("av.info.txt"); $get_data = json_decode($get_data_1, 1); // print_r($get_data ); // echo $get_data_1; $get_data_1 = ''; } else { echo 'http request'; $get_data_1 = file_get_contents("http://v.youku.com/player/getPlayList/VideoIDS/{$vid}/Pf/4/ctype/12/ev/1"); file_put_contents("av.info.txt", $get_data_1); } // echo $ep = $get_data['data'][0]['ep'];
{ $con = new db(); $conc = $con->c(); $q = mysqli_query($conc, "SELECT videos.id,videos.user,videos.name,videos.info,videos.pict,videos.vid,videos.dl,videos.date,users.user FROM `videos` INNER JOIN users ON users.id = videos.user WHERE videos.id = {$id} "); if (mysqli_num_rows($q) == 0) { echo "({status:false,msg:'Sorry, this video cannot be found'})"; //echo "<div class='m_s_g'>Sorry, this video cannot be found.</div>"; } else { $n = 0; $r = mysqli_fetch_array($q); echo "({status:true,type:3,class:'vid_prev',title:'{$r['3']}',uid:'{$r['1']}',owner:'{$r['8']}',vid:'{$r['0']}',video:'{$r['5']}',prev:'{$r['4']}',vname:'{$r['2']}',vdate:'" . gtime($r[7]) . "'})"; //echo"<table><tr>"; //echo "<a href='#!/video=$r[0]'><div style='background:url(".PTH."/img/load/ml.gif) no-repeat center;' ><div vid='$r[0]' style='background:url(".PTH."/prev/$r[4]) no-repeat center;' class='vid_prev' title='$r[3]' onclick='playvideo(event);$(\"#pwindow\").fadeOut(500);' prev='$r[4]' video='$r[5]' info='$r[3]' vidname='$r[2]' vdate='".gtime($r[7])."' owner='$r[8]' uid='$r[1]'>$r[2]<br/>$r[3]</div></div></a>"; } $con->close_db_con($conc); exit; } switch ($type) { case 0: getArt($id); break; case 1: getMusic($id); break; case 2: getVid($id); break; default: exit("({status:false,msg:'Invalid arguments'})"); break; }
function getVid($con, $s, $s1, $s2) { $q = mysqli_query($con, "SELECT videos.id,videos.user,videos.name,videos.info,videos.pict,videos.vid,videos.dl,videos.date,users.user FROM `videos` INNER JOIN users ON users.id = videos.user WHERE videos.name LIKE '%{$s}%' OR videos.info LIKE '%{$s}%' LIMIT 0 , 10 "); $ans = ""; if (mysqli_num_rows($q) == 0) { return ""; } while ($r = mysqli_fetch_array($q)) { $name = str_replace($s, "<_>" . $s . "</_>", $r[2]); $ans .= "<a href='./video-{$r['0']}' onclick='return setURI(\"video\",{$r['0']})'><li class='vid_item' vid='{$r['0']}' title='{$r['3']}' onclick='playvideo(event)' prev='{$r['4']}' video='{$r['5']}' info='{$r['3']}' vidname='{$r['2']}' vdate='" . gtime($r[7]) . "' owner='{$r['8']}' style='width:220px;' uid='{$r['1']}'>{$name}</li></a>"; } return $ans; } $result .= !isset($mobi) ? "<ul>" . getArt($conc, $arg, $s1, $s2) . "</ul>" : ""; $result .= !isset($mobi) ? "<ul>" . getMusic($conc, $arg, $s1, $s2) . "</ul>" : ""; $result .= !isset($mobi) ? "<ul>" . getVid($conc, $arg, $s1, $s2) . "</ul>" : ""; $result = str_replace("<_>", "<b class='j'>", $result); $result = str_replace("</_>", "</b>", $result); echo $result . "</div>"; $con->close_db_con($conc); } ?> <a href="#!/trend=<?php echo $arg; ?> " id="no_no" onclick="return _st(event,'<?php echo $arg; ?> ');" style="font-size:small;background:url("<?php echo PTH; ?>