Playlist

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Playlist

    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

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

    Comment


      #3
      yes u right...hmm
      Hate romains that take codes from here and tell to all that they had made that

      Comment


        #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
        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else 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&amp;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 "<p align=\"center\">";
        echo "

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

        //////////////////////////////////xhtml admincp
        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else 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&amp;sid=$sid&amp ;tid=$row[0]\">*</a>";
        echo "
        ";
        }
        echo "</p>";
        echo "<p align=\"center\">";
        echo "<a href=\"index.php?action=admincp&amp;sid=$sid\"><im g src=\"../images/admn.gif\" alt=\"\"/>Admin CP</a>
        ";
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
        echo "</p>";
        echo "</body>";
        exit();
        }</div>

        /////////////////////////////xhtml adminproc
        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else 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 "<p align=\"center\">";
        echo "
        ";
        $res = mysql_query("INSERT INTO inca_tune SET name=&#39;".$name."&#39;, url=&#39;".$url."&#39;");
        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&amp;sid=$sid\">" ;
        echo "Add Another Tune</a>
        ";
        echo "<a href=\"index.php?action=admincp&amp;sid=$sid\"><im g src=\"images/admn.gif\" alt=\"*\"/>";
        echo "Admin CP</a>
        ";
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
        echo "Home</a>";
        echo "</p>";
        echo "</body>";
        exit();
        }</div>

        //////////////////////////delete tune xhtml admproc
        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else 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 "<p align=\"center\">";
        echo "
        ";
        $res = mysql_query("DELETE FROM inca_tune WHERE id=&#39;".$tid."&#39;");
        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&amp;sid=$sid\"><im g src=\"images/admn.gif\" alt=\"*\"/>";
        echo "Admin CP</a>
        ";
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
        echo "Home</a>";
        echo "</p>";
        echo "</body>";
        exit();
        }</div>

        /////////////////////////////////wml admincp
        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action=="addtune")
        {
        echo "<card id=\"main\" title=\"Add Tune\">";
        echo "<p align=\"center\">";
        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&amp;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&amp;sid=$sid\"><im g src=\"images/admn.gif\" alt=\"*\"/>";
        echo "Admin CP</a>
        ";
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
        echo "Home</a>";
        echo "</p>";
        echo "</card>";
        exit();
        }</div>

        /////////////////////////////////wml admincp
        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else 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&amp;sid=$sid&amp ;tid=$row[0]\">*</a>";
        echo "
        ";
        }
        echo "</p>";
        echo "<p align=\"center\">";
        echo "<a href=\"index.php?action=admincp&amp;sid=$sid\"><im g src=\"../images$folder/admn.gif\" alt=\"\"/>Admin CP</a>
        ";
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images$folder/home.gif\" alt=\"\"/>Home</a>";
        echo "</p></card>";
        exit();
        }</div>

        /////////////////////////////wml admproc
        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action=="addtune"){
        $name = $_POST["name"];
        $url = $_POST["url"];
        echo "<card id=\"main\" title=\"Add Tune\">";
        echo "<p align=\"center\">";
        echo "
        ";
        $res = mysql_query("INSERT INTO inca_tune SET name=&#39;".$name."&#39;, url=&#39;".$url."&#39;");
        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&amp;sid=$sid\">" ;
        echo "Add Another Tune</a>
        ";
        echo "<a href=\"index.php?action=admincp&amp;sid=$sid\"><im g src=\"images$folder/admn.gif\" alt=\"*\"/>";
        echo "Admin CP</a>
        ";
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images$folder/home.gif\" alt=\"*\"/>";
        echo "Home</a>";
        echo "</p>";
        echo "</card>";
        exit();
        }</div>

        //////////////////////////delete tune wml admproc
        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action=="deltune"){
        $tid = $_GET["tid"];
        echo "<card id=\"main\" title=\"tunes\">";
        echo "<p align=\"center\">";
        echo "
        ";
        $res = mysql_query("DELETE FROM inca_tune WHERE id=&#39;".$tid."&#39;");
        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&amp;sid=$sid\"><im g src=\"images/admn.gif\" alt=\"*\"/>";
        echo "Admin CP</a>
        ";
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
        echo "Home</a>";
        echo "</p></card>";
        exit();
        }</div>

        Usage:
        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$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&amp;tid=$tune[0]&amp;sid=$sid\">*</a>";
        }
        echo "<a href=\"$tune[2]\">$tune[1]</a>$star
        ";</div>

        Comment


          #5
          thx very much ..i will test it:D
          Hate romains that take codes from here and tell to all that they had made that

          Comment

          Working...
          X