read-1.php
if ($readdata['high']) {
$_G['TEMP']['READADMINLINK'] .= '<a class="pk-kxpc-text hover " href="javascript:" onclick="pkalert("确认取消该文章的精华?","提示","window.open(\'index.php?c=admincmd&table=read&field=high&value=0&id=' . $readdata['id'] . '&chkcsrfval=' . $_G['CHKCSRFVAL'] . '\',\'pk-di\');pkalert(\'取消成功\')")"title="取消精华">取消精华</a> ';
} else {
$_G['TEMP']['READADMINLINK'] .= '<a class="pk-kxpc-text hover " href="javascript:" onclick="pkalert("确认设置该文章精华?","提示","window.open(\'index.php?c=admincmd&table=read&field=high&value=1&id=' . $readdata['id'] . '&chkcsrfval=' . $_G['CHKCSRFVAL'] . '\',\'pk-di\');pkalert(\'设置成功\')")"title="设为精华">设为精华</a> ';
$_G['TEMP']['READADMINLINK'] .= '<a class="pk-kxpc-text hover admin-a-move" href="javascript:" data-id="' . $readdata['id'] . '" data-sortid="' . $readdata['sortid'] . '"title="移动到某版块">移动</a> ';//admin-a-move移动功能
} js 代码 :我放到手机模版 read-1.hst
<script type="text/javascript">
$(function() {
$('#read-list .read-list .dingspan').click(function() {
var This = $(this);
$.getJSON('index.php?c=ding&type=read&json=yes&id=' + $(this).data('id'), function(data) {
if(data['state'] == 'ok') {
This.find('span:eq(1)').html(parseInt(This.find('span:eq(1)').html()) + 1);
} else {
pktip('您已经赞过了~', 'info');
}
});
});
$('#read-list .read-list .admin-a').click(function() {
var This = $(this);
pkalert('确认' + This.html() + '吗?', '提示', function() {
$.getJSON('index.php?c=admincmd&table=read&field=' + This.data('field') + '&value=' + This.data('value') + '&id=' + This.data('id') + '&json=yes&chkcsrfval=' + $_USER['CHKCSRFVAL'], function(data) {
if(data['state'] == 'ok') {
pktip('操作成功', 'success');
location.reload(true);
} else {
pktip(data['datas']['msg'], 'warning');
}
});
});
});
$('#read-list .read-list .admin-a-move').click(function() {
var This = $(this);
var _rnd = randomString(32);
var _html = '<select id="hs-' + _rnd + '" class="pk-textbox">{$_G["TEMP"]["FORUMLISTOPTION"]}</select>';
var _pid = pkalert(_html, '移动文章至', function() {
$.getJSON('index.php?c=admincmd&table=read&field=sortid&id=' + This.data('id') + '&value=' + $('#hs-' + _rnd).val() + '&json=yes&chkcsrfval=' + $_USER['CHKCSRFVAL'], function(data) {
if(data['state'] == 'ok') {
pktip('操作成功', 'success');
} else {
pktip(data['datas']['msg'], 'warning');
}
});
pkalert(false, _pid);
}, true);
$('#hs-' + _rnd).val(This.data('sortid'));
});
});
</script>上海,上海