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();
}
//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');
list($filename, $uploaded_filename) = explode(DEFAULTS['DELIMITER_FILE'], $entity->$field);
if (!is_file(PATHS['UPLOAD'] . "/" . $uploaded_filename)) {
throw new \Exception("파일이 확인되지 않습니다.\n" . PATHS['UPLOAD'] . "/" . $uploaded_filename);
}
return array($filename, $uploaded_filename);
return parent::download_process($field, $entity);
}
}

View File

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

View File

@ -1,4 +1,4 @@
<?= $this->extend('layouts/front_simple') ?>
<?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?>
<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" />

View File

@ -1,4 +1,4 @@
<?= $this->extend('layouts/front_simple') ?>
<?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?>
<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" />