From dgoette@svn.reactos.org Wed Nov 19 13:16:18 2008 From: dgoette@svn.reactos.org To: ros-diffs@reactos.org Subject: [ros-diffs] [dgoette] 37453: * use proper html * include css & js files in instaed of in if possible * fix minor bugs Date: Wed, 19 Nov 2008 11:15:29 +0000 Message-ID: <20081119121615.70FD9989D9@mail.reactos.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7370842987073579350==" --===============7370842987073579350== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: dgoette Date: Wed Nov 19 05:15:29 2008 New Revision: 37453 URL: http://svn.reactos.org/svn/reactos?rev=3D37453&view=3Drev Log: * use proper html * include css & js files in instaed of in if possible * fix minor bugs Added: branches/danny-web/reactos.org/htdocs/roscms/css/cms_maintain.css (with= props) Modified: branches/danny-web/reactos.org/htdocs/roscms/js/cms_maintain.js.php branches/danny-web/reactos.org/htdocs/roscms/js/cms_navigation.js.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_CMS_Maintain.class.= php branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_User.class.php branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_Website.class.p= hp branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_Nopermission.class.= php branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_User.class.php branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_User_Activate.class= .php branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_User_Login.class.php branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_User_LostPassword.c= lass.php branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_User_Profile.class.= php branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_User_ProfileEdit.cl= ass.php branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_User_Register.class= .php Added: branches/danny-web/reactos.org/htdocs/roscms/css/cms_maintain.css URL: http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs= /roscms/css/cms_maintain.css?rev=3D37453&view=3Dauto =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/danny-web/reactos.org/htdocs/roscms/css/cms_maintain.css (added) +++ branches/danny-web/reactos.org/htdocs/roscms/css/cms_maintain.css [iso-88= 59-1] Wed Nov 19 05:15:29 2008 @@ -1,0 +1,1 @@ +TEXTAREA { width: 100%; } Propchange: branches/danny-web/reactos.org/htdocs/roscms/css/cms_maintain.css ------------------------------------------------------------------------------ svn:eol-style =3D native Modified: branches/danny-web/reactos.org/htdocs/roscms/js/cms_maintain.js.php URL: http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs= /roscms/js/cms_maintain.js.php?rev=3D37453&r1=3D37452&r2=3D37453&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/danny-web/reactos.org/htdocs/roscms/js/cms_maintain.js.php [iso-= 8859-1] (original) +++ branches/danny-web/reactos.org/htdocs/roscms/js/cms_maintain.js.php [iso-= 8859-1] Wed Nov 19 05:15:29 2008 @@ -1,3 +1,4 @@ + =20 function optimizedb() { makeRequest('?page=3Ddata_out&d_f=3Dmaintain&d_u=3Doptimize', 'optimize'= , 'maintainarea'); Modified: branches/danny-web/reactos.org/htdocs/roscms/js/cms_navigation.js.p= hp URL: http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs= /roscms/js/cms_navigation.js.php?rev=3D37453&r1=3D37452&r2=3D37453&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/danny-web/reactos.org/htdocs/roscms/js/cms_navigation.js.php [is= o-8859-1] (original) +++ branches/danny-web/reactos.org/htdocs/roscms/js/cms_navigation.js.php [is= o-8859-1] Wed Nov 19 05:15:29 2008 @@ -1,3 +1,6 @@ + + function pagerefresh() { exitmsg =3D ''; window.location.href =3D ''; 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= /roscms/lib/HTML.class.php?rev=3D37453&r1=3D37452&r2=3D37453&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- 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] Wed Nov 19 05:15:29 2008 @@ -27,12 +27,20 @@ =20 protected $page_start; // start time of page generation protected $title;=20 - protected $css;=20 + protected $css_files=3Darray();=20 + protected $js_files=3Darray();=20 =20 public function __construct( $page_title =3D '', $page_css =3D 'roscms' ) { + // get page title and register css files $this->title =3D $page_title; - $this->css =3D $page_css; + if ($page_css =3D=3D 'roscms'){ + $this->register_css('style_v3.css'); + } + else { + $this->register_css('style.css'); + $this->register_css('logon.css'); + } =20 // this page was generated in ... $roscms_gentime =3D explode(' ',microtime());=20 @@ -73,7 +81,7 @@ =20 // output header echo_strip( ' - + ReactOS '.(($this->title!=3D=3D'') ? '- '.$this->title : '').= ' @@ -83,15 +91,21 @@ + + '); =20 - if ($this->css =3D=3D 'roscms') { - echo ''; + // link css & js files (use register_* methods) + foreach($this->css_files as $file) { + if ($file['condition'] =3D=3D=3D false) { + echo ''; + } + else { + echo ''; + } } - else { - echo_strip(' - - '); + foreach($this->js_files as $file) { + echo ''; } =20 echo_strip(' @@ -99,17 +113,15 @@
=20 -

=20 +

=20 '.$r= oscms_langres['Home'].' | '.$r= oscms_langres['Info'].' | = '.$roscms_langres['Community'].' | '.$ros= cms_langres['Dev'].' | '.$r= oscms_langres['myReactOS'].' -

-
-
- - '); +

