Author: frik85
Date: Mon May 29 17:38:13 2006
New Revision: 22110
URL:
http://svn.reactos.ru/svn/reactos?rev=22110&view=rev
Log:
RosCMS update:
* interface improvements
* translator interface update
* myReactOS interface cleanup
* improved page generator (new features)
* ...
Modified:
trunk/web/reactos.org/htdocs/roscms/inc/admin_content.php
trunk/web/reactos.org/htdocs/roscms/inc/admin_content_edit.php
trunk/web/reactos.org/htdocs/roscms/inc/admin_generator.php
trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php
trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_user.php
trunk/web/reactos.org/htdocs/roscms/inc/user_overview.php
trunk/web/reactos.org/htdocs/roscms/index.php
Modified:
trunk/web/reactos.org/htdocs/roscms/inc/admin_content.php
URL:
http://svn.reactos.ru/svn/reactos/trunk/web/reactos.org/htdocs/roscms/inc/a…
==============================================================================
---
trunk/web/reactos.org/htdocs/roscms/inc/admin_content.php (original)
+++
trunk/web/reactos.org/htdocs/roscms/inc/admin_content.php Mon May 29 17:38:13 2006
@@ -287,6 +287,22 @@
echo '<a
href="?page='.$rpm_page.'&sec=content&sec2=view&sort='.$rpm_sort.'&filt='.$rpm_filt.'&opt='.$rpm_opt.'&langid=all">'.$roscms_langres['ContTrans_All'].'</a>';
}
echo ' | ';
+ if ($rpm_lang_id == "layout") {
+ echo '<b>Layout</b>';
+ $ros_cms_intern_content_lang = "AND content_type = 'layout'";
+ }
+ else {
+ echo '<a
href="?page='.$rpm_page.'&sec=content&sec2=view&sort='.$rpm_sort.'&filt='.$rpm_filt.'&opt='.$rpm_opt.'&langid=layout">Layout</a>';
+ }
+ echo ' | ';
+ if ($rpm_lang_id == "error") {
+ echo '<b>Error</b>';
+ $ros_cms_intern_content_lang = "AND content_type != 'default' AND
content_type != 'layout'";
+ }
+ else {
+ echo '<a
href="?page='.$rpm_page.'&sec=content&sec2=view&sort='.$rpm_sort.'&filt='.$rpm_filt.'&opt='.$rpm_opt.'&langid=error">Error</a>';
+ }
+ echo ' | ';
}
if ($rpm_lang_id == "nolang") {
@@ -304,6 +320,14 @@
else {
echo '<a
href="?page='.$rpm_page.'&sec=content&sec2=view&sort='.$rpm_sort.'&filt='.$rpm_filt.'&opt='.$rpm_opt.'&langid=nolang">'.$roscms_langres['ContTrans_International'].'</a>';
}
+
+ $sql_lang_usr="SELECT *
+ FROM users
+ WHERE user_id =
'".mysql_escape_string($roscms_intern_account_id)."'
+ LIMIT 1 ;";
+ $sql_query_lang_usr=mysql_query($sql_lang_usr);
+ $myrow_lang_usr=mysql_fetch_array($sql_query_lang_usr);
+
// Languages
$sql_lang="SELECT *
FROM languages
@@ -317,13 +341,15 @@
}
}
$roscms_sel_lang = $myrow_lang[0];
- echo ' | ';
- if ($rpm_lang_id == $roscms_sel_lang) {
- echo '<b>'.$myrow_lang[1].'</b>';
- $ros_cms_intern_content_lang = "AND content_lang =
'".$roscms_sel_lang."'";
- }
- else {
- echo '<a
href="?page='.$rpm_page.'&sec=content&sec2=view&sort='.$rpm_sort.'&filt='.$rpm_filt.'&opt='.$rpm_opt.'&langid='.$roscms_sel_lang.'">'.$myrow_lang[1].'</a>';
+ if ( ($roscms_sel_lang == $myrow_lang_usr['user_language'] && $rpm_page
== "trans") || $rpm_page == "team" || $rpm_page == "dev" ||
$rpm_page == "admin") {
+ echo ' | ';
+ if ($rpm_lang_id == $roscms_sel_lang) {
+ echo '<b>'.$myrow_lang[1].'</b>';
+ $ros_cms_intern_content_lang = "AND content_lang =
'".$roscms_sel_lang."'";
+ }
+ else {
+ echo '<a
href="?page='.$rpm_page.'&sec=content&sec2=view&sort='.$rpm_sort.'&filt='.$rpm_filt.'&opt='.$rpm_opt.'&langid='.$roscms_sel_lang.'">'.$myrow_lang[1].'</a>';
+ }
}
}
@@ -597,6 +623,7 @@
else if ($result_content['content_lang'] != "all") {
echo $result_content['content_lang'];
}
+ echo '<br /><font
size="1">'.$result_content['content_type'].'</font>';
?>
</font></div></td>
<td width="26%" valign="middle" bgcolor="<?php echo
$farbe; ?>" title="<?php
@@ -605,12 +632,12 @@
?>"> <pre><font face="Arial, Helvetica,
sans-serif"><?php
echo substr(htmlentities($result_content['content_text'], ENT_QUOTES), 0,
40)."..." ;
?></font></pre> </td>
- <td width="7%" valign="middle" bgcolor="<?php echo
$farbe; ?>"> <div align="right"><font face="Arial,
Helvetica, sans-serif">
+ <td width="7%" valign="middle" bgcolor="<?php echo
$farbe; ?>"> <div align="center"><font face="Arial,
Helvetica, sans-serif">
<?php
- echo '<b><a
href="?page='.$rpm_page.'&sec=content&sec2=view&diff='.$result_content['content_id'].'">'.$result_content['content_version'].'</a></b>';
+ echo
'<b>'.$result_content['content_version'].'</b><br
/><a
href="?page='.$rpm_page.'&sec=content&sec2=view&diff='.$result_content['content_id'].'sort='.$rpm_sort.'&filt='.$rpm_filt.'&langid='.$rpm_lang_id.'"><i>Diff-Tool</i></a>';
?>
</font></div>
- <div align="center"><font face="Arial, Helvetica,
sans-serif"> </font></div></td>
+ <div align="center"><font face="Arial, Helvetica,
sans-serif"> </font></div></td>
<td width="13%" valign="middle" bgcolor="<?php echo
$farbe; ?>"> <div align="center"><font face="Arial,
Helvetica, sans-serif">
<?php
echo $result_content['content_date']."
".$result_content['content_time'];;
Modified:
trunk/web/reactos.org/htdocs/roscms/inc/admin_content_edit.php
URL:
http://svn.reactos.ru/svn/reactos/trunk/web/reactos.org/htdocs/roscms/inc/a…
==============================================================================
---
trunk/web/reactos.org/htdocs/roscms/inc/admin_content_edit.php (original)
+++
trunk/web/reactos.org/htdocs/roscms/inc/admin_content_edit.php Mon May 29 17:38:13
2006
@@ -109,20 +109,40 @@
<optgroup label="languages">
<?php
if ($rpm_page != "trans") {
-?>
- <option value="all"<?php if ($cmsros_intern_temp_lang_short
== "all") { echo ' selected="selected"'; } echo
">".$roscms_langres['ContTrans_All']; ?></option>
-<?php
- }
-
-
+ echo '<option value="all"';
+ if ($cmsros_intern_temp_lang_short == "all") {
+ echo ' selected="selected"';
+ }
+ echo ">".$roscms_langres['ContTrans_All'];
+ echo "</option>";
+ }
+
+
+ $sql_lang_usr="SELECT *
+ FROM users
+ WHERE user_id =
'".mysql_escape_string($roscms_intern_account_id)."'
+ LIMIT 1 ;";
+ $sql_query_lang_usr=mysql_query($sql_lang_usr);
+ $myrow_lang_usr=mysql_fetch_array($sql_query_lang_usr);
+
// Languages
- $sql_langa="SELECT *
- FROM languages
- WHERE lang_level != '0'
- ORDER BY 'lang_level' DESC";
- $sql_query_langa=mysql_query($sql_langa);
+ if ($rpm_page == "trans") {
+ $sql_langa="SELECT *
+ FROM languages
+ WHERE lang_level != '0'
+ AND lang_id =
'".mysql_escape_string($myrow_lang_usr['user_language'])."'
+ ORDER BY 'lang_level' DESC";
+ $sql_query_langa=mysql_query($sql_langa);
+ }
+ else {
+ $sql_langa="SELECT *
+ FROM languages
+ WHERE lang_level != '0'
+ ORDER BY 'lang_level' DESC";
+ $sql_query_langa=mysql_query($sql_langa);
+ }
while($myrow_langa=mysql_fetch_row($sql_query_langa)) {
- if ($rpm_page == "trans" && $myrow_langa[0] == "en") {
+ if ($rpm_page == "trans" && $myrow_langa[0] == "en"
&& $myrow_lang_usr['user_language'] != "en") {
// temp
}
else {
@@ -534,7 +554,7 @@
$result_content_new_revision_preview =
mysql_fetch_array($query_content_new_revision_preview);
$roscms_TEMP_cont_name =
$result_content_new_revision_preview['content_name'];
echo "<p>".$roscms_langres['ContTrans_Save1']."
'".$result_content_new_revision_preview['content_name']."' (old
id='".$rpm_db_id."', new id='".
$result_content_new_revision_preview["content_id"] ."')
".$roscms_langres['ContTrans_Save2']."</p>";
- echo "<p><a href='?page=". $rpm_page
."&sec=content&sec2=edit&sort=". $rpm_sort
."&filt=". $rpm_filt ."&langid=". $rpm_lang_id
."&db_id=". $result_content_new_revision_preview['content_id']
."'>".$roscms_langres['ContTrans_Save3']." (revision ".
$result_content_new_revision_preview["content_id"]
.")</a></p>";
+ echo "<p><b><a href='?page=". $rpm_page
."&sec=content&sec2=edit&sort=". $rpm_sort
."&filt=". $rpm_filt ."&langid=". $rpm_lang_id
."&db_id=". $result_content_new_revision_preview['content_id']
."'>".$roscms_langres['ContTrans_Save3']."</b>
(revision ". $result_content_new_revision_preview["content_id"]
.")</a></p>";
echo "<p><a
href='".$_SERVER['HTTP_REFERER']."'>".$roscms_langres['ContTrans_Save4']."
(revision ". $result_content['content_id']
.")</a></p>";
echo
"<p> </p><p><fieldset><legend>".$roscms_langres['ContTrans_Preview']."</legend><br>".$result_content_new_revision_preview['content_text']."</fieldset></p>";
}
Modified:
trunk/web/reactos.org/htdocs/roscms/inc/admin_generator.php
URL:
http://svn.reactos.ru/svn/reactos/trunk/web/reactos.org/htdocs/roscms/inc/a…
==============================================================================
---
trunk/web/reactos.org/htdocs/roscms/inc/admin_generator.php (original)
+++
trunk/web/reactos.org/htdocs/roscms/inc/admin_generator.php Mon May 29 17:38:13 2006
@@ -44,7 +44,20 @@
</tr>
<tr>
<td><div align="center"><img
src="images/dot.gif" vspace="3"></div></td>
- <td><font face="Arial, Helvetica, sans-serif"><a
href="?page=<?php echo $rpm_page;
?>&sec=generator&sec2=output" title="Generate all static
pages (only if you need to update all pages, e.g. one time per
day)"><strong><?php echo $roscms_langres['ContTrans_Gen_menu2'];
?></strong></a> </font></td>
+ <td><font face="Arial, Helvetica, sans-serif"><a
href="?page=<?php echo $rpm_page;
?>&sec=generator&sec2=output" title="Generate all static
pages (only if you need to update all pages, e.g. one time per
day)"><strong><?php echo $roscms_langres['ContTrans_Gen_menu2'];
?></strong></a> <?php
+
+
+ // Languages
+ $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)) {
+ echo ', <a
href="?page='.$rpm_page.'&sec=generator&sec2=output&gen_lang='.$myrow_lang[0].'&skin=default">'.$myrow_lang[1].'</a>';
+ }
+
+ ?></font></td>
<td> </td>
<td><div align="center"><img
src="images/dot.gif" vspace="3"></div></td>
<td><font face="Arial, Helvetica, sans-serif"><a
href="?page=<?php echo $rpm_page;
?>&sec=generator&sec2=view&site=&lang=en&forma=xhtml&skin=default"
title="Don't use this function if you don't know what this function
do!">View all pages - test mode</a></font></td>
@@ -361,17 +374,17 @@
?>
</font></strong></div>
<div align="center"><strong><font face="Arial,
Helvetica, sans-serif"> </font></strong></div></td>
- <td width="13%" valign="middle" bgcolor="<?php echo
$farbe; ?>"> <div align="center"><strong><font
face="Arial, Helvetica, sans-serif">
+ <td width="13%" valign="middle" bgcolor="<?php echo
$farbe; ?>"> <div align="center"><font face="Arial,
Helvetica, sans-serif">
<?php
echo $result_page['page_date']."
".$result_page['page_time'];;
?>
- </font></strong></div></td>
+ </font></div></td>
<td width="13%" valign="middle" bgcolor="<?php echo
$farbe; ?>">
- <div align="center"><strong><font face="Arial,
Helvetica, sans-serif">
+ <div align="center"><font face="Arial, Helvetica,
sans-serif">
<?php
echo
"<b>".date("Y-m-d",$result_page['page_generate_timestamp'])."</b><br>".date("H:i:s",$result_page['page_generate_timestamp']);
?>
- </font></strong></div></td>
+ </font></div></td>
<td width="23%" valign="middle" bgcolor="<?php echo
$farbe; ?>">
<div align="center"><strong><font face="Arial,
Helvetica, sans-serif">
<?php
Modified:
trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php
URL:
http://svn.reactos.ru/svn/reactos/trunk/web/reactos.org/htdocs/roscms/inc/g…
==============================================================================
---
trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php (original)
+++
trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php Mon May 29 17:38:13 2006
@@ -64,6 +64,14 @@
set_time_limit(0);
+ $rpm_gen_lang="";
+ if (array_key_exists("gen_lang", $_GET))
$rpm_gen_lang=htmlspecialchars($_GET["gen_lang"]);
+ if ($rpm_gen_lang != "") {
+ $rpm_temp_gen_lang = " AND lang_id =
'".mysql_escape_string($rpm_gen_lang)."'";
+ }
+ else {
+ $rpm_temp_gen_lang = "";
+ }
//include("db/connect_db.inc.php"); // database connection script
@@ -129,20 +137,20 @@
if ($rpm_site != "" && $rpm_sec2=="view") {
$sql_lang="SELECT *
FROM languages
- WHERE lang_level != '0' AND lang_id = '$rpm_lang'
+ WHERE lang_level != '0' AND lang_id =
'".mysql_escape_string($rpm_lang)."'
ORDER BY 'lang_level' DESC";
-// echo "<br>".$rpm_lang;
+ //echo "<br>!!".$rpm_lang;
}
else if ($rpm_site != "" && $rpm_sec2=="genpage") {
$sql_lang="SELECT *
FROM languages
- WHERE lang_level != '0'
+ WHERE lang_level != '0' ".$rpm_temp_gen_lang."
ORDER BY 'lang_level' DESC";
}
else {
$sql_lang="SELECT *
FROM languages
- WHERE lang_level != '0'
+ WHERE lang_level != '0' ".$rpm_temp_gen_lang."
ORDER BY 'lang_level' DESC";
}
$sql_query_lang=mysql_query($sql_lang);
Modified:
trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_user.php
URL:
http://svn.reactos.ru/svn/reactos/trunk/web/reactos.org/htdocs/roscms/inc/i…
==============================================================================
---
trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_user.php (original)
+++
trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_user.php Mon May 29 17:38:13 2006
@@ -21,29 +21,24 @@
<div class="navTitle"><?php echo $roscms_langres['myReactOS'];
?></div>
<ol>
<li><a href="?page=user"><?php echo
$roscms_langres['Overview']; ?></a></li>
- <li><a href="?page=user&sec=account"><?php echo
$roscms_langres['Account']; ?></a></li>
+ <li><a
href="?page=user&sec=account&sec2=edit"><?php echo
$roscms_langres['Account_Edit']; ?></a></li>
+ <li><a href="?page=user&sec=accountlist"><?php echo
$roscms_langres['Accountlist']; ?></a></li>
+ <li><a href="?page=user&sec=gls"><?php echo
$roscms_langres['Login_System']; ?></a></li>
<?php
- if ($rpm_sec == "account" || $rpm_sec == "gls" || $rpm_sec ==
"accountlist") {
+ /*
+ <li><a href="?page=user&sec=help"><?php echo
$roscms_langres['Documentation']; ?></a></li>
+ */
+ if ($roscms_intern_usrgrp_sadmin == true ||
+ $roscms_intern_usrgrp_admin == true ||
+ $roscms_intern_usrgrp_dev == true ||
+ $roscms_intern_usrgrp_team == true ||
+ $roscms_intern_usrgrp_trans == true)
+ {
?>
- <li><a
href="?page=user&sec=account&sec2=edit"> - <?php
echo $roscms_langres['Account_Edit']; ?></a></li>
- <li><a href="?page=user&sec=accountlist"> -
<?php echo $roscms_langres['Accountlist']; ?></a></li>
- <li><a href="?page=user&sec=gls"> - <?php
echo $roscms_langres['Login_System']; ?></a></li>
+ <li><a href="?page=home">RosCMS Interface</a></li>
<?php
- }
-/*
- <li><a href="?page=user&sec=msg"><?php echo
$roscms_langres['Messages']; ?></a></li>
- <li><a href="?page=user&sec=contact"><?php echo
$roscms_langres['Contacts']; ?></a></li>
- <li><a href="?page=user&sec=fav"><?php echo
$roscms_langres['Favorites']; ?></a></li> */ ?>
- <li><a href="?page=user&sec=help"><?php echo
$roscms_langres['Documentation']; ?></a></li>
- <?php
- if ($roscms_intern_usrgrp_sadmin == true ||
- $roscms_intern_usrgrp_admin == true ||
- $roscms_intern_usrgrp_dev == true ||
- $roscms_intern_usrgrp_team == true ||
- $roscms_intern_usrgrp_trans == true) {
- ?>
- <li><a href="?page=home">RosCMS Interface</a></li>
- <?php } ?>
+ }
+?>
</ol>
</div>
<p></p>
Modified:
trunk/web/reactos.org/htdocs/roscms/inc/user_overview.php
URL:
http://svn.reactos.ru/svn/reactos/trunk/web/reactos.org/htdocs/roscms/inc/u…
==============================================================================
---
trunk/web/reactos.org/htdocs/roscms/inc/user_overview.php (original)
+++
trunk/web/reactos.org/htdocs/roscms/inc/user_overview.php Mon May 29 17:38:13 2006
@@ -18,43 +18,6 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
?>
-<table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="460" colspan="3"><span
class="contentSmallTitle"><?php echo
$roscms_langres['User_Profil_Overview']; ?></span></td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#F9F8F8"> <table
border="0" cellpadding="4">
- <tr>
- <td width="20">
- <div align="center"><img src="images/dot.gif"
vspace="3"></div></td>
- <td width="180"> <div
align="left"><strong><font face="Arial, Helvetica,
sans-serif"><a href="?page=user&sec=account"><?php echo
$roscms_langres['Account']; ?></a>
- </font></strong></div></td>
- <td width="5"> </td>
- <td width="20">
- <div align="center"><img src="images/dot.gif"
vspace="3"></div></td>
- <td width="180"><strong><font face="Arial,
Helvetica, sans-serif"><a
href="?page=user&sec=contact"><?php echo
$roscms_langres['Contacts'];
?></a></font></strong></td>
- </tr>
- <tr>
- <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="?page=user&sec=gls"><?php echo
$roscms_langres['Login_System'];
?></a></font></strong></div></td>
- <td> </td>
- <td> <div align="center"><img
src="images/dot.gif" vspace="3"></div></td>
- <td><strong><font face="Arial, Helvetica,
sans-serif"><a href="#"><a
href="?page=user&sec=fav"><?php echo
$roscms_langres['Favorites'];
?></a></font></strong></td>
- </tr>
- <tr>
- <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="?page=user&sec=msg"><?php echo
$roscms_langres['Messages'];
?></a></font></strong></div></td>
- <td> </td>
- <td> <div align="center"><img
src="images/dot.gif" vspace="3"></div></td>
- <td><strong><font face="Arial, Helvetica,
sans-serif"><a href="#"><a
href="?page=user&sec=help"><?php echo
$roscms_langres['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>
<table width="460" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td width="" colspan="3"><span
class="contentSmallTitle"><?php echo
$roscms_langres['User_Profil']; ?></span></td>
@@ -62,7 +25,8 @@
<tr>
<td colspan="2" bgcolor="#F9F8F8"><table
width="100%" border="0">
<tr>
- <td width="135" valign="top"><b><img
src="images/userpic_default.jpg" width="124" height="165"
border="1"></b></td>
+ <td width="15
+ " valign="top"> </td>
<td valign="top"><table width="100%"
border="0" cellpadding="4">
<tr>
<td width="84" valign="top"><font
size="2" face="Arial, Helvetica,
sans-serif">Nick:</font></td>
@@ -89,7 +53,7 @@
$query_usraccount= mysql_query("SELECT *
FROM `users`
- WHERE `user_id` = ".$roscms_intern_account_id." LIMIT 0 ,
1");
+ WHERE `user_id` = ".$roscms_intern_account_id." LIMIT 1 ;");
$result_usraccount=mysql_fetch_array($query_usraccount);
echo $result_usraccount['user_fullname'];
@@ -128,7 +92,7 @@
<td colspan="2" valign="top"> <font
size="2" face="Arial, Helvetica, sans-serif"><?php
include("../editor/bbcode/cbparser.php");
- echo bb2html($result_usraccount['user_description'],'');
+ echo @bb2html($result_usraccount['user_description'],'');
?></font></td>
</tr>
@@ -139,7 +103,3 @@
<td><img src="images/line.gif" width="1"
height="1"></td>
</tr>
</table>
-<div class="contentSmall"><span
class="contentSmallTitle"><?php echo
$roscms_langres['Account_Information']; ?></span>
- <p><?php echo $roscms_langres['Account_Information_description'];
?></p>
- <p>This content hasn't been written yet. If you want to write the content for
this page, please ask a ReactOS Web Team member or join the #reactos-hp irc
channel!</p>
-</div>
Modified:
trunk/web/reactos.org/htdocs/roscms/index.php
URL:
http://svn.reactos.ru/svn/reactos/trunk/web/reactos.org/htdocs/roscms/index…
==============================================================================
---
trunk/web/reactos.org/htdocs/roscms/index.php (original)
+++
trunk/web/reactos.org/htdocs/roscms/index.php Mon May 29 17:38:13 2006
@@ -37,7 +37,7 @@
*
* (c) by Klemens Friedl <frik85>
*
- */
+ */
if ( !defined('ROSCMS_SYSTEM') ) {
define ("ROSCMS_SYSTEM", "Version 0.1"); // to prevent hacking
activity