Playlist

Started on the old forum in September 2008 · view the original in the archive · old links redirect here

4 replies · 434 views · started 18 years ago · 1 min read

2 participants
ionutxp Developer · 137 posts #1

i want to make a playlist 4 my wapchat

index.php

echo "Playlist ";

$xfile = @file("music.txt"); $random_num = rand (0,count($xfile)-1); $udata = explode("::",$xfile[$random_num]); echo $udata[1];


music.txt (1 example) : ::name of .mp3 or 3gp


how i can make an option to add the a song into music.txt from my Owner tools ?? re allz

Hate romains that take codes from here and tell to all that they had made that External image (may be gone)

something else Fellow · 2,296 posts #2

I would rather code to database rather than a text doc 🙂 easier to edit. easier to delete. easier to add 🙂

something else Fellow · 2,296 posts #4

Something like this: (sorry if there is any errors couldnt be bothered to test it)

CREATE TABLE inca_tune ( id int(100) NOT NULL auto_increment, name varchar(100) NOT NULL default '', url varchar(200) NOT NULL default '', PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

//////////////////////////////////xhtml admincp CODEelse if($action=="addtune") { echo "<head>"; echo "<title>Add Tune</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">"; echo "</head>"; echo "<body>"; echo "<form action="admproc.php?action=addtune&sid=$sid" method="post">"; echo "name: <input name="name" maxlength="100"/> "; echo "Url:<input name="url" maxlength="200"/> "; echo "<input type="submit" value="Add"/>"; echo "</form>"; echo " "; echo "

<a href="index.php?action=admincp&sid=$sid"><img src="images/admn.gif" alt=""/>"; echo "Admin CP</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="images/home.gif" alt=""/>"; echo "Home</a>"; echo " "; echo "</body>"; exit(); }

//////////////////////////////////xhtml admincp CODEelse if($action=="viewtune") { echo "<head>"; echo "<title>tunes</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">"; echo "</head>"; echo "<body>"; echo "

"; $res = mysql_query("SELECT * FROM inca_tune"); while ($row = mysql_fetch_array($res)) { echo "<a href="$row[2]">$row[1]</a>; echo " <a href="admproc.php?action=deltune&sid=$sid&tid=$row[0]">*</a>"; echo " "; } echo " "; echo " "; echo "<a href="index.php?action=admincp&sid=$sid"><img src="../images/admn.gif" alt=""/>Admin CP</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo " "; echo "</body>"; exit(); }

/////////////////////////////xhtml adminproc CODEelse if($action=="addtune"){ $name = $_POST["name"]; $url = $_POST["url"]; echo "<head>"; echo "<title>Add Tune</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">"; echo "</head>"; echo "<body>"; echo " "; echo " "; $res = mysql_query("INSERT INTO inca_tune SET name='".$name."', url='".$url."'"); if($res){ echo "<img src="images$folder/ok.gif" alt="O"/>Tune Added Successfully"; }else{ echo "<img src="images$folder/notok.gif" alt="X"/>Error Adding Tune "; } echo "

<a href="admincp.php?action=addtune&sid=$sid">"; echo "Add Another Tune</a> "; echo "<a href="index.php?action=admincp&sid=$sid"><img src="images/admn.gif" alt=""/>"; echo "Admin CP</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="images/home.gif" alt=""/>"; echo "Home</a>"; echo " "; echo "</body>"; exit(); }

//////////////////////////delete tune xhtml admproc CODEelse if($action=="deltune"){ $tid = $_GET["tid"]; echo "<head>"; echo "<title>Delete Tune</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">"; echo "</head>"; echo "<body>"; echo " "; echo " "; $res = mysql_query("DELETE FROM inca_tune WHERE id='".$tid."'"); if($res){ echo "<img src="images/ok.gif" alt="O"/>Tune Deleted Successfully"; }else{ echo "<img src="images/notok.gif" alt="X"/>Error Deleting Tune "; } echo "

<a href="index.php?action=admincp&sid=$sid"><img src="images/admn.gif" alt=""/>"; echo "Admin CP</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="images/home.gif" alt=""/>"; echo "Home</a>"; echo " "; echo "</body>"; exit(); }

/////////////////////////////////wml admincp CODEelse if($action=="addtune") { echo "<card id="main" title="Add Tune">"; echo " "; echo "Add Tune

"; echo "Name:<input name="name" maxlength="100"/> "; echo "Url:<input name="url" maxlength="200"/> "; echo "<anchor>Add"; echo "<go href="admproc.php?action=addtune&sid=$sid" method="post">"; echo "<postfield name="name" value="$(name)"/>"; echo "<postfield name="url" value="$(url)"/>"; echo "</go></anchor>"; echo "

<a href="index.php?action=admincp&sid=$sid"><img src="images/admn.gif" alt=""/>"; echo "Admin CP</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="images/home.gif" alt=""/>"; echo "Home</a>"; echo " "; echo "</card>"; exit(); }

/////////////////////////////////wml admincp CODEelse if($action=="viewtune") { echo "<card id="main" title="tunes">"; echo "

"; $res = mysql_query("SELECT * FROM inca_tune"); while ($row = mysql_fetch_array($res)) { echo "<a href="$row[2]">$row[1]</a>; echo " <a href="admproc.php?action=deltune&sid=$sid&tid=$row[0]">*</a>"; echo " "; } echo " "; echo " "; echo "<a href="index.php?action=admincp&sid=$sid"><img src="../images$folder/admn.gif" alt=""/>Admin CP</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="../images$folder/home.gif" alt=""/>Home</a>"; echo " </card>"; exit(); }

/////////////////////////////wml admproc CODEelse if($action=="addtune"){ $name = $_POST["name"]; $url = $_POST["url"]; echo "<card id="main" title="Add Tune">"; echo " "; echo " "; $res = mysql_query("INSERT INTO inca_tune SET name='".$name."', url='".$url."'"); if($res){ echo "<img src="images$folder/ok.gif" alt="O"/>Tune Added Successfully"; }else{ echo "<img src="images$folder/notok.gif" alt="X"/>Error Adding Tune "; } echo "

<a href="admincp.php?action=addtune&sid=$sid">"; echo "Add Another Tune</a> "; echo "<a href="index.php?action=admincp&sid=$sid"><img src="images$folder/admn.gif" alt=""/>"; echo "Admin CP</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="images$folder/home.gif" alt=""/>"; echo "Home</a>"; echo " "; echo "</card>"; exit(); }

//////////////////////////delete tune wml admproc CODEelse if($action=="deltune"){ $tid = $_GET["tid"]; echo "<card id="main" title="tunes">"; echo " "; echo " "; $res = mysql_query("DELETE FROM inca_tune WHERE id='".$tid."'"); if($res){ echo "<img src="images/ok.gif" alt="O"/>Tune Deleted Successfully"; }else{ echo "<img src="images/notok.gif" alt="X"/>Error Deleting Tune "; } echo "

<a href="index.php?action=admincp&sid=$sid"><img src="images/admn.gif" alt=""/>"; echo "Admin CP</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="images/home.gif" alt=""/>"; echo "Home</a>"; echo " </card>"; exit(); }

Usage: CODE$tune = mysql_fetch_array(mysql_query("SELECT id, name, url FROM inca_tune ORDER BY RAND() ")); echo "Playlist "; if(isadmin(getuid_sid($sid))) { $star = " <a href="admproc.php?action=deltune&tid=$tune[0]&sid=$sid">*</a>"; } echo "<a href="$tune[2]">$tune[1]</a>$star ";

🙂

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close