<!--<?php
print <<<EOT
-->
<!--
EOT;
if (empty($step)) {print <<<EOT
-->
	<table width="100%" cellspacing="0" cellpadding="5">
		<tr><th class="h" colspan="2" style="cursor:move" onmousedown="read.move(event);"><span class="fr" style="margin-top:2px;cursor:pointer" onclick="closep();"><img src="$imgpath/close.gif" /></span>推送位置选择</th></tr>
<!--
EOT;
$i=0;
foreach ($areaPage as $key=>$value){
if($i == '0'){print<<<EOT
-->
<tr>
<!--
EOT;
}$i++;print<<<EOT
-->
		<td><a onclick="sendmsg('{$thisBaseName}&action=pushto&fid=$fid&selid=$selid&step=1&index={$key}','','')" style="cursor:pointer" >{$value}</a></td>
<!--
EOT;
if($i == 2){$i=0;print<<<EOT
-->
</tr>
<!--
EOT;
}}print<<<EOT
-->
	</table>
<!--
EOT;
}elseif($step == 1) {
$back = $back ? '' : '';
print<<<EOT
-->
	<table width="100%" cellspacing="0" cellpadding="5">
		<tr><th class="h" colspan="2" style="cursor:move" onmousedown="read.move(event);"><span class="fr" style="margin-top:2px;cursor:pointer" onclick="closep();"><img src="$imgpath/close.gif" /></span>推送位置选择</th></tr>
		<tr class="tr2 trbor"><td class="b">$selTitle</td><td class="tar gray"><a style="cursor:pointer" onclick="sendmsg('{$thisBaseName}&action=pushto&back=1&fid=$fid&selid=$selid','','')">返 回</a></td></tr>
<!--
EOT;
$i=0;
foreach ($areaPage as $key=>$value){
if($i == '0'){print<<<EOT
-->
<tr>
<!--
EOT;
}$i++;
$tmpName = !is_numeric($key) ? urlencode($key) : urlencode($value);print<<<EOT
-->
		<td><a href="{$thisBaseName}&action=pushto&fid=$fid&selid=$selid&step=2&index=$index&name={$tmpName}" $back >{$value}</a></td>
<!--
EOT;
if($i == 2){$i=0;print<<<EOT
-->
</tr>
<!--
EOT;
}}print<<<EOT
-->
	</table>
<!--
EOT;
}elseif($step == 2) {print<<<EOT
-->
<style type="text/css">
.pwnew span{float:left;margin-left:5px;}
.pwnew a{padding:0;margin:0;display:block;height:16px;float:left;line-height:16px;border:1px solid #dbe4e9;color:#333333;cursor:pointer;}
.pwnew a:hover{border:1px solid #b0c8e0;background:#f9f9f9;color:#333333;}
.pwnew .one,.pwnew .one:hover{border: 1px solid #333333;background:#cde2f6;color:#333333;}
.pwnew b:hover,.pwnew i:hover{text-decoration:none;}
.pwnew .two{background:url($imgpath/menu-down.gif) right center no-repeat;width:30px;cursor:pointer;}
.pwnew .two:hover{background:$forumcolortwo url($imgpath/menu-down.gif) right center no-repeat;text-decoration:none;}
</style>
<div id="breadCrumb">
	<img src="$imgpath/$stylepath/thread/home-old.gif" align="absmiddle" />&nbsp;<a href="$db_bfn" title="$db_bbsname">$db_bbsname</a> &raquo; 模块内容推送
</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="display:none">
	<tbody id="clonetr">
		<tr>
			<td>
<select name="cids[]">$creditselect</select>
<input class="input" type="text" name="addpoints[]" size="5" /> 点
<span style="margin-left: 80px;">
	<a onclick="delThisTr(this);return false;" style="cursor: pointer;">删除</a>
</span>
			</td>
		</tr>
	</tbody>
</table>
<div class="t f_one">
<form action="{$thisBaseName}&action=$action" name="form1" method="post" enctype="multipart/form-data" >
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="fid" value="$fid" />
<input type="hidden" name="selid" value="$selid" />
<input type="hidden" name="step" value="3" />
<input type="hidden" name="index" value="$index" />
<input type="hidden" name="invokename" value="$name" />
<table width="100%" cellspacing="0" cellpadding="0" align="center">
<tr><td colspan="2" class="h"><span class="fr gray"><a style="cursor:pointer" onclick="sendmsg('{$thisBaseName}&action=pushto&back=1&step=1&fid=$fid&selid=$selid&index=$index','','')">选择模块</a></span><b>$selTitle</b></td></tr>
<!--
EOT;
if ($subtitle) {print<<<EOT
-->
<tr class="tr3">
	<td class="tar">推送到子模块</td>
	<td><select name="titleid" onchange="optionAdd(this.value);">
<!--
EOT;
foreach ($subtitle as $key=>$value) {print<<<EOT
-->
		<option value="$key">$value</option>
<!--
EOT;
}print<<<EOT
-->
	</select></td>
</tr>
<!--
EOT;
}else{print<<<EOT
-->
<input type="hidden" name="titleid" value="{$mInvok['id']}" />
<!--
EOT;
}print<<<EOT
-->
<tr class="tr3">
	<td class="tar">标题</td>
	<td>
		<div class="mb10"><input type="text" name="subject" value="{$read['subject']}" size="50" class="input" /></div>
		<div class="pwnew fl">
			<span title="粗体字"><a onclick="styleOnclick(this,'title2')" class="$stylename[1]">加粗</a></span>
			<span title="斜体字"><a onclick="styleOnclick(this,'title3')" class="$stylename[2]">斜体</a></span>
			<span title="下划线"><a onclick="styleOnclick(this,'title4')" class="$stylename[3]">下划线</a></span>
			<span id="color_show" title="点击取消颜色" onclick="colorCancel()"></span>
			<span title="颜色选择"><a class="two tal" onclick="showColorPicker(this,document.form1.title1,function(){pickReback(color_picker)})"><img src="$imgpath/pickcolor.gif" /></a></span>
			<span>失效时间:&nbsp;<input name="titletime" id="titletime" size="15" class="input" type="input" value="$titletime" onclick="ShowCalendar(this.id,1);" /></span>
			<input id="title1" name="title1" type="hidden" value="$titlecolor" />
			<input id="title2" name="title2" type="hidden" value="{$titledetail[1]}" />
			<input id="title3" name="title3" type="hidden" value="{$titledetail[2]}" />
			<input id="title4" name="title4" type="hidden" value="{$titledetail[3]}" />
		</div>
	</td>
</tr>
<tr class="tr3">
	<td class="tar">链接</td>
	<td><input type="text" name="url" value="{$read['url']}" size="50" class="input" /></td>
</tr>
<tr class="tr3">
	<td class="tar">图片选择</td>
	<td>
<!--
EOT;
if($attimages){
$i = 0;
foreach($attimages as $k => $v){
if ($i == 0){
$checked = 'checked';
$cimgurl = $v;
$i++;
}else{
$checked = '';
}
print<<<EOT
-->
	<span class="fl" style="white-space:nowrap;margin-right:5px;"><img src="$v" style="width:60px;height:60px;margin-bottom:3px;" align="absmiddle">
	<center><input type="radio" name="attachurl" value="$v" onclick="push_image(this)" $checked></center></span>
<!--
EOT;
}print<<<EOT
-->
	<div class="c"></div>
<!--
EOT;
}print<<<EOT
-->
	<input type="text" name="cimgurl" id="cimgurl" value="$cimgurl" size="50" class="input" />
	</td>
</tr>
<tr class="tr3">
	<td class="tar">上传图片</td>
	<td>
		<input id="uploadpic" type="file" name="uploadpic" onchange="checkFileType()">（允许类型：jpg，jpeg，gif，png）
		<span id="fileTypeError" style="display:none;"><font color="red">请选择正确的文件类型</font></span>
	</td>
</tr>
<tr class="tr3">
	<td class="tar">摘要</td>
	<td><textarea name="content" style="width:273px;height:100px" />$content</textarea></td>
</tr>
<!--
EOT;
if (!empty($subtitle) || $mInvok['num']>1) {print<<<EOT
-->
<tr class="tr3">
	<td class="tar">列表位置</td>
	<td><select id="pushoffset" name="offset">
<!--
EOT;
for ($i=0;$i<$mInvok['num'];$i++) {
$tmpsel = $i == 0 ? 'selected' : '';
$value = $i+1;
print<<<EOT
-->
				<option value="$i" $tmpsel>$value</option>
<!--
EOT;
}print<<<EOT
-->
			</select>
			<input type="radio" name="addtype" value="1" checked />在之前插入
			<input type="radio" name="addtype" value="0" />替换
			</div>
			</td>
		</tr>
<!--
EOT;
}else{print<<<EOT
-->
<input type="hidden" name="offset" value="0" />
<!--
EOT;
}print<<<EOT
-->
<tr class="tr3">
	<td class="tar">开始日期</td>
	<td><input type="text" size="15" class="input" name="starttime" id="starttime" onclick="ShowCalendar(this.id,1);"> (留空则立即显示)</td>
</tr>
<tr class="tr3">
	<td class="tar">失效日期</td>
	<td><input type="text" size="15" class="input" name="endtime" id="endtime" onclick="ShowCalendar(this.id,1);"> (留空则为长期显示)</td>
</tr>
<tr class="tr3">
	<td class="tar">积分奖励:</td>
	<th>
		<table border="0" cellpadding="0" cellspacing="0">
			<tbody id="pingfen">
				<tr>
					<td>
		<select name="cids[]">$creditselect</select>
		<input class="input" type="text" name="addpoints[]" size="5" /> 点<span style="margin-left:80px"><a style="cursor:pointer" onclick="addPingFen();return false;">添加其他积分</a></span>
					</td>
				</tr>
			</tbody>
		</table>
	</th>

</tr>
<tr class="tr3"><td class="tar">短消息通知:</td>
<th>
<input type="radio" name="ifmsg" value="1" checked />是
<input type="radio" name="ifmsg" value="0" />否</th></tr>
<tr class="tr3"><td class="tar">评分理由:</td>
<th style="vertical-align:top"><textarea name="atc_content" id="atc_content" rows="8" style="width:300px;"></textarea>
<select name="" size="8" multiple onchange="this.form.atc_content.value=this.value">
	<option value="">自定义</option>
	<option value="">-------</option>
	$reason_sel
</select>
<div id="atc_content_warn" class="gray">限100字节</div>
</th></tr>
</table>
<script language="JavaScript" src="js/date.js"></script>
<script language="JavaScript" src="js/desktop/Compatibility.js"></script>
<!--<script src="js/date.js" language="JavaScript"></script>
-->
<div style="text-align:center;padding:4px 0;">
<!--
EOT;
if($db_enterreason){print <<<EOT
-->
<input type="button" class="btn" name="ajaxsubmit" onclick="if(this.form.atc_content.value){this.form.submit();}else{alert('请输入操作理由！')}" value="提 交" />
<!--
EOT;
}else{print <<<EOT
-->
<input type="submit" class="btn" value="提 交" />  <a class="btn3" type="button" onclick="javascript:history.go(-1)" />返 回</a>
<!--
EOT;
}print <<<EOT
-->
</div>
</form>
<script type="text/javascript">
function addPingFen() {
	if (getObj('pingfen').getElementsByTagName('tr').length>4) {
		alert('评分类型超过操过');
		return false;
	}
	var nodes = getObj('clonetr').getElementsByTagName('tr');
	clonenode	= nodes[0].cloneNode(true);
	getObj('pingfen').appendChild(clonenode);
}
function push_image(o){
	getObj('cimgurl').value = o.value;
}
<!--
EOT;
if ($subtitle || intval($invokepiece[0]['num'])>1) {print<<<EOT
-->
function optionAdd(k) {
	var invokeparam = $invokeparam;
	var obj = getObj('pushoffset');
	obj.options.length = 0;
	for (var i=1;i<=invokeparam[k];i++) {
		obj.options[i-1] = new Option(i,i-1);
	}
}
optionAdd($firstKey);
<!--
EOT;
}print <<<EOT
-->
</script>
<script type="text/javascript" language="JavaScript" src="js/color_picker.js"></script>
<script type="text/javascript">
function pickReback(color){
	getObj('color_show').style.backgroundColor = color;
}
function styleOnclick(e,obj){
	var objclass = e.className;
	var temp = objclass.split(' ');
	var newclass = '';
	for (var n=0; n<temp.length; n++){
		if (temp[n]=='one') {
			continue;
		}
		newclass += ' ' + temp[n];
	}
	if (objclass.match(/one/)) {
		e.className = newclass;
		getObj(obj).value = '';
	} else {
		e.className = newclass + ' one';
		getObj(obj).value = 1;
	}
}
function colorCancel(){
	getObj('color_show').style.backgroundColor='#FFFFFF';
	getObj('title1').value='';
}

function delThisTr(id) {
	var temp = objCheck(id);
	while (temp) {
		if (temp.tagName=='tr' || temp.tagName=='TR') {
			delElement(temp);
			return true;
		}
		temp = temp.parentNode;
	}
}
</script>
</div>
<!--
EOT;
}?>-->
