summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/Security/Principal/IIdentity.php24
-rw-r--r--framework/Web/Security/Principal/IPrincipal.php19
-rw-r--r--framework/Web/Security/Principal/TGenericIdentity.php48
-rw-r--r--framework/Web/Security/Principal/TGenericPrincipal.php34
-rw-r--r--framework/Web/Security/TAnonymousIdentificationModule.php7
-rw-r--r--framework/Web/Security/TAuthorizationStoreRoleProvider.php68
-rw-r--r--framework/Web/Security/TCookieProtection.php27
-rw-r--r--framework/Web/Security/TDefaultAuthenticationModule.php15
-rw-r--r--framework/Web/Security/TFormsAuthentication.php176
-rw-r--r--framework/Web/Security/TFormsAuthenticationModule.php126
-rw-r--r--framework/Web/Security/TFormsAuthenticationTicket.php124
-rw-r--r--framework/Web/Security/TFormsIdentity.php71
-rw-r--r--framework/Web/Security/TMembership.php208
-rw-r--r--framework/Web/Security/TMembershipCreateStatus.php39
-rw-r--r--framework/Web/Security/TMembershipCreateUserException.php17
-rw-r--r--framework/Web/Security/TMembershipPasswordException.php17
-rw-r--r--framework/Web/Security/TMembershipPasswordFormat.php24
-rw-r--r--framework/Web/Security/TMembershipProvider.php178
-rw-r--r--framework/Web/Security/TMembershipUser.php165
-rw-r--r--framework/Web/Security/TProviderException.php6
-rw-r--r--framework/Web/Security/TRoleManagerModule.php15
-rw-r--r--framework/Web/Security/TRolePrincipal.php6
-rw-r--r--framework/Web/Security/TRoleProvider.php86
-rw-r--r--framework/Web/Security/TRoles.php237
-rw-r--r--framework/Web/Security/TSqlMembershipProvider.php83
-rw-r--r--framework/Web/Security/TSqlRoleProvider.php70
-rw-r--r--framework/Web/Security/TUrlAuthorizationModule.php6
-rw-r--r--framework/Web/UI/WebControls/TLogin.php1575
-rw-r--r--framework/Web/UI/WebControls/TLoginName.php15
-rw-r--r--framework/Web/UI/WebControls/TLoginStatus.php15
-rw-r--r--framework/Web/UI/WebControls/TLoginUtil.php183
-rw-r--r--framework/Web/UI/WebControls/TLoginView.php15
-rw-r--r--framework/Web/UI/WebControls/TOrientation.php19
33 files changed, 0 insertions, 3718 deletions
diff --git a/framework/Web/Security/Principal/IIdentity.php b/framework/Web/Security/Principal/IIdentity.php
deleted file mode 100644
index 89bc0f70..00000000
--- a/framework/Web/Security/Principal/IIdentity.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-/**
- * IIdentity interface.
- * Defines the basic functionality of a principal object.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: IIdentity.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security.Principal
- * @since 3.1
- */
-interface IIdentity
-{
- private $_authenticationType;
- private $_isAuthenticated;
- private $_name;
-
- public function getAuthenticationType();
- public function setAuthenticationType($value);
- public function getIsAuthenticated();
- public function setIsAuthenticated($value);
- public function getName();
- public function setName($value);
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/Principal/IPrincipal.php b/framework/Web/Security/Principal/IPrincipal.php
deleted file mode 100644
index 9503387a..00000000
--- a/framework/Web/Security/Principal/IPrincipal.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * IPrincipal interface.
- * Defines the basic functionality of an identity object.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: IIdentity.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security.Principal
- * @since 3.1
- */
-interface IPrincipal
-{
- private $_identity;
-
- public function getIdentity();
- public function setIdentity($value);
- public function isInRole($role);
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/Principal/TGenericIdentity.php b/framework/Web/Security/Principal/TGenericIdentity.php
deleted file mode 100644
index 037ebc42..00000000
--- a/framework/Web/Security/Principal/TGenericIdentity.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/**
- * TGenericIdentity class.
- * Represents a generic user.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TGenericIdentity.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security.Principal
- * @since 3.1
- */
-Prado::using('System.Web.Security.Principal.IIdentity');
-class TGenericIdentity implements IIdentity
-{
- private $_authenticationType;
- private $_isAuthenticated;
- private $_name;
-
- public function getAuthenticationType()
- {
- return $this->_authenticationType;
- }
- public function setAuthenticationType($value)
- {
- $this->_authenticationType = TPropertyValue::ensureString($value);
- }
- public function getIsAuthenticated()
- {
- return $this->_isAuthenticated;
- }
- public function setIsAuthenticated($value)
- {
- $this->_isAuthenticated = TPropertyValue::ensureBoolean($value);
- }
- public function getName()
- {
- return $this->_name;
- }
- public function setName($value)
- {
- $this->_name = TPropertyValue::ensureString($value);
- }
-
- public function __construct($name, $type=null)
- {
-
- }
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/Principal/TGenericPrincipal.php b/framework/Web/Security/Principal/TGenericPrincipal.php
deleted file mode 100644
index 8e07388e..00000000
--- a/framework/Web/Security/Principal/TGenericPrincipal.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-/**
- * TGenericPrincipal class.
- * Represents a generic principal.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TGenericPrincipal.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security.Principal
- * @since 3.1
- */
-Prado::using('System.Web.Security.Principal.IPrincipal');
-class TGenericPrincipal implements IPrincipal
-{
- private $_identity;
-
- public function getIdentity()
- {
- return $this->_identity;
- }
- public function setIdentity($value)
- {
- $this->_identity = TPropertyValue::ensureString($value);
- }
-
- public function __construct($name, $type=null)
- {
-
- }
- public function isInRole($role)
- {
-
- }
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TAnonymousIdentificationModule.php b/framework/Web/Security/TAnonymousIdentificationModule.php
deleted file mode 100644
index 1735edf1..00000000
--- a/framework/Web/Security/TAnonymousIdentificationModule.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-Prado::using('System.Web.IHttpModule');
-final class TAnonymousIdentificationModule implements IHttpModule
-{
-
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TAuthorizationStoreRoleProvider.php b/framework/Web/Security/TAuthorizationStoreRoleProvider.php
deleted file mode 100644
index d6919ae6..00000000
--- a/framework/Web/Security/TAuthorizationStoreRoleProvider.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-/**
- * TAuthorizationStoreRoleProvider class.
- * Manages storage of role-membership information for an PRADO application in an authorization-manager policy store, in an XML file.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TAuthorizationStoreRoleProvider.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-Prado::using('System.Web.Security.TRoleProvider');
-class TAuthorizationStoreRoleProvider extends TRoleProvider
-{
- private $_ApplicationName;
- public function __construct()
- {
-
- }
- public function getApplicationName()
- {
- return $this->_ApplicationName;
- }
- public function setApplicationName($value)
- {
- $this->_ApplicationName = TPropertyValue::ensureString($value);
- }
- public function AddUsersToRoles($usernames,$roleNames)
- {
-
- }
- public function CreateRole($roleName)
- {
-
- }
- public function DeleteRole($roleName)
- {
-
- }
- public function FineUsersInRole($roleName,$usernameToMatch)
- {
-
- }
- public function GetAllRoles()
- {
-
- }
- public function GetRolesForUser($username)
- {
-
- }
- public function GetUsersIsRole($username,$roleName)
- {
-
- }
- public function IsUserIsRole($username,$roleName)
- {
-
- }
- public function RemoveUsersFromRoles($usernames,$roleNames)
- {
-
- }
- public function RoleExists($roleName)
- {
-
- }
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TCookieProtection.php b/framework/Web/Security/TCookieProtection.php
deleted file mode 100644
index 2a757898..00000000
--- a/framework/Web/Security/TCookieProtection.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-/**
- * TCookieProtection class.
- * Describes how information in a cookie is protected.
- *
- * All Use both Validation and Encryption to protect the information
- * in the cookie.
- * Encryption Encrypt the information in the cookie.
- * None Do not protect information in the cookie. Information in the
- * cookie is stored in clear text and not validated when sent back
- * to the server.
- * Validation Ensure that the information in the cookie has not been altered
- * before being sent back to the server.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TCookieProtection.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-class TCookieProtection extends TEnumerable
-{
- const All='All';
- const Encryption='Encryption';
- const None='None';
- const Validation='Validation';
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TDefaultAuthenticationModule.php b/framework/Web/Security/TDefaultAuthenticationModule.php
deleted file mode 100644
index 03d6e758..00000000
--- a/framework/Web/Security/TDefaultAuthenticationModule.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * TDefaultAuthenticationModule class.
- * Ensures that an authentication object is present in the context. This class cannot be inherited.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TDefaultAuthenticationModule.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-final class TDefaultAuthenticationModule extends TModule
-{
-
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TFormsAuthentication.php b/framework/Web/Security/TFormsAuthentication.php
deleted file mode 100644
index 970303a7..00000000
--- a/framework/Web/Security/TFormsAuthentication.php
+++ /dev/null
@@ -1,176 +0,0 @@
-<?php
-/**
- * TFormsAuthentication class.
- * Manages forms-authentication services for Web applications. This class cannot be inherited.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TFormsAuthentication.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-final class TFormsAuthentication
-{
- private static $_cookieDomain;
- private static $_cookieMode;
- private static $_cookiesSupported;
- private static $_defaultUrl;
- private static $_enableCrossAppRedirects;
- private static $_formsCookieName;
- private static $_formsCookiePath;
- private static $_loginUrl;
- private static $_requireSSL;
- private static $_slidingExpiration;
-
- public static function getCookiePath()
- {
- return self::$_cookieDomain;
- }
- public static function setCookiePath($value)
- {
- self::$_cookieDomain = TPropertyValue::ensureString($value);
- }
-
- public function __construct()
- {
-
- }
-
- public static function Authenticate($name, $password)
- {
-
- }
- public static function Decrypt($encryptedTicket)
- {
-
- }
- public static function Encrypt($ticket, $hexEncodedTicket=null)
- {
-
- }
- public static function GetAuthCookie( $userName, $createPersistentCookie, $strCookiePath=null, $hexEncodedTicket=null)
- {
-
- }
- public static function GetLoginPage($extraQuery,$reuseReturnUrl=null)
- {
-
- }
- public static function GetRedirectUrl( $userName, $createPersistentCookie)
- {
-
- }
- public static function GetReturnUrl($useDefaultIfAbsent)
- {
-
- }
- public static function HashPasswordForStoringInConfigFile($password, $passwordFormat)
- {
-
- }
- public static function Initialize()
- {
-
- }
- private static function ernalAuthenticate( $name, $password)
- {
-
- }
- private static function IsPathWithinAppRoot($context, $path)
- {
-
- }
- private static function MakeTicketoBinaryBlob($ticket)
- {
-
- }
- public static function RedirectFromLoginPage($userName, $createPersistentCookie, $strCookiePath=null)
- {
-
- }
- public static function RedirectToLoginPage($extraQuery=null)
- {
-
- }
- private static function RemoveQSVar($ref, $strUrl, $posQ, $token, $sep, $lenAtStartToLeave)
- {
-
- }
- public static function RemoveQueryVariableFromUrl( $strUrl, $QSVar)
- {
-
- }
- public static function RenewTicketIfOld($tOld)
- {
-
- }
- public static function SetAuthCookie( $userName, $createPersistentCookie, $strCookiePath=null)
- {
-
- }
- public static function SignOut()
- {
-
- }
-
- // Properties
- public static function getCookieDomain()
- {
- return self::$_cookieDomain;
- }
- public static function getCookieMode()
- {
- return self::$_cookieMode;
- }
- public static function getCookiesSupported()
- {
- return self::$_cookiesSupported;
- }
- public static function getDefaultUrl()
- {
- return self::$_defaultUrl;
- }
- public static function getEnableCrossAppRedirects()
- {
- return self::$_enableCrossAppRedirects;
- }
- public static function getFormsCookieName()
- {
- return self::$_formsCookieName;
- }
- public static function getFormsCookiePath()
- {
- return self::$_formsCookiePath;
- }
- public static function getLoginUrl()
- {
- return self::$_loginUrl;
- }
- public static function getRequireSSL()
- {
- return self::$_requireSSL;
- }
- public static function getSlidingExpiration()
- {
- return self::$_slidingExpiration;
- }
-
- // Fields
- // private static $_CookieDomain;
- // private static $_CookieMode;
- // private static $_DefaultUrl;
- // private static $_EnableCrossAppRedirects;
- // private static $_FormsCookiePath;
- // private static $_FormsName;
- // private static $_Initialized;
- // private static $_lockObject;
- // private static $_LoginUrl;
- // private static $_Protection;
- // private static $_RequireSSL;
- // private static $_SlidingExpiration;
- // private static $_Timeout;
- // private const CONFIG_DEFAULT_COOKIE = ".ASPXAUTH";
- // private const MAC_LENGTH = 20;
- // private const MAX_TICKET_LENGTH = 0x1000;
- // ernal const RETURN_URL = "ReturnUrl";
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TFormsAuthenticationModule.php b/framework/Web/Security/TFormsAuthenticationModule.php
deleted file mode 100644
index df0d5300..00000000
--- a/framework/Web/Security/TFormsAuthenticationModule.php
+++ /dev/null
@@ -1,126 +0,0 @@
-<?php
-/**
- * TFormsAuthenticationModule class.
- * Sets the identity of the user for an PRADO application when forms authentication is enabled.
- * This class cannot be inherited.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TFormsAuthenticationModule.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-final class TFormsAuthenticationModule extends TModule
-{
- /**
- * @var boolean if the module has been initialized
- */
- private $_initialized=false;
-
- private static $_fAuthChecked=false;
- private static $_fAuthRequired=false;
- private $_fFormsInit;
- private $_formsName;
- private $_loginUrl;
- const CONFIG_DEFAULT_COOKIE = ".ASPXAUTH";
- const CONFIG_DEFAULT_LOGINURL = "login.aspx";
-
- //Is this the best way to do it?? i dont see how the forms module knows about the provider
- private $_defaultProvider;
-
- public function getDefaultProvider()
- {
- return $this->_defaultProvider;
- }
- public function setDefaultProvider($value)
- {
- $this->_defaultProvider = TPropertyValue::ensureString($value);
- }
-
- public function __construct()
- {
-
- }
- /**
- * Initializes this module.
- * This method is required by the IModule interface.
- * @param TXmlElement configuration for this module, can be null
- * @throws TConfigurationException if user manager does not exist or is not IUserManager
- */
- public function init($config)
- {
- $this->getApplication()->attachEventHandler('OnAuthentication',array($this,'doAuthentication'));
- $this->getApplication()->attachEventHandler('OnEndRequest',array($this,'leave'));
- $this->getApplication()->attachEventHandler('OnAuthorization',array($this,'doAuthorization'));
- $this->_initialized=true;
- }
-
- private static function extractTicketFromCookie($context, $name)
- {
-
- }
- /**
- * Performs authentication.
- * This is the event handler attached to application's Authentication event.
- * Do not call this method directly.
- * @param mixed sender of the Authentication event
- * @param mixed event parameter
- */
- public function doAuthentication($sender,$param)
- {
- Prado::using('System.Util.TVarDumper');
-// echo TVarDumper::dump(__METHOD__,10,true);
- }
- /**
- * Performs login redirect if authorization fails.
- * This is the event handler attached to application's EndRequest event.
- * Do not call this method directly.
- * @param mixed sender of the event
- * @param mixed event parameter
- */
- public function leave($sender,$param)
- {
- Prado::using('System.Util.TVarDumper');
-// echo TVarDumper::dump(__METHOD__,10,true);
- }
- /**
- * Performs authorization.
- * This is the event handler attached to application's Authorization event.
- * Do not call this method directly.
- * @param mixed sender of the Authorization event
- * @param mixed event parameter
- */
- public function doAuthorization($sender,$param)
- {
- Prado::using('System.Util.TVarDumper');
-// echo TVarDumper::dump(__METHOD__,10,true);
- }
-}
-//public sealed class FormsAuthenticationModule : IHttpModule
-//{
-// // Events
-// public event FormsAuthenticationEventHandler Authenticate;
-//
-// // Methods
-// [SecurityPermission(SecurityAction.Demand, Unrestricted=true)]
-// public FormsAuthenticationModule();
-// public void Dispose();
-// private static FormsAuthenticationTicket
-//ExtractTicketFromCookie(HttpContext context, string name, out bool
-//cookielessTicket);
-// public void Init(HttpApplication app);
-// private void OnAuthenticate(FormsAuthenticationEventArgs e);
-// private void OnEnter(object source, EventArgs eventArgs);
-// private void OnLeave(object source, EventArgs eventArgs);
-// private static void Trace(string str);
-//
-// // Fields
-// private FormsAuthenticationEventHandler _eventHandler;
-// private static bool _fAuthChecked;
-// private static bool _fAuthRequired;
-// private bool _fFormsInit;
-// private string _FormsName;
-// private string _LoginUrl;
-// private const string CONFIG_DEFAULT_COOKIE = ".ASPXAUTH";
-// private const string CONFIG_DEFAULT_LOGINURL = "login.aspx";
-//}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TFormsAuthenticationTicket.php b/framework/Web/Security/TFormsAuthenticationTicket.php
deleted file mode 100644
index e53b68b2..00000000
--- a/framework/Web/Security/TFormsAuthenticationTicket.php
+++ /dev/null
@@ -1,124 +0,0 @@
-<?php
-/**
- * TFormsAuthenticationTicket class.
- * Provides access to properties and values of the ticket used with forms
- * authentication to identify users. This class cannot be inherited.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TFormsAuthenticationTicket.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-final class TFormsAuthenticationTicket
-{
- private $_cookiePath;
- private $_expiration;
- private $_expired;
- private $_isPersistent;
- private $_issueDate;
- private $_name;
- private $_userData;
- private $_version;
-
- public function getCookiePath()
- {
- return $this->_cookiePath;
- }
- public function setCookiePath($value)
- {
- $this->_cookiePath = TPropertyValue::ensureString($value);
- }
- public function getExpiration()
- {
- return $this->_expiration;
- }
- public function setExpiration($value)
- {
- $this->_expiration = TPropertyValue::ensureString($value);
- }
- public function getExpired()
- {
- return $this->_expired;
- }
- public function setExpired($value)
- {
- $this->_expired = TPropertyValue::ensureString($value);
- }
- public function getIsPersistent()
- {
- return $this->_isPersistent;
- }
- public function setIsPersistent($value)
- {
- $this->_isPersistent = TPropertyValue::ensureString($value);
- }
- public function getIssueDate()
- {
- return $this->_issueDate;
- }
- public function setIssueDate($value)
- {
- $this->_issueDate = TPropertyValue::ensureString($value);
- }
- public function getName()
- {
- return $this->_name;
- }
- public function setName($value)
- {
- $this->_name = TPropertyValue::ensureString($value);
- }
- public function getUserData()
- {
- return $this->_userData;
- }
- public function setUserData($value)
- {
- $this->_userData = TPropertyValue::ensureString($value);
- }
- public function getVersion()
- {
- return $this->_version;
- }
- public function setVersion($value)
- {
- $this->_version = TPropertyValue::ensureString($value);
- }
-
- public function __construct()
- {
-
- }
-}
-//public sealed class FormsAuthenticationTicket
-//{
-// // Methods
-// public FormsAuthenticationTicket(string name, bool isPersistent,
-//int timeout);
-// public FormsAuthenticationTicket(int version, string name,
-//DateTime issueDate, DateTime expiration, bool isPersistent, string
-//userData);
-// public FormsAuthenticationTicket(int version, string name,
-//DateTime issueDate, DateTime expiration, bool isPersistent, string
-//userData, string cookiePath);
-//
-// // Properties
-// public string CookiePath { get; }
-// public DateTime Expiration { get; }
-// public bool Expired { get; }
-// public bool IsPersistent { get; }
-// public DateTime IssueDate { get; }
-// public string Name { get; }
-// public string UserData { get; }
-// public int Version { get; }
-//
-// // Fields
-// private string _CookiePath;
-// private DateTime _Expiration;
-// private bool _IsPersistent;
-// private DateTime _IssueDate;
-// private string _Name;
-// private string _UserData;
-// private int _Version;
-//}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TFormsIdentity.php b/framework/Web/Security/TFormsIdentity.php
deleted file mode 100644
index f4d00f82..00000000
--- a/framework/Web/Security/TFormsIdentity.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/**
- * TFormsIdentity class.
- * Represents a user identity authenticated using forms authentication. This class cannot be inherited.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TFormsIdentity.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-Prado::using('System.Web.Security.Principal.IIdentity');
-final class TFormsIdentity implements IIdentity
-{
- private $_authenticationType;
- private $_isAuthenticated=false;
- private $_name;
- private $_ticket;
-
- public function getAuthenticationType()
- {
- return $this->_authenticationType;
- }
- public function setAuthenticationType($value)
- {
- $this->_authenticationType = TPropertyValue::ensureString($value);
- }
- public function getIsAuthenticated()
- {
- return $this->_isAuthenticated;
- }
- public function setIsAuthenticated($value)
- {
- $this->_isAuthenticated = TPropertyValue::ensureBoolean($value);
- }
- public function getName()
- {
- return $this->_name;
- }
- public function setName($value)
- {
- $this->_name = TPropertyValue::ensureString($value);
- }
- public function getTicket()
- {
- return $this->_ticket;
- }
- public function setTicket($value)
- {
- $this->_ticket = TPropertyValue::ensureString($value);
- }
-
- public function __construct()
- {
-
- }
-}
-//public sealed class FormsIdentity : IIdentity
-//{
-// // Methods
-// public FormsIdentity(FormsAuthenticationTicket ticket);
-//
-// // Properties
-// public string AuthenticationType { get; }
-// public bool IsAuthenticated { get; }
-// public string Name { get; }
-// public FormsAuthenticationTicket Ticket { get; }
-//
-// // Fields
-// private FormsAuthenticationTicket _Ticket;
-//}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TMembership.php b/framework/Web/Security/TMembership.php
deleted file mode 100644
index e68a0a6a..00000000
--- a/framework/Web/Security/TMembership.php
+++ /dev/null
@@ -1,208 +0,0 @@
-<?php
-/**
- * TMembership class.
- * Validates user credentials and manages user settings. This class cannot be inherited.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TMembership.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-final class TMembership
-{
- private static $_applicationName;
- private static $_enablePasswordReset=false;
- private static $_enablePasswordRetrieval=false;
- private static $_hashAlgorithmType;
- private static $_isHashAlgorithmFromMembershipConfig=false;
- private static $_maxInvalidPasswordAttempts;
- private static $_minRequiredNonAlphanumericCharacters;
- private static $_minRequiredPasswordLength;
- private static $_passwordAttemptWindow;
- private static $_passwordStrengthReqularExpression;
- private static $_provider;
- private static $_providers;
- private static $_requiresQuestionAndAnswer=false;
- private static $_userIsOnlineTimeWindow=15;
- private static $_punctuations='!@#$%^&*()_-+=[{]};:>./?';
- private static $_hashAlgorithmFromConfig=false;
- private static $_initialized=false;
- private static $_initializeException;
-
- public static function getApplicationName()
- {
- return self::$_applicationName;
- }
- public static function setApplicationName($value)
- {
- self::$_applicationName = TPropertyValue::ensureString($value);
- }
- public static function getEnablePasswordReset()
- {
- return self::$_enablePasswordReset;
- }
- public static function getEnablePasswordRetrieval()
- {
- return self::$_enablePasswordRetrieval;
- }
- public static function getHashAlgorithmType()
- {
- return self::$_hashAlgorithmType;
- }
- public static function getHashAlgorithmFromMembershipConfig()
- {
- return self::$_isHashAlgorithmFromMembershipConfig;
- }
- public static function getMaxInvalidPasswordAttempts()
- {
- return self::$_maxInvalidPasswordAttempts;
- }
- public static function getMinRequiredNonAlphanumericCharacters()
- {
- return self::$_minRequiredNonAlphanumericCharacters;
- }
- public static function getMinRequiredPasswordLength()
- {
- return self::$_minRequiredPasswordLength;
- }
- public static function getPasswordAttemptWindow()
- {
- return self::$_passwordAttemptWindow;
- }
- public static function getPasswordStrengthReqularExpression()
- {
- return self::$_passwordStrengthReqularExpression;
- }
- public static function getProvider()
- {
- self::initialize();
- return self::$_provider;
- }
- public static function getProviders($providerName)
- {
- self::initialize();
- return self::$_providers[$providerName];
- }
- public static function getUserIsOnlineTimeWindow()
- {
- return self::$_userIsOnlineTimeWindow;
- }
- public static function createUser($username,$password,$email=null,$passwordQuestion=null,$passwordAnswer=null,$isApproved=null,$providerUserKey=null)
- {
- return self::$_provider->createUser($username,$password,$email,$passwordQuestion,$passwordAnswer,$isApproved,$providerUserKey);
- }
- public static function deleteUser($username,$deleteAllRelatedData=true)
- {
- return self::$_provider->deleteUser($username,$deleteAllRelatedData);
- }
- public static function findUsersByEmail($emailToMatch,$pageIndex=null,$pageSize=null)
- {
- if ($pageIndex < 0 && $pageIndex!==null)
- {
- throw new TException('PageIndex_bad',$pageIndex);
- }
- if ($pageSize > 1 && $pageSize!==null)
- {
- throw new TException('PageSize_bad',$pageSize);
- }
- return self::$_provider->findUsersByEmail($emailToMatch,$pageIndex,$pageSize);
- }
- public static function findUsersByName($usernameToMatch,$pageIndex=null,$pageSize=null)
- {
- if ($pageIndex < 0 && $pageIndex!==null)
- {
- throw new TException('PageIndex_bad',$pageIndex);
- }
- if ($pageSize > 1 && $pageSize!==null)
- {
- throw new TException('PageSize_bad',$pageSize);
- }
- return self::$_provider->findUsersByName($usernameToMatch,$pageIndex,$pageSize);
- }
- public static function generatePassword($length,$numberOfNonAlphanumericCharacters)
- {
- if (($length < 1) || ($length > 0x80))
- {
- throw new TException('Membership_password_length_incorrect');
- }
- if (($numberOfNonAlphanumericCharacters > $length) || ($numberOfNonAlphanumericCharacters < 0))
- {
- throw new TException('Membership_min_required_non_alphanumeric_characters_incorrect',$numberOfNonAlphanumericCharacters);
- }
- //need to do the alpha checking in here
- // $num1=0;
- // $buffer1=null;
- // $chArray1;
- // $num2=0;
- // for ($num3 = 0;$num3 < $length; $num3++)
- // {
- // $num4 = $buffer[$num3];
- // }
- }
- public static function getAllUsers($pageIndex=null,$pageSize=null)
- {
- if ($pageIndex < 0 && $pageIndex!==null)
- {
- throw new TException('PageIndex_bad',$pageIndex);
- }
- if ($pageSize > 1 && $pageSize!==null)
- {
- throw new TException('PageSize_bad',$pageSize);
- }
- return self::$_provider->getAllUsers($pageIndex,$pageSize);
- }
- private static function getCurrentUserName()
- {
- //how to get the current username?
- }
- public static function getNumberOfUsersOnline()
- {
- return self::$_provider->getNumberOfUsersOnline();
- }
- public static function getUser($username=null,$providerUserKey=null,$userIsOnline=false)
- {
- if ($username===null && $providerUserKey===null)
- {
- return self::$_provider->getUser(self::GetCurrentUserName(),null,true);
- }
- if ($username===null && $providerUserKey!==null)
- {
- return self::$_provider->getUser(null,$providerUserKey,$userIsOnline);
- }
- if ($username!==null && $providerUserKey===null)
- {
- return self::$_provider->getUser($username,null,$userIsOnline);
- }
- }
- public static function getUserNameByEmail($emailToMatch)
- {
- return self::$_provider->getUserNameByEmail($emailToMatch);
- }
- private static function initialize()
- {
- if (self::$_initialized)
- {
- if (self::$_initializeException!==null)
- {
- throw new self::$_initializeException;
- }
- }
- else
- {
-
- }
- }
- public static function updateUser(TMembershipUser $user)
- {
- if ($user===null)
- {
- throw new TException('Membership_user_can_not_be_null');
- }
- $user->update();
- }
- public static function validateUser($username,$password)
- {
- return self::$_provider->validateUser($username,$password);
- }
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TMembershipCreateStatus.php b/framework/Web/Security/TMembershipCreateStatus.php
deleted file mode 100644
index 78b64de4..00000000
--- a/framework/Web/Security/TMembershipCreateStatus.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/**
- * TMembershipCreateStatus class.
- * Describes the result of a CreateUser operation.
- *
- * DuplicateEmail The e-mail address already exists in the database for the application.
- * DuplicateProviderUserKey The provider user key already exists in the database for the application.
- * DuplicateUserName The user name already exists in the database for the application.
- * InvalidAnswer The password answer is not formatted correctly.
- * InvalidEmail The e-mail address is not formatted correctly.
- * InvalidPassword The password is not formatted correctly.
- * InvalidProviderUserKey The provider user key is of an invalid type or format.
- * InvalidQuestion The password question is not formatted correctly.
- * InvalidUserName The user name was not found in the database.
- * ProviderError The provider returned an error that is not described by other MembershipCreateStatus enumeration values.
- * Success The user was successfully created.
- * UserRejected The user was not created, for a reason defined by the provider.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TMembershipCreateStatus.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-class TMembershipCreateStatus extends TEnumerable
-{
- const DuplicateEmail='DuplicateEmail';
- const DuplicateProviderUserKey='DuplicateProviderUserKey';
- const DuplicateUserName='DuplicateUserName';
- const InvalidAnswer='InvalidAnswer';
- const InvalidEmail='InvalidEmail';
- const InvalidPassword='InvalidPassword';
- const InvalidProviderUserKey='InvalidProviderUserKey';
- const InvalidQuestion='InvalidQuestion';
- const InvalidUserName='InvalidUserName';
- const ProviderError='ProviderError';
- const Success='Success';
- const UserRejected='UserRejected';
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TMembershipCreateUserException.php b/framework/Web/Security/TMembershipCreateUserException.php
deleted file mode 100644
index def74c8d..00000000
--- a/framework/Web/Security/TMembershipCreateUserException.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * TMembershipCreateUserException class.
- * The exception that is thrown when a user is not successfully created by a membership provider.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TMembershipCreateUserException.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Configuration.Provider
- * @since 3.1
- */
-
-Prado::using('System.Exceptions.TException');
-class TMembershipCreateUserException extends TException
-{
-
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TMembershipPasswordException.php b/framework/Web/Security/TMembershipPasswordException.php
deleted file mode 100644
index faf0c599..00000000
--- a/framework/Web/Security/TMembershipPasswordException.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * TMembershipPasswordException class.
- * The exception that is thrown when a user is not successfully created by a membership provider.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TMembershipPasswordException.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Configuration.Provider
- * @since 3.1
- */
-
-Prado::using('System.Exceptions.TException');
-class TMembershipPasswordException extends TException
-{
-
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TMembershipPasswordFormat.php b/framework/Web/Security/TMembershipPasswordFormat.php
deleted file mode 100644
index fdff0e39..00000000
--- a/framework/Web/Security/TMembershipPasswordFormat.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-/**
- * TMembershipPasswordFormat class.
- * Describes the encryption format for storing passwords for membership users.
- *
- * Clear Passwords are not encrypted.
- * Encrypted Passwords are encrypted using the encryption settings determined by the
- * machineKey Element element configuration.
- * Hashed Passwords are encrypted one-way using the SHA1 hashing algorithm.
- * You can specify a hashing algorithm different than the SHA1
- * algorithm using the hashAlgorithmType attribute.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TMembershipPasswordFormat.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-class TMembershipPasswordFormat extends TEnumerable
-{
- const Clear='Clear';
- const Encrypted='Encrypted';
- const Hashed='Hashed';
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TMembershipProvider.php b/framework/Web/Security/TMembershipProvider.php
deleted file mode 100644
index 446d59d9..00000000
--- a/framework/Web/Security/TMembershipProvider.php
+++ /dev/null
@@ -1,178 +0,0 @@
-<?php
-/**
- * TMembershipProvider class.
- * Defines the contract that PRADO implements to provide membership services using custom membership providers.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TMembershipProvider.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-Prado::using('System.Configuration.Provider.TProviderBase');
-abstract class TMembershipProvider extends TProviderBase
-{
- private $_applicationName;
- private $_enablePasswordReset=false;
- private $_enablePasswordRetrieval=false;
- private $_maxInvalidPasswordAttempts;
- private $_minRequiredNonAlphanumericCharacters;
- private $_minRequiredPasswordLength;
- private $_passwordAttemptWindow;
- private $_passwordStrengthRegularExpression;
- private $_requiresQuestionAndAnswer=false;
- private $_requiresUniqueEmail=false;
- /**
- * @var string external configuration file
- */
- private $_configFile=null;
-
- public function getEnablePasswordReset()
- {
- return $this->_enablePasswordReset;
- }
- public function setEnablePasswordReset($value)
- {
- $this->_enablePasswordReset = TPropertyValue::ensureBoolean($value);
- }
- public function getEnablePasswordRetrieval()
- {
- return $this->_enablePasswordRetrieval;
- }
- public function setEnablePasswordRetrieval($value)
- {
- $this->_enablePasswordRetrieval = TPropertyValue::ensureBoolean($value);
- }
- public function getMaxInvalidPasswordAttempts()
- {
- return $this->_maxInvalidPasswordAttempts;
- }
- public function setMaxInvalidPasswordAttempts($value)
- {
- $this->_maxInvalidPasswordAttempts = TPropertyValue::ensureInteger($value);
- }
- public function getMinRequiredNonAlphanumericCharacters()
- {
- return $this->_minRequiredNonAlphanumericCharacters;
- }
- public function setMinRequiredNonAlphanumericCharacters($value)
- {
- $this->_minRequiredNonAlphanumericCharacters = TPropertyValue::ensureInteger($value);
- }
- public function getMinRequiredPasswordLength()
- {
- return $this->_minRequiredPasswordLength;
- }
- public function setMinRequiredPasswordLength($value)
- {
- $this->_minRequiredPasswordLength = TPropertyValue::ensureInteger($value);
- }
- public function getPasswordAttemptWindow()
- {
- return $this->_passwordAttemptWindow;
- }
- public function setPasswordAttemptWindow($value)
- {
- $this->_passwordAttemptWindow = TPropertyValue::ensureInteger($value);
- }
- public function getPasswordStrengthRegularExpression()
- {
- return $this->_passwordStrengthRegularExpression;
- }
- public function setPasswordStrengthRegularExpression($value)
- {
- $this->_passwordStrengthRegularExpression = TPropertyValue::ensureString($value);
- }
- public function getRequiresQuestionAndAnswer()
- {
- return $this->_requiresQuestionAndAnswer;
- }
- public function setRequiresQuestionAndAnswer($value)
- {
- $this->_requiresQuestionAndAnswer = TPropertyValue::ensureString($value);
- }
- public function getRequiresUniqueEmail()
- {
- return $this->_requiresUniqueEmail;
- }
- public function setRequiresUniqueEmail($value)
- {
- $this->_requiresUniqueEmail = TPropertyValue::ensureBoolean($value);
- }
-
- public function __construct()
- {
-
- }
- public function init($config)
- {
- if($this->_configFile!==null)
- {
- if(is_file($this->_configFile))
- {
- $dom=new TXmlDocument;
- $dom->loadFromFile($this->_configFile);
- $this->loadConfig($dom);
- }
- else
- throw new TConfigurationException('membershipprovider_configfile_invalid',$this->_configFile);
- }
- $this->loadConfig($config);
- }
- /**
- * Loads configuration from an XML element
- * @param TXmlElement configuration node
- * @throws TConfigurationException if log route class or type is not specified
- */
- private function loadConfig($xml)
- {
- foreach($xml->getElementsByTagName('provider') as $providerConfig)
- {
- $properties=$providerConfig->getAttributes();
- if(($class=$properties->remove('class'))===null)
- throw new TConfigurationException('membershipprovider_routeclass_required');
- $provider=Prado::createComponent($class);
- if(!($provider instanceof TMembershipProvider))
- throw new TConfigurationException('membershipprovider_routetype_invalid');
- foreach($properties as $name=>$value)
- $provider->setSubproperty($name,$value);
- $this->_providers[]=$provider;
- $provider->init($providerConfig);
- }
- }
- public abstract function changePassword($username,$oldPassword,$newPassword);
- public abstract function changePasswordQuestionAndAnswer($username,$password,$newPasswordQuestion,$newPasswordAnswer);
- public abstract function createUser($username,$password,$email,$passwordQuestion,$passwordAnswer,$isApproved,$providerUserKey);
- protected function decryptPassword($encodedPassword)
- {
-
- }
- public abstract function deleteUser($username,$deleteAllRelatedData);
- public function encodePassword($pass,$passwordFormat,$salt)
- {
-
- }
- protected function encryptPassword($password)
- {
-
- }
- public abstract function findUsersByEmail($emailToMatch,$pageIndex=null,$pageSize=null);
- public abstract function findUsersByName($usernameToMatch,$pageIndex=null,$pageSize=null);
- public function generateSalt()
- {
-
- }
- public abstract function getAllUsers($pageIndex=null,$pageSize=null);
- public abstract function getNumberOfUsersOnline();
- public abstract function getPassword($username,$answer);
- public abstract function getMembershipUser($username=null,$providerUserKey=null,$userIsOnline=false);
- public abstract function getUserNameByEmail($email);
- public abstract function resetPassword($username,$answer);
- public function unEncodePassword($pass,$passwordFormat)
- {
-
- }
- public abstract function unlockUser($userName);
- public abstract function updateUser(TMembershipUser $user);
- public abstract function validateUser($username,$password);
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TMembershipUser.php b/framework/Web/Security/TMembershipUser.php
deleted file mode 100644
index ad7b9f78..00000000
--- a/framework/Web/Security/TMembershipUser.php
+++ /dev/null
@@ -1,165 +0,0 @@
-<?php
-/**
- * TMembershipUser class.
- * Exposes and updates membership user information in the membership data store.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TMembershipUser.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-Prado::using('System.Web.Security.TProviderException');
-Prado::using('System.Web.Security.TMembership');
-class TMembershipUser
-{
- private $_comment;
- private $_creationDate;
- private $_email;
- private $_isApproved=false;
- private $_isLockedOut=false;
- private $_isOnline=false;
- private $_lastActivityDate;
- private $_lastLockoutDate;
- private $_lastLoginDate;
- private $_lastPasswordChangedDate;
- private $_passwordQuestion;
- private $_providerName;
- private $_providerUserKey;
- private $_userName;
-
- public function __construct($providerName=null,$name=null,$providerUserKey=null,$email=null,$passwordQuestion=null,$comment=null,$isApproved=null,$isLockedOut=null,$creationDate=null,$lastLoginDate=null,$lastActivityDate=null,$lastPasswordChangedDate=null,$lastLockoutDate=null)
- {
- if (($providerName===null) || (TMembership::getProviders($providerName)===null))
- {
- throw new TProviderException('Membership_provider_name_invalid',$providerName);
- }
- if ($name!==null)
- {
- $name = trim($name);
- }
- if ($email!==null)
- {
- $email = trim($email);
- }
- if ($passwordQuestion!==null)
- {
- $passwordQuestion = trim($passwordQuestion);
- }
- $this->_providerName = $providerName;
- $this->_userName = $name;
- $this->_providerUserKey = $providerUserKey;
- $this->_email = $email;
- $this->_passwordQuestion = $passwordQuestion;
- $this->_comment = $comment;
- $this->_isApproved = $isApproved;
- $this->_isLockedOut = $isLockedOut;
- $this->_creationDate = $creationDate;
- $this->_lastLoginDate = $lastLoginDate;
- $this->_lastActivityDate = $lastActivityDate;
- $this->_lastPasswordChangedDate = $lastPasswordChangedDate;
- $this->_lastLockoutDate = $lastLockoutDate;
- }
- public function getComment()
- {
- return $this->_comment;
- }
- public function setApplicationName($value)
- {
- $this->_comment = TPropertyValue::ensureString($value);
- }
- public function getCreationDate()
- {
- return $this->_creationDate;
- }
- public function getEmail()
- {
- return $this->_email;
- }
- public function setEmail($value)
- {
- $this->_email = TPropertyValue::ensureString($value);
- }
- public function getIsApproved()
- {
- return $this->_isApproved;
- }
- public function setIsApproved($value)
- {
- $this->_isApproved = TPropertyValue::ensureBoolean($value);
- }
- public function getIsLockedOut()
- {
- return $this->_isLockedOut;
- }
- public function getIsOnline()
- {
- return $this->_isOnline;
- }
- public function getLastActivityDate()
- {
- return $this->_lastActivityDate;
- }
- public function setLastActivityDate($value)
- {
- $this->_lastActivityDate = TPropertyValue::ensureString($value);
- }
- public function getLastLockoutDate()
- {
- return $this->_lastLockoutDate;
- }
- public function getLastLoginDate()
- {
- return $this->_lastLoginDate;
- }
- public function setLastLoginDate($value)
- {
- $this->_lastLoginDate = TPropertyValue::ensureString($value);
- }
- public function getLastPasswordChangedDate()
- {
- return $this->_lastPasswordChangedDate;
- }
- public function getPasswordQuestion()
- {
- return $this->_passwordQuestion;
- }
- public function getProviderUserKey()
- {
- return $this->_providerUserKey;
- }
- public function getUserName()
- {
- return $this->_userName;
- }
- public function changePassword($oldPassword,$newPassword,$throwOnError=null)
- {
-
- }
- public function getPassword()
- {
- // $throwOnError;
- // $passwordAnswer;
- // $answer;
- // $answer,$useAnswer,$throwOnError;
- }
- public function resetPassword()
- {
- // $throwOnError;
- // $passwordAnswer;
- // $answer;
- // $answer,$useAnswer,$throwOnError;
- }
- public function unlockUser()
- {
-
- }
- public function update()
- {
-
- }
- private function updateSelf()
- {
-
- }
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TProviderException.php b/framework/Web/Security/TProviderException.php
deleted file mode 100644
index 7239585c..00000000
--- a/framework/Web/Security/TProviderException.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-class TProviderException extends TException
-{
-
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TRoleManagerModule.php b/framework/Web/Security/TRoleManagerModule.php
deleted file mode 100644
index 79c6b7a5..00000000
--- a/framework/Web/Security/TRoleManagerModule.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * TRoleManagerModule class.
- * Manages a TRolePrincipal instance for the current user. This class cannot be inherited.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TRoleManagerModule.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-final class TRoleManagerModule extends TModule
-{
-
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TRolePrincipal.php b/framework/Web/Security/TRolePrincipal.php
deleted file mode 100644
index 682f2cbe..00000000
--- a/framework/Web/Security/TRolePrincipal.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-final class TRolePrincipal
-{
-
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TRoleProvider.php b/framework/Web/Security/TRoleProvider.php
deleted file mode 100644
index a83bfb0b..00000000
--- a/framework/Web/Security/TRoleProvider.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-/**
- * TRoleProvider class.
- * Defines the contract that PRADO implements to provide role-management services using custom role providers.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TRoleProvider.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-Prado::using('System.Configuration.Provider.TProviderBase');
-abstract class TRoleProvider extends TProviderBase
-{
- private $_cacheRolesInCookie=false;
- private $_cookieName="PRADO";
- private $_cookieTimeout="30";
- private $_cookiePath="/";
- private $_cookieRequireSSL=false;
- private $_cookieSlidingExpiration=true;
-
- public function getCacheRolesInCookie()
- {
- return $this->_cacheRolesInCookie;
- }
- public function setCacheRolesInCookie($value)
- {
- $this->_cacheRolesInCookie = TPropertyValue::ensureBoolean($value);
- }
- public function getCookieName()
- {
- return $this->_cookieName;
- }
- public function setCookieName($value)
- {
- $this->_cookieName = TPropertyValue::ensureString($value);
- }
- public function getCookiePath()
- {
- return $this->_cookiePath;
- }
- public function setCookiePath($value)
- {
- $this->_cookiePath = TPropertyValue::ensureString($value);
- }
- public function getCookieRequireSSL()
- {
- return $this->_cookieRequireSSL;
- }
- public function setCookieRequireSSL($value)
- {
- $this->_cookieRequireSSL = TPropertyValue::ensureBoolean($value);
- }
- public function getCookieSlidingExpiration()
- {
- return $this->_cookieSlidingExpiration;
- }
- public function setCookieSlidingExpiration($value)
- {
- $this->_cookieSlidingExpiration = TPropertyValue::ensureBoolean($value);
- }
- public function getCookieTimeout()
- {
- return $this->_cookieTimeout;
- }
- public function setCookieTimeout($value)
- {
- $this->_cookieTimeout = TPropertyValue::ensureInteger($value);
- }
-
-
- public function __construct()
- {
-
- }
- public abstract function addUsersToRoles($usernames,$roleNames);
- public abstract function createRole($roleName);
- public abstract function deleteRole($roleName);
- public abstract function findUsersInRole($roleName,$usernameToMatch);
- public abstract function getAllRoles();
- public abstract function getRolesForUser($username);
- public abstract function getUsersIsRole($username,$roleName);
- public abstract function isUserIsRole($username,$roleName);
- public abstract function removeUsersFromRoles($usernames,$roleNames);
- public abstract function roleExists($roleName);
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TRoles.php b/framework/Web/Security/TRoles.php
deleted file mode 100644
index 8072cb64..00000000
--- a/framework/Web/Security/TRoles.php
+++ /dev/null
@@ -1,237 +0,0 @@
-<?php
-/**
- * TRoles class.
- * Manages user membership in roles for authorization checking in an PRADO application. This class cannot be inherited.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TRoles.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-Prado::using('System.Web.Security.TProviderException');
-final class TRoles
-{
- private static $_applicationName;
- private static $_cacheRolesInCookie=false;
- private static $_cookieName;
- private static $_cookiePath;
- private static $_cookieProtectionValue;
- private static $_cookieRequireSSL=false;
- private static $_cookieSlidingExpiration=false;
- private static $_cookieTimeout;
- private static $_createPersistentCookie=false;
- private static $_domain;
- private static $_enabled=false;
- private static $_maxCachedResults;
- private static $_provider;
- private static $_providers;
- private static $_enabledSet=false;
- private static $_initialized=false;
- private static $_initializeException;
-
- public static function getApplicationName()
- {
- return self::$_applicationName;
- }
- public static function setApplicationName($value)
- {
- self::$_applicationName = TPropertyValue::ensureString($value);
- }
- public static function getCacheRolesInCookie()
- {
- return self::$_cacheRolesInCookie;
- }
- public static function getCookieName()
- {
- return self::$_cookieName;
- }
- public static function getCookiePath()
- {
- return self::$_cookiePath;
- }
- public static function getCookieProtectionValue()
- {
- return self::$_cookieProtectionValue;
- }
- public static function getCookieRequireSSL()
- {
- return self::$_cookieRequireSSL;
- }
- public static function getCookieSlidingExpiration()
- {
- return self::$_cookieSlidingExpiration;
- }
- public static function getCookieTimeout()
- {
- return self::$_cookieTimeout;
- }
- public static function getCreatePersistentCookie()
- {
- return self::$_createPersistentCookie;
- }
- public static function getDomain()
- {
- return self::$_domain;
- }
- public static function getEnabled()
- {
- return self::$_enabled;
- }
- public static function getMaxCachedResults()
- {
- return self::$_maxCachedResults;
- }
- public static function getProvider()
- {
- return self::$_provider;
- }
- public static function getProviders()
- {
- return self::$_providers;
- }
-
- public static function addUsersToRole($usernames,$roleName)
- {
-
- }
- public static function addUsersToRoles($usernames,$roleNames)
- {
-
- }
- public static function addUserToRole($username,$roleName)
- {
-
- }
- public static function addUserToRoles($username,$roleNames)
- {
-
- }
- public static function createRole($roleName)
- {
- self::ensureEnabled();
- self::$_provider->createRole($roleName);
- }
- public static function deleteCookie()
- {
-
- }
- public static function deleteRole($roleName,$throwOnPopulatedRole=true)
- {
- self::ensureEnabled();
-
- // $flag1 = self::$_Provider->DeleteRole($roleName,$throwOnPopulatedRole);
- // try
- // {
- // $principal1 = self::GetCurrentUser();
- // }
- // catch ()
- // {
- //
- // }
-
- }
- private static function ensureEnabled()
- {
- self::initialize();
- if (!self::$_Initialized)
- {
- throw new TProviderException('Roles_feature_not_enabled');
- }
- }
- public static function findUsersInRole($roleName,$usernameToMatch)
- {
-
- }
- public static function getAllRoles()
- {
-
- }
- private static function getCurrentUser()
- {
-
- }
- private static function getCurrentUserName()
- {
-
- }
- public static function getRolesForUser($username=null)
- {
-
- }
- public static function getUsersInRole($roleName)
- {
-
- }
- private static function initialize()
- {
- if (self::$_initialized)
- {
- if (self::$_initializeException!==null)
- {
- throw new $_initializeException;
- }
- }
- else
- {
- if (self::$_initialized)
- {
- if (self::$_initializeException!==null)
- {
- throw new $_initializeException;
- }
- return;
- }
- try
- {
- self::$_enabled;
- self::$_cookieName;
- self::$_cookiePath;
- self::$_cacheRolesInCookie;
- self::$_cookieTimeout;
- self::$_cookiePath;
- self::$_cookieRequireSSL;
- self::$_cookieSlidingExpiration;
- self::$_cookieProtectionValue;
- self::$_domain;
- self::$_createPersistentCookie;
- self::$_maxCachedResults;
- if (self::$_enabled)
- {
- if (self::$_maxCachedResults < 0)
- {
- throw new TProviderException('Value_must_be_non_negative_integer',self::$_MaxCachedResults);
- }////stopped here
- }
- }
- catch (TException $e)
- {
-
- }
- }
- }
- public static function isUserInRole($roleName,$username=null)
- {
-
- }
- public static function removeUserFromRole($username,$roleName)
- {
-
- }
- public static function remoreUserFromRoles($username,$roleNames)
- {
-
- }
- public static function removeUsersFromRole($usernames,$roleName)
- {
-
- }
- public static function removeUsersFromRoles($usernames,$roleNames)
- {
-
- }
- public static function roleExists($roleName)
- {
-
- }
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TSqlMembershipProvider.php b/framework/Web/Security/TSqlMembershipProvider.php
deleted file mode 100644
index 87e9015f..00000000
--- a/framework/Web/Security/TSqlMembershipProvider.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-Prado::using('System.Web.Security.TMembershipProvider');
-class TSqlMembershipProvider extends TMembershipProvider
-{
- private $_connectionStringName;
-
- public function getConnectionStringName()
- {
- return $this->_connectionStringName;
- }
- public function setConnectionStringName($value)
- {
- $this->_connectionStringName = TPropertyValue::ensureString($value);
- }
-
-
- public function __construct()
- {
-
- }
- public function changePassword($username,$oldPassword,$newPassword)
- {
-
- }
- public function changePasswordQuestionAndAnswer($username,$password,$newPasswordQuestion,$newPasswordAnswer)
- {
-
- }
- public function createUser($username,$password,$email,$passwordQuestion,$passwordAnswer,$isApproved,$providerUserKey)
- {
-
- }
- public function deleteUser($username,$deleteAllRelatedData)
- {
-
- }
- public function findUsersByEmail($emailToMatch,$pageIndex=null,$pageSize=null)
- {
-
- }
- public function findUsersByName($usernameToMatch,$pageIndex=null,$pageSize=null)
- {
-
- }
- public function getAllUsers($pageIndex=null,$pageSize=null)
- {
-
- }
- public function getNumberOfUsersOnline()
- {
-
- }
- public function getPassword($username,$answer)
- {
-
- }
- public function getMembershipUser($username=null,$providerUserKey=null,$userIsOnline=false)
- {
- Prado::using('System.Web.Security.TMembershipUser');
- return new TMembershipUser($this->getID());
- }
- public function getUserNameByEmail($email)
- {
-
- }
- public function resetPassword($username,$answer)
- {
-
- }
- public function unlockUser($userName)
- {
-
- }
- public function updateUser(TMembershipUser $user)
- {
-
- }
- public function validateUser($username,$password)
- {
-
- }
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TSqlRoleProvider.php b/framework/Web/Security/TSqlRoleProvider.php
deleted file mode 100644
index 7eadc265..00000000
--- a/framework/Web/Security/TSqlRoleProvider.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-/**
- * TSqlRoleProvider class.
- * Defines the contract that PRADO implements to provide role-management services using custom role providers.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TSqlRoleProvider.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.Security
- * @since 3.1
- */
-Prado::using('System.Web.Security.TRoleProvider');
-class TSqlRoleProvider extends TRoleProvider
-{
- private $_connectionStringName;
-
- public function getConnectionStringName()
- {
- return $this->_connectionStringName;
- }
- public function setConnectionStringName($value)
- {
- $this->_connectionStringName = TPropertyValue::ensureString($value);
- }
-
- public function __construct()
- {
-
- }
- public function addUsersToRoles($usernames,$roleNames)
- {
-
- }
- public function createRole($roleName)
- {
-
- }
- public function deleteRole($roleName)
- {
-
- }
- public function findUsersInRole($roleName,$usernameToMatch)
- {
-
- }
- public function getAllRoles()
- {
-
- }
- public function getRolesForUser($username)
- {
-
- }
- public function getUsersIsRole($username,$roleName)
- {
-
- }
- public function isUserIsRole($username,$roleName)
- {
-
- }
- public function removeUsersFromRoles($usernames,$roleNames)
- {
-
- }
- public function roleExists($roleName)
- {
-
- }
-}
-?> \ No newline at end of file
diff --git a/framework/Web/Security/TUrlAuthorizationModule.php b/framework/Web/Security/TUrlAuthorizationModule.php
deleted file mode 100644
index c321d95d..00000000
--- a/framework/Web/Security/TUrlAuthorizationModule.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-final class TUrlAuthorizationModule
-{
-
-}
-?> \ No newline at end of file
diff --git a/framework/Web/UI/WebControls/TLogin.php b/framework/Web/UI/WebControls/TLogin.php
deleted file mode 100644
index a4d4d2af..00000000
--- a/framework/Web/UI/WebControls/TLogin.php
+++ /dev/null
@@ -1,1575 +0,0 @@
-<?php
-/**
- * TLogin class.
- * Provides user interface (UI) elements for logging in to a Web site..
- *
- * The TLogin control is a composite control that provides all the common UI elements
- * needed to authenticate a user on a Web site. The following three elements are
- * required for all login scenarios:
- * A unique user name to identify the user.
- * A password to verify the identity of the user.
- * A login button to send the login information to the server.
- * The TLogin control also provides the following optional UI elements that support additional functions:
- * A link for a password reminder.
- * A Remember Me checkbox for retaining the login information between sessions.
- * A Help link for users who are having trouble logging in.
- * A Register New User link that redirects users to a registration page.
- * Instruction text that appears on the login form.
- * Custom error text that appears when the user clicks the login button without filling in the user name or password fields.
- * Custom error text that appears if the login fails.
- * A custom action that occurs when login succeeds.
- * A way to hide the login control if the user is already logged in to the site.
- *
- * The TLogin control uses a membership provider to obtain user credentials.
- * Unless you specify otherwise, the TLogin control uses the default membership
- * provider defined in the Web.config file. To specify a different provider,
- * set the MembershipProvider property to one of the membership provider
- * names defined in your application's Web.config file. For more information,
- * see Membership Providers.
- *
- * If you want to use a custom authentication service, you can use the OnAuthenticate
- * method to call the service.
- *
- * Styles and Templates
- * The appearance of the Login control is fully customizable through templates and
- * style settings. All UI text messages are also customizable through properties
- * of the TLogin class. The default interface text is automatically localized based
- * on the locale setting on the server.
- *
- * If the TLogin control is customized with templates, then the AccessKey property
- * and the TabIndex property are ignored. In this case, set the AccessKey property
- * and the TabIndex property of each template child control directly.
- *
- * TLogin control properties represented by text boxes, such as UserName and Password,
- * are accessible during all phases of the page life cycle. The control will pick up
- * any changes made by the end user by means of the TextChanged event triggered by
- * the textboxes.
- *
- * The following table lists the Login control style properties and explains which UI
- * element each style property affects. For a list of which properties each style applies
- * to, see the documentation for the individual style properties.
- *
- * Style property UI element affected
- * BorderPadding The space between the control contents and the control's border.
- * CheckBoxStyle Remember Me checkbox.
- * FailureTextStyle Login failure text.
- * InstructionTextStyle Instructional text on the page that tells users how to use the
- * control.
- * LabelStyle Labels for all input fields, such as text boxes.
- * TextBoxStyle Text entry input fields.
- * TitleTextStyle Title text.
- * ValidatorTextStyle Text displayed to the user when a login attempt is unsuccessful
- * due to validation errors
- * HyperLinkStyle Links to other pages.
- * LoginButtonStyle Login button.
- *
- * Validation Groupings
- * The UserName and Password properties have RequiredFieldValidator controls associated
- * with them to prevent users from submitting the page without providing required information.
- *
- * The TLogin control uses a validation group so that other fields on the same page as the TLogin
- * control can be validated separately. By default, the ID property of the Login control is
- * used as the name of the validation group. For example, a TLogin control with the ID "Login1"
- * will use a validation group name of "Login1". If you want to set the validation group that
- * the TLogin control is part of, you must template the control and change the validation group name.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TLogin.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.UI.WebControls
- * @since 3.1
- */
-Prado::using('System.Web.UI.WebControls.TDataGridColumn');
-
-class TLogin extends TCompositeControl
-{
- private $_borderPadding=1;
- private $_checkBoxStyle;
- private $_convertingToTemplate=false;
- private $_failureTextStyle;
- private $_hyperLinkStyle;
- private $_instructionTextStyle;
- private $_labelStyle;
- private $_layoutTemplate;
- private $_loginButtonStyle;
- private $_password;
- private $_passwordInternal;
- private $_tagKey;
- private $_templateContainer;
- private $_textBoxStyle;
- private $_titleTextStyle;
- private $_userNameInternal;
- private $_validatorTextStyle;
-
- public function getBorderPadding()
- {
- return $this->getViewState('BorderPadding',1);
- }
- public function setBorderPadding($value)
- {
- $this->setViewState('BorderPadding',TPropertyValue::ensureInteger($value),1);
- }
- public function getCheckBoxStyle()
- {
- return $this->_checkBoxStyle;
- }
- public function getConvertingToTemplate()
- {
- return $this->_convertingToTemplate;
- }
- public function getCreateUserIconUrl()
- {
- return $this->getViewState('CreateUserIconUrl','');
- }
- public function setCreateUserIconUrl($value)
- {
- $this->setViewState('CreateUserIconUrl',TPropertyValue::ensureString($value),'');
- }
- public function getCreateUserText()
- {
- return $this->getViewState('CreateUserText','');
- }
- public function setCreateUserText($value)
- {
- $this->setViewState('CreateUserText',TPropertyValue::ensureString($value),'');
- }
- public function getCreateUserUrl()
- {
- return $this->getViewState('CreateUserUrl','');
- }
- public function setCreateUserUrl($value)
- {
- $this->setViewState('CreateUserUrl',TPropertyValue::ensureString($value),'');
- }
- public function getDestinationPageUrl()
- {
- return $this->getViewState('DestinationPageUrl','');
- }
- public function setDestinationPageUrl($value)
- {
- $this->setViewState('DestinationPageUrl',TPropertyValue::ensureString($value),'');
- }
- public function getDisplayRememberMe()
- {
- return $this->getViewState('DisplayRememberMe',true);
- }
- public function setDisplayRememberMe($value)
- {
- $this->setViewState('DisplayRememberMe',TPropertyValue::ensureBoolean($value),true);
- }
- public function getFailureAction()
- {
- return $this->getViewState('FailureAction','');
- }
- public function setFailureAction($value)
- {
- $this->setViewState('FailureAction',TPropertyValue::ensureString($value),'');
- }
- public function getFailureText()
- {
- return $this->getViewState('FailureText','');
- }
- public function setFailureText($value)
- {
- $this->setViewState('FailureText',TPropertyValue::ensureString($value),'');
- }
- public function getFailureTextStyle()
- {
- return $this->_failureTextStyle;
- }
- public function getHelpPageIconUrl()
- {
- return $this->getViewState('HelpPageIconUrl','');
- }
- public function setHelpPageIconUrl($value)
- {
- $this->setViewState('HelpPageIconUrl',TPropertyValue::ensureString($value),'');
- }
- public function getHelpPageText()
- {
- return $this->getViewState('HelpPageText','');
- }
- public function setHelpPageText($value)
- {
- $this->setViewState('HelpPageText',TPropertyValue::ensureString($value),'');
- }
- public function getHelpPageUrl()
- {
- return $this->getViewState('HelpPageUrl','');
- }
- public function setHelpPageUrl($value)
- {
- $this->setViewState('HelpPageUrl',TPropertyValue::ensureString($value),'');
- }
- public function getHyperLinkStyle()
- {
- return $this->_hyperLinkStyle;
- }
- public function getInstructionText()
- {
- return $this->getViewState('InstructionText','');
- }
- public function setInstructionText($value)
- {
- $this->setViewState('InstructionText',TPropertyValue::ensureString($value),'');
- }
- public function getInstructionTextStyle()
- {
- return $this->_instructionTextStyle;
- }
- public function getLabelStyle()
- {
- return $this->_labelStyle;
- }
- public function getLayoutTemplate()
- {
- return $this->_layoutTemplate;
- }
- public function setLayoutTemplate($value)
- {
- $this->_layoutTemplate = TPropertyValue::ensureString($value);
- // parent::ChildControlsCreated=false;
- }
- public function getLoginButtonImageUrl()
- {
- return $this->getViewState('LoginButtonImageUrl','');
- }
- public function setLoginButtonImageUrl($value)
- {
- $this->setViewState('LoginButtonImageUrl',TPropertyValue::ensureString($value),'');
- }
- public function getLoginButtonStyle()
- {
- return $this->_loginButtonStyle;
- }
- public function getLoginButtonText()
- {
- return $this->getViewState('LoginButtonText','Login');
- }
- public function setLoginButtonText($value)
- {
- $this->setViewState('LoginButtonText',TPropertyValue::ensureString($value),'Login');
- }
- public function getLoginButtonType()
- {
- return $this->getViewState('LoginButtonType',TButtonColumnType::PushButton);
- }
- public function setLoginButtonType($value)
- {
- $this->setViewState('LoginButtonType',TPropertyValue::ensureEnum($value,'TButtonColumnType'),TButtonColumnType::PushButton);
- }
- public function getMembershipProvider()
- {
- return $this->getViewState('MembershipProvider','');
- }
- public function setMembershipProvider($value)
- {
- $this->setViewState('MembershipProvider',TPropertyValue::ensureString($value),'');
- }
- public function getOrientation()
- {
- return $this->getViewState('Orientation',TOrientation::Horizontal);
- }
- public function setOrientation($value)
- {
- $this->setViewState('Orientation',TPropertyValue::ensureEnum($value,'TOrientation'),TOrientation::Horizontal);
- }
- public function getPassword()
- {
- return $this->_password;
- }
- public function getPasswordInternal()
- {
- return $this->_passwordInternal;
- }
- public function getPasswordLabelText()
- {
- return $this->getViewState('PasswordLabelText','Password:');
- }
- public function setPasswordLabelText($value)
- {
- $this->setViewState('PasswordLabelText',TPropertyValue::ensureString($value),'Password:');
- }
- public function getPasswordRecoveryIconUrl()
- {
- return $this->getViewState('PasswordRecoveryIconUrl','');
- }
- public function setPasswordRecoveryIconUrl($value)
- {
- $this->setViewState('PasswordRecoveryIconUrl',TPropertyValue::ensureString($value),'');
- }
- public function getPasswordRecoveryText()
- {
- return $this->getViewState('PasswordRecoveryText','');
- }
- public function setPasswordRecoveryText($value)
- {
- $this->setViewState('PasswordRecoveryText',TPropertyValue::ensureString($value),'');
- }
- public function getPasswordRecoveryUrl()
- {
- return $this->getViewState('PasswordRecoveryUrl','');
- }
- public function setPasswordRecoveryUrl($value)
- {
- $this->setViewState('PasswordRecoveryUrl',TPropertyValue::ensureString($value),'');
- }
- public function getPasswordRequiredErrorMessage()
- {
- return $this->getViewState('PasswordRequiredErrorMessage','A Password Is Required');
- }
- public function setPasswordRequiredErrorMessage($value)
- {
- $this->setViewState('PasswordRequiredErrorMessage',TPropertyValue::ensureString($value),'A Password Is Required');
- }
- public function getRememberMeSet()
- {
- return $this->getViewState('RememberMeSet',false);
- }
- public function setRememberMeSet($value)
- {
- $this->setViewState('RememberMeSet',TPropertyValue::ensureBoolean($value),false);
- }
- public function getRememberMeText()
- {
- return $this->getViewState('RememberMeText','Remember Me Next Time:');
- }
- public function setRememberMeText($value)
- {
- $this->setViewState('RememberMeText',TPropertyValue::ensureString($value),'Remember Me Next Time:');
- }
- public function getTagKey()
- {
- //return HtmlTextWriterTag.Table;
- }
- public function getTemplateContainer()
- {
- $this->ensureChildControls();
- return $this->_templateContainer;
- }
- public function getTextBoxStyle()
- {
- return $this->_textBoxStyle;
- }
- public function getTextLayout()
- {
- return $this->getViewState('TextLayout',TLoginTextLayout::TextOnLeft);
- }
- public function setTextLayout($value)
- {
- $this->setViewState('TextLayout',TPropertyValue::ensureEnum($value,'TLoginTextLayout'),TLoginTextLayout::TextOnLeft);
- // parent::ChildControlsCreated=false;
- }
- public function getTitleText()
- {
- return $this->getViewState('TitleText','Log In');
- }
- public function setTitleText($value)
- {
- $this->setViewState('TitleText',TPropertyValue::ensureString($value),'Log In');
- }
- public function getTitleTextStyle()
- {
- return $this->_titleTextStyle;
- }
- public function getUserName()
- {
- return $this->getViewState('UserName','');
- }
- public function setUserName($value)
- {
- $this->setViewState('UserName',TPropertyValue::ensureString($value),'');
- }
- public function getUserNameInternal()
- {
- $this->_userNameInternal;
- }
- public function getUserNameLabelText()
- {
- return $this->getViewState('UserNameLabelText','User Name:');
- }
- public function setUserNameLabelText($value)
- {
- $this->setViewState('UserNameLabelText',TPropertyValue::ensureString($value),'User Name:');
- }
- public function getUserNameRequiredErrorMessage()
- {
- return $this->getViewState('UserNameRequiredErrorMessage','A User Name Is Required');
- }
- public function setUserNameRequiredErrorMessage($value)
- {
- $this->setViewState('UserNameRequiredErrorMessage',TPropertyValue::ensureString($value),'A User Name Is Required');
- }
- public function getValidatorTextStyle()
- {
- return $this->_validatorTextStyle;
- }
- public function getVisibleWhenLoggedIn()
- {
- return $this->getViewState('VisibleWhenLoggedIn',true);
- }
- public function setVisibleWhenLoggedIn($value)
- {
- $this->setViewState('VisibleWhenLoggedIn',TPropertyValue::ensureBoolean($value),true);
- }
- private function attemptLogin()
- {
- echo TVarDumper::dump(__METHOD__,10,true);
- if (($this->getPage() === null) || $this->getPage()->getIsValid())
- {
- // $args1 = new LoginCancelEventArgs();
- $this->onLoggingIn($args1);
- if (!$args1.Cancel)
- {
- // $args2 = new AuthenticateEventArgs();
- $this->onAuthenticate($args2);
- if ($args2.Authenticated)
- {
- TFormsAuthentication::SetAuthCookie($this->getUserNameInternal(),$this->getRememberMeSet());
- // $this->onLoggedIn(EventArgs.Empty);
- $this->getPage()->getResponse()->redirect($this->getRedirectUrl(),false);
- }
- else
- {
- // $this->onLoginError(EventArgs.Empty);
- if ($this->getFailureAction() === TLoginFailureAction::RedirectToLoginPage)
- {
- TFormsAuthentication::RedirectToLoginPage("loginfailure=1");
- }
- $control1 = $this->getTemplateContainer()->getFailureTextLabel();
- if ($control1 !== null)
- {
- $control1->setText($this->getFailureText());
- }
- }
- }
- }
- }
- private function authenticateUsingMembershipProvider($param)
- {
- echo TVarDumper::dump(__METHOD__,10,true);
- TLoginUtil::getProvider($this->getMembershipProvider())->validateUser($this->getUserNameInternal(),$this->getPasswordInternal());
- // e.Authenticated = LoginUtil.GetProvider(this.MembershipProvider).ValidateUser(this.UserNameInternal,this.PasswordInternal);
- }
- private function getRedirectUrl()
- {
- if ($this->onLoginPage())
- {
- $text1 = TFormsAuthentication::GetReturnUrl(false);
- if ($text1!==null || strlen($text1) === 0)
- {
- return $text1;
- }
- $text2 = $this->getDestinationPageUrl();
- if ($text2!==null || strlen($text2) === 0)
- {
- // return base.ResolveClientUrl($text2);
- }
- return TFormsAuthentication::getDefaultUrl();
- }
- $text3 = $this->getDestinationPageUrl();
- if ($text3!==null || strlen($text3) === 0)
- {
- // return base.ResolveClientUrl($text3);
- }
- if (($this->getPage()->getForm() !== null))
- {
- return $this->getPage()->getRequest()->getPathInfo();
- }
- return $this->getPage()->getRequest()->getPathInfo();
- }
- public function onAuthenticate($param)
- {
- echo TVarDumper::dump(__METHOD__,10,true);
- // AuthenticateEventHandler handler1 = (AuthenticateEventHandler) base.Events[Login.EventAuthenticate];
- $handler1;
- if ($handler1!==null)
- {
- $handler1($this,$param);
- }
- else
- {
- $this->authenticateUsingMembershipProvider($param);
- }
- }
- public function onBubbleEvent($sender,$param)
- {
- echo TVarDumper::dump(__METHOD__,10,true);
- // bool flag1 = false;
- // if (e is CommandEventArgs)
- // {
- // CommandEventArgs args1 = (CommandEventArts) e;
- // if (string.Equals(args1.CommandName,Login.LoginButtonCommandName,StringComparison.OrdinalIgnoreCase))
- // {
- // this.AttemptLogin();
- // flag1=true;
- // }
- // }
- // return flag1;
- }
- public function onLoggedIn($param)
- {
- echo TVarDumper::dump(__METHOD__,10,true);
- // EventHandler handler1 = (EventHandler) base.Events[Login.EventLoggedIn];
- // if ($handler1!==null)
- // {
- // $handler1($this,$param);
- // }
- }
- public function onLoggingIn($param)
- {
- echo TVarDumper::dump(__METHOD__,10,true);
- // LoginCancelEventHandler handler1 = (LoginCancelEventHandler) base.Events[Login.EventLoggingIn];
- // if ($handler1!==null)
- // {
- // $handler1($this,$param);
- // }
- }
- public function onLoginError($param)
- {
- echo TVarDumper::dump(__METHOD__,10,true);
- // EventHandler handler1 = (EventHandler) base.Events[Login.EventLoginError];
- // if ($handler1!==null)
- // {
- // $handler1($this,$param);
- // }
- }
- private function onLoginPage()
- {
-
- }
- public function onPreRender($param)
- {
- parent::onPreRender($param);
- $this->setEditableChildProperties();
- $this->_templateContainer->setVisible(($this->getVisibleWhenLoggedIn() || !$this->getPage()->getRequest()->IsAuthenticated()) || $this->onLoginPage());
- }
- private function passwordTextChanged($sender,$param)
- {
- $this->_password = $sender->Text;
- }
- private function redirectedFromFailedLogin()
- {
-
- }
- private function rememberMeCheckedChanged($sender,$param)
- {
- $this->_rememberMeSet = $sender->Checked;
- }
- public function render($writer)
- {
- // echo TVarDumper::dump(__METHOD__,10,true);
- if ($this->_templateContainer->getVisible())
- {
- $this->setChildProperties();
- $this->renderChildren($writer);
- }
- }
- public function createChildControls()
- {
- // echo TVarDumper::dump(__METHOD__,10,true);
- $this->getControls()->clear();
- $this->_templateContainer = new TLoginContainer($this);
- $template1 = new TLoginTemplate($this);
- $template1->instantiateIn($this->_templateContainer);
- $this->_templateContainer->setVisible(true);
- $this->getControls()->add($this->_templateContainer);
- $this->setEditableChildProperties();
- }
- // protected function saveViewState()
- // {
-
- // }
- public function setChildProperties()
- {
- // echo TVarDumper::dump(__METHOD__,10,true);
- $this->setCommonChildProperties();
- if ($this->_layoutTemplate === null)
- {
- $this->setDefaultTemplateChildProperties();
- }
- }
- private function setCommonChildProperties()
- {
- // echo TVarDumper::dump(__METHOD__,10,true);
- /* @VAR $container1 TLoginContainer */
- $container1 = $this->_templateContainer;
-
- }
- private function setDefaultTemplateChildProperties()
- {
- // echo TVarDumper::dump(__METHOD__,10,true);
- /* @VAR $container1 TLoginContainer */
- $container1 = $this->_templateContainer;
- $container1->getBorderTable()->setCellPadding($this->getBorderPadding());
- $container1->getBorderTable()->setCellSpacing(0);
-
- $literal1 = $container1->getTitle();
- $text1 = $this->getTitleText();
- if (strlen($text1)>0)
- {
- $literal1->setText($text1);
- if ($this->_titleTextStyle !== null)
- {
- TLoginUtil::setTableCellStyle($literal1,$this->_titleTextStyle);
- }
- TLoginUtil::setTableCellVisible($literal1,true);
- }
- else
- {
- TLoginUtil::setTableCellVisible($literal1,false);
- }
- $literal2 = $container1->getInstruction();
- $text2 = $this->getInstructionText();
- if (strlen($text2)>0)
- {
- $literal2->setText($text2);
- if ($this->_instructionTextStyle !== null)
- {
- TLoginUtil::setTableCellStyle($literal2,$this->_instructionTextStyle);
- }
- TLoginUtil::setTableCellVisible($literal2,true);
- }
- else
- {
- TLoginUtil::setTableCellVisible($literal2,false);
- }
- $control1 = $container1->getUserNameLabel();
- $text3 = $this->getUserNameLabelText();
- if (strlen($text3)>0)
- {
- $control1->setText($text3);
- if ($this->_instructionTextStyle !== null)
- {
- TLoginUtil::setTableCellStyle($control1,$this->_labelStyle);
- }
- TLoginUtil::setTableCellVisible($control1,true);
- }
- else
- {
- TLoginUtil::setTableCellVisible($control1,false);
- }
- $control2 = $container1->getUserNameTextBox();
- if ($this->_textBoxStyle !== null)
- {
- // $control2->ApplyStyle(this.TextBoxStyle);//This comes from WebControl
- }
- // $control2->setTabIndex($this->getTabIndex());//This comes from WebControl
- // $control2->setAccessKey($this->getAccessKey());//This comes from WebControl
- $flag1 = true;
- /* @VAR $validator1 TRequiredFieldValidator */
- $validator1 = $container1->getUserNameRequired();
- $validator1->setErrorMessage($this->getUserNameRequiredErrorMessage());
- $validator1->setToolTip($this->getUserNameRequiredErrorMessage());
- $validator1->setEnabled($flag1);
- $validator1->setVisible($flag1);
- if ($this->_validatorTextStyle !== null)
- {
- // validator1.ApplyStyle(this._validatorTextStyle);
- }
- $control3 = $container1->getPasswordLabel();
- $text4 = $this->getPasswordLabelText();
- if (strlen($text4) > 0)
- {
- $control3->setText($text4);
- if ($this->_labelStyle !== null)
- {
- TLoginUtil::setTableCellStyle($control3,$this->_labelStyle);
- }
- $control3->setVisible(true);
- }
- else
- {
- $control3->setVisible(false);
- }
- $control4 = $container1->getPasswordTextBox();
- if ($this->_textBoxStyle !== null)
- {
- // control4.ApplyStyle(this.TextBoxStyle);
- }
- // $control4.TabIndex = this.TabIndex;
- $validator2 = $container1->getPasswordRequired();
- $validator2->setErrorMessage($this->getPasswordRequiredErrorMessage());
- $validator2->setToolTip($this->getPasswordRequiredErrorMessage());
- $validator2->setEnabled($flag1);
- $validator2->setVisible($flag1);
- if ($this->_validatorTextStyle !== null)
- {
- // validator2.ApplyStyle(this._validatorTextStyle);
- }
- $box1 = $container1->getRememberMeCheckBox();
- if ($this->getDisplayRememberMe())
- {
- $box1->setText($this->getRememberMeText());
- if ($this->_checkBoxStyle !== null)
- {
- TLoginUtil::setTableCellStyle($box1,$this->getCheckBoxStyle());
- }
- TLoginUtil::setTableCellVisible($box1,true);
- }
- else
- {
- TLoginUtil::setTableCellVisible($box1,false);
- }
- // box1.TabIndex = this.TabIndex;
- $button1 = $container1->getLinkButton();
- $button2 = $container1->getImageButton();
- $button3 = $container1->getPushButton();
- $control5 = null;
- switch ($this->getLoginButtonType())
- {
- case TButtonColumnType::PushButton:
- $button3->setText($this->getLoginButtonText());
- $control5 = $button3;
- break;
- case TButtonColumnType::ImageButton:
- $button2->setImageUrl($this->getLoginButtonImageUrl());
- $button2->setAlternateText($this->getLoginButtonText());
- $control5 = $button2;
- break;
-
- case TButtonColumnType::LinkButton:
- $button1->setText($this->getLoginButtonText());
- $control5 = $button1;
- break;
- }
- $button1->setVisible(false);
- $button2->setVisible(false);
- $button3->setVisible(false);
- $control5->setVisible(true);
- // control5.TabIndex = this.TabIndex;
- if ($this->getLoginButtonStyle() !== null)
- {
- // control5.ApplyStyle(this.LoginButtonStyle);
- }
- $image1 = $container1->getCreateUserIcon();
- $link1 = $container1->getCreateUserLink();
- $control6 = $container1->getCreateUserLinkSeparator();
- $link2 = $container1->getPasswordRecoveryLink();
- $image2 = $container1->getPasswordRecoveryIcon();
- $link3 = $container1->getHelpPageLink();
- $image3 = $container1->getHelpPageIcon();
- $control7 = $container1->getPasswordRecoveryLinkSeparator();
- $text5 = $this->getCreateUserText();
- $text6 = $this->getCreateUserIconUrl();
- $text7 = $this->getPasswordRecoveryText();
- $text8 = $this->getPasswordRecoveryIconUrl();
- $text9 = $this->getHelpPageText();
- $text10 = $this->getHelpPageIconUrl();
- $flag2 = strlen($text5) > 0;
- $flag3 = strlen($text7) > 0;
- $flag4 = strlen($text9) > 0;
- $flag5 = strlen($text10) > 0;
- $flag6 = strlen($text6) > 0;
- $flag7 = strlen($text8) > 0;
- $flag8 = $flag4 || $flag5;
- $flag9 = $flag2 || $flag6;
- $flag10 = $flag3 || $flag7;
- $link3->setVisible($flag4);
- $control7->setVisible($flag8 && ($flag10 || $flag9));
- if ($flag4)
- {
- $link3->setText($text9);
- $link3->setNavigateUrl($this->getHelpPageUrl());
- // $link3->setTabIndex($this.TabIndex);
- }
- $image3->setVisible($flag5);
- if ($flag5)
- {
- $image3->setImageUrl($text10);
- $image3->setAlternateText($this->getHelpPageText());
- }
- $link1->setVisible($flag2);
- $control6->setVisible($flag9 && $flag10);
- if ($flag2)
- {
- $link1->setText($text5);
- $link1->setNavigateUrl($this->getCreateUserUrl());
- // $link1->setTabIndex($this.TabIndex);
- }
- $image1->setVisible($flag6);
- if ($flag6)
- {
- $image1->setImageUrl($text6);
- $image1->setAlternateText($this->getCreateUserText());
- }
- $link2->setVisible($flag3);
- if ($flag3)
- {
- $link2->setText($text7);
- $link2->setNavigateUrl($this->getPasswordRecoveryUrl());
- // $link2->setTabIndex($this.TabIndex);
- }
- $image2->setVisible($flag7);
- if ($flag7)
- {
- $image2->setImageUrl($text8);
- $image2->setAlternateText($this->getPasswordRecoveryText());
- }
- if (($flag9 || $flag10) || $flag8)
- {
- if ($this->getHyperLinkStyle() !== null)
- {
- $style1 = new TTableItemStyle();
- // $style1.CopyFrom($this->getHyperLinkStyle());
- $style1->getFont()->reset();
- TLoginUtil::setTableCellStyle($link1,$style1);
- // $link1.Font.CopyFrom(this.HyperLinkStyle.Font);
- // $link1.ForeColor = this.HyperLinkStyle.ForeColor;
- // $link2.Font.CopyFrom(this.HyperLinkStyle.Font);
- // $link2.ForeColor = this.HyperLinkStyle.ForeColor;
- // $link3.Font.CopyFrom(this.HyperLinkStyle.Font);
- // $link3.ForeColor = this.HyperLinkStyle.ForeColor;
- }
- TLoginUtil::setTableCellVisible($link3, true);
- }
- else
- {
- TLoginUtil::setTableCellVisible($link3, false);
- }
- $control8 = $container1->getFailureTextLabel();
- if (strlen($control8->getText()) > 0)
- {
- TLoginUtil::setTableCellStyle($control8, $this->getFailureTextStyle());
- TLoginUtil::setTableCellVisible($control8, true);
- }
- else
- {
- TLoginUtil::setTableCellVisible($control8, false);
- }
- }
- private function setEditableChildProperties()
- {
- // echo TVarDumper::dump(__METHOD__,10,true);
- }
- // protected function trackViewState()
- // {
-
- // }
- private function userNameTextChanged($sender,$param)
- {
- $this->_userName = $sender->Text;
- }
-}
-
-class TLoginTemplate implements ITemplate
-{
- private $_owner;
-
- public function __construct($owner)
- {
- // echo TVarDumper::dump(__METHOD__,10,true);
- $this->_owner=$owner;
- }
-
- private function createControls(TLoginContainer $loginContainer)
- {
- // echo TVarDumper::dump(__METHOD__,10,true);
- $text1 = $this->_owner->getUniqueID();
- $literal1 = new TLiteral();
- $loginContainer->setTitle($literal1);
- $literal2 = new TLiteral();
- $loginContainer->setInstruction($literal2);
- $box1 = new TTextBox();
- $box1->setID('UserName');
- $loginContainer->setUserNameTextBox($box1);
- $label1 = new TLabel();
- $loginContainer->setUserNameLabel($label1);
- $flag1 = true;
- $validator1 = new TRequiredFieldValidator();
- $validator1->setID('UserNameRequired');
- $validator1->setValidationGroup($text1);
- $validator1->setControlToValidate($box1->getID());
- $validator1->setDisplay(TValidatorDisplayStyle::Dynamic);
- $validator1->setText('*');
- $validator1->setEnabled($flag1);
- $validator1->setVisible($flag1);
- $loginContainer->setUserNameRequired($validator1);
- $box2 = new TTextBox();
- $box2->setID('Password');
- $box2->setTextMode(TTextBoxMode::Password);
- $loginContainer->setPasswordTextBox($box2);
- $label2 = new TLabel();
- $loginContainer->setPasswordLabel($label2);
- $validator2 = new TRequiredFieldValidator();
- $validator2->setID('PasswordRequired');
- $validator2->setValidationGroup($text1);
- $validator2->setControlToValidate($box2->getID());
- $validator2->setDisplay(TValidatorDisplayStyle::Dynamic);
- $validator2->setText('*');
- $validator2->setEnabled($flag1);
- $validator2->setVisible($flag1);
- $loginContainer->setPasswordRequired($validator2);
- $box3 = new TCheckBox();
- $box3->setID('RememberMe');
- $loginContainer->setRememberMeCheckBox($box3);
- $button1 = new TLinkButton();
- $button1->setID('LoginLinkButton');
- $button1->setValidationGroup($text1);
- // $button1->setCommandName(TLogin::LoginButtonCommandName);
- $loginContainer->setLinkButton($button1);
- $button2 = new TImageButton();
- $button2->setID('LoginImageButton');
- $button2->setValidationGroup($text1);
- // $button2->setCommandName(TLogin::LoginButtonCommandName);
- $loginContainer->setImageButton($button2);
- $button3 = new TButton();
- $button3->setID('LoginButton');
- $button3->setValidationGroup($text1);
- // $button3->setCommandName(TLogin::LoginButtonCommandName);
- $loginContainer->setPushButton($button3);
- $link1 = new THyperLink();
- $link1->setID('PasswordRecoveryLink');
- $loginContainer->setPasswordRecoveryLink($link1);
- $control1 = new TLiteral();
- $loginContainer->setPasswordRecoveryLinkSeparator($control1);
- $link2 = new THyperLink();
- $link2->setID('CreateUserLink');
- $loginContainer->setCreateUserLink($link2);
- $control2 = new TLiteral();
- $loginContainer->setCreateUserLinkSeparator($control2);
- $link3 = new THyperLink();
- $link3->setID('HelpLink');
- $loginContainer->setHelpPageLink($link3);
- $literal3 = new TLiteral();
- $literal3->setID('FailureText');
- $loginContainer->setFailureTextLabel($literal3);
- $loginContainer->setPasswordRecoveryIcon(new TImage());
- $loginContainer->setPasswordRecoveryIcon(new TImage());
- $loginContainer->setHelpPageIcon(new TImage());
- $loginContainer->setCreateUserIcon(new TImage());
- }
- private function layoutControls(TLoginContainer $loginContainer)
- {
- $orientation1 = $this->_owner->getOrientation();
- $layout1 = $this->_owner->getTextLayout();
-
- if (($orientation1 === TOrientation::Vertical) && ($layout1 === TLoginTextLayout::TextOnLeft))
- {
- $this->layoutVerticalTextOnLeft($loginContainer);
- }
- elseif (($orientation1 === TOrientation::Vertical) && ($layout1 === TLoginTextLayout::TextOnTop))
- {
- $this->layoutVerticalTextOnTop($loginContainer);
- }
- elseif (($orientation1 === TOrientation::Horizontal) && ($layout1 === TLoginTextLayout::TextOnLeft))
- {
- $this->layoutHorizontalTextOnLeft($loginContainer);
- }
- else
- {
- $this->layoutHorizontalTextOnTop($loginContainer);
- }
- }
- private function layoutHorizontalTextOnLeft(TLoginContainer $loginContainer)
- {
- $table1 = new TTable();
- $table1->setCellPadding(0);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(6);
- $cell1->setHorizontalAlign(THorizontalAlign::Center);
- $cell1->getControls()->add($loginContainer->getTitle());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(6);
- $cell1->setHorizontalAlign(THorizontalAlign::Center);
- $cell1->getControls()->add($loginContainer->getInstruction());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- if ($this->_owner->getConvertingToTemplate())
- {
- // $loginContainer->getUserNameLabel()->RenderAsLabel = true;
- }
- $cell1->getControls()->add($loginContainer->getUserNameLabel());
- $row1->getCells()->add($cell1);
- $cell1 = new TTableCell();
- $cell1->getControls()->add($loginContainer->getUserNameTextBox());
- $cell1->getControls()->add($loginContainer->getUserNameRequired());
- $row1->getCells()->add($cell1);
- $cell1 = new TTableCell();
- if ($this->_owner->getConvertingToTemplate())
- {
- // $loginContainer->getPasswordLabel()->RenderAsLabel = true;
- }
- $cell1->getControls()->add($loginContainer->getPasswordLabel());
- $row1->getCells()->add($cell1);
- $cell1 = new TTableCell();
- $cell1->getControls()->add($loginContainer->getPasswordTextBox());
- $cell1->getControls()->add($loginContainer->getPasswordRequired());
- $row1->getCells()->add($cell1);
- $cell1 = new TTableCell();
- $cell1->getControls()->add($loginContainer->getRememberMeCheckBox());
- $row1->getCells()->add($cell1);
- $cell1 = new TTableCell();
- $cell1->getControls()->add($loginContainer->getLinkButton());
- $cell1->getControls()->add($loginContainer->getImageButton());
- $cell1->getControls()->add($loginContainer->getPushButton());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(6);
- $cell1->getControls()->add($loginContainer->getFailureTextLabel());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(6);
- $loginContainer->getCreateUserLinkSeparator()->setText('');
- $loginContainer->getPasswordRecoveryLinkSeparator()->setText('');
- $cell1->getControls()->add($loginContainer->getCreateUserIcon());
- $cell1->getControls()->add($loginContainer->getCreateUserLink());
- $cell1->getControls()->add($loginContainer->getCreateUserLinkSeparator());
- $cell1->getControls()->add($loginContainer->getPasswordRecoveryIcon());
- $cell1->getControls()->add($loginContainer->getPasswordRecoveryLink());
- $cell1->getControls()->add($loginContainer->getPasswordRecoveryLinkSeparator());
- $cell1->getControls()->add($loginContainer->getHelpPageIcon());
- $cell1->getControls()->add($loginContainer->getHelpPageLink());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $table2 = TLoginUtil::createChildTable($this->_owner->getConvertingToTemplate());
- $row1 = new TTableRow();
- $cell1 = new TTableCell();
- $cell1->getControls()->add($table1);
- $row1->getCells()->add($cell1);
- $table2->getRows()->add($row1);
- $loginContainer->setLayoutTable($table1);
- $loginContainer->setBorderTable($table2);
- $loginContainer->getControls()->add($table2);
- }
- private function layoutHorizontalTextOnTop(TLoginContainer $loginContainer)
- {
- $table1 = new TTable();
- $table1->setCellPadding(0);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(4);
- $cell1->setHorizontalAlign(THorizontalAlign::Center);
- $cell1->getControls()->add($loginContainer->getTitle());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(4);
- $cell1->setHorizontalAlign(THorizontalAlign::Center);
- $cell1->getControls()->add($loginContainer->getInstruction());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- if ($this->_owner->getConvertingToTemplate())
- {
- // $loginContainer->getUserNameLabel()->RenderAsLabel = true;
- }
- $cell1->getControls()->add($loginContainer->getUserNameLabel());
- $row1->getCells()->add($cell1);
- $cell1 = new TTableCell();
- if ($this->_owner->getConvertingToTemplate())
- {
- // $loginContainer->getPasswordLabel()->RenderAsLabel = true;
- }
- $cell1->getControls()->add($loginContainer->getPasswordLabel());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->getControls()->add($loginContainer->getUserNameTextBox());
- $cell1->getControls()->add($loginContainer->getUserNameRequired());
- $row1->getCells()->add($cell1);
- $cell1 = new TTableCell();
- $cell1->getControls()->add($loginContainer->getPasswordTextBox());
- $cell1->getControls()->add($loginContainer->getPasswordRequired());
- $row1->getCells()->add($cell1);
- $cell1 = new TTableCell();
- $cell1->getControls()->add($loginContainer->getRememberMeCheckBox());
- $row1->getCells()->add($cell1);
- $cell1 = new TTableCell();
- $cell1->setHorizontalAlign(THorizontalAlign::Right);
- $cell1->getControls()->add($loginContainer->getLinkButton());
- $cell1->getControls()->add($loginContainer->getImageButton());
- $cell1->getControls()->add($loginContainer->getPushButton());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(4);
- $cell1->getControls()->add($loginContainer->getFailureTextLabel());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(4);
- $loginContainer->getCreateUserLinkSeparator()->setText('');
- $loginContainer->getPasswordRecoveryLinkSeparator()->setText('');
- $cell1->getControls()->add($loginContainer->getCreateUserIcon());
- $cell1->getControls()->add($loginContainer->getCreateUserLink());
- $cell1->getControls()->add($loginContainer->getCreateUserLinkSeparator());
- $cell1->getControls()->add($loginContainer->getPasswordRecoveryIcon());
- $cell1->getControls()->add($loginContainer->getPasswordRecoveryLink());
- $cell1->getControls()->add($loginContainer->getPasswordRecoveryLinkSeparator());
- $cell1->getControls()->add($loginContainer->getHelpPageIcon());
- $cell1->getControls()->add($loginContainer->getHelpPageLink());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $table2 = TLoginUtil::createChildTable($this->_owner->getConvertingToTemplate());
- $row1 = new TTableRow();
- $cell1 = new TTableCell();
- $cell1->getControls()->add($table1);
- $row1->getCells()->add($cell1);
- $table2->getRows()->add($row1);
- $loginContainer->setLayoutTable($table1);
- $loginContainer->setBorderTable($table2);
- $loginContainer->getControls()->add($table2);
- }
- private function layoutVerticalTextOnLeft(TLoginContainer $loginContainer)
- {
- $table1 = new TTable();
- $table1->setCellPadding(0);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(2);
- $cell1->setHorizontalAlign(THorizontalAlign::Center);
- $cell1->getControls()->add($loginContainer->getTitle());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(2);
- $cell1->setHorizontalAlign(THorizontalAlign::Center);
- $cell1->getControls()->add($loginContainer->getInstruction());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setHorizontalAlign(THorizontalAlign::Right);
- if ($this->_owner->getConvertingToTemplate())
- {
- // $loginContainer->getUserNameLabel()->RenderAsLabel = true;
- }
- $cell1->getControls()->add($loginContainer->getUserNameLabel());
- $row1->getCells()->add($cell1);
- $cell1 = new TTableCell();
- $cell1->getControls()->add($loginContainer->getUserNameTextBox());
- $cell1->getControls()->add($loginContainer->getUserNameRequired());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setHorizontalAlign(THorizontalAlign::Right);
- if ($this->_owner->getConvertingToTemplate())
- {
- // $loginContainer->getPasswordLabel()->RenderAsLabel = true;
- }
- $cell1->getControls()->add($loginContainer->getPasswordLabel());
- $row1->getCells()->add($cell1);
- $cell1 = new TTableCell();
- $cell1->getControls()->add($loginContainer->getPasswordTextBox());
- $cell1->getControls()->add($loginContainer->getPasswordRequired());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(2);
- $cell1->getControls()->add($loginContainer->getRememberMeCheckBox());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(2);
- $cell1->setHorizontalAlign(THorizontalAlign::Center);
- $cell1->getControls()->add($loginContainer->getFailureTextLabel());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(2);
- $cell1->setHorizontalAlign(THorizontalAlign::Right);
- $cell1->getControls()->add($loginContainer->getLinkButton());
- $cell1->getControls()->add($loginContainer->getImageButton());
- $cell1->getControls()->add($loginContainer->getPushButton());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(2);
- $loginContainer->getPasswordRecoveryLinkSeparator()->setText('<br />');
- $loginContainer->getCreateUserLinkSeparator()->setText('<br />');
- $cell1->getControls()->add($loginContainer->getCreateUserIcon());
- $cell1->getControls()->add($loginContainer->getCreateUserLink());
- $cell1->getControls()->add($loginContainer->getCreateUserLinkSeparator());
- $cell1->getControls()->add($loginContainer->getPasswordRecoveryIcon());
- $cell1->getControls()->add($loginContainer->getPasswordRecoveryLink());
- $cell1->getControls()->add($loginContainer->getPasswordRecoveryLinkSeparator());
- $cell1->getControls()->add($loginContainer->getHelpPageIcon());
- $cell1->getControls()->add($loginContainer->getHelpPageLink());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $table2 = TLoginUtil::createChildTable($this->_owner->getConvertingToTemplate());
- $row1 = new TTableRow();
- $cell1 = new TTableCell();
- $cell1->getControls()->add($table1);
- $row1->getCells()->add($cell1);
- $table2->getRows()->add($row1);
- $loginContainer->setLayoutTable($table1);
- $loginContainer->setBorderTable($table2);
- $loginContainer->getControls()->add($table2);
- }
- private function layoutVerticalTextOnTop(TLoginContainer $loginContainer)
- {
- $table1 = new TTable();
- $table1->setCellPadding(0);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setColumnSpan(2);
- $cell1->setHorizontalAlign(THorizontalAlign::Center);
- $cell1->getControls()->add($loginContainer->getTitle());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setHorizontalAlign(THorizontalAlign::Center);
- $cell1->getControls()->add($loginContainer->getInstruction());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- if ($this->_owner->getConvertingToTemplate())
- {
- // $loginContainer->getUserNameLabel()->RenderAsLabel = true;
- }
- $cell1->getControls()->add($loginContainer->getUserNameLabel());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->getControls()->add($loginContainer->getUserNameTextBox());
- $cell1->getControls()->add($loginContainer->getUserNameRequired());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- if ($this->_owner->getConvertingToTemplate())
- {
- // $loginContainer->getPasswordLabel()->RenderAsLabel = true;
- }
- $cell1->getControls()->add($loginContainer->getPasswordLabel());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->getControls()->add($loginContainer->getPasswordTextBox());
- $cell1->getControls()->add($loginContainer->getPasswordRequired());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->getControls()->add($loginContainer->getRememberMeCheckBox());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setHorizontalAlign(THorizontalAlign::Center);
- $cell1->getControls()->add($loginContainer->getFailureTextLabel());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $cell1->setHorizontalAlign(THorizontalAlign::Right);
- $cell1->getControls()->add($loginContainer->getLinkButton());
- $cell1->getControls()->add($loginContainer->getImageButton());
- $cell1->getControls()->add($loginContainer->getPushButton());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $row1 = new TDisappearingTableRow();
- $cell1 = new TTableCell();
- $loginContainer->getPasswordRecoveryLinkSeparator()->setText('<br />');
- $loginContainer->getCreateUserLinkSeparator()->setText('<br />');
- $cell1->getControls()->add($loginContainer->getCreateUserIcon());
- $cell1->getControls()->add($loginContainer->getCreateUserLink());
- $cell1->getControls()->add($loginContainer->getCreateUserLinkSeparator());
- $cell1->getControls()->add($loginContainer->getPasswordRecoveryIcon());
- $cell1->getControls()->add($loginContainer->getPasswordRecoveryLink());
- $cell1->getControls()->add($loginContainer->getPasswordRecoveryLinkSeparator());
- $cell1->getControls()->add($loginContainer->getHelpPageIcon());
- $cell1->getControls()->add($loginContainer->getHelpPageLink());
- $row1->getCells()->add($cell1);
- $table1->getRows()->add($row1);
- $table2 = TLoginUtil::createChildTable($this->_owner->getConvertingToTemplate());
- $row1 = new TTableRow();
- $cell1 = new TTableCell();
- $cell1->getControls()->add($table1);
- $row1->getCells()->add($cell1);
- $table2->getRows()->add($row1);
- $loginContainer->setLayoutTable($table1);
- $loginContainer->setBorderTable($table2);
- $loginContainer->getControls()->add($table2);
- }
- public function instantiateIn($parent)
- {
- // echo TVarDumper::dump(__METHOD__,10,true);
- $this->createControls($parent);
- $this->layoutControls($parent);
- }
-
-}
-
-Prado::using('System.Web.UI.WebControls.TLoginUtil');
-class TLoginContainer extends TGenericContainer
-{
- private $_convertingToTemplate=false;
- private $_createUserIcon;
- private $_createUserLink;
- private $_createUserLinkSeparator;
- private $_failureTextLabel;
- private $_helpPageIcon;
- private $_helpPageLink;
- private $_imageButton;
- private $_instruction;
- private $_linkButton;
- private $_passwordLabel;
- private $_passwordRecoveryIcon;
- private $_passwordRecoveryLink;
- private $_passwordRecoveryLinkSeparator;
- private $_passwordRequired;
- private $_passwordTextBox;
- private $_pushButton;
- private $_rememberMeCheckBox;
- private $_title;
- private $_userNameLabel;
- private $_userNameRequired;
- private $_userNameTextBox;
-
- public function getConvertingToTemplate()
- {
- return parent::getOwner()->getConvertingToTemplate();
- }
- public function getCreateUserIcon()
- {
- return $this->_createUserIcon;
- }
- public function setCreateUserIcon(TImage $value)
- {
- $this->_createUserIcon = TPropertyValue::ensureObject($value);
- }
- public function getCreateUserLink()
- {
- return $this->_createUserLink;
- }
- public function setCreateUserLink(THyperLink $value)
- {
- $this->_createUserLink = TPropertyValue::ensureObject($value);
- }
- public function getCreateUserLinkSeparator()
- {
- return $this->_createUserLinkSeparator;
- }
- public function setCreateUserLinkSeparator(TLiteral $value)
- {
- $this->_createUserLinkSeparator = TPropertyValue::ensureObject($value);
- }
- public function getFailureTextLabel()
- {
- return $this->_failureTextLabel;
- }
- public function setFailureTextLabel(TControl $value)
- {
- $this->_failureTextLabel = TPropertyValue::ensureObject($value);
- }
- public function getHelpPageIcon()
- {
- return $this->_helpPageIcon;
- }
- public function setHelpPageIcon(TImage $value)
- {
- $this->_helpPageIcon = TPropertyValue::ensureObject($value);
- }
- public function getHelpPageLink()
- {
- return $this->_helpPageLink;
- }
- public function setHelpPageLink(THyperLink $value)
- {
- $this->_helpPageLink = TPropertyValue::ensureObject($value);
- }
- public function getImageButton()
- {
- return $this->_imageButton;
- }
- public function setImageButton(TImageButton $value)
- {
- $this->_imageButton = TPropertyValue::ensureObject($value);
- }
- public function getInstruction()
- {
- return $this->_instruction;
- }
- public function setInstruction(TLiteral $value)
- {
- $this->_instruction = TPropertyValue::ensureObject($value);
- }
- public function getLinkButton()
- {
- return $this->_linkButton;
- }
- public function setLinkButton(TLinkButton $value)
- {
- $this->_linkButton = TPropertyValue::ensureObject($value);
- }
- public function getPasswordLabel()
- {
- return $this->_passwordLabel;
- }
- public function setPasswordLabel(TLabel $value)
- {
- $this->_passwordLabel = TPropertyValue::ensureObject($value);
- }
- public function getPasswordRecoveryIcon()
- {
- return $this->_passwordRecoveryIcon;
- }
- public function setPasswordRecoveryIcon(TImage $value)
- {
- $this->_passwordRecoveryIcon = TPropertyValue::ensureObject($value);
- }
- public function getPasswordRecoveryLink()
- {
- return $this->_passwordRecoveryLink;
- }
- public function setPasswordRecoveryLink(THyperLink $value)
- {
- $this->_passwordRecoveryLink = TPropertyValue::ensureObject($value);
- }
- public function getPasswordRecoveryLinkSeparator()
- {
- return $this->_passwordRecoveryLinkSeparator;
- }
- public function setPasswordRecoveryLinkSeparator($value)
- {
- $this->_passwordRecoveryLinkSeparator = TPropertyValue::ensureObject($value);
- }
- public function getPasswordRequired()
- {
- return $this->_passwordRequired;
- }
- public function setPasswordRequired(TRequiredFieldValidator $value)
- {
- $this->_passwordRequired = TPropertyValue::ensureObject($value);
- }
- public function getPasswordTextBox()
- {
- return $this->_passwordTextBox;
- }
- public function setPasswordTextBox(TControl $value)
- {
- $this->_passwordTextBox = TPropertyValue::ensureObject($value);
- }
- public function getPushButton()
- {
- return $this->_pushButton;
- }
- public function setPushButton(TControl $value)
- {
- $this->_pushButton = TPropertyValue::ensureObject($value);
- }
- public function getRememberMeCheckBox()
- {
- return $this->_rememberMeCheckBox;
- }
- public function setRememberMeCheckBox(TControl $value)
- {
- $this->_rememberMeCheckBox = TPropertyValue::ensureObject($value);
- }
- public function getTitle()
- {
- return $this->_title;
- }
- public function setTitle(TLiteral $value)
- {
- $this->_title = TPropertyValue::ensureObject($value);
- }
- public function getUserNameLabel()
- {
- return $this->_userNameLabel;
- }
- public function setUserNameLabel(TLabel $value)
- {
- $this->_userNameLabel = TPropertyValue::ensureObject($value);
- }
- public function getUserNameRequired()
- {
- return $this->_userNameRequired;
- }
- public function setUserNameRequired(TRequiredFieldValidator $value)
- {
- $this->_userNameRequired = TPropertyValue::ensureObject($value);
- }
- public function getUserNameTextBox()
- {
- return $this->_userNameTextBox;
- }
- public function setUserNameTextBox(TControl $value)
- {
- $this->_userNameTextBox = TPropertyValue::ensureObject($value);
- }
-}
-
-/**
- * TLoginFailureAction class.
- * Determines the page that the user will go to when a login attempt is not successful.
- *
- * RedirectToLoginPage Redirects the user to the login page defined in the site's
- * configuration files.
- * Refresh Refreshes the current page so that the Login control can display
- * an error message.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TLoginFailureAction.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.UI.WebControls
- * @since 3.1
- */
-class TLoginFailureAction extends TEnumerable
-{
- const RedirectToLoginPage='RedirectToLoginPage';
- const Refresh='Refresh';
-}
-/**
- * TLoginTextLayout class.
- * Specifies the position of labels relative to their associated text boxes for the Login control.
- *
- * TextOnLeft Places labels to the left of the associated text entry fields.
- * TextOnTop Places labels above the associated text entry fields.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TLoginTextLayout.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.UI.WebControls
- * @since 3.1
- */
-class TLoginTextLayout extends TEnumerable
-{
- const TextOnLeft='TextOnLeft';
- const TextOnTop='TextOnTop';
-}
-/**
- * TLogoutAction class.
- * Indicates the page that the user will be directed to when he or she logs out of the Web site.
- *
- * Redirect Redirects the user to a specified URL.
- * RedirectToLoginPage Redirects the user to the login page defined in the site's configuration files.
- * Refresh Reloads the current page with the user logged out.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TLogoutAction.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.UI.WebControls
- * @since 3.1
- */
-class TLogoutAction extends TEnumerable
-{
- const Redirect='Redirect';
- const RedirectToLoginPage='RedirectToLoginPage';
- const Refresh='Refresh';
-}
-?> \ No newline at end of file
diff --git a/framework/Web/UI/WebControls/TLoginName.php b/framework/Web/UI/WebControls/TLoginName.php
deleted file mode 100644
index 6367a5a2..00000000
--- a/framework/Web/UI/WebControls/TLoginName.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * TLoginName class.
- * Displays the value of the System.Web.UI.Page.User.Identity.Name property.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TLoginName.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.UI.WebControls
- * @since 3.1
- */
-class TLoginName extends TWebControl
-{
-
-}
-?> \ No newline at end of file
diff --git a/framework/Web/UI/WebControls/TLoginStatus.php b/framework/Web/UI/WebControls/TLoginStatus.php
deleted file mode 100644
index d82112de..00000000
--- a/framework/Web/UI/WebControls/TLoginStatus.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * TLoginStatus class.
- * Detects the user's authentication state and toggles the state of a link to log in to or log out of a Web site.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TLoginStatus.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.UI.WebControls
- * @since 3.1
- */
-class TLoginStatus extends TCompositeControl
-{
-
-}
-?> \ No newline at end of file
diff --git a/framework/Web/UI/WebControls/TLoginUtil.php b/framework/Web/UI/WebControls/TLoginUtil.php
deleted file mode 100644
index 10b3b2a9..00000000
--- a/framework/Web/UI/WebControls/TLoginUtil.php
+++ /dev/null
@@ -1,183 +0,0 @@
-<?php
-class TLoginUtil
-{
- const _passwordReplacementKey='<%\s*Password\s*%>';
- const _userNameReplacementKey='<%\s*UserName\s*%>';
-
- // public function onSendingMailDelegate($param)
- // {
- //
- // }
- // public function onSendMailErrorDelegate($param)
- // {
- //
- // }
- public static function createChildTable($convertingToTemplate)
- {
- if ($convertingToTemplate)
- {
- return new TTable();
- }
- else
- return new TTable();
- // else
- // return new TChildTable(2);
- }
- public static function applyStyleToLiteral(TLiteral $literal,$text,$setTableCellVisible)
- {
-
- }
- public static function copyBorderStyles(TControl $control,$style)
- {
- if (($style!==null) && strlen($providerName)!==0)
- {
- $control->BorderStyle = $style->BorderStyle;
- $control->BorderColor = $style->BorderColor;
- $control->BorderWidth = $style->BorderWidth;
- $control->BackColor = $style->BackColor;
- $control->CssClass = $style->CssClass;
- }
- }
- public static function copyStyleToInnerControl(TControl $control,$style)
- {
- if (($style!==null) && strlen($providerName)!==0)
- {
- $control->ForeColor = $style->ForeColor;
- $control->Font = $style->Font;
- }
- }
- private static function createMailMessage($email,$userName,$password,$mailDefinition,$defaultSubject,$defaultBody,$owner)
- {
-
- }
- public static function getProvider($providerName)
- {
- if (strlen($providerName)===0)
- {
- return TMembership::getProvider();
- }
- $provider1 = TMembership::getProviders($providerName);
- if ($provider1===null)
- {
- throw new TException('WebControl_CantFindProvider');
- }
- return $provider1;
- }
- public static function getUser(TControl $c)
- {
-
- }
- public static function getUserName(TControl $c)
- {
-
- }
- public static function sendPasswordMail($email,$userName,$password,$mailDefinition,$defaultSubject,$defaultBody,$onSendmailDelegate,$onSendMailErrorDelegate,$owner)
- {
-
- }
- public static function setTableCellStyle(TControl $control,$style)
- {
- // $control1 = $control->Parent;
- // if ($control1!==null)
- // {
- // $control1->ApplyStyle=$style;
- // }
- }
- public static function setTableCellVisible(TControl $control,$visible)
- {
- $control1 = $control->Parent;
- if ($control1!==null)
- {
- $control1->Visible=$visible;
- }
- }
-}
-class TDisappearingTableRow extends TTableRow
-{
- public function render($writer)
- {
- $flag1 = false;
- foreach ($this->getCells() as $cell1)
- {
- if ($cell1->getVisible())
- {
- $flag1 = true;
- break;
- }
- }
- if ($flag1)
- {
- parent::render($writer);
- }
- }
-}
-class TGenericContainer extends TWebControl
-{
- private $_borderTable;
- private $_convertingToTemplate=false;
- private $_layoutTable;
- private $_owner;
- private $_usingDefaultTemplate=false;
-
- public function getBorderTable()
- {
- return $this->_borderTable;
- }
- public function setBorderTable($value)
- {
- $this->_borderTable = $value;
- }
- public function getConvertingToTemplate()
- {
- return $this->_convertingToTemplate;
- }
- public function getLayoutTable()
- {
- return $this->_layoutTable;
- }
- public function setLayoutTable($value)
- {
- $this->_layoutTable = $value;
- }
- public function getOwner()
- {
- return $this->_owner;
- }
- public function getUsingDefaultTemplate()
- {
- return $this->_usingDefaultTemplate;
- }
- public function __construct($owner)
- {
- $this->_owner=$owner;
- }
- // public function findControl($id,$required,$errorResourceKey)
- // {
- //
- // }
- // protected function findOptionalControl($id)
- // {
- //
- // }
- // protected function findRequiredControl($id,$errorResourceKey)
- // {
- //
- // }
- // public function focus()
- // {
- //
- // }
- // public function render($writer)
- // {
- //
- // }
- // private function renderContentsInUnitTable($writer)
- // {
- //
- // }
- // protected function verifyControlNotPresent($id,$errorResourceKey)
- // {
- //
- // }
-}
-?> \ No newline at end of file
diff --git a/framework/Web/UI/WebControls/TLoginView.php b/framework/Web/UI/WebControls/TLoginView.php
deleted file mode 100644
index 0f4e2105..00000000
--- a/framework/Web/UI/WebControls/TLoginView.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * TLoginView class.
- * Displays the appropriate content template for a given user, based on the user's authentication status and role membership.
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TLoginView.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.UI.WebControls
- * @since 3.1
- */
-class TLoginView extends TControl
-{
-
-}
-?> \ No newline at end of file
diff --git a/framework/Web/UI/WebControls/TOrientation.php b/framework/Web/UI/WebControls/TOrientation.php
deleted file mode 100644
index ffe7aec7..00000000
--- a/framework/Web/UI/WebControls/TOrientation.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * TOrientation class.
- * Enum for Horizontal or Vertical orientation
- *
- * Horizontal
- * Vertical
- *
- * @author Jason Ragsdale <jrags@jasrags.net>
- * @version $Id: TLogoutAction.php 1398 2006-09-08 19:31:03Z xue $
- * @package System.Web.UI.WebControls
- * @since 3.1
- */
-class TOrientation extends TEnumerable
-{
- const Horizontal='Horizontal';
- const Vertical='Vertical';
-}
-?> \ No newline at end of file