$orderby = preg_replace("[AIRLINE %]", "", $_GET['orderby']);
$orderby = ($_GET['sortby'] == "all" ? "" : " WHERE forum_name LIKE '".stripinput($_GET['sortby'])."%'");
$orderby = ($_GET['sortby'] == "all" ? "" : " WHERE forum_name LIKE '".stripinput($_GET['sortby'])."%' or forum_name LIKE '['".stripinput($_GET['sortby'])."%'");
opentablex($locale['01']);
if (iMEMBER) {
if (!isset($_GET['sortby']) || !ctype_alnum($_GET['sortby'])) { $_GET['sortby'] = "all"; }
//$orderby = ($_GET['sortby'] == "all" ? "" : " AND forum_name LIKE '".stripinput($_GET['sortby'])."%'");
$orderby = ($_GET['sortby'] == "all" ? "" : " WHERE forum_name LIKE '".stripinput($_GET['sortby'])."%' or forum_name LIKE '['".stripinput($_GET['sortby'])."%'");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat != '0'".$orderby);
$rows = dbrows($result);
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows) {
$i = 0;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='tbl2'><strong>".$locale['401']."</strong></td>\n";
echo "<td class='tbl2'><strong>".$locale['405']."</strong></td>\n";
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['402']."</strong></td>\n";
echo "</tr>\n";
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat >'0'".$orderby." ORDER BY forum_name ASC LIMIT ".$_GET['rowstart'].",20");
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='$cell_color'>\n
<a href='".FORUM."viewforum.php?forum_id=".$data['forum_id']."' title='".$data['forum_name']."' class='side'>".$data['forum_name']."</a></td>\n";
echo "<td align='right' class='$cell_color'>[".($data['forum_postcount'])."]</td>\n</tr>\n";
echo "</tr>";
}
echo "</table>\n";
} else {
echo "<center><br />\n".$locale['05']."<b>".$_GET['sortby']."</b><br /><br />\n</center>\n";
}
$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<hr />\n<table cellpadding='0' cellspacing='1' class='tbl-border center'>\n<tr>\n";
echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['04']."</a></td>";
for ($i = 0; $i < 36 != ""; $i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i == 17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['04']."</a></td>\n</tr>\n<tr>\n" : "\n");
}
echo "</tr>\n</table>\n";
}
closetable();
$orderby = ($_GET['sortby'] == "all" ? "" : " WHERE forum_name LIKE '".stripinput($_GET['sortby'])."%' or forum_name LIKE '['".stripinput($_GET['sortby'])."%'");
$orderby = ($_GET['sortby'] == "all" ? "" : " WHERE forum_name LIKE '".stripinput($_GET['sortby'])."%' or forum_name LIKE '[".stripinput($_GET['sortby'])."%'");
$panelName = 'a_bis_z_panel'; //dont change
if (file_exists (INFUSIONS.$panelName.'/locale/'.$settings['locale'].'.php'))
include INFUSIONS.$panelName.'/locale/'.$settings['locale'].'.php';
else
include INFUSIONS.$panelName.'/locale/English.php';
opentablex($locale['abz01']);
if (iMEMBER) {
if (!isset($_GET['sortby']) || !ctype_alnum($_GET['sortby'])) { $_GET['sortby'] = "all"; }
//$orderby = ($_GET['sortby'] == "all" ? "" : " AND forum_name LIKE '".stripinput($_GET['sortby'])."%'");
$orderby = ($_GET['sortby'] == "all" ? "" : " AND forum_name LIKE '".stripinput($_GET['sortby'])."%' OR forum_name LIKE '[".stripinput($_GET['sortby'])."%'");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat > '0'".$orderby);
$rows = dbrows($result);
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows) {
$i = 0;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td align='left' class='tbl2'><strong>".$locale['abz02']."</strong></td>\n";
//echo "<td align='left' width='10%' class='tbl2'><strong>".$locale['abz03']."</strong></td>\n";
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['abz07']."</strong></td>\n";
echo "</tr>\n";
//$result = dbquery("SELECT * FROM ".DB_FORUMS."".$orderby." ORDER BY forum_name ASC LIMIT ".$_GET['rowstart'].",20");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat>'0'".$orderby." ORDER BY forum_name ASC, forum_name LIMIT ".$_GET['rowstart'].",10");
while ($data = dbarray($result)) {
//$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='tbl2'>\n<a href='".FORUM."viewforum.php?forum_id=".$data['forum_id']."' title='".$data['forum_name']."' class='side'>".$data['forum_name']."</a></td>\n";
//echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".$data['forum_threadcount']."</td>\n";
//echo "<td align='center' class='tbl2'>[".($data['forum_postcount'])."]</td>\n";
//echo "<td width='1%' class='tbl2' style='white-space:nowrap'>";
if ($data['forum_postcount'] == 0) {
echo "<td align='left' class='tbl2'>".$locale['abz06']."</td>\n";
} else {
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".showdate("forumdate", $data['forum_lastpost'])."</td>\n";
}
echo "</tr>";
}
echo "</table>\n";
} else {
echo "<center><br />\n".$locale['abz05']."<b>".$_GET['sortby']."</b><br /><br />\n</center>\n";
}
$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<hr />\n<table cellpadding='0' cellspacing='1' class='tbl-border center'>\n<tr>\n";
//echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['abz04']."</a></td>";
for ($i = 0; $i < 36 != ""; $i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i == 17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['abz04']."</a></td>\n</tr>\n<tr>\n" : "\n");
//echo ($i == 17 ? "<td rowspan='2' class='tbl2'><tr>\n" : "\n");
}
echo "</tr>\n</table>\n";
}
closetable();
if ($rows > 10) { echo "<div style='text-align:center;' style='margin-top:5px;'>".makepagenav($_GET['rowstart'], 10, $rows, 3, FUSION_SELF."?sortby=".$_GET['sortby']."&")."</div>\n"; }
?>
<?
$panelName = 'a_bis_z_panel'; //dont change
if (file_exists (INFUSIONS.$panelName.'/locale/'.$settings['locale'].'.php'))
include INFUSIONS.$panelName.'/locale/'.$settings['locale'].'.php';
else
include INFUSIONS.$panelName.'/locale/English.php';
opentablex($locale['abz01']);
if (iMEMBER) {
if (isset($_GET['sortby']) && ctype_alnum($_GET['sortby'])) {
//$orderby = ($_GET['sortby'] == "all" ? "" : " AND forum_name LIKE '".stripinput($_GET['sortby'])."%'");
$orderby = ($_GET['sortby'] == "all" ? "" : " AND forum_name LIKE '".stripinput($_GET['sortby'])."%' OR forum_name LIKE '[".stripinput($_GET['sortby'])."%'");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat > '0'".$orderby);
$rows = dbrows($result);
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows) {
$i = 0;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td align='left' class='tbl2'><strong>".$locale['abz02']."</strong></td>\n";
//echo "<td align='left' width='10%' class='tbl2'><strong>".$locale['abz03']."</strong></td>\n";
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['abz07']."</strong></td>\n";
echo "</tr>\n";
//$result = dbquery("SELECT * FROM ".DB_FORUMS."".$orderby." ORDER BY forum_name ASC LIMIT ".$_GET['rowstart'].",20");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat>'0'".$orderby." ORDER BY forum_name ASC, forum_name LIMIT ".$_GET['rowstart'].",10");
while ($data = dbarray($result)) {
//$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='tbl2'>\n<a href='".FORUM."viewforum.php?forum_id=".$data['forum_id']."' title='".$data['forum_name']."' class='side'>".$data['forum_name']."</a></td>\n";
//echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".$data['forum_threadcount']."</td>\n";
//echo "<td align='center' class='tbl2'>[".($data['forum_postcount'])."]</td>\n";
//echo "<td width='1%' class='tbl2' style='white-space:nowrap'>";
if ($data['forum_postcount'] == 0) {
echo "<td align='left' class='tbl2'>".$locale['abz06']."</td>\n";
} else {
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".showdate("forumdate", $data['forum_lastpost'])."</td>\n";
}
echo "</tr>";
}
echo "</table>\n";
} else {
echo "<center><br />\n".$locale['abz05']."<b>".$_GET['sortby']."</b><br /><br />\n</center>\n";
}
}
$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<hr />\n<table cellpadding='0' cellspacing='1' class='tbl-border center'>\n<tr>\n";
//echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['abz04']."</a></td>";
for ($i = 0; $i < 36 != ""; $i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i == 17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['abz04']."</a></td>\n</tr>\n<tr>\n" : "\n");
//echo ($i == 17 ? "<td rowspan='2' class='tbl2'><tr>\n" : "\n");
}
echo "</tr>\n</table>\n";
}
closetable();
if ($rows > 10) { echo "<div style='text-align:center;' style='margin-top:5px;'>".makepagenav($_GET['rowstart'], 10, $rows, 3, FUSION_SELF."?sortby=".$_GET['sortby']."&")."</div>\n"; }
<?
/*---------------------------------------------------+
| PHPFusion 7 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| INFUSION: Forum Overview
+----------------------------------------------------+
| Copyright © 2016
+---------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."forumoverview.php";
opentablex($locale['abz01']);
if (iMEMBER) {
if (isset($_GET['sortby']) && ctype_alnum($_GET['sortby'])) {
//$orderby = ($_GET['sortby'] == "all" ? "" : " AND forum_name LIKE '".stripinput($_GET['sortby'])."%'");
$orderby = ($_GET['sortby'] == "all" ? "" : " AND ".groupaccess('forum_access')." AND forum_name LIKE '".stripinput($_GET['sortby'])."%' OR forum_name LIKE '[".stripinput($_GET['sortby'])."%'");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat > '0'".$orderby);
$rows = dbrows($result);
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows) {
$i = 0;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td align='left' class='tbl2'><strong>".$locale['abz02']."</strong></td>\n";
//echo "<td align='left' width='10%' class='tbl2'><strong>".$locale['abz03']."</strong></td>\n";
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['abz07']."</strong></td>\n";
echo "</tr>\n";
//$result = dbquery("SELECT * FROM ".DB_FORUMS."".$orderby." ORDER BY forum_name ASC LIMIT ".$_GET['rowstart'].",20");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat>'0'".$orderby." AND ".groupaccess('forum_access')." ORDER BY forum_name ASC, forum_name LIMIT ".$_GET['rowstart'].",10");
while ($data = dbarray($result)) {
//$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='tbl2'>\n<a href='".FORUM."viewforum.php?forum_id=".$data['forum_id']."' title='".$data['forum_name']."' class='side'>".$data['forum_name']."</a></td>\n";
//echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".$data['forum_threadcount']."</td>\n";
//echo "<td align='center' class='tbl2'>[".($data['forum_postcount'])."]</td>\n";
//echo "<td width='1%' class='tbl2' style='white-space:nowrap'>";
if ($data['forum_postcount'] == 0) {
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".$locale['abz06']."</td>\n";
} else {
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".showdate("forumdate", $data['forum_lastpost'])."</td>\n";
}
echo "</tr>";
}
echo "</table>\n";
} else {
echo "<center><br />\n".$locale['abz05']."<b>".$_GET['sortby']."</b>".$locale['abz10']."<br /><br />\n</center>\n";
}
}
$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<hr />\n<table cellpadding='0' cellspacing='1' class='tbl-border center'>\n<tr>\n";
//echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['abz04']."</a></td>";
for ($i = 0; $i < 36 != ""; $i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i == 17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['abz04']."</a></td>\n</tr>\n<tr>\n" : "\n");
//echo ($i == 17 ? "<td rowspan='2' class='tbl2'><tr>\n" : "\n");
}
echo "</tr>\n</table>\n";
}
closetable();
if ($rows > 10) { echo "<div style='text-align:center;' style='margin-top:5px;'>".makepagenav($_GET['rowstart'], 10, $rows, 3, FUSION_SELF."?sortby=".$_GET['sortby']."&")."</div>\n"; }
require_once THEMES."templates/footer.php";
?>
opentablex($locale['abz01']);
if(!isset($_GET['rowstart']) && !isnum($_GET['rowstart'])) $_GET['rowstart']=0;
$row=0;
if(!isset($_GET['sortby'])) $_GET['sortby']='';
Quote
In our Database we have 125 threads with 1079 entries
<?
/*---------------------------------------------------+
| PHPFusion 7 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| INFUSION: Forum Overview
+----------------------------------------------------+
| Copyright © 2016
+---------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."forumoverview.php";
opentablex($locale['abz01']);
if(!isset($_GET['rowstart']) && !isnum($_GET['rowstart'])) $_GET['rowstart']=0;
$row=0;
if(!isset($_GET['sortby'])) $_GET['sortby']='';
if (iMEMBER) {
if (isset($_GET['sortby']) && ctype_alnum($_GET['sortby'])) {
//$orderby = ($_GET['sortby'] == "all" ? "" : " AND forum_name LIKE '".stripinput($_GET['sortby'])."%'");
$orderby = ($_GET['sortby'] == "all" ? "" : " AND ".groupaccess('forum_access')." AND forum_name LIKE '".stripinput($_GET['sortby'])."%' OR forum_name LIKE '[".stripinput($_GET['sortby'])."%'");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat > '0'".$orderby);
$rows = dbrows($result);
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows) {
$i = 0;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='tbl1' align='center' colspan='4'>".$locale['abz11']."<b>$forums_rows</b> ".$locale['abz12']." <b>$threads_rows</b>".$locale['abz13']."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='left' class='tbl2'><strong>".$locale['abz02']."</strong></td>\n";
//echo "<td align='left' width='10%' class='tbl2'><strong>".$locale['abz03']."</strong></td>\n";
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['abz07']."</strong></td>\n";
echo "</tr>\n";
//$result = dbquery("SELECT * FROM ".DB_FORUMS."".$orderby." ORDER BY forum_name ASC LIMIT ".$_GET['rowstart'].",20");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat>'0'".$orderby." AND ".groupaccess('forum_access')." ORDER BY forum_name ASC, forum_name LIMIT ".$_GET['rowstart'].",10");
while ($data = dbarray($result)) {
//$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='tbl2'>\n<a href='".FORUM."viewforum.php?forum_id=".$data['forum_id']."' title='".$data['forum_name']."' class='side'>".$data['forum_name']."</a></td>\n";
//echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".$data['forum_threadcount']."</td>\n";
//echo "<td align='center' class='tbl2'>[".($data['forum_postcount'])."]</td>\n";
//echo "<td width='1%' class='tbl2' style='white-space:nowrap'>";
if ($data['forum_postcount'] == 0) {
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".$locale['abz06']."</td>\n";
} else {
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".showdate("forumdate", $data['forum_lastpost'])."</td>\n";
}
echo "</tr>";
}
echo "</table>\n";
} else {
echo "<center><br />\n".$locale['abz05']."<b>".$_GET['sortby']."</b>".$locale['abz10']."<br /><br />\n</center>\n";
}
}
$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<hr />\n<table cellpadding='0' cellspacing='1' class='tbl-border center'>\n<tr>\n";
//echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['abz04']."</a></td>";
for ($i = 0; $i < 36 != ""; $i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i == 17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['abz04']."</a></td>\n</tr>\n<tr>\n" : "\n");
//echo ($i == 17 ? "<td rowspan='2' class='tbl2'><tr>\n" : "\n");
}
echo "</tr>\n</table>\n";
} else {
redirect("index.php");
}
closetable();
if ($rows > 10) { echo "<div style='text-align:center;' style='margin-top:5px;'>".makepagenav($_GET['rowstart'], 10, $rows, 3, FUSION_SELF."?sortby=".$_GET['sortby']."&")."</div>\n"; }
require_once THEMES."templates/footer.php";
?>
if(!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) $_GET['rowstart']=0;
$rows=0;
Quote
In our Database we have 125 threads with 1079 entries
<?
/*---------------------------------------------------+
| PHPFusion 7 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| INFUSION: Forum Overview
+----------------------------------------------------+
| Copyright © 2016
+---------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."forumoverview.php";
opentablex($locale['abz01']);
if(!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) $_GET['rowstart']=0;
$rows=0;
if (iMEMBER) {
if (isset($_GET['sortby']) && ctype_alnum($_GET['sortby'])) {
//$orderby = ($_GET['sortby'] == "all" ? "" : " AND forum_name LIKE '".stripinput($_GET['sortby'])."%'");
$orderby = ($_GET['sortby'] == "all" ? "" : " AND ".groupaccess('forum_access')." AND forum_name LIKE '".stripinput($_GET['sortby'])."%' OR forum_name LIKE '[".stripinput($_GET['sortby'])."%'");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat > '0'".$orderby);
$rows = dbrows($result);
$threads_rows = dbcount("(thread_id)", DB_THREADS,"");
$forums_rows = dbcount("(forum_id)-36", DB_FORUMS,"");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows) {
$i = 0;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='tbl1' align='center' colspan='4'>".$locale['abz11']."<b>$forums_rows</b> ".$locale['abz12']." <b>$threads_rows</b>".$locale['abz13']."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='left' class='tbl2'><strong>".$locale['abz02']."</strong></td>\n";
//echo "<td align='left' width='10%' class='tbl2'><strong>".$locale['abz03']."</strong></td>\n";
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['abz07']."</strong></td>\n";
echo "</tr>\n";
//$result = dbquery("SELECT * FROM ".DB_FORUMS."".$orderby." ORDER BY forum_name ASC LIMIT ".$_GET['rowstart'].",20");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat>'0'".$orderby." AND ".groupaccess('forum_access')." ORDER BY forum_name ASC, forum_name LIMIT ".$_GET['rowstart'].",10");
while ($data = dbarray($result)) {
//$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='tbl2'>\n<a href='".FORUM."viewforum.php?forum_id=".$data['forum_id']."' title='".$data['forum_name']."' class='side'>".$data['forum_name']."</a></td>\n";
//echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".$data['forum_threadcount']."</td>\n";
//echo "<td align='center' class='tbl2'>[".($data['forum_postcount'])."]</td>\n";
//echo "<td width='1%' class='tbl2' style='white-space:nowrap'>";
if ($data['forum_postcount'] == 0) {
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".$locale['abz06']."</td>\n";
} else {
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".showdate("forumdate", $data['forum_lastpost'])."</td>\n";
}
echo "</tr>";
}
echo "</table>\n";
} else {
echo "<center><br />\n".$locale['abz05']."<b>".$_GET['sortby']."</b>".$locale['abz10']."<br /><br />\n</center>\n";
}
}
$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<hr />\n<table cellpadding='0' cellspacing='1' class='tbl-border center'>\n<tr>\n";
//echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['abz04']."</a></td>";
for ($i = 0; $i < 36 != ""; $i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i == 17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['abz04']."</a></td>\n</tr>\n<tr>\n" : "\n");
//echo ($i == 17 ? "<td rowspan='2' class='tbl2'><tr>\n" : "\n");
}
echo "</tr>\n</table>\n";
} else {
redirect("index.php");
}
closetable();
if ($rows > 10) { echo "<div style='text-align:center;' style='margin-top:5px;'>".makepagenav($_GET['rowstart'], 10, $rows, 3, FUSION_SELF."?sortby=".$_GET['sortby']."&")."</div>\n"; }
require_once THEMES."templates/footer.php";
?>
<?
/*---------------------------------------------------+
| PHPFusion 7 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| INFUSION: Forum Overview
+----------------------------------------------------+
| Copyright © 2016
+---------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."forumoverview.php";
opentablex($locale['abz01']);
if(!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) $_GET['rowstart']=0;
$rows=0;
$threads_rows = dbcount("(thread_id)", DB_THREADS,"");
$forums_rows = dbcount("(forum_id)-36", DB_FORUMS,"");
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='tbl1' align='center' colspan='4'>".$locale['abz11']."<b>$forums_rows</b> ".$locale['abz12']." <b>$threads_rows</b>".$locale['abz13']."</td>\n";
echo "</tr>\n";
if (iMEMBER) {
if (isset($_GET['sortby']) && ctype_alnum($_GET['sortby'])) {
//$orderby = ($_GET['sortby'] == "all" ? "" : " AND forum_name LIKE '".stripinput($_GET['sortby'])."%'");
$orderby = ($_GET['sortby'] == "all" ? "" : " AND ".groupaccess('forum_access')." AND forum_name LIKE '".stripinput($_GET['sortby'])."%' OR forum_name LIKE '[".stripinput($_GET['sortby'])."%'");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat > '0'".$orderby);
$rows = dbrows($result);
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows) {
$i = 0;
echo "<tr>\n";
echo "<td align='left' class='tbl2'><strong>".$locale['abz02']."</strong></td>\n";
//echo "<td align='left' width='10%' class='tbl2'><strong>".$locale['abz03']."</strong></td>\n";
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['abz07']."</strong></td>\n";
echo "</tr>\n";
//$result = dbquery("SELECT * FROM ".DB_FORUMS."".$orderby." ORDER BY forum_name ASC LIMIT ".$_GET['rowstart'].",20");
$result = dbquery("SELECT * FROM ".DB_FORUMS." WHERE forum_cat>'0'".$orderby." AND ".groupaccess('forum_access')." ORDER BY forum_name ASC, forum_name LIMIT ".$_GET['rowstart'].",10");
while ($data = dbarray($result)) {
//$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='tbl2'>\n<a href='".FORUM."viewforum.php?forum_id=".$data['forum_id']."' title='".$data['forum_name']."' class='side'>".$data['forum_name']."</a></td>\n";
//echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".$data['forum_threadcount']."</td>\n";
//echo "<td align='center' class='tbl2'>[".($data['forum_postcount'])."]</td>\n";
//echo "<td width='1%' class='tbl2' style='white-space:nowrap'>";
if ($data['forum_postcount'] == 0) {
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".$locale['abz06']."</td>\n";
} else {
echo "<td align='left' width='1%' class='tbl2' style='white-space:nowrap'>".showdate("forumdate", $data['forum_lastpost'])."</td>\n";
}
echo "</tr>";
}
echo "</table>\n";
} else {
echo "<center><br />\n".$locale['abz05']."<b>".$_GET['sortby']."</b>".$locale['abz10']."<br /><br />\n</center>\n";
}else echo "</table>\n";
}
$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<hr />\n<table cellpadding='0' cellspacing='1' class='tbl-border center'>\n<tr>\n";
//echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['abz04']."</a></td>";
for ($i = 0; $i < 36 != ""; $i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i == 17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['abz04']."</a></td>\n</tr>\n<tr>\n" : "\n");
//echo ($i == 17 ? "<td rowspan='2' class='tbl2'><tr>\n" : "\n");
}
echo "</tr>\n</table>\n";
} else {
redirect("index.php");
}
closetable();
if ($rows > 10) { echo "<div style='text-align:center;' style='margin-top:5px;'>".makepagenav($_GET['rowstart'], 10, $rows, 3, FUSION_SELF."?sortby=".$_GET['sortby']."&")."</div>\n"; }
require_once THEMES."templates/footer.php";
?>
if(iMEMBER){
} else {
redirect("index.php");
}
Category Forum
Modifications and Requests - 8Labels
None yet
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions