shoppingmallv2 init...

This commit is contained in:
최준흠 2023-08-01 19:59:20 +09:00
parent e219d26731
commit 1031285e3f
41 changed files with 452 additions and 197 deletions

View File

@ -113,23 +113,28 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
$routes->get('update/(:uuid)', 'ProductController::update_form/$1');
$routes->post('update/(:uuid)', 'ProductController::update/$1');
$routes->get('view/(:uuid)', 'ProductController::view/$1');
$routes->get('reply/(:uuid)', 'ProductController::reply_form/$1');
$routes->post('reply/(:uuid)', 'ProductController::reply/$1');
$routes->get('delete/(:uuid)', 'ProductController::delete/$1', ['filter' => 'authFilter:master']);
$routes->get('toggle/(:uuid)/(:hash)', 'ProductController::toggle/$1/$2');
$routes->post('batchjob', 'ProductController::batchjob');
$routes->get('download/(:any)/(:uuid)', 'ProductController::download/$1/$2');
});
$routes->group('order', static function ($routes) {
$routes->get('', 'OrderController::index');
$routes->post('insert', 'OrderController::insert');
$routes->get('view/(:uuid)', 'OrderController::view/$1');
$routes->post('batchjob', 'OrderController::batchjob`');
$routes->get('delete/(:uuid)', 'OrderController::delete/$1', ['filter' => 'authFilter:master']);
});
});
$routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($routes) {
$routes->get('/', 'Home::index');
$routes->group('product', static function ($routes) {
$routes->get('', 'ProductController::index');
$routes->get('excel', 'ProductController::excel/$1');
$routes->get('view/(:uuid)', 'ProductController::view/$1');
});
$routes->group('order', ['namespace' => 'App\Controllers\Front', 'filter' => 'authFilter:master,director,cloudflare,manager,gold,silver,brone,vip,user'], static function ($routes) {
$routes->get('', 'OrderController::index');
$routes->post('insert', 'OrderController::insert');
$routes->get('view/(:uuid)', 'OrderController::view/$1');
});;
});
/*
* --------------------------------------------------------------------

View File

@ -62,6 +62,7 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
$routes->get('view/(:num)', 'UserSNSController::view/$1');
$routes->get('delete/(:num)', 'UserSNSController::delete/$1');
$routes->get('toggle/(:num)/(:hash)', 'UserSNSController::toggle/$1/$2');
$routes->post('batchjob', 'UserSNSController::batchjob');
});
$routes->group('boardconfig', static function ($routes) {
$routes->get('', 'BoardConfigController::index');
@ -112,23 +113,28 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
$routes->get('update/(:uuid)', 'ProductController::update_form/$1');
$routes->post('update/(:uuid)', 'ProductController::update/$1');
$routes->get('view/(:uuid)', 'ProductController::view/$1');
$routes->get('reply/(:uuid)', 'ProductController::reply_form/$1');
$routes->post('reply/(:uuid)', 'ProductController::reply/$1');
$routes->get('delete/(:uuid)', 'ProductController::delete/$1', ['filter' => 'authFilter:master']);
$routes->get('toggle/(:uuid)/(:hash)', 'ProductController::toggle/$1/$2');
$routes->post('batchjob', 'ProductController::batchjob');
$routes->get('download/(:any)/(:uuid)', 'ProductController::download/$1/$2');
});
$routes->group('order', static function ($routes) {
$routes->get('', 'OrderController::index');
$routes->post('insert/(:uuid)', 'OrderController::insert/$1');
$routes->get('view/(:uuid)', 'OrderController::view/$1');
$routes->post('batchjob', 'OrderController::batchjob`');
$routes->get('delete/(:uuid)', 'OrderController::delete/$1', ['filter' => 'authFilter:master']);
});
});
$routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($routes) {
$routes->get('/', 'Home::index');
$routes->group('product', static function ($routes) {
$routes->get('', 'ProductController::index');
$routes->get('excel', 'ProductController::excel/$1');
$routes->get('view/(:uuid)', 'ProductController::view/$1');
});
$routes->group('order', ['filter' => 'authFilter:master,director,cloudflare,manager,gold,silver,brone,vip,user'], static function ($routes) {
$routes->get('', 'OrderController::index');
$routes->post('insert', 'OrderController::insert');
$routes->get('view/(:uuid)', 'OrderController::view/$1');
});;
});
/*
* --------------------------------------------------------------------

View File

@ -13,6 +13,8 @@ class BoardConfigController extends AdminController
{
$this->_model = new BoardConfigModel();
parent::initController($request, $response, $logger);
$this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title');
$this->_viewPath .= strtolower($this->_model->getClassName());
helper($this->_model->getClassName());
}
}

View File

@ -13,7 +13,9 @@ class BoardController extends AdminController
{
$this->_model = new BoardModel();
parent::initController($request, $response, $logger);
$this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title');
$this->_viewPath .= strtolower($this->_model->getClassName());
helper($this->_model->getClassName());
}
//Field별 Form Datas 처리용

View File

@ -13,6 +13,8 @@ class CategoryController extends AdminController
{
$this->_model = new CategoryModel();
parent::initController($request, $response, $logger);
$this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title');
$this->_viewPath .= strtolower($this->_model->getClassName());
helper($this->_model->getClassName());
}
}

View File

@ -5,84 +5,19 @@ namespace App\Controllers\Admin;
use App\Entities\OrderEntity;
use App\Models\OrderModel;
use App\Models\ProductModel;
use CodeIgniter\Cookie\Exceptions\CookieException;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
class OrderController extends AdminController
{
private $_cart_name = "order_uids";
private $_cart_delimeter = "||";
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
$this->_model = new OrderModel();
parent::initController($request, $response, $logger);
$this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title');
$this->_viewPath .= strtolower($this->_model->getClassName());
helper("cookie");
}
//쿠키에 장바구니에 담긴 Order UID를 추가해준다.
private function setOrderCookie(OrderEntity $entity)
{
$order_uids = array();
if (has_cookie($this->_cart_name)) {
$order_uids = explode($this->_cart_delimeter, get_cookie($this->_cart_name));
}
delete_cookie($this->_cart_name);
//24시간 저장
set_cookie([
'name' => $this->_cart_name,
'value' => implode($this->_cart_delimeter, [...$order_uids, $entity->getPrimaryKey()]),
'expire' => '36400',
]);
}
//장바구니에 담기
protected function insert_process()
{
//fieldData Rule 검사및 fieldData 적용
parent::insert_process();
//상품재고 줄이기
$productModel = new ProductModel();
$product = $productModel->getEntity([$this->_model->getPrimaryKey() => $this->_viewDatas['fieldDatas']['product_uid']]);
//구매 금액 비교
$price = ($product->getPrice() - $product->getSale()) * $this->_viewDatas['fieldDatas']['quantity'];
if ($price != $this->_viewDatas['fieldDatas']['price']) {
throw new \Exception("실 상품금액{$price} 와 구매금액{$this->_viewDatas['fieldDatas']['price']}이 서로 다릅니다.");
}
$productModel->decreaseStock($product, $this->_viewDatas['fieldDatas']['quantity']);
}
public function insert()
{
$msg = "";
try {
$this->_viewDatas['fields'] = $this->_model->getFields(__FUNCTION__);
$this->_viewDatas['fieldRules'] = $this->_model->getFieldRules($this->_viewDatas['fields'], __FUNCTION__);
//Transaction 시작
$this->insert_process();
$this->_model->transStart();
$entity = $this->_model->create($this->_viewDatas['fieldDatas']);
$this->setOrderCookie($entity);
//Transaction Commit
$this->_model->transComplete();
$msg = sprintf(
"%s에서 해당 상품 %s개를 장바구니에 담았습니다.",
$this->_viewDatas['title'],
$this->_viewDatas['fieldDatas']['quantity']
);
return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']));
} 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);
}
helper($this->_model->getClassName());
}
}

View File

@ -14,7 +14,9 @@ class ProductController extends AdminController
{
$this->_model = new ProductModel();
parent::initController($request, $response, $logger);
$this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title');
$this->_viewPath .= strtolower($this->_model->getClassName());
helper($this->_model->getClassName());
}
//Field별 Form Datas 처리용

View File

@ -13,7 +13,9 @@ class UserController extends AdminController
{
$this->_model = new UserModel();
parent::initController($request, $response, $logger);
$this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title');
$this->_viewPath .= strtolower($this->_model->getClassName());
helper($this->_model->getClassName());
}
//Field별 Form Datas 처리용

View File

@ -13,6 +13,8 @@ class UserSNSController extends AdminController
{
$this->_model = new UserSNSModel();
parent::initController($request, $response, $logger);
$this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title');
$this->_viewPath .= strtolower($this->_model->getClassName());
helper($this->_model->getClassName());
}
}

View File

@ -13,6 +13,7 @@ class AuthController extends BaseController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->_viewDatas['title'] = 'Auth';
$this->_viewPath .= 'auth';
$this->initAdapters();
}
@ -35,14 +36,13 @@ class AuthController extends BaseController
public function login()
{
$viewDatas = array();
foreach ($this->_adapters as $key => $adapter) {
$viewDatas['login_buttons'][$key] = $adapter->getAuthButton();
$this->_viewDatas['login_buttons'][$key] = $adapter->getAuthButton();
}
$viewDatas['forms'] = ['attributes' => ['method' => "post",], 'hiddens' => []];
$this->_viewDatas['forms'] = ['attributes' => ['method' => "post",], 'hiddens' => []];
helper(['form']);
$this->_session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
return view('auth/login', $viewDatas);
return view('auth/login', $this->_viewDatas);
}
public function signup(string $site)

View File

@ -60,9 +60,7 @@ abstract class BaseController extends Controller
// E.g.: $this->session = \Config\Services::session();
$this->_session = \Config\Services::session();
$this->_viewDatas['layout'] = LAYOUTS['empty'];
$this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title');
$this->_viewDatas['session'] = $this->_session;
helper($this->_model->getClassName());
}
//Field별 Form Datas 처리용

View File

@ -12,8 +12,7 @@ class FrontController extends BaseController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->_viewPath .= strtolower('Front/');
$this->_viewPath .= 'front/';
$this->_viewDatas['layout'] = LAYOUTS['front'];
$this->_viewDatas['title'] = "사용자페이지";
}
}

View File

@ -0,0 +1,114 @@
<?php
namespace App\Controllers\Front;
use App\Entities\OrderEntity;
use App\Models\OrderModel;
use App\Models\ProductModel;
use CodeIgniter\Cookie\Exceptions\CookieException;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
class OrderController extends FrontController
{
private $_cart_cookie_name = "order_uids";
private $_cart_cookie_delimeter = "|";
private $_cart_cookie_expire = 3600; //1Hour
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
$this->_model = new OrderModel();
parent::initController($request, $response, $logger);
$this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title');
$this->_viewPath .= strtolower($this->_model->getClassName());
helper($this->_model->getClassName());
helper('cookie');
}
//쿠키에 장바구니에 담긴 Order UID를 추가해준다.
private function setOrderCookie(OrderEntity $entity)
{
try {
$order_uids = array();
if (has_cookie($this->_cart_cookie_name)) {
$order_uids = explode($this->_cart_cookie_delimeter, get_cookie($this->_cart_cookie_name));
}
// delete_cookie($this->_cart_cookie_name);
set_cookie([
'name' => $this->_cart_cookie_name,
'value' => implode($this->_cart_cookie_delimeter, [...$order_uids, $entity->getPrimaryKey()]),
'expire' => time() + $this->_cart_cookie_expire,
'domain' => ".localhost",
'path' => '/',
]);
} catch (CookieException $e) {
throw new \Exception(__FUNCTION__ . "에서 오류발생:\n" . $e->getMessage());
}
}
// private function setOrderCookie_ORG(OrderEntity $entity)
// {
// $order_uids = array();
// if (isset($_COOKIE[$this->_cart_cookie_name])) {
// $order_uids = explode($this->_cart_cookie_delimeter, $_COOKIE[$this->_cart_cookie_name]);
// }
// // setcookie($this->_cart_cookie_name, time() - $this->_cart_cookie_expire);
// if (setcookie(
// $this->_cart_cookie_name,
// implode($this->_cart_cookie_delimeter, [...$order_uids, $entity->getPrimaryKey()]),
// time() + $this->_cart_cookie_expire,
// '/',
// '.localhost'
// )) {
// throw new \Exception(__FUNCTION__ . "에서 SetCookie 오류발생");
// }
// }
//장바구니에 담기
protected function insert_process()
{
//fieldData Rule 검사및 fieldData 적용
parent::insert_process();
//상품재고 줄이기
$productModel = new ProductModel();
$product = $productModel->getEntity([$this->_model->getPrimaryKey() => $this->_viewDatas['fieldDatas']['product_uid']]);
//구매 금액 비교
$price = ($product->getPrice() - $product->getSale()) * $this->_viewDatas['fieldDatas']['quantity'];
if ($price != $this->_viewDatas['fieldDatas']['price']) {
throw new \Exception("실 상품금액{$price} 와 구매금액{$this->_viewDatas['fieldDatas']['price']}이 서로 다릅니다.");
}
$productModel->decreaseStock($product, $this->_viewDatas['fieldDatas']['quantity']);
}
public function insert()
{
$msg = "";
try {
$this->_viewDatas['fields'] = $this->_model->getFields(__FUNCTION__);
$this->_viewDatas['fieldRules'] = $this->_model->getFieldRules($this->_viewDatas['fields'], __FUNCTION__);
$this->insert_process();
//Transaction 시작
$this->_model->transStart();
$entity = $this->_model->create($this->_viewDatas['fieldDatas']);
$this->setOrderCookie($entity);
//Transaction Commit
$this->_model->transComplete();
$msg = sprintf(
"%s에서 해당 상품 %s개를 장바구니에 담았습니다.",
$this->_viewDatas['title'],
$this->_viewDatas['fieldDatas']['quantity']
);
return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']));
} 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);
}
}
}

View File

@ -0,0 +1,35 @@
<?php
namespace App\Controllers\Front;
use App\Models\ProductModel;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
class ProductController extends FrontController
{
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
$this->_model = new ProductModel();
parent::initController($request, $response, $logger);
$this->_viewDatas['title'] = lang($this->_model->getClassName() . '.title');
$this->_viewPath .= strtolower($this->_model->getClassName());
helper($this->_model->getClassName());
}
//Field별 Form Datas 처리용
protected function getFieldFormData(string $field, $entity = null): array
{
switch ($field) {
case 'photo':
$this->_viewDatas['fieldDatas'][$field] = $this->single_upload_procedure($field, $entity);
break;
default:
return parent::getFieldFormData($field, $entity);
break;
}
return $this->_viewDatas['fieldDatas'];
}
}

View File

@ -12,11 +12,4 @@
</tr>
<?php endforeach; ?>
</table>
<div style="text-align:center">
<?php if ($entity->getStatus() == DEFAULTS['STATUS']) : ?>
<?= $this->include('admin/product/orderform'); ?>
<?php else : ?>
이제품은 현재[<?= lang('Product.STATUS.' . $entity->getStatus()) ?>]입니다.
<?php endif ?>
</div>
<?= $this->endSection() ?>

View File

@ -0,0 +1,35 @@
<?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?>
<div class="content">
<div class="top">
<?= form_open(current_url(), array("method" => "get")) ?>
<ul class="nav">
조건검색:<?php foreach ($fieldFilters as $field) : ?><li class="nav-item"><?= getFieldFilter_OrderHelper($field, $$field, $fieldFormOptions) ?></li><?php endforeach; ?>
<?= $this->include('templates/front/index_head'); ?>
</ul>
<?= form_close(); ?>
</div>
<table class="table table-bordered table-hover table-striped">
<tr>
<th>번호</th>
<?php foreach ($fields as $field) : ?><th><?= getFieldIndex_Column_OrderHelper($field, $order_field, $order_value) ?></th><?php endforeach; ?>
</tr>
<?php $i = 0; ?>
<?php foreach ($entitys as $entity) : ?>
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this);">
<td>
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
<?= $total_count - (($page - 1) * $per_page + $i) ?>
</td>
<?php foreach ($fields as $field) : ?>
<td nowrap><?= getFieldIndex_Row_OrderHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
<?php endforeach; ?>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</table>
<div class="bottom">
<?= $pagination ?>
</div>
</div>
<?= $this->endSection() ?>

View File

@ -0,0 +1,16 @@
<?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?>
<div class="content">
<table class="form table table-bordered table-hover table-striped">
<?php foreach ($fields as $field) : ?>
<tr>
<td class="label"><?= getFieldLabel_OrderHelper($field, $fieldRules) ?></td>
<td class="column">
<?= getFieldView_OrderHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?>
<?= validation_show_error($field); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
<?= $this->endSection() ?>

View File

@ -0,0 +1,34 @@
<?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?>
<div class="content">
<div class="top">
<?= form_open(current_url(), array("method" => "get")) ?>
<ul class="nav">
조건검색:<?php foreach ($fieldFilters as $field) : ?><li class="nav-item"><?= getFieldFilter_ProductHelper($field, $$field, $fieldFormOptions) ?></li><?php endforeach; ?>
<?= $this->include('templates/front/index_head'); ?>
</ul>
<?= form_close(); ?>
</div>
<table class="table table-bordered table-hover table-striped">
<tr>
<th>번호</th>
<?php foreach ($fields as $field) : ?><th><?= getFieldIndex_Column_ProductHelper($field, $order_field, $order_value) ?></th><?php endforeach; ?>
</tr>
<?php $i = 0; ?>
<?php foreach ($entitys as $entity) : ?>
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this);">
<td>
<? $total_count - (($page - 1) * $per_page + $i) ?>
</td>
<?php foreach ($fields as $field) : ?>
<td nowrap><?= getFieldIndex_Row_ProductHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
<?php endforeach; ?>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</table>
<div class="bottom">
<?= $pagination ?>
</div>
</div>
<?= $this->endSection() ?>

View File

@ -1,4 +1,4 @@
<?= form_open("admin/order/insert", ['method' => 'post']) ?>
<?= form_open("front/order/insert", ['method' => 'post']) ?>
<?= form_hidden("product_uid", $entity->getPrimaryKey()) ?>
<input type="hidden" id="price" name="price" value="<?= ($entity->getPrice() - $entity->getSale()) * 1 ?>">
<?php

View File

@ -0,0 +1,22 @@
<?= $this->extend('layouts/front') ?>
<?= $this->section('content') ?>
<div class="content">
<table class="form table table-bordered table-hover table-striped">
<?php foreach ($fields as $field) : ?>
<tr>
<td class="label"><?= getFieldLabel_ProductHelper($field, $fieldRules) ?></td>
<td class="column">
<?= getFieldView_ProductHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?>
<?= validation_show_error($field); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<div style="text-align:center">
<?php if ($entity->getStatus() == DEFAULTS['STATUS']) : ?>
<?= $this->include('front/product/orderform'); ?>
<?php else : ?>
이제품은 현재[<?= lang('Product.STATUS.' . $entity->getStatus()) ?>]입니다.
<?php endif ?>
</div>
<?= $this->endSection() ?>

View File

@ -6,40 +6,44 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<?php foreach ($layout['stylesheets'] as $stylesheet) : ?>
<?php echo $stylesheet ?>
<?= $stylesheet ?>
<?php endforeach; ?>
<?php foreach ($layout['javascripts'] as $javascript) : ?>
<?php echo $javascript ?>
<?= $javascript ?>
<?php endforeach; ?>
<link href="/css/front.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/front.js"></script>
<link href="/css/admin.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/admin.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<title><?php echo $title ?></title>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<title><?= $title ?></title>
</head>
<body>
<!-- layout_content Start -->
<div id="layout_content">
<!-- layout_content Top Start -->
<?php echo $this->include($layout['path'] . '/top_logo'); ?>
<!-- Layout Top Menu 시작-->
<?php echo $this->include($layout['path'] . '/top_menu'); ?>
<!-- Layout Top Menu -->
<!-- layout_content Top End -->
<!-- layout_content Body Start -->
<?php echo $this->renderSection('content') ?>
<!-- layout_content Body Content End -->
<!-- layout_content Bottom Start -->
<?php echo $this->include($layout['path'] . '/copyright'); ?>
<!-- layout_content Bottom End -->
<div id="head" class="row">
<?= $this->include($layout['path'] . '/top_menu'); ?>
</div>
<!-- layout_content End -->
<table id="layout">
<tr>
<td id="left" valign="top" width="160">
<?= $this->include($layout['path'] . '/left_menu'); ?>
</td>
<td id="body" valign="top" width="*">
<?= $this->include('templates/front/header'); ?>
<?= $this->renderSection('content') ?>
<?= $this->include('templates/front/footer'); ?>
<?= $this->include($layout['path'] . '/copyright'); ?>
</td>
<td id="right" valign="top" width="50">
<?= $this->include($layout['path'] . '/right_menu'); ?>
</td>
</tr>
</table>
<div id="tail" class="row"></div>
</body>
</html>

View File

@ -1,19 +1,19 @@
<!-- Copyright 시작-->
<div style="magin-top:5px; margin-bottom:5px; border:1px solid silver;"></div>
<div style="margin-top:5px; margin-bottom:5px; border:1px solid silver;"></div>
<div id="footer">
<img src="logo_gray.png">
<span style="color:#999; font-size: 11px;">
<a href="/sitecontent/?sitecategory=39">会社紹介 </a>&nbsp;|&nbsp;
<a href="/sitecontent/?sitecategory=40">利用約款</a>&nbsp;|&nbsp;
<a href="/sitecontent/?sitecategory=41">個人情報保護政策</a>&nbsp;|&nbsp;
<a href="mailto:idc@idcjp.jp">eメール</a>
<a href="/sitecontent/?sitecategory=39">会社紹介 </a>&nbsp;|&nbsp;
<a href="/sitecontent/?sitecategory=40">利用約款</a>&nbsp;|&nbsp;
<a href="/sitecontent/?sitecategory=41">個人情報保護政策</a>&nbsp;|&nbsp;
<a href="mailto:idc@idcjp.jp">eメール</a>
</span>
<div style="font-size: 11px; margin-top: 5px; line-height: 160%;">
社名 : <span class="cpy">TRi-aBility()</span> &nbsp; &nbsp; 代表者 : <span class="cpy"> </span> &nbsp; &nbsp;
住所 : <span class="cpy">東京都 大田区平和島6-5</span><br/>
TEL: <span class="cpy">043-307-5390</span> &nbsp; &nbsp; EMAIL : <span class="cpy"><a href="mailto:idc@idcjp.jp" style="color:darkblue;">idc@idcjp.jp</a></span><br/>
<!-- 事業者登録番号 : <span class="cpy">887-81-00973</span><br/> -->
<!-- Copyright &copy; 2012, YYY, All rights Reserved -->
社名 : <span class="cpy">TRi-aBility()</span> &nbsp; &nbsp; 代表者 : <span class="cpy"> </span> &nbsp; &nbsp;
住所 : <span class="cpy">東京都 大田区平和島6-5</span><br />
TEL: <span class="cpy">043-307-5390</span> &nbsp; &nbsp; EMAIL : <span class="cpy"><a href="mailto:idc@idcjp.jp" style="color:darkblue;">idc@idcjp.jp</a></span><br />
<!-- 事業者登録番号 : <span class="cpy">887-81-00973</span><br/> -->
<!-- Copyright &copy; 2012, YYY, All rights Reserved -->
</div>
</div>
<!-- Copyright -->
<!-- Copyright -->

View File

@ -1,5 +0,0 @@
<div style="text-align:right; margin-top:10px; margin-bottom:5px;">
<i class="fa fa-plus text-danger" style="padding-left:5px; padding-right:5px;"></i><a href="/">HOME</a>
<i class="fa fa-angle-right" style="padding-left:5px; padding-right:5px;"></i><a href="<?php echo $parentCategory->url ?>"><?php echo $language == LANGUAGE_JAPAN ? $parentCategory->title_japanese:$parentCategory->title ?></a>
<i class="fa fa-angle-right" style="padding-left:5px; padding-right:5px;"></i><span style="font-weight:bold;"><?php echo $language == LANGUAGE_JAPAN ? $currentCategory->title_japanese:$currentCategory->title ?></span>
</div>

View File

@ -0,0 +1,10 @@
<!-- left menu start -->
<link href="/css/admin/left_menu.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/side_menu.js"></script>
<div id="left_menu" class="shadow-lg rounded">
<div class="accordion accordion-flush">
<?= $this->include($layout['path'] . '/left_menu/base'); ?>
<?= $this->include($layout['path'] . '/left_menu/board'); ?>
<?= $this->include($layout['path'] . '/left_menu/shoppingmall'); ?>
</div>
</div>

View File

@ -0,0 +1,6 @@
<div class="accordion-item" style="background-color: #eaeaea;">
<h2><a href=" /front"><i class="fa fa-home"></i>Main</a></h2>
</div>
<div class="accordion-item">
<h2><a href="/front/user"><?= CLASS_ICONS['USER'] ?></i>계정 관리</a></h2>
</div>

View File

@ -0,0 +1,3 @@
<div class="accordion-item">
<h2><a href="/admin/board"><?= CLASS_ICONS['BOARD'] ?>게시글 관리</a></h2>
</div>

View File

@ -0,0 +1,9 @@
<div class="accordion-item">
<h2><a href="/front/product"><?= CLASS_ICONS['PRODUCT'] ?>상품 관리</a></h2>
</div>
<div class="accordion-item">
<h2><a href="/front/order"><?= CLASS_ICONS['ORDER'] ?></i>주문 관리</a></h2>
</div>
<div class="accordion-item">
<h2><a href="/front/billing"><?= CLASS_ICONS['BILLING'] ?></i>결제 관리</a></h2>
</div>

View File

@ -0,0 +1,7 @@
<!-- right menu start -->
<link href="/css/admin/right_menu.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/side_menu.js"></script>
<div id="right_menu" class="shadow-lg rounded">
<div class="accordion accordion-flush">
</div>
</div>

View File

@ -1,8 +0,0 @@
<!-- SITEBOARD LEFT BANNER 시작 -->
<script src="/js/ScrollToFixed-master/jquery-scrolltofixed-min.js" type="text/javascript"></script>
<script src="/js/front/subpage_fixed_left_banner.js" type="text/javascript"></script>
<div id="subpage_fixed_left_banner">
<div style="margin-top:30px;"><a href="/sitecontent/?sitecategory=44"><img src="left_banner_1.png"></a></div>
<div style="margin-top:20px;"><a href="javascript://" onclick="window.open('<?php echo CHATTING_URL?>','chat','width=500, height=500')" onfocus="this.blur()"><img src="left_banner_2.png"></a></div>
</div>
<!-- SITEBOARD LEFT BANNER -->

View File

@ -1,8 +0,0 @@
<!-- SITECMS LEFT BANNER 시작 -->
<script src="/js/ScrollToFixed-master/jquery-scrolltofixed-min.js" type="text/javascript"></script>
<script src="/js/front/subpage_fixed_left_banner.js" type="text/javascript"></script>
<div id="subpage_fixed_left_banner">
<div style="margin-top:30px;"><a href="/sitecontent/?sitecategory=44"><img src="left_banner_1.png"></a></div>
<div style="margin-top:20px;"><a href="javascript://" onclick="window.open('<?php echo CHATTING_URL?>','chat','width=500, height=500')" onfocus="this.blur()"><img src="left_banner_2.png"></a></div>
</div>
<!-- SITECMS LEFT BANNER -->

View File

@ -1,13 +0,0 @@
<!-- layout_content Top Logo 시작 -->
<div style="position:relative;">
<a href="/"><img src="logo.png"/></a>
<img src="logo_side.png"/>
<div style="position:absolute; with:700px; top:50px; left:620px;">
<a href="/"><img src="main_link_home.png"/></a>
<a href="mailto:idc@idcjp.jp"><img src="main_link_contact.png"/></a>
<a href="javascript:bookmarksite('IDC-JP', 'http://www.idcjp.jp')"><img src="main_link_bookmark.png"/></a>
<a href="/common/language/locale/korean"><img src="main_link_korea.png"/></a>
<a href="/common/language/locale/japanese"><img src="main_link_japan.png"/></a>
</div>
</div>
<!-- layout_content Top Logo -->

View File

@ -0,0 +1,14 @@
<nav class="navbar navbar-expand-lg bg-light" style="border-bottom:1px solid silver;">
<div class="container-fluid">
<a href="/admin" class="navbar-brand">BaseProject 관리 Site</a>
<div class="input-group custom-search-form" style="width:270px;">
<?= $this->include($layout['path'] . '/top_menu/search'); ?>
</div>
<div class="input-group custom-search-form" style="width:270px;">
<?= $this->include($layout['path'] . '/top_menu/make_password'); ?>
</div>
<div style="float: right;">
<?= $this->include($layout['path'] . '/top_menu/member_link'); ?>
</div>
</div>
</nav>

View File

@ -0,0 +1,3 @@
<span><?= ICONS['LOCK'] ?></span>
<input type="text" class="form-control" value="<?= getPasswordString_CommonHelper() ?>" id="makePassword">
<span class="input-group-btn" id="mkbutton"><button class="btn btn-default border border-dark" type="button" id="totSearchBtn" onClick="window.location.reload();"><?= ICONS['SEARCH'] ?></button></span>

View File

@ -0,0 +1,16 @@
<ul class="navbar-nav me-auto my-2 my-lg-0 navbar-nav-scroll" style="--bs-scroll-height: 100px;">
<li class="nav-item dropdown">
<?php if ($session->get(SESSION_NAMES['ISLOGIN'])) : ?>
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<?= ICONS['LOGIN'] ?><?= $session->get(SESSION_NAMES['AUTH'])[AUTH_FIELDS['TITLE']] ?>
</a>
<ul class="dropdown-menu dropdown-menu-end">
<li><a class="dropdown-item" href="/admin/user/update/<?= $session->get(SESSION_NAMES['AUTH'])[AUTH_FIELDS['ID']] ?>"><?= ICONS['SETUP'] ?>수정</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="/logout"><?= ICONS['LOGOUT'] ?>Logout</a></li>
</ul>
<?php else : ?><a class="nav-link dropdown-toggle" href="/login" role="button"><?= ICONS['LOGIN'] ?>Login</a><?php endif ?>
</li>
</ul>

View File

@ -0,0 +1,4 @@
<form class="d-flex me-20" role="search">
<input class="form-control" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>

View File

@ -1,5 +0,0 @@
<div id='welcome_left_banner' style="position:absolute; top:150px; left:-215px; text-align:right;">
<img src="side_left_title.png">
<div style="padding-top:15px;"><a href="/sitecontent/?sitecategory=44"><img src="main_banner_1.png"></a></div>
<div style="padding-top:15px;"><a href="javascript://" onclick="window.open('<?php echo CHATTING_URL?>','chat','width=<?php echo SITECHAT_WINDOW_WIDTH ?>, height=<?php echo SITECHAT_WINDOW_HEIGHT?>')" onfocus="this.blur()"><img src="main_banner_2.png"></a></div>
</div>

View File

@ -1,16 +0,0 @@
<div id='partner' style="margin-bottom:5px; padding-top:5px; padding-bottom:5px; border-top:1px solid silver; border-bottom:1px solid silver;">
<img src='main_icon_partner.png'> &nbsp; &nbsp;
<img src='main_icon_softbank.png'> &nbsp;
<img src='main_icon_cisco.png'> &nbsp;
<img src='main_icon_lg.png'> &nbsp;
<img src='main_icon_hp.png'> &nbsp;
<img src='main_icon_dell.png'> &nbsp;
<img src='main_icon_ibm.png'> &nbsp;
<img src='main_icon_slim.png'> &nbsp;
<img src='main_icon_ntt.png'> &nbsp;
<img src='main_icon_jstream.png'> &nbsp;
<img src='main_icon_corel.png'> &nbsp;
<img src='main_icon_kddi.png'> &nbsp;
<img src='main_icon_red.png'> &nbsp;
<img src='main_icon_yahoobb.png'> &nbsp;
</div>

View File

@ -1,14 +0,0 @@
<div id='welcome_right_banner' style="position:absolute; top:150px; left:10px;">
<img src="side_right_title.gif">
<div style='padding-top:15px; text-align:center;'>
<div style='width: 190px;'>
<div style='float: left; width: 90px; height: 73px;'><a href='/sitecontent/?sitecategory=50'><img src='main_icon_1.png' border=0></a></div>
<div style='float: left; width: 100; height: 73px;'><a href='#'><img src='main_icon_2.png' border=0></a></div>
<div style='clear: left;'></div>
<div style='float: left; width: 90px; height: 83px;'><a href='/sitecontent/?sitecategory=52'><img src='main_icon_3.png' border=0></a></div>
<div style='float: left; width: 10px; height:0 83px;'><a href='/sitecontent/?sitecategory=54'><img src='main_icon_4.png' border=0></a></div>
<div style='clear: left;'></div>
<div style='paddint-top:15px;'><img src='main_icon_ns.png' border=0></div>
</div>
</div>
</div>

View File

@ -0,0 +1,35 @@
<div class="footer"></div>
<?= $session->getFlashdata('return_message') ? alert_CommonHelper($session->getFlashdata('return_message')) : "" ?>
<script type="text/javascript">
$(document).ready(function() {
//class가 calender인 inputbox용,날짜field용
$(".calender").datepicker({
changeYear: true,
changeMonth: true,
yearRange: "-10:+0",
dateFormat: "yy-mm-dd"
});
//id가 batchjobuids_checkbox인 버튼을 클릭시 class가 batchjobuids_checkboxs인 checkbox용
$('#batchjobuids_checkbox').click(function(event) {
if (this.checked) {
$('.batchjobuids_checkboxs').each(function() { //loop checkbox
$(this).prop('checked', true); //check
});
} else {
$('.batchjobuids_checkboxs').each(function() { //loop checkbox
$(this).prop('checked', false); //uncheck
});
}
});
//class가 select-field인 SelectBox용
$(".select-field").select2({
theme: "bootstrap-5",
});
//class가 editor인 textarea용
tinymce.init({
selector: '.editor',
theme: 'silver',
height: 500
});
});
</script>

View File

@ -0,0 +1,3 @@
<div class="header">
<h4><i class="bi bi-cast"></i><?= $title ?></h4>
</div>

View File

@ -0,0 +1,6 @@
<li class="nav-item">검색어:<?= form_input('word', $word) ?></li>
<li class="nav-item">검색일:
<?= form_input('start', $start, ["class" => "calender"]) ?><?= form_input('end', $end, ["class" => "calender"]) ?>
<?= form_submit('', '검색', array("class" => "btn btn-outline btn-primary")); ?><?= anchor(current_url() . '/excel?' . $uri->getQuery(), '<i class="bi bi-file-excel"></i>', ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?>
</li>
<li class="nav-item">page:<?= $page ?> / total:<?= $total_page ?> <?= form_dropdown('per_page', $pageOptions, $per_page, array('onChange' => 'this.form.submit()')) ?> / 총:<?= $total_count ?></li>