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

📄 read.js

📁 交易撮合系统是一套买卖信息沟通的平台
💻 JS
📖 第 1 页 / 共 2 页
字号:
<!--
var ShowIpOjb = function(bid,id){
  this.bid = bid;
  this.id = id;
}

ShowIpOjb.prototype.execute = function(resText) {
  $('ipMsg' + this.id).innerHTML = resText;
}

function showIp(bid,id) {
  displayElement("ipMsg" + id);
  $('ipMsg' + id).innerHTML = pageLoading;

  var url = getActionMappingURL("/read");
  var pars = "action=showip&ajax=shtml&id=" + id + "&bid=" + bid;
  var myAjax = new Ajax.Updater("ipMsg" + id, url, {method: 'get', parameters: pars});
}

function showHisrotyIp(bid,id) {
  displayElement("ipMsg" + id);
  $('ipMsg' + id).innerHTML = pageLoading;

  var url = getActionMappingURL("/read");
  var pars = "action=showiphistory&ajax=shtml&id=" + id + "&bid=" + bid;
  var myAjax = new Ajax.Updater("ipMsg" + id, url, {method: 'get', parameters: pars});
}

function closeShowIp(id) {
  $('ipMsg' + id).innerHTML = "";
  hiddenElement("ipMsg" + id);
}

var ShowUpfilePageOjb = function(bid,id){
  this.bid = bid;
  this.id = id;
}

ShowUpfilePageOjb.prototype.execute = function(resText) {
  $('postOpt' + this.id).innerHTML = resText;
}

function showUpfilePage(bid,id) {
  hiddenElement("noteSend" + id);
  displayElement("postOpt" + id);
  $('postOpt' + id).innerHTML = pageLoading;

  var url = getActionMappingURL("/post");
  var pars = "action=upfile&ajax=shtml&id=" + id + "&bid=" + bid;
  var myAjax = new Ajax.Updater("postOpt" + id, url, {method: 'get', parameters: pars});
}

function closeShowUpfilePage(id) {
  $('postOpt' + id).innerHTML = "";
  hiddenElement("postOpt" + id);
}

function showDelAttachPage(bid,id) {
  hiddenElement("noteSend" + id);
  displayElement("postOpt" + id);
  $('postOpt' + id).innerHTML = pageLoading;

  var url = getActionMappingURL("/post");
  var pars = "action=showdelattachpage&ajax=shtml&id=" + id + "&bid=" + bid;
  var myAjax = new Ajax.Updater("postOpt" + id, url, {method: 'get', parameters: pars});
}

function showMovePage(bid,id) {
  hiddenElement("noteSend" + id);
  displayElement("postOpt" + id);
  $('postOpt' + id).innerHTML = pageLoading;
  var url = getActionMappingURL("/moveForum");
  var pars = "action=movepage&ajax=shtml&id=" + id + "&bid=" + bid;
  var myAjax = new Ajax.Updater("postOpt" + id, url, {method: 'get', parameters: pars});
}

var ShowUpfileInPostOjb = function(bid,id){
  this.bid = bid;
  this.id = id;
}

ShowUpfileInPostOjb.prototype.execute = function(resText) {
  $('upfile' + this.id).innerHTML = resText;
}

function showUpfileInPost(bid,id) {
  displayElement("upfile" + id);

  var url = getActionMappingURL("/read");
  var pars = "action=showupfile&ajax=shtml&id=" + id + "&bid=" + bid;
  var myAjax = new Ajax.Updater("upfile" + id, url, {method: 'get', parameters: pars});
}


function OnUploadCompleted(bid,pid,codeid,msg){
  alert(msg);
  if (codeid == "0") {
    showUpfilePage(bid,pid);
    showUpfileInPost(bid,pid);
  }
  else if (codeid == "2") {
    closeShowUpfilePage(pid);
  }
  else if (codeid == "4") {
    closeShowUpfilePage(pid);
  }
  else if (codeid == "99") {
    closeShowUpfilePage(pid);
  }
  else {
    showUpfilePage(bid,pid);
  }
}

var AgreeAgainstAjax = Class.create();

AgreeAgainstAjax.prototype = {
  initialize: function(action,bid,id) {
    this.action = action;
    this.bid = bid;
    this.id = id;
  },

  doAgreeAgainst: function() {
    showExeMsg();
    var url = getActionMappingURL("/postOpt");
    var pars = "ajax=xml&action=" + this.action + "&id=" + this.id + "&bid=" + this.bid;
    var myAjax = new Ajax.Request(url, {method: 'get', parameters: pars, onComplete: this.agreeAgainstCompleted.bind(this)});
  },

  agreeAgainstCompleted: function(res) {
    //resXML = res.responseXML;
    //var codeid = getResponseXMLMsgsCodeid(resXML);

    resText = res.responseText;
  	var jsonMsgObj = new JsonMsgObj(resText);
  	var codeid = jsonMsgObj.getCodeid();

    hiddenExeMsg();
    alert(jsonMsgObj.getMessage());
    if (codeid == "0") {
      if (this.action == "votyes") {
        $('agree' + this.id).innerHTML = jsonMsgObj.getText();
      }
      if (this.action == "votno") {
        $('beAgainst' + this.id).innerHTML = jsonMsgObj.getText();
      }
    }
  }
};

