| Server IP : 156.238.232.47 / Your IP : 216.73.216.150 Web Server : nginx/1.25.3 System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : www ( 1000) PHP Version : 8.3.25 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/2025_04_15_06/pc/js/ |
Upload File : |
/* 搜索提示 */
function checksearch(the)
{
if ($.trim(the.key.value) == '')
{
alert('请输入关键字');
the.key.focus();
the.key.value = '';
return false
}
if ($.trim(the.key.value) == '请输入关键字')
{
alert('请输入关键字');
the.key.focus();
the.key.value = '';
return false
}
}
/* 更多加载 */
var startHref;
$(function() {
$(".c-moreAjax a").click(function() {
var href = $(this).attr("href");
startHref = href;
if (href != undefined) {
$.ajax({
type: "get",
cache: false,
url: startHref,
success: function(data) {
var $result = $(data).find(".c-ajax");
$(".c-commentAjax").append($result);
var newHref = $(data).find(".c-moreAjax a").attr("href");
if (newHref != "") {
$(".c-moreAjax a").attr("href", newHref)
} else {
$(".c-moreAjax").html('已显示全部评论')
}
}
})
}
return false
})
});
/* 评论 */
$(function() {
if($(".form_comment").length>0){
$(".form_comment").validator({
stopOnError: true,
theme: 'yellow_top',
ignore: ':hidden',
valid: function(form) {
$.fn.tips({
type: 'loading',
content: '数据提交中'
});
$.ajax({
url: webroot + "plug/comment.asp?act=add&id=" + infoid,
type: "post",
data: $(form).serialize(),
success: function(data) {
data = jQuery.parseJSON(data);
var type = "warn";
if (data.status == "y") {
type = "ok"
}
$.fn.tips({
type: type,
content: data.info
});
if (data.status == "y") {
$(".form_comment")[0].reset();
var act = data.info.substring(0, 1);
var info = data.info.substring(1);
$.fn.tips({
type: "ok",
content: info
});
if (act == 2) {
setTimeout(function() {
location.href = '' + contenturl + ''
}, 1500)
}
}
}
})
}
})
}
});
/* 点赞 */
$(function(){
if($("#mood").length>0)
{
$.ajax(
{
type:"post",
cache:false,
url: webroot+"plug/mood.asp?act=load",
data:"cid="+infoid,
success:function(_)
{
if(_!="error")
{
var mood=_.split(":");
for(i=0;i<8;i++)
{
var mood_arr=mood[i].split('#');
$("#mood_"+(i+1)).html(mood_arr[0]);
}
}
}
}
);
}
//
$("#mood a").click(function(){
var mtype=$(this).attr("config");
var data="cid="+infoid;
data+="&mtype="+encodeURIComponent(mtype);
$.ajax(
{
type:"post",
cache:false,
url: webroot+"plug/mood.asp?act=up",
data:data,
success:function(_)
{
if(_=="error")
{
$.fn.tips({content:"您已赞或踩过"});
}
else
{
var mood=_.split(":");
for(i=0;i<8;i++)
{
var mood_arr=mood[i].split('#');
$("#mood_"+(i+1)).html(mood_arr[0]);
}
}
}
}
);
})
})