+ + '); } // end of member function header =20 =20 @@ -129,17 +141,37 @@ =20 // footer information echo_strip(' -
- +
'.$roscms_extern_brand.' '.$roscms_extern_version_detail.' - (c) 200= 5-2007 Klemens Friedl

Page generated in '.$page_time.' seconds
- '); } // end of member function footer =20 + + /** + * register a css file to be included in the header + * + * @access protected + */ + protected function register_css( $name, $condition =3D false ) + { + $this->css_files[] =3D array('name'=3D>$name, 'condition'=3D>$condition); + } // end of member function register_css + + + /** + * register a javascript file to be included in the header + * + * @access protected + */ + protected function register_js( $name ) + { + $this->js_files[] =3D $name; + } // end of member function register_css + } // end of HTML ?> 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= /roscms/lib/HTML_CMS.class.php?rev=3D37453&r1=3D37452&r2=3D37453&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- 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] Wed Nov 19 05:15:29 2008 @@ -42,22 +42,26 @@ header('location:?page=3Dnopermission'); } =20 + // register css & js files + $this->register_css('cms_navigation.css'); + $this->register_js('cms_navigation.js.php'); + parent::__construct( $page_title, 'roscms'); } =20 protected function build() { - parent::header(); + $this->header(); $this->navigation(); $this->body(); - parent::footer(); + $this->footer(); } =20 =20 /** * * - * @access public + * @access private */ private function navigation( ) { @@ -66,26 +70,6 @@ global $roscms_intern_login_check_username; global $roscms_intern_page_link; global $roscms_intern_webserver_pages, $roscms_intern_page_link; - - // get CSS - echo ' - '; - - // Javascript - echo ' - '; =20 // get selected navigation entry echo_strip(' @@ -101,7 +85,7 @@ Sign out
- +
- '); + + '); } =20 if ($roscms_security_level =3D=3D 3) { echo_strip(' - - - =20 - - '); + + + + + '); } =20 echo_strip(' - - - -
branch =3D=3D 'welcome') ? '2' : '1= ').'" onclick=3D"'."roscms_mainmenu('welcome')".'"> @@ -126,52 +110,52 @@ =20 if (ROSUser::isMemberOfGroup('transmaint','ros_admin','ros_sadmin')) { echo_strip(' - branch =3D=3D 'user') ? '2' : '1').= '" onclick=3D"'."roscms_mainmenu('user')".'"> -
-
-
-
-
-
User
-
  branch =3D=3D 'user') ? '2' : '1').'" onc= lick=3D"'."roscms_mainmenu('user')".'"> +
+
+
+
+
+
User
+
  branch =3D=3D 'maintain') ? '2' : '= 1').'" onclick=3D"'."roscms_mainmenu('maintain')".'"> -
-
-
-
-
-
Maintain
-
  branch =3D=3D 'stats') ? '2' : '1')= .'" onclick=3D"'."roscms_mainmenu('stats')".'"> -
-
-
-
-
-
Statistics
-
  branch =3D=3D 'maintain') ? '2' : '1').'"= onclick=3D"'."roscms_mainmenu('maintain')".'"> +
+
+
+
+
+
Maintain
+
  branch =3D=3D 'stats') ? '2' : '1').'" on= click=3D"'."roscms_mainmenu('stats')".'"> +
+
+
+
+
+
Statistics
+
   -
- 3D"loading -
-
- -
-
'); + +
+ 3D"loading +
+ + + + + +
+
'); =20 switch ($this->branch) { case 'welcome'; @@ -197,9 +181,20 @@ break; } echo_strip(' -
-
'); +
+
'); } // end of member function navigation + + + /** + * + * + * @access protected + */ + protected function footer() { + echo '
'; + parent::footer(); + } =20 } // end of HTML_CMS ?> Modified: branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_Maintain.= class.php URL: http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs= /roscms/lib/HTML_CMS_Maintain.class.php?rev=3D37453&r1=3D37452&r2=3D37453&vie= w=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_Maintain.class.= php [iso-8859-1] (original) +++ branches/danny-web/reactos.org/htdocs/roscms/lib/HTML_CMS_Maintain.class.= php [iso-8859-1] Wed Nov 19 05:15:29 2008 @@ -35,6 +35,10 @@ public function __construct( $page_title =3D '', $page_css =3D 'roscms' ) { $this->branch =3D 'maintain'; + + // register css & js files + $this->register_css('cms_maintain.css'); + $this->register_js('cms_maintain.js.php'); =20 parent::__construct( $page_title, $page_css); } @@ -89,8 +93,8 @@ =20

Generate All Pages

-
- +

'); =20 if (ROSUser::isMemberOfGroup('ros_sadmin')) { @@ -100,24 +104,24 @@

RosCMS Global Log

High Security Log - '.date('Y-W').'

-
+

Medium Security Log - '.date('Y-W').'

-
+

Low Security Log - '.date('Y-W').'

-
+



RosCMS Generator Log

High Security Log - '.date('Y-W').'

-
+

Medium Security Log - '.date('Y-W').'

-
+

Low Security Log - '.date('Y-W').'

-
+



@@ -130,26 +134,18 @@ echo_strip('

'.$language['lang_name'].'

High Security Log - '.date('Y-W').'

-
+
+
+