Merge branch 'master' of github.com:gnuboard/yc4s

This commit is contained in:
rollydream
2013-03-22 17:07:11 +09:00
30 changed files with 70 additions and 3477 deletions

View File

@ -50,10 +50,10 @@ function imageview(id, w, h)
submenu.left = tempX - ( w + 11 );
submenu.top = tempY - ( h / 2 );
selectBoxVisible();
//selectBoxVisible();
if (el_id.style.display != 'none')
selectBoxHidden(id);
//if (el_id.style.display != 'none')
// selectBoxHidden(id);
}
</script>

View File

@ -1,11 +1,11 @@
<?
$sub_menu = "400300";
include_once("./_common.php");
$sub_menu = '400300';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g4[title] = "상품 복사";
include_once("$g4[path]/head.sub.php");
$g4['title'] = '상품 복사';
include_once(G4_PATH.'/head.sub.php');
?>
<link rel='stylesheet' href='./admin.style.css' type='text/css'>

View File

@ -20,7 +20,7 @@ $cp = sql_fetch($sql);
// 상품테이블의 필드가 추가되어도 수정하지 않도록 필드명을 추출하여 insert 퀴리를 생성한다. (상품코드만 새로운것으로 대체)
$sql_common = "";
$fields = mysql_list_fields($mysql_db, $g4['yc4_item_table']);
$fields = mysql_list_fields(G4_MYSQL_DB, $g4['yc4_item_table']);
$columns = mysql_num_fields($fields);
for ($i = 0; $i < $columns; $i++) {
$fld = mysql_field_name($fields, $i);

View File

@ -747,10 +747,10 @@ if ($ii) {
<input type=file class=ed name=it_timg size=40>
<?
$timg_str = "";
$timg = G4_DATA_PATH."/item/{$it[it_id]}_t";
$timg = G4_DATA_PATH."/item/{$it['it_id']}_t";
if (file_exists($timg)) {
echo "<input type=checkbox name=it_timg_del value='1'>삭제";
$timg_str = "<img src='".G4_DATA_URL."/item/{$it[it_id]}_t' border=0>";
$timg_str = "<img src='".G4_DATA_URL."/item/{$it['it_id']}_t' border=0>";
}
?>
<?=help("상품상세설명 페이지 하단에 출력하는 이미지입니다.");?>
@ -771,7 +771,7 @@ if ($ii) {
<tr class=ht>
<td>입력일시</td>
<td colspan=3>
<?=$it[it_time]?>
<?=$it['it_time']?>
<?=help("상품을 처음 입력(등록)한 시간입니다.");?>
</td>
</tr>

View File

@ -2,9 +2,6 @@
$sub_menu = '400300';
include_once('./_common.php');
$g4['title'] = '관련 상품';
include_once (G4_PATH.'/head.sub.php');
$sql = " select ca_id, it_id, it_name, it_amount
from {$g4['yc4_item_table']}
where ca_id like '$ca_id%'

View File

@ -82,29 +82,22 @@ function itemdelete($it_id)
//------------------------------------------------------------------------
// HTML 내용에서 에디터에 올라간 이미지의 경로를 얻어 삭제함
//------------------------------------------------------------------------
$sql = " select * from {$g4['yc4_item_table']} where it_id = '$it_id' ";
$sql = " select it_explan from {$g4['yc4_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
$s = $it['it_explan'];
$img_file = Array();
while($s) {
$pos = strpos($s, "/data/cheditor");
$s = substr($s, $pos, strlen($s));
$pos = strpos($s, '"');
$imgs = get_editor_image($it['it_explan']);
// 결과값
$file_path = substr($s, 0, $pos);
if (!$file_path) break;
for($i=0;$i<count($imgs[1]);$i++) {
$p = parse_url($imgs[1][$i]);
if(strpos($p['path'], "/data/") != 0)
$data_path = preg_replace("/^\/.*\/data/", "/data", $p['path']);
else
$data_path = $p['path'];
$img_file[] = $file_path;
$destfile = G4_PATH.$data_path;
$s = substr($s, $pos, strlen($s));
}
for($i=0;$i<count($img_file);$i++) {
$f = $g4[path].$img_file[$i];
if (file_exists($f))
@unlink($f);
if(is_file($destfile))
@unlink($destfile);
}
//------------------------------------------------------------------------
@ -180,10 +173,10 @@ if ($it_limg5_del) @unlink(G4_DATA_PATH."/item/{$it_id}_l5");
// 이미지(대)만 업로드하고 자동생성 체크일 경우 이미지(중,소) 자동생성
if ($createimage && $_FILES['it_limg1']['name'])
{
upload_file($_FILES['it_limg1']['tmp_name'], $it_id."_l1", "$g4[path]/data/item");
upload_file($_FILES['it_limg1']['tmp_name'], $it_id."_l1", G4_DATA_PATH."/item");
$image = G4_DATA_PATH."/item/$it_id"."_l1";
$size = getimagesize($image);
$size = @getimagesize($image);
$src = @imagecreatefromjpeg($image);
if (!$src)

View File

@ -54,8 +54,6 @@ $qstr = "page=$page&sort1=$sort1&sort2=$sort2";
<tr>
<td>&nbsp;내 용</td>
<td>
<!-- <?=textarea_size("is_content")?>
<textarea id='is_content' name="is_content" rows="10" style='width:99%;' class=ed required itemname='내용'><? echo get_text($is[is_content]) ?></textarea> -->
<?=editor_html('is_content', $is['is_content']);?>
</td>
</tr>

View File

@ -42,14 +42,12 @@ $qstr = "page=$page&sort1=$sort1&sort2=$sort2";
<tr>
<td>&nbsp;질 문</td>
<td style='padding-top:5px; padding-bottom:5px;'>
<?=textarea_size('iq_question')?>
<textarea id='iq_question' name='iq_question' rows="7" style='width:99%;' class=ed required itemname='질문'><? echo get_text($iq['iq_question']) ?></textarea>
</td>
</tr>
<tr>
<td>&nbsp;답 변</td>
<td style='padding-top:5px; padding-bottom:5px;'>
<?=textarea_size('iq_answer')?>
<textarea id='iq_answer' name='iq_answer' rows="7" style='width:99%;' class=ed itemname='답변'><? echo get_text($iq['iq_answer']) ?></textarea>
</td>
</tr>