Exemple #1
0
 public function __construct($id)
 {
     parent::__construct($id);
     $form = new \Zippy\Html\Panel('welcomform');
     $form->add(new Label('username'));
     $form->add(new ClickLink('logout', $this, 'LogoutClick'));
     $this->add($form);
     $form->add(new Label('adminmenu', ''));
     if ($_COOKIE['remember'] && System::getUser()->user_id == 0) {
         $arr = explode('_', $_COOKIE['remember']);
         $_config = parse_ini_file(_ROOT . 'config/config.ini', true);
         if ($arr[0] > 0 && $arr[1] === md5($arr[0] . $_config['common']['salt'])) {
             $user = User::load($arr[0]);
         }
         if ($user instanceof User) {
             System::setUser($user);
             $_SESSION['user_id'] = $user->user_id;
             //для  использования  вне  Application
             $_SESSION['userlogin'] = $user->userlogin;
             //для  использования  вне  Application
             //   @mkdir(_ROOT . UPLOAD_USERS .$user->user_id) ;
             //  \ZippyERP\System\Util::removeDirRec(_ROOT . UPLOAD_USERS .$user->user_id.'/tmp') ;
             //   @mkdir(_ROOT .UPLOAD_USERS .$user->user_id .'/tmp') ;
         }
     }
 }
Exemple #2
0
 public function __construct($id)
 {
     parent::__construct($id);
     $this->add(new RedirectLink('print', ""));
     $this->add(new RedirectLink('html', ""));
     $this->add(new RedirectLink('word', ""));
     $this->add(new RedirectLink('excel', ""));
     $this->add(new RedirectLink('xml', ""));
     $this->add(new Label('preview'));
     $this->add(new DataView('reldocs', new ArrayDataSource(new Prop($this, '_reldocs')), $this, 'relDoclistOnRow'));
     $this->add(new DataView('dw_entrylist', new ArrayDataSource(new Prop($this, '_entries')), $this, 'entryListOnRow'));
     $this->add(new DataView('dw_statelist', new ArrayDataSource(new Prop($this, '_statelist')), $this, 'stateListOnRow'));
     $this->add(new Form('addrelform'))->setSubmitHandler($this, 'OnReldocSubmit');
     $this->addrelform->add(new AutocompleteTextInput('addrel'))->setAutocompleteHandler($this, 'OnAddDoc');
     $this->add(new Form('addfileform'))->setSubmitHandler($this, 'OnFileSubmit');
     $this->addfileform->add(new \Zippy\Html\Form\File('addfile'));
     $this->addfileform->add(new TextInput('adddescfile'));
     $this->add(new DataView('dw_files', new ArrayDataSource(new Prop($this, '_fileslist')), $this, 'fileListOnRow'));
     $this->add(new Form('addmsgform'))->setSubmitHandler($this, 'OnMsgSubmit');
     $this->addmsgform->add(new TextArea('addmsg'));
     $this->add(new DataView('dw_msglist', new ArrayDataSource(new Prop($this, '_msglist')), $this, 'msgListOnRow'));
     $this->add(new Label('detuser'));
     $this->add(new Label('detcreated'));
     $this->add(new Label('detupdated'));
     $this->add(new Label('detnotes'));
 }
Exemple #3
0
 /**
  *  
  * @param mixed $id    id компонента
  */
 public function __construct($id)
 {
     parent::__construct($id);
     $this->add(new Label('contentname'));
     $this->add(new Label('contentdescription'));
     $this->add(new Form('addfileform'))->setSubmitHandler($this, 'OnFileSubmit');
     $this->addfileform->add(new \Zippy\Html\Form\File('addfile'));
     $this->addfileform->add(new TextInput('adddescfile'));
     $this->add(new DataView('dw_files', new ArrayDataSource(new Bind($this, '_fileslist')), $this, 'fileListOnRow'));
     $this->add(new Form('addmsgform'))->setSubmitHandler($this, 'OnMsgSubmit');
     $this->addmsgform->add(new TextArea('addmsg'));
     $this->add(new DataView('dw_msglist', new ArrayDataSource(new Bind($this, '_msglist')), $this, 'msgListOnRow'));
 }
Exemple #4
0
 /**
  * put your comment there...
  * 
  * @param mixed $id    id компонента
  * @param mixed $caller   ссылка на  класс  вызвавшей  страницы
  * @param mixed $callback  имя функции  к  вызвавшей странице  для возврата
  */
 public function __construct($id, $caller, $callback)
 {
     parent::__construct($id);
     $this->caller = $caller;
     $this->callback = $callback;
     $this->add(new Form('contactdetail'));
     $this->contactdetail->add(new TextInput('editlastname'));
     $this->contactdetail->add(new TextInput('editfirstname'));
     $this->contactdetail->add(new TextInput('editmiddlename'));
     $this->contactdetail->add(new TextInput('editemail'));
     $this->contactdetail->add(new TextArea('editdescription'));
     $this->contactdetail->add(new SubmitButton('save'))->setClickHandler($this, 'saveOnClick');
     $this->contactdetail->add(new Button('cancel'))->setClickHandler($this, 'cancelOnClick');
 }
Exemple #5
0
 /**
  * put your comment there...
  * 
  * @param mixed $id    id компонента
  * @param mixed $caller   ссылка на  класс  вызвавшей  страницы
  * @param mixed $callback  имя функции  к  вызвавшей странице  для возврата
  */
 public function __construct($id, $caller, $callback)
 {
     parent::__construct($id);
     $this->caller = $caller;
     $this->callback = $callback;
     $this->add(new Form('itemdetail'));
     $this->itemdetail->add(new TextInput('editname'));
     $this->itemdetail->add(new TextInput('editpriceopt'));
     $this->itemdetail->add(new TextInput('editpriceret'));
     $this->itemdetail->add(new DropDownChoice('editmeasure', \ZippyERP\ERP\Helper::getMeasureList()));
     $this->itemdetail->add(new DropDownChoice('edittype', \ZippyERP\ERP\Entity\Item::getTypeList()));
     $this->itemdetail->add(new DropDownChoice('editgroup', \ZippyERP\ERP\Helper::getItemGroupList()));
     $this->itemdetail->add(new TextInput('editbarcode'));
     $this->itemdetail->add(new TextInput('editcode'));
     $this->itemdetail->add(new TextInput('edituktzed'));
     $this->itemdetail->add(new TextArea('editdescription'));
     $this->itemdetail->add(new SubmitButton('save'))->setClickHandler($this, 'saveOnClick');
     $this->itemdetail->add(new Button('cancel'))->setClickHandler($this, 'cancelOnClick');
 }