Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implements User class - closes #100

- Updated design (Javascripts)
- Added login and register page
  • Loading branch information...
commit f3d7514e1f5ba456776fd06fa488ead6f750a67d 1 parent af24e7c
Patrick Kleinschmidt NoxNebula authored
10 Draft/Database.sql
View
@@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net
--
-- Host: localhost
--- Erstellungszeit: 29. Feb 2012 um 18:56
+-- Erstellungszeit: 02. Mrz 2012 um 17:22
-- Server Version: 5.5.18
-- PHP-Version: 5.3.8
@@ -394,14 +394,6 @@ CREATE TABLE IF NOT EXISTS `session` (
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
---
--- Daten für Tabelle `session`
---
-
-INSERT INTO `session` (`ID`, `SessionValue`, `UserID`, `Username`, `IPAddress`, `UserAgent`, `LastActivityTime`, `Token`) VALUES
-('qrlp3vc2f4s02uicu6sqbmnn7aap87ok', 'Test|s:2:\\"Hi\\";', 0, '', '', '', 1326208529, ''),
-('u8k49vvkt6d208fdbphtkl27dr1bjp8j', 'Test|s:2:\\"Hi\\";', 0, '', '127.0.0.1', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.26 Safari/535.11', 1326208549, '');
-
-- --------------------------------------------------------
--
11 lib/core/Group.class.php
View
@@ -0,0 +1,11 @@
+<?php
+/**
+ * @author SilexBB
+ * @copyright 2011 - 2012 Silex Bulletin Board
+ * @license GPL version 3 or higher <http://www.gnu.org/licenses/gpl-3.0.html>
+ */
+
+class Group {
+ // Usergroup
+}
+?>
23 lib/core/SBB.class.php
View
@@ -7,7 +7,13 @@
class SBB {
// Objects
- private static $Database = null, $Config = null, $Template = null, $Style = null, $Menu = null, $Page = null;
+ private static $Database = null,
+ $Config = null,
+ $Template = null,
+ $Style = null,
+ $Menu = null,
+ $Page = null,
+ $User = null;
/**
* Initial
@@ -15,8 +21,11 @@ class SBB {
*/
public static final function Initial() {
// Initialize classes and objects
- self::$Style = Style::GetInstance();
Language::Initialize(isset($_GET['lang']) ? $_GET['lang'] : null);
+ self::$Style = Style::GetInstance();
+ self::$Template = new Template(DIR_ROOT.DIR_TPL, DIR_ROOT.self::Style()->Info('TPL'), SBB::Config('config.system.cache.dir'));
+ self::$User = new User();
+ PostListener::Check();
self::$Menu = Menu::GetInstance();
// Template assignment
@@ -38,6 +47,14 @@ class SBB {
// Display the template
self::Template()->Display('case.tpl');
}
+
+ /**
+ * Returns the user object
+ * @return User
+ */
+ public static final function User() {
+ return self::$User;
+ }
/**
* Returns the config value
@@ -65,8 +82,6 @@ class SBB {
* @return Template
*/
public static final function Template() {
- if(!self::$Template)
- self::$Template = new Template(DIR_ROOT.DIR_TPL, DIR_ROOT.self::Style()->Info('TPL'), SBB::Config('config.system.cache.dir'));
return self::$Template;
}
116 lib/core/User.class.php
View
@@ -0,0 +1,116 @@
+<?php
+/**
+ * @author SilexBB
+ * @copyright 2011 - 2012 Silex Bulletin Board
+ * @license GPL version 3 or higher <http://www.gnu.org/licenses/gpl-3.0.html>
+ */
+
+class User {
+ protected $Name, $ID, $LoggedIn;
+ protected $Info = array();
+ protected $Permission = array();
+
+ public function __construct() {
+ if(Session::Get('UserID')) { // User seems to be logged in
+ $Result = SBB::DB()->Table('users')->Select('*')->Where('`ID` = '.Session::Get('UserID'))->Execute();
+ if(!$Result) {
+ // Do Logout
+ Session::Remove('UserID');
+ Session::Destroy();
+ $this->__construct();
+ } else { // User is logged in
+ $UserInfo = SBB::DB()->FetchObjects();
+ $this->Name = $UserInfo->Username;
+ $this->ID = $UserInfo->ID;
+ $this->LoggedIn = true;
+ }
+ } else { // Not logged in
+ $this->Name = Language::Get('com.sbb.user.guest');
+ $this->ID = 0;
+ $this->LoggedIn = false;
+ }
+ SBB::Template()->Set(array('User' => array('ID' => $this->ID, 'Name' => $this->Name)));
+ }
+
+ /* User info */
+
+ /**
+ * Return the user name or set it
+ */
+ public function Name($Name = '') {
+ if(empty($Name))
+ return $this->Name;
+ // TODO: Set the name
+ }
+
+ /**
+ * Returns the user id of the current user
+ * @return int
+ */
+ public function ID() {
+ return $this->ID;
+ }
+
+ /**
+ * Get the user permission
+ * @param string $Node
+ * @return mixed
+ */
+ public function Permission($Node) {
+ return isset($this->Permission[$Node]) ? $this->Permission[$Node] : null;
+ }
+
+ /**
+ * Return if the user is logged in
+ * @return bool
+ */
+ public function LoggedIn() {
+ return $this->LoggedIn;
+ }
+
+ /**
+ * Return additional info
+ * @param string $Info
+ * @return mixed
+ */
+ public function Info($Info) {
+ return isset($this->Info[$Info]) ? $this->Info[$Info] : null;
+ }
+
+ /* User actions */
+
+ /**
+ * Login the current user
+ * @param string $Username
+ * @param string $Password
+ * @param bool $Stay
+ */
+ public function Login($Username, $Password, $Stay) {
+ $Username = EscapeString($Username);
+ $Password = EscapeString($Password);
+ if(SBB::DB()->Table('users')->Exists()->Where('`Username` = \''.$Username.'\'')->Execute()) {
+ echo 'Existiert';
+ } else {
+ Session::Set('LoginError', Language::Get('com.sbb.login.no_user')); // BUG: Sessionvalue is NULL?
+ header('location: ?page=Login');
+ }
+ }
+
+ public function Logout() {
+ // Logout the user
+ }
+
+ public function Register() {
+ // Register a new user
+ }
+
+ /* All user info */
+ public static function GetName($ID) {
+ // Get the user name
+ }
+
+ public static function GetID($Name) {
+ // Get the user ID
+ }
+}
+?>
7 lib/core/database/MySQLiWrapper.class.php
View
@@ -170,7 +170,12 @@ public function Execute($GetResult = false) {
$this->Database->multi_query($Query);
$this->Result = 'MULTIQUERY';
} else { // Singlequery
- $Query = SQL::Make($this->QueryList[0], $this, false); // Do not use prepared statements
+ $Query = '';
+ if(isset($this->QueryList[0]))
+ $Query = SQL::Make($this->QueryList[0], $this, false); // Do not use prepared statements
+ else
+ throw new DatabaseException('Error while parsing the query');
+
// Send
$this->Result = $this->Database->query($Query);
4 lib/core/session/Session.class.php
View
@@ -31,7 +31,7 @@ public static function Destroy() {
* Reads the content of a session, if the key is empty, false will return
* Alias for $_SESSION[$Key];
*/
- public static function Read($Key) {
+ public static function Get($Key) {
return(isset($_SESSION[$Key]) ? $_SESSION[$Key] : false);
}
@@ -41,7 +41,7 @@ public static function Read($Key) {
* It will return true if succeeded else false
*/
public static function Set($Key, $Value) {
- return (bool)($_SESSION[$Key] = $Value);
+ return $_SESSION[$Key] = $Value;
}
/**
2  lib/core/session/SessionDatabaseHandler.class.php
View
@@ -62,7 +62,7 @@ public function write($SessionID, $Data) {
'ID' => EscapeString($SessionID),
'SessionValue' => EscapeString($Data),
'UserID' => (int)(isset($_SESSION['UserID']) ? $_SESSION['UserID'] : 0),
- 'Username' => '', // TODO: read Username from User class?
+ 'Username' => SBB::User()->Name(),
'IPAddress' => (string)$_SERVER['REMOTE_ADDR'],
'UserAgent' => EscapeString($_SERVER['HTTP_USER_AGENT']),
'LastActivityTime' => time(),
27 lib/data/PostListener.class.php
View
@@ -0,0 +1,27 @@
+<?php
+/**
+ * @author SilexBB
+ * @copyright 2011 - 2012 Silex Bulletin Board
+ * @license GPL version 3 or higher <http://www.gnu.org/licenses/gpl-3.0.html>
+ */
+
+class PostListener {
+ // Listen to forms and trigger actions
+ public static function Check() {
+ // Any POSTs are send?
+ if(isset($_POST)) {
+ // Login
+ if(isset($_POST['Login']) && isset($_POST['Register'])) {
+ if($_POST['Register'] == 1) {
+ // Redirect to register page
+ header('location: ?page=Register');
+ } else if($_POST['Register'] == 0 && isset($_POST['Username']) && isset($_POST['Password'])) {
+ SBB::User()->Login($_POST['Username'], $_POST['Password'], !empty($_POST['StayLoggedIn']) ? true : false);
+ } else {
+ throw new SystemException('The loginform don\'t match');
+ }
+ }
+ }
+ }
+}
+?>
17 lib/data/Secure.class.php
View
@@ -0,0 +1,17 @@
+<?php
+/**
+ * @author SilexBB
+ * @copyright 2011 - 2012 Silex Bulletin Board
+ * @license GPL version 3 or higher <http://www.gnu.org/licenses/gpl-3.0.html>
+ */
+
+class Secure {
+ public static function EncryptPassword($Password, $Salt) {
+ return sha1($Salt.md5($Salt.sha1($Password.md5($Salt))));
+ }
+
+ public static function EncryptSalt() {
+ return sha1(md5(base64_encode(microtime())));
+ }
+}
+?>
0  lib/core/XML.class.php → lib/data/XML.class.php
View
File renamed without changes
1  lib/data/page/BoardPage.class.php
View
@@ -14,6 +14,7 @@ public function __construct() {
$this->Info['node'] = self::$Node;
$this->Info['title'] = Language::Get('com.sbb.page.forum');
Breadcrumb::Add(Language::Get('com.sbb.page.forum'), self::$Link);
+ // TODO: Subboards etc.
$this->Info['template'] = 'Board';
SBB::Template()->Set(array('Boards' => SBB::DB()->Table('board')->Select()->Execute()->FetchObjects()));
}
41 lib/data/page/LoginPage.class.php
View
@@ -0,0 +1,41 @@
+<?php
+/**
+ * @author SilexBB
+ * @copyright 2011 - 2012 Silex Bulletin Board
+ * @license GPL version 3 or higher <http://www.gnu.org/licenses/gpl-3.0.html>
+ */
+
+class LoginPage extends Page implements PageData {
+ protected static $Link = '?page=Login';
+ protected static $Node = 'page.login';
+ protected $Info = array();
+
+ public function __construct() {
+ $this->Info['node'] = self::$Node;
+ $this->Info['title'] = Language::Get('com.sbb.page.login');
+ $this->Info['template'] = 'Login';
+
+ if(Session::Get('LoginError')) {
+ // TODO: Errormessage (Messagebox)
+ // echo 'LoginError: '.Session::Get('LoginError');
+ Session::Remove('LoginError');
+ }
+ }
+
+ public function GetInfo($Info) {
+ return isset($this->Info[$Info]) ? $this->Info[$Info] : false;
+ }
+
+ protected function GetWholeInfo() {
+ return $this->Info;
+ }
+
+ public static function Link() {
+ return self::$Link;
+ }
+
+ public static function Node() {
+ return self::$Node;
+ }
+}
+?>
35 lib/data/page/RegisterPage.class.php
View
@@ -0,0 +1,35 @@
+<?php
+/**
+ * @author SilexBB
+ * @copyright 2011 - 2012 Silex Bulletin Board
+ * @license GPL version 3 or higher <http://www.gnu.org/licenses/gpl-3.0.html>
+ */
+
+class RegisterPage extends Page implements PageData {
+ protected static $Link = '?page=Register';
+ protected static $Node = 'page.register';
+ protected $Info = array();
+
+ public function __construct() {
+ $this->Info['node'] = self::$Node;
+ $this->Info['title'] = Language::Get('com.sbb.page.register');
+ $this->Info['template'] = 'Register';
+ }
+
+ public function GetInfo($Info) {
+ return isset($this->Info[$Info]) ? $this->Info[$Info] : false;
+ }
+
+ protected function GetWholeInfo() {
+ return $this->Info;
+ }
+
+ public static function Link() {
+ return self::$Link;
+ }
+
+ public static function Node() {
+ return self::$Node;
+ }
+}
+?>
20 lib/language/DE/Core.php
View
@@ -23,6 +23,8 @@
'com.sbb.page.home' => 'Startseite',
'com.sbb.page.forum' => 'Forum',
'com.sbb.page.userlist' => 'Benutzerliste',
+'com.sbb.page.login' => 'Anmeldung',
+'com.sbb.page.register' => 'Registrierung',
'com.sbb.time.progress' => 'Fortschritt des Jahres ('.round(Time::YearProcess() * 100, 2).'%)',
'com.sbb.time.dayprogress' => 'Fortschritt des Tages ('.round(Time::DayProcess() * 100, 2).'%)',
@@ -41,17 +43,19 @@
'com.sbb.register.email_exist' => 'Diese E-Mail Adresse existiert bereits!',
'com.sbb.register.success' => 'Du hast dich erfolgreich registriert!',
-'com.sbb.login.login' => 'Einloggen',
-'com.sbb.login.bar_handle' => 'Einloggen / Registrieren',
-'com.sbb.login.username' => 'Benutzername',
-'com.sbb.login.password' => 'Passwort',
-'com.sbb.login.stay' => 'Eingeloggt bleiben',
-'com.sbb.login.wrong_password' => 'Das Passwort ist falsch!',
-'com.sbb.login.notexist_username' => 'Dieser Benutzer existiert nicht!',
-'com.sbb.login.success' => 'Du hast dich erfolgreich angemeldet!',
+'com.sbb.login.login' => 'Einloggen',
+'com.sbb.login.bar_handle' => 'Einloggen / Registrieren',
+'com.sbb.login.username' => 'Benutzername',
+'com.sbb.login.password' => 'Passwort',
+'com.sbb.login.stay' => 'Eingeloggt bleiben',
+'com.sbb.login.wrong_password' => 'Das Passwort ist falsch!',
+'com.sbb.login.no_user' => 'Dieser Benutzer existiert nicht!',
+'com.sbb.login.success' => 'Du hast dich erfolgreich angemeldet!',
'com.sbb.form.submit' => 'Absenden',
+'com.sbb.user.guest' => 'Gast',
+
'com.sbb.logout.logout' => 'Ausloggen',
'com.sbb.logout.logged_out' => 'Du wurdest erfolgreich ausgeloggt.',
'com.sbb.logout.main_menu' => 'Hauptmenü',
20 lib/language/EN/Core.php
View
@@ -23,6 +23,8 @@
'com.sbb.page.home' => 'Home',
'com.sbb.page.forum' => 'Forum',
'com.sbb.page.userlist' => 'Memberlist',
+'com.sbb.page.login' => 'Login',
+'com.sbb.page.register' => 'Sign up',
'com.sbb.time.progress' => 'Progress of the year ('.round(Time::YearProcess() * 100, 2).'%)',
'com.sbb.time.dayprogress' => 'Progress of the day ('.round(Time::DayProcess() * 100, 2).'%)',
@@ -41,17 +43,19 @@
'com.sbb.register.email_exist' => 'This e-mail adress already exists!',
'com.sbb.register.success' => 'You are successfully registered!',
-'com.sbb.login.login' => 'Log in',
-'com.sbb.login.stay' => 'Stay logged in',
-'com.sbb.login.bar_handle' => 'Log in / Sign up',
-'com.sbb.login.username' => 'Username',
-'com.sbb.login.password' => 'Password',
-'com.sbb.login.wrong_password' => 'The password is wrong!',
-'com.sbb.login.notexist_username' => 'This user doesn\'t exist!',
-'com.sbb.login.success' => 'You are successfully logged in!',
+'com.sbb.login.login' => 'Log in',
+'com.sbb.login.stay' => 'Stay logged in',
+'com.sbb.login.bar_handle' => 'Log in / Sign up',
+'com.sbb.login.username' => 'Username',
+'com.sbb.login.password' => 'Password',
+'com.sbb.login.wrong_password' => 'The password is wrong!',
+'com.sbb.login.no_user' => 'This user doesn\'t exist!',
+'com.sbb.login.success' => 'You are successfully logged in!',
'com.sbb.form.submit' => 'Submit',
+'com.sbb.user.guest' => 'Gast',
+
'com.sbb.logout.logout' => 'Logout',
'com.sbb.logout.logged_out' => 'You are logged out now.',
'com.sbb.logout.main_menu' => 'Main Menu',
20 lib/language/NL/Core.php
View
@@ -23,6 +23,8 @@
'com.sbb.page.home' => 'Startpagina',
'com.sbb.page.forum' => 'Forum',
'com.sbb.page.userlist' => 'Gebruikerslist',
+'com.sbb.page.login' => 'Login', // ?
+'com.sbb.page.register' => 'Sign up', // ?
'com.sbb.time.progress' => 'Progress of the year ('.round(Time::YearProcess() * 100, 2).'%)', // ?
'com.sbb.time.dayprogress' => 'Progress of the day ('.round(Time::DayProcess() * 100, 2).'%)', // ?
@@ -41,17 +43,19 @@
'com.sbb.register.email_exist' => 'Deze e-mailadres bestaat al!',
'com.sbb.register.success' => 'Jij hebt jouw met succes geregistreerd',
-'com.sbb.login.login' => 'Inloggen',
-'com.sbb.login.bar_handle' => 'Inloggen / Registreren',
-'com.sbb.login.username' => 'Gebruikersnaam',
-'com.sbb.login.password' => 'Wachtwoord',
-'com.sbb.login.stay' => 'Ingeloggt blijven',
-'com.sbb.login.wrong_password' => 'Het wachtwoord ist niet juist!',
-'com.sbb.login.notexist_username' => 'Deze gebruiker bestaat niet!',
-'com.sbb.login.success' => 'Jij hebt jouw met succes aangemeld!',
+'com.sbb.login.login' => 'Inloggen',
+'com.sbb.login.bar_handle' => 'Inloggen / Registreren',
+'com.sbb.login.username' => 'Gebruikersnaam',
+'com.sbb.login.password' => 'Wachtwoord',
+'com.sbb.login.stay' => 'Ingeloggt blijven',
+'com.sbb.login.wrong_password' => 'Het wachtwoord ist niet juist!',
+'com.sbb.login.no_user' => 'Deze gebruiker bestaat niet!',
+'com.sbb.login.success' => 'Jij hebt jouw met succes aangemeld!',
'com.sbb.form.submit' => 'Afzenden',
+'com.sbb.user.guest' => 'Gast', // ?
+
'com.sbb.logout.logout' => 'Uitloggen',
'com.sbb.logout.logged_out' => 'Jij werd met success uitgeloggt.',
'com.sbb.logout.main_menu' => 'Hoofdmenu,',
20 lib/language/NL_FORMAL/Core.php
View
@@ -23,6 +23,8 @@
'com.sbb.page.home' => 'Startpagina',
'com.sbb.page.forum' => 'Forum',
'com.sbb.page.userlist' => 'Gebruikerslist',
+'com.sbb.page.login' => 'Login', // ?
+'com.sbb.page.register' => 'Sign up', // ?
'com.sbb.time.progress' => 'Progress of the year ('.round(Time::YearProcess() * 100, 2).'%)', // ?
'com.sbb.time.dayprogress' => 'Progress of the day ('.round(Time::DayProcess() * 100, 2).'%)', // ?
@@ -41,17 +43,19 @@
'com.sbb.register.email_exist' => 'Deze e-mailadres bestaat al!',
'com.sbb.register.success' => 'U hebt uw met succes geregistreerd',
-'com.sbb.login.login' => 'Inloggen',
-'com.sbb.login.bar_handle' => 'Inloggen / Registreren',
-'com.sbb.login.username' => 'Gebruikersnaam',
-'com.sbb.login.password' => 'Wachtwoord',
-'com.sbb.login.stay' => 'Ingeloggt blijven',
-'com.sbb.login.wrong_password' => 'Het wachtwoord ist niet juist!',
-'com.sbb.login.notexist_username' => 'Deze gebruiker bestaat niet!',
-'com.sbb.login.success' => 'U hebt uw met succes aangemeld!',
+'com.sbb.login.login' => 'Inloggen',
+'com.sbb.login.bar_handle' => 'Inloggen / Registreren',
+'com.sbb.login.username' => 'Gebruikersnaam',
+'com.sbb.login.password' => 'Wachtwoord',
+'com.sbb.login.stay' => 'Ingeloggt blijven',
+'com.sbb.login.wrong_password' => 'Het wachtwoord ist niet juist!',
+'com.sbb.login.no_user' => 'Deze gebruiker bestaat niet!',
+'com.sbb.login.success' => 'U hebt uw met succes aangemeld!',
'com.sbb.form.submit' => 'Afzenden',
+'com.sbb.user.guest' => 'Gast', // ?
+
'com.sbb.logout.logout' => 'Uitloggen',
'com.sbb.logout.logged_out' => 'U werd met success uitgeloggt.',
'com.sbb.logout.main_menu' => 'Hoofdmenu,',
11 styles/Standard/header.css
View
@@ -181,12 +181,12 @@ section.UserBar {
.Wrap input[type=password] {
background-image: url(icons/w_16_key.png);
}
- .Wrap input[type=text]:hover, .Wrap input[type=password]:hover {
+ /*.Wrap input[type=text]:hover, .Wrap input[type=password]:hover {
border-color: #558fa4;
}
.Wrap input[type=text]:focus, .Wrap input[type=password]:focus {
border-color: #1d3139;
- }
+ }*/
.Wrap input[type=submit] {
background: transparent url(icons/w_16_off.png) no-repeat 4px center;
@@ -198,12 +198,12 @@ section.UserBar {
text-shadow: 0 0 4px #000000;
border-radius: 4px;
}
- .Wrap input[type=submit]:hover {
+ /*.Wrap input[type=submit]:hover {
border-color: #558fa4;
}
.Wrap input[type=submit]:active {
border-color: #1d3139;
- }
+ }*/
header {
background: #3c4a58 url(images/header.png) repeat-x center bottom;
@@ -319,11 +319,12 @@ nav.Menu {
border: 2px solid #ffffff;
width: 200px;
height: 24px;
- background: transparent;
+ background: rgba(0,0,0,0);
overflow: hidden;
margin: 4px 0;
border-radius: 5px;
box-shadow: inset 0 2px 3px rgba(0,0,0,0.3);
+ opacity: 0.5;
}
#SearchForm #Search {
color: #ffffff;
74 styles/Standard/javascripts/animations.js
View
@@ -0,0 +1,74 @@
+$(document).ready(function() {
+// Login Form
+ var Toogle = 0;
+
+ $("#LoginForm").css("display", "block");
+ $("#LoginForm").slideToggle(0);
+
+ $("#LoginBarToogle").click(function() {
+
+ if(Toogle == 0) {
+ $("#LoginForm").slideToggle("slow", function(){
+ $(this).fadeTo(500, 1);
+ });
+ } else {
+ $("#LoginForm").fadeTo(200, 0, null, function(){
+ $(this).slideToggle("slow");
+ });
+ }
+
+ Toogle ^= 1;
+ });
+
+ // Inputs
+ var LoginFocus1 = false;
+ var LoginFocus2 = false;
+ $(".Wrap input[type=text]").focusin(function() {
+ $(this).stop().animate({'border-color': '#1d3139'}, 500);
+ LoginFocus1 = true;
+ }).focusout(function() {
+ $(this).stop().animate({'border-color': '#ffffff'}, 500);
+ LoginFocus1 = false;
+ }).hover(function() {
+ if(!LoginFocus1) $(this).stop().animate({'border-color': '#558fa4'}, 500);
+ }, function() {
+ if(!LoginFocus1) $(this).stop().animate({'border-color': '#ffffff'}, 500);
+ });
+ $(".Wrap input[type=password]").focusin(function() {
+ $(this).stop().animate({'border-color': '#1d3139'}, 500);
+ LoginFocus2 = true;
+ }).focusout(function() {
+ $(this).stop().animate({'border-color': '#ffffff'}, 500);
+ LoginFocus2 = false;
+ }).hover(function() {
+ if(!LoginFocus2) $(this).stop().animate({'border-color': '#558fa4'}, 500);
+ }, function() {
+ if(!LoginFocus2) $(this).stop().animate({'border-color': '#ffffff'}, 500);
+ });
+ // Submit
+ $(".Wrap input[type=submit]").hover(function() {
+ $(this).stop().animate({'border-color': '#558fa4'}, 300);
+ }, function() {
+ $(this).stop().animate({'border-color': '#ffffff'}, 300);
+ }).mousedown(function(){
+ $(this).stop().animate({'border-color': '#1d3139'}, 300);
+ });
+
+// Search Form
+ var SearchFocus = false;
+ $("#Search").focusin(function() {
+ $("#SearchForm").stop().animate({'border-color': '#ffffff', 'background-color': 'rgba(0,0,0,0.2)'}, 500)
+ .css({'box-shadow': 'inset 0 2px 3px rgba(0,0,0,0.3), 0 0 6px #000000'});
+ SearchFocus = true;
+ }).focusout(function() {
+ $("#SearchForm").stop().animate({'border-color': '#ffffff', 'background-color': 'rgba(0,0,0,0)', 'opacity': '0.5'}, 500)
+ .css({'box-shadow': 'inset 0 2px 3px rgba(0,0,0,0.3)'});
+ SearchFocus = false;
+ }); $("#SearchForm").hover(function() {
+ if(!SearchFocus)
+ $(this).stop().animate({'border-color': '#97d8f0', 'opacity': '1'}, 500);
+ }, function() {
+ if(!SearchFocus)
+ $(this).stop().animate({'border-color': '#ffffff', 'opacity': '0.5'}, 500);
+ });
+});
63 styles/Standard/javascripts/interactions.js
View
@@ -1,63 +0,0 @@
-$(document).ready(function() {
- // Login Form
- var Toogle = 0;
-
- $("#LoginForm").css("display", "block");
- $("#LoginForm").slideToggle(0);
-
- $("#LoginBarToogle").click(function() {
-
- if(Toogle == 0) {
- $("#LoginForm").slideToggle("slow", function(){
- $(this).fadeTo(500, 1);
- });
- } else {
- $("#LoginForm").fadeTo(200, 0, null, function(){
- $(this).slideToggle("slow");
- });
- }
-
- Toogle ^= 1;
- });
-
- /*var Focus = 0;
- $(".Wrap input[type=text], .Wrap input[type=password]").focusin(function(e) {
- $(this).stop().animate({boxShadow: '0 0 10px #59caf7'}, 200);
- Focus = 1;
- });
- $(".Wrap input[type=text], .Wrap input[type=password]").focusout(function(e) {
- $(this).stop().animate({boxShadow: 'none'});
- Focus = 0;
- });
- $(".Wrap input[type=text], .Wrap input[type=password]").hover(function(e) {
- if(!Focus) {
- $(this).stop().animate({boxShadow: '0 0 6px #59caf7'}, 200);
- }
- }, function(e) {
- if(!Focus) {
- $(this).stop().animate({boxShadow: 'none'}, 500);
- }
- });*/
-
- // Search Form
- var Focus = false;
- $("#Search").focusin(function() {
- $("#SearchForm").stop().animate({'border-color': '#ffffff', 'background-color': 'rgba(0,0,0,0.2)'}, 500)
- .css({'box-shadow': 'inset 0 2px 3px rgba(0,0,0,0.3), 0 0 6px #000000'});
- Focus = true;
- });
-
- $("#Search").focusout(function() {
- $("#SearchForm").stop().animate({'border-color': '#ffffff', 'background-color': 'rgba(0,0,0,0)'}, 500)
- .css({'box-shadow': 'inset 0 2px 3px rgba(0,0,0,0.3)'});
- Focus = false;
- });
-
- $('#Search').hover(function() {
- if(!Focus)
- $("#SearchForm").stop().animate({'border-color': '#97d8f0'});
- }, function() {
- if(!Focus)
- $("#SearchForm").stop().animate({'border-color': '#ffffff'});
- });
-});
4 templates/pages/Board.tpl
View
@@ -3,7 +3,7 @@
{% if Board.ParentID == 0 %}
<li class="BoardCategory">
<div class="BoardHead">
- <p><a class="BoardTitle" href="./index.php?page=Board&amp;BoardID={{ Board.ID }}">{{ Board.Title }}</a></p>
+ <p><a class="BoardTitle" href="?page=Board&amp;BoardID={{ Board.ID }}">{{ Board.Title }}</a></p>
<p>{{ Board.Description }}</p>
</div>
<ul class="BoardForum">
@@ -13,7 +13,7 @@
<div class="ListLeft">
<div class="ListIcon"><img src="styles/Standard/images/ListStyle.png" width="32" height="32"></div>
<div class="ListTextLeft">
- <p><a class="bla" href="./index.php?page=Topiclist&amp;BoardID={{ Board2.ID }}">{{ Board2.Title }}</a></p>
+ <p><a class="bla" href="?page=Board&amp;BoardID={{ Board2.ID }}">{{ Board2.Title }}</a></p>
<p>Beschreibung</p>
</div>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.