|
|
@@ -65,12 +65,12 @@ |
|
|
|
<td>{dede:field.id/}</td> |
|
|
|
<td><a href="<?php echo $cfg_phpurl;?>/tags.php?/<?php echo $fields['id'];?>" target="_blank">{dede:sfield.tag/}</a></td> |
|
|
|
<td> |
|
|
|
<input type="text" name="" class="admin-input-sm"> |
|
|
|
<button type="button" class="btn btn-success btn-sm" onclick="SelectImage('form1.bigpic');">选择</button> |
|
|
|
<input value="<?php echo $fields['litpic'];?>" type="text" name="litpic{dede:field.id/}" id="litpic{dede:field.id/}" class="admin-input-sm"> |
|
|
|
<button type="button" class="btn btn-success btn-sm" onclick="SelectImage('form3.litpic{dede:field.id/}');">选择</button> |
|
|
|
</td> |
|
|
|
<td><input type="text" value="" id="" class="admin-input-sm"></td> |
|
|
|
<td><input type="text" value="" id="" class="admin-input-sm"></td> |
|
|
|
<td><textarea name="" id="" class="admin-textarea-sm"></textarea></td> |
|
|
|
<td><input type="text" value="<?php echo $fields['title'];?>" name="title<?php echo $fields['id'];?>" id="title<?php echo $fields['id'];?>" class="admin-input-sm"></td> |
|
|
|
<td><input type="text" value="<?php echo $fields['keywords'];?>" name="keywords<?php echo $fields['id'];?>" id="keywords<?php echo $fields['id'];?>" class="admin-input-sm"></td> |
|
|
|
<td><textarea name="description<?php echo $fields['id'];?>" id="description<?php echo $fields['id'];?>" class="admin-textarea-sm"><?php echo $fields['description'];?></textarea></td> |
|
|
|
|
|
|
|
<td><input type="text" value="<?php echo $fields['count'];?>" id="count<?php echo $fields['id'];?>" class="admin-input-xs"></td> |
|
|
|
<td><?php echo $fields['total'];?></td> |
|
|
@@ -112,54 +112,29 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
function UpdateOne(tid) { |
|
|
|
location = "tags_main.php?action=update&count=" + document.getElementById('count' + tid).value + "&tid=" + tid; |
|
|
|
} |
|
|
|
function DeleteOne(tid) { |
|
|
|
location = "tags_main.php?action=delete&ids=" + tid; |
|
|
|
} |
|
|
|
function UpdateKwDes(tid, tag) { |
|
|
|
$.get("tags_main.php?action=get_one&tid=" + tid, function(data) { |
|
|
|
let rs = JSON.parse(data); |
|
|
|
let title = rs.title ? rs.title : ""; |
|
|
|
let keywords = rs.keywords ? rs.keywords : ""; |
|
|
|
let description = rs.description ? rs.description : ""; |
|
|
|
ShowMsg(`<div class="form-group row"> |
|
|
|
<label for="iptTitle" class="col-sm-3 col-form-label">标签</label> |
|
|
|
<div class="col-sm-9"><input type="text" name="title" class="form-control" disabled value="${tag}"></div> |
|
|
|
</div> |
|
|
|
<div class="form-group row"> |
|
|
|
<label for="iptKw" class="col-sm-3 col-form-label">SEO标题</label> |
|
|
|
<div class="col-sm-9"><input type="text" name="title" id="iptTitle" class="form-control" value="${title}"></div> |
|
|
|
</div> |
|
|
|
<div class="form-group row"> |
|
|
|
<label for="iptKw" class="col-sm-3 col-form-label">关键词</label> |
|
|
|
<div class="col-sm-9"><input type="text" name="kw" id="iptKw" class="form-control" value="${keywords}"></div> |
|
|
|
</div> |
|
|
|
<div class="form-group row"> |
|
|
|
<label for="iptDes" class="col-sm-3 col-form-label">描述</label> |
|
|
|
<div class="col-sm-9"><textarea name="des" id="iptDes" class="form-control">${description}</textarea></div> |
|
|
|
</div>`, { |
|
|
|
footer: `<button type="button" class="btn btn-success btn-sm" onclick="UpdateKwDesDo(${tid}, '~modalID~')">保存</button>`, |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
function UpdateKwDesDo(tid, mdlID) { |
|
|
|
let title = $("#iptTitle").val(); |
|
|
|
let kw = $("#iptKw").val(); |
|
|
|
let des = $("#iptDes").val(); |
|
|
|
$.post("tags_main.php?action=set_one", { |
|
|
|
tid: tid, |
|
|
|
let count = document.getElementById('count' + tid).value; |
|
|
|
let litpic = document.getElementById('litpic' + tid).value; |
|
|
|
let title = document.getElementById('title' + tid).value; |
|
|
|
let keywords = document.getElementById('keywords' + tid).value; |
|
|
|
let description = document.getElementById('description' + tid).value; |
|
|
|
$.post("tags_main.php?action=update", { |
|
|
|
count: count, |
|
|
|
litpic: litpic, |
|
|
|
title: title, |
|
|
|
kw: kw, |
|
|
|
des: des, |
|
|
|
keywords: keywords, |
|
|
|
description: description, |
|
|
|
tid: tid, |
|
|
|
}, function(data) { |
|
|
|
let rs = JSON.parse(data); |
|
|
|
if (rs.code === 200) { |
|
|
|
if (data == "success") { |
|
|
|
location.reload(); |
|
|
|
} else { |
|
|
|
ShowMsg(data); |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
function DeleteOne(tid) { |
|
|
|
location = "tags_main.php?action=delete&ids=" + tid; |
|
|
|
} |
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</html> |