From 7d83add9f0169683859d484c6e62621d439a2868 Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Wed, 6 Jun 2012 23:30:57 +0000 Subject: [PATCH] Rework of admin-login page layout --- e107_admin/auth.php | 136 +++++++++++++++++++++++++-- e107_images/admin_images/lock_16.png | Bin 0 -> 1002 bytes e107_themes/jayya/admin_theme.php | 15 ++- 3 files changed, 143 insertions(+), 8 deletions(-) create mode 100644 e107_images/admin_images/lock_16.png diff --git a/e107_admin/auth.php b/e107_admin/auth.php index db9ca41ec..2f851468c 100644 --- a/e107_admin/auth.php +++ b/e107_admin/auth.php @@ -126,12 +126,84 @@ else } $e_sub_cat = 'logout'; - + if (ADMIN == FALSE) + { + define("e_IFRAME",TRUE); + } if (!defset('NO_HEADER')) require_once (e_ADMIN."header.php"); if (ADMIN == FALSE) { + // Needs help from Deso, Vesko and Stoev! :-) + + e107::css('inline'," + + body { text-align: left; font-size:15px; line-height:1.5em; font-weight:normal; font-family:Arial, Helvetica, sans-serif; background:#134B63 url(".e_IMAGE."logo_template_large.png) no-repeat 50% 10px; } + a { color:#F6931E; text-decoration:none; } + a:hover { color:silver; text-decoration:none; } + .bold { font-weight:bold; } + .field { text-align:center;padding:5px } + .field input { padding:5px; + border-width:1px; + border-style:solid; + border-color:#aaa #c8c8c8 #c8c8c8 #aaa; + background:#fff; + font:16px arial, helvetica, sans-serif; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + -moz-box-shadow: 1px 1px 2px #999 inset; + -webkit-box-shadow: 1px 1px 2px #999 inset; + box-shadow: 1px 1px 2px #999 inset; + } + + .field input:focus { + border:1px solid #F6931E; + } + + .field input:hover { + border:1px solid #F6931E; + } + + #login-admin { + margin-left:auto; + margin-right:auto; + margin-top:200px; + width:400px; + padding: 10px 20px 0 20px; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + -moz-box-shadow:5px 5px 20px #000000; + -webkit-box-shadow:5px 5px 20px #000000; + box-shadow:5px 5px 20px #000000; + background-color: #FEFEFE; + } + + #login-admin label { display: none; text-align: right } + + + .admin-submit { text-align: center; padding:20px; } + + .submit { font-size:14px; } + + + .placeholder { color: #bbb; } + + ::-webkit-input-placeholder { color: #bbb; } + + :-moz-placeholder { color: #bbb; } + + h1 { text-align: center } + + #username {background: url(".e_IMAGE."admin_images/admins_16.png) no-repeat scroll 7px 7px; padding-left:30px; } + + #userpass {background: url(".e_IMAGE."admin_images/lock_16.png) no-repeat scroll 7px 7px; padding-left:30px; } + + "); + + $obj = new auth; $obj->authform(); if (!defset('NO_HEADER')) @@ -148,7 +220,7 @@ class auth * Admin auth login * @return null */ - public function authform() //TODO Template + public function authform() // NOTE: this should NOT be a template of the admin-template, however themes may style it using css. { global $use_imagecode,$sec_img,$pref; @@ -156,7 +228,7 @@ class auth $incChap = (vartrue($pref['password_CHAP'], 0)) ? " onsubmit='hashLoginPassword(this)'" : ""; - $class = (e_QUERY == 'failed') ? "class='e-shake'" : ""; + /* $text = "
@@ -164,12 +236,12 @@ class auth ".(file_exists(THEME."images/password.png") ? "\n" : "\n")." ".ADLAN_89." - \n + \n ".ADLAN_90." - \n"; + \n"; $session = e107::getSession(); if ($session->is('challenge') && varset($pref['password_CHAP'], 0)) @@ -198,8 +270,58 @@ class auth
"; - // echo $text; - e107::getRender()->tablerender(ADLAN_92, $text); + e107::getRender()->tablerender(ADLAN_92, $text, 'admin-login'); + */ + + // Start Clean + // NOTE: this should NOT be a template of the admin-template, however themes may style it using css. + + $class = (e_QUERY == 'failed') ? "class='e-shake'" : ""; + + $text = "
+
+
+

".SITENAME." admin area

+ +
+ + +
Please enter your username or email
+
+ +
+ + +
Password is required
+
"; + + if ($use_imagecode) + { + $text .= " +
+ + + " + .$sec_img->r_image(). + " +
"; + } + + $text .= "
" + .$frm->admin_button('authsubmit',ADLAN_91); + + if (e107::getSession()->is('challenge') && varset($pref['password_CHAP'], 0)) + { + $text .= "\n\n"; + } + + $text .= "
+
+
+
"; + + e107::getRender()->tablerender(ADLAN_92, $text, 'admin-login'); + echo "
Powered by e107 Return to Website
"; } diff --git a/e107_images/admin_images/lock_16.png b/e107_images/admin_images/lock_16.png new file mode 100644 index 0000000000000000000000000000000000000000..6df8ea6d8aad7d90b6ac949190b191e801f02ecd GIT binary patch literal 1002 zcmVRCwBA z{Qv(ygRgH40}TB8_m6>>m*3aK#IQn5P1%5jg_ZH)!^hXopTFGu`SbS`%*;&xVQQBw z>1O~4AQljVjg1v705Xi1mp9MD!?W-Ie!{)Nn7p|I}ICs@_$@2ASZ(hIu>F8)% z%fiCu#Ky+X0Ky;u5I|r9elqeg{QA$qz%L-0%*nySdHU@64eVbYcgz2~`(EMSolopv zAI&~+rwm00 zK4VaOyPHAv%`OHxre_SF{;+R<`|&#izp%Lc-+xRDiocG74FCura2RN^T$2)KdBuPC zlZDu~_nZudOs9DjgkCGX`N7W%l2_w<^OgJWG2t(7RT&sRJ{2}$++!y6`~EYa)DwUJ zVgv=;)@su`+Ll_%KYz0@{AXfhVE+B#KQN#enK+mk7#aUC{QdTm;s39{{~0(07#aTl zW?*Lg$#D0|%O|c4CuIQw2Q#n+f4?$F z8S*nQeCA?g`1ukj2aH8NUZ9snWI%cW0tjrtzhB?~GJJT<%<$s}1H+%UznnVqo|N46?s}7#M!AG5q^3@fV~QAb?mPspl8a<`)bMzd;7P zV_;x@&+y^tM~44j85lsx=KaH;3=H3a@;{&kFtaoK|0@XA3J^e01Au~m-T)2w2Bbd# z6UG+?YjaKpd%=$kUw$(%*c$>(`45!)2TpCEli)({RqVW zKQg>K_nATbJ1~5Jj{9&OsEh{~@BBc_#{r~)iHHfTl>s1tATD4AVn(3T{{aK>KM;TY z${?b`#E{$00~BXu;N=G@W?^GsUfN zW(H0>K?Y7XXqpH5kl_a`4}lB-x_}wt0)PMl8^FW{)FA;3ly5*={zJ_K>4oPzAmE4R zR|W=db_PZcR