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

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

팁앤테크

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

페이지 정보

본문

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
















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

<?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건 1 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
825 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 713 0 11-02
824 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 950 0 07-10
823 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1939 0 04-06
822 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1796 0 02-21
821 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1686 0 12-31
820 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1749 0 12-24
819 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1771 0 12-04
818 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1818 0 10-17
817 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1780 0 10-02
816 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1732 0 08-04
815 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1498 0 08-04
열람중 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1829 0 08-03
813 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2135 0 07-08
812 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2050 0 07-08
811 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3130 0 07-06
810 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1720 0 06-09
809 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2135 0 06-03
808 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1949 0 04-16
807 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2221 0 03-29
806 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2148 0 03-26

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
4,244
어제
4,345
최대
6,509
전체
1,064,339
Copyright (c) 株式会社YHPLUS. All rights reserved.