Processes window events and handles user interactions.
73 {
75
78
79 switch ($id) {
81 $bearsamppWinbinder->setText(
84 );
85 $bearsamppWinbinder->setEnabled($this->wbBtnSave[
WinBinder::CTRL_OBJ], empty($serverName) ?
false : true);
86 break;
89 if ($documentRoot && is_dir($documentRoot)) {
90 $bearsamppWinbinder->setText($this->wbInputDocRoot[
WinBinder::CTRL_OBJ], $documentRoot .
'\\');
91 $bearsamppWinbinder->setText(
94 );
95 }
96 break;
98 $bearsamppWinbinder->setProgressBarMax($this->wbProgressBar, self::GAUGE_SAVE + 1);
99 $bearsamppWinbinder->incrProgressBar($this->wbProgressBar);
100
102 $bearsamppWinbinder->messageBoxError(
105 $bearsamppWinbinder->resetProgressBar($this->wbProgressBar);
106 break;
107 }
108
109 if (is_file(
$bearsamppRoot->getVhostsPath() .
'/' . $serverName .
'.conf')) {
110 $bearsamppWinbinder->messageBoxError(
113 $bearsamppWinbinder->resetProgressBar($this->wbProgressBar);
114 break;
115 }
116
117 if ($bearsamppOpenSsl->createCrt($serverName) && file_put_contents(
$bearsamppRoot->getVhostsPath() .
'/' . $serverName .
'.conf',
$bearsamppBins->getApache()->getVhostContent($serverName, $documentRoot)) !==
false) {
118 $bearsamppWinbinder->incrProgressBar($this->wbProgressBar);
119
121 $bearsamppWinbinder->incrProgressBar($this->wbProgressBar);
122
123 $bearsamppWinbinder->messageBoxInfo(
126 $bearsamppWinbinder->destroyWindow($window);
127 } else {
129 $bearsamppWinbinder->resetProgressBar($this->wbProgressBar);
130 }
131 break;
132 case IDCLOSE:
134 $bearsamppWinbinder->destroyWindow($window);
135 break;
136 }
137 }
const VHOST_NOT_VALID_DOMAIN
const VHOST_CREATED_ERROR
const VHOST_DOC_ROOT_PATH
const VHOST_ALREADY_EXISTS
static isValidDomainName($domainName)