Advertisement
Vendettaaaa

Untitled

Jul 3rd, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.07 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  4. <title>TheForums</title>
  5. </head>
  6. <body>
  7.  
  8. <?php
  9. error_reporting(E_ALL);
  10. ini_set('display_errors', 1);
  11.    
  12. require_once('fourmsAPI.php');
  13. /*
  14. function tinyf_forums_get($extra ='')
  15. {
  16.     global $tf_handle;
  17.     $query = sprintf("SELECT * FROM `forums` %s",$extra );
  18.     $qresult = mysqli_query($tf_handle, $query);
  19.    
  20.     if (!$qresult)
  21.         return NULL;
  22.     $recount = mysqli_num_rows($qresult);
  23.     if ($recount == 0)
  24.         return NULL ;
  25.     $forums = array();
  26.     for($i = 0 ; $i < $recount ; $i++)
  27.         $users[count($forums)] = mysqli_fetch_object($qresult);
  28.     //mysql_free_result($qresult);
  29.    
  30.     return $forums;
  31.    
  32. }
  33. */
  34. $forums = tinyf_forums_get();
  35. if($forums == NULL)
  36. {
  37.     die('problem');
  38. }
  39. $fcount = count($forums);
  40. if($fcount == 0)
  41. {
  42.     die('No Forums ');
  43. }
  44. ?>
  45.  
  46. <ul type = "square">
  47. <?php
  48. for($i = 0 ; $i < $ucount ; $i++)
  49. {
  50.     $forum = $forums[$i];
  51.     echo "<li><a href = \"forums.php?id=$forum->id\"> $forum->title <a/> <br/> $forum->desc <br/> </li>"; //$array ->
  52.    
  53. }
  54. ?> 
  55. </ul>  
  56.  
  57. </body>
  58. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement