RosCMS (Part3)
Added:
trunk/web/reactos.org/htdocs/roscms/images/
Added:
trunk/web/reactos.org/htdocs/roscms/images/active.gif
Added:
trunk/web/reactos.org/htdocs/roscms/images/bbcode.gif
Added:
trunk/web/reactos.org/htdocs/roscms/images/delete.gif
Added:
trunk/web/reactos.org/htdocs/roscms/images/dot.gif
Added:
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_group_memebers.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_groups.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_sessions.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/body.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/dev.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/dev_overview.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/head.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/home.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/inc_account_check.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/inc_accountlevel_check.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/inc_description_table.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/inc_login.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_admin.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_dev.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_roscms.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_team.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_translator.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_user.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/lang/
Added:
trunk/web/reactos.org/htdocs/roscms/inc/lang/de.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/lang/en.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/lang/fr.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/lang/ru.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/login.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/logout.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/member_bar.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/noaccess.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/nopermission.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/securitylog.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/structure.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/subsys_bugzilla.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/subsys_login.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/subsys_phpbb.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/subsys_utils.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/subsys_wiki.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/team.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/team_overview.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/translator.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/translator_help.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/translator_overview.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_account.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_account_edit.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_accounts.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_getpwd.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_getpwd2.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_gls.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_help.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_help_bbcode.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_help_overview.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_login.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_overview.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_profil.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/user_register.php
Added:
trunk/web/reactos.org/htdocs/roscms/inc/utils.php
_____
Added:
trunk/web/reactos.org/htdocs/roscms/images/active.gif
(Binary files differ)
Property changes on:
trunk/web/reactos.org/htdocs/roscms/images/active.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
_____
Added:
trunk/web/reactos.org/htdocs/roscms/images/bbcode.gif
(Binary files differ)
Property changes on:
trunk/web/reactos.org/htdocs/roscms/images/bbcode.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
_____
Added:
trunk/web/reactos.org/htdocs/roscms/images/delete.gif
(Binary files differ)
Property changes on:
trunk/web/reactos.org/htdocs/roscms/images/delete.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
_____
Added:
trunk/web/reactos.org/htdocs/roscms/images/dot.gif
(Binary files differ)
Property changes on:
trunk/web/reactos.org/htdocs/roscms/images/dot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
_____
Added:
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_group_memebers.php
---
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_group_memebers.php
2005-11-16 21:19:57 UTC (rev 19276)
+++
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_group_memebers.php
2005-11-16 21:22:07 UTC (rev 19277)
@@ -0,0 +1,164 @@
+<?php
+ /*
+ RosCMS - ReactOS Content Management System
+ Copyright (C) 2005 Klemens Friedl <frik85(a)reactos.org>
+
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as published
by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ // To prevent hacking activity:
+ if ( !defined('ROSCMS_SYSTEM') OR
!defined('ROSCMS_SYSTEM_ADMIN') )
+ {
+ if ( !defined('ROSCMS_SYSTEM_LOG') ) {
+ define ("ROSCMS_SYSTEM_LOG", "Hacking attempt");
+ }
+ $seclog_section="roscms_admin_interface";
+ $seclog_level="50";
+ $seclog_reason="Hacking attempt: admin_users.php";
+ define ("ROSCMS_SYSTEM", "Hacking attempt");
+ include('securitylog.php'); // open security log
+ die("Hacking attempt");
+ }
+
+?>
+<div class="contentSmall"> <span
class="contentSmallTitle">Admin
Interface - Group Members</span>
+ <ul>
+ <li><strong>Group Members</strong></li>
+ </ul>
+
+
+ <p>Action: <a href="#">New Membership</a> | <a
href="?page=admin&sec=usrgrpmbr&sec2=view">reset
+ filters & sort</a></p>
+<?php
+
+
+ if ($rpm_lang_id == "") {
+ $rpm_lang_id="all";
+ }
+ echo '<p>Language: ';
+ echo '<b>All</b>';
+ $ros_cms_intern_users_lang = " ";
+ echo '</p>';
+
+ if ($rpm_filt == "") {
+ $rpm_filt="active";
+ }
+ echo '<p>Filter: ';
+ echo '<b>active</b>';
+ $ros_cms_intern_users_filt = " ";
+ echo '</p>';
+
+ if ($rpm_sort == "") {
+ $rpm_sort="id";
+ }
+ echo '<p>Sorted by: ';
+ if ($rpm_sort == "id") {
+ echo '<b>user ID</b>';
+ $ros_cms_intern_users_sortby="usergroupmember_userid";
+ $ros_cms_intern_users_sort="ASC";
+ }
+ else {
+ echo '<a
href="?page=admin&sec=usrgrpmbr&sec2=view&sort=id&filt='
.$rpm_filt.'&opt='.$rpm_opt.'&langid='.$rpm_lang_id.'">user
ID</a>';
+ }
+ echo ' | ';
+ if ($rpm_sort == "group") {
+ echo '<b>group ID</b>';
+
$ros_cms_intern_users_sortby="usergroupmember_usergroupid";
+ $ros_cms_intern_users_sort="ASC";
+ }
+ else {
+ echo '<a
href="?page=admin&sec=usrgrpmbr&sec2=view&sort=group&fil
t='.$rpm_filt.'&opt='.$rpm_opt.'&langid='.$rpm_lang_id.'">group
ID</a>';
+ }
+ echo '</p>';
+
+?>
+ <table width="100%" border="0" cellpadding="1"
cellspacing="1">
+ <tr bgcolor="#5984C3">
+ <td width="6%">
+ <div align="center"><font color="#FFFFFF"
face="Arial,
Helvetica,
sans-serif"><strong>Action</strong></font></div></td>
+ <td width="4%" bgcolor="#5984C3">
+ <div align="center"><font color="#FFFFFF"
face="Arial,
Helvetica,
sans-serif"><strong>ID</strong></font></div></td>
+ <td width="20%" bgcolor="#5984C3">
+ <div align="center"><font color="#FFFFFF"
face="Arial,
Helvetica,
sans-serif"><strong>Nick</strong></font></div></td>
+ <td width="20%">
+ <div align="center"><font color="#FFFFFF"
face="Arial,
Helvetica,
sans-serif"><strong>Usergroup</strong></font></div></td>
+ <td width="50%" bgcolor="#5984C3">
+ <div align="center"><font color="#FFFFFF"
face="Arial,
Helvetica, sans-serif"><strong>Usergroup
+ description</strong></font></div></td>
+ </tr>
+ <?php
+
+ if($roscms_intern_account_level==100) {
+ $query_page = mysql_query("SELECT *
+ FROM usergroup_members
+ $ros_cms_intern_users_filt
$ros_cms_intern_users_lang
+ ORDER BY '$ros_cms_intern_users_sortby'
$ros_cms_intern_users_sort") ;
+ }
+ else {
+ $query_page = mysql_query("SELECT *
+ FROM usergroup_members
+ $ros_cms_intern_users_filt AND
user_account_hidden != 0 $ros_cms_intern_users_lang
+ ORDER BY '$ros_cms_intern_users_sortby'
$ros_cms_intern_users_sort") ;
+ }
+
+ $farbe1="#E2E2E2";
+ $farbe2="#EEEEEE";
+ $zaehler="0";
+ //$farbe="#CCCCC";
+
+ while($result_page = mysql_fetch_array($query_page)) { // users
+?>
+ <tr>
+ <td width="9%" valign="middle" bgcolor="<?php
+
$zaehler++;
+ if
($zaehler == "1") {
+
echo $farbe1;
+
$farbe = $farbe1;
+ }
+ elseif
($zaehler == "2") {
+
$zaehler="0";
+
echo $farbe2;
+
$farbe = $farbe2;
+ }
+ ?>"
title="RosCMS action buttons: * View account * Delete
account * Email * Website">
+ <div align="center"><img src="images/view.gif"
alt="View"
width="19" height="18"
border="0"></div></td>
+ <td width="7%" valign="middle" bgcolor="<?php echo
$farbe; ?>">
<div align="center"><font face="Arial, Helvetica,
sans-serif"><?php echo
"<b>".$result_page['usergroupmember_userid']."</b>";
?></font></div></td>
+ <td width="10%" valign="middle" bgcolor="<?php echo
$farbe;
?>"><font face="Arial, Helvetica, sans-serif"><?php
+ $query_usra = mysql_query("SELECT user_id, user_name
FROM users WHERE user_id =
'".$result_page['usergroupmember_userid']."'") or
die('DB error
(membership script)!');
+ $result_usra = mysql_fetch_array($query_usra) or die('DB
error (show_sessions script)');
+
+ echo $result_usra['user_name']; ?>
+ </font></td>
+ <td width="13%" valign="middle" bgcolor="<?php echo
$farbe; ?>"
title="<?php echo $result_page['usergroupmember_usergroupid'];
?>"><div
align="left"><font face="Arial, Helvetica, sans-serif">
+ <?php
+ //echo "SELECT usrgroup_name_id, usrgroup_name FROM
usergroups WHERE usrgroup_name_id =
'".$result_page['usergroupmember_usergroupid']."'<br>";
+ $query_grpb = mysql_query("SELECT usrgroup_name_id,
usrgroup_name, usrgroup_description FROM usergroups WHERE
usrgroup_name_id =
'".$result_page['usergroupmember_usergroupid']."'")
or die('DB error (membership script)!');
+ $result_grpb = mysql_fetch_array($query_grpb) or die('DB
error (membership script)');
+
+ echo $result_grpb['usrgroup_name'];
+ ?>
+ </font></div></td>
+ <td width="15%" valign="middle" bgcolor="<?php echo
$farbe; ?>">
<font face="Arial, Helvetica, sans-serif"><?php
+ echo
substr(htmlentities($result_grpb['usrgroup_description'], ENT_QUOTES),
0, 50)."...";
+ ?></font></tr>
+ <?php
+ } // end while
+?>
+ </table>
+ <?php
+ $roscms_infotable = "user";
+ include("inc/inc_description_table.php");
+?>
+</div>
Property changes on:
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_group_memebers.php
___________________________________________________________________
Name: svn:eol-style
+ native
_____
Added:
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_groups.php
---
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_groups.php
2005-11-16 21:19:57 UTC (rev 19276)
+++
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_groups.php
2005-11-16 21:22:07 UTC (rev 19277)
@@ -0,0 +1,85 @@
+<?php
+ /*
+ RosCMS - ReactOS Content Management System
+ Copyright (C) 2005 Klemens Friedl <frik85(a)reactos.org>
+
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as published
by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+?>
+<div class="contentSmall"> <span
class="contentSmallTitle">Admin
Interface - Usergroups
+ </span>
+ <ul>
+ <li><strong>Usergroups</strong></li>
+ </ul>
+
+ <table width="100%" border="0" cellpadding="1"
cellspacing="1">
+ <tr bgcolor="#5984C3">
+ <td width="6%">
+ <div align="center"><font color="#FFFFFF"
face="Arial,
Helvetica,
sans-serif"><strong>Action</strong></font></div></td>
+ <td width="14%">
+ <div align="center"><font color="#FFFFFF"
face="Arial,
Helvetica,
sans-serif"><strong>Groupname</strong></font></div></td>
+ <td width="70%">
+ <div align="center"><font color="#FFFFFF"
face="Arial,
Helvetica,
sans-serif"><strong>Description</strong></font></div></td>
+ <td width="10%">
+ <div align="center"><font color="#FFFFFF"
face="Arial,
Helvetica,
sans-serif"><strong>Securitylevel</strong></font></div></td>
+ </tr>
+ <?php
+
+ $query_page = mysql_query("SELECT *
+ FROM usergroups
+ ORDER BY 'usrgroup_securitylevel' ASC ;") ;
+
+ $farbe1="#E2E2E2";
+ $farbe2="#EEEEEE";
+ $zaehler="0";
+ //$farbe="#CCCCC";
+
+ while($result_page = mysql_fetch_array($query_page)) { // Pages
+?>
+ <tr>
+ <td valign="top" bgcolor="<?php
+
$zaehler++;
+ if
($zaehler == "1") {
+
echo $farbe1;
+
$farbe = $farbe1;
+ }
+ elseif
($zaehler == "2") {
+
$zaehler="0";
+
echo $farbe2;
+
$farbe = $farbe2;
+ }
+ ?>"
title="RosCMS action buttons: * View page * Delete
page * Locked">
+ <div align="left">
+ <?php if($roscms_intern_usrgrp_sadmin == true) { ?>
+ <a href="?page=admin&sec=usergroups&viewid=<?php
echo
$result_page['usrgroup_name_id']; ?>"><img
src="images/view.gif"
alt="Delete" width="19" height="18"
border="0"></a>
+ <?php } ?>
+ </div></td>
+ <td valign="top" bgcolor="<?php echo $farbe; ?>">
<div
align="left"><font face="Arial, Helvetica, sans-serif">
+ <?php
+ echo $result_page['usrgroup_name'];
+ ?>
+ </font></div></td>
+ <td valign="top" bgcolor="<?php echo $farbe;
?>"><font
face="Arial, Helvetica, sans-serif"><?php echo
$result_page['usrgroup_description']; ?></font></td>
+ <td valign="top" bgcolor="<?php echo $farbe; ?>">
<div
align="left"><font face="Arial, Helvetica, sans-serif">
+ <?php
+ echo $result_page['usrgroup_securitylevel'];
+ ?>
+ </font></div></td>
+ </tr>
+ <?php
+ } // end while
+?>
+ </table>
+</div>
Property changes on:
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_groups.php
___________________________________________________________________
Name: svn:eol-style
+ native
_____
Added:
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_sessions.php
---
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_sessions.php
2005-11-16 21:19:57 UTC (rev 19276)
+++
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_sessions.php
2005-11-16 21:22:07 UTC (rev 19277)
@@ -0,0 +1,102 @@
+<?php
+ /*
+ RosCMS - ReactOS Content Management System
+ Copyright (C) 2005 Klemens Friedl <frik85(a)reactos.org>
+ Ge van Geldorp <gvg(a)reactos.org>
+
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as published
by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+?>
+<div class="contentSmall"> <span
class="contentSmallTitle">Admin
Interface - Sessions</span>
+ <ul>
+ <li><strong>Sessions</strong></li>
+ </ul>
+<?php
+ if($roscms_intern_usrgrp_sadmin == true) {
+ $roscms_deletesesid="";
+ if(array_key_exists("deletesesid", $_GET))
$roscms_deletesesid=$_GET["deletesesid"];
+
+ if ($roscms_deletesesid != "") {
+ $page_postc="DELETE FROM user_sessions WHERE
usersession_id = '$roscms_deletesesid' LIMIT 1 ;";
+ $page_post_listc=mysql_query($page_postc);
+ }
+ }
+?>
+
+ <table width="100%" border="0" cellpadding="1"
cellspacing="1">
+ <tr bgcolor="#5984C3">
+ <td width="6%">
+ <div align="center"><font color="#FFFFFF"
face="Arial,
Helvetica,
sans-serif"><strong>Action</strong></font></div></td>
+ <td width="8%">
+ <div align="center"><font color="#FFFFFF"
face="Arial,
Helvetica,
sans-serif"><strong>Account</strong></font></div></td>
+ <td width="10%"><div align="center"><font
color="#FFFFFF"
face="Arial, Helvetica,
sans-serif"><strong>Expires</strong></font></div></td>
+ <td width="15%">
+<div align="center"><font color="#FFFFFF" face="Arial,
Helvetica,
sans-serif"><strong>Browser</strong></font></div></td>
+ <td width="10%"> <div align="center"><font
color="#FFFFFF"
face="Arial, Helvetica, sans-serif"><strong>IP
+ Address</strong></font></div></td>
+ </tr>
+ <?php
+
+ $query_page = mysql_query("SELECT *
+ FROM user_sessions
+ ORDER BY 'usersession_timestamp_touch2' DESC ;")
;
+
+ $farbe1="#E2E2E2";
+ $farbe2="#EEEEEE";
+ $zaehler="0";
+ //$farbe="#CCCCC";
+
+ while($result_page = mysql_fetch_array($query_page)) { // Pages
+?>
+ <tr>
+ <td valign="top" bgcolor="<?php
+
$zaehler++;
+ if
($zaehler == "1") {
+
echo $farbe1;
+
$farbe = $farbe1;
+ }
+ elseif
($zaehler == "2") {
+
$zaehler="0";
+
echo $farbe2;
+
$farbe = $farbe2;
+ }
+ ?>"
title="RosCMS action buttons: * View page * Delete
page * Locked">
+ <div align="left"><?php if($roscms_intern_usrgrp_sadmin ==
true) { ?>
+ <a href="?page=admin&sec=sessions&deletesesid=<?php
echo $result_page['usersession_id']; ?>"><img
src="images/delete.gif"
alt="Delete" width="19" height="18"
border="0"></a>
+ <?php } ?>
+ </div></td>
+ <td valign="top" bgcolor="<?php echo $farbe; ?>">
<div
align="left"><font face="Arial, Helvetica, sans-serif">
+ <?php
+ $query_usra = mysql_query("SELECT user_id,
user_name FROM users WHERE user_id =
'".$result_page['usersession_user_id']."'") or die('DB
error
(show_sessions script)!');
+ $result_usra = mysql_fetch_array($query_usra) or
die('DB error (show_sessions script)');
+
+ echo "<b>".$result_usra['user_name']."</b>";
?></font></div></td>
+ <td valign="top" bgcolor="<?php echo $farbe;
?>"><font
face="Arial, Helvetica, sans-serif"><?php echo
"<b>".$result_page['usersession_expires']."</b>";
?></font></td>
+ <td valign="top" bgcolor="<?php echo $farbe; ?>">
<div
align="left"><font face="Arial, Helvetica, sans-serif">
+ <?php
+ echo $result_page['usersession_browseragent'];
+ ?>
+ </font></div></td>
+ <td valign="top" bgcolor="<?php echo $farbe; ?>">
<font
face="Arial, Helvetica, sans-serif">
+ <?php
+ echo $result_page['usersession_ipaddress'];
+ ?>
+ </font></td>
+ </tr>
+ <?php
+ } // end while
+?>
+ </table>
+</div>
Property changes on:
trunk/web/reactos.org/htdocs/roscms/inc/admin_user_sessions.php
___________________________________________________________________
Name: svn:eol-style
+ native
_____
Added:
trunk/web/reactos.org/htdocs/roscms/inc/body.php
---
trunk/web/reactos.org/htdocs/roscms/inc/body.php 2005-11-16
21:19:57 UTC (rev 19276)
+++
trunk/web/reactos.org/htdocs/roscms/inc/body.php 2005-11-16
21:22:07 UTC (rev 19277)
@@ -0,0 +1,64 @@
+<?php
+ /*
+ RosCMS - ReactOS Content Management System
+ Copyright (C) 2005 Klemens Friedl <frik85(a)reactos.org>
+
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as published
by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ // To prevent hacking activity:
+ if ( !defined('ROSCMS_SYSTEM') )
+ {
+ if ( !defined('ROSCMS_SYSTEM_LOG') ) {
+ define ("ROSCMS_SYSTEM_LOG", "Hacking attempt");
+ }
+ $seclog_section="roscms_interface";
+ $seclog_level="50";
+ $seclog_reason="Hacking attempt: body.php";
+ define ("ROSCMS_SYSTEM", "Hacking attempt");
+ include('securitylog.php'); // open security log
+ die("Hacking attempt");
+ }
+
+?>
+
+
+ </td>
+ </tr>
+</table>
+
+
+<hr size="1" />
+
+<address>
+ <p align="center">
+ ReactOS is a registered trademark or a trademark of ReactOS
Foundation in the United States and other countries.<br />
+<?php
+
+ // This page was generated in ...
+ $roscms_gentime = microtime();
+ $roscms_gentime = explode(' ',$roscms_gentime);
+ $roscms_gentime = $roscms_gentime[1] + $roscms_gentime[0];
+ $roscms_pg_end = $roscms_gentime;
+ $roscms_totaltime = ($roscms_pg_end - $roscms_pg_start);
+ $roscms_showtime = number_format($roscms_totaltime, 4, '.', '');
+ echo "<br>Page generated in " . $roscms_showtime . "
seconds";
+
+?>
+ </p>
+</address>
+
+</body>
+</html>
\ No newline at end of file
Property changes on:
trunk/web/reactos.org/htdocs/roscms/inc/body.php
___________________________________________________________________
Name: svn:eol-style
+ native
_____
Added:
trunk/web/reactos.org/htdocs/roscms/inc/dev.php
---
trunk/web/reactos.org/htdocs/roscms/inc/dev.php 2005-11-16
21:19:57 UTC (rev 19276)
+++
trunk/web/reactos.org/htdocs/roscms/inc/dev.php 2005-11-16
21:22:07 UTC (rev 19277)
@@ -0,0 +1,76 @@
+<?php
+ /*
+ RosCMS - ReactOS Content Management System
+ Copyright (C) 2005 Klemens Friedl <frik85(a)reactos.org>
+
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as published
by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+ // To prevent hacking activity:
+ if ( !defined('ROSCMS_SYSTEM') )
+ {
+ if ( !defined('ROSCMS_SYSTEM_LOG') ) {
+ define ("ROSCMS_SYSTEM_LOG", "Hacking attempt");
+ }
+ $seclog_section="roscms_user_interface";
+ $seclog_level="50";
+ $seclog_reason="Hacking attempt: user.php";
+ define ("ROSCMS_SYSTEM", "Hacking attempt");
+ include('securitylog.php'); // open security log
+ die("Hacking attempt");
+ }
+
+
+ if ( !defined('ROSCMS_SYSTEM_DEV') ) {
+ define ("ROSCMS_SYSTEM_DEV", "Developer Interface"); //
to prevent hacking activity
+ }
+
+ if ($roscms_intern_usrgrp_dev == true) { // only for developer
group member
+ create_head($rpm_page_title, $rpm_logo,
$roscms_langres);
+ create_structure($rpm_page);
+
+ switch ($rpm_sec) {
+ case "content":
+ if ($rpm_sec2=="view") {
+
include("inc/admin_content.php");
+ }
+ else if ($rpm_sec2=="edit") {
+
include("inc/admin_content_edit.php");
+ }
+ else if ($rpm_sec2=="delete") {
+
include("inc/admin_content.php");
+ }
+ else if ($rpm_sec2=="save") {
+
include("inc/admin_content.php");
+
//include("inc/admin_content_edit.php");
+ }
+ break;
+ case "devpage":
+ echo "<br><p>under construction
...</p>";
+ break;
+ case "help":
+ echo "<br><p>under construction
...</p>";
+ break;
+ case "overview":
+ default:
+ include("inc/dev_overview.php");
+ break;
+ }
+ }
+ else { // for all other user groups
+ header("location:?page=nopermission");
+ }
+
+?>
Property changes on:
trunk/web/reactos.org/htdocs/roscms/inc/dev.php
___________________________________________________________________
Name: svn:eol-style
+ native
_____
Added:
trunk/web/reactos.org/htdocs/roscms/inc/dev_overview.php
---
trunk/web/reactos.org/htdocs/roscms/inc/dev_overview.php
2005-11-16 21:19:57 UTC (rev 19276)
+++
trunk/web/reactos.org/htdocs/roscms/inc/dev_overview.php
2005-11-16 21:22:07 UTC (rev 19277)
@@ -0,0 +1,54 @@
+<?php
+ /*
+ RosCMS - ReactOS Content Management System
+ Copyright (C) 2005 Klemens Friedl <frik85(a)reactos.org>
+
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as published
by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+?>
+<table border="0" cellspacing="0" cellpadding="0"
width="650">
+ <tr>
+
+ <td colspan="3"><span
class="contentSmallTitle">Developer Interface
Overview</span></td>
+ </tr>
+ <tr>
+ <td colspan="2" bgcolor="#F9F8F8"> <table
width="650" border="0"
cellpadding="4">
+ <tr>
+ <td width="20"> <div align="center"><img
src="images/dot.gif"
vspace="3"></div></td>
+ <td width="300"> <div
align="left"><strong><font face="Arial,
Helvetica, sans-serif"><a href="#">Overview</a>
+ </font></strong></div></td>
+ <td width="10"> </td>
+ <td> <div align="center"><img
src="images/dot.gif"
vspace="3"></div></td>
+ <td> <div align="left"><strong><font
face="Arial, Helvetica,
sans-serif"><a href="#">My
+ own Page</a></font></strong></div></td>
+ </tr>
+ <tr>
+ <td width="20"> <div align="center"><img
src="images/dot.gif"
vspace="3"></div></td>
+ <td width="300"> <div
align="left"><strong><font face="Arial,
Helvetica, sans-serif"><a href="#">Static
+ Page Content</a></font></strong></div></td>
+ <td width="10"> </td>
+ <td width="20"> <div align="center"><img
src="images/dot.gif"
vspace="3"></div></td>
+ <td width="300"><strong><font face="Arial,
Helvetica,
sans-serif"><a
href="#">Documentation</a></font></strong></td>
+ </tr>
+ </table>
+ </tr>
+ <tr bgcolor=#AEADAD>
+ <td><img src="images/line.gif" width="1"
height="1"></td>
+ </tr>
+ </table>
+<br />
+<div class="contentSmall"> <span
class="contentSmallTitle">Developer
Interface - Overview</span>
+<p><placeholder></p>
+</div>
Property changes on:
trunk/web/reactos.org/htdocs/roscms/inc/dev_overview.php
___________________________________________________________________
Name: svn:eol-style
+ native
_____
Added:
trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php
---
trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php
2005-11-16 21:19:57 UTC (rev 19276)
+++
trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php
2005-11-16 21:22:07 UTC (rev 19277)
@@ -0,0 +1,433 @@
+<?php
+ /*
+ RosCMS - ReactOS Content Management System
+ Copyright (C) 2005 Klemens Friedl <frik85(a)reactos.org>
+
+ This program is free software; you can redistribute it and/or
modify
+ it under the terms of the GNU General Public License as published
by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+
+ ReactOS CMS - Page Generator
+
+ (c) by Klemens Friedl <frik85>
+
+*/
+
+
+ // To prevent hacking activity:
+ if ( !defined('ROSCMS_SYSTEM') )
+ {
+ if ( !defined('ROSCMS_SYSTEM_LOG') ) {
+ define ("ROSCMS_SYSTEM_LOG", "Hacking attempt");
+ }
+ $seclog_section="roscms_interface";
+ $seclog_level="50";
+ $seclog_reason="Hacking attempt: generate_page.php";
+ define ("ROSCMS_SYSTEM", "Hacking attempt");
+ include('securitylog.php'); // open security log
+ die("Hacking attempt");
+ }
+
+ function eval_template($code, $dyncontid) // function code from:
http://www.zend.com/zend/art/buffering.php
+ {
+ //echo
"<br>ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ".$dyncontid."<br>";
+ //ob_end_clean();
+ ob_start();
+ $roscms_template_var_pageid="";
+ $roscms_template_var_pageid=$dyncontid;
+ eval(' ?'.'> '.$code.' <'.'?php ');
+ $output = ob_get_contents();
+ ob_end_clean();
+ //echo ob_get_status();
+ //$roscms_template_var_pageid="";
+ return $output;
+ }
+
+
+
+ // RosCMS Config File:
+ include("roscms_config.php");
+
+ //ini_set("max_execution_time","false");
+ set_time_limit(0);
+
+
+
+ //include("db/connect_db.inc.php"); // database connection
script
+
+
+ $roscms_intern_page_counter = 1; // page counter
+
+ // This page was generated in ...
+ $gentime = microtime();
+ $gentime = explode(' ',$gentime);
+ $gentime = $gentime[1] + $gentime[0];
+ $pg_start = $gentime;
+
+ if ($rpm_site == "" || $rpm_sec2=="genpage") {
+ echo "<p><b>RosCMS - HTML & XHTML static page
generation</b></p><br>";
+ }
+
+ // HTML & XHTML
+ for($counter=1;$counter<3;$counter++) {
+ if ($rpm_site != "" && $rpm_sec2=="view") {
+ echo "<!-- Generated with
".$roscms_intern_version." -->\n\n";
+ switch ($rpm_forma) {
+ case "html":
+
$fileformat=$roscms_intern_fileformat_html;
+
$w3cformat=$roscms_intern_w3cformat_html;
+ //echo "<b>HTML</b><br>";
+
$roscms_path_formatfile="../".$roscms_intern_path_html; // output path
+ break;
+ default:
+ case "xhtml":
+
$fileformat=$roscms_intern_fileformat_xhtml;
+
$w3cformat=$roscms_intern_w3cformat_xhtml;
+ //echo
"<br><br><b>XHTML</b><br>";
+
$roscms_path_formatfile="../".$roscms_intern_path_xhtml; // output path
+ break;
+ }
+ }
+ else {
+ switch ($counter) {
+ case 1:
+
$fileformat=$roscms_intern_fileformat_html;
+
$w3cformat=$roscms_intern_w3cformat_html;
+ echo "<b>HTML</b><br>";
+
$roscms_path_formatfile="../".$roscms_intern_path_html; // output path
+ break;
+ case 2:
+
$fileformat=$roscms_intern_fileformat_xhtml;
+
$w3cformat=$roscms_intern_w3cformat_xhtml;
+ echo "<br><br><b>XHTML</b><br>";
+
$roscms_path_formatfile="../".$roscms_intern_path_xhtml; // output path
+ break;
+ }
+ }
+
+ // Languages:
+ if ($rpm_site != "" && $rpm_sec2=="view") {
+ $sql_lang="SELECT *
+ FROM languages
+ WHERE lang_level
!= '0' AND lang_id = '$rpm_lang'
+ ORDER BY
'lang_level' DESC";
+// echo "<br>".$rpm_lang;
+ }
+ else if ($rpm_site != "" &&
$rpm_sec2=="genpage") {
+ $sql_lang="SELECT *
+ FROM languages
+ WHERE lang_level
!= '0' AND lang_id = '$rpm_lang'
+ ORDER BY
'lang_level' DESC";
+ }
+ else {
+ $sql_lang="SELECT *
+ FROM languages
+ WHERE lang_level
!= '0'
+ ORDER BY
'lang_level' DESC";
+ }
+ $sql_query_lang=mysql_query($sql_lang);
+
+ while($myrow_lang=mysql_fetch_row($sql_query_lang)) { //
Languages
+
+ // Pages:
+
+ if ($rpm_site != "") {
+ $query_page = mysql_query("SELECT *
+ FROM pages
+ WHERE page_visible != 0
AND page_active = '1' AND page_name = '$rpm_site' AND (page_language =
'$myrow_lang[0]' OR page_language = 'all')
+ ORDER BY 'page_name'
ASC") ;
+// echo "<br>=".$rpm_site;
+ }
+ else {
+ echo
"<br><br> <b>".$myrow_lang[1]."</b><br>";
+ $query_page = mysql_query("SELECT *
+ FROM pages
+ WHERE page_visible != 0
AND page_active = '1' AND (page_language = '$myrow_lang[0]' OR
page_language = 'all')
+ ORDER BY 'page_name'
ASC");
+ }
+ // $result = mysql_fetch_array($query); AND
pages_extra = ''
+ while($result_page =
mysql_fetch_array($query_page)) { // Pages
+ $data_page=$result_page['page_text'];
+
$data_page_extra=$result_page['pages_extra'];
+ $data_page_title="";
+
$data_page_title=$result_page['page_title'];
+
+
+
+ // Pages Dynamic:
+
+
$current_pagedyn=$result_page['page_name'];
+ $current_pageid=$result_page['page_id'];
+
+ $query_page_dynamic="";
+ $query_page_dynamic_cont_id="";
+ if ($result_page['pages_extra'] ==
"dynamic") {
+ //echo "<br><br>--Dynamic--";
+ $query_page_dynamic =
mysql_query("SELECT *
+
FROM `dyn_content`
+
WHERE 1 AND `dyn_content_nr` = 1 AND `dyn_content_name` =
'$current_pagedyn'
+
ORDER BY `dyn_content_id` ASC ");
+ //echo
"!!".$query_page_dynamica."-!";
+ }
+ else {
+ //echo "<br><br>--NOTDynamic--";
+ $query_page_dynamic =
mysql_query("SELECT *
+
FROM `pages`
+
WHERE 1 AND `page_id` = $current_pageid LIMIT 1 "); // temp
+ }
+
+ while($result_page_dynamic =
mysql_fetch_array($query_page_dynamic)) { // Pages Dynamic
+ if
(array_key_exists("dyn_content_id", $result_page_dynamic))
$query_page_dynamic_cont_id=$result_page_dynamic['dyn_content_id'];
+
+ if ($query_page_dynamic_cont_id
== "") {
+ $roscms_pagedyn="0";
+ //echo "+NO+";
+ }
+ else {
+ $roscms_pagedyn="1";
+
$data_page=$result_page['page_text'];
+ //echo "+YES+";
+ }
+
+ // This page was generated in
(for every page) ...
+ $gentimea = microtime();
+ $gentimea = explode('
',$gentimea);
+ $gentimea = $gentimea[1] +
$gentimea[0];
+ $pg_starta = $gentimea;
+
+ // Content:
+ $query_content =
mysql_query("SELECT *
+ FROM content
+ WHERE
content_visible != 0 AND content_active = '1' AND (content_lang =
'$myrow_lang[0]' OR content_lang = '$w3cformat' OR content_lang =
'all')
+ ORDER BY
'content_id' ASC");
+ while($result_content =
mysql_fetch_array($query_content)) { // Content
+
$data_content=$result_content['content_text'];
+ $data_page =
str_replace("[#cont_".$result_content['content_name']."]",$data_content,
$data_page);
+
+ // RosCMS specific tags
(only very important tags!):
+ $data_page =
str_replace("[#roscms_path_homepage]",$roscms_intern_path_server,$data_p
age); // homepage path
+ if
(preg_match("=roscms_content_author=", $data_page)) { // to same
generation time
+
$res_content_authorid=$result_content['content_usrname_id'];
+ //echo
"<br>br><br><b>===".$res_content_authorid."</b><br><br><br>";
+
$query_usraccountc= mysql_query("SELECT *
+
FROM `users`
+
WHERE `user_id` = ".$res_content_authorid." LIMIT 0 , 1");
+
$result_usraccountc=mysql_fetch_array($query_usraccountc);
+ $data_page =
str_replace("[#roscms_content_author]",$result_usraccountb['user_name'],
$data_page); // account that changed the content
+ }
+ } // end while - Content
+
+ // PHP templates for DynContent:
+ $query_dyninctexta =
mysql_query("SELECT *
+
FROM `include_text`
+
WHERE 1 AND `inc_extra` = 'template_php' AND `inc_vis` = 1");
+ while($result_dyninctexta =
mysql_fetch_array($query_dyninctexta)) { // PHP templates for DynContent
+ if
(preg_match("=inc_".$result_dyninctexta["inc_word"]."=",
$data_page)) {
// to same generation time
+
$ev_buffer=eval_template($result_dyninctexta["inc_text"],$query_page_dyn
amic_cont_id);
+ $data_page =
str_replace("[#inc_".$result_dyninctexta["inc_word"]."]",$ev_buffer,$dat
a_page);
+ $ev_buffer="";
+ }
+ } // end while - PHP template
for DynContent
+
+ // Include_Text:
+ $query_inc_text =
mysql_query("SELECT inc_word, inc_text, inc_lang, inc_vis
+ FROM
include_text
+ WHERE inc_vis=1
AND `inc_extra` = '' AND (inc_lang = '$myrow_lang[0]' OR inc_lang =
'$w3cformat' OR inc_lang = 'all')
+ ORDER BY
'inc_level' ASC") ;
+ while($result_inc_text =
mysql_fetch_array($query_inc_text)) { // Include_Text
+ $data_page =
str_replace("[#inc_".$result_inc_text['inc_word']."]",$result_inc_text['
inc_text'],$data_page);
+
+ // RosCMS specific tags
(only very important tags!):
+ $data_page =
str_replace("[#roscms_path_homepage]",$roscms_intern_path_server,$data_p
age); // homepage path
+ } // end while - Include_Text
+
+ // RosCMS specific tags:
+ if ($data_page_extra ==
"dynamic") {
+ $data_page =
str_replace("[#roscms_filename]",$result_page['page_name']."_".$query_pa
ge_dynamic_cont_id.".".$fileformat,$data_page); // current filename
+ $data_page =
str_replace("[#roscms_pagename]",$result_page['page_name']."_".$query_pa
ge_dynamic_cont_id,$data_page); // current page name
+ $data_page =
str_replace("[#roscms_pagetitle]",ucfirst($result_page['page_name']."_".
$query_page_dynamic_cont_id),$data_page); // current page title
+ }
+ else {
+ $data_page =
str_replace("[#roscms_filename]",$result_page['page_name'].".".$fileform
at,$data_page); // current filename
+ $data_page =
str_replace("[#roscms_pagename]",$result_page['page_name'],$data_page);
// current page name
+ $data_page =
str_replace("[#roscms_pagetitle]",$data_page_title,$data_page); //
current page title
+ }
+ $data_page =
str_replace("[#roscms_language]",$myrow_lang[1],$data_page); // current
language
+ $data_page =
str_replace("[#roscms_language_short]",$myrow_lang[0],$data_page); //
current language
+ $data_page =
str_replace("[#roscms_format]",$w3cformat,$data_page); // current page
format (xhtml/html)
+ $data_page =
str_replace("[#roscms_date]",date("Y-m-d"),$data_page); // current
date
+ $zeit = localtime(time()
, 1);
+ $data_page =
str_replace("[#roscms_time]",
sprintf("%02d",$zeit['tm_hour']).":".sprintf("%02d",$zeit['tm_min']),$da
ta_page); // current time
+ $query_usraccountb=
mysql_query("SELECT *
+
FROM `users`
+
WHERE `user_id` = ".$roscms_intern_account_id." LIMIT 0 , 1");
+
$result_usraccountb=mysql_fetch_array($query_usraccountb);
+ $roscms_intern_usrnameid
= $result_page['page_usrname_id'];
+ $query_usraccount=
mysql_query("SELECT *
+
FROM `users`
+
WHERE `user_id` = ".$roscms_intern_usrnameid." LIMIT 0 , 1");
+
$result_usraccount=mysql_fetch_array($query_usraccount);
+ $data_page =
str_replace("[#roscms_user]",$result_usraccountb['user_name'],$data_page
); // account that generate the page
+ $data_page =
str_replace("[#roscms_inc_author]",$result_usraccount['user_name'],$data
_page); // account that changed the include text
+ $data_page =
str_replace("[#roscms_page_version]",$result_page['page_version'],$data_
page); // current page version
+
+
+ // Add extern link symbol: (code
by Dr. Fred)
+
+ /* 1.) check if href does begin
with http:// */
+ $data_page = str_replace ('(<a
[^h]*)(href\s*=\s*"(http|ftp)://)', '\1class="extern" \2',
$data_page);
+ /* 2.) remove extern-class again
if the link goes to http://*.reactos.org */
+ $data_page = str_replace
('class="extern" (href="http://([^\.]*.)?([^\.]*.)?reactos.org)',
'\1',
$data_page);
+ /* 3.) remove extern if img */
+ $data_page = str_replace
('class="extern"
(href[^>]*>([^<]*<img|[^<]*<[^<\/]*<img|[^>]*<[^<\/]]*<[^<a]*<img))',
'\1', $data_page);
+
+
+
$roscms_pagename_file=$result_page['page_name'];
+ if ($roscms_pagedyn=="1") { //
dynamic page
+
$roscms_pagename_file=$result_page['page_name']."_".$query_page_dynamic_
cont_id; // add the dynamic page number to the filename
+ }
+
+ if ($rpm_debug != "yes") {
+ // Add correct links:
+ $query_page_link =
mysql_query("SELECT *
+ FROM
pages
+ WHERE
page_visible != 0 AND page_active = '1' AND (page_language =
'$myrow_lang[0]' OR page_language = 'all')
+ ORDER BY
'page_name' ASC") ;
+ while($result_page_link
= mysql_fetch_array($query_page_link)) { // Pages
+
+ if
($result_page_link['pages_extra']=="dynamic") { // dynamic page
+ //echo
"<br><br>--222Dynamic--";
+
$query_page_dynamic_link = mysql_query("SELECT *
+
FROM `dyn_content`
+
WHERE 1 AND `dyn_content_nr` = 1 AND `dyn_content_active` = 1 AND
`dyn_content_visible` = 1");
+ }
+ else {
+ //echo
"<br><br>--222NOTDynamic--";
+
$query_page_dynamic_link = mysql_query("SELECT *
+
FROM `pages`
+
WHERE 1 AND `page_id` = $current_pageid LIMIT 1 "); // temp
+ }
+
+
while($result_page_dynamic_link =
mysql_fetch_array($query_page_dynamic_link)) { // Pages Dynamic
+ if
($result_page_link['pages_extra']=="dynamic") { // dynamic page
+
$roscms_pagename=$result_page_link['page_name']."_".$result_page_dynamic
_link['dyn_content_id']; // add the dynamic page number to the filename
+ }
+ else {
+
$roscms_pagename=$result_page_link['page_name'];
+ }
+ //echo
"<br><br>".$roscms_pagename."<br>";
+ if
($w3cformat=="html") {
+
// replace HTML tags with valid HTML 4.01 tags:
+
$data_page = str_replace("<br />","<br>",$data_page); //
current page
version
+
$data_page = str_replace(" />",">",$data_page); // current page
version
+
+
// replace links:
+
if ($rpm_site != "" && $rpm_sec2=="view") {
+
$data_page = str_replace("[#link_".$roscms_pagename."]",
$roscms_intern_path_server.$roscms_intern_path_gererator."?page=$rpm_pag
e&sec=generator&sec2=view&site=".$roscms_pagename."&lang
=".$myrow_lang[0]."&forma=".$w3cformat."&skin=".$rpm_skin,$data_
page); // correct link
+
}
+
else {
+
$data_page = str_replace("[#link_".$roscms_pagename."]",
$roscms_intern_path_server.$roscms_intern_path_html.$myrow_lang[0]."/".$
roscms_pagename.".".$fileformat,$data_page); // correct link
+
}
+
//echo " HTML:
[#link_".$result_page_link['page_name']."]<br>";
+ }
+ else if
($w3cformat=="xhtml") {
+
// replace HTML 4.01 tags with valid XHTML tags:
+
$data_page = str_replace("<br>","<br />",$data_page); //
current page
version
+
//$data_page =
preg_replace("/<img(.*)>/sU","<img\\1/>",$data_page); //
current page version
+
+
// replace links:
+
if ($rpm_site != "" && $rpm_sec2=="view") {
+
$data_page = str_replace("[#link_".$roscms_pagename."]",
$roscms_intern_path_server.$roscms_intern_path_gererator."?page=$rpm_pag
e&sec=generator&sec2=view&site=".$roscms_pagename."&lang
=".$myrow_lang[0]."&forma=".$w3cformat."&skin=".$rpm_skin,$data_
page); // correct link
+
}
+
else {
+
$data_page = str_replace("[#link_".$roscms_pagename."]",
$roscms_intern_path_server.$roscms_intern_path_xhtml.$myrow_lang[0]."/".
$roscms_pagename.".".$fileformat,$data_page); // correct link
+
}
+
//echo " XHTML:
[#link_".$result_page_link['page_name']."]<br>";
+ }
+ }
+ }
+ }
+
+ // redirect all bad links to the
frontpage:
+ $data_page =
str_replace("[#link_",$roscms_intern_path_server."?page=index&temp="
,$data_page); // correct link
+
+ // Output & View:
[truncated at 1000 lines; 7342 more skipped]