vhost init...2

This commit is contained in:
최준흠 2024-05-09 16:38:35 +09:00
parent 2fa017e8f6
commit 465ecac007
4 changed files with 31 additions and 20 deletions

View File

@ -124,15 +124,12 @@ class BoardController extends FrontController
parent::index_setCondition(); parent::index_setCondition();
} }
//Download관련 //Download관련
public function download_process($field, $entity): array public function download_process($field, $entity)
{ {
$entity = parent::download_process($field, $entity); //Category 확인
$this->setCategory($this->request->getVar('category'));
//권한체크 //권한체크
$this->isRole('download'); $this->isRole('download');
list($filename, $uploaded_filename) = explode(DEFAULTS['DELIMITER_FILE'], $entity->$field); return parent::download_process($field, $entity);
if (!is_file(PATHS['UPLOAD'] . "/" . $uploaded_filename)) {
throw new \Exception("파일이 확인되지 않습니다.\n" . PATHS['UPLOAD'] . "/" . $uploaded_filename);
}
return array($filename, $uploaded_filename);
} }
} }

View File

@ -129,16 +129,30 @@ function getFieldIndex_Row_BoardHelper($field, $entity, array $viewDatas): strin
for ($i = 1; $i < $entity->getHierarchy_Depth(); $i++) { for ($i = 1; $i < $entity->getHierarchy_Depth(); $i++) {
$depth .= "&nbsp;&nbsp;&nbsp;&nbsp;"; $depth .= "&nbsp;&nbsp;&nbsp;&nbsp;";
} }
$reply = anchor( $reply = "";
current_url() . '/reply/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['currentCategory']->getPrimaryKey(), if (isRole_CommonHelper(
ICONS['REPLY'], $viewDatas['currentRoles'],
["target" => "_self"] $viewDatas['currentCategory'],
); 'isreply'
$view = anchor( )) {
current_url() . '/view/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['currentCategory']->getPrimaryKey(), $reply = anchor(
$value, current_url() . '/reply/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['category'],
["target" => "_self"] ICONS['REPLY'],
); ["target" => "_self"]
);
}
$view = $value;
if (isRole_CommonHelper(
$viewDatas['currentRoles'],
$viewDatas['currentCategory'],
'isread'
)) {
$view = anchor(
current_url() . '/view/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['category'],
$value,
["target" => "_self"]
);
}
return sprintf("%s%s %s", $depth, $reply, $view); return sprintf("%s%s %s", $depth, $reply, $view);
break; break;
case 'board_file': case 'board_file':
@ -147,7 +161,7 @@ function getFieldIndex_Row_BoardHelper($field, $entity, array $viewDatas): strin
base_url() . base_url() .
$viewDatas['control'] . $viewDatas['control'] .
"/board/download/{$field}/{$entity->getPrimaryKey()}" . "/board/download/{$field}/{$entity->getPrimaryKey()}" .
'?category=' . $viewDatas['currentCategory']->getPrimaryKey(), '?category=' . $viewDatas['category'],
$field $field
); );
break; break;

View File

@ -1,4 +1,4 @@
<?= $this->extend('layouts/front_simple') ?> <?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/css/common/login.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/common/login.css" media="screen" rel="stylesheet" type="text/css" />

View File

@ -1,4 +1,4 @@
<?= $this->extend('layouts/front_simple') ?> <?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/css/common/login_v1.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/common/login_v1.css" media="screen" rel="stylesheet" type="text/css" />