Author: dgoette
Date: Thu Apr 9 19:02:43 2009
New Revision: 367
URL:
http://svn.reactos.org/svn/reactos?rev=367&view=rev
Log:
* move breadcrumb into class structure
* improve breadcrumb (get entry by version isn't implemented for now)
* some minor fixes
Added:
branches/danny-web/reactos.org/htdocs/compat/lib/view/Breadcrumb.class.php
(contents, props changed)
- copied, changed from r366,
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php
Removed:
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_menubar_sections…
Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group.php
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group_maintainer…
branches/danny-web/reactos.org/htdocs/compat/inc/comp/data/group_item_list.…
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_category.php
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_name.php
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_vendor.php
branches/danny-web/reactos.org/htdocs/compat/rsdb_config.php
Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group.php [iso-8859-1] Thu
Apr 9 19:02:43 2009
@@ -239,10 +239,10 @@
- $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(comp_id) FROM
rsdb_item_comp WHERE comp_groupid = :group_id AND comp_visible = '1'");
+ $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM
rsdb_item_comp WHERE comp_groupid = :group_id AND comp_visible = '1'");
$stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
$stmt->execute();
- $result_item_entry_records = $stmt->fetch(PDO::FETCH_ASSOC);
+ $result_item_entry_records = $stmt->fetch(PDO::FETCH_NUM);
if ($result_item_entry_records[0] == 0) {
@@ -274,10 +274,10 @@
<div id="versions" style="display: block">
<?php
// Count the comp entries
- $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(comp_id) FROM
rsdb_item_comp WHERE comp_groupid = :group_id");
+ $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM
rsdb_item_comp WHERE comp_groupid = :group_id");
$stmt->bindParam('group_id',$result_page["grpentr_id"],PDO::PARAM_STR);
$stmt->execute();
- $result_count_comp = $stmt->fetch(PDO::FETCH_ASSOC);
+ $result_count_comp = $stmt->fetch(PDO::FETCH_NUM);
if ($result_count_comp[0]) {
@@ -379,7 +379,7 @@
$stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM
rsdb_item_comp_testresults WHERE test_comp_id = :comp_id AND test_visible =
'1'");
$stmt->bindParam('comp_id',$result_version_newest['comp_id'],PDO::PARAM_STR);
$stmt->execute();
- $result_count_testentries = $stmt->fetch(PDO::FETCH_ASSOC);
+ $result_count_testentries = $stmt->fetch(PDO::FETCH_NUM);
echo '<b><li><a href="'.
$RSDB_intern_link_item.$result_version_newest['comp_id']
.'&item2=tests">Compatibility Tests</b>';
@@ -391,10 +391,10 @@
}
?>
<?php
- $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(fmsg_id) FROM
rsdb_item_comp_forum WHERE fmsg_comp_id = :comp_id AND fmsg_visible = '1'
;");
+ $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM
rsdb_item_comp_forum WHERE fmsg_comp_id = :comp_id AND fmsg_visible = '1'
;");
$stmt->bindParam('comp_id',$result_version_newest['comp_id'],PDO::PARAM_STR);
$stmt->execute();
- $result_count_forumentries = $stmt->fetch(PDO::FETCH_ASSOC);
+ $result_count_forumentries = $stmt->fetch(PDO::FETCH_NUM);
if ($result_count_forumentries[0] > 0) {
echo "<b>";
@@ -410,10 +410,10 @@
}
?>
<?php
- $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(media_id)
FROM rsdb_object_media WHERE media_groupid = :group_id AND media_visible =
'1'");
+ $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM
rsdb_object_media WHERE media_groupid = :group_id AND media_visible = '1'");
$stmt->bindParam('group_id',$result_version_newest['comp_media'],PDO::PARAM_STR);
$stmt->execute();
- $result_count_screenshots = $stmt->fetch();
+ $result_count_screenshots = $stmt->fetch(PDO::FETCH_NUM);
if ($result_count_screenshots[0] > 0) {
echo "<b>";
@@ -432,9 +432,9 @@
</ul>
<br />
<?php
- $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(bundle_id) FROM
rsdb_group_bundles WHERE bundle_groupid = :group_id");
+ $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM
rsdb_group_bundles WHERE bundle_groupid = :group_id");
$stmt->bindParam('group_id',$result_page["grpentr_id"],PDO::PARAM_STR);
- $result_count_bundle = $stmt->fetch();
+ $result_count_bundle = $stmt->fetch(PDO::FETCH_NUM);
if (isset($_GET['group2']) && $_GET['group2'] != ""
&& $_GET['group2'] != "overview" || $result_count_bundle[0] !=
0) {
$temp_pic = mt_rand(1,$result_count_screenshots[0]);
Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group_maintainer…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group_maintainer…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group_maintainer…
[iso-8859-1] Thu Apr 9 19:02:43 2009
@@ -82,7 +82,7 @@
// Edit application group data:
if ($RSDB_TEMP_pmod == "ok" && $RSDB_SET_group != ""
&& $RSDB_TEMP_appgroup != "" && $RSDB_TEMP_description !=
"" && $RSDB_TEMP_category != "" && $RSDB_TEMP_vendor
!= "" && usrfunc_IsModerator($RSDB_intern_user_id)) {
// Update group entry:
- $stmt=CDBConnection::getInstance->prepare("UPDATE rsdb_groups SET
grpentr_name = :new_name', grpentr_category = :new_category, grpentr_vendor =
:new_vendor, grpentr_description = :new_description WHERE grpentr_id = :group_id");
+ $stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_groups SET
grpentr_name = :new_name, grpentr_category = :new_category, grpentr_vendor = :new_vendor,
grpentr_description = :new_description WHERE grpentr_id = :group_id");
$stmt->bindParam('new_name',$RSDB_TEMP_appgroup,PDO::PARAM_STR);
$stmt->bindParam('new_category',$RSDB_TEMP_category,PDO::PARAM_STR);
$stmt->bindParam('new_vendor',$RSDB_TEMP_vendor,PDO::PARAM_STR);
@@ -106,7 +106,7 @@
// Special request:
if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtreq1 != ""
&& $RSDB_TEMP_txtreq2 != "" &&
usrfunc_IsModerator($RSDB_intern_user_id)) {
- $stmt=CDBConnection::getInstance()->prepare("INSERT INTO rsdb_logs ( log_id,
log_date, log_usrid, log_usrip, log_level, log_action, log_title, log_description,
log_category, log_badusr, log_referrer, log_browseragent, log_read, log_taskdone_usr)
VALUES ('', NOW(), :user_id, :ip, 'low', 'request', :title,
:description, 'user_moderator', '0', :referrer, :user_agent, ';',
'0');";
+ $stmt=CDBConnection::getInstance()->prepare("INSERT INTO rsdb_logs ( log_id,
log_date, log_usrid, log_usrip, log_level, log_action, log_title, log_description,
log_category, log_badusr, log_referrer, log_browseragent, log_read, log_taskdone_usr)
VALUES ('', NOW(), :user_id, :ip, 'low', 'request', :title,
:description, 'user_moderator', '0', :referrer, :user_agent, ';',
'0')");
$stmt->bindParam('user_id',$RSDB_intern_user_id,PDO::PARAM_STR);
$stmt->bindParam('ip',$RSDB_ipaddr,PDO::PARAM_STR);
$stmt->bindParam('title',$RSDB_TEMP_txtreq1,PDO::PARAM_STR);
@@ -132,7 +132,7 @@
}
if ($result_maintainer_group['grpentr_checked'] == "1" ||
$result_maintainer_group['grpentr_checked'] == "no") {
if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_verified ==
"done" && usrfunc_IsModerator($RSDB_intern_user_id)) {
- $stmt=CDBConnection::getInstance->prepare("UPDATE rsdb_groups SET
grpentr_checked = :checked WHERE grpentr_id = :group_id");
+ $stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_groups SET
grpentr_checked = :checked WHERE grpentr_id = :group_id");
$stmt->bindParam('checked',$temp_verified,PDO::PARAM_STR);
$stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
$stmt->execute();
Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/comp/data/group_item_list.…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/compat/inc/comp/data/group_item_list.…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/compat/inc/comp/data/group_item_list.…
[iso-8859-1] Thu Apr 9 19:02:43 2009
@@ -62,7 +62,7 @@
$RSDB_intern_TEMP_version_saved_a = "";
$stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp WHERE
comp_groupid = :group_id ORDER BY comp_osversion DESC");
$stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
- $stmt->bindParam();
+ $stmt->execute();
while($result_sortby_a = $stmt->fetch(PDO::FETCH_ASSOC)) {
if ($result_sortby_a[$RSDB_intern_sortby_headline_field] !=
$RSDB_intern_TEMP_version_saved_a) {
Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_category.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_category.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_category.php [iso-8859-1]
Thu Apr 9 19:02:43 2009
@@ -42,7 +42,17 @@
//echo "<h1>Browse by Category</h1>";
- include("inc/tree/tree_historybar.php");
+
+ // create breadcrumb
+ if (isset($_GET['item'])) {
+ new Breadcrumb(Breadcrumb::MODE_TREE, $_GET['item'],
Breadcrumb::PARAM_VERSION);
+ }
+ elseif ($RSDB_SET_group) {
+ new Breadcrumb(Breadcrumb::MODE_TREE, $RSDB_SET_group, Breadcrumb::PARAM_ENTRY);
+ }
+ elseif (isset($_GET['cat'])) {
+ new Breadcrumb(Breadcrumb::MODE_TREE, $_GET['cat'],
Breadcrumb::PARAM_CATEGORY);
+ }
if (isset($_GET['item']) && $_GET['item'] != "") {
include("inc/tree/tree_item.php");
@@ -57,15 +67,7 @@
}
}
else {
- switch (@$_GET['cat2']) {
- case "flat": // Flat Style
- default:
- include("inc/tree/tree_category_flat.php");
- break;
- case "tree": // Tree Style
include("inc/tree/tree_category_tree.php");
- break;
- }
include("inc/tree/tree_category_grouplist_1.php");
}
}
Removed:
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php (removed)
@@ -1,566 +1,0 @@
-<?php
- /*
- RSDB - ReactOS Support Database
- Copyright (C) 2005-2006 Klemens Friedl <frik85(a)reactos.org>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/*
- * ReactOS Support Database System - RSDB
- *
- * (c) by Klemens Friedl <frik85>
- *
- * 2005 - 2006
- */
-
-
- // To prevent hacking activity:
- if ( !defined('RSDB') )
- {
- die(" ");
- }
-
-
-
-
-
- $RSDB_viewpage = true;
-
- if (isset($_GET['page']) && $_GET['page'] ==
"category") {
-?>
-<table width="100%" border="1" cellpadding="3"
cellspacing="0" bordercolor="#5984C3">
- <tr>
- <td> <font size="2">Browsing: </font><a
href="<?php echo $RSDB_intern_link_category_cat."0";
-
- if (empty($_GET['cat2']) || $_GET['cat2'] == 'flat') {
-
- }
- else {
- echo "&cat2=".htmlspecialchars(@$_GET['cat2']);
- }
-
- ?>">Main</a><?php
- $RSDB_TEMP_current_category = "Main";
- $RSDB_TEMP_current_category_desc = "Root directory of the tree.";
-
- if (!empty($_GET['cat'])) {
-
- if (isset($_GET['item']) && $_GET['item'] != ""
&& $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp
WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC");
- $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR);
- $stmt->execute();
- $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_itempid['comp_groupid'] == "" ||
$result_itempid['comp_groupid'] == "0") {
- //die("");
- //echo "die1";
- $RSDB_viewpage = false;
- }
- $RSDB_SET_group = $result_itempid['comp_groupid'];
- }
- if ($RSDB_SET_group != "" && $RSDB_viewpage != false) {
- //echo "+++++".$RSDB_SET_group;
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups
WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp =
'1' ORDER BY grpentr_name ASC") ;
- $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
- $stmt->execute();
- $result_groupid = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_groupid['grpentr_category'] == "" ||
$result_groupid['grpentr_category'] == "0") {
- //die("");
- //echo "die2";
- $RSDB_viewpage = false;
- }
- if ($RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1' AND cat_comp =
'1'");
-
$stmt->bindParam('cat_id',$result_groupid['grpentr_category'],PDO::PARAM_STR);
- $stmt->execute();
- $result_category_treehistory_groupid=$stmt->fetch(PDO::FETCH_ASSOC);
-
- $RSDB_TEMP_cat_path = $result_category_treehistory_groupid['cat_path'];
- $RSDB_TEMP_cat_id = $result_category_treehistory_groupid['cat_id'];
- //$RSDB_TEMP_cat_current_level =
$result_category_treehistory_groupid['cat_level'];
-
- $RSDB_TEMP_cat_current_level=1;
- $RSDB_TEMP_cat_current_id = $RSDB_TEMP_cat_id;
- //$RSDB_TEMP_cat_current_counter =
$result_category_treehistory_groupid['cat_level'];
- //$RSDB_TEMP_cat_treehist =
$result_category_treehistory_groupid['cat_level'];
- }
- }
- elseif ($RSDB_viewpage != false) {
- //echo "hjall";
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1' AND cat_comp =
'1'");
- $stmt->bindParam('cat_id',@$_GET['cat'],PDO::PARAM_STR);
- $stmt->execute();
- $result_category_treehistory=$stmt->fetch(PDO::FETCH_ASSOC);
-
- $RSDB_TEMP_cat_path = $result_category_treehistory['cat_path'];
- $RSDB_TEMP_cat_id = $result_category_treehistory['cat_id'];
-
- $RSDB_TEMP_cat_current_level=1;
- $RSDB_TEMP_cat_current_id = $RSDB_TEMP_cat_id;
- }
- if ($RSDB_viewpage != false) {
- // echo "<p>";
- $RSDB_TEMP_cat_current_id_guess = $RSDB_TEMP_cat_current_id;
- $RSDB_intern_catlevel=0;
-
- // count the levels -> current category level
- for ($guesslevel=1; ; $guesslevel++) {
- // echo $guesslevel."#";
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1' AND cat_comp =
'1'");
-
$stmt->bindParam('cat_id',$RSDB_TEMP_cat_current_id_guess,PDO::PARAM_STR);
- $stmt->execute();
- $result_category_tree_guesslevel=$stmt->fetch(PDO::FETCH_ASSOC);
- // echo $result_category_tree_guesslevel['cat_name'];
- $RSDB_TEMP_cat_current_id_guess =
$result_category_tree_guesslevel['cat_path'];
-
- if (!$result_category_tree_guesslevel['cat_name']) {
- // echo "ENDE:".($guesslevel-1);
- $RSDB_intern_catlevel = ($guesslevel-1);
- $RSDB_TEMP_cat_current_counter = $RSDB_intern_catlevel;
- break;
- }
- }
- // echo "<p>";
-
-
- for ($i=0; $i < $RSDB_intern_catlevel; $i++) {
- // echo "<br>Ring0: ".$i." ";
- for ($k=1; $k < ($RSDB_intern_catlevel+1-$i); $k++) {
- // echo $k."|";
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_categories WHERE cat_id = :cat_id AND `cat_visible` = '1' AND cat_comp =
'1'");
-
$stmt->bindParam('cat_id',$RSDB_TEMP_cat_current_id,PDO::PARAM_STR);
- $stmt->execute();
- $result_category_tree_temp=$stmt->fetch(PDO::FETCH_ASSOC);
- $RSDB_TEMP_cat_current_id = $result_category_tree_temp['cat_path'];
-
- // echo
"K:".$k."|E:".($result_category_treehistory['cat_level']+1-$i);
- if ($k == $RSDB_TEMP_cat_current_counter) {
- $RSDB_TEMP_current_category = $result_category_tree_temp['cat_name'];
- $RSDB_TEMP_current_category_desc =
$result_category_tree_temp['cat_description'];
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_category_cat.$result_category_tree_temp['cat_id'];
- if (!empty($_GET['cat2']) && $_GET['cat2'] !=
'flat') {
- echo "&cat2=".htmlentities(@$_GET['cat2']);
- }
- echo
"'>".$result_category_tree_temp['cat_name']."</a>";
- }
- }
- $RSDB_TEMP_cat_current_counter--;
- $k=1;
- $RSDB_TEMP_cat_current_id="";
- $RSDB_TEMP_cat_current_id = $RSDB_TEMP_cat_id;
-
- }
- //create_historybar($RSDB_TEMP_cat_path, $RSDB_TEMP_cat_id,
$RSDB_TEMP_cat_current_level);
- }
-
- if ($RSDB_SET_group != "" && $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups
WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp =
'1' ORDER BY grpentr_name ASC");
- $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
- $stmt->execute();
- $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC);
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_group.$RSDB_SET_group."'>".$result_current_group['grpentr_name']."</a>";
- }
- if (isset($_GET['item']) && $_GET['item'] != ""
&& $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp
WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC");
- $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR);
- $stmt->execute();
- $result_current_group = $stmt->fetch(PDO::PARAM_STR);
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_group.htmlspecialchars($_GET['item'])."'>".$result_current_group['comp_name'];
-
- echo " ["."ReactOS
".show_osversion($result_current_group['comp_osversion'])."]";
-
- echo "</a>";
- }
-
- }
- echo "</td></tr></table>";
- include('inc/tree/tree_menubar_sections.php');
-
- if ($RSDB_SET_group == "" && isset($_GET['item']) &&
$_GET['item'] == "" && $RSDB_viewpage != false) {
- echo "<h2>".$RSDB_TEMP_current_category."</h2>";
- echo "<p>".$RSDB_TEMP_current_category_desc."</p>";
- }
-
- if ($RSDB_viewpage != false) {
- if ($RSDB_SET_group != "" || isset($_GET['item']) &&
$_GET['item'] != "") {
- echo "<br />";
- }
- else {
- echo "<p align='center'>";
- if (isset($_GET['cat2']) && $_GET['cat2'] == 'flat')
{
- echo "<b>Flat Style</b> | <a
href='".$RSDB_intern_link_category_cat.htmlspecialchars((a)$_GET['cat'])."&amp;cat2=tree'>Tree
Style</a>";
- }
- elseif (isset($_GET['cat2']) && $_GET['cat2'] ==
'tree') {
- echo "<a
href='".$RSDB_intern_link_category_cat.htmlspecialchars((a)$_GET['cat'])."&amp;cat2=flat'>Flat
Style</a> | <b>Tree Style</b>";
- }
- echo "</p>";
- }
- }
- }
-?>
-
-
-<?php
- if (isset($_GET['page']) && ($_GET['page'] == "name"
|| $_GET['page'] == "vendor")) {
- if ($_GET['page'] == "name") {
- if (isset($_GET['item']) && $_GET['item'] != "") {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp
WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC") ;
- $stmt->bindParam('item_id',@$_GET['item'],PDO::PARAM_STR);
- $stmt->execute();
- $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_itempid['comp_groupid'] == "" ||
$result_itempid['comp_groupid'] == "0") {
- $RSDB_viewpage = false;
- }
- $RSDB_SET_group = $result_itempid['comp_groupid'];
- }
- if ($RSDB_SET_group != "") {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups
WHERE grpentr_visible = '1' AND grpentr_id = :group_id ORDER BY grpentr_id
ASC");
- $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
- $stmt->execute();
- $result_groupid = $stmt->fetch(PDO::FETCH_ASSOC);
- $RSDB_SET_letter = strtolower(substr($result_groupid['grpentr_name'], 0, 1));
- }
- ?>
- <table width="100%" border="1" cellpadding="3"
cellspacing="0" bordercolor="#5984C3">
- <tr>
- <td> <font size="2">Browsing: </font> <a
href="<?php echo $RSDB_intern_link_name_letter_EX."all";
?>"><?php
-
- if ($RSDB_SET_letter != "") {
- echo ucfirst($RSDB_SET_letter);
- }
- else {
- echo "All";
- }
-
- echo "</a>";
-
- if (isset($_GET['item']) && $_GET['item'] != ""
&& $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance("SELECT * FROM rsdb_item_comp WHERE
comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC");
- $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR);
- $stmt->execute();
- $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_itempid['comp_groupid'] == "" ||
$result_itempid['comp_groupid'] == "0") {
- //die("");
- $RSDB_viewpage = false;
- }
- $RSDB_SET_group = $result_itempid['comp_groupid'];
- }
- if ($RSDB_SET_group != "" && $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE
grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp = '1'
ORDER BY grpentr_name ASC");
- $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
- $stmt->execute();
- $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_current_group['grpentr_category'] == "" ||
$result_current_group['grpentr_category'] == "0") {
- //die("");
- $RSDB_viewpage = false;
- }
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_group.$RSDB_SET_group."'>".$result_current_group['grpentr_name']."</a>";
- }
- if (isset($_GET['item']) && $_GET['item'] != ""
&& $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp
WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC");
- $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR);
- $stmt->execute();
- $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC);
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_item_EX.htmlspecialchars($_GET['item'])."'>".$result_current_group['comp_name'];
-
- echo " ["."ReactOS
".show_osversion($result_current_group['comp_osversion'])."]";
-
- echo "</a>";
- }
-
- echo "</td></tr></table>";
-
- }
- elseif ($_GET['page'] == "vendor") {
-
- if (isset($_GET['vendor']) && $_GET['vendor'] != '')
{
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_item_vendor WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC");
- $stmt->bindParam('vendor_id',$_GET['vendor'],PDO::PARAM_STR);
- $stmt->execute();
- $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_itempid['vendor_id'] == "" ||
$result_itempid['vendor_id'] == "0") {
- $RSDB_viewpage = false;
- }
- $RSDB_SET_letter = strtolower(substr($result_itempid['vendor_name'], 0, 1));
- }
- ?>
- <table width="100%" border="1" cellpadding="3"
cellspacing="0" bordercolor="#5984C3">
- <tr>
- <td> <font size="2">Browsing: <a href="<?php
echo $RSDB_intern_link_vendor_letter_EX.$RSDB_SET_letter; ?>">
-
- <?php
-
- if ($RSDB_SET_letter != "") {
- echo ucfirst($RSDB_SET_letter);
- }
- else {
- echo "All";
- }
-
- echo "</a></font>";
-
- if (isset($_GET['vendor']) && $_GET['vendor'] != ''
&& $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_vendor
WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC");
- $stmt->bindParam('vendor_id',$_GET['vendor'],PDO::PARAM_STR);
- $stmt->execute();
- $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_itempid['vendor_id'] == "" ||
$result_itempid['vendor_id'] == "0") {
- //die("");
- $RSDB_viewpage = false;
- }
- //$RSDB_SET_group = $result_itempid['vendor_id'];
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_vendor_id_EX.htmlspecialchars($_GET['vendor'])."'>".$result_itempid['vendor_name']."</a>";
- }
- if ($RSDB_SET_group != "" && $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups
WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp =
'1' ORDER BY grpentr_name ASC");
- $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
- $stmt->execute();
- $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_current_group['grpentr_category'] == "" ||
$result_current_group['grpentr_category'] == "0") {
- //die("");
- $RSDB_viewpage = false;
- }
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_name_group_EX.$RSDB_SET_group."'>".$result_current_group['grpentr_name']."</a>";
- }
- if (isset($_GET['item']) && $_GET['item'] != ""
&& $RSDB_viewpage != false) {
- $stmt=CDBCOnnection::getInstance()->prepare("SELECT * FROM rsdb_item_vendor
WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC");
- $stmt->bindParam('group_id',@$_GET['vendor'],PDO::PARAM_STR);
- $stmt->execute();
- $result_current_group = $stmt->fetch(PDO::PARAM_STR);
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_name_item_EX.htmlspecialchars($_GET['item'])."'>".$result_current_group['vendor_name'];
- echo "</a>";
- }
-
- echo "</td></tr></table>";
-
- }
-
-
-
-
- include('inc/tree/tree_menubar_sections.php');
-
- if (isset($_GET['page']) && $_GET['page'] == "name")
{
- $RSDB_TEMP_link_letter = $RSDB_intern_link_name_letter_EX;
- }
- elseif (isset($_GET['page']) && $_GET['page'] ==
"vendor") {
- $RSDB_TEMP_link_letter = $RSDB_intern_link_vendor_letter_EX;
- }
-
- if ($RSDB_viewpage != false) {
-
- echo '<p align="center">';
-
- if ($RSDB_SET_letter == "all" || $RSDB_SET_letter == "") {
- echo ' <b>All</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'all"
class="letterbarlink">All</a> ';
- }
-
- if ($RSDB_SET_letter == "a") {
- echo ' <b>A</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'a"
class="letterbarlink">A</a> ';
- }
-
- if ($RSDB_SET_letter == "b") {
- echo ' <b>B</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'b"
class="letterbarlink">B</a> ';
- }
-
- if ($RSDB_SET_letter == "c") {
- echo ' <b>C</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'c"
class="letterbarlink">C</a> ';
- }
-
- if ($RSDB_SET_letter == "d") {
- echo ' <b>D</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'d"
class="letterbarlink">D</a> ';
- }
-
- if ($RSDB_SET_letter == "e") {
- echo ' <b>E</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'e"
class="letterbarlink">E</a> ';
- }
-
- if ($RSDB_SET_letter == "f") {
- echo ' <b>F</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'f"
class="letterbarlink">F</a> ';
- }
-
- if ($RSDB_SET_letter == "g") {
- echo ' <b>G</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'g"
class="letterbarlink">G</a> ';
- }
-
- if ($RSDB_SET_letter == "h") {
- echo ' <b>H</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'h"
class="letterbarlink">H</a> ';
- }
-
- if ($RSDB_SET_letter == "i") {
- echo ' <b>I</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'i"
class="letterbarlink">I</a> ';
- }
-
- if ($RSDB_SET_letter == "j") {
- echo ' <b>J</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'j"
class="letterbarlink">J</a> ';
- }
-
- if ($RSDB_SET_letter == "k") {
- echo ' <b>K</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'k"
class="letterbarlink">K</a> ';
- }
-
- if ($RSDB_SET_letter == "l") {
- echo ' <b>L</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'l"
class="letterbarlink">L</a> ';
- }
-
- if ($RSDB_SET_letter == "m") {
- echo ' <b>M</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'m"
class="letterbarlink">M</a> ';
- }
-
- if ($RSDB_SET_letter == "n") {
- echo ' <b>N</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'n"
class="letterbarlink">N</a> ';
- }
-
- if ($RSDB_SET_letter == "o") {
- echo ' <b>O</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'o"
class="letterbarlink">O</a> ';
- }
-
- if ($RSDB_SET_letter == "p") {
- echo ' <b>P</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'p"
class="letterbarlink">P</a> ';
- }
-
- if ($RSDB_SET_letter == "q") {
- echo ' <b>Q</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'q"
class="letterbarlink">Q</a> ';
- }
-
- if ($RSDB_SET_letter == "r") {
- echo ' <b>R</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'r"
class="letterbarlink">R</a> ';
- }
-
- if ($RSDB_SET_letter == "s") {
- echo ' <b>S</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'s"
class="letterbarlink">S</a> ';
- }
-
- if ($RSDB_SET_letter == "t") {
- echo ' <b>T</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'t"
class="letterbarlink">T</a> ';
- }
-
- if ($RSDB_SET_letter == "u") {
- echo ' <b>U</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'u"
class="letterbarlink">U</a> ';
- }
-
- if ($RSDB_SET_letter == "v") {
- echo ' <b>V</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'v"
class="letterbarlink">V</a> ';
- }
-
- if ($RSDB_SET_letter == "w") {
- echo ' <b>W</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'w"
class="letterbarlink">W</a> ';
- }
-
- if ($RSDB_SET_letter == "x") {
- echo ' <b>X</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'x"
class="letterbarlink">X</a> ';
- }
-
- if ($RSDB_SET_letter == "y") {
- echo ' <b>Y</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'y"
class="letterbarlink">Y</a> ';
- }
-
- if ($RSDB_SET_letter == "z") {
- echo ' <b>Z</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'z"
class="letterbarlink">Z</a> ';
- }
-
- echo "</p><br />";
-
- }
- }
-
- if ($RSDB_viewpage == false) {
- echo "<p>No related database entry found!</p>";
- }
-
-
- //Message::show("Compatibility");
-?>
Removed:
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_menubar_sections…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_menubar_sections…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_menubar_sections…
(removed)
@@ -1,86 +1,0 @@
-<?php
- /*
- RSDB - ReactOS Support Database
- Copyright (C) 2005-2006 Klemens Friedl <frik85(a)reactos.org>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/*
- * ReactOS Support Database System - RSDB
- *
- * (c) by Klemens Friedl <frik85>
- *
- * 2005 - 2006
- */
-
-
- // To prevent hacking activity:
- if ( !defined('RSDB') )
- {
- die(" ");
- }
-
-?>
-<table width="100%" border="0" cellpadding="0"
cellspacing="0">
- <tr>
- <td width="100%"> </td>
- <td align="right" valign="top">
- <table width="380" border="0" cellpadding="0"
cellspacing="0" bordercolor="#5984C3">
- <tr>
- <td width="18" height="18"><img
src="images/corner_sections.jpg" width="18"
height="18"></td>
- <td bgcolor="#5984C3"><div id="sectionMenu"
align="center"><?php
-
- $RSDB_compare_string = '';
-
- if (isset($_GET['cat']) && $_GET['cat'] != ''
&& isset($_GET['item']) && $_GET['item'] ==""
&& $RSDB_SET_group =="") {
- if ($_GET['cat'] == 0) {
- $result_count_group['cat_comp']=1;
- }
- else {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1'");
-
$stmt->bindParam('cat_id',@htmlspecialchars(@$_GET['cat']),PDO::PARAM_STR);
- $stmt->execute();
- $result_count_group = $stmt->fetch(PDO::FETCH_ASSOC);
- }
- $RSDB_compare_string = 'cat';
- }
- else {
- if (isset($_GET['item']) && $_GET['item'] != "") {
- $result_count_group['item_comp']=1;
- $RSDB_compare_string = 'item';
- }
- elseif ($RSDB_SET_group != "") {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups
WHERE grpentr_id = :group_id AND grpentr_visible = '1'");
- $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
- $stmt->execute();
- $result_count_group = $stmt->fetch(PDO::FETCH_ASSOC);
- $RSDB_compare_string = 'grpentr';
- }
- }
- if ($result_count_group[$RSDB_compare_string."_comp"] == "1") {
- echo '<a href="'. $RSDB_intern_link_db_view2 .'">'.
$RSDB_langres['TEXT_compdb_short'] .'</a>';
- }
- else {
- echo '<font color="#cccccc"> '.
$RSDB_langres['TEXT_compdb_short'] .' </font>';
- }
-
-
- ?></div></td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_name.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_name.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_name.php [iso-8859-1] Thu
Apr 9 19:02:43 2009
@@ -43,7 +43,12 @@
//echo "<h1>Browse by Name</h1>";
- include("inc/tree/tree_historybar.php");
+ if (isset($_GET['item'])) {
+ new Breadcrumb(Breadcrumb::MODE_INITIAL, $_GET['item'],
Breadcrumb::PARAM_VERSION);
+ }
+ elseif (isset($_GET['group'])) {
+ new Breadcrumb(Breadcrumb::MODE_INITIAL, $RSDB_SET_group, Breadcrumb::PARAM_ENTRY);
+ }
if (isset($_GET['item']) && $_GET['item'] != "") {
include("inc/tree/tree_item.php");
Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_vendor.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_vendor.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_vendor.php [iso-8859-1] Thu
Apr 9 19:02:43 2009
@@ -42,7 +42,13 @@
//echo "<h1>Browse by Vendor</h1>";
- include("inc/tree/tree_historybar.php");
+ if (isset($_GET['item'])) {
+ new Breadcrumb(Breadcrumb::MODE_VENDOR, $_GET['item'],
Breadcrumb::PARAM_VERSION);
+ }
+ elseif (isset($_GET['group'])) {
+ new Breadcrumb(Breadcrumb::MODE_VENDOR, $RSDB_SET_group, Breadcrumb::PARAM_ENTRY);
+ }
+
if (isset($_GET['item']) && $_GET['item'] != '') {
include("inc/tree/tree_item.php");
Copied:
branches/danny-web/reactos.org/htdocs/compat/lib/view/Breadcrumb.class.php (from
r366,
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php)
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/compat/lib/view/Breadcrumb.class.php
[iso-8859-1] Thu Apr 9 19:02:43 2009
@@ -2,6 +2,7 @@
/*
RSDB - ReactOS Support Database
Copyright (C) 2005-2006 Klemens Friedl <frik85(a)reactos.org>
+ 2009 Danny Götte <dangerground(a)web.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,549 +19,257 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/*
- * ReactOS Support Database System - RSDB
- *
- * (c) by Klemens Friedl <frik85>
- *
- * 2005 - 2006
- */
-
-
- // To prevent hacking activity:
- if ( !defined('RSDB') )
- {
- die(" ");
- }
-
-
-
-
-
- $RSDB_viewpage = true;
-
- if (isset($_GET['page']) && $_GET['page'] ==
"category") {
-?>
-<table width="100%" border="1" cellpadding="3"
cellspacing="0" bordercolor="#5984C3">
- <tr>
- <td> <font size="2">Browsing: </font><a
href="<?php echo $RSDB_intern_link_category_cat."0";
-
- if (empty($_GET['cat2']) || $_GET['cat2'] == 'flat') {
-
- }
- else {
- echo "&cat2=".htmlspecialchars(@$_GET['cat2']);
- }
-
- ?>">Main</a><?php
- $RSDB_TEMP_current_category = "Main";
- $RSDB_TEMP_current_category_desc = "Root directory of the tree.";
-
- if (!empty($_GET['cat'])) {
-
- if (isset($_GET['item']) && $_GET['item'] != ""
&& $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp
WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC");
- $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR);
+
+class Breadcrumb
+{
+
+
+
+ const MODE_NONE = 0; // no breadcrumb
+ const MODE_INITIAL = 1; // show initial letter
+ const MODE_TREE = 2; // show hierarchical list
+ const MODE_VENDOR = 4; // show vendor
+
+ const PARAM_UNKNOWN = 0;
+ const PARAM_CATEGORY = 1;
+ const PARAM_ENTRY = 2;
+ const PARAM_VERSION = 3;
+ const PARAM_VENDOR = 4;
+
+
+
+ public function __construct( $mode = self::NONE, $param, $param_type =
self::PARAM_UNKNOWN)
+ {
+ echo '
+ <div style="clear: both;border: 2px solid gray;">
+ <span style="float: left;">Browsing: </span>
+ <ul style="list-style-type: none;display: inline;">';
+
+ // needs entry
+ if ($mode & self::MODE_INITIAL) {
+ self::initial($param, $param_type);
+ }
+
+ // needs entry or category
+ if ($mode & self::MODE_TREE) {
+ self::tree($param, $param_type);
+ }
+
+ // needs vendor
+ if ($mode & self::MODE_VENDOR) {
+ self::vendor($param, $param_type);
+ }
+
+ // get version data
+ if ($param > 0 && $param_type === self::PARAM_VERSION) {
+ $stmt=CDBConnection::getInstance()->prepare("SELECT comp_groupid, comp_id,
comp_appversion, grpentr_name FROM rsdb_item_comp JOIN rsdb_groups ON
grpentr_id=comp_group_id WHERE grpentr_visible = '1' AND comp_id = :item_id AND
comp_visible='1'") ;
+ $stmt->bindParam('item_id',$param,PDO::PARAM_INT);
+ $stmt->execute();
+ $version = $stmt->fetchOnce(PDO::FETCH_ASSOC);
+ $version_id = $version['comp_id'];
+ $version_name = $version['comp_appversion'];
+ $entry_id = $version['comp_groupid'];
+ }
+
+ // get entry data
+ elseif ($param > 0 && $param_type === self::PARAM_ENTRY) {
+ $stmt=CDBConnection::getInstance()->prepare("SELECT grpentr_id,
grpentr_category, grpentr_name FROM rsdb_groups WHERE grpentr_visible = '1' AND
grpentr_id = :group_id") ;
+ $stmt->bindParam('group_id',$param,PDO::PARAM_INT);
+ $stmt->execute();
+ $group = $stmt->fetchOnce(PDO::FETCH_ASSOC);
+ $entry_id = $group['grpentr_id'];
+ $entry_name = $group['grpentr_name'];
+ }
+
+ // show entry, if selected
+ if (isset($entry_id)) {
+ echo '
+ <li style="float: left;padding-left: 10px;">→ <a
href="'.$entry_id.'">'.htmlspecialchars($entry_name).'</a></li>';
+ }
+
+ // show entry, if selected
+ if (isset($version_id)) {
+ echo '
+ <li style="float: left;padding-left: 10px;"> [<a
href="'.$version_id.'">'.htmlspecialchars($version_name).'</a>]
</li>';
+ }
+
+ echo '
+ </ul>
+ <br style="clear: both;"/>
+ </div>';
+ } // end of constructor
+
+
+
+ private function tree( $param, $param_type )
+ {
+ global $RSDB_intern_link_category_cat;
+
+ $description = 'Root directory of the tree.';
+
+ // check if category exists and is visible
+ if ($param > 0 && $param_type === self::PARAM_CATEGORY) {
+ $stmt=CDBConnection::getInstance()->prepare("SELECT cat_id FROM
rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1'");
+ $stmt->bindParam('cat_id',$param,PDO::PARAM_INT);
+ $stmt->execute();
+ $category_id = $stmt->fetchColumn();
+
+ if ($category_id === false) {
+ echo 'Unknown Category';
+ return;
+ }
+ }
+
+ // check if entry exists and is visible
+ elseif ($param > 0 && $param_type === self::PARAM_ENTRY) {
+ $stmt=CDBConnection::getInstance()->prepare("SELECT grpentr_id,
grpentr_category, grpentr_name FROM rsdb_groups WHERE grpentr_visible = '1' AND
grpentr_id = :group_id") ;
+ $stmt->bindParam('group_id',$param,PDO::PARAM_INT);
+ $stmt->execute();
+ $category_id = $stmt->fetchOnce(PDO::FETCH_ASSOC);
+
+ if ($group === false) {
+ echo 'Unknown Group';
+ return;
+ }
+ }
+
+ // check if entry version exists and is visible
+ elseif ($param > 0 && $param_type === self::PARAM_VERSION) {
+ //@TODO
+ }
+
+ // show root
+ echo '
+ <li style="float: left;"><a
href="'.$RSDB_intern_link_category_cat.'0">Root</a></li>';
+
+ if ($category_id === false) {
+ echo '<li>→ Unknown Category</li>';
+ return;
+ }
+
+ // show current path
+ $stmt=CDBConnection::getInstance()->prepare("SELECT cat_name, cat_id,
cat_path FROM rsdb_categories WHERE cat_id=:cat_id");
+ $stmt->bindParam('cat_id',$category_id,PDO::PARAM_INT);
+ $stmt->execute();
+
+ // get output in reversed order
+ $output = '';
+ while ($category = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $output = '
+ <li style="float: left;padding-left: 10px;">→ <a
href="'.$RSDB_intern_link_category_cat.$category['cat_id'].'">'.htmlspecialchars($category['cat_name']).'</a></li>'.$output;
+
+ if ($category['cat_path'] > 0) {
+
$stmt->bindParam('cat_id',$category['cat_path'],PDO::PARAM_INT);
$stmt->execute();
- $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_itempid['comp_groupid'] == "" ||
$result_itempid['comp_groupid'] == "0") {
- //die("");
- //echo "die1";
- $RSDB_viewpage = false;
- }
- $RSDB_SET_group = $result_itempid['comp_groupid'];
- }
- if ($RSDB_SET_group != "" && $RSDB_viewpage != false) {
- //echo "+++++".$RSDB_SET_group;
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups
WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp =
'1' ORDER BY grpentr_name ASC") ;
- $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
- $stmt->execute();
- $result_groupid = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_groupid['grpentr_category'] == "" ||
$result_groupid['grpentr_category'] == "0") {
- //die("");
- //echo "die2";
- $RSDB_viewpage = false;
- }
- if ($RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1' AND cat_comp =
'1'");
-
$stmt->bindParam('cat_id',$result_groupid['grpentr_category'],PDO::PARAM_STR);
- $stmt->execute();
- $result_category_treehistory_groupid=$stmt->fetch(PDO::FETCH_ASSOC);
-
- $RSDB_TEMP_cat_path = $result_category_treehistory_groupid['cat_path'];
- $RSDB_TEMP_cat_id = $result_category_treehistory_groupid['cat_id'];
- //$RSDB_TEMP_cat_current_level =
$result_category_treehistory_groupid['cat_level'];
-
- $RSDB_TEMP_cat_current_level=1;
- $RSDB_TEMP_cat_current_id = $RSDB_TEMP_cat_id;
- //$RSDB_TEMP_cat_current_counter =
$result_category_treehistory_groupid['cat_level'];
- //$RSDB_TEMP_cat_treehist =
$result_category_treehistory_groupid['cat_level'];
- }
- }
- elseif ($RSDB_viewpage != false) {
- //echo "hjall";
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1' AND cat_comp =
'1'");
- $stmt->bindParam('cat_id',@$_GET['cat'],PDO::PARAM_STR);
- $stmt->execute();
- $result_category_treehistory=$stmt->fetch(PDO::FETCH_ASSOC);
-
- $RSDB_TEMP_cat_path = $result_category_treehistory['cat_path'];
- $RSDB_TEMP_cat_id = $result_category_treehistory['cat_id'];
-
- $RSDB_TEMP_cat_current_level=1;
- $RSDB_TEMP_cat_current_id = $RSDB_TEMP_cat_id;
- }
- if ($RSDB_viewpage != false) {
- // echo "<p>";
- $RSDB_TEMP_cat_current_id_guess = $RSDB_TEMP_cat_current_id;
- $RSDB_intern_catlevel=0;
-
- // count the levels -> current category level
- for ($guesslevel=1; ; $guesslevel++) {
- // echo $guesslevel."#";
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1' AND cat_comp =
'1'");
-
$stmt->bindParam('cat_id',$RSDB_TEMP_cat_current_id_guess,PDO::PARAM_STR);
- $stmt->execute();
- $result_category_tree_guesslevel=$stmt->fetch(PDO::FETCH_ASSOC);
- // echo $result_category_tree_guesslevel['cat_name'];
- $RSDB_TEMP_cat_current_id_guess =
$result_category_tree_guesslevel['cat_path'];
-
- if (!$result_category_tree_guesslevel['cat_name']) {
- // echo "ENDE:".($guesslevel-1);
- $RSDB_intern_catlevel = ($guesslevel-1);
- $RSDB_TEMP_cat_current_counter = $RSDB_intern_catlevel;
- break;
- }
- }
- // echo "<p>";
-
-
- for ($i=0; $i < $RSDB_intern_catlevel; $i++) {
- // echo "<br>Ring0: ".$i." ";
- for ($k=1; $k < ($RSDB_intern_catlevel+1-$i); $k++) {
- // echo $k."|";
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_categories WHERE cat_id = :cat_id AND `cat_visible` = '1' AND cat_comp =
'1'");
-
$stmt->bindParam('cat_id',$RSDB_TEMP_cat_current_id,PDO::PARAM_STR);
- $stmt->execute();
- $result_category_tree_temp=$stmt->fetch(PDO::FETCH_ASSOC);
- $RSDB_TEMP_cat_current_id = $result_category_tree_temp['cat_path'];
-
- // echo
"K:".$k."|E:".($result_category_treehistory['cat_level']+1-$i);
- if ($k == $RSDB_TEMP_cat_current_counter) {
- $RSDB_TEMP_current_category = $result_category_tree_temp['cat_name'];
- $RSDB_TEMP_current_category_desc =
$result_category_tree_temp['cat_description'];
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_category_cat.$result_category_tree_temp['cat_id'];
- if (!empty($_GET['cat2']) && $_GET['cat2'] !=
'flat') {
- echo "&cat2=".htmlentities(@$_GET['cat2']);
- }
- echo
"'>".$result_category_tree_temp['cat_name']."</a>";
- }
- }
- $RSDB_TEMP_cat_current_counter--;
- $k=1;
- $RSDB_TEMP_cat_current_id="";
- $RSDB_TEMP_cat_current_id = $RSDB_TEMP_cat_id;
-
- }
- //create_historybar($RSDB_TEMP_cat_path, $RSDB_TEMP_cat_id,
$RSDB_TEMP_cat_current_level);
- }
-
- if ($RSDB_SET_group != "" && $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups
WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp =
'1' ORDER BY grpentr_name ASC");
- $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
- $stmt->execute();
- $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC);
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_group.$RSDB_SET_group."'>".$result_current_group['grpentr_name']."</a>";
- }
- if (isset($_GET['item']) && $_GET['item'] != ""
&& $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp
WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC");
- $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR);
- $stmt->execute();
- $result_current_group = $stmt->fetch(PDO::PARAM_STR);
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_group.htmlspecialchars($_GET['item'])."'>".$result_current_group['comp_name'];
-
- echo " ["."ReactOS
".show_osversion($result_current_group['comp_osversion'])."]";
-
- echo "</a>";
- }
-
- }
- echo "</td></tr></table>";
- include('inc/tree/tree_menubar_sections.php');
-
- if ($RSDB_SET_group == "" && isset($_GET['item']) &&
$_GET['item'] == "" && $RSDB_viewpage != false) {
- echo "<h2>".$RSDB_TEMP_current_category."</h2>";
- echo "<p>".$RSDB_TEMP_current_category_desc."</p>";
- }
-
- if ($RSDB_viewpage != false) {
- if ($RSDB_SET_group != "" || isset($_GET['item']) &&
$_GET['item'] != "") {
- echo "<br />";
- }
- else {
- echo "<p align='center'>";
- if (isset($_GET['cat2']) && $_GET['cat2'] == 'flat')
{
- echo "<b>Flat Style</b> | <a
href='".$RSDB_intern_link_category_cat.htmlspecialchars((a)$_GET['cat'])."&amp;cat2=tree'>Tree
Style</a>";
- }
- elseif (isset($_GET['cat2']) && $_GET['cat2'] ==
'tree') {
- echo "<a
href='".$RSDB_intern_link_category_cat.htmlspecialchars((a)$_GET['cat'])."&amp;cat2=flat'>Flat
Style</a> | <b>Tree Style</b>";
- }
- echo "</p>";
- }
- }
- }
-?>
-
-
-<?php
- if (isset($_GET['page']) && ($_GET['page'] == "name"
|| $_GET['page'] == "vendor")) {
- if ($_GET['page'] == "name") {
- if (isset($_GET['item']) && $_GET['item'] != "") {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp
WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC") ;
- $stmt->bindParam('item_id',@$_GET['item'],PDO::PARAM_STR);
- $stmt->execute();
- $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_itempid['comp_groupid'] == "" ||
$result_itempid['comp_groupid'] == "0") {
- $RSDB_viewpage = false;
- }
- $RSDB_SET_group = $result_itempid['comp_groupid'];
- }
- if ($RSDB_SET_group != "") {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups
WHERE grpentr_visible = '1' AND grpentr_id = :group_id ORDER BY grpentr_id
ASC");
- $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
- $stmt->execute();
- $result_groupid = $stmt->fetch(PDO::FETCH_ASSOC);
- $RSDB_SET_letter = strtolower(substr($result_groupid['grpentr_name'], 0, 1));
- }
- ?>
- <table width="100%" border="1" cellpadding="3"
cellspacing="0" bordercolor="#5984C3">
- <tr>
- <td> <font size="2">Browsing: </font> <a
href="<?php echo $RSDB_intern_link_name_letter_EX."all";
?>"><?php
-
- if ($RSDB_SET_letter != "") {
- echo ucfirst($RSDB_SET_letter);
- }
- else {
- echo "All";
- }
-
- echo "</a>";
-
- if (isset($_GET['item']) && $_GET['item'] != ""
&& $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance("SELECT * FROM rsdb_item_comp WHERE
comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC");
- $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR);
- $stmt->execute();
- $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_itempid['comp_groupid'] == "" ||
$result_itempid['comp_groupid'] == "0") {
- //die("");
- $RSDB_viewpage = false;
- }
- $RSDB_SET_group = $result_itempid['comp_groupid'];
- }
- if ($RSDB_SET_group != "" && $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE
grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp = '1'
ORDER BY grpentr_name ASC");
- $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
- $stmt->execute();
- $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_current_group['grpentr_category'] == "" ||
$result_current_group['grpentr_category'] == "0") {
- //die("");
- $RSDB_viewpage = false;
- }
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_group.$RSDB_SET_group."'>".$result_current_group['grpentr_name']."</a>";
- }
- if (isset($_GET['item']) && $_GET['item'] != ""
&& $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp
WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC");
- $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR);
- $stmt->execute();
- $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC);
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_item_EX.htmlspecialchars($_GET['item'])."'>".$result_current_group['comp_name'];
-
- echo " ["."ReactOS
".show_osversion($result_current_group['comp_osversion'])."]";
-
- echo "</a>";
- }
-
- echo "</td></tr></table>";
-
- }
- elseif ($_GET['page'] == "vendor") {
-
- if (isset($_GET['vendor']) && $_GET['vendor'] != '')
{
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_item_vendor WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC");
- $stmt->bindParam('vendor_id',$_GET['vendor'],PDO::PARAM_STR);
- $stmt->execute();
- $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_itempid['vendor_id'] == "" ||
$result_itempid['vendor_id'] == "0") {
- $RSDB_viewpage = false;
- }
- $RSDB_SET_letter = strtolower(substr($result_itempid['vendor_name'], 0, 1));
- }
- ?>
- <table width="100%" border="1" cellpadding="3"
cellspacing="0" bordercolor="#5984C3">
- <tr>
- <td> <font size="2">Browsing: <a href="<?php
echo $RSDB_intern_link_vendor_letter_EX.$RSDB_SET_letter; ?>">
-
- <?php
-
- if ($RSDB_SET_letter != "") {
- echo ucfirst($RSDB_SET_letter);
- }
- else {
- echo "All";
- }
-
- echo "</a></font>";
-
- if (isset($_GET['vendor']) && $_GET['vendor'] != ''
&& $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_vendor
WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC");
+ }
+ } // end while
+
+ echo $output;
+ } // end of member function tree
+
+
+
+ private static function vendor( $param, $param_type )
+ {
+
+ if ($param > 0 && $param_type === self::PARAM_ENTRY) {
+ $stmt=CDBConnection::getInstance()->prepare("SELECT grpentr_vendor,
grpentr_name FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id =
:group_id") ;
+ $stmt->bindParam('group_id',$param,PDO::PARAM_INT);
+ $stmt->execute();
+ $vendor_id = $stmt->fetchColumn();
+
+ if ($vendor_id === false) {
+ echo 'Unknown Group';
+ return;
+ }
+ }
+
+ // check if entry version exists and is visible
+ elseif ($param > 0 && $param_type === self::PARAM_VERSION) {
+ //@TODO
+ }
+
+ // no valid params
+ else {
+ echo 'Unknown parameter';
+ return;
+ }
+
+ if ($vendor_id) {
+ $stmt=CDBConnection::getInstance()->prepare("SELECT vendor_name FROM
rsdb_item_vendor WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC");
$stmt->bindParam('vendor_id',$_GET['vendor'],PDO::PARAM_STR);
$stmt->execute();
- $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_itempid['vendor_id'] == "" ||
$result_itempid['vendor_id'] == "0") {
- //die("");
- $RSDB_viewpage = false;
- }
- //$RSDB_SET_group = $result_itempid['vendor_id'];
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_vendor_id_EX.htmlspecialchars($_GET['vendor'])."'>".$result_itempid['vendor_name']."</a>";
- }
- if ($RSDB_SET_group != "" && $RSDB_viewpage != false) {
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups
WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp =
'1' ORDER BY grpentr_name ASC");
- $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
- $stmt->execute();
- $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC);
- if ($result_current_group['grpentr_category'] == "" ||
$result_current_group['grpentr_category'] == "0") {
- //die("");
- $RSDB_viewpage = false;
- }
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_name_group_EX.$RSDB_SET_group."'>".$result_current_group['grpentr_name']."</a>";
- }
- if (isset($_GET['item']) && $_GET['item'] != ""
&& $RSDB_viewpage != false) {
- $stmt=CDBCOnnection::getInstance()->prepare("SELECT * FROM rsdb_item_vendor
WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC");
- $stmt->bindParam('group_id',@$_GET['vendor'],PDO::PARAM_STR);
- $stmt->execute();
- $result_current_group = $stmt->fetch(PDO::PARAM_STR);
- echo " <font size='2'>→</font> <a
href='".$RSDB_intern_link_name_item_EX.htmlspecialchars($_GET['item'])."'>".$result_current_group['vendor_name'];
- echo "</a>";
- }
-
- echo "</td></tr></table>";
-
- }
-
-
-
-
- include('inc/tree/tree_menubar_sections.php');
-
- if (isset($_GET['page']) && $_GET['page'] == "name")
{
- $RSDB_TEMP_link_letter = $RSDB_intern_link_name_letter_EX;
- }
- elseif (isset($_GET['page']) && $_GET['page'] ==
"vendor") {
- $RSDB_TEMP_link_letter = $RSDB_intern_link_vendor_letter_EX;
- }
-
- if ($RSDB_viewpage != false) {
-
- echo '<p align="center">';
-
- if ($RSDB_SET_letter == "all" || $RSDB_SET_letter == "") {
- echo ' <b>All</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'all"
class="letterbarlink">All</a> ';
- }
-
- if ($RSDB_SET_letter == "a") {
- echo ' <b>A</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'a"
class="letterbarlink">A</a> ';
- }
-
- if ($RSDB_SET_letter == "b") {
- echo ' <b>B</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'b"
class="letterbarlink">B</a> ';
- }
-
- if ($RSDB_SET_letter == "c") {
- echo ' <b>C</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'c"
class="letterbarlink">C</a> ';
- }
-
- if ($RSDB_SET_letter == "d") {
- echo ' <b>D</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'d"
class="letterbarlink">D</a> ';
- }
-
- if ($RSDB_SET_letter == "e") {
- echo ' <b>E</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'e"
class="letterbarlink">E</a> ';
- }
-
- if ($RSDB_SET_letter == "f") {
- echo ' <b>F</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'f"
class="letterbarlink">F</a> ';
- }
-
- if ($RSDB_SET_letter == "g") {
- echo ' <b>G</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'g"
class="letterbarlink">G</a> ';
- }
-
- if ($RSDB_SET_letter == "h") {
- echo ' <b>H</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'h"
class="letterbarlink">H</a> ';
- }
-
- if ($RSDB_SET_letter == "i") {
- echo ' <b>I</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'i"
class="letterbarlink">I</a> ';
- }
-
- if ($RSDB_SET_letter == "j") {
- echo ' <b>J</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'j"
class="letterbarlink">J</a> ';
- }
-
- if ($RSDB_SET_letter == "k") {
- echo ' <b>K</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'k"
class="letterbarlink">K</a> ';
- }
-
- if ($RSDB_SET_letter == "l") {
- echo ' <b>L</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'l"
class="letterbarlink">L</a> ';
- }
-
- if ($RSDB_SET_letter == "m") {
- echo ' <b>M</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'m"
class="letterbarlink">M</a> ';
- }
-
- if ($RSDB_SET_letter == "n") {
- echo ' <b>N</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'n"
class="letterbarlink">N</a> ';
- }
-
- if ($RSDB_SET_letter == "o") {
- echo ' <b>O</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'o"
class="letterbarlink">O</a> ';
- }
-
- if ($RSDB_SET_letter == "p") {
- echo ' <b>P</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'p"
class="letterbarlink">P</a> ';
- }
-
- if ($RSDB_SET_letter == "q") {
- echo ' <b>Q</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'q"
class="letterbarlink">Q</a> ';
- }
-
- if ($RSDB_SET_letter == "r") {
- echo ' <b>R</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'r"
class="letterbarlink">R</a> ';
- }
-
- if ($RSDB_SET_letter == "s") {
- echo ' <b>S</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'s"
class="letterbarlink">S</a> ';
- }
-
- if ($RSDB_SET_letter == "t") {
- echo ' <b>T</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'t"
class="letterbarlink">T</a> ';
- }
-
- if ($RSDB_SET_letter == "u") {
- echo ' <b>U</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'u"
class="letterbarlink">U</a> ';
- }
-
- if ($RSDB_SET_letter == "v") {
- echo ' <b>V</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'v"
class="letterbarlink">V</a> ';
- }
-
- if ($RSDB_SET_letter == "w") {
- echo ' <b>W</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'w"
class="letterbarlink">W</a> ';
- }
-
- if ($RSDB_SET_letter == "x") {
- echo ' <b>X</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'x"
class="letterbarlink">X</a> ';
- }
-
- if ($RSDB_SET_letter == "y") {
- echo ' <b>Y</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'y"
class="letterbarlink">Y</a> ';
- }
-
- if ($RSDB_SET_letter == "z") {
- echo ' <b>Z</b> ';
- }
- else {
- echo ' <a href="'. $RSDB_TEMP_link_letter .'z"
class="letterbarlink">Z</a> ';
- }
-
- echo "</p><br />";
-
- }
- }
-
- if ($RSDB_viewpage == false) {
- echo "<p>No related database entry found!</p>";
- }
-
-
- //Message::show("Compatibility");
-?>
+ $vendor_name = $stmt->fetchColumn();
+ if ($vendor === false) {
+ echo 'Unknown Vendor';
+ return;
+ }
+ }
+ else {
+ echo 'Can\'t find Vendor';
+ }
+
+ echo '<li>'.$vendor_name.'</li>';
+ } // end of member function vendor
+
+
+
+ private static function initial( $param, $param_type )
+ {
+ global $RSDB_intern_link_name_letter_EX;
+
+ // get entry by version
+ if ($param > 0 && $param_type === self::PARAM_VERSION) {
+ $stmt=CDBConnection::getInstance()->prepare("SELECT comp_groupid FROM
rsdb_item_comp WHERE comp_visible = '1' AND comp_id = :item_id") ;
+ $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_INT);
+ $stmt->execute();
+ $group_id = $stmt->fetchColumn();
+
+ if ($group_id === false) {
+ echo 'Unknown Item';
+ return;
+ }
+ $group_id = $result_itempid['comp_groupid'];
+ }
+
+ // get first letter by entry
+ elseif ($param > 0 && $param_type === self::PARAM_ENTRY) {
+ $group_id = $param;
+ }
+
+ // we need an entry to get the first char
+ if (isset($group_id)) {
+ $stmt=CDBConnection::getInstance()->prepare("SELECT
UPPER(SUBSTRING(LTRIM(grpentr_name), 1, 1)) AS letter, grpentr_name FROM rsdb_groups WHERE
grpentr_visible = '1' AND grpentr_id = :group_id");
+ $stmt->bindParam('group_id',$group_id,PDO::PARAM_INT);
+ $stmt->execute();
+ $group = $stmt->fetchOnce(PDO::FETCH_ASSOC);
+ $letter = $group['letter'];
+ }
+ else {
+ echo 'Unknown Entry';
+ return;
+ }
+
+ // number
+ if ($letter > 0) {
+ echo '
+ <li style="float: left;"><a
href="'.$RSDB_intern_link_name_letter_EX.strtolower($letter).'">#</a></li>';
+ }
+
+ // letter
+ elseif ($letter != '') {
+ echo '
+ <li style="float: left;"><a
href="'.$RSDB_intern_link_name_letter_EX.strtolower($letter).'">'.$letter.'</a></li>';
+ }
+
+ // Unknown letter
+ else {
+ echo '
+ <li style="float: left;">Unknown</li>';
+ }
+ } // end of member function initial
+
+
+
+} // end of Breadcrumb
+
Propchange:
branches/danny-web/reactos.org/htdocs/compat/lib/view/Breadcrumb.class.php
------------------------------------------------------------------------------
svn:mergeinfo =
Modified:
branches/danny-web/reactos.org/htdocs/compat/rsdb_config.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/compat/rsdb_config.php [iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/compat/rsdb_config.php [iso-8859-1] Thu Apr 9
19:02:43 2009
@@ -70,17 +70,16 @@
// View
$RSDB_intern_link_db_view =
$RSDB_intern_index_php."?page=".htmlspecialchars(@$_GET['page']);
- $RSDB_intern_link_db_view2 =
$RSDB_intern_index_php."?page=".htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&cat2=".htmlspecialchars(@$_GET['cat2'])."&letter=".$RSDB_SET_letter."&group=".$RSDB_SET_group."&item=".htmlspecialchars(@$_GET['item'])."&vendor=".htmlspecialchars(@$_GET['vendor'])."";
+ $RSDB_intern_link_db_view2 =
$RSDB_intern_index_php."?page=".htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&letter=".$RSDB_SET_letter."&group=".$RSDB_SET_group."&item=".htmlspecialchars(@$_GET['item'])."&vendor=".htmlspecialchars(@$_GET['vendor'])."";
// Category
- $RSDB_intern_link_category_all =
$RSDB_intern_link_db_sec.htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&cat2=".htmlspecialchars(@$_GET['cat2']);
+ $RSDB_intern_link_category_all =
$RSDB_intern_link_db_sec.htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat']);
- $RSDB_intern_link_category_cat =
$RSDB_intern_link_db_sec.htmlspecialchars(@$_GET['page'])."&cat2=".htmlspecialchars(@$_GET['cat2'])."&cat=";
- $RSDB_intern_link_category_cat2 =
$RSDB_intern_link_db_sec.htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&cat2=";
+ $RSDB_intern_link_category_cat =
$RSDB_intern_link_db_sec.htmlspecialchars((a)$_GET['page'])."&amp;cat="ot;&cat=";
- $RSDB_intern_link_category_EX =
$RSDB_intern_link_db_sec."category&amp;cat2=".htmlspecialchars((a)$_GET['cat2'])."&amp;cat="at2'])."&cat=";
- $RSDB_intern_link_cat_EX =
$RSDB_intern_link_db_sec."category&amp;cat2=".htmlspecialchars((a)$_GET['cat2'])."&amp;cat="at2'])."&cat=";
+ $RSDB_intern_link_category_EX =
$RSDB_intern_link_db_sec."category&cat=";
+ $RSDB_intern_link_cat_EX =
$RSDB_intern_link_db_sec."category&cat=";
$RSDB_intern_link_cat2_EX =
$RSDB_intern_link_db_sec."category&cat=";
@@ -151,10 +150,10 @@
// Language
- $RSDB_intern_link_language =
$RSDB_intern_index_php."?page=".htmlspecialchars(@$_GET['page'])."&sec=".htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&cat2=".htmlspecialchars(@$_GET['cat2'])."&letter=".$RSDB_SET_letter."&group=".$RSDB_SET_group."&item=".htmlspecialchars(@$_GET['item'])."&order=".$RSDB_SET_order."&filter=".$RSDB_SET_filter."&vendor=".htmlspecialchars(@$_GET['vendor'])."&lang=";
+ $RSDB_intern_link_language =
$RSDB_intern_index_php."?page=".htmlspecialchars(@$_GET['page'])."&sec=".htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&letter=".$RSDB_SET_letter."&group=".$RSDB_SET_group."&item=".htmlspecialchars(@$_GET['item'])."&order=".$RSDB_SET_order."&filter=".$RSDB_SET_filter."&vendor=".htmlspecialchars(@$_GET['vendor'])."&lang=";
// Export
- $RSDB_intern_link_export =
$RSDB_intern_index_php."?page=dat&sec=".htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&cat2=".htmlspecialchars(@$_GET['cat2'])."&letter=".$RSDB_SET_letter."&group=".$RSDB_SET_group."&item=".htmlspecialchars(@$_GET['item'])."&order=".$RSDB_SET_order."&filter=".$RSDB_SET_filter."&vendor=".htmlspecialchars(@$_GET['vendor'])."&lang=".$rpm_lang."&export=";
+ $RSDB_intern_link_export =
$RSDB_intern_index_php."?page=dat&sec=".htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&letter=".$RSDB_SET_letter."&group=".$RSDB_SET_group."&item=".htmlspecialchars(@$_GET['item'])."&order=".$RSDB_SET_order."&filter=".$RSDB_SET_filter."&vendor=".htmlspecialchars(@$_GET['vendor'])."&lang=".$rpm_lang."&export=";
$RSDB_intern_link_export2 = $RSDB_intern_index_php."?page=dat&export=";