RosCMS update:

All Interfaces:
* improve edit/save contents

Admin Interface:
* improve the Page Generator Overview page
* static page generator: it's now possible to generate only the changed pages
* simplify the menu bar
Modified: trunk/web/reactos.org/htdocs/roscms/inc/admin.php
Modified: trunk/web/reactos.org/htdocs/roscms/inc/admin_content_edit.php
Modified: trunk/web/reactos.org/htdocs/roscms/inc/admin_generator.php
Modified: trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php
Modified: trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_admin.php
Modified: trunk/web/reactos.org/htdocs/roscms/inc/user_overview.php
Modified: trunk/web/reactos.org/htdocs/roscms/index.php

Modified: trunk/web/reactos.org/htdocs/roscms/inc/admin.php
--- trunk/web/reactos.org/htdocs/roscms/inc/admin.php	2005-12-30 18:48:27 UTC (rev 20461)
+++ trunk/web/reactos.org/htdocs/roscms/inc/admin.php	2005-12-30 19:01:44 UTC (rev 20462)
@@ -62,6 +62,7 @@
 					}
 				}
 				break;
+			default:
 			case "generate": // generator menu page
 				include("inc/admin_generator.php"); 
 				break;
@@ -187,7 +188,6 @@
 				include("inc/admin_subsys.php");
 				break;
 			case "overview":
-			default:
 				include("inc/admin_overview.php"); 
 				break;
 		}	

Modified: trunk/web/reactos.org/htdocs/roscms/inc/admin_content_edit.php
--- trunk/web/reactos.org/htdocs/roscms/inc/admin_content_edit.php	2005-12-30 18:48:27 UTC (rev 20461)
+++ trunk/web/reactos.org/htdocs/roscms/inc/admin_content_edit.php	2005-12-30 19:01:44 UTC (rev 20462)
@@ -501,6 +501,7 @@
 
 
 		if ($content_savemode == "update") {
+			$roscms_TEMP_cont_name = $result_content['content_name'];
 			echo "<p>The content '".$result_content['content_name']."' (id='".$rpm_db_id."') has been saved!</p>";
 			echo "<p><a href=".$_SERVER['HTTP_REFERER'].">Back to the 'content edit' page</a></p>";
 			echo "<p>&nbsp;</p><p><fieldset><legend>Preview</legend><br>".$result_content['content_text']."</fieldset></p>";
@@ -513,13 +514,29 @@
 														AND `content_version` = ". $content_version ."
 														LIMIT 1;");
 			$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>A new version of content '".$result_content_new_revision_preview['content_name']."' (old id='".$rpm_db_id."', new id='". $result_content_new_revision_preview["content_id"] ."') has been saved!</p>";		
 			echo "<p><a href='?page=". $rpm_page ."&amp;sec=content&amp;sec2=edit&amp;sort=". $rpm_sort ."&amp;filt=". $rpm_filt ."&amp;langid=". $rpm_lang_id ."&amp;db_id=". $result_content_new_revision_preview['content_id'] ."'>Go to the 'content edit' page (revision ". $result_content_new_revision_preview["content_id"] .")</a></p>";
 			echo "<p><a href='".$_SERVER['HTTP_REFERER']."'>Back to the 'content edit' page (revision ". $result_content['content_id'] .")</a></p>";
 			echo "<p>&nbsp;</p><p><fieldset><legend>Preview</legend><br>".$result_content_new_revision_preview['content_text']."</fieldset></p>";
 		}
-
+		
+	
+	$query_TEMP_content = mysql_query("SELECT COUNT('page_id') 
+									FROM `pages` 
+									WHERE `page_name` = '". $roscms_TEMP_cont_name ."'
+									AND `page_active` = 1
+									AND `page_visible` = 1 ;") ;
+	$result_TEMP_content = mysql_fetch_row($query_TEMP_content);
+	
+	// Update the "page" generator info:
+	if ($result_TEMP_content[0] == "0" || $result_TEMP_content[0] == "") {
+		// temp
+	}
+	else { 
+		$content_postc="UPDATE `pages` SET `page_generate_force` = '1' WHERE `page_name` = '". $roscms_TEMP_cont_name ."' ;";
+		$content_post_listc=mysql_query($content_postc);
+	}
 }
 ?>
 </div>

Modified: trunk/web/reactos.org/htdocs/roscms/inc/admin_generator.php
--- trunk/web/reactos.org/htdocs/roscms/inc/admin_generator.php	2005-12-30 18:48:27 UTC (rev 20461)
+++ trunk/web/reactos.org/htdocs/roscms/inc/admin_generator.php	2005-12-30 19:01:44 UTC (rev 20462)
@@ -27,32 +27,37 @@
     </tr>
     <tr> 
       <td colspan="2" bgcolor="#F9F8F8"> <table width="650" border="0" cellpadding="4">
