⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bt_post.tpl

📁 免费版限制 只允许设置1个tracker地址 上传Torrent文件限制30KB 只允许设置一级分类(分类数量:限定为10个) 无公告和友情连接功能 无论坛注册接口设置 无联盟功能 无rss功能 无举
💻 TPL
字号:
{{include file="header.tpl"}}

{{include file="user/nav.tpl"}}

<div class="m_container">
<div class="m_inner">

{{include file="user/left.tpl"}}

<div class="table m_right">
<div class="nav_title text_bold">{{if $Action eq 'upload'}}上传新的种子文件{{else}}编辑种子文件信息{{/if}}</div>
<form name="form1"{{if $Action eq "edit"}}action="user.php?o=data&type={{$Type}}"{{/if}} method="post" enctype="multipart/form-data" onsubmit="return checkFormData();">
<input type="hidden" name="op" value="{{$Action}}" />
{{if $Action eq "edit"}}<input type="hidden" name="id" value="{{$BtData.bt_data_id}}" />{{/if}}
<table class="list_style" cellpadding="0" cellspacing="0" border="1" frame="void">
{{if $Action eq "upload" && $Config.local_tracker}}
  <tr class="alt1">
    <td class="text_right" width="15%" nowrap="nowrap">本站Tracker:</td>
    <td width="85%"><textarea class="formInput" cols="50" rows="3" readonly="readonly">{{foreach item=row from=$Config.local_tracker}}{{$row}}
{{/foreach}}</textarea></td>
  </tr>
{{/if}}
  <tr class="alt2">
    <td class="text_right" width="15%" nowrap="nowrap">所属分类:</td>
    <td width="85%"><select id="sort_id" name="sort_id" class="formInput"><option value="0">请选择</option>{{$SortOption}}</select></td>
  </tr>
{{if $Action eq "upload"}}
  <tr class="alt1">
    <td class="text_right" nowrap="nowrap">选择上传文件:</td>
    <td><input type="file" id="bt_file" name="bt_file" size="60" class="formInput" onkeydown="return false" oncontextmenu="return false" /><br /><span class="form_clue">选择一个本地电脑中的torrent文件,文件大小不能超过{{$Config.bt_file_size/1024}}Kb</span></td>
  </tr>
{{/if}}
  <tr class="alt2">
    <td class="text_right" nowrap="nowrap">资源名称:</td>
    <td><input type="text" id="title" name="title" size="60" maxlength="200" class="formInput" value="{{$BtData.bt_data_title}}" /><br /><span class="form_clue">标题长度请限制在{{$Config.bt_title_least|default:10}} - {{$Config.bt_title_max|default:100}}字符以内,建议格式:[日期][内容][文件类型][发布组织]</span></td>
  </tr>
  <tr class="alt1">
    <td class="text_right" valign="top" nowrap="nowrap">资源介绍:</td>
    <td><input type="hidden" id="intro" name="intro" value="{{$BtData.bt_data_intro|escape:'html'}}" /><input type="hidden" id="content___Config" value="AutoDetectLanguage=false&amp;DefaultLanguage=zh-cn" /><iframe id="content___Frame" src="htmleditor/editor/fckeditor.html?InstanceName=intro&amp;Toolbar=Basic" width="100%" height="360" frameborder="no" scrolling="no"></iframe><br /><span class="form_clue">介绍内容长度请限制在20 - {{$Config.bt_intro_maxlength}}个字符以内</span><br /><a href="javascript:void(0);" onclick="checkLength();return false;">[字数检查]</a></td>
  </tr>
{{if $Config.emule_allow}}
  <tr class="alt2">
    <td class="text_right" valign="top" nowrap="nowrap">ED2K地址:</td>
    <td><textarea id="emule_resource" name="emule_resource" class="formInput" cols="110" style="height:60px;word-break:break-all;" />{{$BtData.emule_resource|escape:'html'}}</textarea><input type="button" value="展开" onclick="largeArea('emule_resource', '300px', this)" /><br /><span class="form_clue">选填</span><a href="http://www.emule.org.cn/guide/publish" target="_blank">如何发布eMule资源?</a></td>
  </tr>
{{/if}}
  <tr class="alt2">
    <td class="text_right" nowrap="nowrap">讨论地址:</td>
    <td><input type="text" id="discuss_url" name="discuss_url" size="60" maxlength="250" class="formInput" value="{{$BtData.bt_data_discuss_url|urldecode}}" /><span class="form_clue">选填</span></td>
  </tr>
{{if ($UserInfo.team_id && $UserInfo.join_auditing) || $BtData.team_id}}
  <tr class="alt2">
    <td class="text_right" nowrap="nowrap">发布为联盟资源:</td>
    <td>
{{if $Action eq "edit" && $BtData.team_id && $UserInfo.team_id neq $BtData.team_id}}
<input type="radio" id="team_resource" name="team_resource" value="0" />不发布到联盟
{{if $UserInfo.team_id}}<input type="radio" id="team_resource" name="team_resource" value="1" />重新发布到当前加入的联盟{{/if}}
<input type="radio" id="team_resource" name="team_resource" value="-1"{{if $Action eq "upload" || $BtData.team_id}} checked="checked"{{/if}} />不改变发布联盟
{{else}}
<input type="checkbox" id="team_resource" name="team_resource" value="1"{{if $Action eq "upload" || $BtData.team_id}} checked="checked"{{/if}} /><span class="form_clue">如果勾选此项,发布的资源将添加到您所加入的联盟,联盟管理员将有权管理这个资源。</span>
{{/if}}
    </td>
  </tr>
{{/if}}
{{if $Action eq "upload" and !$Config.verify_code_close}}
  <tr class="alt1">
    <td class="text_right" nowrap="nowrap">验证码:</td>
    <td><input type="text" id="vcode" name="vcode" class="formInput" size="4" maxlength="4" /><img id="vimg" src="vimg.php?n=upload" align="absmiddle" alt="图片验证码" />(<a href="javascript:void(0);" onclick="imgRefresh('upload'); return false;">看不清,换一张</a>)</td>
  </tr>
{{/if}}
  <tr class="tfooter text_center">
    <td colspan="2">
	<input type="submit" id="submit" value="{{if $Action eq 'upload'}}开始上传{{else}}提交编辑{{/if}}" class="formButton" />
	<input type="button" value="预 览" class="formButton" onclick="executePreview();" />
	</td>
  </tr>
