Author: dgoette
Date: Thu Feb 12 15:11:12 2009
New Revision: 39574
URL:
http://svn.reactos.org/svn/reactos?rev=39574&view=rev
Log:
* DBConnection.class.php remove unneeded code, spotted by Colin
* introducing RosCMS Instances, it's basically a different configuration that you can
put into a different folder and use the same code base to maintain different sites
(example included)
Added:
branches/danny-web/reactos.org/htdocs/roscms/roscms_instance_example.php
Modified:
branches/danny-web/reactos.org/htdocs/roscms/config.php
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website-init.js
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js.php
branches/danny-web/reactos.org/htdocs/roscms/lib/DBConnection.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_User.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/RosCMS.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Admin_ACL.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Admin_Groups.class…
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Admin_System.class…
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Backend_SmartFilte…
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Backend_User.class…
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Backend_ViewEditor…
branches/danny-web/reactos.org/htdocs/roscms/lib/om/Login.class.php
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_CMS_Maintain.cla…
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_CMS_User.class.p…
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_CMS_Website.clas…
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Activate.cl…
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Login.class…
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_LostPasswor…
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Profile.cla…
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_ProfileEdit…
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Register.cl…
Modified:
branches/danny-web/reactos.org/htdocs/roscms/config.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/config.php [iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/config.php [iso-8859-1] Thu Feb 12
15:11:12 2009
@@ -44,34 +44,37 @@
$config->setSiteTimezone(-2); // time difference to utc time from server time
$config->setPathRoscms('/reactos/roscms/'); // path to roscms files
+$config->setPathInstance('/reactos/roscms/'); // path to roscms files
$config->setPathGenerationCache('../roscms_cache/'); // path to generated
files (relative to roscms folder)
$config->setPathGenerated('../'); // path to generated files (relative to
roscms folder)
// RosCMS Table Names
-define('ROSCMST_AREA' , 'roscms_area');
-define('ROSCMST_USERS' , 'roscms_accounts');
-define('ROSCMST_FORBIDDEN' , 'roscms_accounts_forbidden');
-define('ROSCMST_SESSIONS' , 'roscms_accounts_sessions');
-define('ROSCMST_COUNTRIES' , 'roscms_countries');
-define('ROSCMST_ENTRIES' , 'roscms_entries');
-define('ROSCMST_ACCESS' , 'roscms_entries_access');
-define('ROSCMST_RIGHTS' , 'roscms_entries_areas');
-define('ROSCMST_REVISIONS' , 'roscms_entries_revisions');
-define('ROSCMST_STEXT' , 'roscms_entries_stext');
-define('ROSCMST_TAGS' , 'roscms_entries_tags');
-define('ROSCMST_TEXT' , 'roscms_entries_text');
-define('ROSCMST_FILTER' , 'roscms_filter');
-define('ROSCMST_GROUPS' , 'roscms_groups');
-define('ROSCMST_JOBS' , 'roscms_jobs');
-define('ROSCMST_LANGUAGES' , 'roscms_languages');
-define('ROSCMST_SUBSYS' , 'roscms_rel_accounts_subsys');
-define('ROSCMST_MEMBERSHIPS', 'roscms_rel_groups_accounts');
-define('ROSCMST_AREA_ACCESS', 'roscms_rel_groups_area');
-define('ROSCMST_DEPENCIES' , 'roscms_rel_revisions_depencies');
-define('ROSCMST_ACL' , 'roscms_rel_acl');
-define('ROSCMST_TIMEZONES' , 'roscms_timezones');
+$config->setTable('ROSCMST_AREA' , 'roscms_area');
+$config->setTable('ROSCMST_USERS' , 'roscms_accounts');
+$config->setTable('ROSCMST_FORBIDDEN' ,
'roscms_accounts_forbidden');
+$config->setTable('ROSCMST_SESSIONS' , 'roscms_accounts_sessions');
+$config->setTable('ROSCMST_COUNTRIES' , 'roscms_countries');
+$config->setTable('ROSCMST_ENTRIES' , 'roscms_entries');
+$config->setTable('ROSCMST_ACCESS' , 'roscms_entries_access');
+$config->setTable('ROSCMST_RIGHTS' , 'roscms_entries_areas');
+$config->setTable('ROSCMST_REVISIONS' , 'roscms_entries_revisions');
+$config->setTable('ROSCMST_STEXT' , 'roscms_entries_stext');
+$config->setTable('ROSCMST_TAGS' , 'roscms_entries_tags');
+$config->setTable('ROSCMST_TEXT' , 'roscms_entries_text');
+$config->setTable('ROSCMST_FILTER' , 'roscms_filter');
+$config->setTable('ROSCMST_GROUPS' , 'roscms_groups');
+$config->setTable('ROSCMST_JOBS' , 'roscms_jobs');
+$config->setTable('ROSCMST_LANGUAGES' , 'roscms_languages');
+$config->setTable('ROSCMST_SUBSYS' ,
'roscms_rel_accounts_subsys');
+$config->setTable('ROSCMST_MEMBERSHIPS',
'roscms_rel_groups_accounts');
+$config->setTable('ROSCMST_AREA_ACCESS', 'roscms_rel_groups_area');
+$config->setTable('ROSCMST_DEPENCIES' ,
'roscms_rel_revisions_depencies');
+$config->setTable('ROSCMST_ACL' , 'roscms_rel_acl');
+$config->setTable('ROSCMST_TIMEZONES' , 'roscms_timezones');
+// do not change, it's needed to apply those config settings
+$config->apply();
?>
Modified:
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website-init.js
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website-init.js [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website-init.js [iso-8859-1] Thu
Feb 12 15:11:12 2009
@@ -37,11 +37,11 @@
}
// load user filter
-document.getElementById('labtitel2c').innerHTML = '<div
align="right"><img src="images/ajax_loading.gif"
alt="loading ..." style="width:13px; height:13px;"
/></div>';
+document.getElementById('labtitel2c').innerHTML = '<div
align="right"><img
src="'+roscms_intern_webserver_roscms+'images/ajax_loading.gif"
alt="loading ..." style="width:13px; height:13px;"
/></div>';
makeRequest('?page=backend&type=text&subtype=ufs&d_val=load',
'ufs', 'labtitel2c', 'html', 'GET', '');
// load user labels
-document.getElementById('labtitel3c').innerHTML = '<div
align="right"><img src="images/ajax_loading.gif"
alt="loading ..." style="width:13px; height:13px;"
/></div>';
+document.getElementById('labtitel3c').innerHTML = '<div
align="right"><img
src="'+roscms_intern_webserver_roscms+'images/ajax_loading.gif"
alt="loading ..." style="width:13px; height:13px;"
/></div>';
makeRequest('?page=backend&type=text&subtype=ut', 'ut',
'labtitel3c', 'html', 'GET', '');
if (readCookie('labtitel1') == 0) TabOpenCloseEx('labtitel1');
Modified:
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js [iso-8859-1] Thu Feb 12
15:11:12 2009
@@ -837,7 +837,7 @@
autosave_timer = window.setTimeout("tryAutosave()",
autosave_coundown);
// loading screen:
- document.getElementById('editzone').innerHTML = '<div
style="background:white; border-bottom: 1px solid #bbb; border-right: 1px solid
#bbb;margin:10px;padding: 2em 0px;width:95%;text-align: center;"><img
src="images/ajax_loading.gif" alt="loading ..."
style="width:13px;height:13px;" /> loading
...</div>';
+ document.getElementById('editzone').innerHTML = '<div
style="background:white; border-bottom: 1px solid #bbb; border-right: 1px solid
#bbb;margin:10px;padding: 2em 0px;width:95%;text-align: center;"><img
src="'+roscms_intern_webserver_roscms+'images/ajax_loading.gif"
alt="loading ..." style="width:13px;height:13px;"
/> loading ...</div>';
makeRequest('?page=backend&type=text&subtype=mef&d_fl='+objevent+'&d_id='+devideids2+'&d_r_id='+devideids3+'&d_r_lang='+userlang,
'mef', 'editzone', 'html', 'GET', '');
}
@@ -1742,7 +1742,7 @@
}; // internal function end
if (kind === 'POST') {
- http_request.open('POST', url, true);
+ http_request.open('POST', roscms_intern_webserver_roscms+url, true);
http_request.setRequestHeader("Content-type",
"application/x-www-form-urlencoded");
http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000
00:00:00 GMT"); // Bypass the IE Cache
@@ -1750,7 +1750,7 @@
http_request.send(parameters);
}
else {
- http_request.open('GET', url, true);
+ http_request.open('GET', roscms_intern_webserver_roscms+url, true);
http_request.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000
00:00:00 GMT"); // Bypass the IE Cache
http_request.send(null);
}
@@ -1840,7 +1840,7 @@
// not found -> readonly
if (security.indexOf("write") < 0 ) {
- lstBody += '<img src="images/locked.gif" alt="read-only"
style="width:11px; height:12px; border:0px;" /> ';
+ lstBody += '<img
src="'+roscms_intern_webserver_roscms+'images/locked.gif"
alt="read-only" style="width:11px; height:12px; border:0px;" />
';
}
try {
@@ -2772,7 +2772,7 @@
}
lstfilterstr += htmlFilterValues(lstfilterstr2[0], lstfilterstr2[3], indexid)
- + ' <span
id="fdel'+indexid+'" class="filterbutton"
onclick="removeFilter(this.id)"><img src="images/remove.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Delete</span>'
+ + ' <span
id="fdel'+indexid+'" class="filterbutton"
onclick="removeFilter(this.id)"><img
src="'+roscms_intern_webserver_roscms+'images/remove.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Delete</span>'
+ '</div>';
if (lstfilterstr2[3] == 0) {
Modified:
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/roscms/js/cms_website.js.php [iso-8859-1] Thu
Feb 12 15:11:12 2009
@@ -20,7 +20,10 @@
define('ROSCMS_PATH', '../');
require('../lib/RosCMS_Autoloader.class.php');
-Login::required();
+
+// config data
+require_once(ROSCMS_PATH.'config.php');
+RosCMS::getInstance()->apply();
// get user language
$thisuser = ThisUser::getInstance();
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/DBConnection.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/DBConnection.class.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/DBConnection.class.php [iso-8859-1]
Thu Feb 12 15:11:12 2009
@@ -37,18 +37,18 @@
*/
public function __construct()
{
- global $db_host, $db_host, $db_user, $db_pass, $db_port;
- include_once(ROSCMS_PATH.'connect.db.php');
+ // load database authentification config
+ require_once(ROSCMS_PATH.'connect.db.php');
try {
parent::__construct('mysql:dbname='.$db_name.';host='.$db_host.';port='.$db_port,
$db_user, $db_pass);
// unset loaded db config
- unset($GLOBALS['db_name']);
- unset($GLOBALS['db_host']);
- unset($GLOBALS['db_user']);
- unset($GLOBALS['db_pass']);
- unset($GLOBALS['db_port']);
+ unset($db_name);
+ unset($db_host);
+ unset($db_user);
+ unset($db_pass);
+ unset($db_port);
// show errors as warning, and use our own statement class
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML.class.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML.class.php [iso-8859-1] Thu Feb
12 15:11:12 2009
@@ -80,16 +80,18 @@
*/
protected function header( )
{
+ $config = &RosCMS::getInstance();
+
// this page was generated in ...
$roscms_gentime = explode(' ',microtime());
- $this->page_start = $roscms_gentime[1] + $roscms_gentime[0];
+ $this->page_start = $roscms_gentime[1] + $roscms_gentime[0];
// output header
echo_strip( '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en">
<head>
- <title>ReactOS '.(($this->title!=='') ? '-
'.$this->title : '').'</title>
+ <title>'.$config->systemBrand().'
'.(($this->title!=='') ? '- '.$this->title :
'').'</title>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<meta http-equiv="Pragma" content="no-cache" />
<meta name="Copyright" content="ReactOS Foundation" />
@@ -103,16 +105,16 @@
// link css files (use register_css method)
foreach($this->css_files as $file) {
if ($file['condition'] === false) {
- echo '<link
href="'.RosCMS::getInstance()->pathRosCMS().'css/'.$file['name'].'"
type="text/css" rel="stylesheet" />';
+ echo '<link
href="'.$config->pathRosCMS().'css/'.$file['name'].'"
type="text/css" rel="stylesheet" />';
}
else {
- echo '<!--[if '.$file['condition'].']<link
href="'.RosCMS::getInstance()->pathRosCMS().'css/'.$file['name'].'"
type="text/css" rel="stylesheet" /><![endif]-->';
+ echo '<!--[if '.$file['condition'].']<link
href="'.$config->pathRosCMS().'css/'.$file['name'].'"
type="text/css" rel="stylesheet" /><![endif]-->';
}
}
// link js files (use register_js method)
foreach($this->js_files as $file) {
- echo '<script
src="'.RosCMS::getInstance()->pathRosCMS().'js/'.$file.'"
type="text/javascript"></script>';
+ echo '<script
src="'.$config->pathRosCMS().'js/'.$file.'"
type="text/javascript"></script>';
}
//@TODO remove those static links from here
@@ -121,11 +123,11 @@
<body>
<div id="top">
<div id="topMenu">
- <a
href="'.RosCMS::getInstance()->pathGenerated().'?page=index">Home</a>
<span>|</span>
- <a
href="'.RosCMS::getInstance()->pathGenerated().'?page=about">Info</a>
<span>|</span>
- <a
href="'.RosCMS::getInstance()->pathGenerated().'?page=community">Community</a>
<span>|</span>
- <a
href="'.RosCMS::getInstance()->pathGenerated().'?page=dev">Developement</a>
<span>|</span>
- <a
href="'.RosCMS::getInstance()->pathRosCMS().'?page=user">myRosCMS</a>
+ <a
href="'.$config->pathGenerated().'?page=index">Home</a>
<span>|</span>
+ <a
href="'.$config->pathGenerated().'?page=about">Info</a>
<span>|</span>
+ <a
href="'.$config->pathGenerated().'?page=community">Community</a>
<span>|</span>
+ <a
href="'.$config->pathGenerated().'?page=dev">Developement</a>
<span>|</span>
+ <a
href="'.$config->pathInstance().'?page=user">myRosCMS</a>
</div>
</div>');
} // end of member function header
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS.class.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS.class.php [iso-8859-1] Thu
Feb 12 15:11:12 2009
@@ -95,11 +95,11 @@
<strong>'.$thisuser->name().'</strong> ('. $group_list
.')
|
<span onclick="refreshPage()" style="color:#006090;
cursor:pointer;">
- <img src="images/reload.gif" alt="reload page"
width="16" height="16" />
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/reload.gif"
alt="reload page" width="16" height="16" />
<span style="text-decoration:underline;">reload</span>
</span>
|
- <a
href="'.RosCMS::getInstance()->pathRosCMS().'?page=logout">Sign
out</a>
+ <a
href="'.RosCMS::getInstance()->pathInstance().'?page=logout">Sign
out</a>
</div>
<div id="roscms_page">
<table id="mt" cellpadding="0"
cellspacing="0">
@@ -182,7 +182,7 @@
echo_strip('
<td style="width:100%">
<div id="ajaxloadinginfo" style="visibility:hidden;
text-align: center;">
- <img src="images/ajax_loading.gif" alt="loading
..." width="13" height="13" />
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/ajax_loading.gif"
alt="loading ..." width="13" height="13" />
</div>
</td>
</tr>
@@ -199,7 +199,7 @@
break;
case 'website':
- echo_strip('Quick Links: <a
href="'.RosCMS::getInstance()->pathRosCMS().'?page=data&branch=welcome#web_news_langgroup">Translation
Group News</a>
+ echo_strip('Quick Links: <a
href="'.RosCMS::getInstance()->pathInstance().'?page=data&branch=welcome#web_news_langgroup">Translation
Group News</a>
| <a
href="'.RosCMS::getInstance()->pathGenerated().'?page=tutorial_roscms">Text-
& Video-Tutorials</a>
| <a
href="'.RosCMS::getInstance()->pathGenerated().'/forum/viewforum.php?f=18">Website
Forum</a>');
break;
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_User.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_User.class.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_User.class.php [iso-8859-1] Thu
Feb 12 15:11:12 2009
@@ -81,7 +81,7 @@
<li><a
href="'.$config->pathGenerated().'en/about.html">Info</a></li>
<li><a
href="'.$config->pathGenerated().'en/community.html">Community</a></li>
<li><a
href="'.$config->pathGenerated().'en/dev.html">Development</a></li>
- <li><a
href="'.$config->pathRosCMS().'?page=user">myReactOS</a></li>
+ <li><a
href="'.$config->pathInstance().'?page=user">myReactOS</a></li>
</ul>');
// Menu for logged in user
@@ -90,11 +90,11 @@
<h2>Account</h2>
<ul>
<li
title="'.$thisuser->name().'"> Nick: '.substr($thisuser->name(),
0, 9).'</li>
- <li><a
href="'.$config->pathRosCMS().'?page=my">My
Profile</a></li>
- <li><a
href="'.$config->pathRosCMS().'?page=search">User
Search</a></li>
+ <li><a
href="'.$config->pathInstance().'?page=my">My
Profile</a></li>
+ <li><a
href="'.$config->pathInstance().'?page=search">User
Search</a></li>
<li><a
href="'.$config->pathGenerated().'peoplemap/">User
Map</a></li>');
if ($thisuser->hasAccess('CMS')) {
- echo '<li><a
href="'.$config->pathRosCMS().'?page=data&branch=welcome">RosCMS
Interface</a></li>';
+ echo '<li><a
href="'.$config->pathInstance().'?page=data&branch=welcome">RosCMS
Interface</a></li>';
}
echo_strip('
<li><a href="?page=logout">Logout</a></li>
@@ -106,8 +106,8 @@
echo_strip('
<h2>Account</h2>
<ul>
- <li><a
href="'.$config->pathRosCMS().'?page=login">Login</a></li>
- <li><a
href="'.$config->pathRosCMS().'?page=register">Register</a></li>
+ <li><a
href="'.$config->pathInstance().'?page=login">Login</a></li>
+ <li><a
href="'.$config->pathInstance().'?page=register">Register</a></li>
</ul>');
}
@@ -128,7 +128,7 @@
<ul>
<li>
<div style="text-align:center;">
- <select id="select" size="1" name="select"
class="selectbox" style="width:140px"
onchange="'."window.location.href =
'".$config->pathRosCMS().'?'.htmlentities($_SERVER['QUERY_STRING'])."&lang='
+ this.options[this.selectedIndex].value".'">
+ <select id="select" size="1" name="select"
class="selectbox" style="width:140px"
onchange="'."window.location.href =
'".$config->pathInstance().'?'.htmlentities($_SERVER['QUERY_STRING'])."&lang='
+ this.options[this.selectedIndex].value".'">
<optgroup label="current language">');
// print current language
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/RosCMS.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/RosCMS.class.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/RosCMS.class.php [iso-8859-1] Thu Feb
12 15:11:12 2009
@@ -17,10 +17,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
-
-global $roscms_subsystem_wiki_path;
-$roscms_subsystem_wiki_path = '/reactos/wiki/index.php/'; // base adress for wiki
pages
/**
* class RosCMS
@@ -31,22 +27,23 @@
{
// DO NOT MODIFY ANYTHING HERE (except you know what you're doing)
- private $email_support = 'support at reactos.org'; // email to which users can
send mails, if they got a problem
- private $email_system = 'ReactOS<noreply(a)reactos.org>'s.org>'; // mails which
are send from the system and don't require a reply
+ private $email_support = null; // email to which users can send mails, if they got a
problem
+ private $email_system = null; // mails which are send from the system and don't
require a reply
- private $cookie_user_key = 'roscmsusrkey'; // session key
- private $cookie_user_name = 'roscmsusrname'; // user_name
- private $cookie_password = 'rospassword'; // user_password (used for keep
login function)
- private $cookie_login_name = 'roscmslogon'; // where username is stored for
'save username' in login options
- private $cookie_security = 'roscmsseckey'; // stores security settings
-
- private $site_name = 'ReactOS.org'; // sites name
- private $site_language = 'en'; // standard language
- private $site_timezone = -2; // time difference to utc time from server time
-
- private $path_generated = '../reactos/'; // path to generated files
- private $path_generation_cache = '../reactos/roscms_cache'; // path to cache
files while generation process
- private $path_roscms = '/reactos/roscms/'; // path to roscms files
+ private $cookie_user_key = null; // session key
+ private $cookie_user_name = null; // user_name
+ private $cookie_password = null; // user_password (used for keep login function)
+ private $cookie_login_name = null; // where username is stored for 'save
username' in login options
+ private $cookie_security = null; // stores security settings
+
+ private $site_name = null; // sites name
+ private $site_language = null; // standard language
+ private $site_timezone = null; // time difference to utc time from server time
+
+ private $path_generated = null; // path to generated files
+ private $path_generation_cache = null; // path to cache files while generation process
+ private $path_roscms = null; // path to roscms files
+ private $path_instance = null; // path to current roscms instance
// system vars
private $limit_username_min = 4;
@@ -58,12 +55,17 @@
private $system_version = '4.0.0 alpha';
+ private $applied = false;
+ private $config = array();
+
+
/**
* returns an static instance
*
* @access public
*/
- public static function getInstance() {
+ public static function getInstance()
+ {
static $instance;
if (empty($instance)) {
@@ -73,17 +75,48 @@
} // end of member function getInstance
+
+ /**
+ * apply temporary config data, if not already set
+ *
+ * @access public
+ */
+ public function apply()
+ {
+
+ foreach ($this->config as $key => $val) {
+ if ($this->$key === null) $this->$key = $val;
+ }
+ $this->applied=true;
+ } // end of member function apply
+
+
+
+ /**
+ * registers a new table name, if not already registered
+ *
+ * @access public
+ */
+ public function setTable($table, $name)
+ {
+ if (!defined($table)) {
+ define($table, $name);
+ }
+ } // end of member function setTable
+
+
+
/**
* getter functions
*/
- public function emailSupport() { return $this->email_support; }
- public function emailSystem() { return $this-email_system; }
- public function cookieUserKey() { return $this->cookie_user_key; }
-
- public function cookieUserName() { return $this->cookie_user_name; }
- public function cookiePassword() { return $this->cookie_password; }
- public function cookieLoginName() { return $this->cookie_login_name; }
- public function cookieSecure() { return $this->cookie_security; }
+ public function emailSupport() { if ($this->applied) return $this->email_support;
}
+ public function emailSystem() { if ($this->applied) return $this-email_system; }
+ public function cookieUserKey() { if ($this->applied) return
$this->cookie_user_key; }
+
+ public function cookieUserName() { if ($this->applied) return
$this->cookie_user_name; }
+ public function cookiePassword() { if ($this->applied) return
$this->cookie_password; }
+ public function cookieLoginName() { if ($this->applied) return
$this->cookie_login_name; }
+ public function cookieSecure() { if ($this->applied) return
$this->cookie_security; }
public function limitUserNameMin() { return $this->limit_username_min; }
public function limitUserNameMax() { return $this->limit_username_max; }
@@ -93,13 +126,14 @@
public function systemBrand( ) { return $this->system_brand; }
public function systemVersion() { return $this->system_version; }
- public function siteName() { return $this->site_name; }
- public function siteLanguage() { return $this->site_language; }
- public function siteTimezone(){ return $this->site_timezone; }
-
- public function pathGenerated() { return $this->path_generated; }
- public function pathGenerationCache() { return $this->path_generation_cache; }
- public function pathRosCMS() { return $this->path_roscms; }
+ public function siteName() { if ($this->applied) return $this->site_name; }
+ public function siteLanguage() { if ($this->applied) return $this->site_language;
}
+ public function siteTimezone(){ if ($this->applied) return $this->site_timezone;
}
+
+ public function pathGenerated() { if ($this->applied) return
$this->path_generated; }
+ public function pathGenerationCache() { if ($this->applied) return
$this->path_generation_cache; }
+ public function pathRosCMS() { if ($this->applied) return $this->path_roscms; }
+ public function pathInstance() { if ($this->applied) return $this->path_instance;
}
@@ -107,61 +141,66 @@
* setter functions
*/
public function setEmailSupport( $new_value ){
- $this->email_support = $new_value;
+ $this->config['email_support'] = $new_value;
}
public function setEmailSystem( $new_value ) {
- $this->email_system = $new_value;
+ $this->config['email_system'] = $new_value;
}
public function setCookieUserKey( $new_value ) {
- if (preg_match('/[A-Za-z0-9_]+/', $new_value)) $this->cookie_user_key =
$new_value;
+ if (preg_match('/[A-Za-z0-9_]+/', $new_value))
$this->config['cookie_user_key'] = $new_value;
else die('bad user key cookie name');
}
public function setCookieUserName( $new_value ) {
- if (preg_match('/[A-Za-z0-9_]+/', $new_value)) $this->cookie_user_name =
$new_value;
+ if (preg_match('/[A-Za-z0-9_]+/', $new_value))
$this->config['cookie_user_name'] = $new_value;
else die('bad user name cookie name');
}
public function setCookiePassword( $new_value ) {
- if (preg_match('/[A-Za-z0-9_]+/', $new_value)) $this->cookie_password =
$new_value;
+ if (preg_match('/[A-Za-z0-9_]+/', $new_value))
$this->config['cookie_password'] = $new_value;
else die('bad password cookie name');
}
public function setCookieLoginName( $new_value ) {
- if (preg_match('/[A-Za-z0-9_]+/', $new_value)) $this->cookie_login_name =
$new_value;
+ if (preg_match('/[A-Za-z0-9_]+/', $new_value))
$this->config['cookie_login_name'] = $new_value;
else die('bad login name cookie name');
}
public function setCookieSecure( $new_value ) {
- if (preg_match('/[A-Za-z0-9_]+/', $new_value)) $this->cookie_security =
$new_value;
+ if (preg_match('/[A-Za-z0-9_]+/', $new_value))
$this->config['cookie_security'] = $new_value;
else die('bad security login cookie name');
}
public function setSiteName( $new_value ) {
- $this->site_name = $new_value;
+ $this->config['site_name'] = $new_value;
}
public function setSiteLanguage( $new_value ) {
- $this->site_language = $new_value;
+ $this->config['site_language'] = $new_value;
}
public function setSiteTimezone( $new_value ) {
- $this->site_timezone = intval($new_value);
+ $this->config['site_timezone'] = intval($new_value);
}
public function setPathGenerated( $new_value ) {
- $this->path_generated = $new_value;
+ $this->config['path_generated'] = $new_value;
}
public function setPathGenerationCache( $new_value ) {
- $this->path_generation_cache = $new_value;
+ $this->config['path_generation_cache'] = $new_value;
}
public function setPathRosCMS( $new_value ) {
- $this->path_roscms = $new_value;
- }
+ $this->config['path_roscms'] = $new_value;
+ }
+
+ public function setPathInstance( $new_value ) {
+ $this->config['path_instance'] = $new_value;
+ }
+
} // end of RosCMS
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Admin_ACL.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Admin_ACL.class.php
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Admin_ACL.class.php
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -67,7 +67,7 @@
// access rights in head
foreach ($rights as $right) {
- echo '<th style="vertical-align:bottom;"
title="'.$right['name'].':
'.$right['description'].'"><img
src="?page=presentation&type=vtext&text='.$right['name'].'"
alt="'.$right['name'].'" /></th>';
+ echo '<th style="vertical-align:bottom;"
title="'.$right['name'].':
'.$right['description'].'"><img
src="'.RosCMS::getInstance()->pathInstance().'?page=presentation&type=vtext&text='.$right['name'].'"
alt="'.$right['name'].'" /></th>';
}
echo '</tr>';
@@ -253,7 +253,7 @@
// list rights in table head
foreach ($rights as $right) {
- echo '<th style="vertical-align:bottom;"
title="'.$right['name'].':
'.$right['description'].'"><img
src="?page=presentation&type=vtext&text='.$right['name'].'"
alt="'.$right['name'].'" /></th>';
+ echo '<th style="vertical-align:bottom;"
title="'.$right['name'].':
'.$right['description'].'"><img
src="'.RosCMS::getInstance()->pathInstance().'?page=presentation&type=vtext&text='.$right['name'].'"
alt="'.$right['name'].'" /></th>';
}
echo '</tr>';
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Admin_Groups.class…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Admin_Groups.class…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Admin_Groups.class…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -74,7 +74,7 @@
// list rights in header
foreach ($rights as $right) {
- echo '<th style="vertical-align:bottom;"
title="'.$right['name'].':
'.$right['description'].'"><img
src="?page=presentation&type=vtext&text='.$right['name'].'"
alt="'.$right['name'].'" /></th>';
+ echo '<th style="vertical-align:bottom;"
title="'.$right['name'].':
'.$right['description'].'"><img
src="'.RosCMS::getInstance()->pathInstance().'?page=presentation&type=vtext&text='.$right['name'].'"
alt="'.$right['name'].'" /></th>';
}
echo '</tr>';
@@ -300,7 +300,7 @@
<tr>
<th>ACL Name</th>');
foreach ($rights as $right) {
- echo '<th style="vertical-align:bottom;"
title="'.$right['name'].':
'.$right['description'].'"><img
src="?page=presentation&type=vtext&text='.$right['name'].'"
alt="'.$right['name'].'" /></th>';
+ echo '<th style="vertical-align:bottom;"
title="'.$right['name'].':
'.$right['description'].'"><img
src="'.RosCMS::getInstance()->pathInstance().'?page=presentation&type=vtext&text='.$right['name'].'"
alt="'.$right['name'].'" /></th>';
}
echo '</tr>';
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Admin_System.class…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Admin_System.class…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Admin_System.class…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -93,7 +93,7 @@
// show areas in head
foreach ($areas as $area) {
- echo '<th style="vertical-align:bottom;"
title="'.$area['name'].':
'.$area['description'].'"><img
src="?page=presentation&type=vtext&text='.$area['name'].'"
alt="'.$area['name'].'" /></th>';
+ echo '<th style="vertical-align:bottom;"
title="'.$area['name'].':
'.$area['description'].'"><img
src="'.RosCMS::getInstance()->pathInstance().'?page=presentation&type=vtext&text='.$area['name'].'"
alt="'.$area['name'].'" /></th>';
}
echo '</tr>';
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Backend_SmartFilte…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Backend_SmartFilte…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Backend_SmartFilte…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -121,7 +121,7 @@
echo_strip('
<span style="cursor:pointer; text-decoration:underline;"
onclick="'."selectUserFilter('".$filter['setting']."',
'".$filter['name']."')".'">'.$filter['name'].'</span>
<span style="cursor:pointer;"
onclick="'."deleteUserFilter('".$filter['id']."',
'".$filter['name']."')".'">
- <img src="images/remove.gif" alt="-"
style="width:11px; height:11px; border:0px;" />
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/remove.gif"
alt="-" style="width:11px; height:11px; border:0px;" />
</span>
<br />');
}
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Backend_User.class…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Backend_User.class…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Backend_User.class…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -280,7 +280,7 @@
echo_strip('
<span class="frmeditbutton"
onclick="'."delMembership(".$_GET['user'].",
'".$membership['group_id']."')".'">
- <img src="images/remove.gif" alt=""
style="width:11px; height:11px; border:0px;" />
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/remove.gif"
alt="" style="width:11px; height:11px; border:0px;" />
Delete
</span>');
}
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Backend_ViewEditor…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Backend_ViewEditor…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/backend/Backend_ViewEditor…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -304,7 +304,7 @@
else {
echo_strip('
<button type="button" id="bsavedraft"
disabled="disabled">Save as Draft</button>
- <img src="images/locked.gif" width="11"
height="12" /> (not enough rights)
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/locked.gif"
width="11" height="12" /> (not enough rights)
<input name="editautosavemode" type="hidden"
value="false" />');
}
@@ -325,7 +325,7 @@
echo_strip('
<span id="bshowdiff" class="frmeditbutton"
onclick="'."openOrCloseDiffArea(".$this->rev_id.",".$this->rev_id.")".'">
- <img id="bshowdiffi" src="images/tab_closed.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Compare</span> (no related '.$lang.' entry, choose
yourself) ');
+ <img id="bshowdiffi"
src="'.RosCMS::getInstance()->pathRosCMS().'images/tab_closed.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Compare</span> (no related '.$lang.' entry, choose
yourself) ');
}
// Compare button
@@ -357,7 +357,7 @@
echo_strip('
<span id="bshowdiff" class="frmeditbutton"
onclick="'."openOrCloseDiffArea('".$diff1."','".$diff2."')".'">
- <img id="bshowdiffi" src="images/tab_closed.gif"
alt="" style="width:11px; height:11px; border:0px;" />
+ <img id="bshowdiffi"
src="'.RosCMS::getInstance()->pathRosCMS().'images/tab_closed.gif"
alt="" style="width:11px; height:11px; border:0px;" />
Compare
</span>');
}
@@ -392,7 +392,7 @@
<div style="padding-bottom: 3px;">
<span class="revDetail">
<span
onclick="'."toggleBookmark(".$revision['id'].",
".$thisuser->id().", 'editstar')".'"
style="cursor: pointer;">
- <img id="editstar"
class="'.Tag::getId($revision['id'], 'star',
$thisuser->id()).'"
src="images/star_'.Tag::getValue($revision['id'], 'star',
$thisuser->id()).'_small.gif" alt="" style="width:13px;
height:13px; border:0px;" alt="*" />
+ <img id="editstar"
class="'.Tag::getId($revision['id'], 'star',
$thisuser->id()).'"
src="'.RosCMS::getInstance()->pathRosCMS().'images/star_'.Tag::getValue($revision['id'],
'star', $thisuser->id()).'_small.gif" alt=""
style="width:13px; height:13px; border:0px;" alt="*" />
</span>
'.$revision['name'].'</span>
@@ -411,7 +411,7 @@
echo_strip('
<span id="frmedittags" class="frmeditbutton"
onclick="TabOpenClose(this.id)" style="white-space: nowrap;">
- <img id="frmedittagsi" src="images/tab_closed.gif"
alt="" style="width:11px; height:11px; border:0px;" />
+ <img id="frmedittagsi"
src="'.RosCMS::getInstance()->pathRosCMS().'images/tab_closed.gif"
alt="" style="width:11px; height:11px; border:0px;" />
Details
</span>
</div>
@@ -578,7 +578,7 @@
if (($thisuser->hasAccess('system_tags') &&
$tag['user_id'] == -1) || $tag['user_id'] == $thisuser->id()) {
echo_strip('
<span class="frmeditbutton"
onclick="'."delLabelOrTag('".$tag['id']."')".'">
- <img src="images/remove.gif" alt=""
style="width:11px; height:11px; border:0px;" />
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/remove.gif"
alt="" style="width:11px; height:11px; border:0px;" />
Delete
</span>');
}
@@ -703,7 +703,7 @@
// delete manual depency
if (ThisUser::getInstance()->hasAccess('add_depencies') &&
$required['user_defined']) {
- echo ' <span class="deletebutton"
onclick="'."deleteDepency(".$required['id'].")".'"><img
src="images/remove.gif" alt="" /> Delete</span>';
+ echo ' <span class="deletebutton"
onclick="'."deleteDepency(".$required['id'].")".'"><img
src="'.RosCMS::getInstance()->pathRosCMS().'images/remove.gif"
alt="" /> Delete</span>';
}
echo '</li>';
@@ -720,7 +720,7 @@
// delete manual depency
if (ThisUser::getInstance()->hasAccess('add_depencies') &&
$required['user_defined']) {
- echo ' <span class="deletebutton"
onclick="'."deleteDepency(".$required['id'].")".'"><img
src="images/remove.gif" alt="" /> Delete</span>';
+ echo ' <span class="deletebutton"
onclick="'."deleteDepency(".$required['id'].")".'"><img
src="'.RosCMS::getInstance()->pathRosCMS().'images/remove.gif"
alt="" /> Delete</span>';
}
echo '</li>';
@@ -790,7 +790,7 @@
<div>'.$data['id'].'</div><br />
<label for="secdataname">Name</label><br />
<input type="text" name="secdataname"
id="secdataname" size="25" maxlength="100"
value="'.$data['name'].'" /> (ASCII lowercase, no space)
- <img src="images/attention.gif" width="22"
height="22" /><br />
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/attention.gif"
width="22" height="22" /><br />
<small>all links to this entry will be updated</small><br />
<br />
<label for="cbmdatatype">Type</label><br />
@@ -813,7 +813,7 @@
}
echo_strip('
</select>
- <img src="images/attention.gif" width="22"
height="22" /><br />
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/attention.gif"
width="22" height="22" /><br />
<br />
<br />
<button type="button" id="beditsavefields"
onclick="'."saveSecurityData('".$this->data_id."','".$this->rev_id."')".'">Save
Changes</button>
@@ -852,7 +852,7 @@
<div id="editaddstext"></div>
<span id="editaddstextcount" style="display:
none;">'.$stext_num.'</span>
<span class="filterbutton"
onclick="addShortTextField()">
- <img src="images/add.gif" alt="" style="width:11px;
height:11px; border:0px;" /> Add
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/add.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Add
</span>
<br /><br />
<h3>Text</h3>');
@@ -878,7 +878,7 @@
<div id="editaddtext"></div>
<span id="editaddtextcount" style="display:
none;">'.$text_num.'</span>
<span class="filterbutton" onclick="addTextField()">
- <img src="images/add.gif" alt="" style="width:11px;
height:11px; border:0px;" /> Add
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/add.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Add
</span>
<br /><br /><br />
<button type="button" id="beditsavefields"
onclick="'."saveFieldData('".$this->data_id."','".$this->rev_id."')".'">Save
Changes</button>
@@ -919,15 +919,15 @@
<br />
<label for="verusr">User</label>
<input type="text" name="verusr" id="verusr"
size="20" maxlength="20"
value="'.$revision['user_name'].'" /> (account name)
- <img src="images/attention.gif" width="22"
height="22" /><br />
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/attention.gif"
width="22" height="22" /><br />
<br />
<label for="verdate">Date</label>
<input type="text" name="verdate" id="verdate"
size="10" maxlength="10"
value="'.$revision['date'].'" /> (year-month-day)
- <img src="images/attention.gif" width="22"
height="22" /><br />
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/attention.gif"
width="22" height="22" /><br />
<br />
<label for="vertime">Time</label>
<input type="text" name="vertime" id="vertime"
size="8" maxlength="8"
value="'.$revision['time'].'" /> (hour:minute:second)
- <img src="images/attention.gif" width="22"
height="22" /><br />
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/attention.gif"
width="22" height="22" /><br />
<br />
<br />
<button type="button" id="beditsaveentry"
onclick="saveRevisionData('.$this->data_id.','.$this->rev_id.')">Save
Changes</button>
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/om/Login.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/om/Login.class.php [iso-8859-1]
(original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/om/Login.class.php [iso-8859-1] Thu
Feb 12 15:11:12 2009
@@ -110,7 +110,7 @@
if (0 == $user_id && $login_type == self::REQUIRED) {
// build login url
- $url = $config->pathRosCMS().'?page=login';
+ $url = $config->pathInstance().'?page=login';
if ($target != '') {
$url .= '&target='.urlencode($target);
}
@@ -159,7 +159,7 @@
}
// otherwise redirect to myRosCMS page
- header('Location: '.$config->pathRosCMS().'?page=my');
+ header('Location: '.$config->pathInstance().'?page=my');
exit;
} // end of member function out
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_CMS_Maintain.cla…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_CMS_Maintain.cla…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_CMS_Maintain.cla…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -87,7 +87,7 @@
<p><a href="javascript:generateAllPages()">Generate All
Pages</a></p>
<div id="maintainarea" style="border: 1px dashed
red;display:none;"></div>
- <img id="ajaxloading" style="display:none;"
src="images/ajax_loading.gif" width="13" height="13"
alt="" />
+ <img id="ajaxloading" style="display:none;"
src="'.RosCMS::getInstance()->pathRosCMS().'images/ajax_loading.gif"
width="13" height="13" alt="" />
<br />');
if (ThisUser::getInstance()->hasAccess('logs')) {
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_CMS_User.class.p…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_CMS_User.class.p…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_CMS_User.class.p…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -68,7 +68,7 @@
<input name="searchopt" type="radio"
id="searchopt3" value="email" onclick="getUser()"
/><label for="searchopt3">email address</label>
<input name="searchopt" type="radio"
id="searchopt4" value="website" onclick="getUser()"
/><label
for="searchopt4">website</label>'.($thisuser->hasAccess('more_lang')
? '
<input name="searchopt" type="radio"
id="searchopt5" value="language" onclick="getUser()"
/><label for="searchopt5">language</label>' :
'').'
- <img id="ajaxloading" style="display:none;"
src="images/ajax_loading.gif" width="13" height="13"
alt="" /><br />
+ <img id="ajaxloading" style="display:none;"
src="'.RosCMS::getInstance()->pathRosCMS().'images/ajax_loading.gif"
width="13" height="13" alt="" /><br />
</fieldset>
<br />
<div id="userarea"></div>
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_CMS_Website.clas…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_CMS_Website.clas…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_CMS_Website.clas…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -101,7 +101,7 @@
var roscms_standard_language =
'".Language::getStandardId()."';
var roscms_intern_login_check_username =
'".$thisuser->name()."';
var roscms_intern_webserver_roscms =
'".RosCMS::getInstance()->pathRosCMS()."';
- var roscms_intern_page_link =
'".RosCMS::getInstance()->pathRosCMS()."?page=';
+ var roscms_intern_page_link =
'".RosCMS::getInstance()->pathInstance()."?page=';
var roscms_get_edit = '".(isset($_GET['edit']) ?
$_GET['edit'] : '')."';
// access restrictions
@@ -197,7 +197,7 @@
<div id="smenutab9" class="submb"
onclick="loadMenu(this.id)">
<div class="subm1">
- <div id="smenutabc9"
class="subm2">Bookmark <img
src="images/star_on_small.gif" alt="" style="width:13px;
height:13px; border:0px;" /></div>
+ <div id="smenutabc9"
class="subm2">Bookmark <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/star_on_small.gif"
alt="" style="width:13px; height:13px; border:0px;" /></div>
</div>
</div>
<div id="smenutab10" class="submb"
onclick="loadMenu(this.id)">
@@ -221,11 +221,11 @@
<div class="corner_TR"></div>
</div>
<div class="title" id="labtitel1"
onclick="TabOpenCloseEx(this.id)">
- <img id="labtitel1i" src="images/tab_open.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Quick Info
+ <img id="labtitel1i"
src="'.RosCMS::getInstance()->pathRosCMS().'images/tab_open.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Quick Info
</div>
<div class="content" id="labtitel1c"
style="display:block;">
<div id="qiload" style="display:none;">
- <img src="images/ajax_loading.gif" alt="loading
..." width="13" height="13" />
+ <img
src="'.RosCMS::getInstance()->pathRosCMS().'images/ajax_loading.gif"
alt="loading ..." width="13" height="13" />
</div>
<div id="lablinks1" class="text">
<span>Move the mouse over an item to get some details</span>
@@ -241,7 +241,7 @@
<div class="corner_TR"></div>
</div>
<div class="title" id="labtitel2"
onclick="TabOpenCloseEx(this.id)">
- <img id="labtitel2i" src="images/tab_open.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Smart Filters
+ <img id="labtitel2i"
src="'.RosCMS::getInstance()->pathRosCMS().'images/tab_open.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Smart Filters
</div>
<div class="content"
id="labtitel2c"> </div>
<div class="corner_BL">
@@ -254,7 +254,7 @@
<div class="corner_TR"></div>
</div>
<div class="title" id="labtitel3"
onclick="TabOpenCloseEx(this.id)">
- <img id="labtitel3i" src="images/tab_open.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Labels
+ <img id="labtitel3i"
src="'.RosCMS::getInstance()->pathRosCMS().'images/tab_open.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Labels
</div>
<div class="content"
id="labtitel3c"> </div>
<div class="corner_BL">
@@ -272,14 +272,14 @@
<div id="frametable" style="border: 0px dashed
white;">
<div class="filterbar">
<input id="txtfind" type="text"
accesskey="f" tabindex="1" title="Search & Filters"
onfocus="'."searchFilter(this.id, this.value, 'Search &
Filters', true)".'" onblur="'."searchFilter(this.id,
this.value, 'Search & Filters', false)".'"
onkeyup="getAllActiveFilters()" value="Search & Filters"
size="39" maxlength="250" />
- <span id="filters" class="filterbutton"
onclick="TabOpenClose(this.id)"><img id="filtersi"
src="images/tab_closed.gif" alt="" style="width:11px;
height:11px; border:0px;" /> Filters</span>
+ <span id="filters" class="filterbutton"
onclick="TabOpenClose(this.id)"><img id="filtersi"
src="'.RosCMS::getInstance()->pathRosCMS().'images/tab_closed.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Filters</span>
<div id="filtersc" style="display:none;">
<div id="filtersct"> </div>
<div id="filterOptionsfilt2"
class="filterbar2">
- <span class="filterbutton"
onclick="addFilter()"><img src="images/add.gif" alt=""
style="width:11px; height:11px; border:0px;" /> Add</span>
- <span
class="filterbutton" onclick="clearAllFilter()"><img
src="images/clear.gif" alt="" style="width:14px; height:14px;
border:0px;" /> Clear</span>
- <span
class="filterbutton" onclick="'."addUserFilter('filter',
filtstring2)".'"><img src="images/save.gif" alt=""
style="width:14px; height:14px; border:0px;" /> Save</span>
- <span
class="filterbutton" onclick="searchByFilters()"><img
src="images/search.gif" alt="" style="width:14px; height:14px;
border:0px;" /> Search</span>
+ <span class="filterbutton"
onclick="addFilter()"><img
src="'.RosCMS::getInstance()->pathRosCMS().'images/add.gif"
alt="" style="width:11px; height:11px; border:0px;"
/> Add</span>
+ <span
class="filterbutton" onclick="clearAllFilter()"><img
src="'.RosCMS::getInstance()->pathRosCMS().'images/clear.gif"
alt="" style="width:14px; height:14px; border:0px;"
/> Clear</span>
+ <span
class="filterbutton" onclick="'."addUserFilter('filter',
filtstring2)".'"><img
src="'.RosCMS::getInstance()->pathRosCMS().'images/save.gif"
alt="" style="width:14px; height:14px; border:0px;"
/> Save</span>
+ <span
class="filterbutton" onclick="searchByFilters()"><img
src="'.RosCMS::getInstance()->pathRosCMS().'images/search.gif"
alt="" style="width:14px; height:14px; border:0px;"
/> Search</span>
</div>
</div>
</div>
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Activate.cl…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Activate.cl…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Activate.cl…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -53,9 +53,9 @@
echo_strip('
<h1>Activate '.RosCMS::getInstance()->siteName().'
Account</h1>
- <p>Already a member? <a
href="'.RosCMS::getInstance()->pathRosCMS().'?page=login">Login
now</a>!</p>
- <p>Don\'t have a '.RosCMS::getInstance()->siteName().' account
yet? <a
href="'.RosCMS::getInstance()->pathRosCMS().'?page=register">Join
now</a>, it\'s free and just takes a minute.</p>
- <form
action="'.RosCMS::getInstance()->pathRosCMS().'?page=login&subpage=activate"
method="post">
+ <p>Already a member? <a
href="'.RosCMS::getInstance()->pathInstance().'?page=login">Login
now</a>!</p>
+ <p>Don\'t have a '.RosCMS::getInstance()->siteName().' account
yet? <a
href="'.RosCMS::getInstance()->pathInstance().'?page=register">Join
now</a>, it\'s free and just takes a minute.</p>
+ <form
action="'.RosCMS::getInstance()->pathInstance().'?page=login&subpage=activate"
method="post">
<div class="bubble">
<div class="corner_TL">
<div class="corner_TR"></div>
@@ -103,7 +103,7 @@
echo_strip('
<h2>Account activated</h2>
- <div><a
href="'.RosCMS::getInstance()->pathRosCMS().'?page=login"
style="color:red !important; text-decoration:underline;">Login
now</a>!</div>');
+ <div><a
href="'.RosCMS::getInstance()->pathInstance().'?page=login"
style="color:red !important; text-decoration:underline;">Login
now</a>!</div>');
}
elseif ($activation_code_exists) {
echo_strip('
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Login.class…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Login.class…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Login.class…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -203,7 +203,7 @@
exit;
}
- header('Location: '.$config->pathRosCMS().'?page=my');
+ header('Location: '.$config->pathInstance().'?page=my');
exit;
}
} // end of member function body
@@ -237,9 +237,9 @@
}
echo_strip('
- <form action="'.$config->pathRosCMS().'?page=login"
method="post">
+ <form action="'.$config->pathInstance().'?page=login"
method="post">
<h1>Login</h1>
- <p>You don\'t have a '.$config->siteName().' account yet?
<a href="'.$config->pathRosCMS().'?page=register">Join
now</a>, it\'s free and just takes a minute.</p>
+ <p>You don\'t have a '.$config->siteName().' account yet?
<a href="'.$config->pathInstance().'?page=register">Join
now</a>, it\'s free and just takes a minute.</p>
<div class="bubble">
<div class="corner_TL">
@@ -305,15 +305,15 @@
echo '<div style="margin:10px;text-align:center;">';
if (empty($_GET['sec']) || $_GET['sec'] == 'standard') {
- echo '<a
href="'.$config->pathRosCMS().'?page=login&sec=security'.(($target_clean
!= '') ? '&target='.urlencode($target_clean) :
'').'">Use enhanced security</a>';
+ echo '<a
href="'.$config->pathInstance().'?page=login&sec=security'.(($target_clean
!= '') ? '&target='.urlencode($target_clean) :
'').'">Use enhanced security</a>';
}
else {
- echo '<a
href="'.$config->pathRosCMS().'?page=login&sec=standard'.(($target_clean
!= '') ? '&target='.urlencode($target_clean) :
'').'">Use standard security</a>';
+ echo '<a
href="'.$config->pathInstance().'?page=login&sec=standard'.(($target_clean
!= '') ? '&target='.urlencode($target_clean) :
'').'">Use standard security</a>';
}
echo_strip('
<br />
- <a
href="'.$config->pathRosCMS().'?page=login&subpage=lost">Lost
username or password?</a>
+ <a
href="'.$config->pathInstance().'?page=login&subpage=lost">Lost
username or password?</a>
</div>
</form>');
} // end of member function loginForm
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_LostPasswor…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_LostPasswor…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_LostPasswor…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -59,17 +59,17 @@
if (strlen($activation_code > 6)) {
echo_strip('
- <h1><a
href="'.$config->pathRosCMS().'?page=login">Login</a>
> Reset your Password</h1>
+ <h1><a
href="'.$config->pathInstance().'?page=login">Login</a>
> Reset your Password</h1>
<p>Have you forgotten your password of your
'.$config->siteName().' account? Don\'t panic. You have already requested
us that we reset your password. Now it\'s your turn to enter a new password for your
'.$config->siteName().' account.</p>');
}
else {
echo_strip('
- <h1><a
href="'.$config->pathRosCMS().'?page=login">Login</a>
> Lost Username or Password?</h1>
+ <h1><a
href="'.$config->pathInstance().'?page=login">Login</a>
> Lost Username or Password?</h1>
<p>Have you forgotten your username and/or password of your
'.$config->siteName().' account? Don\'t panic. We can send you your
username and let you reset your password. All you need is your email
address.</p>');
}
echo_strip('
- <form
action="'.$config->pathRosCMS().'?page=login&subpage=lost"
method="post">
+ <form
action="'.$config->pathInstance().'?page=login&subpage=lost"
method="post">
<div class="bubble">
<div class="corner_TL">
<div class="corner_TR"></div>
@@ -98,7 +98,7 @@
echo_strip('
<h2>Password changed</h2>
- <div><a href="'.$config->pathRosCMS().'?page=login"
style="color:red !important; text-decoration:underline;">Login
now</a>!</div>');
+ <div><a
href="'.$config->pathInstance().'?page=login" style="color:red
!important; text-decoration:underline;">Login now</a>!</div>');
}
elseif (strlen($activation_code) < 6 &&
isset($_POST['registerpost']) && !empty($_POST['useremail'])
&& EMail::isValid($_POST['useremail']) &&
!empty($_POST['usercaptcha']) &&
!empty($_SESSION['rdf_security_code']) &&
strtolower($_SESSION['rdf_security_code']) ==
strtolower($_POST['usercaptcha']) && $mail_exists) {
@@ -121,7 +121,7 @@
$subject = $config->siteName().' - Lost username or password?';
// Email message
- $message = $config->siteName()." - Lost username or password?\n\n\nYou have
requested your ".$config->siteName()." account login data.\n\nYou haven't
requested your account login data? Oops, then someone has tried the 'Lost username or
password?' function with your email address, just ignore this email.\n\n\nUsername:
".$user['name']."\n\n\nLost your password? Reset your password:
".$config->pathRosCMS()."?page=login&subpage=lost&code=".$activation_code."/\n\n\nBest
regards,\nThe ".$config->siteName()." Team\n\n\n(please do not reply as this
is an auto generated email!)";
+ $message = $config->siteName()." - Lost username or password?\n\n\nYou have
requested your ".$config->siteName()." account login data.\n\nYou haven't
requested your account login data? Oops, then someone has tried the 'Lost username or
password?' function with your email address, just ignore this email.\n\n\nUsername:
".$user['name']."\n\n\nLost your password? Reset your password:
".$config->pathInstance()."?page=login&subpage=lost&code=".$activation_code."/\n\n\nBest
regards,\nThe ".$config->siteName()." Team\n\n\n(please do not reply as this
is an auto generated email!)";
// send the Email
if (EMail::send($_POST['useremail'], $subject, $message)) {
@@ -189,14 +189,14 @@
function CaptchaReload()
{
++BypassCacheNumber;
- document.getElementById('captcha').src =
'".$config->pathRosCMS()."?page=captcha&nr=' +
BypassCacheNumber;
+ document.getElementById('captcha').src =
'".$config->pathInstance()."?page=captcha&nr=' +
BypassCacheNumber;
}
document.write('".'<br /><span
style="color:#817A71;">If you can\'t read this, try <a
href="javascript:CaptchaReload()">another
one</a>.</span>'."');
-->".'
</script>';
echo_strip('
- <img id="captcha"
src="'.$config->pathRosCMS().'?page=captcha"
style="padding-top:10px;" alt="If you can\'t read this, try another one
or email '.$config->emailSupport().' for help." title="Are you
human?" />
+ <img id="captcha"
src="'.$config->pathInstance().'?page=captcha"
style="padding-top:10px;" alt="If you can\'t read this, try another one
or email '.$config->emailSupport().' for help." title="Are you
human?" />
<br />');
if (isset($_POST['registerpost'])) {
@@ -210,7 +210,7 @@
<div class="field">
<input name="registerpost" type="hidden"
id="registerpost" value="reg" />
<button type="submit"
name="submit">Send</button>
- <button type="button"
onclick="'."window.location=".$config->pathRosCMS()."'".'"
style="color:#777777;">Cancel</button>
+ <button type="button"
onclick="'."window.location=".$config->pathInstance()."'".'"
style="color:#777777;">Cancel</button>
</div>');
}
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Profile.cla…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Profile.cla…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Profile.cla…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -76,9 +76,9 @@
// more than one user was found (or none)
if ($users_found != 1 && (empty($_GET['user_name']) ||
!empty($_GET['search']))) {
echo_strip('
- <h1><a
href="'.$config->pathRosCMS().'?page=my">'.$config->siteName().'</a>
> Profile Search</h1>
+ <h1><a
href="'.$config->pathInstance().'?page=my">'.$config->siteName().'</a>
> Profile Search</h1>
<p>Profile Search</p>
- <form id="form1" method="get"
action="'.$config->pathRosCMS().'?page=search">
+ <form id="form1" method="get"
action="'.$config->pathInstance().'?page=search">
<div class="bubble">
<div class="corner_TL">
<div class="corner_TR"></div>
@@ -108,7 +108,7 @@
$stmt->execute();
while ($search = $stmt->fetch(PDO::FETCH_ASSOC)) {
- echo '<li><a style="font-weight:bold;"
href="'.$config->pathRosCMS().'?page=search&user_id='.$search['id'].'">'.$search['name'].'</a>';
+ echo '<li><a style="font-weight:bold;"
href="'.$config->pathInstance().'?page=search&user_id='.$search['id'].'">'.$search['name'].'</a>';
if ($search['fullname']) {
echo '<br />'.$search['fullname'];
}
@@ -258,12 +258,12 @@
// show edit or search link (depending if the current user is searched user)
if ($profile['id'] == $thisuser->id()) {
- echo '<div class="u-link"><a
href="'.$config->pathRosCMS().'?page=my&subpage=edit">Edit
My Profile</a></div>';
+ echo '<div class="u-link"><a
href="'.$config->pathInstance().'?page=my&subpage=edit">Edit
My Profile</a></div>';
}
else {
echo_strip('
<div class="u-link">
- <a
href="'.$config->pathRosCMS().'?page=search">raquo; Profile
Search</a>
+ <a
href="'.$config->pathInstance().'?page=search">raquo; Profile
Search</a>
</div>');
}
echo_strip('
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_ProfileEdit…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_ProfileEdit…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_ProfileEdit…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -57,17 +57,17 @@
if ($activation_code != '' && strlen($activation_code) > 6) {
echo_strip('
- <h1><a
href="'.$config->pathRosCMS().'?page=my">'.$config->siteName().'</a>
> <a
href="'.$config->pathRosCMS().'?page=my&subpage=edit">Edit
My Profile</a> > Activate E-Mail Address</h1>
+ <h1><a
href="'.$config->pathInstance().'?page=my">'.$config->siteName().'</a>
> <a
href="'.$config->pathInstance().'?page=my&subpage=edit">Edit
My Profile</a> > Activate E-Mail Address</h1>
<p>So you have a new email address and would like to keep your
'.$config->siteName().' account up-to-date? That is a very good idea. To
confirm your email address change, please enter your new email address
again.</p>');
}
else {
echo_strip('
- <h1><a
href="'.$config->pathRosCMS().'?page=my">'.$config->siteName().'</a>
> Edit My Profile</h1>
+ <h1><a
href="'.$config->pathInstance().'?page=my">'.$config->siteName().'</a>
> Edit My Profile</h1>
<p>Update your user account profile data to reflect the current
state.</p>');
}
echo_strip('
- <form
action="'.$config->pathRosCMS().'?page=my&subpage=edit"
method="post">
+ <form
action="'.$config->pathInstance().'?page=my&subpage=edit"
method="post">
<div class="bubble">
<div class="corner_TL">
<div class="corner_TR"></div>
@@ -90,7 +90,7 @@
echo_strip('
<h2>E-Mail Address Changed</h2>
<div>
- <a href="'.$config->pathRosCMS().'?page=my"
style="color: red !important; text-decoration:underline;">My
Profile</a>
+ <a href="'.$config->pathInstance().'?page=my"
style="color: red !important; text-decoration:underline;">My
Profile</a>
</div>');
return;
}
@@ -167,7 +167,7 @@
$subject = $config->siteName()." - Email Address Activation";
// message
- $message = $config->siteName()." - Email Address Activation\n\n\nYou have
requested an email address change for your account on
".$config->siteName().". The next step in order to enable the new email
address for the account is to activate it by using the hyperlink below.\n\n\nCurrent
E-Mail Address: ".$profile['email']."\nNew E-Mail Address:
".$_POST['useremail']."\n\nActivation-Hyperlink:
".$config->pathRosCMS()."?page=my&subpage=activate&code=".$account_act_code."/\n\n\nBest
regards,\nThe ".$config->siteName()." Team\n\n\n(please do not reply as this
is an auto generated email!)";
+ $message = $config->siteName()." - Email Address Activation\n\n\nYou have
requested an email address change for your account on
".$config->siteName().". The next step in order to enable the new email
address for the account is to activate it by using the hyperlink below.\n\n\nCurrent
E-Mail Address: ".$profile['email']."\nNew E-Mail Address:
".$_POST['useremail']."\n\nActivation-Hyperlink:
".$config->pathInstance()."?page=my&subpage=activate&code=".$account_act_code."/\n\n\nBest
regards,\nThe ".$config->siteName()." Team\n\n\n(please do not reply as this
is an auto generated email!)";
// send the mail
if (EMail::send($_POST['useremail'], $subject, $message)) {
@@ -182,7 +182,7 @@
echo '<div>Password changed.</div>';
}
- echo '<div><a
href="'.$config->pathRosCMS().'?page=my" style="color:red
!important; text-decoration:underline;">My Profile</a></div>';
+ echo '<div><a
href="'.$config->pathInstance().'?page=my" style="color:red
!important; text-decoration:underline;">My Profile</a></div>';
ROSUser::syncSubsystems($profile['id']);
}
@@ -245,7 +245,7 @@
if (isset($_POST['registerpost']) && $existemail &&
$_POST['useremail'] != $profile['user_email']) {
echo_strip('
<br />
- <em>That email address is already with an account. Do you have several
accounts? Please <a href="'.$config->pathRosCMS().'?page=login"
style="color:red !important;
text-decoration:underline;"><strong>login</strong></a>!</em>');
+ <em>That email address is already with an account. Do you have several
accounts? Please <a href="'.$config->pathInstance().'?page=login"
style="color:red !important;
text-decoration:underline;"><strong>login</strong></a>!</em>');
}
echo_strip('
@@ -346,7 +346,7 @@
<div class="field">
<input type="hidden" name="registerpost"
id="registerpost" value="reg" />
<button type="submit"
name="submit">Save</button>
- <button type="button"
onclick="'.("window.location='".$config->pathRosCMS()."'").'"
style="color:#777777;">Cancel</button>
+ <button type="button"
onclick="'.("window.location='".$config->pathInstance()."'").'"
style="color:#777777;">Cancel</button>
</div>');
}
echo_strip('
Modified:
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Register.cl…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Register.cl…
[iso-8859-1] (original)
+++
branches/danny-web/reactos.org/htdocs/roscms/lib/view/HTML_User_Register.cl…
[iso-8859-1] Thu Feb 12 15:11:12 2009
@@ -59,11 +59,11 @@
<h1>Register to'. $config->siteName().'</h1>
<p>Become a member of the '.$config->siteName().' Community, and
have a single sign-on for all '.$config->siteName().' web services.</p>
<ul>
- <li>Already a member? <a
href="'.$config->pathRosCMS().'?page=login">Login now</a>!
</li>
- <li><a
href="'.$config->pathRosCMS().'?page=login&subpage=lost">Lost
username or password?</a></li>
+ <li>Already a member? <a
href="'.$config->pathInstance().'?page=login">Login now</a>!
</li>
+ <li><a
href="'.$config->pathInstance().'?page=login&subpage=lost">Lost
username or password?</a></li>
</ul>
- <form action="'.$config->pathRosCMS().'?page=register"
method="post">
+ <form action="'.$config->pathInstance().'?page=register"
method="post">
<div class="bubble">
<div class="corner_TL">
<div class="corner_TR"></div>
@@ -141,7 +141,7 @@
$subject = $config->siteName()." - Account Activation";
// message
- $message = $config->siteName()." - Account Activation\n\n\nYou have
registered an account on ".$config->siteName().". The next step in order to
enable the account is to activate it by using the hyperlink below.\n\nYou haven't
registered an account? Oops, then someone has tried to register an account with your email
address. Just ignore this email, no one can use it anyway as it is not activated and the
account will get deleted soon.\n\n\nUsername:
".$_POST['username']."\nPassword:
".$_POST['userpwd1']."\n\nActivation-Hyperlink:
".$config->pathRosCMS()."?page=login&subpage=activate&code=".$account_act_code."/\n\n\nBest
regards,\nThe ".$config->siteName()." Team\n\n\n(please do not reply as this
is an auto generated email!)";
+ $message = $config->siteName()." - Account Activation\n\n\nYou have
registered an account on ".$config->siteName().". The next step in order to
enable the account is to activate it by using the hyperlink below.\n\nYou haven't
registered an account? Oops, then someone has tried to register an account with your email
address. Just ignore this email, no one can use it anyway as it is not activated and the
account will get deleted soon.\n\n\nUsername:
".$_POST['username']."\nPassword:
".$_POST['userpwd1']."\n\nActivation-Hyperlink:
".$config->pathInstance()."?page=login&subpage=activate&code=".$account_act_code."/\n\n\nBest
regards,\nThe ".$config->siteName()." Team\n\n\n(please do not reply as this
is an auto generated email!)";
// send the mail
if (Email::send($_POST['useremail'], $subject, $message)) {
@@ -200,7 +200,7 @@
if (isset($_POST['registerpost']) && $mail_exists) {
echo_strip('
<br />
- <em>That email address is already with an account. Please <a
href="'.$config->pathRosCMS().'?page=login" style="color:red
!important; font-weight: bold;
text-decoration:underline;">login</a>!</em>');
+ <em>That email address is already with an account. Please <a
href="'.$config->pathInstance().'?page=login" style="color:red
!important; font-weight: bold;
text-decoration:underline;">login</a>!</em>');
}
echo_strip('
@@ -216,14 +216,14 @@
function CaptchaReload()
{
++BypassCacheNumber;
- document.getElementById('captcha').src =
'".$config->pathRosCMS()."?page=captcha&nr=' +
BypassCacheNumber;
+ document.getElementById('captcha').src =
'".$config->pathInstance()."?page=captcha&nr=' +
BypassCacheNumber;
}
document.write('<br /><span style=\"color:#817A71;
\">If you can't read this, try <a
href=\"javascript:CaptchaReload()\">another
one</a>.</span>');
-->";echo_strip('
</script>
- <img id="captcha"
src="'.$config->pathRosCMS().'?page=captcha"
style="padding-top:10px;" alt="If you can\'t read this, try another one
or email '.$config->emailSupport().' for help." title="Are you
human?" />
+ <img id="captcha"
src="'.$config->pathInstance().'?page=captcha"
style="padding-top:10px;" alt="If you can\'t read this, try another one
or email '.$config->emailSupport().' for help." title="Are you
human?" />
<br />');
if (isset($_POST['registerpost'])) {
echo_strip('
@@ -236,7 +236,7 @@
<div class="field">
<input name="registerpost" type="hidden"
id="registerpost" value="reg" />
<button type="submit"
name="submit">Register</button>
- <button type="button"
onclick="'."window.location='".$config->pathRosCMS()."'".'"
style="color:#777777;">Cancel</button>
+ <button type="button"
onclick="'."window.location='".$config->pathInstance()."'".'"
style="color:#777777;">Cancel</button>
</div>');
} // end registration form
Added:
branches/danny-web/reactos.org/htdocs/roscms/roscms_instance_example.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ro…
==============================================================================
---
branches/danny-web/reactos.org/htdocs/roscms/roscms_instance_example.php (added)
+++
branches/danny-web/reactos.org/htdocs/roscms/roscms_instance_example.php [iso-8859-1]
Thu Feb 12 15:11:12 2009
@@ -1,0 +1,72 @@
+<?php
+ /*
+ RosCMS Instance Example
+ Copyright (C) 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
+ 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.
+ */
+
+/*
+ To use RosCMS Instances:
+ ==========================
+ 1. you need to copy this file to another folder, where the instance
+ shall be located.
+ 2. rename this file to 'index.php'
+ 3. set ROSCMS_PATH, this is a path to the original RosCMS folder
+ 4. apply your special instance config data in the area below, you are
+ allowed to modify all settings to your needs. everything what is
+ not set in this config, is inherited from original RosCMS
+
+*/
+
+// ROSCMS PATH
+define('ROSCMS_PATH', '../roscms/');
+
+// do not modify
+require_once(ROSCMS_PATH.'lib/RosCMS.class.php');
+$config = &RosCMS::getInstance();
+
+///////////////////////////////////////////////////////
+// Config start ///////////////////////////////////////
+
+$config->setCookieUserKey('roscmsusrkey'); // session key
+$config->setCookieUserName('roscmsusrname'); // user_name
+$config->setCookiePassword('rospassword'); // user_password (used for keep
login function)
+$config->setCookieLoginName('roscmslogon'); // where username is stored for
'save username' in login options
+$config->setCookieSecure('roscmsseckey'); // stores security settings
+
+$config->setSiteName('foundation.ReactOS.org'); // sites name
+
+$config->setPathInstance('/reactos/roscms_instance/'); // path to roscms
files
+$config->setPathGenerationCache('../roscms_cache/'); // path to generated
files (relative to roscms folder)
+$config->setPathGenerated('../'); // path to generated files (relative to
roscms folder)
+
+
+// RosCMS Table Names
+$config->setTable('ROSCMST_ENTRIES' , 'roscms_entries');
+$config->setTable('ROSCMST_REVISIONS' , 'roscms_entries_revisions');
+$config->setTable('ROSCMST_STEXT' , 'roscms_entries_stext');
+$config->setTable('ROSCMST_TAGS' , 'roscms_entries_tags');
+$config->setTable('ROSCMST_TEXT' , 'roscms_entries_text');
+
+// Config end /////////////////////////////////////////
+///////////////////////////////////////////////////////
+
+// do not modify
+$config->apply();
+include_once(ROSCMS_PATH.'index.php');
+exit;
+
+?>