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

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

팁앤테크

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

페이지 정보

본문

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
















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

<?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 770건 1 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
770 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12745 2 03-06
769 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13205 2 03-06
768 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11991 2 12-07
767 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12292 2 04-23
766 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 15070 1 04-01
765 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13201 1 11-14
764 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12139 1 04-18
763 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12061 1 05-21
762 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12395 1 02-27
761 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12441 1 05-06
760 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11941 1 10-22
759 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13901 1 05-10
758 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 20972 1 05-11
757 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12610 1 01-27
756 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 30900 1 05-30
755 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 26295 1 06-10
754 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16413 0 05-21
753 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 20815 0 01-23
752 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 15270 0 10-08
751 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13217 0 10-17
750 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 23584 0 02-19
749 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 14130 0 11-13
748 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 14433 0 09-19
747 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17550 0 10-06
746 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16291 0 01-08

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
3,093
어제
4,604
최대
7,259
전체
1,272,518
Copyright (c) 株式会社YHPLUS. All rights reserved.