Jump to content

gurhy

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Everything posted by gurhy

  1. well just checked but the page thats loading is there and is showing but that bit of script is also saying that the page dont exist. confusing. guess I have to keep that error and just leave that echo "File does not exist!\n"; blank so its just echo ""; cos I see all pages are loading and at the moment they are all still product.php for every page and no other url is visable so I leave that echo blank and no 1 ever notice the differnce while looking at the website like a friendly patch on the error hehe Thanks for all you help guys as this been bugging me for ages and never woulda got as far as I have with out you all here
  2. hmmm that code u just sent just got rid of the error, but dont want File does not exist! to be showing up on my main page, hehe dont get what file does not exist as all files do exist. Dont get what you mean Check your PHP.INI include path setting. what do you mean about include path setting???? I do not control this php.ini so
  3. I just used that script and now it reports all the pages like I need now I can add propa products and services. 1 bit I dont get is why I am now getting this error after adding this in :S Warning: main() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/owhostin/public_html/index1.php on line 56 Warning: main() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/owhostin/public_html/index1.php on line 56
  4. yea all in database are correct here is whats printed mgallforever Menu ID URL One URL Two 1 main.php 2 ?owh=product /pages/product.php 5 ?owh=Services pages/product.php 6 ?owh=Programs pages/product.php 10 ?owh=Order pages/product.php 11 ?owh=Policy pages/product.php 12 ?owh=Agreement pages/product.php 13 ?owh=Copyright pages/product.php page is not meant to display like that though so I am guessing you wanted to see if it printed any thing out
  5. just tried that, but gives the same result of not loading the page thats suppose to be included, just returns the page empty
  6. thats what calls this from the address bar index.php/?owh=Services
  7. just tried it but it lists every thing in 1 go Iwhat I mean is to list every thing but will not show that page unless I click the URL thats what the if($owh == $row['url']){ comes in, but its not showing the way it should
  8. Hi all just wondering if any 1 know how to make this work? <? $main_page = mysql_query("SELECT * FROM menu") or die(mysql_error()); while ($row = mysql_fetch_array ($main_page)) { if($owh == $row["url"]) { include("$row[url2]"); } } ?> at the moment it anly displays the first page in the database but I would like it to pull all the info from it (every row) which is only 10 rows. I am not sure what to do
  9. Hi I am still trying to sort this but so far with no luck. I would really love t have this script working but I just cant figure this out :S <?php if ( !defined('BLOCK_FILE') ) { Header("Location: ../index.php"); die(); } global $prefix, $db; $content .= " <style type=\"text/css\"> <!-- .style1 { font-family: Arial, Helvetica, sans-serif; font-weight: bold; } .style2 {font-family: Arial, Helvetica, sans-serif} .style37 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; } --> </style> <table width='100%' cellpadding='0' cellspacing='0'> <TR height='20'> <TD align='left'><span class='style1'>Game</span></TD> <TD width='60%' align='left'><span class='style1'>Name</span></TD> <TD width='1%' align='left'><span class='style1'>Q</span></TD> <TD align='center'><span class='style1'>Size</span></TD> <TD width='1%' align='left'><span class='style2'></span></TD> <TD align='center'><span class='style2'><strong>Category</strong></span></TD> </TR> <TR>"; $result = $db->sql_query("SELECT lid, title, game, category, totalcomments, date, filesize FROM ".$prefix."_downloads_downloads ORDER BY lid DESC"); while ($row = $db->sql_fetchrow($result)) { $lid = intval($row['lid']); $title = filter($row['title'], "nohtml"); $title2 = ereg_replace("_", " ", $title); $game = ($row['game']); $category = ($row['category']); $date = ($row['date']); $sizez = ($row['filesize']); $size += $row[ "filesize" ]; $totalcomments = ($row['totalcomments']); $content .= ". print_r(formatfilesize($size)); ." <TD align='left'> <span class='style37'>$game</span></TD> <TD align='left'> <span class='style37'> <A title='$title2' href='modules.php?name=Downloads&d_op=viewdownloaddetails&lid=$lid&title=$title'>$title2</A></span></TD> <TD align='left'> <span class='style37'>$totalcomments</span></TD> <TD align='right'> <span class='style37'>"; $content .= " </span></TD> <TD align='right'> </TD> <TD align='center'> <span class='style37'>$category</span></TD> </TR>"; } $content .= "</table> "; function formatfilesize( $size ) { // bytes if( $size < 1024 ) { echo $size . " bytes"; } // kilobytes else if( $size < 1024000 ) { echo round( ( $size / 1024 ), 1 ) . "k"; } // megabytes else { echo round( ( $size / 1024000 ), 1 ) . " MB"; }} ?>
  10. google this --> php scripts you will find several sites that offer this, some on this site http://www.hotscripts.com has loads f stuff some are free and others are not, jus search through it.
  11. on bottom code $find=mysql_query("SELECT MAX(comments) as maxc FROM blog WHERE `id`='$id'"); replace with this $find=mysql_query("SELECT MAX(comments) as maxc FROM blog WHERE id='$id'"); I am looking at the rest of the code but some 1 might help better
  12. omg I think that will need some serious coding, lol, but when you find out I wanna know also I will experiment with it lol
  13. Hey there I just tried it and works perfectly, if I di it to way I am sure you said. It breaks a line when you press enter and when you submit it echo it the way you typed it out <? $optional_comment2 = ereg_replace("\\\'","'",$optional_comment2); $optional_comment2 = ereg_replace("\n","<br>\n",$optional_comment2); $optional_comment2 = ereg_replace("\"",""",$optional_comment2); echo $optional_comment2 ?><form action="" action="get"> <textarea name="optional_comment2"></textarea> <input type="submit" value="Submit"> </form>
  14. May I ask how much are you paying fr the space on their server?
  15. Please, this is the last bit I need doing for this script for now, so I can then activate for all my members on the site to see, rather than having the old plane version I have that came with the script, If there is some way that will give me the exact same result I want that will print inside the $contect .=" "; I may just take it, but has to work correctly and display the file size correctly
  16. hi, I put that function at the bottom of the php file and now the error has gone and prints the sizes, although they are wrong but I sort that later How do you print this formatfilesize( $size ); inside this $contents .="loop numbers in here"; this is where everything in the block has to be in order to display on the website correctly. I am kinda asking alot, sorry, but do you think you could fix that bit of the code on the file I attached? it has to loop in the correct way. if you go to this website http://eliteforce2.filefront.com/ loot towards the bottom you will find a simular thingk to what I am making look for " EF 2 Files' Latest 50 Files " this is how it should print out. you may of guessed from the file but this is so you can see a working version in action
  17. Hi all im new to this forum. I hope in in the correct place to post this. What I am trying to do is make a script that will print out a file size from bytes in to kb, mb. gb but nothing seems to work properly as this is the error I get 6.8 MB Fatal error: Cannot redeclare formatfilesize() (previously declared in /home/voyager/public_html/blocks/block-latest_50.php:44) in /home/voyager/public_html/blocks/block-latest_50.php on line 44 line 44 is this "function formatfilesize( $size ) {" it needs to run through a loop then print out in side $content .="$size"' I have attached the php file of this so you can see what I am trying to do as I have never worked with functions before so I have no clue what to do. This php file is a block I am making for php-nuke that I run on my site, and there was no block like this what I wanted so I thought I make my own, but it is only this I am having problems with [attachment deleted by admin]
×
×
  • 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.