+          <tr>
+            <td><div align="center"><img src="images/dot.gif" vspace="3"></div></td>
+            <td><strong><font face="Arial, Helvetica, sans-serif"><a href="?page=admin&amp;sec=generator&amp;sec2=output&amp;newcontent=true" title="Generate all UPDATED static pages! (except content that is visible on several pages, e.g. menu bars -> then use the 'generate all pages' link instead!)">Generate  all UPDATED static pages</a> </font></strong></td>
+            <td>&nbsp;</td>
+            <td>
+              <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="?page=admin&amp;sec=generator&amp;sec2=view&amp;site=index&amp;lang=en&amp;forma=html&amp;skin=default&amp;debug=yes" title="Don't use this function if you don't know what this function do!">View page - debug mode</a></font></strong></div></td>
+          </tr>
+          <tr>
+            <td><div align="center"><img src="images/dot.gif" vspace="3"></div></td>
+            <td><strong><font face="Arial, Helvetica, sans-serif"><a href="?page=admin&amp;sec=generator&amp;sec2=output" title="Generate all static pages (only if you need to update all pages, e.g. one time per day)">Generate all static pages</a> </font></strong></td>
+            <td>&nbsp;</td>
+            <td><div align="center"><img src="images/dot.gif" vspace="3"></div></td>
+            <td><strong><font face="Arial, Helvetica, sans-serif"><a href="?page=admin&amp;sec=generator&amp;sec2=view&amp;site=&amp;lang=en&amp;forma=xhtml&amp;skin=default" title="Don't use this function if you don't know what this function do!">View all pages - test mode</a></font></strong></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="?page=admin&amp;sec=generator&amp;sec2=output" title="Generate all static pages (only if you need to update all pages, e.g. one time per day)">Generate 
-                all static pages</a> </font></strong></div></td>
+            <td width="300"> <div align="left"><strong><font face="Arial, Helvetica, sans-serif"><a href="#gensinglepage" title="Generate one static page (if you want to update one specific page)">Generate/view a specific static page</a></font></strong></div></td>
             <td width="10">&nbsp;</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="?page=admin&amp;sec=generator&amp;sec2=view&amp;site=index&amp;lang=en&amp;forma=html&amp;skin=default&amp;debug=yes" title="Don't use this function if you don't know what this function do!">View 
-              page - debug mode</a></font></strong></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="?page=admin&amp;sec=generator&amp;sec2=view&amp;site=&amp;lang=en&amp;forma=xhtml&amp;skin=default&amp;debug=yes" title="Don't use this function if you don't know what this function do!">View all pages - debug mode</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="#gensinglepage" title="Generate one static page (if you want to update one specific page)">Generate/view 
-                a specific static page</a></font></strong></div></td>
+            <td width="300"> <div align="left"><strong><font face="Arial, Helvetica, sans-serif"><a href="?page=admin&amp;sec=generator&amp;sec2=view&amp;sec3=menu&amp;site=index&amp;lang=en&amp;forma=html&amp;skin=default" title="View the static homepage in a dynamic way">View page (dynamic from database)</a></font></strong></div></td>
             <td width="10">&nbsp;</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="?page=admin&amp;sec=generator&amp;sec2=view&amp;site=&amp;lang=en&amp;forma=xhtml&amp;skin=default" title="Don't use this function if you don't know what this function do!">View 
-                all pages - test mode</a></font></strong></div></td>
-          </tr>
-          <tr> 
-            <td> <div align="center"><img src="images/dot.gif" vspace="3"></div></td>
-            <td><strong><font face="Arial, Helvetica, sans-serif"><a href="?page=admin&amp;sec=generator&amp;sec2=view&amp;sec3=menu&amp;site=index&amp;lang=en&amp;forma=html&amp;skin=default" title="View the static homepage in a dynamic way">View 
-              page (dynamic from database)</a></font></strong></td>
             <td>&nbsp;</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="?page=admin&amp;sec=generator&amp;sec2=view&amp;site=&amp;lang=en&amp;forma=xhtml&amp;skin=default&amp;debug=yes" title="Don't use this function if you don't know what this function do!">View 
-                all pages - debug mode</a></font></strong></div></td>
+            <td>&nbsp;</td>
           </tr>
         </table></tr>
     <tr bgcolor=#AEADAD> 
@@ -282,6 +287,9 @@
 									echo $farbe2;
 									$farbe = $farbe2;
 								}
+								if ($result_page['page_generate_force'] == "1") {
+									$farbe = "#00FF00";
+								}
 							 ?>" title="RosCMS action buttons:&#10;&#10;* Generate static page&#10;* View page in dynamc mode&#10;* Delete static pagse"> 
         <div align="center">
           <?php 

Modified: trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php
--- trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php	2005-12-30 18:48:27 UTC (rev 20461)
+++ trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php	2005-12-30 19:01:44 UTC (rev 20462)
@@ -48,7 +48,7 @@
 		ob_start(); 
 		$roscms_template_var_pageid="";
 		$roscms_template_var_pageid=$dyncontid;
-		eval(' ?'.'> '.$code.' <'.'?php '); 
+		eval(' ?'.'>'.$code.' <'.'?php '); 
 		$output = ob_get_contents(); 
 		ob_end_clean(); 
 		//echo ob_get_status();
