You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

354 lines
11 KiB

3 years ago
<!-- $Id: comment_info.htm 16854 2009-12-07 06:20:09Z sxc_shop $ -->
{include file="pageheader.htm"}
{insert_scripts files="tinyeditor.js,../js/jquery-1.9.1.min.js"}
<!-- comment content list -->
<div class="main-div">
<table width="100%">
<tr>
<td>
{$lang.single_img}
</td>
</tr>
<tr>
<td><hr color="#dadada" size="1"></td>
</tr>
<tr>
<td>
{foreach from=$single_img item=img}
<img style="overflow:hidden; word-break:break-all;" src="{$img.thumb_url}" alt="" title=""/>
<div style="display:none; margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0;"><img src='{$img.img_url}' /></div>
{/foreach}
</td>
</tr>
</table>
</div>
{if $reply_info.content}
<!-- reply content list -->
<div class="main-div">
<table width="100%">
<tr>
<td>
{$lang.admin_user_name}&nbsp;<a href="mailto:{$msg.email}"><b>{$reply_info.user_name}</b></a>&nbsp;{$lang.from}
&nbsp;{$reply_info.add_time}&nbsp;{$lang.reply}
</td>
</tr>
<tr>
<td><hr color="#dadada" size="1"></td>
</tr>
<tr>
<td>
<div style="overflow:hidden; word-break:break-all;">{$reply_info.content}</div>
<div align="right"><b>{$lang.ip_address}</b>: {$reply_info.ip_address}</div>
</td>
</tr>
</table>
</div>
{/if}
{if $send_fail}
<ul style="padding:0; margin: 0; list-style-type:none; color: #CC0000;">
<li style="border: 1px solid #CC0000; background: #FFFFCC; padding: 10px; margin-bottom: 5px;" >{$lang.mail_send_fail}</li>
</ul>
{/if}
<div class="main-div">
<form method="post" action="discuss_circle.php" name="theForm" onsubmit="return validate_submit();" enctype="multipart/form-data">
<table border="0" width="100%">
<tr>
<td align="left">{$lang.discuss_circle_type}</td>
<td>
<input name="discuss_type" id="discuss_type" type="radio" {if $msg.dis_type eq 1}checked="checked"{/if} value="1" />{$lang.forum.1}
&nbsp;&nbsp;
<input name="discuss_type" id="discuss_type" type="radio" {if $msg.dis_type eq 2}checked="checked"{/if} value="2" />{$lang.forum.2}
&nbsp;&nbsp;
<input name="discuss_type" id="discuss_type" type="radio" {if $msg.dis_type eq 3}checked="checked"{/if} value="3" />{$lang.forum.3}
</td>
</tr>
{if $act neq 'update'}
<tr>
<td align="left">{$lang.search_goods}</td>
<td><input name="keyword" type="text" id="keyword">
<input name="search" type="button" id="search" value="{$lang.button_search}" class="button" onclick="searchGoods()" /></td>
</tr>
<tr>
<td>{$lang.goods_name}</td>
<td><select name="goods_id" id="goods_id">
<option value="{$tag.goods_id}" selected="selected">{$lang.search_goods}</option>
</select>
</td>
</tr>
<!-- ��Ա���� -->
<tr>
<td align="left">{$lang.discuss_user}</td>
<td>
<input name="user_name" type="text" id="user_name">
</td>
</tr>
{else}
<tr>
<td>{$lang.discuss_goods}:</td>
<td>
<img width="100" src="../{$msg.original_img}" /><a href="../goods.php?id={$msg.goods_id}" target="_blank">{$msg.goods_name}</a>
</td>
</tr>
{/if}
<tr>
<td>{$lang.discuss_title}:</td>
<td align="left" width="94%"><input id="dis_title" style="height:20px; border:2px solid gary;" type="text" name="dis_title" value="{$msg.dis_title}" size="60"></td>
</tr>
<tr>
<td>{$lang.discuss_text}:</td>
<td width="94%">
<input type="hidden" name="content" id="content" value="{$msg.dis_text}">
<iframe src="templates/editor/editor.html?id=content" frameborder="0" scrolling="no" width="693" height="320"></iframe>
</td>
</tr>
{if $act eq 'update'}
<tr>
<td class="r">{$lang.img_list}:</td>
<td>
{foreach from=$imgs item=imgs key=i}
<div id="gallery_{$imgs.img_id}" style="float:left; text-align:center; border: 1px solid #DADADA; margin: 4px; padding:2px;">
<a href="javascript:;" onclick="if (confirm('{$lang.drop_img_confirm}')) dropImg('{$imgs.img_id}')">[-]&nbsp;{$lang.drop_img}</a>
<!-- <input style="margin-left:160px;" value="{$imgs.img_id}" type="radio" {if $imgs.front_cover eq 1}checked{/if} name="front_cover" />{$lang.front_cover}<br /> -->
<br />
<a href="goods.php?act=show_image&img_url={$imgs.img_url}" target="_blank">
<img src="../{$imgs.thumb_url}" width="300" border="0" />
</a>
<!-- <textarea cols="35" style="border:1px solid green;" name="old_img_desc[{$imgs.img_id}]" />{$imgs.img_desc|escape}</textarea> -->
</div>
{/foreach}
</td>
</tr>
{/if}
{if $act eq 'insert'}
<tr>
<td class="r">{$lang.add_img}:</td>
<td><table id="gallery-table" style="display:block; width:250px" align="left">
<!-- �ϴ�ͼƬ -->
<tr>
<td>
<a href="javascript:;" onclick="addImg(this)">[+]</a>
<input type="hidden" name="img_desc[]" size="20" />
<input type="file" name="img_url[]" id="img_url_id" />
<input type="hidden" size="40" value="http://" style="color:#aaa;" name="img_file[]"/>
</td>
</tr>
</table></td>
</tr>
{/if}
<!-- ͼƬ��ʾ�б� -->
<tr>
<td>
<div id="img_list">
</div>
</td>
</tr>
<!-- <tr>
<td>{$lang.add_integration}:</td>
<td></td>
</tr> -->
<tr>
<td></td>
<!-- <td><input name="send_email_notice" type="checkbox" value='1'/>{$lang.send_email_notice}</td> -->
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input name="submit" type="submit" value="{$lang.button_submit}" class="button">
<input type="reset" value="{$lang.button_reset}" class="button">
{if $reply_info.content}<input type="submit" name="remail" value="{$lang.remail}" class="button">{/if}
<input type="hidden" name="dis_id" value="{$msg.dis_id}">
<input type="hidden" name="dis_type" value="{$msg.dis_type}">
<input type="hidden" name="act" value="{$act}">
</td>
</tr>
</table>
<div style="margin-left:136px;">
<!-- <input {if $msg.is_audit eq 1}disabled{/if} type="button" onclick="add_integ(this, 'allow', {$msg.order_id}, {$msg.goods_id}, {$msg.user_id});" value="{$lang.allow}" class="button" />
<input {if $msg.is_audit eq 0}disabled{/if} type="button" onclick="add_integ(this, 'forbid', {$msg.order_id}, {$msg.goods_id}, {$msg.user_id});" value="{$lang.forbid}" class="button" />
-->
</div>
</form>
<form method="post" action="discuss_circle.php" name="theForm" onsubmit="return validate_submit();" enctype="multipart/form-data">
</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="JavaScript">
/**
function upImgChange(obj)
{
alert(getFullPath(obj));
$('#img_list').html("<img width=300 src=" + getFullPath(obj) + " />");
}
function getFullPath(obj){
if(obj){
//ie
if (window.navigator.userAgent.indexOf("MSIE")>=1) {
obj.select();
alert(document.selection.createRange().text);
return document.selection.createRange().text;
}
//firefox
else if(window.navigator.userAgent.indexOf("Firefox")>=1){
if(obj.files){
return window.URL.createObjectURL(obj.files.item(0));
}
return obj.value;
}
return obj.value;
}
}
onchange="upImgChange(this);"
*/
/**
*
*/
function validate_submit()
{
if(document.getElementById("discuss_type").value == "") {
alert("{$lang.please_discuss_type}");
document.getElementById("discuss_type").focus();
return false;
}
if(document.getElementById("goods_id").value == "" || document.getElementById("goods_id").value == "0") {
alert("{$lang.please_select_goods}");
document.getElementById("goods_id").focus();
return false;
}
if(document.getElementById("user_name").value == "") {
alert("{$lang.please_user_name}");
document.getElementById("user_name").focus();
return false;
}
if(document.getElementById("dis_title").value == "") {
alert("{$lang.please_dis_title}");
document.getElementById("dis_title").focus();
return false;
}
if(document.getElementById("content").value == "") {
alert("{$lang.please_dis_text}");
document.getElementById("content").focus();
return false;
}
}
onload = function() {
//
startCheckOrder();
}
//-->
function add_integ(obj, act, id, goods_id, user_id)
{
var integ = document.getElementById('add_integration').value;
location.href='comment_manage.php?act=single_check&check=' + act + '&id=' + id + '&integ=' + integ + '&goods_id=' + goods_id + '&user_id=' + user_id;
}
function searchGoods()
{
var filter = new Object;
filter.keyword = document.forms['theForm'].elements['keyword'].value;
Ajax.call('tag_manage.php?is_ajax=1&act=search_goods', filter, searchGoodsResponse, 'GET', 'JSON');
}
function searchGoodsResponse(result)
{
if (result.error == '1' && result.message != '')
{
alert(result.message);
return;
}
var sel = document.forms['theForm'].elements['goods_id'];
sel.length = 0;
/* 创建 options */
var goods = result.content;
if (goods)
{
for (i = 0; i < goods.length; i++)
{
var opt = document.createElement("OPTION");
opt.value = goods[i].goods_id;
opt.text = goods[i].goods_name;
sel.options.add(opt);
}
}
return;
}
/**
* ����һ��ͼƬ
*/
function addImg(obj)
{
var src = obj.parentNode.parentNode;
var idx = rowindex(src);
var tbl = document.getElementById('gallery-table');
var tr = tbl.getElementsByTagName('tr');
if(tr.length == 10)
{
alert("{$lang.max_ten_img}");
return false;
}
var row = tbl.insertRow(idx + 1);
var cell = row.insertCell(-1);
cell.innerHTML = src.cells[0].innerHTML.replace(/(.*)(addImg)(.*)(\[)(\+)/i, "$1removeImg$3$4-");
}
/**
* ɾ��ͼƬ�ϴ�
*/
function removeImg(obj)
{
var row = rowindex(obj.parentNode.parentNode);
var tbl = document.getElementById('gallery-table');
tbl.deleteRow(row);
}
/**
* ɾ��ͼƬ
*/
function dropImg(imgId)
{
Ajax.call('goods.php?is_ajax=1&act=drop_image', "img_id="+imgId, dropImgResponse, "GET", "JSON");
}
function dropImgResponse(result)
{
if (result.error == 0)
{
document.getElementById('gallery_' + result.content).style.display = 'none';
}
}
</script>
{/literal}
3 years ago
{include file="pagefooter.htm"}