Thread subject: pHpFusion Nederlands (BE|NL) » Ondersteuning, Themas, Infusies, Modificaties en Installatie :: weblinks aangepast

Posted by ivoht on 09 januari 2010, 14:06
#1

Hallo,

de file weblinks.php uit de root directory heb ik als volgt aangepast;
Code


/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: weblinks.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."weblinks.php";

if (isset($_GET['weblink_id']) && isnum($_GET['weblink_id'])) {
   $res = 0;
   if ($data = dbarray(dbquery("SELECT weblink_url,weblink_cat FROM ".DB_WEBLINKS." WHERE weblink_id='".$_GET['weblink_id']."'"))) {
      $cdata = dbarray(dbquery("SELECT * FROM ".DB_WEBLINK_CATS." WHERE weblink_cat_id='".$data['weblink_cat']."'"));
      if (checkgroup($cdata['weblink_cat_access'])) {
         $res = 1;
         $result = dbquery("UPDATE ".DB_WEBLINKS." SET weblink_count=weblink_count+1 WHERE weblink_id='".$_GET['weblink_id']."'");
         redirect($data['weblink_url']);
      }
   }
   if ($res == 0) { redirect(FUSION_SELF); }
}

add_to_title($locale['global_200'].$locale['400']);

if (!isset($_GET['cat_id']) || !isnum($_GET['cat_id'])) {
   opentable($locale['400']);
   $result = dbquery("SELECT * FROM ".DB_WEBLINK_CATS." WHERE ".groupaccess('weblink_cat_access')." ORDER BY weblink_cat_name");
   $rows = dbrows($result);
   if ($rows != 0) {
      $counter = 0; $columns = 2;
      echo "\n\n";
      while ($data = dbarray($result)) {
         if ($counter != 0 && ($counter % $columns == 0)) { echo "\n\n"; }
         $num = dbcount("(weblink_cat)", DB_WEBLINKS, "weblink_cat='".$data['weblink_cat_id']."'");
         echo "\n";
         $counter++;
      }
      echo "\n
".$data['weblink_cat_name']." ($num)";
         if ($data['weblink_cat_description'] != "") { echo "
\n".$data['weblink_cat_description'].""; }
         echo "
\n";
   } else {
      echo "

\n".$locale['430']."

\n
\n";
   }
   closetable();
} else {
   $res = 0;
   $result = dbquery("SELECT * FROM ".DB_WEBLINK_CATS." WHERE weblink_cat_id='".$_GET['cat_id']."'");
   if (dbrows($result) != 0) {
      $cdata = dbarray($result);
      if (checkgroup($cdata['weblink_cat_access'])) {
         $res = 1;
         add_to_title($locale['global_201'].$cdata['weblink_cat_name']);
         opentable($locale['400'].": ".$cdata['weblink_cat_name']);
         $rows = dbcount("(weblink_id)", DB_WEBLINKS, "weblink_cat='".$_GET['cat_id']."'");
         if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
         if ($rows != 0) {
            $result = dbquery("SELECT * FROM ".DB_WEBLINKS." WHERE weblink_cat='".$_GET['cat_id']."' ORDER BY ".$cdata['weblink_cat_sorting']." LIMIT ".$_GET['rowstart'].",15");
            $numrows = dbrows($result); $i = 1;
            while ($data = dbarray($result)) {
               if ($data['weblink_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
                  $new = " ".$locale['410']."";
               } else {
                  $new = "";
               }
               echo "\n";
               echo "\n\n\n";
               if ($data['weblink_description'] != "") echo "\n\n\n
".$data['weblink_name']."$new
".nl2br(stripslashes($data['weblink_description']))."
\n";
               if ($i != $numrows) { echo "
''
\n"; $i++; }
            }
            closetable();
            if ($rows > 15) { echo "
\n".makepagenav($_GET['rowstart'], 15, $rows, 3, FUSION_SELF."?cat_id=".$_GET['cat_id']."&")."\n
\n"; }
         } else {
            echo $locale['431']."\n";
            closetable();
         }
      }
   }
   if ($res == 0) { redirect(FUSION_SELF); }
}

require_once THEMES."templates/footer.php";
?>



Nu heb ik op http://www.oellies.nl/v3.0/weblinks.php 3 groepen aangemaakt; de groep met vereningingen wordt als gewnest getoond. Bij de andere 2 groepen is echter de footer van de gehele site, tussen de links in gesprongen.
Wat doe ik verkeerd in de code en hoe herstel ik dat?