function sendurl(obj,type,id,e,urlprefix) { var temptype = '0'; if (type == '16') { type = '1'; temptype = '16'; } if (!(db_ajax & type) || e && e.ctrlKey) { return true; } if(temptype == '16'){ type = '16'; } try { var url_a = {1 : 'mawhole.php?ajax=1&' , 2 : 'masingle.php?ajax=1&' , 4 : 'ajax.php?' , 8 : 'operate.php?ajax=1&', 16 : 'mawholecolony.php?ajax=1&'}; var url = url_a[type]; var href = obj.href; if (href.indexOf(db_dir)!=-1 && href.indexOf(db_ext)!=-1) { href = href.substr(href.indexOf(db_dir)+db_dir.length); href = href.substring(0,href.lastIndexOf(db_ext)); var str = href.split('-'); for (i=0; i0 && confirm('你确定要使用该道具吗?')) { closep(); read.obj = getObj('td_More'); ajax.send('profile.php?action=toolcenter&job=ajax&tid='+tid+'&toolid='+id,'',ajax.get); } } function usertool(uid,id) { if (confirm('你确定要使用该道具吗?')) { closep(); ajax.send('profile.php?action=toolcenter&job=ajax&uid='+uid+'&toolid='+id,'',ajax.get); } } function fontsize(text,id){ getObj("read_"+id).className = text; } if (typeof totalpage != 'undefined' && totalpage > 1) { document.onkeydown = function(e) { var e = window.event || e; var tag=e.target||e.srcElement; var tagname = tag.tagName || tag.tagName; if (tagname == 'INPUT' || tagname == 'TEXTAREA') { return; } actualCode = e.keyCode ? e.keyCode : e.charCode; if (actualCode == 39 && page1) { window.location = jurl + (page-1); } } } function worded() { var str = ajax.request.responseText.split("\t"); var id = read.obj.id; id = id.substr(id.lastIndexOf('_')+1); if (str[0] == 'success') { if (IsElement('lwd_'+id)) { if (str[1] == '' || str[1] == undefined) { getObj('read_'+id).removeChild(getObj('lwd_'+id)); } else { getObj('lwd_'+id).lastChild.innerHTML = str[1]; } } else { if(str[1] == '') return; var tpc = getObj('read_'+id); var s = document.createElement("div"); s.id = 'lwd_' + id; s.className = 'louMes'; s.innerHTML = 'x

楼主留言:

'+str[1]+'

'; if (IsElement('alert_'+id)) { tpc.insertBefore(s,getObj('alert_'+id)); } else{ tpc.appendChild(s); } } } else { ajax.guide(); } } function reminded() { var str = ajax.request.responseText.split("\t"); var id = read.obj.id; id = id.substr(id.lastIndexOf('_')+1); if (str[0] == 'success') { if (IsElement('mag_'+id)) { getObj('mag_'+id).lastChild.innerHTML = str[1]; } else { var o = getObj('p_'+id); var s = document.createElement("div"); s.id = 'mag_' + id; s.className = 'tpc_content'; s.innerHTML = '
管理提醒: ('+str[2]+')
'+str[1]+'
'; o.parentNode.insertBefore(s,o.nextSibling); } } else if (str[0] == 'cancle') { if (IsElement('mag_'+id)) { getObj('mag_'+id).parentNode.removeChild(getObj('mag_'+id)); } } else { ajax.guide(); } } function checkUrl(obj) { var url = obj.href; var suburl = ''; var urladd = ''; var regex = /^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/; if (db_urlcheck.length > 0) { var str = db_urlcheck.split(","); var r = regex.exec(url); for (var i in str){ if (r[6].indexOf('.'+str[i]) !== -1 || r[6] == str[i] ){ return true; } } } var regex2 = /^http(s)?:\/\/([a-z0-9\-]+\.)*(([a-z0-9\-]+)\.(com|net|cn|com\.cn|net\.cn|org|org\.cn|biz|cc|name|asia|mobi|me|tel|中国|公司|网络|hk|tv))(\/(.+))?/; var r2 = regex2.exec(db_bbsurl); if (r2 != null && url.indexOf(r2[3]) != -1) { return true; } else if (url.indexOf('localhost') == -1 && url.indexOf('127.0') == -1){ suburl = url.substr(0,30); if (suburl != url) { urladd = '...'; } getObj("pw_box").innerHTML=''; if(getObj('suburl')){ setTimeout( function(){ read.open('checkurl',obj.id,1,11); getObj('suburl').innerHTML = suburl + urladd; getObj('trueurl').href = url; //for buttons var buttons = document.getElementsByTagName('button'); for(var i=0;i 0){ var uid = getObj("hideUid").value; var tid = getObj("tid").value; var url = "job.php?action=tofloor&floor=" + obj.value + "&tid=" + tid; if (uid > 0) { url += "&uid=" + uid; } window.location = url; } } function viewIp(o) { read.obj = o; var str = o.id.split('_'); ajax.send('masingle.php?action=viewip&ajax=1&fid=' + fid + '&tid=' + tid + '&pid=' + str[1] + '&page=' + page, '', function() { ajax.get();read.closeByMove(o.id); }); } function manageSignature(idName, pid, isBanned) { url = 'masingle.php?action=bansignature&fid=' + fid + '&tid=' + tid + '&pid=' + pid + '&page=' + page; url += (db_ajax & 2) ? '&ajax=1' : ''; url += (isBanned == 1) ? '&isbanned=1' : ''; if (!(db_ajax & 2)) { getObj(idName).href=url; return true; } sendmsg(url,'',''); } function showSignature(idName, isShow) { if (isShow) { getObj(idName).style.cssText = 'display:inline'; } else { getObj(idName).style.cssText = 'display:none'; } } var loadFloor = { showHidden : function(tid) { var pids = ''; var objs = document.forms['delatc'].getElementsByTagName('div'); for (var i = 0; i < objs.length; i++) { if (objs[i].id && objs[i].id.substr(0, 7) == 'hidden_') { pids += (pids ? ',' : '') + objs[i].id.substr(objs[i].id.lastIndexOf('_') + 1); } } this.get(tid, pids); }, get : function(tid, pids) { if (pids == '') return; ajax.send('pw_ajax.php?action=readfloor&tid=' + tid + '&pids=' + pids, '', function() { var rText = ajax.request.responseText; if (rText == 'fail') return; var tmpNode = document.createElement('div'); tmpNode.innerHTML = rText; var len = tmpNode.childNodes.length; if (len > 0) { for (var i = 0; i < len; i++) { var o = tmpNode.childNodes[i]; if (o.nodeType == 1 && o.id && o.id.substr(0,10) == 'readfloor_') { for (var j = 0; j < o.childNodes.length; j++) { var mo = o.childNodes[j]; if (mo.nodeType == 1 && mo.id != '' && IsElement(mo.id)) { getObj(mo.id).parentNode.replaceChild(mo.cloneNode(true), getObj(mo.id)); } } } } } }); } } function showAttImg(lou, type) { var other = type == 'small' ? 'all' : 'small'; getObj('imgList_' + lou + '_' + type).style.display = ''; getObj('imgList_' + lou + '_' + other).style.display = 'none'; getObj('imgAction_' + lou + '_' + type).className = 'current'; getObj('imgAction_' + lou + '_' + other).className = ''; } var readImg = { queue : {}, lou : 0, preview: null, init : function(lou) { if (!this.queue[lou]) { var list = getObj('imgList_' + lou + '_small').getElementsByTagName('img'); var imgs = []; for (var i=0; imaxWidth){ preview.width = maxWidth; preview.height = maxWidth/ratio; } if(preview.height>maxHeight){ preview.height = maxHeight; preview.width = maxHeight* ratio; } var popwin = document.getElementById('photo_pop'), popbg = document.getElementById('photo_pop_mask'), imgp = document.getElementById('photo_path'), imgc = document.getElementById('imgLoading'); imgc.style.width = preview.width+'px'; imgc.style.height = preview.height+'px'; imgp.src = preview.src; popbg.style.height = Math.max(rect.clientHeight-20, (document.documentElement.scrollHeight || document.body.scrollHeight))+'px'; popbg.style.display = popwin.style.display = 'block'; var w = popwin.clientWidth || parseInt(popwin.currentStyle.width), h = popwin.clientHeight || parseInt(popwin.currentStyle.height); popwin.style.left =( (document.documentElement.clientWidth || document.body.clientWidth)-w)/2 +'px'; popwin.style.top = ietruebody().scrollTop + ( (document.documentElement.clientHeight || document.body.clientHeight)-h)/2 +'px'; }