Author: dgoette
Date: Sat Apr 18 00:51:44 2009
New Revision: 378
URL:
http://svn.reactos.org/svn/reactos?rev=378&view=rev
Log:
* fix some bugs
* strip down front page
* get front page xhtml1-strict compatible
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/Compat_Autoloader.class.p…
branches/danny-web/www/www.reactos.org/compat/lib/HTML.class.php
branches/danny-web/www/www.reactos.org/compat/lib/HTML_Item.class.php
branches/danny-web/www/www.reactos.org/compat/lib/get/List_Item.class.php
branches/danny-web/www/www.reactos.org/compat/lib/om/CUser.class.php
branches/danny-web/www/www.reactos.org/compat/lib/view/Breadcrumb.class.php
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Category.class.…
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Group.class.php
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Vendor.class.php
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_VendorInfo.clas…
branches/danny-web/www/www.reactos.org/compat/lib/view/Home.class.php
branches/danny-web/www/www.reactos.org/compat/lib/view/Item_Details.class.p…
branches/danny-web/www/www.reactos.org/compat/lib/view/Item_Tests.class.php
branches/danny-web/www/www.reactos.org/compat/notools/plugins.php
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/Compat_Autoloader.class.p…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/Compat_Autoloader.class.p…
[iso-8859-1] (original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/Compat_Autoloader.class.p…
[iso-8859-1] Sat Apr 18 00:51:44 2009
@@ -44,6 +44,9 @@
elseif (file_exists(CDB_PATH.'lib/om/'.$class.'.class.php')) {
require_once(CDB_PATH.'lib/om/'.$class.'.class.php');
}
+ elseif (file_exists(CDB_PATH.'lib/get/'.$class.'.class.php')) {
+ require_once(CDB_PATH.'lib/get/'.$class.'.class.php');
+ }
elseif (file_exists(CDB_PATH.'lib/view/'.$class.'.class.php')) {
require_once(CDB_PATH.'lib/view/'.$class.'.class.php');
}
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/HTML.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/HTML.class.php [iso-8859-1]
(original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/HTML.class.php [iso-8859-1] Sat Apr
18 00:51:44 2009
@@ -120,24 +120,6 @@
}
echo '
- <script>
- <!--'."
- function clk(url,ct,sg)
- {
- if(document.images) {
- var u='';
-
- if (url) {
- u='&url='+escape(url).replace(/\+/g,'%2B');
- }
-
- new
Image().src='url.php?t='+escape(ct)+'&u='+u+'&a=".base64_encode($RSDB_intern_user_id)."'+'&i=".base64_encode($_SERVER['REMOTE_ADDR'])."'+'&s'+sg;
-
- }
- return true;
- }
- ".'-->
- </script>
</head>
<body>
<div id="top">
@@ -163,17 +145,6 @@
include('rsdb_setting.php');
include('rsdb_config.php');
- global $roscms_intern_account_level;
- global $roscms_intern_login_check;
- global $roscms_intern_login_check_username;
- global $roscms_intern_account_group;
- global $roscms_intern_usrgrp_sadmin;
- global $roscms_intern_usrgrp_admin;
- global $roscms_intern_usrgrp_dev;
- global $roscms_intern_usrgrp_team;
- global $roscms_intern_usrgrp_trans;
- global $roscms_intern_usrgrp_user;
- global $RSDB_langres;
global $RSDB_intern_link_db_sec;
echo '
@@ -190,53 +161,35 @@
</ol>
<br />
+ <div class="navTitle">Browse Database</div>
+ <ol>
+ <li><a
href="'.$RSDB_intern_link_db_sec.'name&letter=all">By
Name</a></li>
+ <li><a
href="'.$RSDB_intern_link_db_sec.'category&cat=0">By
Category</a></li>
+ <li><a
href="'.$RSDB_intern_link_db_sec.'vendor&letter=all">By
Vendor</a></li>
+ <li><a
href="'.$RSDB_intern_link_db_sec.'rank">By Rank</a></li>
+ </ol>
+ <br />
+
<div class="navTitle">Compatibility</div>
<ol>
<li><a
href="'.$RSDB_intern_link_db_sec.'home">Overview</a></li>
- <li><a
href="'.$RSDB_intern_link_db_sec.'category&cat=0">Browse
Database</a></li>';
-
- if (isset($_GET['page']) && ($_GET['page'] ==
'category' || $_GET['page'] == 'name' || $_GET['page'] ==
'vendor' || $_GET['page'] == 'rank')) {
- echo '
- <li><a
href="'.$RSDB_intern_link_db_sec.'category&cat=0"> -
By Category</a></li>
- <li><a
href="'.$RSDB_intern_link_db_sec.'name&letter=all"> -
By Name</a></li>
- <li><a
href="'.$RSDB_intern_link_db_sec.'vendor&letter=all"> -
By Vendor</a></li>
- <li><a
href="'.$RSDB_intern_link_db_sec.'rank"> - By
Rank</a></li>';
- }
-
- echo '
- <li id="noscriptsearchbar" style="display: block"><a
href="'.$RSDB_intern_link_db_sec.'search">Search</a></li>
- <li><a
href="'.$RSDB_intern_link_db_sec.'submit">Submit
Application</a></li>
- <li><a href="'.$RSDB_intern_link_db_sec.'help">Help
& FAQ</a></li>
- </ol>
- <br />
-
- <div class="navTitle">Search</div>
- <ol>
- <li>
- <div id="ajaxsearchbar" align="center"
style="display: none">
- <div align="center">
- <label for="searchbar"
accesskey="s"></label>
- <input name="searchbar" type="text"
id="searchbar" tabindex="0"
onkeyup="'."loadItemList(this.value,'bar','comp','ajaxloadbar','sresultbar');".'"
size="17" maxlength="50" style="font-family: Verdana; font-size:
x-small; font-style: normal;" />
- </div>
- <div id="sresultbar" style="display: none"
align="left"></div>
- <div style="text-align: center;">
- <img id="ajaxloadbar" src="images/ajax_loading.gif"
style="display: none" />
- </div>
- </li>
- </ol>
- <br />
-
- <script type="text/javascript">
- <!--'."
- document.getElementById('ajaxsearchbar').style.display =
'block';
- document.getElementById('noscriptsearchbar').style.display =
'none';
- ".'-->
- </script>
-
- <div class="navTitle">Language</div>
- <ol>
- <li>
- <div align="center">';
+ <li><a
href="'.$RSDB_intern_link_db_sec.'submit">Submit
Application</a></li>
+ <li><a
href="'.$RSDB_intern_link_db_sec.'help">Help &
FAQ</a></li>
+ </ol>
+ <br />
+
+ <div class="navTitle"><label for="searchbar"
accesskey="s">Search</label></div>
+ <ol>
+ <li>
+ <input name="searchbar" type="text"
id="searchbar" tabindex="0" size="17"
maxlength="50" style="font-family: Verdana; font-size: x-small; font-style:
normal;" />
+ <button>></button>
+ </li>
+ </ol>
+ <br />
+
+ <div class="navTitle">Language</div>
+ <ol>
+ <li>';
// get selected language
if (empty($_GET['lang']) &&
isset($_COOKIE['roscms_usrset_lang'])) {
@@ -294,10 +247,10 @@
</table>
- <hr size="1" />
+ <hr />
<address style="text-align:center">
- <a href="http://www.reactos.org"
onmousedown="'."return
clk(this.href,'res','');".'">ReactOS</a> is a
registered trademark or a trademark of <a
href="http://www.reactos.org/?page=foundation">ReactOS Foundation</a>
in the United States and other countries.<br />
- Copyright © Klemens Friedl 2005-'.date('Y').', All
rights reserved.
+ <a href="http://www.reactos.org">ReactOS</a> is a
registered trademark or a trademark of <a
href="http://www.reactos.org/?page=foundation">ReactOS Foundation</a>
in the United States and other countries.<br />
+ Copyright © Klemens Friedl 2005-2009, All rights reserved.
</address>
</body>
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/HTML_Item.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/HTML_Item.class.php [iso-8859-1]
(original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/HTML_Item.class.php [iso-8859-1] Sat
Apr 18 00:51:44 2009
@@ -265,6 +265,7 @@
</table></td>
</tr>
</table>
-<?
+<?php
} // end of member function header
-}
+}
+?>
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/get/List_Item.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/get/List_Item.class.php [iso-8859-1]
(original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/get/List_Item.class.php [iso-8859-1]
Sat Apr 18 00:51:44 2009
@@ -18,21 +18,11 @@
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(" ");
- }
-
+class List_Item
+{
+
+ public function __construct()
+ {
?>
<base href="<?php echo $RSDB_intern_path_server.$RSDB_intern_path;
?>" />
<table width="100%" border="0" >
@@ -241,3 +231,7 @@
</td>
</tr>
</table>
+<?php
+ }
+}
+?>
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/om/CUser.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/om/CUser.class.php [iso-8859-1]
(original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/om/CUser.class.php [iso-8859-1] Sat
Apr 18 00:51:44 2009
@@ -18,44 +18,40 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/*
- * ReactOS Support Database System - RSDB
- *
- * (c) by Klemens Friedl <frik85>
- *
- * 2005 - 2006
- */
+class CUser
+{
- // To prevent hacking activity:
- if ( !defined('RSDB') )
- {
- die(" ");
- }
+
+ // Get the user name from the RosCMS user table
+ public static function getName($user_id) {
+
+ require_once(ROSCMS_PATH.'lib/RosCMS_Autoloader.class.php');
+ $name = Subsystem::getUserName($user_id);
+ if ($name !== false) {
+ return $name;
+ }
+ return '';
+ } // end of member function getName
- $roscms_connected = 1;
-
- function usrfunc_GetUsername($RSDB_TEMP_getusrid) { // Get the user name from the RosCMS
user table
- require_once(ROSCMS_PATH.'lib/RosCMS_Autoloader.class.php');
- $RSDB_USER_name = Subsystem::getUserName($RSDB_TEMP_getusrid);
- if ($RSDB_USER_name !== false) {
- return $RSDB_USER_name;
- }
- return '';
- }
-
- function usrfunc_IsAdmin($RSDB_TEMP_getusrid) { // Check if the user is an developer,
admin or super admin
+ // Check if the user is an developer, admin or super admin
+ public static function isAdmin($user_id) {
//@IMPLEMENT Usergroup check
return false;
- }
+ } // end of member function isAdmin
- function usrfunc_IsModerator($RSDB_TEMP_getusrid) { // Check if the user is an RSDB
Moderator
+
+
+ public static function isModerator($user_id) { // Check if the user is an RSDB
Moderator
//@IMPLEMENT Usergroup check
- return false;
- }
-
+ return false;
+ } // end of member function isModerator
+
+
+
+} // end of class CUser
?>
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/view/Breadcrumb.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/view/Breadcrumb.class.php
[iso-8859-1] (original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/view/Breadcrumb.class.php
[iso-8859-1] Sat Apr 18 00:51:44 2009
@@ -122,12 +122,12 @@
// 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=CDBConnection::getInstance()->prepare("SELECT 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) {
+ $category_id = $stmt->fetchColumn();
+
+ if ($category_id === false) {
echo 'Unknown Group';
return;
}
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Category.class.…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Category.class.…
[iso-8859-1] (original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Category.class.…
[iso-8859-1] Sat Apr 18 00:51:44 2009
@@ -24,6 +24,8 @@
protected function body ()
{
global $RSDB_intern_link_db_sec;
+ global $RSDB_intern_link_group;
+ global $RSDB_intern_link_vendor_id_EX;
// show breadcrumb
if (isset($_GET['cat'])) {
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Group.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Group.class.php
[iso-8859-1] (original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Group.class.php
[iso-8859-1] Sat Apr 18 00:51:44 2009
@@ -24,8 +24,13 @@
protected function body()
{
-
-
+ global $RSDB_intern_user_id;
+ global $RSDB_SET_group;
+ global $RSDB_intern_link_vendor_sec;
+ global $RSDB_intern_link_item;
+
+
+ new Breadcrumb(Breadcrumb::MODE_TREE, $_GET['group'],
Breadcrumb::PARAM_ENTRY);
$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);
@@ -290,7 +295,7 @@
<td width="40%" valign="top">
<?php
- if (isset($_GET['group2']) && ($_GET['group2'] == ''
|| $_GET['group2'] == 'overview')) {
+ if (!isset($_GET['group2']) || ($_GET['group2'] == '' ||
$_GET['group2'] == 'overview')) {
$stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_item_comp WHERE comp_groupid = :group_id AND comp_visible = '1' ORDER BY
comp_award DESC, comp_appversion DESC, comp_osversion DESC LIMIT 1");
}
else {
@@ -300,7 +305,7 @@
}
$stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
$stmt->execute();
- $result_version_newest = $stmt->fetch(PDO::FETCH_ASSOC);;
+ $result_version_newest = $stmt->fetchOnce(PDO::FETCH_ASSOC);
echo "<h3 align=\"center\"><font
size=\"2\">".$result_entry_vendor['vendor_name']."</font>
".$result_version_newest['comp_name']."</h3>";
?>
@@ -761,7 +766,7 @@
<?php
} // end if {$result_page['grpentr_type'] == "default"}
}
- if (usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if (CUser::isModerator($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE
grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp =
'1'") ;
$stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
@@ -807,7 +812,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)) {
+ if ($RSDB_TEMP_pmod == "ok" && $RSDB_SET_group != ""
&& $RSDB_TEMP_appgroup != "" && $RSDB_TEMP_description !=
"" && $RSDB_TEMP_category != "" && $RSDB_TEMP_vendor
!= "" && CUser::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->bindParam('new_name',$RSDB_TEMP_appgroup,PDO::PARAM_STR);
@@ -832,7 +837,7 @@
}
// Special request:
- if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtreq1 != ""
&& $RSDB_TEMP_txtreq2 != "" &&
usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtreq1 != ""
&& $RSDB_TEMP_txtreq2 != "" &&
CUser::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->bindParam('user_id',$RSDB_intern_user_id,PDO::PARAM_STR);
$stmt->bindParam('ip',$RSDB_ipaddr,PDO::PARAM_STR);
@@ -843,7 +848,7 @@
$stmt->execute();
}
// Report spam:
- if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtspam != ""
&& usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtspam != ""
&& CUser::isModerator($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_groups SET
grpentr_visible = '3' WHERE grpentr_id = :group_id");
$stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR);
$stmt->execute();
@@ -858,7 +863,7 @@
$temp_verified = "yes";
}
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)) {
+ if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_verified ==
"done" && CUser::isModerator($RSDB_intern_user_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);
@@ -1170,14 +1175,14 @@
<br />
<?php
- if (usrfunc_IsAdmin($RSDB_intern_user_id)) {
+ if (CUser::isAdmin($RSDB_intern_user_id)) {
$RSDB_TEMP_padmin = "";
$RSDB_TEMP_done = "";
if (array_key_exists("padmin", $_POST))
$RSDB_TEMP_padmin=htmlspecialchars($_POST["padmin"]);
if (array_key_exists("done", $_POST))
$RSDB_TEMP_done=htmlspecialchars($_POST["done"]);
- if ($RSDB_TEMP_padmin == "ok" && $RSDB_TEMP_done != ""
&& usrfunc_IsAdmin($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_padmin == "ok" && $RSDB_TEMP_done != ""
&& CUser::isAdmin($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_logs SET
log_taskdone_usr = :user_id WHERE log_id = :log_id");
$stmt->bindParam('user_id',$RSDB_intern_user_id,PDO::PARAM_STR);
$stmt->bindParam('log_id',$RSDB_TEMP_done,PDO::PARAM_STR);
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Vendor.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Vendor.class.php
[iso-8859-1] (original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Vendor.class.php
[iso-8859-1] Sat Apr 18 00:51:44 2009
@@ -120,7 +120,7 @@
<?php
}
- if (usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if (CUser::isModerator($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_vendor
WHERE vendor_visible = '1' AND vendor_id = :vendor_id LIMIT 1");
$stmt->bindParam('vendor_id',@$_GET['vendor'],PDO::PARAM_STR);
@@ -156,7 +156,7 @@
if (array_key_exists("txtinfo", $_POST))
$RSDB_TEMP_txtinfo=htmlspecialchars($_POST["txtinfo"]);
// Edit application group data:
- if ($RSDB_TEMP_pmod == "ok" && isset($_GET['page'])
&& $_GET['page'] == "vendor" && $RSDB_TEMP_vendname !=
"" && $RSDB_TEMP_txturl != "" &&
usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_pmod == "ok" && isset($_GET['page'])
&& $_GET['page'] == "vendor" && $RSDB_TEMP_vendname !=
"" && $RSDB_TEMP_txturl != "" &&
CUser::isModerator($RSDB_intern_user_id)) {
// Submit vendor entry:
$stmt=CDBConnection::getInstance()->prepare("INSERT INTO rsdb_item_vendor (
vendor_id, vendor_name, vendor_visible, vendor_fullname, vendor_url, vendor_email,
vendor_infotext, vendor_usrid, vendor_usrip, vendor_date, vendor_checked ) VALUES
('', :name, '1', :fullname, :url, :email, :info, :user_id, :ip, NOW() ,
'yes')");
@@ -178,7 +178,7 @@
}
// Special request:
- if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtreq1 != ""
&& $RSDB_TEMP_txtreq2 != "" &&
usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtreq1 != ""
&& $RSDB_TEMP_txtreq2 != "" &&
CUser::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->bindParam('user_id',$RSDB_intern_user_id,PDO::PARAM_STR);
@@ -284,14 +284,14 @@
<br />
<?php
- if (usrfunc_IsAdmin($RSDB_intern_user_id)) {
+ if (CUser::isAdmin($RSDB_intern_user_id)) {
$RSDB_TEMP_padmin = "";
$RSDB_TEMP_done = "";
if (array_key_exists("padmin", $_POST))
$RSDB_TEMP_padmin=htmlspecialchars($_POST["padmin"]);
if (array_key_exists("done", $_POST))
$RSDB_TEMP_done=htmlspecialchars($_POST["done"]);
- if ($RSDB_TEMP_padmin == "ok" && $RSDB_TEMP_done != ""
&& usrfunc_IsAdmin($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_padmin == "ok" && $RSDB_TEMP_done != ""
&& CUser::isAdmin($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_logs SET
log_taskdone_usr = :user_id WHERE log_id = :log_id LIMIT 1");
$stmt->bindParam('user_id',$RSDB_intern_user_id,PDO::PARAM_STR);
$stmt->bindParam('log_id',$RSDB_TEMP_done,PDO::PARAM_STR);
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_VendorInfo.clas…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_VendorInfo.clas…
[iso-8859-1] (original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_VendorInfo.clas…
[iso-8859-1] Sat Apr 18 00:51:44 2009
@@ -310,7 +310,7 @@
<p> </p>
<?php
- if (usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if (CUser::isModerator($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepapare("SELECT * FROM rsdb_item_vendor
WHERE vendor_visible = '1' AND vendor_id = :vendor_id LIMIT 1");
$stmt->bindParam('vendor_id',@$_GET['vendor'],PDO::PARAM_STR);
@@ -347,7 +347,7 @@
// Edit application group data:
- if ($RSDB_TEMP_pmod == "ok" && isset($_GET['vendor'])
&& $_GET['vendor'] != '' && $RSDB_TEMP_vendname !=
"" && $RSDB_TEMP_txturl != "" &&
usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_pmod == "ok" && isset($_GET['vendor'])
&& $_GET['vendor'] != '' && $RSDB_TEMP_vendname !=
"" && $RSDB_TEMP_txturl != "" &&
CUser::isModerator($RSDB_intern_user_id)) {
// Update group entry:
$stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_item_vendor SET
vendor_name = :name, vendor_fullname = :fullname, vendor_url = :url, vendor_email =
:email, vendor_infotext = :info WHERE vendor_id = :vendor_id LIMIT 1");
$stmt->bindParam('name',$RSDB_TEMP_vendname,PDO::PARAM_STR);
@@ -367,7 +367,7 @@
}
// Special request:
- if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtreq1 != ""
&& $RSDB_TEMP_txtreq2 != "" &&
usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtreq1 != ""
&& $RSDB_TEMP_txtreq2 != "" &&
CUser::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->bindParam('user_id',$RSDB_intern_user_id,PDO::PARAM_STR);
$stmt->bindParam('ip',$RSDB_ipaddr,PDO::PARAM_STR);
@@ -378,7 +378,7 @@
$stmt->execute();
}
// Report spam:
- if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtspam != ""
&& usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtspam != ""
&& CUser::isModerator($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_item_vendor SET
vendor_visible = '3' WHERE vendor_id = :vendor_id LIMIT 1");
$stmt->bindParam('vendor_id',@$_GET['vendor'],PDO::PARAM_STR);
$stmt->execute();
@@ -392,7 +392,7 @@
$temp_verified = "yes";
}
if ($result_maintainer_vendor['vendor_checked'] == "1" ||
$result_maintainer_vendor['vendor_checked'] == "no") {
- if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_verified ==
"done" && usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_verified ==
"done" && CUser::isModerator($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_item_vendor SET
vendor_checked = :checked WHERE vendor_id = :vendor_id LIMIT 1");
$stmt->bindParam('checked',$temp_verified,PDO::PARAM_STR);
$stmt->bindParam('vendor_id',@$_GET['vendor'],PDO::PARAM_STR);
@@ -627,14 +627,14 @@
<br />
<?php
- if (usrfunc_IsAdmin($RSDB_intern_user_id)) {
+ if (CUser::isAdmin($RSDB_intern_user_id)) {
$RSDB_TEMP_padmin = "";
$RSDB_TEMP_done = "";
if (array_key_exists("padmin", $_POST))
$RSDB_TEMP_padmin=htmlspecialchars($_POST["padmin"]);
if (array_key_exists("done", $_POST))
$RSDB_TEMP_done=htmlspecialchars($_POST["done"]);
- if ($RSDB_TEMP_padmin == "ok" && $RSDB_TEMP_done != ""
&& usrfunc_IsAdmin($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_padmin == "ok" && $RSDB_TEMP_done != ""
&& CUser::isAdmin($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_logs SET
log_taskdone_usr = :user_id WHERE log_id = :log_id");
$stmt->bindParam('user_id',$RSDB_intern_user_id,PDO::PARAM_STR);
$stmt->bindParam('log_id',$RSDB_TEMP_done,PDO::PARAM_STR);
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/view/Home.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/view/Home.class.php [iso-8859-1]
(original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/view/Home.class.php [iso-8859-1] Sat
Apr 18 00:51:44 2009
@@ -26,158 +26,30 @@
protected function body( )
{
- global $RSDB_intern_index_php;
global $RSDB_intern_link_db_sec;
global $RSDB_intern_user_id;
global $RSDB_intern_loginsystem_fullpath;
global $RSDB_intern_link_item_comp;
+ // get number of entries
+ $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM rsdb_groups
WHERE grpentr_visible = '1'");
+ $stmt->execute();
+
echo '
- <script type="text/JavaScript">
- <!--'."
- function MM_preloadImages() { //v3.0
- var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
- var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length;
i++)
- if (a[i].indexOf('#')!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}}
- }
-
- function MM_swapImgRestore() { //v3.0
- var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
- }
-
- function MM_findObj(n, d) { //v4.01
- var p,i,x; if(!d) d=document;
if((p=n.indexOf('?'))>0&&parent.frames.length) {
- d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
- if(!(x=d[n])&&d.all) x=d.all[n]; for
(i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
- for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
- if(!x && d.getElementById) x=d.getElementById(n); return x;
- }
-
- function MM_swapImage() { //v3.0
- var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
- if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
- }
- ".'//-->
- </script>
- <style type="text/css">
- <!--'."
- .Stil1 {
- font-size: 135%;
- font-weight: bold;
- }
- ".'-->
- </style>
- <body
onLoad="'."MM_preloadImages('media/icons/buttons/button_comp_search_m.jpg',
'media/icons/buttons/button_comp_category_m.jpg',
'media/icons/buttons/button_comp_name_m.jpg',
'media/icons/buttons/button_comp_vendor_m.jpg',
'media/icons/buttons/button_comp_rank_m.jpg',
'media/icons/buttons/button_comp_submit_m.jpg');".'">
<h1>Compatibility Database - Overview</h1>
- <table width="100%" border="0" cellpadding="0"
cellspacing="0">
- <tr>
- <td width="100%" valign="top">
- <p style="font-size:2;">The ReactOS Compatibility Database
(CompDB) has stored a lot of information about application and driver compatibility with
ReactOS.</p>
- <div id="StartList" style="display:
none;text-align:center;">
- <a
href="'.$RSDB_intern_link_db_sec.'category&cat=0&ajax=true"
onMouseOut="'."MM_swapImgRestore()".'"
onMouseOver="'."MM_swapImage('CompCategory', '',
'media/icons/buttons/button_comp_category_m.jpg', 1);".'">
- <img src="media/icons/buttons/button_comp_category.jpg"
alt="Browse by Category" name="CompCategory" width="232"
height="50" border="0" />
- </a>
- <br />
- <a
href="'.$RSDB_intern_link_db_sec.'name&letter=all&ajax=true"
onMouseOut="'."MM_swapImgRestore()".'"
onMouseOver="'."MM_swapImage('CompName', '',
'media/icons/buttons/button_comp_name_m.jpg', 1);".'">
- <img src="media/icons/buttons/button_comp_name.jpg"
alt="Browse by Name" name="CompName" width="232"
height="50" border="0" />
- </a>
- <br />
- <a
href="'.$RSDB_intern_link_db_sec.'vendor&letter=all&ajax=true"
onMouseOut="'."MM_swapImgRestore()".'"
onMouseOver="'."MM_swapImage('CompVendor', '',
'media/icons/buttons/button_comp_vendor_m.jpg', 1);".'">
- <img src="media/icons/buttons/button_comp_vendor.jpg"
alt="Browse by Vendor" name="CompVendor" width="232"
height="50" border="0" />
- </a>
- <br />
- <a
href="'.$RSDB_intern_link_db_sec.'rank&ajax=true"
onMouseOut="'."MM_swapImgRestore()".'"
onMouseOver="'."MM_swapImage('CompRank', '',
'media/icons/buttons/button_comp_rank_m.jpg', 1);".'">
- <img src="media/icons/buttons/button_comp_rank.jpg"
alt="Browse by Rank" name="CompRank" width="232"
height="50" border="0" />
- </a>
- <br />
- <a
href="'.$RSDB_intern_link_db_sec.'submit&ajax=true"
onMouseOut="'."MM_swapImgRestore()".'"
onMouseOver="'."MM_swapImage('SubApp', '',
'media/icons/buttons/button_comp_submit_m.jpg', 1)".'">
- <img src="media/icons/buttons/button_comp_submit.jpg"
alt="Submit Application" name="SubApp" width="232"
height="50" border="0" />
- </a>
- <br />
- <table width="231" height="49"
border="0" cellpadding="0" cellspacing="0"
style="margin: 0px auto;">
- <tr>
- <td width="231" height="49"
align="right" valign="middle" nowrap
background="media/icons/buttons/button_comp_search.jpg">
- <table width="100%" border="0">
- <tr>
- <td width="110"> </td>
- <td>
- <input name="searchinput" type="text"
id="searchinput" tabindex="0"
onBlur="'."loadItemList(this.value, 'table', 'comp',
'ajaxload', 'sresult');".'"
onKeyUp="'."loadItemList(this.value, 'table', 'comp',
'ajaxload', 'sresult');".'" size="10"
maxlength="50" style="background-color: #FFFFFF; color: #000000;
font-family: Verdana; font-size: x-small; font-style: normal; border-left : 1px solid
#FFFFFF; border-right : 1px solid #FFFFFF; border-top : 1px solid #FFFFFF; border-bottom :
1px solid #FFFFFF;" />
- <img id="ajaxload"
src="images/ajax_loading.gif" style="display: none" />
- <script language="JavaScript"
type="text/JavaScript">
- <!--'."
- var brow = navigator.appName;
- if (brow == 'Netscape') {
-
document.getElementById('searchinput').size=15;
- }
- ".'-->
- </script>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
- <div style="text-align:center;">
- <noscript>
- <a
href="'.$RSDB_intern_link_db_sec.'category&cat=0&ajax=false">
- <img src="media/icons/buttons/button_comp_category.jpg"
alt="Browse by Category" name="CompCategory" width="232"
height="50" border="0" />
- </a>
- <br />
- <a
href="'.$RSDB_intern_link_db_sec.'name&letter=all&ajax=false">
- <img src="media/icons/buttons/button_comp_name.jpg"
alt="Browse by Name" name="CompName" width="232"
height="50" border="0" />
- </a>
- <br />
- <a
href="'.$RSDB_intern_link_db_sec.'vendor&letter=all&ajax=false">
- <img src="media/icons/buttons/button_comp_vendor.jpg"
alt="Browse by Vendor" name="CompVendor" width="232"
height="50" border="0" />
- </a>
- <br />
- <a
href="'.$RSDB_intern_link_db_sec.'rank&ajax=false">
- <img src="media/icons/buttons/button_comp_rank.jpg"
alt="Browse by Rank" name="CompRank" width="232"
height="50" border="0" />
- </a>
- <br />
- <a
href="'.$RSDB_intern_link_db_sec.'submit&ajax=false">
- <img src="media/icons/buttons/button_comp_submit.jpg"
alt="Submit Application" name="SubApp" width="232"
height="50" border="0" />
- </a>
- <br />
- <a
href="'.$RSDB_intern_link_db_sec.'search&ajax=false">
- <img
src="media/icons/buttons/button_comp_search_noscript.jpg" alt="Search by
Query" name="CompSearch" width="232" height="50"
border="0" />
- </a>
- <br />
- </noscript>
- </div>
- </td>
- <td style="text-align:right;vertical-align:top;">
- <img src="media/pictures/compatibility.jpg" alt="ReactOS
Compatibility Database" height="300" width="400" />
- </td>
- </tr>
- </table>
- <div id="sresult" style="display: none"></div>
- <h3>Features</h3>
- <p>Some of the <strong>features of the Compatibility
Database</strong> are:</p>
- <ul>
- <li>Browse through the database in several different ways (by <a
href="'.$RSDB_intern_link_db_sec.'category&cat=0">category</a>,
<a
href="'.$RSDB_intern_link_db_sec.'name&letter=all">name</a>,
<a
href="'.$RSDB_intern_link_db_sec.'vendor&letter=all">vendor</a>,
<a href="'.$RSDB_intern_link_db_sec.'rank">ranks</a>, <a
href="'.$RSDB_intern_link_db_sec.'search">search</a>).</li>
- <li>Submit application entries, compatibility test reports, vendor
information, screenshots and forum messages. </li>
- <li>Ability to vote on test reports, forum messages, screenshots,
etc.</li>
- <li>Ability to customize the layout, several settings (like personal
threshold, etc.) and behaviour of the Support Database.</li>
- <li>Ability to sign up to be an application maintainer.<br
/></li>
- </ul>
- <h3>Recent submissions</h3>';
-
- // get number of entries
- $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM rsdb_groups
WHERE grpentr_visible = '1' AND grpentr_comp = '1'");
- $stmt->execute();
- echo '
- <p>There are <a
href="'.$RSDB_intern_link_db_sec.'stats"><strong>'.$stmt->fetchColumn().'
applications and drivers</strong></a> currently in the database.</p>
- <div style="margin:0; margin-top:10px; width:520px; margin-right:10px;
border:1px solid #dfdfdf; padding:0em 1em 1em 1em; background-color:#EAF0F8;">
- <br />
- <table width="500" border="0" cellpadding="1"
cellspacing="1">
- <tr bgcolor="#5984C3">
- <td width="15%" bgcolor="#5984C3"><div
align="center"><font color="#FFFFFF" face="Arial,
Helvetica,
sans-serif"><strong>Time</strong></font></div></td>
- <td width="50%" bgcolor="#5984C3"><div
align="center"><font color="#FFFFFF" face="Arial,
Helvetica,
sans-serif"><strong>Application</strong></font></div></td>
- <td width="35%" bgcolor="#5984C3"><div
align="center"><font color="#FFFFFF" face="Arial,
Helvetica,
sans-serif"><strong>Function</strong></font></div></td>
- </tr>';
+ <img src="media/pictures/compatibility.jpg" alt="ReactOS
Compatibility Database" style="float: right;"/>
+ <p>The ReactOS Compatibility Database contains information about compatible
software. Below the latest reports are listed</p>
+ <p>There are
<strong>'.$stmt->fetchColumn().'</strong> applications and drivers
currently in the database.</p>
+
+ <h2>Recent submissions</h2>
+ <div style="margin:10px 10px 0 0; width:500px; border:1px solid #dfdfdf;
padding:1em; background-color:#EAF0F8;">
+ <table style="width:100%; border: none;" cellpadding="1"
cellspacing="1">
+ <tr style="background-color:#5984C3;color:white;">
+ <th>Application</th>
+ <th style="width:50px;">Works?</th>
+ <th style="width:150px;text-align:center;">Last
update</th>
+ </tr>';
//@MOVEME to css
$cellcolor1='#E2E2E2';
@@ -185,42 +57,28 @@
$cellcolorcounter=0;
// show latest tests
- $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_item_comp_testresults WHERE test_visible = '1' ORDER BY test_id DESC LIMIT
5");
+ $stmt=CDBConnection::getInstance()->prepare("SELECT
t.test_user_submit_timestamp, i.comp_id, i.comp_name FROM rsdb_item_comp_testresults t
JOIN rsdb_item_comp i ON t.test_comp_id=i.comp_id WHERE t.test_visible = '1' ORDER
BY t.test_id DESC LIMIT 10");
$stmt->execute();
while ($entry = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ ++$cellcolorcounter;
- // get programm name to the test
- $stmt_comp=CDBConnection::getInstance()->prepare("SELECT * FROM
rsdb_item_comp WHERE comp_id = :comp_id LIMIT 1");
-
$stmt_comp->bindParam('comp_id',$entry['test_comp_id'],PDO::PARAM_STR);
- $stmt_comp->execute();
- $comp = $stmt_comp->fetchOnce(PDO::FETCH_ASSOC);
-
- $cellcolorcounter++;
echo '
<tr style="background-color:'.($cellcolorcounter%2 ? $cellcolor1 :
$cellcolor2).';">
- <td style="text-align:
center;font-size:1;">'.$entry['test_user_submit_timestamp'].'</td>
- <td style="font-size:2;"> <strong><a
href="'.$RSDB_intern_link_item_comp.$comp['comp_id'].'&item2=tests">'.$comp['comp_name'].'</a></strong></td>
- <td
style="font-size:2;"> '.Star::drawSmall($entry['test_result_function'],
1, 5, '').'</td>
+ <td><a
href="'.$RSDB_intern_link_item_comp.$entry['comp_id'].'&item2=tests">'.$entry['comp_name'].'</a></td>
+ <td>TBI</td>
+ <td style="text-align:
center;">'.$entry['test_user_submit_timestamp'].'</td>
</tr>';
}
echo '
- </table>
- </div>';
+ </table>
+ </div>
+ <p>You can also <a
href="'.$RSDB_intern_link_db_sec.'submit">Submit new
Entries</a></p>';
// print some login blah to guest users
if ($RSDB_intern_user_id <= 0) {
echo '<p style="font-size:2;">Some of the features of the
ReactOS Compatibility Database require that you have a <a
href="'.$RSDB_intern_loginsystem_fullpath.'?page=register">myReactOS
account</a> and are <a
href="'.$RSDB_intern_loginsystem_fullpath.'?page=login">logged
in</a>.</p>';
}
-
- echo '
- <script type="text/JavaScript">
- <!--'."
- document.getElementById('StartList').style.display = 'block';
- document.getElementById('searchinput').focus();
- document.getElementById('searchinput').select();
- ".'-->
- </script>';
} // end of member function body
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/view/Item_Details.class.p…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/view/Item_Details.class.p…
[iso-8859-1] (original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/view/Item_Details.class.p…
[iso-8859-1] Sat Apr 18 00:51:44 2009
@@ -19,11 +19,14 @@
*/
-class Item_Tips extends HTML_Item
+class Item_Details extends HTML_Item
{
protected function body()
{
+ global $RSDB_intern_link_item;
+ global $RSDB_intern_link_vendor_sec;
+ global $RSDB_intern_user_id;
$stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp WHERE
comp_visible = '1' AND comp_id = :comp_id ORDER BY comp_name ASC");
@@ -194,7 +197,7 @@
</table>
<?php
- if (usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if (CUser::isModerator($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp
WHERE comp_visible = '1' AND comp_id = :comp_id LIMIT 1");
$stmt->bindParam('comp_id',@$_GET['item'],PDO::PARAM_STR);
$stmt->execute();
@@ -239,7 +242,7 @@
// Edit application group data:
- if ($RSDB_TEMP_pmod == "ok" && @$_GET['item'] != ""
&& $RSDB_TEMP_appn != "" && $RSDB_TEMP_apppr != ""
&& $RSDB_TEMP_appit != "" && $RSDB_TEMP_version != ""
&& usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_pmod == "ok" && @$_GET['item'] != ""
&& $RSDB_TEMP_appn != "" && $RSDB_TEMP_apppr != ""
&& $RSDB_TEMP_appit != "" && $RSDB_TEMP_version != ""
&& CUser::isModerator($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups
WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp =
'1' LIMIT 1");
$stmt->bindParam('group_id',$RSDB_TEMP_appn,PDO::PARAM_STR);
@@ -266,7 +269,7 @@
}
// Special request:
- if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtreq1 != ""
&& $RSDB_TEMP_txtreq2 != "" &&
usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtreq1 != ""
&& $RSDB_TEMP_txtreq2 != "" &&
CUser::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_agend, ';', '0')");
$stmt->bindParam('user_id',$RSDB_intern_user_id,PDO::PARAM_STR);
$stmt->bindParam('ip',$RSDB_ipaddr,PDO::PARAM_STR);
@@ -277,7 +280,7 @@
$stmt->execute();
}
// Report spam:
- if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtspam != ""
&& usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtspam != ""
&& CUser::isModerator($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_item_comp SET
comp_visible = '3' WHERE comp_id = :comp_id");
$stmt->bindParam('comp_id',@$_GET['item'],PDO::PARAM_STR);
$stmt->execute();
@@ -292,7 +295,7 @@
$temp_verified = "yes";
}
if ($result_maintainer_item['comp_checked'] == "1" ||
$result_maintainer_item['comp_checked'] == "no") {
- if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_verified ==
"done" && usrfunc_IsModerator($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_verified ==
"done" && CUser::isModerator($RSDB_intern_user_id)) {
echo "!";
$stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_item_comp SET
comp_checked = :checked WHERE comp_id = :comp_id ");
$stmt->bindParam('checked',$temp_verified,PDO::PARAM_STR);
@@ -529,7 +532,7 @@
<br />
<?php
- if (usrfunc_IsAdmin($RSDB_intern_user_id)) {
+ if (CUser::isAdmin($RSDB_intern_user_id)) {
$RSDB_TEMP_padmin = "";
$RSDB_TEMP_done = "";
@@ -539,13 +542,13 @@
if (array_key_exists("medal", $_POST))
$RSDB_TEMP_medal=htmlspecialchars($_POST["medal"]);
- if ($RSDB_TEMP_padmin == "ok" && $RSDB_TEMP_done != ""
&& usrfunc_IsAdmin($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_padmin == "ok" && $RSDB_TEMP_done != ""
&& CUser::isAdmin($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_logs SET
log_taskdone_usr = :user_id WHERE log_id = :log_id");
$stmt->bindParam('user_id',$RSDB_intern_user_id,PDO::PARAM_STR);
$stmt->bindParam('log_id',$RSDB_TEMP_done,PDO::PARAM_STR);
$stmt->execute();
}
- if ($RSDB_TEMP_padmin == "ok" && $RSDB_TEMP_medal != ""
&& isset($_GET['item']) && $_GET['item'] != ""
&& usrfunc_IsAdmin($RSDB_intern_user_id)) {
+ if ($RSDB_TEMP_padmin == "ok" && $RSDB_TEMP_medal != ""
&& isset($_GET['item']) && $_GET['item'] != ""
&& CUser::isAdmin($RSDB_intern_user_id)) {
$stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_item_comp SET
comp_award = :award WHERE comp_id = :comp_id");
$stmt->bindParam('award',$RSDB_TEMP_medal,PDO::PARAM_STR);
$stmt->bindParam('comp_id',$_GET['item'],PDO::PARAM_STR);
Modified:
branches/danny-web/www/www.reactos.org/compat/lib/view/Item_Tests.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/lib/view/Item_Tests.class.php
[iso-8859-1] (original)
+++
branches/danny-web/www/www.reactos.org/compat/lib/view/Item_Tests.class.php
[iso-8859-1] Sat Apr 18 00:51:44 2009
@@ -101,10 +101,10 @@
<tr>
<td width="80" rowspan="2" align="center"
valign="middle"><div align="left"><strong><?php
- if (usrfunc_IsAdmin($result_testreports['test_user_id'])) {
+ if (CUser::isAdmin($result_testreports['test_user_id'])) {
echo '<font size="3" face="Arial, Helvetica, sans-serif"
color="#5984C3"> Admin';
}
- else if (usrfunc_IsModerator($result_testreports['test_user_id'])) {
+ else if (CUser::isModerator($result_testreports['test_user_id'])) {
echo '<font size="2" face="Arial, Helvetica, sans-serif"
color="#5984C3"> Maintainer';
}
else {
Modified:
branches/danny-web/www/www.reactos.org/compat/notools/plugins.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
==============================================================================
---
branches/danny-web/www/www.reactos.org/compat/notools/plugins.php [iso-8859-1]
(original)
+++
branches/danny-web/www/www.reactos.org/compat/notools/plugins.php [iso-8859-1] Sat Apr
18 00:51:44 2009
@@ -37,7 +37,7 @@
// Exif reader v 1.2
// By Richard James Kendall
- require_once("inc/tools/plugins/exif.php");
+ require_once("notools/plugins/exif.php");
function read_exif($RSDB_TEMP_filename, $spacechar) {
global $exif_data;