function agreeAgainst(bid,id,type) {
  var oAgreeAgainstAjax = new AgreeAgainstAjax(type,bid,id);
  oAgreeAgainstAjax.doAgreeAgainst();
}

var DelAPostAjax = Class.create();

DelAPostAjax.prototype = {
  initialize: function(bid,id,isNew,fcpage) {
    this.bid = bid;
    this.id = id;
    this.isNew = isNew;
    this.fcpage = fcpage;
  },

  del: function() {
    //var url = getActionMappingURL("/postOpt?ajax=xml&action=dela&id=" + id + "&bid=" + bid);
    showExeMsg();
    var url = getActionMappingURL("/postOpt");
    var pars = "ajax=xml&action=dela&id=" + this.id + "&bid=" + this.bid;
    var myAjax = new Ajax.Request(url, {method: 'get', parameters: pars, onComplete: this.delCompleted.bind(this)});
  },

  delCompleted: function(res) {
    //resXML = res.responseXML;
    //var codeid = getResponseXMLMsgsCodeid(resXML);

    resText = res.responseText;
  	var jsonMsgObj = new JsonMsgObj(resText);
  	var codeid = jsonMsgObj.getCodeid();
    hiddenExeMsg();
    alert(jsonMsgObj.getMessage());
    if (codeid == "0") {
      if (this.isNew == 1) {
        window.location.href = getActionMappingURL("/forum?action=index&bid=" + this.bid + "&page=" + this.fcpage);
      }
      else {
        $('topic' + this.id).className = "summary1";
        //$('topic' + this.id).innerHTML = "["+ this.id +"]" + deleted;
        $('topic' + this.id).innerHTML = postdeleted.format(this.id);
        document.getElementById("siderbarcontent").style.height=document.getElementById("postlistcontent").scrollHeight+"px";
      }
    }
  }
};

function delapost(bid,id,isNew,fcpage) {
  var del = confirm(confirm_del);
  if (del) {
    var oDelAPostAjax = new DelAPostAjax(bid,id,isNew,fcpage);
    oDelAPostAjax.del();
  }
  else {
    return false;
  }
}

function subsTopic(bid,id) {
  showExeMsg();
  var url = getActionMappingURL("/postOpt");
  var pars = "ajax=xml&action=subs&id=" + id + "&bid=" + bid;
  var myAjax = new Ajax.Request(url, {method: 'get', parameters: pars, onComplete: this.subsTopicCompleted.bind(this)});
}

function subsTopicCompleted(res) {

  resText = res.responseText;
  	var jsonMsgObj = new JsonMsgObj(resText);
  	var codeid = jsonMsgObj.getCodeid();
  hiddenExeMsg();
  alert(jsonMsgObj.getMessage());
}

var TopTopicAjax = Class.create();

TopTopicAjax.prototype = {
  initialize: function(bid,id,type) {
    this.type = type;
    this.bid = bid;
    this.id = id;
  },

  top: function() {
    //var url = getActionMappingURL("/postOpt?ajax=xml&action=" + type + "&id=" + id + "&bid=" + bid);
    showExeMsg();
    var url = getActionMappingURL("/postOpt");
    var pars = "ajax=xml&action=" + this.type + "&id=" + this.id + "&bid=" + this.bid;
    var myAjax = new Ajax.Request(url, {method: 'get', parameters: pars, onComplete: this.topCompleted.bind(this)});
  },

  topCompleted: function(res) {
    //resXML = res.responseXML;
    //var codeid = getResponseXMLMsgsCodeid(resXML);
    resText = res.responseText;
  	var jsonMsgObj = new JsonMsgObj(resText);
  	var codeid = jsonMsgObj.getCodeid();
    hiddenExeMsg();
    alert(jsonMsgObj.getMessage());
    if (codeid == "0") {
      if (this.type == "top") {
        $('topset' + this.id).innerHTML = "[<a href=\"javascript:;\" onclick=\"topSet('"+this.bid+"','"+this.id+"','untop');\">"+postsetuntop+"</a>]\n";
      }
      if (this.type == "untop") {
        $('topset' + this.id).innerHTML = "[<a href=\"javascript:;\" onclick=\"topSet('"+this.bid+"','"+this.id+"','top');\">"+postsettop+"</a>]\n";
      }
    }
  }
};

