Browse Source

오더뷰파일수정해야함

master
kmj1996 5 years ago
parent
commit
3ac42666a9
  1. 51
      wheeparam/application/controllers/Memo.php
  2. 46
      wheeparam/application/controllers/order.php
  3. 51
      wheeparam/config/no_install.php
  4. 12
      wheeparam/config/wheeparam.php
  5. 15
      wheeparam/views/themes/desktop/memo/index.php
  6. 4
      wheeparam/views/themes/desktop/memo/view.php
  7. 25
      wheeparam/views/themes/desktop/order/index.php
  8. 1
      wheeparam/views/themes/desktop/order/view.php

51
wheeparam/application/controllers/Memo.php

@ -0,0 +1,51 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Class Memo
* ------------------------------------------------------------------------------
* 메모페이지
*/
class Memo extends WB_Controller {
public function index()
{
$this->db->select('*');
$this->db->from('memo');
$this->db->where('status', 'Y');
$this->db->order_by('idx DESC');
$result = $this->db->get()->result_array();
// SELECT * FROM wb_memo WHERE status = 'Y' ORDER BY idx DESC;
$this->data['abcd'] = "1234";
$this->data['list'] = $result;
// 레이아웃 & 뷰파일 설정
$this->theme = $this->site->get_layout();
$this->view = "memo/index";
$this->active = "/memo/index";
}
public function view($getValue="")
{
$this->db->select('*');
$this->db->from('memo');
$this->db->where('status', 'Y');
$this->db->where('idx', $getValue);
$this->db->order_by('idx DESC');
$result = $this->db->get()->row_array();
if(! $result) {
alert('요청하신 메모는 삭제되었습니다.');
exit;
}
$this->data['result'] = $result;
// 레이아웃 & 뷰파일 설정
$this->theme = $this->site->get_layout();
$this->view = "memo/view";
$this->active = "/memo/view";
}
}

46
wheeparam/application/controllers/order.php

@ -0,0 +1,46 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Class Memo
* ------------------------------------------------------------------------------
* 주문페이지
*/
class order extends WB_Controller {
public function index()
{
$this->db->select('*');
$this->db->from('order');
$this->db->order_by('idx DESC');
$result = $this->db->get()->result_array();
$this->data['list'] = $result;
// 레이아웃 & 뷰파일 설정
$this->theme = $this->site->get_layout();
$this->view = "/order/index";
$this->active = "/order/index";
}
public function view($getValue="") {
$this->db->select('*');
$this->db->from('order');
$this->db->where('idx', $getValue);
$this->db->order_by('idx DESC');
$result = $this->db->get()->row_array();
if(! $result) {
alert("없는 페이지 입니다");
exit;
}
// 레이아웃 & 뷰파일 설정
$this->theme = $this->site->get_layout();
$this->view = "/order/index";
$this->active = "/order/index";
}
}

51
wheeparam/config/no_install.php

@ -1,51 +0,0 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>휘파람 보드 초기 설치</title>
<link rel="stylesheet" href="//spoqa.github.io/spoqa-han-sans/css/SpoqaHanSans-kr.css">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:400,100,700">
<link rel="stylesheet" href="../assets/css/admin.min.css">
</head>
<body>
<style>
html,body {height:100%}
</style>
<article id="login-form">
<div class="login-wrap">
<h1 class="login-logo">휘파람 보드 미설치</h1>
<div class="login-panel">
<div class="login-heading">휘파람 보드가 설치되어 있지 않습니다.</div>
<div class="login-body">
<h4 class="text-center">현재 설정 정보</h4>
<p class="alert alert-info text-center">현재 설정 정보가 올바르지 않을경우, config 파일을 먼저 수정해주세요</p>
<div class="form-group">
<label>프로젝트 이름</label>
<div class="form-control"><?=PROJECT?></div>
</div>
<div class="form-group">
<label>접속 URL</label>
<div class="form-control"><?=BASE_URL?></div>
</div>
<hr>
<div class="form-group">
<label>DB HOST</label>
<div class="form-control"><?=DB_HOST?></div>
</div>
<div class="form-group">
<label>DB USER</label>
<div class="form-control"><?=DB_USER?></div>
</div>
<div class="form-group">
<label>DB NAME</label>
<div class="form-control"><?=DB_NAME?></div>
</div>
<a class="btn btn-block" href="install">휘파람 보드 설치 시작하기</a>
</div>
</div>
</div>
</article>
</body>
</html>

12
wheeparam/config/wheeparam.php

@ -7,20 +7,20 @@
date_default_timezone_set('Asia/Seoul'); date_default_timezone_set('Asia/Seoul');
// 프로젝트 이름 // 프로젝트 이름
define('PROJECT', 'wheeparamboard');
define('PROJECT', 'minjoonpractice');
// 개발용 설정 // 개발용 설정
if( IS_TEST ) if( IS_TEST )
{ {
define("BASE_URL", "http://www.wboard.com"); // 기본 설정 URL
define("COOKIE_DOMAIN", ".wboard.com"); // 쿠키도메인
define("BASE_URL", "http://www.mj.com"); // 기본 설정 URL
define("COOKIE_DOMAIN", ".mj.com"); // 쿠키도메인
define("SSL_VERFIY", FALSE); // 보안인증서 사용 여부 define("SSL_VERFIY", FALSE); // 보안인증서 사용 여부
// 데이타베이스 설정 // 데이타베이스 설정
define("DB_HOST", "115.68.120.149"); // DB 호스트 define("DB_HOST", "115.68.120.149"); // DB 호스트
define("DB_USER", "wboard"); // DB 아이디
define("DB_PASS", "!@wboard12"); // DB 비밀번호
define("DB_NAME", "wboard"); // DB 네임
define("DB_USER", "songwritersg"); // DB 아이디
define("DB_PASS", "jang7668!@"); // DB 비밀번호
define("DB_NAME", "practice"); // DB 네임
} }
// 실제 서버용 설정 // 실제 서버용 설정
else else

15
wheeparam/views/themes/desktop/memo/index.php

@ -0,0 +1,15 @@
<?php echo $abcd ?><br>
<table class="table">
<tbody>
<?php foreach($list as $dd):?>
<tr>
<td><?=$dd['idx']?></td>
<td><a href="<?=base_url('memo/view/'.$dd['idx'])?>"><?=$dd['title']?></a></td>
<td><?=$dd['regtime']?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>

4
wheeparam/views/themes/desktop/memo/view.php

@ -0,0 +1,4 @@
<h2><?php echo $result['title']?></h2>
<div>
<?php echo $result['content']?>
</div>

25
wheeparam/views/themes/desktop/order/index.php

@ -0,0 +1,25 @@
<table class="table">
<thead>
<th>배송확정일</th>
<th>주문번호</th>
<th>주문자명</th>
<th>상품명</th>
<th>수량</th>
<th>배송</th>
</thead>
<tbody>
<?php foreach ($list as $od):?>
<tr>
<td><?=date('Y-m-d', strtotime($od['time']))?></td>
<td><a href="<?=base_url('order/view/').$od['idx']?>"><?php echo $od['order_num']?></a></td>
<td><?=$od['order_hu_name']?></td>
<td><?=$od['order_name']?></td>
<td><?=$od['count']?></td>
<td><?=$od['status']?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>

1
wheeparam/views/themes/desktop/order/view.php

@ -0,0 +1 @@
<?php
Loading…
Cancel
Save