39 $initServerName =
'test.local';
42 $bearsamppWinbinder->reset();
46 $this->wbInputServerName = $bearsamppWinbinder->createInputText($this->wbWindow, $initServerName, 105, 13, 150,
null);
49 $this->wbInputDocRoot = $bearsamppWinbinder->createInputText($this->wbWindow, $initDocumentRoot, 105, 43, 190,
null,
null, WBC_READONLY);
52 $this->wbLabelExp = $bearsamppWinbinder->createLabel($this->wbWindow, sprintf(
$bearsamppLang->getValue(
Lang::VHOST_EXP_LABEL), $initServerName, $initDocumentRoot), 15, 80, 470, 50);
54 $this->wbProgressBar = $bearsamppWinbinder->createProgressBar($this->wbWindow, self::GAUGE_SAVE + 1, 15, 137, 275);
58 $bearsamppWinbinder->setHandler($this->wbWindow, $this,
'processWindow');
59 $bearsamppWinbinder->mainLoop();
60 $bearsamppWinbinder->reset();
81 $bearsamppWinbinder->setText(
85 $bearsamppWinbinder->setEnabled($this->wbBtnSave[
WinBinder::CTRL_OBJ], empty($serverName) ?
false :
true);
89 if ($documentRoot && is_dir($documentRoot)) {
90 $bearsamppWinbinder->setText($this->wbInputDocRoot[
WinBinder::CTRL_OBJ], $documentRoot .
'\\');
91 $bearsamppWinbinder->setText(
98 $bearsamppWinbinder->setProgressBarMax($this->wbProgressBar, self::GAUGE_SAVE + 1);
99 $bearsamppWinbinder->incrProgressBar($this->wbProgressBar);
102 $bearsamppWinbinder->messageBoxError(
105 $bearsamppWinbinder->resetProgressBar($this->wbProgressBar);
109 if (is_file(
$bearsamppRoot->getVhostsPath() .
'/' . $serverName .
'.conf')) {
110 $bearsamppWinbinder->messageBoxError(
113 $bearsamppWinbinder->resetProgressBar($this->wbProgressBar);
117 if ($bearsamppOpenSsl->createCrt($serverName) && file_put_contents(
$bearsamppRoot->getVhostsPath() .
'/' . $serverName .
'.conf',
$bearsamppBins->getApache()->getVhostContent($serverName, $documentRoot)) !==
false) {
118 $bearsamppWinbinder->incrProgressBar($this->wbProgressBar);
121 $bearsamppWinbinder->incrProgressBar($this->wbProgressBar);
123 $bearsamppWinbinder->messageBoxInfo(
126 $bearsamppWinbinder->destroyWindow($window);
129 $bearsamppWinbinder->resetProgressBar($this->wbProgressBar);
134 $bearsamppWinbinder->destroyWindow($window);