Jump to content

ThunderLee

Members
  • Posts

    42
  • Joined

  • Last visited

    Never

Everything posted by ThunderLee

  1. Hey, I have just downloaded a sweet file uploader (Ajax and php) yet this uses APC.. Which I have never used before, I have downloaded the php_apc.dll and enabled the extension and put the values in php.ini.. (Also rebooted server ) Yet when I run the upload script I get this error.. PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\Parallels\Plesk\Additional\PleskPHP5\ext\php_apc.dll' - %1 is not a valid Win32 application. in Unknown on line 0 I get near no results when googling this so I have no alternative to ask for help here :/.. Php.info.. = http://www.mymediaupload.com/php.php (Could it be I have a bad .dll? Could anyone send me this for PHP 5.2.6?) Please help!
  2. Nevermind I spent hours on it and found a div that I could position ..
  3. Hi there, I'm not farmilliar with Java and I tried contacting the creator of this script numerious times and I'm not getting anywhere with it :/.. There is a function here (create_jwplrc) that makes the JW player with the lyrics container below the player.. what I'm in need of is to place the lyrics window in another area of my website.. (I have tables on my website and my player is in 1 table and I want the lyrics window in another winow..) I can't seem to firgure out how to do this, I have tried to get help of my friend who knows little JS but doing his edits made the thing break, if anyone would be kind enough to try to help me I would be greatful. this is jwplrc.js /* * DO WHAT THE F**K YOU WANT TO PUBLIC LICENSE * Version 2, December 2004 * * Copyright (C) 2009 Wensheng Wang (wenshengwang at gmail dot com) * * Everyone is permitted to copy and distribute verbatim or modified * copies of this license document, and changing it is allowed as long * as the name is changed. * * TERMS AND CONDITIONS * * 0. You just DO WHAT THE F**K YOU WANT TO. * * */ /* * info: http://blog.wensheng.com/2009/09/jw-media-player-with-lyrics-scroller.html * * This script must be loaded after following 3 scripts: * * jquery.js (http://jquery.com/) * jquery.scrollTo.js (http://plugins.jquery.com/project/ScrollTo) * swfobject.js (v2 or later) (http://code.google.com/p/swfobject/) * * */ function setdefault(a,o,v){ if(!(a in o)){o[a]=v; } } function parseTime(x) { var l = x.split('.'); var t = 0; try { var j = l[0].split(':'); t += parseFloat(j[j.length - 1]) if (j.length > 1) { t += parseFloat(j[j.length - 2]) * 60.0; } if (j.length > 2) { t += parseFloat(j[j.length - 3]) * 3600.0; } t += 0.00001; return t; } catch (e) { return 0; } } function create_jwplrc(divid,width,height,flashvars,params,playerid){ setdefault("autostart", flashvars, "true"); setdefault("backcolor", flashvars, "0x000000"); setdefault("frontcolor", flashvars, "0xCCCCCC"); setdefault("lightcolor", flashvars, "0x557722"); setdefault("allowfullscreen", params, "true"); setdefault("allowscriptacess", params, "always"); swfobject.embedSWF("player.swf", divid, width, height, "9.0.0", false, flashvars, params, { id:playerid, name:playerid} ); } var debug_jwplrc= false; function debug_pout(s){ if(debug_jwplrc && $("#debug_jwl").length>0) $("#debug_jwl").append(s); } var alllrc={}; var last_played=["",-1]; function get_the_lrc(obj){ var player = document.getElementById(obj['id']); var pcfg = player.getConfig() var plist = player.getPlaylist() var curr_playing = pcfg.item; var lrcurl=false; if('lrc' in pcfg){ lrcurl = pcfg['lrc']; } if(plist.length>1){ var n = plist[curr_playing].file; //1/18/2009, change to explicitly specify lrc in <info> in <track> //lrcurl = n.substr(0,n.lastIndexOf("."))+".lrc"; lrcurl = plist[curr_playing].link; } if(lrcurl==false){ display_lrc(obj['id'],[0,"No Lyrics specified",false]); return; } if(last_played[0] == obj['id'] && last_played[1]==curr_playing){ return; } last_played = [obj['id'],curr_playing]; if(lrcurl in alllrc){ display_lrc(obj['id'],alllrc[lrcurl]); }else{ debug_pout("Getting lrc<br />"); $.get(lrcurl, function(data){ alllrc[lrcurl]=load_the_lrc(data); display_lrc(obj['id'],alllrc[lrcurl]); }); } debug_pout("obj[id] is "+obj['id']+"<br />"); } function display_lrc(pid,lrcdata){ debug_pout("current lrc has "+lrcdata.length+" lines<br />"); var divlrc=$("#lrc_"+pid); var lrclen=lrcdata.length; divlrc.find("p").remove(); //clear all for(var i=0;i<lrclen;i++){ var p; if($.trim(lrcdata[i][1])==""){ p = $("<p> </p>"); }else{ p=$("<p>"+lrcdata[i][1]+"</p>"); } p.attr('id',"plrc_"+pid+"_"+i); divlrc.append(p); } divlrc.scrollTo( "0", 800 ); debug_pout("divlrc has "+divlrc.children().length+" children.<br />"); } load_the_lrc = function(data){ var zzz=[] var m = data.split(/\n/g); var d; var last_t = -1; for (var i = 0; i < m.length; i ++) { var line = $.trim(m[i]); if (line.match(/^\[([0-9:\.]+)\](.*)$/)){ //has timestamp(s) var items = line.split(/[\[|\]]/); var tmpt = [] for(var j=0;j<items.length-1;j++){ if(t=parseTime(items[j])){ tmpt.push(t); zzz.push([t,items[items.length-1],true]); } } last_t = Math.min.apply(Math,tmpt);//the smallest timestamp }else{ last_t += 0.0001; zzz.push([last_t,line,false]); //false mean it's not real lyrics line } } zzz.sort (function(a, b) { return a[0] - b[0]; }); return zzz; }; var lxjn={} var lxjl={} function cont(obj) { var oid=obj['id']; var player = document.getElementById(obj['id']); var pcfg = player.getConfig() var plist = player.getPlaylist() var curr_playing = pcfg.item; var lrcurl=false; if('lrc' in pcfg){ lrcurl = pcfg['lrc']; } if(plist.length>1){ var n = plist[curr_playing].file; //1/18/2009, change to explicitly specify lrc in <info> in <track> //lrcurl = n.substr(0,n.lastIndexOf("."))+".lrc"; lrcurl = plist[curr_playing].link; } if(lrcurl==false){ return; } if (!(lrcurl in alllrc) || alllrc[lrcurl].length < 1){ return; } if(obj.position <0){ lxjn[oid] = 0; //this is array index for alllrc[lrcurl] return; } var curlrc = alllrc[lrcurl]; if(lxjl[oid] && obj.position > curlrc[lxjl[oid]][0]){ //seeked back lxjn[oid] = curlrc.length-1; while(lxjn[oid]>1 && obj.position < curlrc[lxjn[oid]-1][0]){ lxjn[oid]--; } $("#plrc_"+oid+"_"+lxjl[oid]).css({"font-weight":"","background-color":"#000"}); var tmpn = lxjn[oid]-1; while(tmpn && curlrc[tmpn][2]==false){ tmpn--; } if(tmpn>3){ $("#lrc_"+oid).scrollTo( $("#plrc_"+oid+"_"+(tmpn-3)), 200 ); }else{ $("#lrc_"+oid).scrollTo( $("#plrc_"+oid+"_"+tmpn), 200 ); } $("#plrc_"+oid+"_"+tmpn).css({"font-weight":"bold","background-color":"#077"}); lxjl[oid] = tmpn; return; } if ( lxjn[oid]<curlrc.length && obj.position > curlrc[lxjn[oid]][0]){ var scroll_time = 800; if(lxjn[oid]<curlrc.length-1 && obj.position > curlrc[lxjn[oid]+1][0]){ //seeked forward while(lxjn[oid]<curlrc.length-1 && curlrc[lxjn[oid]+1][2] && obj.position > curlrc[lxjn[oid]+1][0]){ lxjn[oid]++; } scroll_time = 100; } debug_pout(obj.position+" lxjn[oid]="+lxjn[oid]+", lxjl[oid]="+lxjl[oid]+"<br />"); $("#plrc_"+oid+"_"+lxjl[oid]).css({"font-weight":"","background-color":"#000"});//clear last line if(lxjn[oid]>3){ //debug_pout("should scroll now<br />"); $("#lrc_"+oid).scrollTo( $("#plrc_"+oid+"_"+(lxjn[oid]-3)), scroll_time ); } $("#plrc_"+oid+"_"+lxjn[oid]).css({"font-weight":"bold","background-color":"#077"}); lxjl[oid] = lxjn[oid]; lxjn[oid]++; while(lxjn[oid]<curlrc.length-1 && curlrc[lxjn[oid]][2]==false){ //skip lines with no timestamp lxjn[oid]++; } } } function playerReady(obj){ var player = document.getElementById(obj['id']); var pcfg = player.getConfig(); var lrcdiv = $("<div></div>"); var dwidth = pcfg.width; if(player.width)dwidth=player.width; //in IE, sometime getConfig().width is not ready lrcdiv.attr('id',"lrc_"+obj['id']); lrcdiv.css({"color":pcfg.frontcolor.replace("0x","#"), "background-color":pcfg.backcolor.replace("0x","#"), "border":"1px solid #777", "width":"300px", "height":"250px", "overflow":"auto"}); $("#"+obj['id']).after(lrcdiv); lxjn[obj['id']] = 0; lxjl[obj['id']] = 0; player.addModelListener("LOADED","get_the_lrc"); player.addModelListener("TIME","cont"); } this is my code where the player is to be shown/created? <script type="text/javascript" src="z/jquery.js"></script> <script type="text/javascript" src="z/jquery.scrollTo-1.4.2-min.js"></script> <script type="text/javascript" src="z/swfobject.js"></script> <script type="text/javascript" src="z/jwplrc.js"></script> <span style="font-size: 6.2pt"> </span><div id='mediaspace'>Error Loading Content..</div> <span style="font-size: 6.2pt"> </span> <script type="text/javascript"> var flashvars = { file:"<?php echo $m['musiclocation']; ?>", lrc:"z/rick.lrc", image:"<?php echo $m['musicalbumart']; ?>", autostart:"true", bufferlength:"60" }; create_jwplrc("mediaspace","100","100",flashvars,{},"music"); </script> <div id="debug_jwl"></div> This code creates the player with the lyrics window directly below the player.. I want the lyrics window in another area of my webpage?
  4. Hi everyone, I'm not sure if this is in the correct section but its frustrating me because I can't seem to find a answer.. What I'm trying to do is... I want a text input box with a $ sign and a . in the box, when a user types 1000 it would show $10.00 in the box, same with date, I type 01012000 would show 01/01/2000.. I have seen this on a website somewhere but I tried looking at the source and I can't figure out how they did it.. I would like someone to try to help me find a solution because its frustrating me ..
  5. Why don't you have a table for all users? I don't get each user having their own table as it doesn't make sence..? Is there any reason you want each user having their own table?
  6. Its a comment system (Like youtube) Here is what it looks like: http://www.mymediaupload.com/media.php?v=2 EDIT, What I want is when a user makes a new comment on the above music it would notify me in my Quick Panel (on the homepage) like it would say New Comments: (however many new comments) I would click this and it would like the music files with new comments.
  7. Hi everyone, I have a comments system on my website for files they upload (that I made) and I would like to ask anyone how I would make it so if someone makes a new comment on that file it would inform them.. I have made a panel on the homepage what tells the user recent things thats happend (New comments, recent activity of friends..) This is where I would like the new comments to be listed, if 3 new comments where to be made on a file I uploaded it would say on the homepage (New Comments: 3), I would click the 3 and the 3 files would load into a div that has new comments, when the user goes to the file the new comments go down to 0.. or something like that I hope someone understands me .. I was thinking something like when the user posts a comment it would put a 0 into the database and when you load the page up it would go to 1, I was thinking that but what if there was 2 new comments ? What would be the best way to do this?? Also I would like to ask what would be the best way to have a recent activity (Like recently uploaded, comments, friends... )? Thanks .
  8. No offence but I have been at this thing for hours and I'm really getting tired with it.. I have tried several ways to try to make it work and it fails all the time, I know PHP well but at this point of time I'm tired..
  9. Thanks for the quick reply , I did my pagination without the columns and it worked, I replace the code with yours and I get a error http://www.mymediaupload.com/stations_mem.php <?php error_reporting(E_ALL^E_NOTICE); include('pagination_class.php'); mysql_connect('localhost', 'root', 'msb090909') or die(mysql_error()); mysql_select_db('mymediaupload'); ?> <script language="JavaScript" src="js/pagination1.js"></script> <link rel="stylesheet" type="text/css" href="css/station.css" /> <? $qry = "SELECT * FROM music"; $searchText = ""; if($_REQUEST['search_text']!=""){ $searchText = $_REQUEST['search_text']; $qry .=" where channel_name OR display_name like '%$searchText%'"; } //for pagination $starting=0; $recpage = 5;//number of records per page $obj = new pagination_class($qry,$starting,$recpage); $result = $obj->result; ?><form name="form1" action="stations_mem.php" method="POST"> <table border="0" align="center" width="100%"> <tr> <TD colspan="2" align="right" valign="middle" height="0"> <div id="content">Search <input type="text" name="search_text" class="input3" value="<?php echo $searchText; ?>"> <input type="submit" value="Search"></div> </TD> </tr> <tr><TD colspan="2"> <div id="page_contents"> <table border="0" align="center" width="100%"> <?if(mysql_num_rows($result)!=0){ $counter = $starting + 1; while($data = mysql_fetch_array($result)) { $r1 = mysql_query("SELECT * FROM music WHERE `musicuploaderid`='".$data['user_id']."'"); $n1 = mysql_num_rows($r1); $r1 = mysql_query("SELECT * FROM music WHERE `musicuploaderid`='".$data['user_id']."'"); $n1 = mysql_num_rows($r1); $r1 = mysql_query("SELECT * FROM music WHERE `musicuploaderid`='".$data['user_id']."'"); $n1 = mysql_num_rows($r1); $r1 = mysql_query("SELECT * FROM music WHERE `musicuploaderid`='".$data['user_id']."'"); $n1 = mysql_num_rows($r1); ?> <tr> <td height="0" width="592"> <?php $counter=1; echo "<table>"; echo "<tr>"; foreach($resultset as $result) { echo "<td>".$displayedresults."</td>"; if($counter%3==0) { echo "</tr><tr>"; } $counter++; } echo "</tr>"; echo "</table>"; ?> </td> </tr><tr><td height="2"></td></tr> <? $counter ++; } ?> <tr><TD colspan="7"><? echo $obj->anchors; ?></TD></tr> <tr><TD colspan="7" align="center"><? echo $obj->total; ?></TD></tr> <?}else{?> <tr><TD align="center" colspan="2"><div id="content">No Data Found</div></TD></tr> <?}?> </TD></tr> </table> </div> </TD></tr> </table></form> Warning: Invalid argument supplied for foreach() in C:\inetpub\vhosts\mymediaupload.com\httpdocs\stations_mem.php on line 61 Can you please verify that I did it correctly?
  10. Hi all, I have been at this for hours and its really making me mad!! I would like a pagination that displays in columns as well as rows (I have searched everywhere and everyones script seems to fail on me .. I would like to take results from the database that is linked with the userid.. EG. music1 music2 music3 music4 music5 music6 music7 music8 music9 First Previous 1 2 3 4 5 6 7 8 9 10 Next Last Here is the code I'm using.. it displays the results correctly but when I click "next" it says no data? (I found a pagination script AND I found a script that lets me display data in columns.. I tried to merge them together and I failed Here is MY merge attempt: <script language="JavaScript" src="js/pagination.js"></script> <link rel="stylesheet" type="text/css" href="css/station.css" /> <?php include("connectvars.php"); include('pagination_class.php'); if($_GET['id']) { $tdcount = 1; $numtd = 3; // number of cells per row print "<table width=\"100%\" valign=\"top\" align=\"center\">"; $id = mysql_real_escape_string($_GET['id']); $dd = mysql_query("SELECT * FROM `accounts` WHERE `user_id`='".$id."'") or die(mysql_error()); $ee = mysql_query("SELECT * FROM `music` WHERE `musicuploaderid`='".$id."'") or die(mysql_error()); $qry = "SELECT * FROM `music` WHERE `musicuploaderid`='".$id."'"; $searchText = ""; if($_REQUEST['search_text']!=""){ $searchText = $_REQUEST['search_text']; $qry .=" where channel_name OR display_name like '%$searchText%'"; } //for pagination $starting=0; $recpage = 9;//number of records per page $obj = new pagination_class($qry,$starting,$recpage); $result = $obj->result; ?> <form name="form1" action="pagnation1.php" method="POST"> <table border="0" align="center" width="100%"> <tr> <TD colspan="2" align="right" valign="middle" height="0"> <div id="content">Search <input type="text" name="search_text" class="input3" value="<?php echo $searchText; ?>"> <input type="submit" value="Search"></div></TD> </tr> <tr><TD colspan="2"> <div id="page_contents"> <?php print "<table width=\"100%\" valign=\"top\" align=\"center\">"; if(mysql_num_rows($result)!=0) { $counter = $starting + 1; while($s = mysql_fetch_array($result)) { if ($tdcount == 1) print "<tr>"; print " <td width=\"275\" valign=\"top\" align=\"center\"><a target=\"_top\" href=\"media.php?v=".$s['musicid']."\">"; echo "<img src=\"$s[musicalbumart]\" width=\"90\" height=\"90\" border=\"0\" align=\"center\"><br> <div id=\"content\" align=\"center\">".$s['musictitle']."<br>".$s['musicartist']."</a><br>".$s['musicrating']."</div><br></td>"; if ($tdcount == $numtd) { print "</tr>"; $tdcount = 1; $counter ++; } else { $tdcount++; } } if ($tdcount!= 1) { while ($tdcount <= $numtd) { print "<td> </td>"; $tdcount++; } print "</tr>"; $counter ++; } else { echo ""; } print "</table>"; ?><tr><TD colspan="7"><? echo $obj->anchors; ?></TD></tr> <tr><TD colspan="7" align="center"><? echo $obj->total; ?></TD></tr><?php }else{ echo '<tr><TD align="center" colspan="2"><div id="content">No Data Found</div></TD></tr>'; } } ?> </TD></tr> </table> </div> </TD></tr> </table></form> Original Pagination script: <?php include('pagination_class.php'); mysql_connect('localhost', ' ', ' ') or die(mysql_error()); mysql_select_db(' '); ?> <script language="JavaScript" src="js/pagination.js"></script> <link rel="stylesheet" type="text/css" href="css/station.css" /> <? $qry = "SELECT * FROM accounts"; if($_REQUEST['search_text']!=""){ $searchText = $_REQUEST['search_text']; $qry .=" where channel_name OR display_name like '%$searchText%'"; } //for pagination if(isset($_GET['starting'])&& !isset($_REQUEST['submit'])){ $starting=$_GET['starting']; }else{ $starting=0; } $recpage = 10;//number of records per page $obj = new pagination_class($qry,$starting,$recpage); $result = $obj->result; ?> <table border="0" align="center" width="100%"> <?if(mysql_num_rows($result)!=0){ $counter = $starting + 1; while($data = mysql_fetch_array($result)) { $r1 = mysql_query("SELECT * FROM music WHERE `musicuploaderid`='".$data['user_id']."'"); $n1 = mysql_num_rows($r1); $r1 = mysql_query("SELECT * FROM music WHERE `musicuploaderid`='".$data['user_id']."'"); $n1 = mysql_num_rows($r1); $r1 = mysql_query("SELECT * FROM music WHERE `musicuploaderid`='".$data['user_id']."'"); $n1 = mysql_num_rows($r1); $r1 = mysql_query("SELECT * FROM music WHERE `musicuploaderid`='".$data['user_id']."'"); $n1 = mysql_num_rows($r1); ?> <tr> <td height="0" width="592"> <table border="1" width="100%" height="0" cellspacing="0" cellpadding="0" bordercolor="#c0c0c0" bgcolor="#FFFFFF" class="mytable"><tr height="10" class="special"> <TD width="64" height="79" rowspan="2" align="center"><div id="content"><? echo $counter; ?></div></TD> <TD height="0" width="633" colspan="3"> <div align="left" id="content"> <?php echo "".$data['channel_name'].""; ?> (<?php echo "".$data['display_name'].""; ?>)</div></TD> <TD height="0" width="184"> <div id="content" align="right">+Add to favourites</TD> </tr> <tr class="special"> <TD height="59" width="107"> <p align="center"> <img src=<?php echo "".$data['display_picture'].""; ?> width=49 height=51 border=0 align="center"></TD> <TD height="59" width="300" valign="top"><div id="content"> <br> Views: <?php echo "".$data['channel_views'].""; ?><br> Rating: <?php echo "".$data['channel_rating'].""; ?></div></TD> <TD height="59" width="222" valign="top"><div id="content"><br>Music: <?php echo "".$n1.""; ?><br> Pictures: 0</TD> <TD height="59" width="184" valign="top"><div id="content"><br>Files: 0<br> Lyrics: 0</div></TD> </tr></table> </td> </tr><tr><td height="2"></td></tr> <? $counter ++; } ?> <tr><TD colspan="7"><? echo $obj->anchors; ?></TD></tr> <tr><TD colspan="7" align="center"><? echo $obj->total; ?></TD></tr> <?}else{?> <tr><TD align="center" colspan="2"><div id="content">No Data Found</div></TD></tr> <?}?> </TD></tr> </table> Original Script For Columns: <link rel="stylesheet" href="css/MMUV1.css" type="text/css" media="screen" /> <?php include("connectvars.php"); if($_GET['id']) { $tdcount = 1; $numtd = 3; // number of cells per row print "<table width=\"100%\" valign=\"top\" align=\"center\">"; $id = mysql_real_escape_string($_GET['id']); $dd = mysql_query("SELECT * FROM `accounts` WHERE `user_id`='".$id."'") or die(mysql_error()); $ee = mysql_query("SELECT * FROM `music` WHERE `musicuploaderid`='".$id."'") or die(mysql_error()); echo "If you can see this page its VERY unfinished <br><br>"; while($s = mysql_fetch_array($ee)) { if ($tdcount == 1) print "<tr>"; print " <td width=\"275\" valign=\"top\" align=\"center\"><a target=\"_top\" href=\"media.php?v=".$s['musicid']."\">"; echo "<img src=\"$s[musicalbumart]\" width=\"90\" height=\"90\" border=\"0\" align=\"center\"><br> <div id=\"content\" align=\"center\">".$s['musictitle']."<br>".$s['musicartist']."</a><br>".$s['musicrating']."</div><br></td>"; if ($tdcount == $numtd) { print "</tr>"; $tdcount = 1; } else { $tdcount++; } } if ($tdcount!= 1) { while ($tdcount <= $numtd) { print "<td> </td>"; $tdcount++; } print "</tr>"; } else { echo ""; } print "</table>"; } ?> Please help I have been at it for hours and I'll tear my hair out if I can't solve it!
  11. Omg Thankyou! You're a genius Thanks so much!!
  12. I get this: Warning: fsockopen() [function.fsockopen]: unable to connect to www.mymediaupload.com:43594 (Connection timed out) in /home/a9726309/public_html/index.php on line 16 Meh idk o.o..
  13. Ok, What I would like to do is list all the songs by an artist exept the one that I'm listening to. EG, I am listning to: Tinchy Stryder - You're Not Alone So when I click "More From Tinchy" I would like it to show the other songs by that artist.. Currently it shows that song I'm listening too AND the rest of the songs, I would like to know how I eliminate the current song from the showing..
  14. I'm not quite understanding what your saying.. Your saying you have a upload and it "sometimes works?" If you have a upload then its really easy to do a download, you have to obtain the file location from the database. EG. your colum in the database is "filelocation" qry = mysql_query("SELECT * FROM tablename WHERE tablename='something'") or die(mysql_error()); ".qry['columnname']."... in your case it could be ".qry['filelocation']." Please provide some code I can't seem to work without some code
  15. Thanks for the fast responce, I still get this: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\inetpub\vhosts\mymediaupload.com\httpdocs\media.php on line 279 This is whats around that line.. <tr> <td height="0" width="6" background="images/LL.png" rowspan="3"> </td> <td height="29" width="97" bgcolor="#FFFFFF" valign="top"> <p align="center"> <img src="<?php echo "".$c['display_picture'].""; ?>" height="90" width="90" align="center"></td> <!-- LINE 279 --><td height="29" width="138" bgcolor="#FFFFFF" valign="top"> <div id="content"><b><?php echo "".$c['display_name'].""; ?></b><br> <?php echo date("D d M Y",strtotime($m['dateadded'])); ?><br><br><b>Views:</b> <?php echo "".$m['views'].""; ?><br><b>Rating:</b> <?php echo "".$m['rating'].""; ?><br><b>Media:</b> Music</div></td> <td height="0 width="6" background="images/RR.png" rowspan="3"> </td> </tr>
  16. Ok Here is userapplet.php <link rel="stylesheet" href="css/MMUV1.css" type="text/css" media="screen" /> <!-- S H O W I N G M O R E M U S I C F R O M T H A T U S E R --> <?php include("connectvars.php"); if($_GET['morefrom']) { $name = mysql_real_escape_string($_GET['morefrom']); $n = mysql_query("SELECT * FROM music WHERE musicuploaderid='".$name."' ORDER BY musicid DESC LIMIT 0,6") or die(mysql_error()); $o = mysql_query("SELECT * FROM music WHERE musicuploaderid='".$name."' ORDER BY musicid DESC") or die(mysql_error()); $q1 = mysql_query("SELECT * FROM accounts WHERE user_id = ".$name."") or die(mysql_error()); $q2 = mysql_fetch_array($q1); $len = 19; while($p = mysql_fetch_array($n)) { $q1 = mysql_query("SELECT * FROM accounts WHERE user_id = ".$name."") or die(mysql_error()); $q2 = mysql_fetch_array($q1); echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td width=\"40\"><img src=\"".$p['musicalbumart']."\" height=\"40\" width=\"40\"></td><td width=\"5\"></td>"; echo "<td align=\"left\" valign=\"top\"><a target=\"_top\" title=\"".$p['musictitle']." - ".$p['musicartist']."\" href=\"media.php?v=".$p['musicid']."\">"; echo (strlen($p['musictitle']) > $len ? substr($p['musictitle'], 0, $len).".." : $p['musictitle']); echo "<br>"; echo (strlen($p['musicartist']) > $len ? substr($p['musicartist'], 0, $len).".." : $p['musicartist']); echo "</a><br><a target=\"_top\" title=\"Click here to go to ".$q2['display_name']."'s Station\" href=\"stations.php?s=".$q2['user_id']."\">".$q2['display_name']."</a>"; echo "</div></td> </tr> </table>"; echo "<br><hr noshade color=\"#c0c0c0\"><br>"; } if(mysql_num_rows($o)<=0) { echo "<div id=\"content\">There is no results</div>"; } if(mysql_num_rows($o)>=6) { echo "<table width=\"90%\" align=\"center\"><tr><td><div id=\"sub4\">More..</div></td></tr></table>"; } } ?> <!-- S H O W I N G M O R E M U S I C F R O M T H A T A R T I S T --> <?php include("connectvars.php"); if($_GET['morelikethis']) { $name2 = mysql_real_escape_string($_GET['morelikethis']); $sql = sprintf("SELECT * FROM music WHERE musicartist LIKE '%s%%' AND musicartist !='%s' ORDER BY `musicartist` ASC LIMIT 0,6",$name2, $name2); $s = mysql_query($sql) or die(mysql_error()); $t = mysql_query("SELECT * FROM music WHERE musicartist LIKE '".$name2."%' ORDER BY `musicartist` ASC") or die(mysql_error()); $u = mysql_query("SELECT * FROM music WHERE musicartist LIKE '".$name2."%' ORDER BY `musicartist` ASC LIMIT 1,5") or die(mysql_error()); $len = 19; while($x = mysql_fetch_array($s)) { $q3 = mysql_query("SELECT * FROM accounts WHERE user_id = ".$x['musicuploaderid']."") or die(mysql_error()); $q4 = mysql_fetch_array($q3); echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td width=\"40\"><img src=\"".$x['musicalbumart']."\" height=\"40\" width=\"40\"></td><td width=\"5\"></td>"; echo "<td align=\"left\" valign=\"top\"><a target=\"_top\" title=\"".$x['musictitle']." - ".$x['musicartist']."\" href=\"media.php?v=".$x['musicid']."\">"; echo (strlen($x['musictitle']) > $len ? substr($x['musictitle'], 0, $len).".." : $x['musictitle']); echo "<br>"; echo (strlen($x['musicartist']) > $len ? substr($x['musicartist'], 0, $len).".." : $x['musicartist']); echo "</a><br><a target=\"_top\" title=\"Click here to go to ".$q4['display_name']."'s Station\" href=\"stations.php?s=".$q4['user_id']."\">".$q4['display_name']."</a>"; echo "</div></td> </tr> </table>"; echo "<br><hr noshade color=\"#c0c0c0\"><br>"; } if(mysql_num_rows($t)<=0) { echo "<div id=\"content\">There is no results</div>"; } if(mysql_num_rows($t)>=6) { echo "<table width=\"90%\" align=\"center\"><tr><td><div id=\"sub4\">More..</div></td></tr></table>"; } } ?> And this is media.php.. (Scroll down to "viewing pages") <?php include("header.php"); include("connectvars.php"); if($_GET['m']=="music") { ?> <title>Music | MyMediaUpload.com</title> <tr> <td width="960" background="images/BGHeadMiddle.png" colspan="7" valign="top"> <div align="center"> <table border="0" width="941" height="292" cellspacing="0" cellpadding="0"> <tr> <td height="0" valign="top" width="679"> <table cellspacing="0" cellpadding="0"> <tr> <td height="0" width="5" valign="top"><img border="0" src="images/BC1.png"></td> <td height="0" width="29" background="images/BC2.png"> <font color="#838383"><span style="font-size: 9pt"> <a href="index.php" style="text-decoration: none">Home</a></span></font></td> <td height="0" width="17" valign="top"> <img border="0" src="images/BC3.png" width="17" height="24"></td> <td height="0" width="31" background="images/BC2.png" nowrap> <font color="#838383"><span style="font-size: 9pt"> <a href="media.php?m=music" style="text-decoration: none">Music</a></span></font></td> <td height="0" width="15"><img border="0" src="images/BC4.png"></td> </tr> </table></td> <td height="0" valign="top" width="263" align="right"> <?php if($_SESSION['email']) {?> <img src="images/ShortCut.png" border="0" /><a href="#" rel="toggle[bodyupload]" data-openimage="images/Upload1.png" data-closedimage="images/Upload2.png"><img src="images/Upload1.png" border="0" /></a> <?php } else { ?> <img src="images/Upload4.png" border="0" /> <?php } ?> </td> </tr> <tr> <td height="5" width="941" valign="top" colspan="6"> <!--------------------------------------------------------------------------------------------------------------------------------------------> <!------------------------------------------------- UPLOAD BOX DIV ---------------------------------------------------------------------------> <!--------------------------------------------------------------------------------------------------------------------------------------------> <?php include("uploadit.php"); ?> </td> </tr> <tr> <td height="263" width="941" valign="top" colspan="6" align="left"> <table border="0" width="939" cellspacing="0" cellpadding="0"> <tr> <td width="661" valign="top"> <table border="0" width="940" height="0" cellspacing="0" cellpadding="0"> <tr> <td height="0" width="0" background=""></td> <td height="0" width="935" bgcolor="#FFFFFF" valign="top"> <iframe name="MUSICBOX" width="100%" height="430" scrolling="no" border="0" frameborder="0" src="/M/index.php" align="center"> Oops! Your browser doesn't support "Inline Frames", choose a browser like FireFox/Internet Explorer or Google Chrome. </iframe></td> <td height="0" width="0"></td> </tr> </table></p> <table border="0" width="942" height="153" cellspacing="0" cellpadding="0"> <tr> <td height="11" width="6"><img border="0" src="images/UL1.png" width="6" height="11"></td> <td height="11" width="930" background="images/UM1.png"></td> <td height="11" width="6"><img border="0" src="images/UR1.png" width="6" height="11"></td> </tr> <tr> <td height="1" width="6" background="images/LL.png"> </td> <td height="1" width="930" bgcolor="#FFFFFF" valign="top"><div id="content">Featured Music:</div> <iframe name="Recent" width="930" height="207" scrolling="no" border="0" frameborder="0" src="/T/indexM.php" align="center">Oops! Your browser doesn't support "Inline Frames", choose a browser like FireFox/Internet Explorer or Google Chrome.</iframe></td> <td height="1" width="6" background="images/RR.png"> </td> </tr> <tr> <td height="11" width="6"><img border="0" src="images/DL.png" width="6" height="11"></td> <td height="0" width="930" background="images/DM.png"></td> <td height="11" width="6"><img border="0" src="images/DR.png" width="6" height="11"></td> </tr> </table> <!------------------------------------------ EMPTY SPACE BELOW LEFT TABLE <<<<<<<<<<<<<<< --------------------------------------------> </td> </tr> </table> </td> </tr> </table> <!------------------------------------------ EMPTY SPACE BELOW ALL TABLES AND ABOVE LINE --------------------------------------------> </div> </td> </tr> <?php include("footer.php"); ?> <!-------------------------------------------------------------------------------------------------------------------------------------------------> <!-------------------------------------------------------------------------------------------------------------------------------------------------> <!------------------------------------------------------------ VIEWING SONG PAGES -----------------------------------------------------------------> <!-------------------------------------------------------------------------------------------------------------------------------------------------> <!-------------------------------------------------------------------------------------------------------------------------------------------------> <?php } elseif($_GET['v']) { $name = mysql_real_escape_string($_GET['v']); $dd = mysql_query("SELECT * FROM `music` WHERE `musicid`='".$name."'") or die(mysql_error()); $m = mysql_fetch_array($dd); $cc = mysql_query("SELECT * FROM `accounts` WHERE `user_id`='".$m['musicuploaderid']."'") or die(mysql_error()); $c = mysql_fetch_array($cc); $update = mysql_query("UPDATE `music` SET `views` = views + 1 WHERE `musicid`='".$name."'") or die(mysql_error()); $len = 25; ?> <?php echo "<title>".$m['musictitle']." - ".$m['musicartist']." | MyMediaUpload.com</title>"; ?> <tr> <td width="960" background="images/BGHeadMiddle.png" colspan="7" valign="top"> <div align="center"> <table border="0" width="941" height="292" cellspacing="0" cellpadding="0"> <tr> <td height="0" valign="top" width="663"> <table cellspacing="0" cellpadding="0"> <tr> <td height="0" width="5" valign="top"><img border="0" src="images/BC1.png"></td> <td height="0" width="29" background="images/BC2.png"> <font color="#838383"><span style="font-size: 9pt"> <a href="index.php" style="text-decoration: none">Home</a></span></font></td> <td height="0" width="17" valign="top"> <img border="0" src="images/BC3.png" width="17" height="24"></td> <td height="0" width="31" background="images/BC2.png" nowrap> <font color="#838383"><span style="font-size: 9pt"> <a href="media.php?m=music" style="text-decoration: none">Music</a></span></font></td> <td height="0" width="17"> <img border="0" src="images/BC3.png" width="17" height="24"></td> <td height="0" width="0" background="images/BC2.png" nowrap><div id="content"><?php echo "".$m['musictitle']." - ".$m['musicartist'].""; ?></div></td> <td height="0" width="15"> <img border="0" src="images/BC4.png"></td> </tr> </table></td> <td height="0" valign="top" width="278" align="right"> <?php if($_SESSION['email']) {?> <a href="?v=<?php echo "".$m['musicid'].""; ?>&func=shortcutadd"><img src="images/ShortCut.png" border="0" /></a><a href="#" rel="toggle[bodyupload]" data-openimage="images/Upload1.png" data-openimage="images/Upload1.png" data-closedimage="images/Upload2.png"><img src="images/Upload1.png" border="0" /></a> <?php } else { ?> <img src="images/Upload4.png" border="0" /> <?php } ?> </td> </tr> <tr> <td height="5" width="941" valign="top" colspan="2"> <!--------------------------------------------------------------------------------------------------------------------------------------------> <!------------------------------------------------- UPLOAD BOX DIV ---------------------------------------------------------------------------> <!--------------------------------------------------------------------------------------------------------------------------------------------> <?php include("uploadit.php"); ?> </td> </tr> <tr> <td height="263" width="941" valign="top" align="left" colspan="2"> <?php if($_GET['func']=='favthis') { $ucheck = mysql_query("SELECT * FROM `fav` WHERE `uid`='".$_SESSION['user_id']."' AND `musicid`='".$m['musicid']."'") or die(mysql_error()); if(mysql_num_rows($ucheck) >= 1) { echo "<table width=\"95%\" align=\"center\"><tr><td><div id=\"error2\" align=\"center\">The song ".$m['musictitle']." is already in your favourites (<a href=\"?v=".$m['musicid']."&func=removefav\">Remove?</a>).</div></a><div id=\"content\"></div></td></tr></table></div><br>"; } else { mysql_query("INSERT INTO `fav` (`uid`,`musicid`,`date`) VALUES ('".$_SESSION['user_id']."','".$m['musicid']."',now())") or die(mysql_error()); echo "<table width=\"95%\" align=\"center\"><tr><td><div id=\"error1\" align=\"center\">The song ".$m['musictitle']." has been added to your favourites.</div></a></td></tr></table></div><br>"; } } if($_GET['func']=='removefav') { mysql_query("DELETE FROM `fav` WHERE `uid`='".$_SESSION['user_id']."' AND `musicid`='".$m['musicid']."'") or die(mysql_error()); echo "<table width=\"95%\" align=\"center\"><tr><td><div id=\"error4\" align=\"center\">The song ".$m['musictitle']." has been removed from your favourites.</div></a><div id=\"content\"></div></td></tr></table></div><br>"; } ?> <table border="0" width="939" cellspacing="0" cellpadding="0" height="403"> <tr> <td width="247" valign="top" rowspan="2"> <table border="0" width="247" height="0" cellspacing="0" cellpadding="0"> <tr> <td height="28" width="6"><img border="0" src="images/UL.png" width="6" height="28"></td> <td height="28" width="235" background="images/UM.png" colspan="2"><div id="header3">Subscribe();</div></td> <td height="28" width="6"><img border="0" src="images/UR.png" width="6" height="28"></td> </tr> <tr> <td height="0" width="6" background="images/LL.png" rowspan="3"> </td> <td height="29" width="97" bgcolor="#FFFFFF" valign="top"> <p align="center"> <img src="<?php echo "".$c['display_picture'].""; ?>" height="90" width="90" align="center"></td> <td height="29" width="138" bgcolor="#FFFFFF" valign="top"> <div id="content"><b><?php echo "".$c['display_name'].""; ?></b><br> <?php echo date("D d M Y",strtotime($m['dateadded'])); ?><br><br><b>Views:</b> <?php echo "".$m['views'].""; ?><br><b>Rating:</b> <?php echo "".$m['rating'].""; ?><br><b>Media:</b> Music</div></td> <td height="0 width="6" background="images/RR.png" rowspan="3"> </td> </tr> <tr> <td height="3" width="235" bgcolor="#FFFFFF" valign="top" colspan="2"> </td> </tr> <tr> <form name="form"><td height="0" width="235" bgcolor="#FFFFFF" valign="top" colspan="2"> <div id="content0"><table width="234"><tr><td> <a href="javascript:animatedcollapse.toggle('contactuser')"><div id="sub4">Contact <?php echo "".$c['display_name'].""; ?></div></a> <div id="content"><div id="contactuser"><?php echo "<br>PM ".$c['display_name']."<br>Email ".$c['display_name'].""; ?><br></div></div></td></tr></table> <table width="234"><tr><td><?php $abc = mysql_query("SELECT * FROM `accounts` WHERE `email`='".$_SESSION['email']."'") or die(mysql_error()); $z = mysql_fetch_array($abc); if($z['admin']=="1") { echo "<a href=\"javascript:animatedcollapse.toggle('adminoptionmedia')\"><div id=\"sub4\">Administrator Options</div></a><div id=\"content\"><div id=\"adminoptionmedia\"><br><a href=\"".$m['musiclocation']."\">Download</a><br></div></div>"; } ?></td></tr></table> <table width="234"><tr><td><?php if($z['mod']=="1") { echo "<a href=\"javascript:animatedcollapse.toggle('modoptionmedia')\"><div id=\"sub4\">Moderator Options</div></a><div id=\"content\"><div id=\"modoptionmedia\"><br><a href=\"".$m['musiclocation']."\">Download</a><br></div></div><br>"; } ?></td></tr></table> <script language="JavaScript" type="text/javascript"> <!-- function copyText(frm) { if (!document.all) return; // IE only r = document.selection.createRange(); copyStr=r.text; frm.temp.value=copyStr r=frm.temp.createTextRange(); r.execCommand('copy'); frm.ins.focus;//this and the two lines below are just to show that it works r=frm.ins.createTextRange(); r.execCommand('paste'); } //--> </script> <div id="content"> Page URL <a href="javascript:HighlightAll('form.post')">(Select All)</a></div> <div align="center"><form name="form"><input type="text" class="input4" value="http://www.mymediaupload.com/media.php?v=<?php echo "".$m['musicid'].""; ?>" name="post"></input></div></td></form> </tr> <tr> <td height="11" width="6"><img border="0" src="images/DL.png" width="6" height="11"></td> <td height="0" width="235" background="images/DM.png" colspan="2"></td> <td height="11" width="6"><img border="0" src="images/DR.png" width="6" height="11"></td> </tr> </table> <font face="Arial" style="font-size: 6pt"> <table border="0" width="246" height="40" cellspacing="0" cellpadding="0"> <tr> <td height="11" width="6"><img border="0" src="images/UL1.png" width="6" height="11"></td> <td height="11" width="234" background="images/UM1.png"></td> <td height="11" width="6"><img border="0" src="images/UR1.png" width="6" height="11"></td> </tr> <tr> <td height="18" width="6" background="images/LL.png"></td> <td height="18" width="235" bgcolor="#FFFFFF" valign="top"><a href="javascript:animatedcollapse.toggle('morefromuser')">More From <?php echo "".$c['display_name'].""; ?></a></td> <td height="18" width="6" background="images/RR.png"></td> </tr> <tr> <td height="11" width="6"><img border="0" src="images/DL.png" width="6" height="11"></td> <td height="0" width="234" background="images/DM.png"></td> <td height="11" width="6"><img border="0" src="images/DR.png" width="6" height="11"></td> </tr> </table> <table height="0"><tr><td> <div id="morefromuser"> <font face="Arial" style="font-size: 6pt"> </font> <iframe width="237" height="270" src="userapplet.php?morefrom=<?php echo "".$c['user_id'].""; ?>" name="morebyuser" border="0" frameborder="0"></iframe></div> </td></tr></table><br> <table border="0" width="246" height="40" cellspacing="0" cellpadding="0"> <tr> <td height="11" width="6"><img border="0" src="images/UL1.png" width="6" height="11"></td> <td height="11" width="234" background="images/UM1.png"></td> <td height="11" width="6"><img border="0" src="images/UR1.png" width="6" height="11"></td> </tr> <tr> <td height="18" width="6" background="images/LL.png"></td> <td height="18" width="235" bgcolor="#FFFFFF" valign="top"><a href="javascript:animatedcollapse.toggle('morelikethis')">Music From <?php echo "".$m['musicartist'].""; ?></a></td> <td height="18" width="6" background="images/RR.png"></td> </tr> <tr> <td height="11" width="6"><img border="0" src="images/DL.png" width="6" height="11"></td> <td height="0" width="234" background="images/DM.png"></td> <td height="11" width="6"><img border="0" src="images/DR.png" width="6" height="11"></td> </tr> </table> <!------------------------------------------ EMPTY SPACE BELOW LEFT TABLE <<<<<<<<<<<<<<< --------------------------------------------> <font face="Arial" style="font-size: 6pt"> <div id="morelikethis"> <font face="Arial" style="font-size: 6pt"> </font> <iframe width="237" height="270" src="userapplet.php?morelikethis=<?php echo "".$m['musicartist'].""; ?>" name="morelikethis" border="0" frameborder="0"></iframe></div></td> <td height="226" width="10"> </td> <td height="226" width="684" valign="top"> <table border="0" width="683" height="226" cellspacing="0" cellpadding="0"> <tr> <td height="28" width="6"><img border="0" src="images/LeftUR.png" width="6" height="29"></td> <td height="28" width="0" background="images/LeftUM.png" nowrap colspan="5"><b><span style="font-size: 10pt"><?php echo "".$m['musictitle']." - ".$m['musicartist'].""; ?></span></b> <span style="font-size: 9pt">| <a href="?v=<?php echo "".$m['musicid'].""; ?>&func=favthis">Favourite</a> | Share</span><table width="152" height="1" align="right"><tr><td align="center"><div id="sub1">Buy this song on iTunes</div></td></tr></table></td> <td height="28" width="6"><img border="0" src="images/LeftUL.png" width="6" height="29"></td> </tr> <tr> <td height="0" width="6" background="images/LL.png" rowspan="3"></td> <td height="0" width="6" bgcolor="#FFFFFF" align="left" valign="top" rowspan="2"></td> <td width="165" bgcolor="#FFFFFF" align="left" valign="top" height="124"> <span style="font-size: 6.2pt"> </span><div id="content"><div id="sub3">Song Title</div> <?php echo (strlen($m['musictitle']) > $len ? substr($m['musictitle'], 0, $len)."..." : $m['musictitle']); ?><br><br><div id="sub3">Album</div><?php echo "".$m['musicalbum'].""; ?><br><br></div></td> <td width="10" bgcolor="#FFFFFF" align="left" valign="top" height="124"> </td> <td width="175" bgcolor="#FFFFFF" align="left" valign="top" height="124"> <span style="font-size: 6.2pt"> </span><div id="content"><div id="sub3">Artist</div> <?php echo (strlen($m['musicartist']) > $len ? substr($m['musicartist'], 0, $len)."..." : $m['musicartist']); ?><br><br><div id="sub3">Genre</div><?php echo "".$m['musicgenre'].""; ?></div></td> <td width="315" bgcolor="#FFFFFF" align="center" rowspan="3"> <!-----------------------------> <!-- START WIMPY PLAYER CODE --> <!-----------------------------> <span style="font-size: 5pt"> </span><div id="waspTarget0910222609"><a href="http://www.adobe.com/products/flashplayer/">Flash Player upgrade required</a></div> <script language="javascript"> // <![CDATA[ var waspConfigs0910222609 = new Object(); waspConfigs0910222609.instanceID="0910222609"; waspConfigs0910222609.waspSwf="wasp.swf"; waspConfigs0910222609.pageColor="FFFFFF"; waspConfigs0910222609.fp=""; //Media.php waspConfigs0910222609.fa=""; //PreRoll waspConfigs0910222609.im=""; //Poster waspConfigs0910222609.v="50"; waspConfigs0910222609.vo="<?php echo "".$m['musicalbumart'].""; ?>"; waspConfigs0910222609.f="<?php echo "".$m['musiclocation'].""; ?>"; // Path to file waspConfigs0910222609.a="1"; waspConfigs0910222609.me="0"; waspConfigs0910222609.ph="320"; waspConfigs0910222609.pw="300"; waspConfigs0910222609.waspSkin="sr_1|2|||C8C8C8|E8E8E8^st_1|2|16||000000||FFFFFF^sg_1|1|18^sb_1|4|20|edf4fe|FFFFFF|d9e8fe^sp_1|5|17|D0D0D0|909090|99CCFF^sv_1|2||C8C8C8|C8C8C8|E8E8E8^sw_1|1|18^sm_1|5|17|D0D0D0|909090|99CCFF^sf_1|5|17|D0D0D0|909090|99CCFF^ss_1|5|17|D0D0D0|909090|99CCFF"; writeWasp(waspConfigs0910222609); // ]]> </script> <!---------------------------> <!-- END WIMPY PLAYER CODE --> <!---------------------------> </td> <td height="0" width="6" background="images/RR.png" rowspan="3"></td> </tr> <tr> <td width="350" bgcolor="#FFFFFF" align="left" valign="top" rowspan="2" colspan="3"> <div id="content">&Lyrics();</div></td> </tr> <tr> <td height="0" width="6" bgcolor="#FFFFFF" align="left" valign="top"></td> </tr> <tr> <td height="11" width="6"><img border="0" src="images/DL.png" width="6" height="11"></td> <td height="0" width="671" background="images/DM.png" colspan="5"></td> <td height="11" width="6"><img border="0" src="images/DR.png" width="6" height="11"></td> </tr> </table> </tr> <tr> <td height="177" width="8"> </td> <td width="684" valign="top"><span style="font-size: 6pt"> </span> <table border="0" width="100%" height="154" cellspacing="0" cellpadding="0"> <tr> <td height="29" width="6"><img border="0" src="images/LeftUR.png" width="6" height="29"></td> <td height="29" width="672" background="images/LeftUM.png"><div id="header">Comments</div></td> <td height="29" width="6"><img border="0" src="images/LeftUL.png" width="6" height="29"></td> </tr> <tr> <td height="114" width="6" background="images/LL.png"></td> <td height="114" width="672" bgcolor="#FFFFFF" valign="top"> <div id="content"><br> <?php $a = mysql_query("SELECT * FROM comments WHERE mid='".$m['musicid']."' AND rid='0'") or die(mysql_error()); $be = mysql_query("SELECT * FROM comments WHERE uid='".$m['musicuploaderid']."'") or die(mysql_error()); $ee = mysql_fetch_array($be); while($v = mysql_fetch_array($a)) { $b = mysql_query("SELECT * FROM comments WHERE mid='".$m['musicid']."' AND comid='".$v['cid']."'") or die(mysql_error()); $set = mysql_query("SELECT * FROM accounts WHERE user_id='".$v['uid']."'") or die(mysql_error()); $s = mysql_fetch_array($set); ?> <table align="center" border="1" width="90%" height="0" cellspacing="0" cellpadding="0" bordercolor="#FFCC66" style="border-collapse: collapse"> <tr> <td height="0" width="90%" bordercolor="#FFFF66" bgcolor="#FFFFCC" bordercolorlight="#FFFF00" bordercolordark="#FFFF00" valign="top"> <div id="content"><span style="font-size: 2pt"> </span><br> <?php echo "".$s['display_name']." - "; ?><?php echo date("D d M Y",strtotime($v['date'])); ?> <?php if($_SESSION['user_id']) { if($m['musicuploaderid'] == $_SESSION['user_id']) { if($v['uid'] == $_SESSION['user_id']) { echo "( <a href=\"#\">Delete</a> )</div>"; } else { echo "( <a href=\"#\">Delete</a> | <a href=\"#\">Spam</a> )</div>"; } } elseif($z['admin']=="1" || $z['mod']=="1") { echo "( <a href=\"#\">Delete</a> | <a href=\"#\">Spam</a> )</div>"; } elseif($v['uid'] == $_SESSION['user_id']) { echo "( <a href=\"#\">Delete</a> )</div>"; } else { echo "( <a href=\"#\">Spam</a></div> )"; } } ?> <div id="container0"> <form method="post" id="registerForm0" action="http://www.mymediaupload.com/register.php"> <table align="center" cellpadding="2" cellspacing="0" width="98%" height="0"> <tr> <td><br><div align="left" id="content1"><?php echo "".$v['comment'].""; ?></div><br><br> <?php while($y = mysql_fetch_array($b)) { $tt = mysql_query("SELECT * FROM accounts WHERE user_id='".$y['uid']."'") or die(mysql_error()); $t = mysql_fetch_array($tt);?> <table align="center" border="1" width="90%" height="0" cellspacing="0" cellpadding="0" bordercolor="#FFCC66" style="border-collapse: collapse"> <tr> <td height="0" width="90%" bordercolor="#FFFF66" bgcolor="#FFE09F" bordercolorlight="#FFFF00" bordercolordark="#FFFF00" valign="top"> <div id="content"><span style="font-size: 2pt"> </span><br> <?php echo "".$t['display_name']." - "; ?><?php echo date("D d M Y",strtotime($y['date'])); ?> <?php if($_SESSION['user_id']) { if($m['musicuploaderid'] == $_SESSION['user_id']) { if($v['uid'] == $_SESSION['user_id']) { echo "( <a href=\"#\">Delete</a> )</div>"; } else { echo "( <a href=\"#\">Delete</a> | <a href=\"#\">Spam</a> )</div>"; } } elseif($z['admin']=="1" || $z['mod']=="1") { echo "( <a href=\"#\">Delete</a> | <a href=\"#\">Spam</a> )</div>"; } elseif($v['uid'] == $_SESSION['user_id']) { echo "( <a href=\"#\">Delete</a> )</div>"; } else { echo "( <a href=\"#\">Spam</a></div> )"; } }?> <div id="container0"> <form method="post" id="registerForm0" action="http://www.mymediaupload.com/register.php"> <table align="center" cellpadding="2" cellspacing="0" width="98%"> <tr> <td><br><div align="left" id="content1"><?php echo "".$y['comment'].""; ?><br><br></div></td> </tr> </table> </form> </div> <div align="right"> </span></font> <table border="0" width="100%" height="0" cellspacing="0" cellpadding="0"> <tr> <td height="0" width="614"><div id="content"> + / - (--)</div></td> </tr> </table></div> </td> </tr> </table> <br> <?php } ?> </td> </tr> </table> </form> </div> <div align="right"> <script type="text/javascript"> animatedcollapse.addDiv('replycomment<?php echo "".$v['cid'].""; ?>', 'fade=0,hide=1') animatedcollapse.ontoggle=function($, divobj, state){ //fires each time a DIV is expanded/contracted //$: Access to jQuery //divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID //state: "block" or "none", depending on state } animatedcollapse.init() </script> </span></font> <table border="0" width="100%" height="0" cellspacing="0" cellpadding="0"> <tr> <td height="0" width="614"><div id="content"> + / - (--)<br></div><span style="font-size: 2pt"> </span></td> <td height="0" width="713"><div id="content" align="right"> <?php if($_SESSION['user_id']) {?> <a href="javascript:animatedcollapse.toggle('replycomment<?php echo "".$v['cid'].""; ?>')">Reply </a> <?php } ?></div></td> </tr> </table></div> <?php if($_SESSION['user_id']) {?> <div id="replycomment<?php echo "".$v['cid'].""; ?>"> <div id="header"><br>Replying to <?php echo "".$s['display_name'].""; ?></div><br> <div align="center"> <form action="comment.php?replyto=<?php echo "".$s['user_id'].""; ?>" method="post"> <input type="hidden" name="mid" value="<?php echo "".$m['musicid'].""; ?>"><input type="hidden" name="comid" value="<?php echo "".$v['cid'].""; ?>"><textarea rows="2" class="input2-1" name="comment" cols="60"></textarea><br><input type="submit" value="Submit" name="Comment" onclick="this.disabled=true,this.form.submit();" /> </form></div></div> <?php } ?> </td> </tr> </table><br> <?php } ?> <div id="webcomment"> <div align="center"> <table border="1" width="90%" height="61" cellspacing="0" cellpadding="0" bordercolor="#FFCC66" style="border-collapse: collapse"> <tr> <td height="55" width="0" bordercolor="#FFFF66" bgcolor="#FFFFCC" bordercolorlight="#FFFF00" bordercolordark="#FFFF00" valign="top"> <?php if($_SESSION['email']) { if($_GET['func']=='post_comment') { $rr = mysql_query("SELECT * FROM accounts WHERE email='".$_SESSION['email']."'") or die(mysql_error()); $r = mysql_fetch_array($rr); $found = mysql_query("SELECT * FROM `comments` WHERE `mid`='".$_POST['mid']."'") or die(mysql_error()); $grab = mysql_fetch_array($found); $seconds = 60; if((time()-$seconds) < $grab['dateadded']) { $errors[] = "You may only send a comment every 1 minute."; } elseif ($_POST['comment']=='') { $errors[] = 'Please enter a comment'; } if(is_array($errors)) { echo '<div id="content" class="error">'; while (list($key,$value) = each($errors)) { echo ''.$value.'<br />'; } echo '</div>'; } else { $rr = mysql_query("SELECT * FROM accounts WHERE email='".$_SESSION['email']."'") or die(mysql_error()); $r = mysql_fetch_array($rr); $comment = mysql_real_escape_string($_POST['comment']); $uid = mysql_real_escape_string($r['user_id']); $mid = mysql_real_escape_string($_POST['mid']); $time = date("h:i A"); $date = date("m/d/y"); $fulltime = "".$time." ยท ".$date.""; $ia = mysql_query("INSERT INTO `comments` (`comment`,`uid`,`date`,`datetime`,`mid`,`e`) VALUES ('".$comment."','".$uid."',now(),'".$fulltime."','".$mid."','".$_SESSION['email']."')") or die(mysql_error()); echo "<p><b>Your comment has been posted!</b><br>(You may need to refresh to see your comment)</p>"; } } else {?> <div id="header"><br>Please leave a comment,</div><br> <div align="center"> <form action="comment.php" method="post"> <input type="hidden" name="mid" value="<?php echo "".$m['musicid'].""; ?>"><textarea rows="2" class="input2" name="comment" cols="60"></textarea><br><input type="submit" value="Submit" name="Comment" onclick="this.disabled=true,this.form.submit();" /> </form> <?php } } else { echo "<div align=\"center\" id=\"content\"><br>You must be logged in to comment on this song."; } ?> </div> </div> </span></font> </td> </tr> </table> <br> </div></div> </td> <td height="114" width="6" background="images/RR.png"></td> </tr> <tr> <td height="11" width="6"><img border="0" src="images/DL.png" width="6" height="11"></td> <td height="0" width="672" background="images/DM.png"></td> <td height="11" width="6"><img border="0" src="images/DR.png" width="6" height="11"></td> </tr> </table><br><br><br> <font face="Arial" style="font-size: 6pt"> </font></td> </tr> </table> </td> </tr> </table> <!------------------------------------------ EMPTY SPACE BELOW ALL TABLES AND ABOVE LINE --------------------------------------------> </div> </td> </tr> <?php include("footer.php"); } ?>
  17. How would I write this into the database? <?php echo "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?> I tried this: $url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] $ucheck = mysql_query("SELECT * FROM `shortcuts` WHERE `uid`='".$_SESSION['user_id']."' AND `url`='".$url."'") or die(mysql_error()); Everytime I keep getting errors! Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\inetpub\vhosts\mymediaupload.com\httpdocs\media.php on line 279 This is the error I get and it points to a part of my file which I didn't edit, if I remove the above the page works fine??
  18. That works but nothing is returned. On the media page (media.php) this is the ifram that holds the more from artistname: <iframe width="237" height="270" src="userapplet.php?morelikethis=<?php echo "".$m['musicartist'].""; ?>" name="morelikethis" border="0" frameborder="0"></iframe> So in userapplet I would use the musicartist name from the URL. does it seem I need to take the musics id as well? (If you can't seem to figure it out its ok I'll leave it as it may be causing as much stress as it is to me xP)
  19. You're not an idiot lol.. Although the error is gone we are back at square 1 lol, it shows both songs ?
  20. Hi lol.. I updated it and still the same error o.o $name2 = mysql_real_escape_string($_GET['morelikethis']); $sql = sprintf("SELECT * FROM music WHERE musicartist LIKE '%%s%' AND musicid !=%d ORDER BY `musicartist` ASC LIMIT 0,6",$name2, $_GET['v']); $s = mysql_query($sql) or die(mysql_error()); $t = mysql_query("SELECT * FROM music WHERE musicartist LIKE '".$name2."%' ORDER BY `musicartist` ASC") or die(mysql_error()); $u = mysql_query("SELECT * FROM music WHERE musicartist LIKE '".$name2."%' ORDER BY `musicartist` ASC LIMIT 1,5") or die(mysql_error()); $len = 19; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''%sND musicid !=0 ORDER BY `musicartist` ASC LIMIT 0,6' at line 1 Do you need any more of the page code?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.