@@ -152,11 +152,20 @@
 //						echo "<br>=".$rpm_site;
 			}
 			else {
-				echo "<br><br>&nbsp;&nbsp;<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");
+				if ($rpm_newcontent == true) {
+					echo "<br><br>&nbsp;&nbsp;<b>".$myrow_lang[1]."</b><br>";
+					$query_page = mysql_query("SELECT * 
+							FROM pages
+							WHERE page_visible = '1' AND page_active = '1' AND page_generate_force = '1' AND (page_language = '$myrow_lang[0]' OR page_language = 'all') 
+							ORDER BY 'page_name' ASC");
+				}
+				else {
+					echo "<br><br>&nbsp;&nbsp;<b>".$myrow_lang[1]."</b><br>";
+					$query_page = mysql_query("SELECT * 
+							FROM pages
+							WHERE page_visible = '1' 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
@@ -454,6 +463,17 @@
 	echo("\n\n\n<!-- information for dynamic version -->\n<br><center><font size='1'>This dynamic <b>".$w3cformat." page</b> was <b>generated</b> with ".$roscms_intern_version." in <b>" . $showtime . " seconds.</b></font></center>");
 }
 
+if ($rpm_site == "" && $rpm_sec2 != "view" && $rpm_sec2 !="genpage") {
+	$query_pagegen_status = mysql_query("SELECT * 
+			FROM pages
+			WHERE page_visible = '1' AND page_active = '1' 
+			ORDER BY 'page_name' ASC ;") ;
+	while($result_pagegen_status = mysql_fetch_array($query_pagegen_status)) { // Pages
+		$content_postd="UPDATE `pages` SET `page_generate_force` = '0' WHERE `page_id` = '". $result_pagegen_status['page_id'] ."' ;";
+		$content_post_listd=mysql_query($content_postd);
+	}
+}
+
 set_time_limit(30);
 
 ?>

Modified: trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_admin.php
--- trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_admin.php	2005-12-30 18:48:27 UTC (rev 20461)
+++ trunk/web/reactos.org/htdocs/roscms/inc/inc_menu_admin.php	2005-12-30 19:01:44 UTC (rev 20462)
@@ -20,10 +20,9 @@
 ?>
 <div class="navTitle">Admin Interface</div>
 	<ol>
-		<li><a href="?page=admin">Overview</a></li>
 		<li><a href="?page=admin&amp;sec=generate">Page Generator</a></li>
 <?php
-	if ($rpm_sec == "pages" || $rpm_sec == "content" || $rpm_sec == "inctext" || $rpm_sec == "dyncontent" || $rpm_sec == "languages" || $rpm_sec == "generate") {
+	if ($rpm_sec == "" || $rpm_sec == "pages" || $rpm_sec == "content" || $rpm_sec == "inctext" || $rpm_sec == "dyncontent" || $rpm_sec == "languages" || $rpm_sec == "generate") {
 ?>
 		<li><a href="?page=admin&sec=pages&sec2=view">&nbsp;- Pages</a></li>
 		<li><a href="?page=admin&sec=content&sec2=view">&nbsp;- Content</a></li>

Modified: trunk/web/reactos.org/htdocs/roscms/inc/user_overview.php
--- trunk/web/reactos.org/htdocs/roscms/inc/user_overview.php	2005-12-30 18:48:27 UTC (rev 20461)
+++ trunk/web/reactos.org/htdocs/roscms/inc/user_overview.php	2005-12-30 19:01:44 UTC (rev 20462)
@@ -128,7 +128,7 @@
                 <td colspan="2" valign="top"> <font size="2" face="Arial, Helvetica, sans-serif"><?php 
 					
 					include("../editor/bbcode/cbparser.php");
-					echo bb2html(stripslashes($result_usraccount['user_description']),'');
+					echo bb2html($result_usraccount['user_description'],'');
 				
 				?></font></td>
               </tr>

Modified: trunk/web/reactos.org/htdocs/roscms/index.php
--- trunk/web/reactos.org/htdocs/roscms/index.php	2005-12-30 18:48:27 UTC (rev 20461)
+++ trunk/web/reactos.org/htdocs/roscms/index.php	2005-12-30 19:01:44 UTC (rev 20462)
@@ -59,7 +59,8 @@
 	$rpm_debug="";
 	$rpm_logo="";
 	$rpm_db_id="";
-
+	$rpm_newcontent="";
+	
 	$varlang="";
 	$varw3cformat="";
 	$varformat="";
@@ -97,7 +98,9 @@
 	if (array_key_exists("debug", $_GET)) $rpm_debug=htmlspecialchars($_GET["debug"]);
 	if (array_key_exists("logo", $_GET)) $rpm_logo=htmlspecialchars($_GET["logo"]);
 	if (array_key_exists("db_id", $_GET)) $rpm_db_id=htmlspecialchars($_GET["db_id"]);
+	if (array_key_exists("newcontent", $_GET)) $rpm_newcontent=htmlspecialchars($_GET["newcontent"]);
 	
+	
 	if (array_key_exists('HTTP_REFERER', $_SERVER)) $roscms_referrer=htmlspecialchars($_SERVER['HTTP_REFERER']);
 	
 	if(isset($_COOKIE['roscms_usrset_lang'])) {