//======================КУКИС - ФУНКЦИЯ:"=V1.03.от 06.06.2011=============================// // В ИЕ максимальный Объём куков на Домен = 4096.Байт //======== Упаковка - ужатие encodeURIComponent ==============================// function pakCodeURI (sPak) { //alert("Длина входной URI-строки >"+sPak.length) sPak=sPak.replace(/^([^%])/g,"<$1");//alert(sPak) sPak=sPak.replace(/(%(?:[\d]|[A-F]){2})(?!%)/mg,"$1<"); sPak=sPak.replace(/(<[^%<]+)/mg,"$1>");//alert(sPak) //alert("<Англ. Текст> Выделен="+ sPak.length)//alert(sPak) sPak=sPak.replace(/%D0/mg,"%G"); sPak=sPak.replace(/%D1/mg,"%b"); sPak=sPak.replace(/%20/mg,"%c"); sPak=sPak.replace(/%B0/mg,"%d"); sPak=sPak.replace(/%BE/mg,"%e"); sPak=sPak.replace(/%80/mg,"%f"); sPak=sPak.replace(/%81/mg,"%g"); sPak=sPak.replace(/%82/mg,"%h"); sPak=sPak.replace(/%83/mg,"%i"); sPak=sPak.replace(/%BD/mg,"%j"); sPak=sPak.replace(/%B5/mg,"%k"); sPak=sPak.replace(/%B8/mg,"%m"); sPak=sPak.replace(/%BB/mg,"%n"); sPak=sPak.replace(/%B1/mg,"%o"); sPak=sPak.replace(/%BA/mg,"%p"); sPak=sPak.replace(/%BE/mg,"%q"); sPak=sPak.replace(/%B9/mg,"%r"); sPak=sPak.replace(/%BF/mg,"%s"); sPak=sPak.replace(/%8B/mg,"%t"); sPak=sPak.replace(/%2C/mg,"%u"); sPak=sPak.replace(/%B2/mg,"%v"); sPak=sPak.replace(/%B4/mg,"%w"); sPak=sPak.replace(/%8F/mg,"%x"); sPak=sPak.replace(/%09/mg,"%y"); sPak=sPak.replace(/%G%e%b/mg,"%H"); sPak=sPak.replace(/%G%e%G/mg,"%Y"); sPak=sPak.replace(/%G%m%G/mg,"%I"); sPak=sPak.replace(/%G%j%b%t/mg,"%J"); sPak=sPak.replace(/%G%j%u/mg,"%K"); sPak=sPak.replace(/%G%j/mg,"%L"); sPak=sPak.replace(/%G%k/mg,"%M"); sPak=sPak.replace(/%G%d/mg,"%N"); sPak=sPak.replace(/%G%9/mg,"%O"); sPak=sPak.replace(/%M%N%K/mg,"%P"); sPak=sPak.replace(/%G%A/mg,"%R"); sPak=sPak.replace(/%G%s/mg,"%S"); sPak=sPak.replace(/%G%m/mg,"%T"); sPak=sPak.replace(/%G%r/mg,"%X"); sPak=sPak.replace(/%b%f/mg,"%U"); sPak=sPak.replace(/%b%h/mg,"%W"); sPak=sPak.replace(/%M%G/mg,"%Z"); sPak=sPak.replace(/%b%8/mg,"%V"); sPak=sPak.replace(/%G%B/mg,"%&"); sPak=sPak.replace(/%u%O/mg,"%#"); sPak=sPak.replace(/%G%v/mg,"%a"); sPak=sPak.replace(/%b%g/mg,"%z"); sPak=sPak.replace(/%&C/mg,"%]"); //alert("2(До % delete > "+sPak.length)//alert(sPak) sPak=sPak.replace(/%/mg,"");//alert("Ужатие URI>"+sPak.length)//alert(">>>"+sPak) return sPak; } //End/Упаковка - ужатие encodeURIComponent //======== Распаковка Ужатого encodeURIComponent ================== function unpakCodeURI (str_unpak) {//alert("function unpakCodeURI"+str_unpak) str_unpak=str_unpak.replace(/(^(?:[^<>]+)(?:<|$))|(>(?:[^<>]+)(?:<|$))/mg,function(a,b,c) { //alert("a23="+a) a=a.replace(/\]/g,"&C"); a=a.replace(/z/g,"bg"); a=a.replace(/a/g,"Gv"); a=a.replace(/#/g,"uO"); a=a.replace(/&/g,"GB"); a=a.replace(/\V/g,"b8"); a=a.replace(/Z/g,"MG"); a=a.replace(/W/g,"bh"); a=a.replace(/U/g,"bf"); a=a.replace(/X/g,"Gr"); a=a.replace(/T/g,"Gm"); a=a.replace(/S/g,"Gs"); a=a.replace(/R/g,"GA"); a=a.replace(/P/g,"MNK"); a=a.replace(/O/g,"G9"); a=a.replace(/N/g,"Gd"); a=a.replace(/M/g,"Gk"); a=a.replace(/L/g,"Gj"); a=a.replace(/K/g,"Gju"); a=a.replace(/J/g,"Gjbt"); a=a.replace(/I/g,"GmG"); a=a.replace(/Y/g,"GeG"); a=a.replace(/H/g,"Geb"); a=a.replace(/y/g,"09"); a=a.replace(/x/g,"8F"); a=a.replace(/w/g,"B4"); a=a.replace(/v/g,"B2"); a=a.replace(/u/g,"2C"); a=a.replace(/t/g,"8B"); a=a.replace(/s/g,"BF"); a=a.replace(/r/g,"B9"); a=a.replace(/q/g,"BE"); a=a.replace(/p/g,"BA"); a=a.replace(/o/g,"B1"); a=a.replace(/n/g,"BB"); a=a.replace(/m/g,"B8"); a=a.replace(/k/g,"B5"); a=a.replace(/j/g,"BD"); a=a.replace(/i/g,"83"); a=a.replace(/h/g,"82"); a=a.replace(/g/g,"81"); a=a.replace(/f/g,"80"); a=a.replace(/e/g,"BE"); a=a.replace(/d/g,"B0"); a=a.replace(/c/g,"20"); a=a.replace(/b/g,"D1"); a=a.replace(/G/g,"D0"); a=a.replace(/([^%]*?)((?:[\d]|[A-F]){2})/g,"$1%$2");// //alert("T0 "+a.length)//alert("a0="+a) return a;}); str_unpak=str_unpak.replace(/<|>/gm,""); //alert("URI-Code >"+str_unpak.length)//alert(str_unpak) return decodeURIComponent(str_unpak); } // End/Распаковка для(decodeURIComponent) ужатого encodeURIComponent==// //================= БИБЛИОТЕКА КУКИСОВ ============== // // Библиотека для кукисов function setCookie3(name, value, expires, path, domain, secure) { if (!name || !value) return false; //alert("HELLO>>"+value) var today = new Date(); today.setTime( today.getTime() ); var expires_date = new Date( today.getTime() + (expires) ); value = encodeURIComponent(value); if (value.length > 1000) value="1$"+pakCodeURI(value); var str = encodeURIComponent(name) + '=' + value;//alert(value) if (expires) str += '; expires=' + expires_date.toGMTString(); if (path) str += '; path=' + path; if (domain) str += '; domain=' + domain; if (secure) str += '; secure'; document.cookie = str; return true; } function getCookie3(name) { name= encodeURIComponent(name) var pattern = "(?:; )?" + name + "=([^;]*);?"; var regexp = new RegExp(pattern,"g"); if (regexp.test(document.cookie)){ NumPak = RegExp["$1"].replace(/^((?:\d{1,2})\$)?([^\$]*)$/g,"$1") if(NumPak == "1$" ) return unpakCodeURI(RegExp["$2"]); return decodeURIComponent(RegExp["$2"]) } return false } function deleteCookie3( name, path, domain ) { if ( getCookie3( name ) ) name= encodeURIComponent(name);document.cookie = name + '=' + ( ( path ) ? ';path=' + path : '') + ( ( domain ) ? ';domain=' + domain : '' ) + ';expires=Thu, 01-Jan-1970 00:00:01 GMT'; } function testNumLast(str, trp) { //test не цифры(или конца строки) за последней цифрой var s=str.lastIndexOf(trp);if(s!=-1){var s=str.substring(s+trp.length,s+trp.length+1); if (s.search(/\d/gi)==-1){return true}else {return false};}else {return false} } //End//Библиотека Кукисов /****************************************************************************************** ******************************************************************************************/ //%%%%%%%%%% ОБСЛУЖИВАНИЕ BB-ТЕГОВ В ПОСТАХ И ФОРМЕ ОТВЕТА %%%%%%%%%%%%%%%%%%%%%%%%%%%%%// //========ФУНКЦИЯ Проверки и Установки Допуска к функции смены НИКА,СТАТУСА,ПОДПИСИ. ======// var Dopusk=0,DopuskList = new Array(); function OnSmenaImage(RazdeL,myarray){ st = document.getElementById("pun-crumbs1").innerHTML; if($("#navlogin").html()!=null){UserLogin = " "}; if (st.indexOf(RazdeL)!= -1){Dopusk = 1; for(q=0;q';//alert(chang) var EndCh = ''; var reg_esp = new RegExp(patt[j],"igm"); contex=contex.replace(reg_esp,chang + "$1" + EndCh);//alert(contex) }$(this).html(contex) }); var pa_avtr='
  • '; var Avt_St='Аватар'; var PostSig_St='
    Подпись автора

    '; var PostSig_End='

    '; var DpskTek; $(".post").each(function (){ var NIk=$(this).find(".post-author .pa-author a").html() DpskTek = 1;for(q=0;q');} if(DpskTek == 1){ /*[NIC]*/ if($(this).hasClass('NIC')==true){$(this).parents(".post").find(".post-author .pa-author a").html(S);} /*[STA]*/ if($(this).hasClass('STA')==true){$(this).parents(".post").find(".post-author .pa-title").html(S);} /*[SGN]*/ if($(this).hasClass('SGN')==true){$(this).parents(".post").find(".post-content .post-sig").replaceWith(""); $(this).parents(".post").find(".post-content").append(PostSig_St+S+PostSig_End);} } });}); //======= end Обслуживание BB-Тегов ===============================// //alert("B") //alert(Dopusk);alert(DopuskList); //========================================================================// //Тут ставим в форму ответа Блок-меню и кнопку, в зависимости от Dopuska var L1="
    \"Аватар\"
    \"NIC\"\"STA\"\"AVA\"\"SGN\"\"mem\"
    "; var L2="
    \"Аватар\"
    \"AVA\"
    "; if(!Dopusk){L1=L2};$("#keyboard-area").after(L1) //========== Галерея ===========================================// var cntrAvt="
    "; var preAvtrST="\"Avatar\" "; $("#smilies-area").before(cntrAvt) for(i=0; i