function topSet(bid,id,type) {
  var topset = false;
  if (type == "top") {
    topset = confirm(postsettopconfirm);
  }
  if (type == "untop") {
    topset = confirm(postsetuntopconfirm);
  }
  if (topset) {
    var oTopTopicAjax = new TopTopicAjax(bid,id,type);
    oTopTopicAjax.top();
  }
  else {
    return false;
  }
}

var CanNotDelTopicAjax = Class.create();

CanNotDelTopicAjax.prototype = {
  initialize: function(bid,id,type) {
    this.type = type;
    this.bid = bid;
    this.id = id;
  },

  canNotDel: function() {
    showExeMsg();
    var url = getActionMappingURL("/postOpt");
    var pars = "ajax=xml&action=" + this.type + "&id=" + this.id + "&bid=" + this.bid;
    var myAjax = new Ajax.Request(url, {method: 'get', parameters: pars, onComplete: this.canNotDelCompleted.bind(this)});
  },

  canNotDelCompleted: function(res) {

    resText = res.responseText;
  	var jsonMsgObj = new JsonMsgObj(resText);
  	var codeid = jsonMsgObj.getCodeid();
    hiddenExeMsg();
    alert(jsonMsgObj.getMessage());
    if (codeid == "0") {
      if (this.type == "cannotdel") {
        $('cndt' + this.id).innerHTML = "M";
        $('cannotdel' + this.id).innerHTML = "[<a href=\"javascript:;\" onclick=\"canNotDelSet('"+this.bid+"','"+this.id+"','candel');\">"+postuncannotdel+"</a>]\n";
      }
      if (this.type == "candel") {
        $('cndt' + this.id).innerHTML = "";
        $('cannotdel' + this.id).innerHTML = "[<a href=\"javascript:;\" onclick=\"canNotDelSet('"+this.bid+"','"+this.id+"','cannotdel');\">"+postcannotdel+"</a>]\n";
      }
    }
  }
};

function canNotDelSet(bid,id,type) {
  var candelset = false;
  if (type == "cannotdel") {
    candelset = confirm(postcannotdelconfirm);
  }
  if (type == "candel") {
    candelset = confirm(postuncannotdelconfirm);
  }
  if (candelset) {
    var oCanNotDelTopicAjax = new CanNotDelTopicAjax(bid,id,type);
    oCanNotDelTopicAjax.canNotDel();
  }
  else {
    return false;
  }
}

var CommendTopicAjax = Class.create();

CommendTopicAjax.prototype = {
  initialize: function(bid,id,type) {
    this.type = type;
    this.bid = bid;
    this.id = id;
  },

  commend: function() {
    showExeMsg();
    var url = getActionMappingURL("/postOpt");
    var pars = "ajax=xml&action=" + this.type + "&id=" + this.id + "&bid=" + this.bid;
    var myAjax = new Ajax.Request(url, {method: 'get', parameters: pars, onComplete: this.commendCompleted.bind(this)});
  },

  commendCompleted: function(res) {
    resText = res.responseText;
  	var jsonMsgObj = new JsonMsgObj(resText);
  	var codeid = jsonMsgObj.getCodeid();
    hiddenExeMsg();
    alert(jsonMsgObj.getMessage());
    if (codeid == "0") {
      if (this.type == "commend") {
        $('commend' + this.id).innerHTML = "[<a href=\"javascript:;\" onclick=\"commendSet('"+this.bid+"','"+this.id+"','uncommend');\">"+postuncommend+"</a>]\n";
      }
      if (this.type == "uncommend") {
        $('commend' + this.id).innerHTML = "[<a href=\"javascript:;\" onclick=\"commendSet('"+this.bid+"','"+this.id+"','commend');\">"+postcommend+"</a>]\n";
      }
    }
  }
};

function commendSet(bid,id,type) {
  var cset = false;
  if (type == "commend") {
    cset = confirm(postcommendconfirm);
  }
  if (type == "uncommend") {
    cset = confirm(postuncommendconfirm);
  }
  if (cset) {
    var oCommendTopicAjax = new CommendTopicAjax(bid,id,type);
    oCommendTopicAjax.commend();
  }
  else {
    return false;
  }
}

var LockTopicAjax = Class.create();

LockTopicAjax.prototype = {
  initialize: function(bid,id,type) {
    this.type = type;
    this.bid = bid;
    this.id = id;
  },

  lock: function() {
    showExeMsg();
    var url = getActionMappingURL("/postOpt");
    var pars = "ajax=xml&action=" + this.type + "&id=" + this.id + "&bid=" + this.bid;

⌨️ 快捷键说明

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