Source of file api.loginform.php
Size: 1,562 Bytes - Last Modified: 2024-04-27T15:26:05+03:00
/tmp/current_snapshot/api/libs/api.loginform.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 | <?php /** * Ubilling administrative interface login form */ class LoginForm { protected $form = ''; protected $loginPreset = ''; protected $passwordPreset = ''; protected $breaks=true; protected $container=true; protected $inputSize = 12; public function __construct($br=true,$container=true) { $this->loadForm($br,$container); } /** * Stores raw login form into private property * * @param bool $br * @param bool $container * * @return void */ protected function loadForm($br,$container) { $this->breaks=$br; $this->container=$container; if (file_exists('DEMO_MODE')) { $this->loginPreset = 'admin'; $this->passwordPreset = 'demo'; } if ($this->container) { $this->form.=wf_tag('div', false, 'ubLoginContainer'); } $inputs = wf_HiddenInput('login_form', '1'); $inputs.= wf_TextInput('username', __('Login'), $this->loginPreset, $this->breaks, $this->inputSize); $inputs.= wf_PasswordInput('password', __('Password'), $this->passwordPreset, $this->breaks, $this->inputSize,false); $inputs.= wf_Submit(__('Log in')); $this->form.= wf_Form("", 'POST', $inputs, 'ubLoginForm'); if ($this->container) { $this->form.=wf_tag('div',true); } } /** * Returns login form body * * @return string */ public function render() { return ($this->form); } } ?> |