Help Needed Please

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

    Help Needed Please

    This is the page for my downloads right...

    Nothing rong with it, it works fine...
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
    ///////////////////////////////////Quintin&#39;s Downloads
    else if($action=="quintin_downloads")
    {
    addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
    include ("wapbuddy_settings.php");
    echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
    echo "<p align=\"center\">";
    echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
    ";
    echo "Quintin&#39;s Downloads";
    echo "</p>";
    echo "

    ";
    ////////////////////////////////////////////////////////////////////
    echo "<a href=\"downloads/pictures/index.php?action=main&amp;sid=$sid\">»Pictures</a>
    ";
    echo "<a href=\"downloads/anamations/index.php?action=main&amp;sid=$sid\">»Anamations</a>
    ";
    echo "<a href=\"downloads/mp3s/index.php?action=main&amp;sid=$sid\">»Mp3&#39;s</a>
    ";
    echo "<a href=\"downloads/afrikaanse_mp3s/index.php?action=main&amp;sid=$sid\">»Afrikaanse mp3&#39;s</a>
    ";
    echo "<a href=\"downloads/poly_ringtones/index.php?action=main&amp;sid=$sid\">»Poly ringtones</a>
    ";
    echo "<a href=\"downloads/afrikaanse_polys/index.php?action=main&amp;sid=$sid\">»Afrikaanse polys</a>
    ";
    echo "<a href=\"downloads/java_games/index.php?action=main&amp;sid=$sid\">»Java games</a>
    ";
    echo "<a href=\"downloads/my_pimped_mxits_(v3)/index.php?action=main&amp;sid=$sid\">»My pimped mxits</a>
    ";
    echo "<a href=\"downloads/afrikaanse_mxits/index.php?action=main&amp;sid=$sid\">»Afrikaanse mxits</a>
    ";
    echo "<a href=\"downloads/3gp_clips/index.php?action=main&amp;sid=$sid\">»3gp clips</a>
    ";
    echo "<a href=\"downloads/3gp_music_videos/index.php?action=main&amp;sid=$sid\">»3gp music videos</a>
    ";
    echo "<a href=\"downloads/afrikaanse_music_videos/index.php?action=main&amp;sid=$sid\">»Afrikaanse music videos</a>
    ";
    echo "<a href=\"downloads/funny_tones/index.php?action=main&amp;sid=$sid\">»Funny tones</a>
    ";
    /////////////////////////////////////////////////////
    echo "
    </p>";

    echo "<p align=\"center\">";

    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
    echo "</p>";
    echo "</card>";
    }

    ///////////////////////////////////

    </div>

    But now, how do i get this page to work right with my script

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
    <?
    header("Content-type: text/vnd.wap.wml");
    echo "<?xml version=\"1.0\"?>";
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

    include("../wapbuddy_settings.php");
    if (!isset($page)) {$page = 0;}
    $total = 0;

    if(!($dp = opendir("./"))) die ("Cannot open ./");
    $file_array = array();
    while ($file = readdir ($dp))
    {
    if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
    {
    $file_array[] = $file;
    }
    }
    $file_count = count ($file_array);
    sort ($file_array);
    ?>
    <wml>
    <card id="card1" title="<? echo $conf["site_name"] ?>">
    <p mode="nowrap">
    <do type="option" label="Home"><go href="../index.php"/></do>
    <? echo "<a href=\"../index.php\">Home</a>

    "; ?>
    <?

    if ($file_count > 0)
    {
    $first_record = $page * $conf["items_per_page"];
    $last_record = $first_record + $conf["items_per_page"];

    while (list($fileIndexValue, $file_name) = each ($file_array))
    {

    if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
    {

    echo "<a href=\"$file_name\">$file_name</a> (". round(filesize($file_name)/1024,1) . "kb)
    ";
    $total = $total + filesize($file_name);
    }
    }

    if (($file_count > 0) AND ($page != 0))
    {
    // previous button
    $prev_page = $page -1;
    echo "
    <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Prev</a>
    ";
    }


    if (($file_count > 0) AND ($last_record < $file_count))
    {
    // next button
    $next_page = $page + 1;
    echo "
    <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next</a>
    ";
    }
    echo "
    Directory:
    $file_count ";
    if ($file_count == 1)
    {echo "file";}
    else
    {echo "files";}

    echo " (" . round($total/1024,1) . "kb)";
    echo "
    <a href=\"../index.php\">Home</a>";
    }
    closedir($dp);
    ?>

    </p>
    </card>
    </wml>

    </div>

    Please, someone please help me, just want this page to work right with the script

    Click here!!!

    #2
    I hope this works, i have&#39;nt tested it....


    Code:
    ///////////////////////////////////Quintin&#39;s Downloads
    else if($action=="files_downloads")
    {
        addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
        include ("wapbuddy_settings.php");
        echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
        echo "<p align=\"center\">";
        echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
    ";
        echo "[b]Quintin&#39;s Downloads[/b]";
        echo "</p>";
        echo "
    
    [size="1"]";
    ////////////////////////////////////////////////////////////////////
    $conf["items_per_page"] = 10;   //NUMBER OF ITEMS PER PAGE
    $conf["directory_for_reading"] = &#39;./images&#39;;   //Directory you want to open
    if (!isset($page)) {$page = 0;}
    $total = 0;
    if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
    $file_array = array(); 
    while ($file = readdir ($dp))
        {
        if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] =  $file;
            }
        }
    $file_count = count ($file_array);
    sort ($file_array);
    
            if ($file_count > 0)
                {
                $first_record = $page * $conf["items_per_page"];
                $last_record = $first_record + $conf["items_per_page"];
                
                while (list($fileIndexValue, $file_name) = each ($file_array))
                    {
                    
                    if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
                        {
                
                        echo "<a href=\"$file_name\">$file_name</a> (". round(filesize($file_name)/1024,1) . "kb)
    ";
                        $total = $total + filesize($file_name);
                        }
                    }
                
                if (($file_count > 0) AND ($page != 0))
                    {
                    // previous button
                    $prev_page = $page -1;
                    echo "
    <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action\">Prev</a>
    ";
                    }
                
                
                if (($file_count > 0) AND ($last_record < $file_count))
                    {
                    // next button
                    $next_page = $page + 1;
                    echo "
    <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action\">Next</a>
    ";
                    }
                echo "
    Directory:
    $file_count ";
                if ($file_count == 1)
                    {echo "file";}
                else
                    {echo "files";}
                    
                echo " (" . round($total/1024,1) . "kb)";
                
                }
            closedir($dp);
    /////////////////////////////////////////////////////
      echo "[/size]</p>";
        
        echo "<p align=\"center\">";
        
        echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
      echo "</p>";
        echo "</card>";
    }
    
    ///////////////////////////////////
    Advertise your mobile site for FREE with AdTwirl

    Comment


      #3
      Thank you m8, your code works, but im having one problem, it&#39;s kicking me out when selecting next page, if someone could maybe have a look at that? plz?

      Click here!!!

      Comment


        #4
        Thank you m8, your code works, but im having one problem, it&#39;s kicking me out when selecting next page, if someone could maybe have a look at that? plz?[/b]
        HI, i have edited the code, it should be ok now, try it again....
        Advertise your mobile site for FREE with AdTwirl

        Comment


          #5
          Thank you so much m8, aprishiate it, working 100% lol thank you quickly fixed it up on my pc, gana ftp it in a few minuts when i sorted all out as i want it

          Click here!!!

          Comment


            #6
            [codebox]
            ///////////////////////////////////Quintin&#39;s Downloads
            else if($action=="quintin_downloads")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            echo "<a href=\"index.php?action=pictures_downloads&amp;sid =$sid\">»Pictures</a>
            ";
            echo "<a href=\"index.php?action=anamations_downloads&amp;s id=$sid\">»Anamations</a>
            ";
            echo "<a href=\"index.php?action=mp3s_downloads&amp;sid=$si d\">»Mp3&#39;s</a>
            ";
            echo "<a href=\"index.php?action=afrikaanse_mp3s_downloads& amp;sid=$sid\">»Afrikaanse mp3&#39;s</a>
            ";
            echo "<a href=\"index.php?action=poly_downloads&amp;sid=$si d\">»Poly ringtones</a>
            ";
            echo "<a href=\"index.php?action=afrikaanse_polys&amp;sid=$ sid\">»Afrikaanse polys</a>
            ";
            echo "<a href=\"index.php?action=java_games&amp;sid=$sid\"> »Java games</a>
            ";
            echo "<a href=\"index.php?action=my_pimped_mxits&amp;sid=$s id\">»My pimped mxits</a>
            ";
            echo "<a href=\"index.php?action=afrikaanse_mxits&amp;sid=$ sid\">»Afrikaanse mxits</a>
            ";
            echo "<a href=\"index.php?action=3gp_clips&amp;sid=$sid\">» 3gp clips</a>
            ";
            echo "<a href=\"index.php?action=3gp_music_videos&amp;sid=$ sid\">»3gp music videos</a>
            ";
            echo "<a href=\"index.php?action=afrikaanse_music_videos&am p;sid=$sid\">»Afrikaanse music videos</a>
            ";
            echo "<a href=\"index.php?action=funny_tones&amp;sid=$sid\" >»Funny tones</a>
            ";
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            /////////////////////////////////////////////////////////////////////////////////////////////
            //////////////////////////////////Afrikaanse Music Videos
            else if($action=="funny_tones")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/funny_tones&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <a href=\"../downloads/funny_tones/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////

            //////////////////////////////////Afrikaanse Music Videos
            else if($action=="afrikaanse_music_videos")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/afrikaanse_music_videos&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <a href=\"../downloads/afrikaanse_music_videos/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////


            //////////////////////////////////3gp Music Videos
            else if($action=="3gp_music_videos")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/3gp_music_videos&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <a href=\"../downloads/3gp_music_videos/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////


            //////////////////////////////////3gp Clips
            else if($action=="3gp_clips")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/3gp_clips&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <a href=\"../downloads/3gp_clips/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;

            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////

            //////////////////////////////////Afrikaanse Mxits
            else if($action=="afrikaanse_mxits")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/afrikaanse_mxits&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <a href=\"../downloads/afrikaanse_mxits/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////

            //////////////////////////////////My Pimped Mxits
            else if($action=="my_pimped_mxits")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/my_pimped_mxits_(v3)&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <a href=\"../downloads/my_pimped_mxits_(v3)/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////

            //////////////////////////////////Java Games
            else if($action=="java_games")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/java_games&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <a href=\"../downloads/java_games/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////

            //////////////////////////////////Afrikaanse Polys
            else if($action=="afrikaanse_polys")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/afrikaanse_polys&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <a href=\"../downloads/afrikaanse_polys/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////

            //////////////////////////////////Poly Downloads
            else if($action=="poly_downloads")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/poly_downloads&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <a href=\"../downloads/poly_downloads/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////

            //////////////////////////////////Afrikaanse Mp3&#39;s
            else if($action=="afrikaanse_mp3s_downloads")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/afrikaanse_mp3_downloads&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <a href=\"../downloads/afrikaanse_mp3_downloads/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////

            //////////////////////////////////Anamations
            else if($action=="anamations_downloads")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/anamations&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <img src=\"../downloads/anamations/$file_name\" alt=\"*\"/>";
            echo "
            <a href=\"../downloads/anamations/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////
            //////////////////////////////////Mp3&#39;s
            else if($action=="mp3s_downloads")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/mp3s&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <a href=\"../downloads/mp3s/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////

            //////////////////////////////////Pictures
            else if($action=="pictures_downloads")
            {
            addonline(getuid_sid($sid),"At Quintin&#39;s Downloads","");
            include ("wapbuddy_settings.php");
            echo "<card id=\"main\" title=\"Quintin&#39;s Downloads\">";
            echo "<p align=\"center\">";
            echo "<img src=\"images/quintin.gif\" alt=\"Downloads\"/>
            ";
            echo "Quintin&#39;s Downloads";
            echo "</p>";
            echo "

            ";
            ////////////////////////////////////////////////////////////////////
            $conf["items_per_page"] = 10; //NUMBER OF ITEMS PER PAGE
            $conf["directory_for_reading"] = &#39;../downloads/pictures&#39;; //Directory you want to open
            if (!isset($page)) {$page = 0;}
            $total = 0;
            if(!($dp = opendir($conf["directory_for_reading"] ))) die ("Cannot open ".$conf["directory_for_reading"] ."");
            $file_array = array();
            while ($file = readdir ($dp))
            {
            if(substr($file,0,1) != &#39;.&#39; and $file != "index.php")
            {
            $file_array[] = $file;
            }
            }
            $file_count = count ($file_array);
            sort ($file_array);

            if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];

            while (list($fileIndexValue, $file_name) = each ($file_array))
            {

            if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
            {
            echo "
            <img src=\"../downloads/pictures/$file_name\" alt=\"*\"/>";
            echo "
            <a href=\"../downloads/pictures/$file_name\">$file_name</a>
            ";
            $total = $total + filesize($file_name);
            }
            }

            if (($file_count > 0) AND ($page != 0))
            {
            // previous button
            $prev_page = $page -1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;sid=$sid&amp;action=$action \">Prev</a>
            ";
            }


            if (($file_count > 0) AND ($last_record < $file_count))
            {
            // next button
            $next_page = $page + 1;
            echo "
            <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;sid=$sid&amp;action=$action \">Next</a>
            ";
            }
            }
            closedir($dp);
            /////////////////////////////////////////////////////
            echo "
            </p>";

            echo "<p align=\"center\">";

            echo "<a href=\"index.php?action=quintin_downloads&amp;sid= $sid\">";
            echo "Back</a>
            ";

            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
            echo "</p>";
            echo "</card>";
            }

            ///////////////////////////////////

            [/codebox]

            Done!!! Thank you!!! Now just have to convert it to xhtml
            Attached Files

            Click here!!!

            Comment

            Working...
            X