</table>
</form>
</div>

<form name="preview" action="user.php?o=upload" method="post" target="preview">
<input type="hidden" name="op" value="preview" />
<input type="hidden" name="preview_content" />
</form>

<script type="text/javascript">
var Action = '{{$Action}}';
var intro_max_length = {{$Config.bt_intro_maxlength}};
var emule_allow = {{if $Config.emule_allow}}true{{else}}false{{/if}};
function executePreview()
{
	var contents = getIntro();
	if ('' == contents)
	{
		alert('没有可预览内容!');
		return false;
	}

	document.preview.preview_content.value = contents;
	document.preview.submit();
}
function checkFormData()
{
	if (0 == $F('sort_id'))
	{
		alert('没有选择分类!');
		$('sort_id').focus();
		return false;
	}
	if ('upload' == Action)
	{
		var bt_file = $F('bt_file');
		if ('' == bt_file)
		{
			alert('请选择一个要上传的种子文件!');
			$('bt_file').focus();
			return false;
		}
		if (false == /\.torrent$/i.test(bt_file))
		{
			alert('您上传的不是一个.torrent文件!');
			$('bt_file').focus();
			return false;
		}
	}
	if ('' == $F('title'))
	{
		alert('请填写资源名称!');
		$('title').focus();
		return false;
	}
	var title_length = cnLength($F('title'));
	if ({{$Config.bt_title_max|default:100}} < title_length || title_length < {{$Config.bt_title_least|default:10}})
	{
		alert('资源名称长度请限制在 {{$Config.bt_title_least|default:10}} - {{$Config.bt_title_max|default:100}} 字符以内!');
		$('title').focus();
		return false;
	}
	var intro = getIntro();
	if ('' == intro)
	{
		alert('请填写资源介绍信息!');
		return false;
	}
	var intro_length = cnLength(intro);
	if (intro_max_length < intro_length || intro_length < 20)
	{
		alert('资源介绍长度请限制在 20 - '+ intro_max_length +' 字符以内!');
		return false;
	}
	if (true == emule_allow)
	{
		var eMule = "/ed2k://|S+?|S+?|S+?|S+?|//";
		var emule_resource = $('emule_resource').value;
		if ('' != emule_resource)
		{
			if (emule_resource.match(eMule)==null)
			{
				alert('不是一个有效的eMule资源格式,请检查后重新填写!');
				$('emule_resource').focus();
				return false;
			}
		}
	}
	if ('' != $F('discuss_url'))
	{
		if (200 < cnLength($F('discuss_url')))
		{
			alert('讨论地址长度不能超过200字符!');
			$('discuss_url').focus();
			return false;
		}
	}
	if ('upload' == Action && '' == $F('vcode'))
	{
		alert('请填写验证码!');
		$('vcode').focus();
		return false;
	}

	$('submit').value = Lang['submit'];
	$('submit').disabled = true;
	return true;
}
function getIntro()
{
	return FCKeditorAPI.GetInstance('intro').GetXHTML(true);
}
function checkLength()
{
	alert('当前长度:'+ cnLength(getIntro()) +',允许的长度:'+ intro_max_length);
}
function largeArea(id, h, o)
{
	if ($(id).style.height != h)
	{
		$(id).style.height = h;
		o.value = '还原';
	}
	else
	{
		$(id).style.height = '60px';
		o.value = '展开';
	}
}
</script>

<div class="clear"></div>
</div>{{*** manage inner ***}}
</div>{{*** manage container ***}}

{{include file="footer.tpl"}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -