Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
MySQLi 지원 추가 및 SMS5 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chicpro committed Oct 16, 2015
1 parent aa8d2d0 commit cfd752a
Show file tree
Hide file tree
Showing 94 changed files with 448 additions and 389 deletions.
1 change: 0 additions & 1 deletion adm/admin.menu900.php
Expand Up @@ -6,7 +6,6 @@
array('900300', '문자 보내기', ''.G5_SMS5_ADMIN_URL.'/sms_write.php', 'sms_write'),
array('900400', '전송내역-건별', ''.G5_SMS5_ADMIN_URL.'/history_list.php', 'sms_history' , 1),
array('900410', '전송내역-번호별', ''.G5_SMS5_ADMIN_URL.'/history_num.php', 'sms_history_num' , 1),
array('900450', '전송내역-회원', ''.G5_SMS5_ADMIN_URL.'/history_member.php', 'sms_history_mb' , 1),
array('900500', '이모티콘 그룹', ''.G5_SMS5_ADMIN_URL.'/form_group.php' , 'emoticon_group'),
array('900600', '이모티콘 관리', ''.G5_SMS5_ADMIN_URL.'/form_list.php', 'emoticon_list'),
array('900700', '휴대폰번호 그룹', ''.G5_SMS5_ADMIN_URL.'/num_group.php' , 'hp_group', 1),
Expand Down
2 changes: 1 addition & 1 deletion adm/contentlist.php
Expand Up @@ -69,7 +69,7 @@
</tr>
</thead>
<tbody>
<?php for ($i=0; $row=mysql_fetch_array($result); $i++) {
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
Expand Down
2 changes: 1 addition & 1 deletion adm/faqformupdate.php
Expand Up @@ -21,7 +21,7 @@
$sql_common ";
sql_query($sql);

$fa_id = mysql_insert_id();
$fa_id = sql_insert_id();
}
else if ($w == "u")
{
Expand Down
2 changes: 1 addition & 1 deletion adm/faqmasterformupdate.php
Expand Up @@ -31,7 +31,7 @@
$sql = " insert {$g5['faq_master_table']} $sql_common ";
sql_query($sql);

$fm_id = mysql_insert_id();
$fm_id = sql_insert_id();
}
else if ($w == "u")
{
Expand Down
2 changes: 1 addition & 1 deletion adm/faqmasterlist.php
Expand Up @@ -93,7 +93,7 @@
</tr>
</thead>
<tbody>
<?php for ($i=0; $row=mysql_fetch_array($result); $i++) {
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
$sql1 = " select COUNT(*) as cnt from {$g5['faq_table']} where fm_id = '{$row['fm_id']}' ";
$row1 = sql_fetch($sql1);
$cnt = $row1['cnt'];
Expand Down
2 changes: 1 addition & 1 deletion adm/mail_list.php
Expand Up @@ -51,7 +51,7 @@
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
$s_vie = '<a href="./mail_preview.php?ma_id='.$row['ma_id'].'" target="_blank">미리보기</a>';

$num = number_format($total_count - ($page - 1) * $config['cf_page_rows'] - $i);
Expand Down
2 changes: 1 addition & 1 deletion adm/newwinformupdate.php
Expand Up @@ -28,7 +28,7 @@
$sql = " insert {$g5['new_win_table']} set $sql_common ";
sql_query($sql);

$nw_id = mysql_insert_id();
$nw_id = sql_insert_id();
}
else if ($w == "u")
{
Expand Down
2 changes: 1 addition & 1 deletion adm/newwinlist.php
Expand Up @@ -71,7 +71,7 @@
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
$bg = 'bg'.($i%2);

switch($row['nw_device']) {
Expand Down
2 changes: 1 addition & 1 deletion adm/poll_form_update.php
Expand Up @@ -17,7 +17,7 @@
values ( '{$_POST['po_subject']}', '{$_POST['po_poll1']}', '{$_POST['po_poll2']}', '{$_POST['po_poll3']}', '{$_POST['po_poll4']}', '{$_POST['po_poll5']}', '{$_POST['po_poll6']}', '{$_POST['po_poll7']}', '{$_POST['po_poll8']}', '{$_POST['po_poll9']}', '{$_POST['po_cnt1']}', '{$_POST['po_cnt2']}', '{$_POST['po_cnt3']}', '{$_POST['po_cnt4']}', '{$_POST['po_cnt5']}', '{$_POST['po_cnt6']}', '{$_POST['po_cnt7']}', '{$_POST['po_cnt8']}', '{$_POST['po_cnt9']}', '{$_POST['po_etc']}', '{$_POST['po_level']}', '{$_POST['po_point']}', '".G5_TIME_YMD."' ) ";
sql_query($sql);

$po_id = mysql_insert_id();
$po_id = sql_insert_id();
}
else if ($w == 'u')
{
Expand Down
2 changes: 1 addition & 1 deletion adm/popular_rank.php
Expand Up @@ -16,7 +16,7 @@

$sql = " select pp_word {$sql_common} {$sql_search} {$sql_group} ";
$result = sql_query($sql);
$total_count = mysql_num_rows($result);
$total_count = sql_num_rows($result);

$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/ajax.orderitem.php
Expand Up @@ -58,7 +58,7 @@
and it_id = '{$row['it_id']}'
order by io_type asc, ct_id asc ";
$res = sql_query($sql);
$rowspan = mysql_num_rows($res);
$rowspan = sql_num_rows($res);

// 배송비
switch($row['ct_send_cost'])
Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/bannerformupdate.php
Expand Up @@ -37,7 +37,7 @@
bn_order = '$bn_order' ";
sql_query($sql);

$bn_id = mysql_insert_id();
$bn_id = sql_insert_id();
}
else if ($w=="u")
{
Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/bannerlist.php
Expand Up @@ -52,7 +52,7 @@
order by bn_order, bn_id desc
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 테두리 있는지
$bn_border = $row['bn_border'];
// 새창 띄우기인지
Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/categoryformupdate.php
Expand Up @@ -131,7 +131,7 @@
$sql = " select it_id from {$g5['g5_shop_item_table']} where ca_id = '$ca_id' ";
$result = sql_query($sql);
$i=0;
while ($row = mysql_fetch_array($result))
while ($row = sql_fetch_array($result))
{
$i++;
if ($i % 10 == 0) $str .= "\\n";
Expand Down
5 changes: 4 additions & 1 deletion adm/shop_admin/configform.php
Expand Up @@ -119,7 +119,10 @@
<h2 class="h2_frm">사업자정보</h2>
<?php echo $pg_anchor; ?>
<div class="local_desc02 local_desc">
<p>사업자정보는 tail.php 와 content.php 에서 표시합니다.</p>
<p>
사업자정보는 tail.php 와 content.php 에서 표시합니다.<br>
대표전화번호는 SMS 발송번호로 사용되므로 사전등록된 발신번호와 일치해야 합니다.
</p>
</div>

<div class="tbl_frm01 tbl_wrap">
Expand Down
4 changes: 4 additions & 0 deletions adm/shop_admin/configformupdate.php
Expand Up @@ -6,6 +6,10 @@

auth_check($auth[$sub_menu], "w");

// 대표전화번호 유효성 체크
if(!check_vaild_callback($_POST['de_admin_company_tel']))
alert('대표전화번호를 올바르게 입력해 주세요.');

// 로그인을 바로 이 주소로 하는 경우 쇼핑몰설정값이 사라지는 현상을 방지
if (!$_POST['de_admin_company_owner']) goto_url("./configform.php");

Expand Down
6 changes: 2 additions & 4 deletions adm/shop_admin/itemcopyupdate.php
Expand Up @@ -24,10 +24,8 @@

// 상품테이블의 필드가 추가되어도 수정하지 않도록 필드명을 추출하여 insert 퀴리를 생성한다. (상품코드만 새로운것으로 대체)
$sql_common = "";
$fields = mysql_list_fields(G5_MYSQL_DB, $g5['g5_shop_item_table']);
$columns = mysql_num_fields($fields);
for ($i = 0; $i < $columns; $i++) {
$fld = mysql_field_name($fields, $i);
$fields = sql_field_names($g5['g5_shop_item_table']);
foreach($fields as $fld) {
if ($fld == 'it_id' || $fld == 'it_sum_qty' || $fld == 'it_use_cnt' || $fld == 'it_use_avg')
continue;

Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/itemevent.php
Expand Up @@ -41,7 +41,7 @@
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++) {
for ($i=0; $row=sql_fetch_array($result); $i++) {

$href = "";
$sql = " select count(ev_id) as cnt from {$g5['g5_shop_event_item_table']} where ev_id = '{$row['ev_id']}' ";
Expand Down
6 changes: 3 additions & 3 deletions adm/shop_admin/itemeventlist.php
Expand Up @@ -78,7 +78,7 @@
$event_option = "<option value=''>이벤트를 선택하세요</option>";
$sql1 = " select ev_id, ev_subject from {$g5['g5_shop_event_table']} order by ev_id desc ";
$result1 = sql_query($sql1);
while ($row1=mysql_fetch_array($result1))
while ($row1=sql_fetch_array($result1))
$event_option .= '<option value="'.$row1['ev_id'].'" '.get_selected($ev_id, $row1['ev_id']).' >'.conv_subject($row1['ev_subject'], 20,"").'</option>';
echo $event_option;
?>
Expand All @@ -98,7 +98,7 @@
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++)
for ($i=0; $row1=sql_fetch_array($result1); $i++)
{
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
Expand Down Expand Up @@ -144,7 +144,7 @@
</tr>
</thead>
<tbody>
<?php for ($i=0; $row=mysql_fetch_array($result); $i++) {
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
$href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];

$sql = " select ev_id from {$g5['g5_shop_event_item_table']}
Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/itemlist.php
Expand Up @@ -162,7 +162,7 @@
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
$bg = 'bg'.($i%2);
Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/itemoption.php
Expand Up @@ -11,7 +11,7 @@

$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '{$it['it_id']}' order by io_no asc ";
$result = sql_query($sql);
if(mysql_num_rows($result))
if(sql_num_rows($result))
$po_run = true;
} else if(!empty($_POST)) {
$opt1_subject = preg_replace('/[\'\"]/', '', trim(stripslashes($_POST['opt1_subject'])));
Expand Down
4 changes: 2 additions & 2 deletions adm/shop_admin/itemqalist.php
Expand Up @@ -70,7 +70,7 @@
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
Expand Down Expand Up @@ -118,7 +118,7 @@
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
$row['iq_subject'] = cut_str($row['iq_subject'], 30, "...");
$href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
$name = get_sideview($row['mb_id'], get_text($row['iq_name']), $row['mb_email'], $row['mb_homepage']);
Expand Down
6 changes: 3 additions & 3 deletions adm/shop_admin/itemsellrank.php
Expand Up @@ -40,7 +40,7 @@
$sql .= " group by a.it_id
order by $sort1 $sort2 ";
$result = sql_query($sql);
$total_count = mysql_num_rows($result);
$total_count = sql_num_rows($result);

$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
Expand Down Expand Up @@ -75,7 +75,7 @@
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
Expand Down Expand Up @@ -123,7 +123,7 @@
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";

Expand Down
4 changes: 2 additions & 2 deletions adm/shop_admin/itemstocklist.php
Expand Up @@ -70,7 +70,7 @@
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
Expand Down Expand Up @@ -128,7 +128,7 @@
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";

Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/itemstocksms.php
Expand Up @@ -113,7 +113,7 @@
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 상품정보
$sql = " select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['it_id']}' ";
Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/itemsupply.php
Expand Up @@ -6,7 +6,7 @@
if($it['it_id']) {
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '1' and it_id = '{$it['it_id']}' order by io_no asc ";
$result = sql_query($sql);
if(mysql_num_rows($result))
if(sql_num_rows($result))
$ps_run = true;
} else if(!empty($_POST)) {
$subject_count = count($_POST['subject']);
Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/itemuselist.php
Expand Up @@ -70,7 +70,7 @@
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
Expand Down
4 changes: 2 additions & 2 deletions adm/shop_admin/optionstocklist.php
Expand Up @@ -71,7 +71,7 @@
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
Expand Down Expand Up @@ -124,7 +124,7 @@
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";

Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/orderdeliveryexcel.php
Expand Up @@ -12,7 +12,7 @@
order by od_id desc ";
$result = sql_query($sql);

if(!@mysql_num_rows($result))
if(!@sql_num_rows($result))
alert_close('배송처리할 주문 내역이 없습니다.');

/*================================================================================
Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/orderform.php
Expand Up @@ -157,7 +157,7 @@
and it_id = '{$row['it_id']}'
order by io_type asc, ct_id asc ";
$res = sql_query($sql);
$rowspan = mysql_num_rows($res);
$rowspan = sql_num_rows($res);

// 합계금액 계산
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/orderlist.php
Expand Up @@ -437,7 +437,7 @@
$tot_couponprice += $row['couponprice'];
$tot_misu += $row['od_misu'];
}
mysql_free_result($result);
sql_free_result($result);
if ($i == 0)
echo '<tr><td colspan="12" class="empty_table">자료가 없습니다.</td></tr>';
?>
Expand Down
2 changes: 1 addition & 1 deletion adm/shop_admin/ordermail.inc.php
Expand Up @@ -22,7 +22,7 @@
where od_id = '{$od['od_id']}'
order by ct_id ";
$result = sql_query($sql);
for ($j=0; $ct=mysql_fetch_array($result); $j++) {
for ($j=0; $ct=sql_fetch_array($result); $j++) {
$cart_list[$j]['it_id'] = $ct['it_id'];
$cart_list[$j]['it_name'] = $ct['it_name'];
$cart_list[$j]['it_opt'] = $ct['ct_option'];
Expand Down
8 changes: 4 additions & 4 deletions adm/shop_admin/orderprintresult.php
Expand Up @@ -50,7 +50,7 @@ function conv_telno($t)
$sql .= " and b.ct_status = '$ct_status' ";
$sql .=" order by od_time asc, b.it_id, b.io_type, b.ct_id ";
$result = sql_query($sql);
$cnt = @mysql_num_rows($result);
$cnt = @sql_num_rows($result);
if (!$cnt)
alert("출력할 내역이 없습니다.");

Expand All @@ -65,7 +65,7 @@ function conv_telno($t)
echo iconv('utf-8', 'euc-kr', "우편번호,주소,이름,전화1,전화2,상품명,수량,선택사항,배송비,상품코드,주문번호,운송장번호,전하실말씀\n");

$save_it_id = '';
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$row = array_map('iconv_euckr', $row);

Expand Down Expand Up @@ -145,7 +145,7 @@ function conv_telno($t)
$sql .= " and b.ct_status = '$ct_status' ";
$sql .=" order by od_time asc, b.it_id, b.io_type, b.ct_id ";
$result = sql_query($sql);
$cnt = @mysql_num_rows($result);
$cnt = @sql_num_rows($result);
if (!$cnt)
alert("출력할 내역이 없습니다.");

Expand Down Expand Up @@ -264,7 +264,7 @@ function get_order($od_id)
$sql .= " and b.ct_status = '$ct_status' ";
$sql .= " order by a.od_id ";
$result = sql_query($sql);
if (mysql_num_rows($result) == 0)
if (sql_num_rows($result) == 0)
{
echo "<script>alert('출력할 내역이 없습니다.'); window.close();</script>";
exit;
Expand Down

0 comments on commit cfd752a

Please sign in to comment.