서버이전시 이미지 주소변경 > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

서버이전시 이미지 주소변경

페이지 정보

본문

서버이전시 이미지 주소변경
















//-----------------------------------------------

<?php
$sub_menu = "600100";
include_once('./_common.php');

auth_check($auth[$sub_menu], 'r');

if ($is_admin != 'super')
   alert('최고관리자만 접근 가능합니다.');

$g5['title'] = '이미지 주소 변경';
include_once ('./admin.head.php');

$pg_anchor = '<ul class="anchor">
   <li><a href="#img_rename">이미지 주소 변경</a></li>
</ul>';

$frm_submit = '<div class="btn_confirm01 btn_confirm">
   <input type="submit" value="확인" class="btn_submit" accesskey="s">
   <a href="'.G5_URL.'/">메인으로</a>
</div>';
?>

<div class="local_desc01 local_desc">
   <p>
       이미지 주소 변경 시 게시판, 내용관리에 등록된 이미지의 주소가 현재 사이트 주소로 변경됩니다.
 <br><strong>그누보드5 , 영카드5</strong> 에서 사용 가능합니다.
   </p>
</div>

<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);" enctype="MULTIPART/FORM-DATA">
<input type="hidden" name="token" value="" id="token">

<section id="img_rename">
   <div class="tbl_frm01 tbl_wrap">
      <table>
       <caption>이미지주소변경</caption>
       <colgroup>
           <col class="grid_4">
           <col>
           <col class="grid_4">
           <col>
       </colgroup>
       <tbody>
       <tr>
           <th scope="row"><label for="previous_site">이전 사이트 주소<strong class="sound_only">필수</strong></label></th>
           <td>
               <?php echo help('이전 사이트의 이미지 주소를 정확하게 입력해주세요.') ?>
               <?php echo help('ex) http://test.co.kr') ?>
               <input type="text" name="previous_site" value="" id="previous_site" class="frm_input required" size="30" required>
           </td>
           <th scope="row"><label for="now_site">현재 사이트 주소<strong class="sound_only">필수</strong></label></th>
           <td>
               <?php echo help('수정불가.') ?>
               <input type="text" name="now_site" value="<?php echo G5_URL ?>" id="now_site" class="frm_input" size="30" readonly>
           </td>
       </tr>
       </tbody>
       </table>
   </div>
</section>
<?php echo $frm_submit; ?>

</form>

<script>
function fconfigform_submit(f)
{
   f.action = "./img_rename_update.php";
   return true;
}
</script>

<?php
include_once ('./admin.tail.php');
?>

//-----------------------------------------------

 

//-----------------------------------------------

<?php
$sub_menu = "600100";
include_once('./_common.php');

auth_check($auth[$sub_menu], 'r');

if ($is_admin != 'super')
   alert('최고관리자만 접근 가능합니다.');

$g5['title'] = '이미지 주소 변경';
include_once ('./admin.head.php');

// 구사이트도메인 http://www. 제외
$old = $_POST['previous_site'];

$old = trim($old); // 도메인주소 앞뒤 공백 제거
$old = rtrim($old, '/'); // 도메인주소 마지막에 / 문자 제거

// 새사이트도메인 http://www. 제외
$new= $_POST['now_site'];

$sql = sql_query("select * from {$g5['board_table']}");

while($data = sql_fetch_array($sql)){
//echo"$data[bo_table]<br>";
sql_query("update {$g5['write_prefix']}{$data[bo_table]} set wr_content=REPLACE(`wr_content`,'$old','$new')");
sql_query("update {$g5['board_table']} set bo_content_head=REPLACE(`bo_content_head`,'$old','$new')");
sql_query("update {$g5['board_table']} set bo_mobile_content_head=REPLACE(`bo_mobile_content_head`,'$old','$new')");
}

$sql = sql_query("select * from {$g5['content_table']}");
sql_query("update {$g5['content_table']} set co_content=REPLACE(`co_content`,'$old','$new')");
sql_query("update {$g5['content_table']} set co_mobile_content=REPLACE(`co_mobile_content`,'$old','$new')");

if($g5['g5_shop_item_table']){
$sql = sql_query("select * from {$g5['g5_shop_item_table']}");
sql_query("update {$g5['g5_shop_item_table']} set it_explan=REPLACE(`it_explan`,'$old','$new')");
sql_query("update {$g5['g5_shop_item_table']} set it_mobile_explan=REPLACE(`it_mobile_explan`,'$old','$new')");
}

alert('이미지 주소변경이 완료되었습니다.', './img_rename.php?'.$qstr);

?>

//-----------------------------------------------

 

추천0

댓글목록

등록된 댓글이 없습니다.

Total 825건 33 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
25 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 37154 0 07-22
24 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 37282 0 10-04
23 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 37291 0 11-29
22 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 38110 0 09-19
21 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 38543 0 07-13
20 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 38589 0 10-13
19 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 40863 0 08-06
18 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 41176 0 03-04
17 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 41545 0 08-06
16 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 42993 0 11-19
15 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 43933 0 11-07
14 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 46115 0 09-27
13 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 47061 0 09-23
12 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 47768 0 03-30
11 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 49841 0 04-09
10 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 50065 0 04-20
9 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 50146 0 05-12
8 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 51393 0 07-02
7 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 51473 0 07-28
6 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 51669 0 06-29
5 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 51698 0 04-07
4 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 52090 0 07-29
3 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 52293 0 07-10
2 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 53275 0 06-02
1 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 57148 0 06-29

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
3,689
어제
4,316
최대
7,259
전체
1,336,496
Copyright (c) 株式会社YHPLUS. All rights reserved.