Wapbuddy Addon

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

2 replies · 585 views · started 19 years ago · 1 min read

2 participants
modfiles Developer · 200 posts #1

Can sum1 make this script to work. cant figure out the problem. Help will be much appreciated..

CODE$conf["items_per_page"] = 8; header("Content-type: text/vnd.wap.wml"); header("Cache-Control: no-store, no-cache, must-revalidate"); print ""; echo "";

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) != '.' and $file != "index.php") { $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); ?>

include("../../setting1.php"); echo " "; include("../../setting2.php"); echo "

";

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 "$file_name "; echo "Download (". round(filesize($file_name)/1024,1) . "kb)

"; $total = $total + filesize($file_name); } }

{echo '

'; echo '----- '; include("../../setting3.php"); echo ' '; } if (($file_count > 0) AND ($page != 0)) { // previous button $prev_page = $page -1; echo "

<<Prev "; } if (($file_count > 0) AND ($last_record < $file_count))

{ // next button $next_page = $page + 1; echo "Next>> "; } echo "$file_count "; if ($file_count == 1) {echo "File";} else {echo "Files";} echo " ";

if ($page == "")$page = "1"; $pages =(int) ceil($file_count/ $conf); echo "Page $page/$pages "; echo "----- "; echo "Ringtones"; echo " Home"; } closedir($dp); ?>

amylee Principal · 1,092 posts #2

be a good idea to know what errors your currently getting

modfiles Developer · 200 posts #3

i was able to solve the first problem but as i put another add on, another problem again.. how can i remove in sub index the code that should only appear in main index as you click the download link??? and what should be the code for the total page display?? CODE$conf["items_per_page"] = 8; header("Content-type: text/vnd.wap.wml"); header("Cache-Control: no-store, no-cache, must-revalidate"); print ""; echo "";

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) != '.' and $file != "index.php")

{ $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); ?>

include("../../../admob.php"); echo "

";

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)) if(!isset($_GET['download'])) $_GET['download'] = ''; switch($_GET['download']) { case ''; echo "$file_name "; echo "Download (". round(filesize($file_name)/1024,1) . "kb)

";

break; case "$file_name"; echo "Download File: "; echo "$file_name (". round(filesize($file_name)/1024,1) . "kb) "; $total = $total + filesize($file_name); } }

echo '

'; echo '----- '; include("../../../admob.php"); echo ' ';

if (($file_count > 0) AND ($page != 0))

{ // previous button $prev_page = $page -1; echo "

<<Prev "; }
if (($file_count > 0) AND ($last_record < $file_count)) { // next button $next_page = $page + 1; echo "Next>> "; }

Page (1/total page)

echo "

"; include("../../../buzzcity.php"); echo "

"; echo "Nseries Games "; echo "Java Games"; echo " Home"; }

closedir($dp); ?>

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