示例#1
0
 public function __construct(Standard8 $Standard8, $mail = '')
 {
     parent::__construct('div');
     $SID = Standard8_Session::getSID();
     if (!empty($SID)) {
         throw new Wax_Exception('User already sign in.');
     }
     $form = Wax_Document::$body->createForm()->showMessages(true)->appendMessage('mail', __('CorreoElectronicoEsObligatorio'))->appendText('mail', __('CorreoElectronico'), $mail, 60, true)->appendSubmit('submit', __('RecuperarClave'));
     $this->appendChild($Standard8->createTitleNav(__('RecuperarClave')))->appendChild($form);
     $Standard8->appendLocation(__('Ingresar'), 'Personas_Ingresar', 'Standard8')->appendLocation(__('RecuperarClave'), 'Personas_Recuperar', 'Standard8', true)->appendLocation(__('SolicitarInvitacion'), 'Personas_Invitacion', 'Standard8', true)->appendLocation(__('RecuperarClave'), $this);
     //->appendSidebarNav( __('Ingresar'), 'Personas_Ingresar', 'Standard8');
 }
示例#2
0
 public function __construct(Standard8 $Standard8, $username = '')
 {
     parent::__construct();
     $SID = Standard8_Session::getSID();
     if (!empty($SID)) {
         throw new Wax_Exception('User already sign in.');
     }
     $messages = Wax_Messages::getInstance();
     foreach ($messages as $message) {
         $this->appendMessage(null, $message, true);
     }
     $messages->clear();
     $this->showMessages()->appendMessage('username', __('UsuarioEsObligatorio'))->appendMessage('password', __('ClaveEsObligatorio'))->appendText('username', __('Nombre'), $username, 32, true)->appendPassword('password', __('Clave'), 32, true)->appendSubmit('submit', __('Ingresar'))->setId('login');
     $Standard8->appendLocation(__('Ingresar'), $this)->appendLocation(__('RecuperarClave'), 'Personas_Recuperar', 'Standard8', true)->appendLocation(__('SolicitarInvitacion'), 'Personas_Invitacion', 'Standard8', true);
     //->appendSidebarNav( __('RecuperarClave'), 'Personas_Recuperar', 'Standard8');
 }
示例#3
0
 public function __construct(Standard8 $Standard8)
 {
     parent::__construct('div');
     $SID = Standard8_Session::getSID();
     if (!empty($SID)) {
         throw new Wax_Exception('User already sign in.');
     }
     $form = Wax_Document::$body->createForm('/');
     $messages = Wax_Messages::getInstance();
     foreach ($messages as $message) {
         $form->appendMessage('a', $message);
     }
     $messages->clear();
     $this->appendChild($Standard8->createTitleNav(__('SolicitarInvitacion')))->appendChild($form);
     $Standard8->appendLocation(__('Ingresar'), 'Personas_Ingresar', 'Standard8')->appendLocation(__('RecuperarClave'), 'Personas_Recuperar', 'Standard8', true)->appendLocation(__('SolicitarInvitacion'), 'Personas_Invitacion', 'Standard8', true)->appendLocation(__('SolicitarInvitacion'), $this);
     //->appendSidebarNav( __('Ingresar'), 'Personas_Ingresar', 'Standard8');
 }
示例#4
0
 public function __construct()
 {
     parent::__construct('div');
     $this->_locationBar = Wax_Factory::createObject(array('Standard8', 'Standard8_Location'));
     if (Standard8_Session::getSID()) {
         $username = Standard8_Session::getData('usuario');
         $this->_locationLogout = Wax_Document::createElement('div')->setClassName('logout')->appendChild(Wax_Document::createElement('a')->appendChild(Wax_Document::$body->createImage(Standard8_Uri::createUriIcon('user'), $username))->appendChild(Wax_Document::createTextNode($username))->setAttribute('href', Standard8_Uri::createUriProfile($username)))->appendChild(Wax_Document::createTextNode(' - '))->appendChild(Wax_Document::createElement('a')->setAttribute('href', Standard8_Uri::createUri('Personas_Salir', 'Standard8'))->innerHTML(__('Salir')));
     }
     $this->_locationDiv = Wax_Document::createElement('div', $this)->setClassName('location')->appendChild(Wax_Document::createElement('strong')->innerHTML('Standard8'))->appendChild($this->_locationBar)->appendChild($this->_locationLogout);
     $this->_sidebar = Wax_Factory::createObject(array('Standard8', 'Standard8_Sidebar'));
     $this->appendChild($this->_sidebar);
     $SID = Standard8_Session::getSID();
     if (!empty($SID)) {
         $this->appendLocation(__('Administracion'), '', 'Administracion')->appendLocation(__('Configuracion'), 'Configuracion', 'Administracion', true, 'cog')->appendLocation(__('Personas'), 'Personas', 'Administracion', true, 'user');
     }
     $this->_container = Wax_Document::createElement('div', $this)->setClassName('container');
     $this->_bottom = Wax_Document::createElement('div')->setClassName('bottom')->appendChild(Wax_Document::createComment(' '));
 }
示例#5
0
文件: Uri.php 项目: joksnet/php-old
 public static function createUri($className = null, $moduleName = null)
 {
     $uriScheme = Standard8_Config::getInstance()->uriScheme;
     $uriHost = Standard8_Config::getInstance()->uriHost;
     if (!empty($moduleName)) {
         if (strtolower($moduleName) != 'standard8') {
             $moduleName = strtolower($moduleName) . '.';
         } else {
             $moduleName = '';
         }
     } else {
         $moduleName = '';
     }
     if (!empty($className)) {
         $path = strtolower(str_replace('_', '/', $className)) . '/';
     } else {
         $path = '';
     }
     $sid = '?SID=' . Standard8_Session::getSID();
     return "{$uriScheme}://{$moduleName}{$uriHost}/{$path}{$sid}";
 }
示例#6
0
文件: index.php 项目: joksnet/php-old
 Wax_Factory::includeClass('Wax_Session');
 Wax_Factory::includeClass('Wax_Db');
 Wax_Factory::includeClass('Standard8_Config');
 Wax_Factory::includeClass('Standard8_Session');
 Wax_Factory::includeClass('Standard8_Uri');
 Wax_Session::start();
 Wax_Locale::setLocalePath(LOCALE_PATH);
 Wax_Locale::__init();
 Wax_Db::open($dbConfig);
 Standard8_Session::start();
 Standard8_Config::getInstance();
 Wax_Document::$head->importStyle('/stylesheets/screen.css');
 Wax_Document::$head->importStyle('/stylesheets/ie.css', Wax_Document_Head_Style::MEDIA_SCREEN, 'IE 6');
 Wax_Document::$head->importJavaScript('/javascripts/jquery.js');
 Wax_Document::$head->importJavaScript('/javascripts/wax.js');
 $SID = Standard8_Session::getSID();
 $frontController = Wax_Controller_Front::getInstance()->setBinaryPath(MODULES_PATH)->setBase(array('Standard8', 'Standard8'))->setDefault(array('Standard8', 'Modules'));
 if (empty($SID)) {
     $currentClass = $frontController->getClass();
     $supportClasses = array('Personas_Invitacion', 'Personas_Recuperar', 'Personas_Ingresar');
     $supportFound = false;
     foreach ($supportClasses as $supportClass) {
         $supportClass = strtolower($supportClass);
         if ($supportFound = substr(strtolower($currentClass[1]), 0, strlen($supportClass)) == $supportClass) {
             break;
         }
     }
     # var_dump($supportFound);
     if (in_array('Standard8', $currentClass) && $supportFound) {
         $frontController->setForce($currentClass);
     } else {