vhost init...2
This commit is contained in:
parent
4ec4dbf9ee
commit
47778e0ee9
@ -108,7 +108,7 @@ define('LAYOUTS', [
|
||||
'front' => [
|
||||
'title' => '사용자화면',
|
||||
'path' => 'layouts' . DIRECTORY_SEPARATOR . 'front',
|
||||
'menus' => ['aboutus', 'hosting', 'serverdevice', 'service', 'support'],
|
||||
'topmenus' => ['aboutus', 'hosting', 'serverdevice', 'service', 'support'],
|
||||
'stylesheets' => [
|
||||
'<link rel="icon" href="/favicon.ico">',
|
||||
'<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">',
|
||||
@ -271,6 +271,7 @@ define('CLASS_ICONS', [
|
||||
define('TOP_BANNER', [
|
||||
'default' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
||||
'aboutus' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
||||
'member' => '<img src="/images/banner/sub_visual1.jpg"/>',
|
||||
'hosting' => '<img src="/images/banner/sub_visual2.jpg"/>',
|
||||
'serverdevice' => '<img src="/images/banner/sub_visual3.jpg"/>',
|
||||
'service' => '<img src="/images/banner/sub_visual3.jpg"/>',
|
||||
|
||||
@ -169,11 +169,15 @@ $routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($rou
|
||||
$routes->get('', 'ProductController::index');
|
||||
$routes->get('view/(:uuid)', 'ProductController::view/$1');
|
||||
});
|
||||
$routes->group('order', ['namespace' => 'App\Controllers\Front\Order'], static function ($routes) {
|
||||
$routes->group('order', static function ($routes) {
|
||||
$routes->get('', 'OrderController::index');
|
||||
$routes->post('insert', 'OrderController::insert');
|
||||
$routes->get('excel', 'OrderController::excel');
|
||||
$routes->get('update/(:uuid)', 'OrderController::update_form/$1');
|
||||
$routes->post('update/(:uuid)', 'OrderController::update/$1');
|
||||
$routes->get('view/(:uuid)', 'OrderController::view/$1');
|
||||
$routes->get('cancelCart/(:uuid)', 'CartController::delete/$1');
|
||||
$routes->get('delete/(:uuid)', 'OrderController::delete/$1', ['filter' => 'authFilter:master']);
|
||||
$routes->get('toggle/(:uuid)/(:hash)', 'OrderController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'OrderController::batchjob`');
|
||||
});
|
||||
$routes->group('billing', ['namespace' => 'App\Controllers\Front\Billing', 'filter' => 'authFilter:user'], static function ($routes) {
|
||||
$routes->get('', 'BillingController::index');
|
||||
|
||||
@ -48,7 +48,7 @@ class BoardController extends FrontController
|
||||
protected function insert_form_process()
|
||||
{
|
||||
//Category 확인
|
||||
$this->checkCategory();
|
||||
$this->setCategory($this->request->getVar('category'));
|
||||
//권한체크
|
||||
$this->isRole('isaccess');
|
||||
parent::insert_form_process();
|
||||
@ -63,7 +63,7 @@ class BoardController extends FrontController
|
||||
protected function update_form_process($entity)
|
||||
{
|
||||
//Category 확인
|
||||
$this->checkCategory();
|
||||
$this->setCategory($this->request->getVar('category'));
|
||||
//본인이 작성한글인지 최종확인용 정상접속이 아닌 위회해서 수정을 시도방지용
|
||||
if (!$this->_viewDatas[SESSION_NAMES['ISLOGIN']] || $entity->user_uid != $this->_viewDatas['auth'][AUTH_FIELDS['ID']]) {
|
||||
throw new \Exception("작성자 본인글인지 여부가 확인되지 않습니다.");
|
||||
@ -82,7 +82,7 @@ class BoardController extends FrontController
|
||||
protected function reply_form_process($entity)
|
||||
{
|
||||
//Category 확인
|
||||
$this->checkCategory();
|
||||
$this->setCategory($this->request->getVar('category'));
|
||||
//권한체크
|
||||
$this->isRole('isreply');
|
||||
return parent::reply_form_process($entity);
|
||||
@ -100,7 +100,7 @@ class BoardController extends FrontController
|
||||
protected function view_process($entity)
|
||||
{
|
||||
//Category 확인
|
||||
$this->checkCategory();
|
||||
$this->setCategory($this->request->getVar('category'));
|
||||
//권한체크
|
||||
$this->isRole('view');
|
||||
//조회수 올리기
|
||||
@ -111,7 +111,7 @@ class BoardController extends FrontController
|
||||
protected function index_process()
|
||||
{
|
||||
//Category 확인
|
||||
$this->checkCategory();
|
||||
$this->setCategory($this->request->getVar('category'));
|
||||
//권한체크
|
||||
$this->isRole('index');
|
||||
parent::index_process();
|
||||
|
||||
@ -66,13 +66,12 @@ abstract class FrontController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
final protected function checkCategory()
|
||||
final protected function setCategory($category = false)
|
||||
{
|
||||
//Category 확인
|
||||
$this->_viewDatas['category'] = $this->request->getVar('category');
|
||||
if (!$this->_viewDatas['category']) {
|
||||
if (!$category) {
|
||||
throw new \Exception("분류코드가 지정되지 않았습니다.");
|
||||
}
|
||||
$this->_viewDatas['category'] = $category;
|
||||
$this->_viewDatas['currentCategory'] = $this->getCategoryModel()->getEntity([$this->getCategoryModel()->getPrimaryKey() => $this->_viewDatas['category']]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,171 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Front\Order;
|
||||
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class CartController extends OrderController
|
||||
{
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->_viewDatas['className'] = 'Cart';
|
||||
$this->_viewPath .= '/' . strtolower($this->_viewDatas['className']);
|
||||
$this->_viewDatas['title'] = lang($this->_viewDatas['className'] . '.title');
|
||||
$this->_viewDatas['class_icon'] = CLASS_ICONS[strtoupper($this->_viewDatas['className'])];
|
||||
helper($this->_viewDatas['className']);
|
||||
}
|
||||
|
||||
public function getFields(string $action = ""): array
|
||||
{
|
||||
switch ($action) {
|
||||
case 'insert':
|
||||
return ["product_uid", "quantity", "price", 'paymentday'];
|
||||
break;
|
||||
default:
|
||||
return [];
|
||||
break;
|
||||
}
|
||||
}
|
||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'product_uid':
|
||||
$rules[$field] = "required|regex_match[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/]";
|
||||
break;
|
||||
case 'quantity':
|
||||
case 'price':
|
||||
$rules[$field] = "required|numeric";
|
||||
break;
|
||||
case 'paymentday':
|
||||
$rules[$field] = "if_exist|numeric";
|
||||
break;
|
||||
default:
|
||||
$rules = parent::getFieldRule($field, $rules, $action);
|
||||
break;
|
||||
}
|
||||
return $rules;
|
||||
}
|
||||
public function getFieldFilters(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
public function getFieldBatchFilters(): array
|
||||
{
|
||||
return parent::getFieldBatchFilters();
|
||||
}
|
||||
|
||||
//insert관련
|
||||
public function insert()
|
||||
{
|
||||
$msg = "";
|
||||
try {
|
||||
$this->_viewDatas = $this->init(__FUNCTION__);
|
||||
//장바구니정보 검증
|
||||
$this->insert_validate();
|
||||
//상품정보가져오기
|
||||
$product = $this->getProductModel()->getEntity([$this->getProductModel()->getPrimaryKey() => $this->_viewDatas['fieldDatas']['product_uid']]);
|
||||
//상품갯수확인
|
||||
if (!$this->_viewDatas['fieldDatas']['quantity']) {
|
||||
throw new \Exception("상품갯수가 지정되지 않았습니다.");
|
||||
}
|
||||
//구매금액확인
|
||||
if (!$this->_viewDatas['fieldDatas']['price']) {
|
||||
throw new \Exception("구매금액이 지정되지 않았습니다.");
|
||||
}
|
||||
//결제방식이 월이용권이면 결제일 확인
|
||||
$paymentDay = null;
|
||||
$type = $product->type;
|
||||
if ($type == 'rental') {
|
||||
$paymentDay = $this->request->getVar('paymentday') ?: throw new \Exception("월이용권 상품의 경우는 매월 결제일을 지정해주셔야합니다.");
|
||||
}
|
||||
//재고수 비교
|
||||
if ($product->stock < $this->_viewDatas['fieldDatas']['quantity']) {
|
||||
throw new \Exception("구매수량이 너무 많습니다.\n구매수량:{$this->_viewDatas['fieldDatas']['quantity']}개, 남은 재고수량:{$product->stock}개");
|
||||
}
|
||||
//구매 금액 비교
|
||||
$price = $product->price * $this->_viewDatas['fieldDatas']['quantity'];
|
||||
if ($price != $this->_viewDatas['fieldDatas']['price']) {
|
||||
throw new \Exception("실 상품금액{$price} 와 구매금액{$this->_viewDatas['fieldDatas']['price']}이 서로 다릅니다.");
|
||||
}
|
||||
//Transaction 시작
|
||||
$this->_model->transStart();
|
||||
//주문추가
|
||||
$entity = $this->_model->addCart($product, $this->_viewDatas['fieldDatas']['quantity'], $type, $paymentDay);
|
||||
//상품재고감소
|
||||
$product = $this->getProductModel()->addCart($product, $this->_viewDatas['fieldDatas']['quantity']);
|
||||
//주문정보 세션에 넣기
|
||||
$order_uids = $this->_session->get(SESSION_NAMES['CART']) ?: array();
|
||||
$this->_session->set(SESSION_NAMES['CART'], [...$order_uids, $entity->getPrimaryKey()]);
|
||||
//Transaction Commit
|
||||
$this->_model->transComplete();
|
||||
$msg = sprintf(
|
||||
"%s\n 상품명:%s\n 상품갯수:%s개, 구매금액:%s원\n 장바구니에 담았습니다.",
|
||||
$this->_viewDatas['title'],
|
||||
$entity->getTitle(),
|
||||
$entity->quantity,
|
||||
number_format($entity->price)
|
||||
);
|
||||
//Return URL clear -> 장바구니로 바로 이동
|
||||
$this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']);
|
||||
return redirect()->to(URLS['Order']);
|
||||
} catch (\Exception $e) {
|
||||
//Transaction Rollback
|
||||
$this->_model->transRollback();
|
||||
log_message("error", $e->getMessage());
|
||||
$msg = sprintf(
|
||||
"%s에서 다음 오류로 인해 장바구니에 담기를 실패하였습니다.\n%s",
|
||||
$this->_viewDatas['title'],
|
||||
$e->getMessage()
|
||||
);
|
||||
return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']));
|
||||
} finally {
|
||||
$this->_session->setFlashdata("return_message", $msg);
|
||||
}
|
||||
}
|
||||
|
||||
//주문취소(uid -> order_uid)
|
||||
public function delete($uid)
|
||||
{
|
||||
$msg = "";
|
||||
try {
|
||||
//주문정보 가져오기
|
||||
$entity = $this->_model->getEntity([$this->_model->getPrimaryKey() => $uid]);
|
||||
//상품정보 가져오기
|
||||
$product = $this->getProductModel()->getEntity([$this->getProductModel()->getPrimaryKey() => $entity->product_uid]);
|
||||
//Transaction 시작
|
||||
$this->_model->transStart();
|
||||
//주문취소
|
||||
$entity = $this->delete_process($entity);
|
||||
//상품반환
|
||||
$product = $this->getProductModel()->cancelCart($product, $entity->quantity);
|
||||
//주문정보 세션에서 빼기
|
||||
$order_uids = $this->_session->get(SESSION_NAMES['CART']) ?: array();
|
||||
$temps = array();
|
||||
foreach ($order_uids as $order_uid) {
|
||||
if ($order_uid != $entity->getPrimaryKey()) {
|
||||
array_push($temps, $order_uid);
|
||||
}
|
||||
}
|
||||
$this->_session->set(SESSION_NAMES['CART'], $temps);
|
||||
//Transaction Commit
|
||||
$this->_model->transComplete();
|
||||
$msg = "{$this->_viewDatas['title']}에서 {$entity->getTitle()} {$entity->quantity}개의 주문을 취소하였습니다.";
|
||||
return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']));
|
||||
} catch (\Exception $e) {
|
||||
//Transaction Rollback
|
||||
$this->_model->transRollback();
|
||||
$msg = sprintf(
|
||||
"%s에서 다음 오류로 인해 주문취소를 실패하였습니다.\n%s",
|
||||
$this->_viewDatas['title'],
|
||||
$e->getMessage()
|
||||
);
|
||||
log_message("error", $e->getMessage());
|
||||
return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']));
|
||||
} finally {
|
||||
$this->_session->setFlashdata("return_message", $msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,89 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Front\Order;
|
||||
|
||||
use App\Controllers\Front\FrontController;
|
||||
use App\Models\OrderModel;
|
||||
use App\Models\ProductModel;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class OrderController extends FrontController
|
||||
{
|
||||
private $_productModel = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->_model = new OrderModel();
|
||||
$this->_viewDatas['className'] = 'Order';
|
||||
$this->_viewPath .= strtolower($this->_viewDatas['className']);
|
||||
$this->_viewDatas['title'] = lang($this->_viewDatas['className'] . '.title');
|
||||
$this->_viewDatas['class_icon'] = CLASS_ICONS[strtoupper($this->_viewDatas['className'])];
|
||||
helper($this->_viewDatas['className']);
|
||||
|
||||
//Default 회원정보 Category
|
||||
$this->_category = DEFAULTS['CATEGORY_ORDER'];
|
||||
$this->isRole('index');
|
||||
}
|
||||
|
||||
final protected function getProductModel(): ProductModel
|
||||
{
|
||||
return $this->_productModel = $this->_productModel ?: new ProductModel();
|
||||
}
|
||||
|
||||
public function getFields(string $action = ""): array
|
||||
{
|
||||
switch ($action) {
|
||||
case "index":
|
||||
case "excel":
|
||||
return ["type", 'name', "cost", "sale", "quantity", "price", "status"];
|
||||
break;
|
||||
case "view":
|
||||
return ["type", 'name', "cost", "sale", "quantity", "price", "status", "updated_at", "created_at"];
|
||||
break;
|
||||
default:
|
||||
return [];
|
||||
break;
|
||||
}
|
||||
}
|
||||
public function getFieldFilters(): array
|
||||
{
|
||||
return ['product_uid', "type", "status"];
|
||||
}
|
||||
public function getFieldBatchFilters(): array
|
||||
{
|
||||
return ["status"];
|
||||
}
|
||||
|
||||
//View관련
|
||||
protected function view_process($entity)
|
||||
{
|
||||
//권한체크
|
||||
$this->isRole('view', $entity);
|
||||
return parent::view_process($entity);
|
||||
}
|
||||
|
||||
//Index관련
|
||||
protected function index_process()
|
||||
{
|
||||
//권한체크
|
||||
$this->isRole('index');
|
||||
return parent::index_process();
|
||||
}
|
||||
protected function index_setCondition()
|
||||
{
|
||||
//세션에 Cart정보(order_uids)가 있으면
|
||||
$uids = $this->_session->get(SESSION_NAMES['CART']) ?: array('NONE');
|
||||
//또는 Login했으면 사용자정보(user_uid)에 맞는 Order정보 가져오기
|
||||
if ($this->_session->get(SESSION_NAMES['ISLOGIN'])) {
|
||||
$this->_model->where('user_uid', $this->_session->get(SESSION_NAMES['AUTH'])[AUTH_FIELDS['ID']]);
|
||||
if (count($uids)) {
|
||||
$this->_model->orWhereIn('uid', $uids);
|
||||
}
|
||||
} elseif (count($uids)) {
|
||||
$this->_model->whereIn('uid', $uids);
|
||||
}
|
||||
parent::index_setCondition();
|
||||
}
|
||||
}
|
||||
196
app/Controllers/Front/OrderController.php
Normal file
196
app/Controllers/Front/OrderController.php
Normal file
@ -0,0 +1,196 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Front;
|
||||
|
||||
use App\Controllers\Trait\CartTrait;
|
||||
use App\Models\OrderModel;
|
||||
use App\Models\ProductModel;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class OrderController extends FrontController
|
||||
{
|
||||
use CartTrait;
|
||||
const DEFAULT_CATEGORY = "orderinfo";
|
||||
private $_productModel = null;
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->_model = new OrderModel();
|
||||
$this->_viewDatas['className'] = 'Order';
|
||||
$this->_viewPath .= strtolower($this->_viewDatas['className']);
|
||||
$this->_viewDatas['title'] = lang($this->_viewDatas['className'] . '.title');
|
||||
$this->_viewDatas['class_icon'] = CLASS_ICONS[strtoupper($this->_viewDatas['className'])];
|
||||
helper($this->_viewDatas['className']);
|
||||
}
|
||||
|
||||
final protected function getProductModel(): ProductModel
|
||||
{
|
||||
return $this->_productModel = $this->_productModel ?: new ProductModel();
|
||||
}
|
||||
|
||||
public function getFields(string $action = ""): array
|
||||
{
|
||||
switch ($action) {
|
||||
case 'beremetal':
|
||||
return ["category", "product_uid", "quantity", "price", 'paymentday'];
|
||||
case 'virtual':
|
||||
return ["category", "cpu", "memory", "disk", "price", 'paymentday'];
|
||||
break;
|
||||
case "index":
|
||||
case "excel":
|
||||
return ["type", 'name', "cost", "sale", "quantity", "price", "status"];
|
||||
break;
|
||||
case "view":
|
||||
return ["type", 'name', "cost", "sale", "quantity", "price", "status", "updated_at", "created_at"];
|
||||
break;
|
||||
default:
|
||||
return [];
|
||||
break;
|
||||
}
|
||||
}
|
||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'category':
|
||||
$rules[$field] = "required|min_length[3]";
|
||||
break;
|
||||
case 'product_uid':
|
||||
$rules[$field] = "required|regex_match[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/]";
|
||||
break;
|
||||
case 'quantity':
|
||||
case 'price':
|
||||
case 'cpu':
|
||||
case 'memory':
|
||||
case 'disk':
|
||||
$rules[$field] = "required|numeric";
|
||||
break;
|
||||
case 'paymentday':
|
||||
$rules[$field] = "if_exist|numeric";
|
||||
break;
|
||||
default:
|
||||
$rules = parent::getFieldRule($field, $rules, $action);
|
||||
break;
|
||||
}
|
||||
return $rules;
|
||||
}
|
||||
|
||||
public function getFieldFilters(): array
|
||||
{
|
||||
return ['product_uid', "type", "status"];
|
||||
}
|
||||
public function getFieldBatchFilters(): array
|
||||
{
|
||||
return ["status"];
|
||||
}
|
||||
|
||||
//가상서버
|
||||
protected function virtual_process()
|
||||
{
|
||||
//가상서버정보
|
||||
$protudctDatas = array(
|
||||
'category' => 'virtual',
|
||||
'name' => '',
|
||||
'content' => '',
|
||||
'cost' => $this->_viewDatas['fieldDatas']['price'],
|
||||
'price' => $this->_viewDatas['fieldDatas']['price'],
|
||||
'sale' => 0,
|
||||
'stock' => 1,
|
||||
'view_cnt' => 1,
|
||||
'status' => 'use',
|
||||
);
|
||||
//서버부품정보검증
|
||||
$titles = array('가상서버');
|
||||
//foreach (Product['parts']['virtual']['category'] as $category => $attrs) {
|
||||
foreach ([] as $category => $attrs) {
|
||||
if (!$this->_viewDatas['fieldDatas'][$category]) {
|
||||
throw new \Exception($category . "의 값이 지정되지 않았습니다.");
|
||||
} else {
|
||||
$protudctDatas[$category . "_model"] = $attrs['label'];
|
||||
$protudctDatas[$category . "_cnt"] = $this->_viewDatas['fieldDatas'][$category];
|
||||
array_push(
|
||||
$titles,
|
||||
sprintf(
|
||||
"%s * %s%s,",
|
||||
$protudctDatas[$category . "_model"],
|
||||
$protudctDatas[$category . "_cnt"],
|
||||
$attrs['unit'],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
$protudctDatas['name'] = implode(" ", $titles);
|
||||
$protudctDatas['content'] = implode("\n", $titles);
|
||||
$product = $this->getProductModel()->create($protudctDatas);
|
||||
return $this->add_procedure($product, 1, $this->_viewDatas['fieldDatas']['paymentday']);
|
||||
}
|
||||
//실서버
|
||||
protected function beremetal_process()
|
||||
{
|
||||
//상품정보가져오기
|
||||
$product = $this->getProductModel()->getEntity([$this->getProductModel()->getPrimaryKey() => $this->_viewDatas['fieldDatas']['product_uid']]);
|
||||
//재고수 비교
|
||||
if ($product->stock < $this->_viewDatas['fieldDatas']['quantity']) {
|
||||
throw new \Exception("구매수량이 너무 많습니다.\n구매수량:{$this->_viewDatas['fieldDatas']['quantity']}개, 남은 재고수량:{$product->stock}개");
|
||||
}
|
||||
//구매 금액 비교
|
||||
$price = $product->price * $this->_viewDatas['fieldDatas']['quantity'];
|
||||
if ($price != $this->_viewDatas['fieldDatas']['price']) {
|
||||
throw new \Exception("실 상품금액{$price} 와 구매금액{$this->_viewDatas['fieldDatas']['price']}이 서로 다릅니다.");
|
||||
}
|
||||
//결제방식이 월이용권이면 결제일 확인
|
||||
$paymentDay = null;
|
||||
if ($product->type == 'rental') {
|
||||
$paymentDay = $this->request->getVar('paymentday') ?: throw new \Exception("월이용권 상품의 경우는 매월 결제일을 지정해주셔야합니다.");
|
||||
}
|
||||
return $this->add_procedure($product, $this->_viewDatas['fieldDatas']['quantity'], $paymentDay);
|
||||
}
|
||||
|
||||
//주문처리
|
||||
protected function insert_process()
|
||||
{
|
||||
switch ($this->_viewDatas['fieldDatas']['category']) {
|
||||
case 'virtual':
|
||||
throw new \Exception('가상화서버처리');
|
||||
return $this->virtual_process();
|
||||
break;
|
||||
case 'beremetal':
|
||||
throw new \Exception('실서버처리');
|
||||
return $this->beremetal_process();
|
||||
break;
|
||||
default:
|
||||
throw new \Exception($this->_viewDatas['fieldDatas']['category'] . "는 알수없는 상품 구분입니다. 다시 확인 부탁드립니다.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//주문취소처리
|
||||
public function delete_process($order_uid)
|
||||
{
|
||||
return $this->cancel_procedure($order_uid);
|
||||
}
|
||||
|
||||
//Index관련
|
||||
protected function index_process()
|
||||
{
|
||||
//Category 확인
|
||||
$this->setCategory($this->request->getVar('category') ?: self::DEFAULT_CATEGORY);
|
||||
parent::index_process();
|
||||
}
|
||||
protected function index_setCondition()
|
||||
{
|
||||
//세션에 Cart정보(order_uids)가 있으면
|
||||
$uids = $this->_session->get(SESSION_NAMES['CART']) ?: array('NONE');
|
||||
//또는 Login했으면 사용자정보(user_uid)에 맞는 Order정보 가져오기
|
||||
if ($this->_session->get(SESSION_NAMES['ISLOGIN'])) {
|
||||
$this->_model->where('user_uid', $this->_session->get(SESSION_NAMES['AUTH'])[AUTH_FIELDS['ID']]);
|
||||
if (count($uids)) {
|
||||
$this->_model->orWhereIn('uid', $uids);
|
||||
}
|
||||
} elseif (count($uids)) {
|
||||
$this->_model->whereIn('uid', $uids);
|
||||
}
|
||||
parent::index_setCondition();
|
||||
}
|
||||
}
|
||||
@ -48,6 +48,8 @@ class ProductController extends FrontController
|
||||
//View관련
|
||||
protected function view_process($entity)
|
||||
{
|
||||
//Category 확인
|
||||
$this->setCategory($this->request->getVar('category'));
|
||||
//권한체크
|
||||
$this->isRole('view');
|
||||
//조회수 올리기
|
||||
@ -57,6 +59,8 @@ class ProductController extends FrontController
|
||||
//Index관련
|
||||
protected function index_process()
|
||||
{
|
||||
//Category 확인
|
||||
$this->setCategory($this->request->getVar('category'));
|
||||
//권한체크
|
||||
$this->isRole('index');
|
||||
return parent::index_process();
|
||||
@ -64,7 +68,7 @@ class ProductController extends FrontController
|
||||
//Category 및 Status 조건추가
|
||||
protected function index_setCondition()
|
||||
{
|
||||
$this->_model->where("category_uid", $this->getCurrentCategory()->getPrimaryKey());
|
||||
$this->_model->where("category_uid", $this->_viewDatas['currentCategory']->getPrimaryKey());
|
||||
$this->_model->where("status", DEFAULTS['STATUS']);
|
||||
parent::index_setCondition();
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ class SitepageController extends FrontController
|
||||
protected function index_process()
|
||||
{
|
||||
//Category 확인
|
||||
$this->checkCategory();
|
||||
$this->setCategory($this->request->getVar('category'));
|
||||
//권한체크
|
||||
$this->isRole('index');
|
||||
return parent::index_process();
|
||||
|
||||
@ -10,6 +10,7 @@ use Psr\Log\LoggerInterface;
|
||||
|
||||
class UserController extends FrontController
|
||||
{
|
||||
const DEFAULT_CATEGORY = "userinfo";
|
||||
private $_adapters = array();
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
@ -20,7 +21,6 @@ class UserController extends FrontController
|
||||
$this->_viewDatas['title'] = lang($this->_viewDatas['className'] . '.title');
|
||||
$this->_viewDatas['class_icon'] = CLASS_ICONS[strtoupper($this->_viewDatas['className'])];
|
||||
helper($this->_viewDatas['className']);
|
||||
|
||||
$this->initAdapters();
|
||||
}
|
||||
|
||||
@ -86,6 +86,12 @@ class UserController extends FrontController
|
||||
}
|
||||
|
||||
//Insert관련
|
||||
protected function insert_form_process()
|
||||
{
|
||||
//Category 확인
|
||||
$this->setCategory($this->request->getVar('category') ?: self::DEFAULT_CATEGORY);
|
||||
parent::insert_form_process();
|
||||
}
|
||||
protected function insert_process()
|
||||
{
|
||||
//Role이 반드시 있어야 하기때문에
|
||||
@ -93,6 +99,14 @@ class UserController extends FrontController
|
||||
return parent::insert_process();
|
||||
}
|
||||
|
||||
//Update관련
|
||||
protected function update_form_process($entity)
|
||||
{
|
||||
//Category 확인
|
||||
$this->setCategory($this->request->getVar('category') ?: self::DEFAULT_CATEGORY);
|
||||
return parent::update_form_process($entity);
|
||||
}
|
||||
|
||||
//Index관련
|
||||
//사용자 UID 조건추가
|
||||
protected function index_setCondition()
|
||||
|
||||
@ -112,7 +112,7 @@ CREATE TABLE vhost.tw_sitepage (
|
||||
CONSTRAINT tw_sitepage_ibfk_2 FOREIGN KEY (user_uid) REFERENCES tw_user (uid)
|
||||
) ENGINE = InnoDB COMMENT '사이트페이지';
|
||||
|
||||
DROP TABLE IF EXISTS tw_product;
|
||||
DROP TABLE IF EXISTS vhost.tw_product;
|
||||
|
||||
CREATE TABLE vhost.tw_product (
|
||||
uid varchar(36) NOT NULL,
|
||||
@ -136,4 +136,101 @@ CREATE TABLE vhost.tw_product (
|
||||
KEY user_uid (user_uid),
|
||||
CONSTRAINT tw_product_ibfk_1 FOREIGN KEY (category_uid) REFERENCES tw_category (uid),
|
||||
CONSTRAINT tw_product_ibfk_2 FOREIGN KEY (user_uid) REFERENCES tw_user (uid)
|
||||
) ENGINE = InnoDB COMMENT = '상품 정보';
|
||||
) ENGINE = InnoDB COMMENT = '상품 정보';
|
||||
|
||||
DROP TABLE IF EXISTS vhost.tw_order;
|
||||
|
||||
CREATE TABLE vhost.tw_order (
|
||||
uid varchar(36) NOT NULL,
|
||||
product_uid varchar(36) DEFAULT NULL COMMENT '상품 정보',
|
||||
user_uid varchar(36) DEFAULT NULL COMMENT '사용자 정보',
|
||||
name varchar(255) NOT NULL COMMENT '상품명',
|
||||
cost int(10) unsigned NOT NULL COMMENT '구매원가',
|
||||
sale int(10) unsigned NOT NULL DEFAULT 0 COMMENT '할인가',
|
||||
price int(10) unsigned NOT NULL COMMENT '결제액',
|
||||
quantity varchar(255) NOT NULL COMMENT '수량',
|
||||
type varchar(10) NOT NULL DEFAULT 'rental' COMMENT 'rental: 월임대,
|
||||
onetime:판매,일회성',
|
||||
paymentday int(2) unsigned DEFAULT NULL COMMENT '결제일',
|
||||
status varchar(10) NOT NULL DEFAULT 'unuse' COMMENT 'use: 주문요청/장바구니,
|
||||
unuse: 주문완료/서비스',
|
||||
updated_at timestamp NULL DEFAULT NULL,
|
||||
created_at timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
deleted_at timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (uid),
|
||||
KEY product_uid (product_uid),
|
||||
KEY user_uid (user_uid),
|
||||
CONSTRAINT tw_order_ibfk_1 FOREIGN KEY (product_uid) REFERENCES tw_product (uid),
|
||||
CONSTRAINT tw_order_ibfk_2 FOREIGN KEY (user_uid) REFERENCES tw_user (uid)
|
||||
) ENGINE = InnoDB COMMENT 'Order 정보';
|
||||
|
||||
DROP TABLE IF EXISTS vhost.tw_service;
|
||||
|
||||
CREATE TABLE vhost.tw_service (
|
||||
uid varchar(36) NOT NULL,
|
||||
user_uid varchar(36) DEFAULT NULL COMMENT '구매자 정보',
|
||||
type varchar(10) NOT NULL DEFAULT 'rental' COMMENT 'rental: 월임대,
|
||||
onetime:판매,일회성',
|
||||
price int(10) unsigned NOT NULL COMMENT '결제액',
|
||||
paymentday int(2) unsigned DEFAULT NULL COMMENT '결제일',
|
||||
status varchar(10) NOT NULL DEFAULT 'use' COMMENT 'use: 사용,
|
||||
unuse: 해지',
|
||||
updated_at timestamp NULL DEFAULT NULL,
|
||||
created_at timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
deleted_at timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (uid),
|
||||
KEY user_uid (user_uid),
|
||||
CONSTRAINT tw_service_ibfk_1 FOREIGN KEY (user_uid) REFERENCES tw_user (uid)
|
||||
) ENGINE = InnoDB COMMENT '서비스정보';
|
||||
|
||||
DROP TABLE IF EXISTS vhost.tw_service_product;
|
||||
|
||||
CREATE TABLE vhost.tw_service_product (
|
||||
uid int(10) unsigned NOT NULL,
|
||||
service_uid varchar(36) DEFAULT NULL COMMENT '서비스상품 정보',
|
||||
product_uid varchar(36) DEFAULT NULL COMMENT '상품 정보',
|
||||
created_at timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
deleted_at timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (uid),
|
||||
KEY product_uid (product_uid),
|
||||
KEY service_uid (service_uid),
|
||||
CONSTRAINT tw_service_product_ibfk_1 FOREIGN KEY (service_uid) REFERENCES tw_service (uid),
|
||||
CONSTRAINT tw_service_product_ibfk_2 FOREIGN KEY (product_uid) REFERENCES tw_product (uid)
|
||||
) ENGINE = InnoDB COMMENT '주문-서비스정보';
|
||||
|
||||
DROP TABLE IF EXISTS vhost.tw_billing;
|
||||
|
||||
CREATE TABLE vhost.tw_billing (
|
||||
uid int(10) unsigned NOT NULL,
|
||||
user_uid varchar(36) NOT NULL COMMENT '사용자 정보',
|
||||
type varchar(10) DEFAULT NULL COMMENT 'Card: 카드결제,
|
||||
Deposit:무통장입금',
|
||||
email varchar(50) NOT NULL,
|
||||
phone varchar(20) DEFAULT NULL COMMENT '연락처',
|
||||
title varchar(255) NOT NULL COMMENT '청구서제목',
|
||||
price int(10) unsigned NOT NULL COMMENT '청구금액',
|
||||
response text DEFAULT NULL COMMENT '결제처리결과',
|
||||
status varchar(10) NOT NULL DEFAULT 'unuse' COMMENT 'use: 납부완료,
|
||||
unuse: 미납 등등',
|
||||
updated_at timestamp NULL DEFAULT NULL,
|
||||
created_at timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
deleted_at timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (uid),
|
||||
KEY user_uid (user_uid),
|
||||
CONSTRAINT tw_billing_ibfk_1 FOREIGN KEY (user_uid) REFERENCES tw_user (uid)
|
||||
) ENGINE = InnoDB COMMENT '청구서정보';
|
||||
|
||||
DROP TABLE IF EXISTS vhost.tw_service_billing;
|
||||
|
||||
CREATE TABLE vhost.tw_service_billing (
|
||||
uid int(10) unsigned NOT NULL,
|
||||
service_uid varchar(36) NOT NULL COMMENT '서비스 정보',
|
||||
billing_uid int(10) unsigned NOT NULL COMMENT '청구서 정보',
|
||||
updated_at timestamp NULL DEFAULT NULL,
|
||||
created_at timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (uid),
|
||||
KEY service_uid (service_uid),
|
||||
KEY billing_uid (billing_uid),
|
||||
CONSTRAINT tw_service_billing_ibfk_1 FOREIGN KEY (service_uid) REFERENCES tw_service (uid),
|
||||
CONSTRAINT tw_service_billing_ibfk_2 FOREIGN KEY (billing_uid) REFERENCES tw_billing (uid)
|
||||
) ENGINE = InnoDB COMMENT '서비스-청구서정보';
|
||||
@ -51,7 +51,7 @@
|
||||
<?php foreach ($viewDatas['entitys'] as $entity) : ?>
|
||||
<?= form_hidden("order_uids[]", $entity->getPrimaryKey()) ?>
|
||||
<?php endforeach ?>
|
||||
<?= form_hidden("price", $order_price - $order_sale) ?>
|
||||
<?= form_hidden("price", '') ?>
|
||||
<div class="title">결제정보</div>
|
||||
<div class="item">
|
||||
<span class="label">상품수</span>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td valign="bottom" colspan="2"><?= form_submit('', '회원가입', array("class" => "btn btn-outline btn-primary")); ?></td>
|
||||
<td valign="bottom" colspan="2" style="text-align:center;"><?= form_submit('', '회원가입', array("class" => "btn btn-outline btn-primary")); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?= form_close(); ?>
|
||||
|
||||
@ -1,37 +1,35 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
<?= $this->extend('layouts/front_simple') ?>
|
||||
<?= $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" />
|
||||
<div id="content">
|
||||
<div class="login container">
|
||||
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table>
|
||||
<table style="width:60%; margin-left:80px;">
|
||||
<tr>
|
||||
<td class="label" nowrap>계정</td>
|
||||
<td class=" label" nowrap>계정</td>
|
||||
<td class="column">
|
||||
<?= form_input('id', old('id', DEFAULTS['EMPTY'])) ?>
|
||||
<?= form_input('id', old('id', DEFAULTS['EMPTY']), ['tabindex' => 0]) ?>
|
||||
</td>
|
||||
<td rowspan="2" class="submit">
|
||||
<?= form_input([
|
||||
'type' => 'image', 'src' => "/images/common/btn_login.png",
|
||||
'width' => '57', 'height' => '60',
|
||||
'width' => '57', 'height' => '60', 'tabindex' => 2
|
||||
]) ?>
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<?php foreach ($viewDatas['login_buttons'] as $key => $login_button) : ?>
|
||||
<?= $login_button ?>
|
||||
<?php endforeach ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label" nowrap>암호</td>
|
||||
<td class="column">
|
||||
<?= form_password('passwd', old('passwd', DEFAULTS['EMPTY'])) ?>
|
||||
<?= form_password('passwd', old('passwd', DEFAULTS['EMPTY']), ['tabindex' => 1]) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="login_bottom">
|
||||
<td colspan="3" class="login_bottom">
|
||||
<a href="/front/user/insert">회원가입</a>
|
||||
<?php foreach ($viewDatas['login_buttons'] as $key => $login_button) : ?>
|
||||
<?= $login_button ?>
|
||||
<?php endforeach ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
<?= $this->extend('layouts/front_simple') ?>
|
||||
<?= $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" />
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
<?= $this->extend('layouts/front') ?>
|
||||
<?= $this->section('content') ?>
|
||||
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="content">
|
||||
<div><?= html_entity_decode($viewDatas['currentCategory']->head) ?></div>
|
||||
<?= form_open_multipart(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="form table table-bordered table-hover table-striped">
|
||||
<?php foreach ($viewDatas['fields'] as $field) : ?>
|
||||
@ -14,9 +15,10 @@
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td valign="bottom" colspan="2"><?= form_submit('', '수정', array("class" => "btn btn-outline btn-primary")); ?></td>
|
||||
<td valign="bottom" colspan="2" style="text-align:center;"><?= form_submit('', '수정', array("class" => "btn btn-outline btn-primary")); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?= form_close(); ?>
|
||||
<div><?= html_entity_decode($viewDatas['currentCategory']->tail) ?></div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
@ -4,26 +4,44 @@
|
||||
<nav class="nav"><a class="navbar-brand" href="/">LOGO</a></nav>
|
||||
<nav class="nav justify-content-center">
|
||||
<div>
|
||||
<div id="content_bottom">
|
||||
<span class="item">회사소개</span>
|
||||
<a href="/front/sitepage?category=29" class="item">이용약관</a>
|
||||
<a href="/front/sitepage?category=30" class="item">개인정보취급방침</a>
|
||||
<a href="/front/sitepage?category=31" class="item">이용안내</a>
|
||||
<div class="company_info">
|
||||
# 회사 소개<BR>
|
||||
Itsoluton은 해외 상품을 편리하게 이용할 수 있도록 도와 드리는 구매대행업입니다.<BR>
|
||||
일본소재 ㈜YYY의 상품에 대해 총판권을 가지고, 편리하게 이용할 수 있도록 지원해주고 있습니다.<BR>
|
||||
항상 빠르고 안전하고 저렴한 가격으로 고객님을 대신해서 구매대행을 진행할 수 있도록 하겠습니다.<BR>
|
||||
언제나 믿고 신뢰할 수 있는 르호봇이 되도록 노력하겠습니다.<BR>
|
||||
감사합니다.<BR>
|
||||
<div style="padding: 10px; margin: 10px;">
|
||||
<ul class=" nav nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="companyinfo-tab" data-bs-toggle="tab" data-bs-target="#companyinfo" type="button" role="tab" aria-controls="companyinfo" aria-selected="true">
|
||||
회사소개</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="usageterms-tab" data-bs-toggle="tab" data-bs-target="#usageterms" type="button" role="tab" aria-controls="usageterms" aria-selected="false">
|
||||
이용약관</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="privacyhandling-tab" data-bs-toggle="tab" data-bs-target="#privacyhandling" type="button" role="tab" aria-controls="privacyhandling" aria-selected="false">
|
||||
개인정보취급방침</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="companyinfo" role="tabpanel" aria-labelledby="companyinfo-tab" style="height:150px; text-align:left;">
|
||||
Itsoluton은 해외 상품을 편리하게 이용할 수 있도록 도와 드리는 구매대행업입니다.<BR>
|
||||
일본소재 ㈜YYY의 상품에 대해 총판권을 가지고, 편리하게 이용할 수 있도록 지원해주고 있습니다.<BR>
|
||||
항상 빠르고 안전하고 저렴한 가격으로 고객님을 대신해서 구매대행을 진행할 수 있도록 하겠습니다.<BR>
|
||||
언제나 믿고 신뢰할 수 있는 르호봇이 되도록 노력하겠습니다.<BR>
|
||||
감사합니다.<BR>
|
||||
</div>
|
||||
<div class=" tab-pane fade" id="usageterms" role="tabpanel" aria-labelledby="usageterms-tab" style="height:150px; text-align:left;">
|
||||
이용약관
|
||||
</div>
|
||||
<div class="tab-pane fade" id="privacyhandling" role="tabpanel" aria-labelledby="privacyhandling-tab" style="height:150px; text-align:left;">
|
||||
개인정보취급방침
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="address">
|
||||
주소 : 전자우편주소 : itsolutionidc.jp@gmail.com 전화번호 : 1661-0577<BR>
|
||||
사업자등록번호 : 777-86-00287 [사업자정보확인]통신판매업신고번호 : 2023-사울동작-0001
|
||||
사업자등록번호 : 777-86-00287 [사업자정보확인]통신판매업신고번호 : 2023-사울동작-0001<BR>
|
||||
Copyright(c) www.itsolution-mall.com All Right Reserved.
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<nav class="nav justify-content-end">Copyright(c) www.itsolution-mall.com All Right Reserved.</nav>
|
||||
<nav class="nav justify-content-end"></nav>
|
||||
</div>
|
||||
<!-- Copyright 끝-->
|
||||
@ -1,16 +1,14 @@
|
||||
<? if ($viewDatas['category']) : ?>
|
||||
<!-- left menu start -->
|
||||
<link href="/css/common/left_menu.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="left_menu">
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title"><?= $viewDatas['menus'][$viewDatas['currentCategory']->parent]['entity']->getTitle() ?></div>
|
||||
</div>
|
||||
<?php foreach ($viewDatas['menus'][$viewDatas['currentCategory']->parent]['childs'] as $child) : ?>
|
||||
<div class="sibling <?= $child->getPrimaryKey() == $viewDatas['category'] ? "active" : "" ?>">
|
||||
<a href="<?= $child->linkurl ?>?category=<?= $child->getPrimaryKey() ?>" target="_self"><?= $child->getTitle() ?></a><span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
<!-- left menu start -->
|
||||
<link href="/css/common/left_menu.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<div id="left_menu">
|
||||
<div class="parent">
|
||||
<div>-</div>
|
||||
<div class="title"><?= $viewDatas['menus'][$viewDatas['currentCategory']->parent]['entity']->getTitle() ?></div>
|
||||
</div>
|
||||
<!-- left menu end -->
|
||||
<? endif ?>
|
||||
<?php foreach ($viewDatas['menus'][$viewDatas['currentCategory']->parent]['childs'] as $child) : ?>
|
||||
<div class="sibling <?= $child->getPrimaryKey() == $viewDatas['category'] ? "active" : "" ?>">
|
||||
<a href="<?= $child->linkurl ?>?category=<?= $child->getPrimaryKey() ?>" target="_self"><?= $child->getTitle() ?></a><span class="play"><i class="bi bi-play-fill"></i></span>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<!-- left menu end -->
|
||||
@ -9,16 +9,16 @@
|
||||
<nav class="nav justify-content-center"></nav>
|
||||
<ul class="nav justify-content-end">
|
||||
<li class="nav-item" style="padding-top:10px;">|</li>
|
||||
<?php foreach ($viewDatas['layout']['menus'] as $menu_key) : ?>
|
||||
<?php foreach ($viewDatas['layout']['topmenus'] as $topmenus_key) : ?>
|
||||
<li class="nav-item">
|
||||
<div class="dropdown-center">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link" id="navbarDarkDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<?= $viewDatas['menus'][$menu_key]['entity']->getTitle() ?>
|
||||
<?= $viewDatas['menus'][$topmenus_key]['entity']->getTitle() ?>
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="navbarDarkDropdownMenuLink">
|
||||
<?php foreach ($viewDatas['menus'][$menu_key]['childs'] as $child) : ?>
|
||||
<?php foreach ($viewDatas['menus'][$topmenus_key]['childs'] as $child) : ?>
|
||||
<li class="<?= $child->getPrimaryKey() == $viewDatas['category'] ? "active" : "" ?>"><a class=" dropdown-item" href="<?= $child->linkurl ?>?category=<?= $child->getPrimaryKey() ?>"><?= $child->getTitle() ?></a></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
<dd><a href="/front/board/view/1?category=3">공지사항글입니다.</a><span>2023-08-04</span></dd>
|
||||
<dd><a href="/front/board/view/1?category=3">공지사항글입니다.</a><span>2023-08-04</span></dd>
|
||||
<dd><a href="/front/board/view/1?category=3">공지사항글입니다.</a><span>2023-08-04</span></dd>
|
||||
@ -1,40 +0,0 @@
|
||||
<link href="/css/common/top_menu.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="container-fluid">
|
||||
<nav class="nav"></nav>
|
||||
<nav class="nav justify-content-center">
|
||||
<nav id="top_menu" class="navbar navbar-expand-lg">
|
||||
<div class="container-fluid">
|
||||
<nav class="nav"><a class="navbar-brand" href="/">TOP Menu</a></nav>
|
||||
<nav class="nav justify-content-center"></nav>
|
||||
<ul class="nav justify-content-end">
|
||||
<li class="nav-item">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/../common/top_menu/top_menu_aboutus'); ?>
|
||||
</li>
|
||||
<li class="nav-item" style="padding-top:10px;">|</li>
|
||||
<li class=" nav-item">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/../common/top_menu/top_menu_hosting'); ?>
|
||||
</li>
|
||||
<li class="nav-item" style="padding-top:10px;">|</li>
|
||||
<li class=" nav-item">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/../common/top_menu/top_menu_server'); ?>
|
||||
</li>
|
||||
<li class="nav-item" style="padding-top:10px;">|</li>
|
||||
<li class="nav-item">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/../common/top_menu/top_menu_network'); ?>
|
||||
</li>
|
||||
<li class="nav-item" style="padding-top:10px;">|</li>
|
||||
<li class="nav-item">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/../common/top_menu/top_menu_service'); ?>
|
||||
</li>
|
||||
<li class="nav-item" style="padding-top:10px;">|</li>
|
||||
<li class="nav-item">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/../common/top_menu/top_menu_support'); ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</nav>
|
||||
<nav class="nav justify-content-end"></nav>
|
||||
</div>
|
||||
</nav>
|
||||
@ -1,21 +0,0 @@
|
||||
<link href="/css/common/top_navigator.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<nav id="top_navigator" class="navbar navbar-expand-lg">
|
||||
<div class="container-fluid">
|
||||
<nav class="nav">
|
||||
<a class="navbar-brand" href="#">Logo</a>
|
||||
</nav>
|
||||
<ul class="nav justify-content-center">
|
||||
<li class="nav-item">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/../common/top_navigator/top_center'); ?>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav justify-content-end">
|
||||
<li class="cart nav-item">
|
||||
<?= anchor('/front/order', ICONS['CART'], ["target" => "_self"]); ?>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<?= $this->include($viewDatas['layout']['path'] . '/../common/top_navigator/member_link'); ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
Loading…
Reference in New Issue
Block a user