//if( !window['jcClWidgetBase'] ){ //открытие по тэгу if( typeof jcClWidgetBaseOk === 'undefined'){ var jcClWidgetBase = function (param) { this.hash = param.hash; this.wid = param.wid; this.host = param.host; this.type = ''; this.content = ''; this.button = ''; this.cssfile = this.host+'/widget/widget.css'; this.parentid = 0; //родительская сделка this.customer = {}; this.init(param); this.referrer = ''; this.setstat(); this.onopenform = ''; this.oncloseform = ''; this.progressDiv = false; this.progress = false; if(!jcClWidgetBase.mapWidgets[this.wid]) jcClWidgetBase.mapWidgets[this.wid] = this; } jcClWidgetBase.prototype = { init: function(param) { var thisObj = this; this.maindiv = document.createElement('div'); this.maindiv.id='cl_widget_'+this.hash; this.maindiv.innerHTML = ''; this.img = document.createElement('img'); this.img.id='cl_widget_'+this.hash+'_img'; this.img.className = 'clwidget_img'; this.maindiv.appendChild(this.img); this.btn = document.createElement('div'); this.btn.id = 'cl_widget_button_'+this.hash; this.btn.className = 'clwidget-btn'; this.btn.onclick = function(e) { thisObj.openform(); } this.maindiv.appendChild(this.btn); this.container = document.createElement('div'); this.container.id='cl_widget_content_'+this.hash; this.container.className='clwidget-content'; this.container.style.display = 'none'; this.maindiv.appendChild(this.container); this.modal = document.createElement('div'); this.modal.id='cl_widget_overlay_'+this.hash; this.modal.className='clwidget-overlay'; this.modal.onclick = function(e) { thisObj.closeform(); } this.maindiv.appendChild(this.modal) document.body.appendChild(this.maindiv); this.modal.style.zIndex = 9990; this.container.style.zIndex = 9999; jcClWidgetBase.mapWidgets[ this.wid ] = this; this.parentid = 0; this.customer = { id:0, fname:'', mname:'', lname:'', phone:'', email:'', city:''}; }, //init openform: function() { this.modal.style.display='block'; this.modal.style.opacity = 0.7; this.container.style.display='block'; if(this.onopenform) this.onopenform(); }, closeform: function() { this.modal.style.display='none'; this.modal.style.opacity = 0; this.container.style.display='none'; if(this.oncloseform) this.oncloseform(); }, getcookie: function(name) { var reg = new RegExp('('+name+'=)([^;]*)','i'); var matches = document.cookie.match(reg); return matches ? decodeURIComponent(matches[2]) : false; }, setcookie: function(name,val,options) { var str=name+'='+val+';path=/;'; if(options && options.expires) str+='expires='+options.expires; document.cookie = str; }, deletecookie: function(name) { this.setcookie(name, "", {expires: -1}) }, setstat: function() { this.referrer = this.getcookie('clwd_ref'); if(this.referrer == false) { this.referrer = document.referrer; var date = new Date; date.setDate(date.getDate() + 7); this.setcookie('clwd_ref',document.referrer,{expires : date.toUTCString()}); } }, toYandex: function(target) { //Yandex metrika var yaID=0; if (typeof Ya !== "undefined") if(Ya && Ya._metrika && Ya._metrika.getCounters && Ya._metrika.getCounters().length && Ya._metrika.getCounters()[0].id) { yaID = Ya._metrika.getCounters()[0].id+''; if(eval('yaCounter'+yaID)) { var yaCNT = eval('yaCounter'+yaID); yaCNT.reachGoal(target); } } }, toGoogle: function(target) { //Google Analytics if (typeof _gaq !== "undefined") if(_gaq && _gaq.push) _gaq.push(['_trackEvent', 'CloffWidget', target]); //Universal Analytics else if (typeof ga !== "undefined") if(ga) ga('send', 'event', 'CloffWidget', target); }, callscript: function(url,data,fcallback) { var t = new Date().getTime(); var str = url+'?_t='+t+'&_w='+this.wid+'&_h='+this.hash+'&_r='+encodeURIComponent(this.referrer); if(data) str+='&'+data; this.img.onload = function() { var nstatus = parseInt(this.naturalHeight,10); if(fcallback) fcallback(nstatus); } this.img.src = str; }, getparams: function(){ var t = new Date().getTime(); return ('_t='+t+'&_w='+this.wid+'&_h='+this.hash+'&_r='+encodeURIComponent(this.referrer)); }, //отправка запроса CORS callajax: function(url, data, fcallback, isprogress, errfunc) { var t = new Date().getTime(); var thisObj = this; var xmlHttp = new XMLHttpRequest(); xmlHttp.withCredentials = true; if(data){ xmlHttp.open( (data?'POST':'GET'), url, true); xmlHttp.setRequestHeader("Method", "POST " + url + " HTTP/1.1"); xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); data += ('&_t='+t+'&_w='+this.wid+'&_h='+this.hash+'&_r='+encodeURIComponent(this.referrer)); } else { url += ( ( (url.indexOf('?')<=0) ? '?' : '&')+'_t='+t+'&_w='+this.wid+'&_h='+this.hash+'&_r='+encodeURIComponent(this.referrer)); xmlHttp.open( (data?'POST':'GET'), url, true); } xmlHttp.onreadystatechange = function(){ var param = false; //console.log('xmlHttp.readyState',xmlHttp.readyState, 'isprogress', isprogress); if(isprogress){ //console.log('xmlHttp.readyState if(isprogress){ ',(25*xmlHttp.readyState)); thisObj.setProgress(25*xmlHttp.readyState); } if(xmlHttp.readyState == 4){ if(isprogress){ thisObj.hideProgress(); } if(xmlHttp.status !=200 ) { if(errfunc) errfunc(); if( xmlHttp.status != 0 ){ alert('ERROR: request error.\nResponce status:'+xmlHttp.status); return false; } else{ xmlHttp.abort(); return false; } } var resp = xmlHttp.responseText; try { param = eval(resp)[0]; } catch (e) { console.log('Ошибка обработки ответа:', resp); console.error(e); if(errfunc) errfunc(); return false; }; if(fcallback) fcallback(param); } }; if(isprogress){ this.showProgress(); } xmlHttp.send(data); var n = 0; var prog = function(){ n++; thisObj.setProgress(4*n); if(n<20) window.setTimeout( prog, 100); }; prog(); }, setProgress: function(v){ this.progress.value = v; }, showProgress: function(){ if(!this.progressDiv){ this.progressDiv = document.createElement("DIV"); this.progressDiv.className = 'clwidget-progress-overlay'; this.progressDiv.style.display = 'none'; this.progress = document.createElement("PROGRESS"); this.progress.className = 'clwidget-progress'; this.progress.max = 100; this.progressDiv.appendChild(this.progress); document.body.appendChild(this.progressDiv); } //получим zIndex this.progress.value = 0; this.progressDiv.style.zIndex = ( this.zIndex ? parseInt(this.zIndex,10)+10000: (this.container?parseInt(this.container.style.zIndex,10):0)+5); this.progressDiv.style.display = 'block'; }, hideProgress: function(){ this.progressDiv.style.display = 'none'; }, //hideProgress setParent: function(pid){ this.parentid = pid; }, //setParent setCustomer: function(oc){ this.customer = Object.assign({}, oc); }, //setCustomer } jcClWidgetBase.mapWidgets = {}; jcClWidgetBase.getWidget = function(wid){ return ( jcClWidgetBase.mapWidgets[wid] ? jcClWidgetBase.mapWidgets[wid]: false ); }; jcClWidgetBase.onHASH = function(e){ console.log('HASH333', location.hash); if(location.hash.substr(0,6)==='#CLWDG'){ let wid = parseInt(location.hash.substr(6),10); if(wid){ let wgd = jcClWidgetBase.getWidget(wid); if(wgd) wgd.openform(); } } } window.addEventListener('DOMContentLoaded', (event) => { window.addEventListener("hashchange" , function(e) { jcClWidgetBase.onHASH(e); } , false); console.log('OK DOMContentLoaded', jcClWidgetBase.mapWidgets); //ну и проверим а вдруг сразу? if( location.hash && location.hash.length) setTimeout( function(){ jcClWidgetBase.onHASH(); },800); }); console.log('SET DOMContentLoaded', jcClWidgetBase.mapWidgets); var jcClWidgetBaseOk = 1; } //END if jcClWidgetBaseOk; //} //if( !window['jcClWidgetBase'] ){ /* .LINE {max-width: 1010px;} .BLOCK_1 {max-width: 880px;} .BLOCK_2 {max-width: 560px;} .COLUMN_1 {max-width: 346px;} .COLUMN_2 {max-width: 226px; */ if(!window.cl$){ window.cl$ = function(el) { return (typeof el == 'string' ? document.getElementById(el) : el); }; } function jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374(param) { if(cloff_myaccount_widget!==false) return; jcClWidgetBase.apply(this, arguments); this.type = 'myaccount'; var thisObj = this; this.arrWnd = []; cloff_myaccount_widget = this; var utils = jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.utils; this.utils = jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.utils; this.hash ='1eba75c00fb624d887095ae3a7c59374'; this.sizes = [ {w:880, cl: 'BLOCK_1'}, {w:560, cl: 'BLOCK_2'}, {w:380, cl: 'COLUMN_1'}, {w:226, cl: 'COLUMN_2'}, ]; this.cntday = 1; this.SUTKI = 24*3600*1000; this.ssid = this.getcookie('cl_ssid'); if(!this.ssid) this.ssid = ''; this.sid = 'cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374'; this.mbrid = param.mbrid; this.email = ''; this.fname = ''; this.mname = ''; this.lname = ''; //табы this.tabsMain = false; //данные this.arrBooking = []; this.arrTrade = []; //окна this.wAuth = false; this.wMain = false; this.wPay = false; this.wMail = false; this.wGallery = false; this.wBookingCard = false; this.frmDoc = false; //списки this.bookinList = false; this.tradeList = false; this.inited = 0; console.log('0 jcClWidgetMyAccount:',this.hash); this.myaccInit(); } jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype = Object.create(jcClWidgetBase.prototype); jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.myaccInit = function(){ var thisObj = this; let utils = this.utils //находим ссылкий во всех виджетах и открываемся на онклик this.frmDoc = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_file_load_form'); this.frmDoc.objid = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_file_load_form_objid'); this.zIndex = 10; this.initLinks = function(){ if(thisObj.inited) return; thisObj.inited = 1; var links = document.body.getElementsByClassName('clh_auth_link'); cl$('cl_widget_button_1eba75c00fb624d887095ae3a7c59374').style.display = 'none'; console.error('1 links:',thisObj.hash); for(var k=0; k10) break; } thisObj.zIndex = xIndex; thisObj.openform(); }); links.item(k).style.display = 'block'; } }; //initLinks this.initLinks(); //пересадим наши окна в боди //************ WINDOW this.wAuth = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_auth'); this.wAuth.style.display = 'none'; document.body.appendChild( this.wAuth.parentNode.removeChild(this.wAuth) ); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_auth_close').onclick = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_auth_x').onclick = function(){ thisObj.wAuth.style.display = 'none'; return false; }; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_auth_ok').onclick = function(){ thisObj.logIn(); return false; }; this.arrWnd.push(this.wAuth); this.wForgot = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_forgotpass'); this.wForgot.style.display = 'none'; document.body.appendChild( this.wForgot.parentNode.removeChild(this.wForgot) ); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_forgotpass_close').onclick = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_forgotpass_close_x').onclick = function(){ thisObj.wForgot.style.display = 'none'; return false; }; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_forgotpass_ok').onclick = function(){ thisObj.forgotPassword(); return false; }; this.arrWnd.push(this.wForgot); this.wMain = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd'); this.wMain.style.display = 'none'; document.body.appendChild( this.wMain.parentNode.removeChild(this.wMain) ); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_x').onclick = function(){ thisObj.closeMyAccount(); return false; }; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_logout').onclick = function(){ thisObj.logOut(); return false; }; this.leftmin = 0; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_leftmin').onclick = function(){ if(!thisObj.leftmin){ cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_aside').style.display = 'none'; utils.jscClassRemove(this, 'lk_open'); thisObj.leftmin = 1; } else{ cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_aside').style.display = 'flex'; thisObj.leftmin = 0; utils.jscClassAdd(this, 'lk_open'); } }; this.arrWnd.push(this.wMain); this.wGallery = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_gallery'); this.wGallery.style.display = 'none'; document.body.appendChild( this.wGallery.parentNode.removeChild(this.wGallery) ); //пересадим наши окна в боди this.wMail = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_mail'); this.wMail.style.display = 'none'; document.body.appendChild( this.wMail.parentNode.removeChild(this.wMail) ); this.wMail.header = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_mail_header'); this.wMail.subj = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_mail_subj'); this.wMail.msg = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_mail_text'); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_mail_not').onclick = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_mail_close_x').onclick = function(){ thisObj.wMail.style.display = 'none'; return false; }; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_mail_yes').onclick = function(){ thisObj.mailSend(); return false; }; this.arrWnd.push(this.wMail); this.wPay = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_pay'); this.wPay.style.display = 'none'; this.wPay.header = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_pay_header'); this.wPay.msg = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_pay_msg'); this.wPay.sel_div = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_pay_selector_div'); this.wPay.selector = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_pay_selector'); document.body.appendChild( this.wPay.parentNode.removeChild(this.wPay) ); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_pay_not').onclick = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_pay_close_x').onclick = function(){ thisObj.wPay.style.display = 'none'; return false; }; this.arrWnd.push(this.wPay); this.wTradeCard = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_trade_card'); this.wTradeCard.style.display = 'none'; document.body.appendChild( this.wTradeCard.parentNode.removeChild(this.wTradeCard) ); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_trade_card_close').onclick = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_trade_card_close_x').onclick = function(){ if(maTrade.current) maTrade.current.close(); else thisObj.wTradeCard.style.display = 'none'; return false; }; this.arrWnd.push(this.wTradeCard); //пересадим наши окна в боди this.wBookingCard = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_booking_card'); this.wBookingCard.style.display = 'none'; document.body.appendChild( this.wBookingCard.parentNode.removeChild(this.wBookingCard) ); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_booking_card_close').onclick = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_booking_card_close_x').onclick = function(){ if(maBooking.current) maBooking.current.close(); else thisObj.wBookingCard.style.display = 'none'; return false; }; this.arrWnd.push(this.wBookingCard); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_aside').style.display = 'flex'; thisObj.leftmin = 0; utils.jscClassAdd(cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_leftmin'), 'lk_open'); //************ END WINDOW cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_auth_forgotpass').onclick = function(){ cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_forgotpass').style.zIndex = thisObj.zIndex+5; thisObj.wForgot.style.display = 'flex'; }; this.bookinList = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_booking_list'); this.tradeList = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_trade_list'); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_profile_ok').onclick = function(){ thisObj.saveProfile(); return false; }; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_button_profile').onclick = function(){ thisObj.openProfile(); return false; }; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_button_UP').onclick = function(){ cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_header').scrollIntoView({ behavior:'smooth' }); }; //tabs this.tabsMain = new clTabs( cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_tabs') , utils , { addtabs:[ cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_profile_tab') ] , onopentab: function(lid){ var tb = lid.replace('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_','').replace('_tab_label',''); switch(tb){ case 'booking': thisObj.showBookingList(false); break; case 'trade': thisObj.showTradeList(false); break; } //thisObj.resize(); } //onopentab } ); //END clTabs // создаём экземпляр MutationObserver this.observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { thisObj.resize(); }); }); if(this.utils.getCookie('cc_cloff_myapp_gopay_hash')=='1eba75c00fb624d887095ae3a7c59374'){ var mode = this.utils.getCookie('cc_cloff_myapp_gopay_mode'); //убиваем this.utils.setCookie('cc_cloff_myapp_gopay_hash', 0, 1/24/3600); this.utils.setCookie('cc_cloff_myapp_gopay_mode', '', 1/24/3600); this.openform(); } } jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.openform = function(mode){ var thisObj = this; this.zIndex = Math.max(this.utils.maxZIndex(), this.zIndex)+100; //this.zIndex = this.utils.maxZIndex(); //if(this.progressDiv) this.progressDiv.style.zIndex = 'calc(var(--z-index) + 999999)';//this.zIndex+10000; this.container.style.zIndex = this.zIndex; this.wMain.style.zIndex = this.zIndex; this.utils.init(this); this.zIndex = Math.max(this.utils.maxZIndex(), this.zIndex)+100; console.log('0 openform', this.zIndex) this.container.style.zIndex = this.zIndex; if(!document.getElementById('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_styleZ')){ var s = document.createElement('STYLE'); s.id = 'cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_styleZ'; document.body.appendChild(s); } document.getElementById('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_styleZ').innerHTML = '#cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_gallery, ' +'.cl_WDT, .clh_lk, .clwidget-progress-overlay { --z-index: '+this.container.style.zIndex+'; }'; console.log('MyAcc.zIndex=',this.zIndex); console.error('1 openform:this.mbrid',this.mbrid); if(this.mbrid>0){ cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_auth').style.display = 'none'; this.openMyAccount(mode); } else{ cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_auth').style.zIndex = this.zIndex; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_auth').style.display = 'flex'; } } //openform jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.openMyAccount = function(mode){ this.zIndex = Math.max(this.utils.maxZIndex(), this.zIndex); console.log('openMyAccount:this.mbrid',this.mbrid); if(this.mbrid==0){ cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_auth').style.zIndex = this.zIndex; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_auth').style.display = 'flex'; return; } else{ cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_auth').style.display = 'none'; } var spost = ''; var thisObj =this; thisObj.request( thisObj.host+'/rs/myaccount.load.data.rs.php?aj=1', spost, function(param){ thisObj.email = param.data.user.email; thisObj.fname = param.data.user.fname; thisObj.mname = param.data.user.mname; thisObj.lname = param.data.user.lname; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_fname').innerHTML = thisObj.fname; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_mname').innerHTML = thisObj.mname; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_lname').innerHTML = thisObj.lname; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_fname').value = thisObj.fname; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_mname').value = thisObj.mname; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_lname').value = thisObj.lname //thisObj.tabsMain.open('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_profile_tab_label'); thisObj.openProfile(); thisObj.setDataPost(param); if(param.data && param.data.HOTEL){ thisObj.tabsMain.open('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_booking_tab_label'); } // передаём в качестве аргументов целевой элемент и его конфигурацию thisObj.observer.observe(cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_profile_tab'),{ attributes:true, characterData:true, childList: true}); if(mode=='booking'){ thisObj.tabsMain.open('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_booking_tab_label'); } if(mode=='trade'){ thisObj.tabsMain.open('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_trade_tab_label'); } thisObj.wMain.style.display = 'flex'; thisObj.resize(); }, true); } jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.openProfile = function(){ if(this.tabsMain) this.tabsMain.hide_all(); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_profile_tab').style.display = 'flex'; }; jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.bookingPrePay = function(bObj){ var spost = 'bid='+bObj.data.id; var thisObj = this; thisObj.request( thisObj.host+'/rs/myaccount.booking.getpaysum.rs.php?aj=1', spost, function(param){ if((!param.data) || (!param.data.arrpays)){ console.log('PAY RES:',param); } var sPays = ''; for(var p=0; p'+param.data.arrpays[p].descr; } thisObj.wPay.header.innerHTML = 'Оплата брони №'+bObj.data.id; thisObj.wPay.msg.innerHTML = 'Выберите сумму платежа'; thisObj.wPay.selector.innerHTML = sPays; //var zI = thisObj.utils.maxZIndex()+10; var zI = Math.max(thisObj.utils.maxZIndex(), thisObj.zIndex)+15; thisObj.wPay.style.zIndex = zI; thisObj.wPay.sel_div.style.display = 'flex'; thisObj.wPay.style.display = 'flex'; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_pay_yes').onclick = function(){ thisObj.startPay(bObj); return false; }; }, true); return; } //END bookingPrePay jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.startPay = function(bObj){ var pay = this.wPay.selector.value; var spost = 'bid='+bObj.data.id+'&paysum='+pay; var thisObj = this; thisObj.callajax( thisObj.host+'/rs/myaccount.booking.pay.rs.php?aj=1', spost, function(param){ if(param.errcode>0){ thisObj.utils.alert(param.msg); return; } //проверка аутентификации if(!parseInt(param.mbrid,10)){ thisObj.mbrid = 0; thisObj.closeMyAccount(); return; } if((!param.data) || (!param.data.payurl)){ console.log('PAY RES:',param); return; } //запомним что ушли платить дабы открыться по возвращении thisObj.utils.setCookie('cc_cloff_myapp_gopay_hash','1eba75c00fb624d887095ae3a7c59374',1 ); thisObj.utils.setCookie('cc_cloff_myapp_gopay_mode','booking',1 ); document.location.href = param.data.payurl; }, true); return; } //END bookingPrePay jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.bookingCancel = function(bObj, ok){ var thisObj = this; //console.log('bookingCancel', bObj); if(!ok){ var newBObj = bObj; this.utils.confirm('Отменить бронирование №'+bObj.data.id+'?',{ onok: function(){ //console.log('bookingCancel.confirm', newBObj); thisObj.bookingCancel(newBObj, 1); }}); return; } var spost = 'bid='+bObj.data.id; var thisObj = this; thisObj.request( thisObj.host+'/rs/myaccount.booking.cancel.rs.php?aj=1', spost, function(param){ thisObj.utils.alert('Бронирование отменено'); //если в карточке то закроем if(maBooking.current) maBooking.current.close(); //если прилетели перезапишем данные if(param && param.data){ thisObj.setDataPost(param); thisObj.showBookingList(); } }, true); } //END bookingCancel jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.setDataPost = function(param){ this.arrBooking = []; this.arrTrade = []; if(param.data.HOTEL){ for(var k=0; k0){ jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.utils.alert(param.msg); return; } thisObj.mbrid = parseInt(param.mbrid,10); thisObj.wAuth.style.display = 'none'; thisObj.openMyAccount(); }, true); return false; } //END logIn jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.forgotPassword = function(){ var lg = jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.utils.trim( cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_forgotpass_email').value ); if(lg==''){ jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.utils.alert('Введите EMail'); return; } if(!this.utils.checkEMail(lg)){ this.utils.alert('EMail введён не корректно'); return; } var spost = 'email='+lg; var thisObj = this; thisObj.request( thisObj.host+'/rs/myaccount.forgotpassword.rs.php?aj=1', spost, function(param){ thisObj.utils.alert('Письмо с паролем отправлено на указаный адрес'); thisObj.wForgot.style.display = 'none'; }, true); } //forgotPassword jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.mailSend = function(){ var thisObj = this; var subj = this.wMail.subj.value; var msg = this.wMail.msg.value; if(this.utils.trim(subj+msg)==''){ this.utils.alert('Введите сообщение!'); return; } var spost = 'mode='+this.wMail.mode+'&objid='+this.wMail.objid+'&subj='+subj+'&msg='+msg; this.request( thisObj.host+'/rs/myaccount.sendmail.rs.php?aj=1', spost, function(param){ thisObj.utils.alert('Сообщение отправлено'); thisObj.wMail.style.display = 'none'; }, true); } //END mailSend jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.showTradeList = function(israch){ //console.log('showTradeList', this.arrTrade); var thisObj = this; this.tradeList.innerHTML = ''; var nisrach = ( israch ? 1: 0); var cnt = 0; for(var k=0; k1){ cl$(this.sid+'_gallery_photo_description').style.display = 'flex'; cl$(this.sid+'_gallery_photo_description').innerHTML = room_descr; } else{ cl$(this.sid+'_gallery_photo_description').style.display = 'none'; } cl$(this.sid+'_gallery').zIndex = this.zIndex+1000; cl$(this.sid+'_gallery').style.display = 'flex'; cl$(this.sid+'_gallery_photo_close').onclick = function(){ cl$(thisObj.sid+'_gallery').style.display = 'none'; }; var jfNextImg = function(){ var ci = cur.firstChild; if(ci){ cur.removeChild(cur.firstChild); sto.insertBefore(ci,sto.lastChild.nextSibling); } cur.appendChild(sto.removeChild(sto.firstChild)); } var jfPrevImg = function(){ var ci = cur.firstChild; if(ci){ cur.removeChild(cur.firstChild); sto.insertBefore(ci,sto.firstChild); } cur.appendChild(sto.removeChild(sto.lastChild)); } jfNextImg(); if(arrImgs.length>1){ cl$(this.sid+'_gallery_photo_next').style.visibility = 'visible'; cl$(this.sid+'_gallery_photo_prev').style.visibility = 'visible'; } else{ cl$(this.sid+'_gallery_photo_next').style.visibility = 'hidden'; cl$(this.sid+'_gallery_photo_prev').style.visibility = 'hidden'; } cl$(this.sid+'_gallery_photo_next').onclick = function(){ jfNextImg(); }; cl$(this.sid+'_gallery_photo_prev').onclick = function(){ jfPrevImg(); }; };//playGallery jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.resize = function(){ var scrH = this.wMain.clientHeight; var wnd = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_header').parentNode; var wndH = wnd.clientHeight; if( scrH>wndH+wnd.clientTop ){ cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_button_UP').style.display = 'none'; } else{ cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_button_UP').style.display = 'flex'; } if(!wndH) return; }; jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.prototype.request = function(url, spost, callback){ var thisObj =this; thisObj.callajax( url, spost, function(param){ if(parseInt(param.errcode,10)==10){ thisObj.utils.alert('Сессия устарела.\nТребуется аутентификация.', function(){ thisObj.mbrid = 0; thisObj.closeMyAccount(); }); return; } if(param.errcode>0){ thisObj.utils.alert(param.errmsg); return; } //проверка аутентификации if(!parseInt(param.mbrid,10)){ thisObj.mbrid = 0; thisObj.closeMyAccount(); return; } if(callback) callback(param); }, true); }; jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.utils = { init: function(w){ this.wdg = w }, trim: function(s){ return s.replace(/^\s+|\s+$/g, ""); }, addEvent : function(elem, type, handler){ if (elem.addEventListener){elem.addEventListener(type, handler, false)} else { elem.attachEvent("on"+type, handler)} }, removeEvent : function(elem, type, handler){ if (elem.removeEventListener){elem.removeEventListener(type, handler, false)} else { elem.detachEvent("on"+type, handler)} }, wAlert : false, wConfirm : false, wdg: false, alert : function(msg,callback){ if(!this.wAlert) { this.wAlert = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_alert'); this.wAlert.style.display = 'none'; document.body.appendChild( this.wAlert.parentNode.removeChild(this.wAlert) ); cloff_myaccount_widget.arrWnd.push(this.wAlert); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_alert_close_x').onclick = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_alert_close').onclick = function(){ jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.utils.jscClassAdd(cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_alert'), 'hide'); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_alert').style.display = 'none' if(callback){ callback(); } }; } //this.wAlert.style.zIndex = this.maxZIndex()+5; cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_alert_msg var zI = Math.max(this.maxZIndex(), this.wdg.zIndex)+10; this.wAlert.style.zIndex = zI; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_alert').style.zIndex = zI; document.body.appendChild( this.wAlert.parentNode.removeChild(this.wAlert) ); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_alert_msg').innerHTML = msg; jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.utils.jscClassRemove(cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_alert'), 'hide'); cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_alert').style.display = 'flex'; }, confirm : function(msg, param){ var thisObj = this; if(!this.wConfirm) { this.wConfirm = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_confirm'); this.wConfirm.msg = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_confirm_msg'); this.wConfirm.style.display = 'none'; document.body.appendChild( this.wConfirm.parentNode.removeChild(this.wConfirm) ); cloff_myaccount_widget.arrWnd.push(this.wConfirm); } cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_confirm_close_x').onclick = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_confirm_not').onclick = function(){ jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.utils.jscClassAdd(thisObj.wConfirm, 'hide'); thisObj.wConfirm.style.display = 'none'; if(param && param.onclose) param.oncancel(); }; cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_wnd_confirm_yes').onclick = function(){ jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.utils.jscClassAdd(thisObj.wConfirm, 'hide'); thisObj.wConfirm.style.display = 'none'; if(param && param.onok) param.onok(); }; this.wConfirm.msg.innerHTML = msg; //zIndex var zI = Math.max(this.maxZIndex(), this.wdg.zIndex)+10; this.wConfirm.style.zIndex = zI; this.wConfirm.style.display = 'flex'; }, //работа с куками setCookie : function(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+ d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; }, getCookie : function(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i parseFloat(window.getComputedStyle(a).zIndex)) .filter(a => !isNaN(a)) .sort() .pop(); for(w in cloff_myaccount_widget.arrWnd){ let zid = parseInt(cloff_myaccount_widget.arrWnd[w].style.zIndex); if(zid>res) res=zid; } res = Math.max( cloff_myaccount_widget.zIndex, res); cloff_myaccount_widget.zIndex = res; return res; }, };//END служебные функции if( typeof(maTrade) !== "function" ) { function maTrade(data, wdg){ this.h = wdg.hash; this.wdg = wdg; this.data = data; this.rub = 'р.'; } maTrade.current = false; maTrade.prototype.getElement = function(){ var u = jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374.utils; var thisObj = this; var res = /TRADEID/gi; if( (this.el && this.el.id == 'cl_hotel_myaccount_widget_'+this.h+'_trade_'+this.data.id) && this.el.parentNode){ this.el.parentNode.removeChild(this.el); this.el = false; } this.el = cl$('cl_hotel_myaccount_widget_'+this.h+'_trade_TPL').cloneNode(true); this.el.id = 'cl_hotel_myaccount_widget_'+this.h+'_trade_'+this.data.id; var sHTML = this.el.innerHTML.replace(res, this.data.id); this.el.innerHTML = sHTML; cl$('cl_hotel_myaccount_widget_'+this.h+'_trade_TPL').parentNode.appendChild(this.el); cl$(this.el.id+'_bid').innerHTML = this.data.id; cl$(this.el.id+'_dtadd').innerHTML = this.data.dtcreate; cl$(this.el.id+'_name').innerHTML = this.data.name; cl$(this.el.id+'_status').innerHTML = this.data.sstatus; cl$(this.el.id+'_amount').innerHTML = this.data.amount/100; cl$(this.el.id+'_pay').innerHTML = this.data.pay/100; cl$(this.el.id+'_topay').innerHTML = (this.data.amount-this.data.pay)/100; if(this.data.isemail){ cl$(this.el.id+'_button_message').onclick = function(){ thisObj.mailTo(); } } else{ u.jscClassAdd(cl$(this.el.id+'_button_message'), 'disabled'); } if( (this.data.isarch==0) && (this.data.iskassa==1) && ((this.data.amount-this.data.pay)>0) ){ cl$(this.el.id+'_button_pay').onclick = function(){ thisObj.setPay(); } } else{ u.jscClassAdd(cl$(this.el.id+'_button_pay'), 'disabled'); } cl$(this.el.id+'_button_show').onclick = function(){ thisObj.open(); } this.el.parentNode.removeChild(this.el); //данные return this.el; }; //maTrade.prototype.getElement maTrade.prototype.getPosEl = function(obj,list){ var thisObj = this; var re = /TRADEID/gi; var rer = /POSID/gi; var vElOption = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_trade_pos_tpl').cloneNode(true); vElOption.id = 'cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_trade_'+this.data.id+'_pos_'+obj.id; vElOption.innerHTML = vElOption.innerHTML.replace(re, this.data.id).replace(rer, obj.id); list.appendChild(vElOption); cl$(vElOption.id+'_name').innerHTML = obj.name; cl$(vElOption.id+'_price').innerHTML = (obj.price/100)+this.rub; cl$(vElOption.id+'_addfee').innerHTML = (obj.addfee/100)+this.rub; cl$(vElOption.id+'_discount').innerHTML = (obj.discount/100)+this.rub; cl$(vElOption.id+'_price_real').innerHTML = (obj.price_real/100)+this.rub; cl$(vElOption.id+'_count').innerHTML = obj.cnt; cl$(vElOption.id+'_amount').innerHTML = (obj.amount/100)+this.rub; } maTrade.prototype.open = function(){ var spost = 'did='+this.data.id; var u = this.wdg.utils; var thisObj =this; var none = 'none'; thisObj.wdg.request( this.wdg.host+'/rs/myaccount.trade.load.rs.php?aj=1', spost, function(param){ //данные var wid = thisObj.wdg.wTradeCard.id; var rub = thisObj.rub = param.data.money.code; thisObj.data = param.data.deal; cl$(wid+'_shop_name').innerHTML = thisObj.data.name; cl$(wid+'_shop_address').innerHTML = thisObj.data.addr; if(thisObj.data.addr!=''){ u.jscClassRemove(cl$(wid+'_shop_address_div'), 'hide') } else{ u.jscClassAdd(cl$(wid+'_shop_address_div'), 'hide') } cl$(wid+'_shop_phone').innerHTML = thisObj.data.phone; if(thisObj.data.phone!=''){ u.jscClassRemove(cl$(wid+'_shop_phone_div'), 'hide') } else{ u.jscClassAdd(cl$(wid+'_shop_phone_div'), 'hide') } cl$(wid+'_N').innerHTML = thisObj.data.code; cl$(wid+'_number').innerHTML = '№'+thisObj.data.code; cl$(wid+'_dtstart').innerHTML = thisObj.data.dtcreate; cl$(wid+'_price').innerHTML = (thisObj.data.price/100); if(thisObj.data.price!=thisObj.data.price){ u.jscClassRemove(cl$(wid+'_price_div'), 'hide') } else{ u.jscClassAdd(cl$(wid+'_price_div'), 'hide') } cl$(wid+'_discount').innerHTML = (thisObj.data.discount/100); if(!thisObj.data.discount){ u.jscClassRemove(cl$(wid+'_discount_div'), 'hide') } else{ u.jscClassAdd(cl$(wid+'_discount_div'), 'hide') } cl$(wid+'_addfee').innerHTML = (thisObj.data.addfee/100); if(!thisObj.data.addfee){ u.jscClassRemove(cl$(wid+'_addfee_div'), 'hide') } else{ u.jscClassAdd(cl$(wid+'_addfee_div'), 'hide') } cl$(wid+'_amount').innerHTML = (thisObj.data.amount/100); cl$(wid+'_prepay').innerHTML = (thisObj.data.pay/100); cl$(wid+'_summ').innerHTML = ( (thisObj.data.amount-thisObj.data.pay)/100); //позиции cl$(wid+'_position_list').innerHTML = ''; for(var p in thisObj.data.arrItems){ thisObj.getPosEl(thisObj.data.arrItems[p], cl$(wid+'_position_list')); } //END позиции //кнопки if(! thisObj.data.isemail){ u.jscClassAdd(cl$(wid+'_button_message'), 'disabled'); cl$(wid+'_button_message').onclick = function(){ return; }; } else{ u.jscClassRemove(cl$(wid+'_button_message'), 'disabled'); cl$(wid+'_button_message').onclick = function(){thisObj.mailTo();} } if( (thisObj.data.isarch==0) && (thisObj.data.iskassa==1) && ((thisObj.data.amount-thisObj.data.pay)>0) ){ u.jscClassRemove(cl$(wid+'_button_pay'), 'disabled'); cl$(wid+'_button_pay').onclick = function(){ thisObj.setPay(); }; } else{ u.jscClassAdd(cl$(wid+'_button_pay'), 'disabled'); cl$(wid+'_button_pay').onclick = function(){ return; }; } if( (thisObj.data.isarch==0) && (thisObj.data.pay==0) ){ u.jscClassRemove(cl$(wid+'_button_cancel'), 'disabled'); cl$(wid+'_button_cancel').onclick = function(){ console.log('FUCK cancel'); thisObj.cancel(0); }; } else{ u.jscClassAdd(cl$(wid+'_button_cancel'), 'disabled'); cl$(wid+'_button_cancel').onclick = function(){ return;}; } //END кнопки thisObj.wdg.wTradeCard.style.zIndex = thisObj.wdg.zIndex+5; maBooking.current = thisObj; thisObj.wdg.wTradeCard.style.display = 'flex'; if( thisObj.wdg.wTradeCard.scrollHeight == thisObj.wdg.wTradeCard.offsetHeight ){ u.jscClassAdd( cl$(wid+'_totop'), 'hide'); cl$(wid+'_totop').onclick = function(){ return; }; } else{ u.jscClassRemove( cl$(wid+'_totop'), 'hide'); cl$(wid+'_totop').onclick = function(){ cl$(wid+'_header').scrollIntoView({ behavior:'smooth' }); }; } }, true); }; maTrade.prototype.cancel = function(confirm){ var thisObj = this; if(!confirm){ thisObj.wdg.utils.confirm('Отменить заказ №'+this.data.code+'?',{ onok: function(){ thisObj.cancel(1); }}); return; } var spost = 'did='+this.data.id; thisObj.wdg.callajax( thisObj.wdg.host+'/rs/myaccount.trade.cancel.rs.php?aj=1', spost, function(param){ if(param.errcode>0){ thisObj.utils.alert(param.msg); return; } thisObj.utils.alert('Заказ отменён'); //если в карточке то закроем if(maTrade.current) maTrade.current.close(); //если прилетели перезапишем данные if(param && param.data){ thisObj.wdg.setDataPost(param); thisObj.wdg.showTradeList(); } }, true); return; }; maTrade.prototype.setPay = function(){ var pay = (this.data.amount-this.data.pay); var spost = 'did='+this.data.id+'&paysum='+pay; var thisObj = this; thisObj.wdg.callajax( thisObj.wdg.host+'/rs/myaccount.trade.pay.rs.php?aj=1', spost, function(param){ if(param.errcode>0){ thisObj.utils.alert(param.msg); return; } //проверка аутентификации if(!parseInt(param.mbrid,10)){ thisObj.mbrid = 0; thisObj.closeMyAccount(); return; } if((!param.data) || (!param.data.payurl)){ console.log('PAY RES:',param); return; } //запомним что ушли платить дабы открыться по возвращении thisObj.wdg.utils.setCookie('cc_cloff_myapp_gopay_hash','1eba75c00fb624d887095ae3a7c59374',1 ); thisObj.wdg.utils.setCookie('cc_cloff_myapp_gopay_mode','trade',1 ); document.location.href = param.data.payurl; }, true); return; }; //maTrade.prototype.setPay maTrade.prototype.mailTo = function(){ this.wdg.wMail.mode = 'trade'; this.wdg.wMail.objid = this.data.id; this.wdg.wMail.header.innerHTML = 'Сообщение поставщику '+this.data.name; this.wdg.wMail.subj.value = 'Заказ №'+this.data.code; this.wdg.wMail.msg.value = ''; var zI = this.wdg.utils.maxZIndex()+10; this.wdg.wMail.style.zIndex = zI; this.wdg.wMail.style.display = 'flex'; return false; }; //maTrade.prototype.mailTo } //maTrade if( typeof(maBooking) !== "function" ) { function maBooking(data, wdg){ this.h = wdg.hash; this.wdg = wdg; this.data = data; this.rub = 'р.'; } maBooking.current = false; maBooking.STATUS_NEW = 1; maBooking.STATUS_CREATED = 2; maBooking.STATUS_AVANCED = 3; maBooking.STATUS_PAYD = 4; maBooking.STATUS_START = 5; maBooking.STATUS_FINISH = 6; maBooking.STATUS_CANCEL = 7; maBooking.STATUS_CHANGE = 8; maBooking.STATUS_ERROR = 90; maBooking.CLOFF_WIDGET_URL = 'https://www.cloffhotel.ru'; /* 401f9b85-8393-4529-b591-5aa49ba4879a const STATUS_NEW = 1; // Статус бронирования "Отель" новое бронирование const STATUS_CREATED = 2; // Статус бронирования "Отель" бронирование был отзвон (подтверждено оператором) const STATUS_AVANCED = 3; // Статус бронирования "Отель" внесена предоплата const STATUS_PAYD = 4; // Статус бронирования "Отель" оплачено const STATUS_START = 5; // Статус бронирования "Отель" заезд const STATUS_FINISH = 6; // Статус бронирования "Отель" выезд const STATUS_CANCEL = 7; // Статус бронирования "Отель" отмена const STATUS_CHANGE = 8; // Статус бронирования "Отель" изменение const STATUS_ERROR = 9; // Статус бронирования "Отель" требует внимания!!!! */ maBooking.prototype.updateElement = function(){ console.log('maBooking.prototype.updateElement.this.data', this.data); this.el.hotel_photo.style.display = 'none'; this.el.hotel_name.innerHTML = this.data.hotelname; this.el.hotel_addr.innerHTML = this.data.hoteladdr; this.el.hotel_phone.innerHTML = this.data.hotelphone; this.el.dtcancel.innerHTML = this.data.dtcancel; this.el.dtadd.innerHTML = this.data.dtadd; this.el.bid.innerHTML = this.data.id; this.el.dtstart.innerHTML = this.data.dtstart; this.el.dtend.innerHTML = this.data.dtend; this.el.price.innerHTML = this.data.price; if(this.data.addfee){ this.el.addfee.innerHTML = this.data.addfee; this.el.addfee.parentNode.style.display = 'flex'; } else{ this.el.addfee.innerHTML = ''; this.el.addfee.parentNode.style.display = 'none'; } if(this.data.discount){ this.el.discount.parentNode.style.display = 'flex'; this.el.discount.innerHTML = this.data.discount; } else{ this.el.discount.parentNode.style.display = 'none'; } }; //updateElement maBooking.prototype.getElement = function(){ var thisObj = this; var res = /BOOKID/gi; if(!this.el){ this.el = cl$('cl_hotel_myaccount_widget_'+this.h+'_booking_TPL').cloneNode(true); this.el.id = 'cl_hotel_myaccount_widget_'+this.h+'_booking_'+this.data.id; var sHTML = this.el.innerHTML.replace(res, this.data.id); this.el.innerHTML = sHTML; cl$('cl_hotel_myaccount_widget_'+this.h+'_booking_TPL').parentNode.appendChild(this.el); this.el.hotel_name = cl$(this.el.id+'_hotel_name'); this.el.hotel_photo = cl$(this.el.id+'_hotel_photo'); this.el.hotel_addr = cl$(this.el.id+'_hotel_addr'); this.el.hotel_phone = cl$(this.el.id+'_hotel_phone'); this.el.dtcancel = cl$(this.el.id+'_dtcancel'); this.el.dtadd = cl$(this.el.id+'_dtadd'); this.el.bid = cl$(this.el.id+'_bid'); this.el.dtstart = cl$(this.el.id+'_dtstart'); this.el.dtend = cl$(this.el.id+'_dtend'); this.el.price = cl$(this.el.id+'_price'); this.el.addfee = cl$(this.el.id+'_addfee'); this.el.discount = cl$(this.el.id+'_discount'); } if(!this.el.parentNode) cl$('cl_hotel_myaccount_widget_'+this.h+'_booking_TPL').parentNode.appendChild(this.el); //данные if(this.data.amount!=this.data.price){ cl$(this.el.id+'_amount_div').style.display = 'flex'; cl$(this.el.id+'_amount').innerHTML = this.data.discount; } else{ cl$(this.el.id+'_amount_div').style.display = 'none'; } cl$(this.el.id+'_prepay_div').style.display = 'flex'; cl$(this.el.id+'_prepay').innerHTML = this.data.prepay; var toPay = (this.data.amount-this.data.prepay); cl$(this.el.id+'_summ').innerHTML = toPay; if(!this.data.iskassa){ cl$(this.el.id+'_button_pay').style.display = 'none'; } else { if( (toPay<=0) || (!toPay) || (this.data.isarch==1) ){ this.wdg.utils.jscClassAdd(cl$(this.el.id+'_button_pay'), 'disabled'); cl$(this.el.id+'_button_pay').disabled = true; } else{ cl$(this.el.id+'_button_pay').onclick = function(){ thisObj.wdg.bookingPrePay(thisObj); }; } } cl$(this.el.id+'_button_show').onclick = function(){ thisObj.open(); }; cl$(this.el.id+'_legend').innerHTML = this.data.legend; cl$(this.el.id+'_cntadult').innerHTML = this.data.cntadult; var c = parseInt(this.data.cntchild,10)+parseInt(this.data.cntinfant,10); if(c) cl$(this.el.id+'_cntchild').innerHTML = c; else cl$(this.el.id+'_cntchild_div').style.display = 'none'; if( (this.data.isautocancel==1) && (this.data.prepay==0) ){ cl$(this.el.id+'_cancel_div').style.display = 'block'; } else{ cl$(this.el.id+'_cancel_div').style.display = 'none'; } cl$(this.el.id+'_btn_mailto').onclick = function(){ return thisObj.mailTo(); }; //Checkin if( thisObj.data.url_checkin && (thisObj.data.url_checkin!='')){ thisObj.wdg.utils.jscClassRemove(cl$(this.el.id+'_btn_checkin'), 'disabled' ); cl$(this.el.id+'_btn_checkin').onclick = function(){ console.log('Checkin', thisObj.data.url_checkin); document.location.href = thisObj.data.url_checkin; }; } else{ thisObj.wdg.utils.jscClassAdd(cl$(this.el.id+'_btn_checkin'), 'disabled' ); }//END Написать Checkin if(this.data.isarch==1 || (!this.data.iscancancel) || (this.data.prepay>0) ){ cl$(this.el.id+'_btn_cancel').disabled = true; thisObj.wdg.utils.jscClassAdd(cl$(this.el.id+'_btn_cancel'), 'disabled' ); } else{ cl$(this.el.id+'_btn_cancel').onclick = function(){ thisObj.wdg.bookingCancel(thisObj); }; } //калвиши документов if( maBooking.STATUS_NEW<=this.data.status && this.data.status<=maBooking.STATUS_FINISH ){ cl$(this.el.id+'_button_loaddoc').onclick = function(){ thisObj.loadDoc(); }; } else{ cl$(this.el.id+'_button_loaddoc').disabled = true; thisObj.wdg.utils.jscClassAdd(cl$(this.el.id+'_button_loaddoc'), 'disabled' ); } if( maBooking.STATUS_START<=this.data.status && this.data.status<=maBooking.STATUS_FINISH ){ cl$(this.el.id+'_button_loaddog').onclick = function(){ thisObj.loadDog(); }; cl$(this.el.id+'_button_receipt').onclick = function(){ thisObj.loadReceipt(); }; } else{ cl$(this.el.id+'_button_loaddog').disabled = true; thisObj.wdg.utils.jscClassAdd(cl$(this.el.id+'_button_loaddog'), 'disabled' ); cl$(this.el.id+'_button_receipt').disabled = true; thisObj.wdg.utils.jscClassAdd(cl$(this.el.id+'_button_receipt'), 'disabled' ); } if(this.el && this.el.parentNode){ this.el.parentNode.removeChild(this.el); } this.updateElement(); return this.el; } //maBooking.prototype.getElement maBooking.prototype.open = function(){ var spost = 'bid='+this.data.id; var thisObj =this; var none = 'none'; thisObj.wdg.request( this.wdg.host+'/rs/myaccount.booking.load.rs.php?aj=1', spost, function(param){ //данные var rub = thisObj.rub = param.data.money.code; for(let d in thisObj.data){ if(param.data.booking[d] !== undefined) thisObj.data[d] = param.data.booking[d]; } for(let d in param.data.booking){ //расширим if(thisObj.data[d] == undefined) thisObj.data[d] = param.data.booking[d]; } //Отель var wid = thisObj.wdg.wBookingCard.id; cl$(wid+'_hotel_name').innerHTML = param.data.booking.hotel.name; cl$(wid+'_N').innerHTML = thisObj.data.id; if(param.data.booking.hotel.address!='') cl$(wid+'_hotel_address').innerHTML = param.data.booking.hotel.address; else cl$(wid+'_hotel_address_div').style.display = none; if(param.data.booking.hotel.phone!='') cl$(wid+'_hotel_phone').innerHTML = param.data.booking.hotel.phone; else cl$(wid+'_hotel_phone_div').style.display = none; if(param.data.booking.hotel.descr!='') cl$(wid+'_hotel_descr').innerHTML = param.data.booking.hotel.descr; else cl$(wid+'_hotel_descr').style.display = none; //END Отель //карта if( (param.data.booking.hotel.latitude!='') && ( (parseFloat(param.data.booking.hotel.latitude)+parseFloat(param.data.booking.hotel.longitude))!=0)){ cl$(wid+'_hotel_map_frame').src = maBooking.CLOFF_WIDGET_URL+'/tests/a.php?hotellt='+param.data.booking.hotel.latitude +'&hotellg='+param.data.booking.hotel.longitude +'&hotelname='+param.data.booking.hotel.name +'&hoteldescr='+param.data.booking.hotel.descr; cl$(wid+'_hotel_map_div').style.display = 'block'; cl$(wid+'_hotel_map_show').style.display = 'block'; cl$(wid+'_hotel_map_show').onclick = function(){ cl$(wid+'_hotel_map_div').scrollIntoView({ behavior:'smooth' }); }; } else{ cl$(wid+'_hotel_map_frame').src = ''; cl$(wid+'_hotel_map_div').style.display = 'none'; cl$(wid+'_hotel_map_show').style.display = 'none'; } //END карта cl$(wid+'_number').innerHTML = param.data.booking.sstatus; cl$(wid+'_dtstart').innerHTML = param.data.booking.dtstart; cl$(wid+'_dtend').innerHTML = param.data.booking.dtend; cl$(wid+'_legend').innerHTML = param.data.booking.legend; cl$(wid+'_cntadult').innerHTML = param.data.booking.cntadult; if( param.data.booking.childs!='' ) cl$(wid+'_cntchild').innerHTML = param.data.booking.childs; else cl$(wid+'_cntchild_div').style.display = 'none'; if(param.data.booking.addfee>0) cl$(wid+'_addfee').innerHTML = param.data.booking.addfee+rub; else cl$(wid+'_addfee_div').style.display = none; if(param.data.booking.discount>0) cl$(wid+'_discount').innerHTML = param.data.booking.discount+rub; else cl$(wid+'_discount_div').style.display = none; cl$(wid+'_price').innerHTML = param.data.booking.price+rub; cl$(wid+'_amount').innerHTML = param.data.booking.amount+rub; cl$(wid+'_prepay').innerHTML = param.data.booking.prepay+rub; cl$(wid+'_summ').innerHTML = param.data.booking.summ+rub; //услуги var nSrv = 0; cl$(wid+'_service_list').innerHTML = ''; if(param.data.booking.arrservice){ for(var s in param.data.booking.arrservice){ if(param.data.booking.arrservice[s].amount<0)continue; param.data.booking.arrservice[s].id = param.data.booking.arrservice[s].serviceID; param.data.booking.arrservice[s].ispersonal = param.data.booking.arrservice[s].ispers; thisObj.getOptionEl( param.data.booking.arrservice[s], cl$(wid+'_service_list'), 1); nSrv++; } }//END услуги //опции var nOpt = 0; cl$(wid+'_option_list').innerHTML = ''; if(param.data.booking.arroptions){ for(var o in param.data.booking.arroptions){ if(param.data.booking.arroptions[o].isbooking<=0)continue; param.data.booking.arroptions[o].id = param.data.booking.arroptions[o].optionID; thisObj.getOptionEl( param.data.booking.arroptions[o], cl$(wid+'_option_list'), 0); nOpt++; } }//END опции cl$(wid+'_optionservice_list').style.display = ( (nSrv+nOpt) ? 'flex':'none'); cl$(wid+'_service_list').parentNode.style.display = (nSrv ? 'flex':'none'); cl$(wid+'_option_list').parentNode.style.display = (nOpt ? 'flex':'none'); //номера var sRooms = ''; cl$(wid+'_room_list').innerHTML = ''; for(var r in param.data.booking.arrrooms){ sRooms += (''+param.data.booking.arrrooms[r].objtype.name+':'+(param.data.booking.arrrooms[r].amount/100)+rub+''); thisObj.getRoomEl(param.data.booking.arrrooms[r], cl$(wid+'_room_list')); }//END номера var nAdd = 0; //парковка if(param.data.booking.avtoplace!=''){ cl$(wid+'_autoplace').innerHTML = param.data.booking.avtoplace+' '+param.data.booking.avtonum; thisObj.wdg.utils.jscClassRemove( cl$(wid+'_autoplace').parentNode, 'hide'); nAdd++; } else{ thisObj.wdg.utils.jscClassAdd( cl$(wid+'_autoplace').parentNode, 'hide'); }//END парковка //ранний заезд if( parseInt(param.data.booking.early_roomid, 10) ){ cl$(wid+'_early_room').innerHTML = param.data.booking.early_num; cl$(wid+'_early_room_price').innerHTML = param.data.booking.early_pay+rub; thisObj.wdg.utils.jscClassRemove( cl$(wid+'_early_room').parentNode, 'hide'); nAdd++; } else{ thisObj.wdg.utils.jscClassAdd( cl$(wid+'_early_room').parentNode, 'hide'); }//END ранний заезд //поздний выезд if( parseInt(param.data.booking.late_roomid, 10) ){ cl$(wid+'_late_room').innerHTML = param.data.booking.early_num; cl$(wid+'_late_room_price').innerHTML = param.data.booking.late_pay+rub; thisObj.wdg.utils.jscClassRemove( cl$(wid+'_late_room').parentNode, 'hide'); nAdd++; } else{ thisObj.wdg.utils.jscClassAdd( cl$(wid+'_late_room').parentNode, 'hide'); }//END поздний выезд cl$(wid+'_additional').style.display = ( (nAdd) ? 'flex':'none'); //клавиши //Checkin if( thisObj.data.url_checkin && (thisObj.data.url_checkin!='')){ thisObj.wdg.utils.jscClassRemove(cl$(wid+'_button_checkin'), 'disabled' ); cl$(wid+'_button_checkin').disabled = false; cl$(wid+'_button_checkin').onclick = function(){ console.log('Checkin', thisObj.data.url_checkin); document.location.href = thisObj.data.url_checkin; }; } else{ cl$(wid+'_button_checkin').disabled = true; thisObj.wdg.utils.jscClassAdd(cl$(wid+'_button_checkin'), 'disabled' ); }//END Написать Checkin //печать пока уберу cl$(wid+'_button_print').style.display = 'none'; cl$(wid+'_button_print').onclick = function(){ thisObj.print(); };//END Написать отельеру //Написать отельеру cl$(wid+'_button_message').onclick = function(){ console.log('MAIL TO'); thisObj.mailTo(); };//END Написать отельеру //Отмена if( thisObj.data.status < maBooking.STATUS_AVANCED && ( thisObj.data.isarch==0 ) ){ thisObj.wdg.utils.jscClassRemove(cl$(wid+'_button_cancel'), 'disabled' ); cl$(wid+'_button_cancel').onclick = function(){ thisObj.wdg.bookingCancel(thisObj); }; } else{ cl$(wid+'_button_cancel').disabled = true; thisObj.wdg.utils.jscClassAdd(cl$(wid+'_button_cancel'), 'disabled' ); cl$(wid+'_button_cancel').onclick = function(){}; } //Оплата var toPay = (thisObj.data.amount-thisObj.data.prepay); if(!thisObj.data.iskassa){ cl$(wid+'_button_pay').style.display = 'none'; } else { if( (toPay<=0) || (!toPay) || ( thisObj.data.isarch==1) ){ thisObj.wdg.utils.jscClassAdd(cl$(wid+'_button_pay'), 'disabled'); cl$(wid+'_button_pay').disabled = true; cl$(wid+'_button_pay').onclick = function(){}; } else{ cl$(wid+'_button_pay').onclick = function(){ thisObj.wdg.bookingPrePay(thisObj); }; } }//END Оплата //Печать ваучера if( maBooking.STATUS_NEW<=thisObj.data.status && thisObj.data.status<=maBooking.STATUS_FINISH ){ thisObj.wdg.utils.jscClassRemove(cl$(wid+'_button_loaddoc'), 'disabled' ); cl$(wid+'_button_loaddoc').onclick = function(){ thisObj.loadDoc(); }; } else{ cl$(wid+'_button_loaddoc').disabled = true; thisObj.wdg.utils.jscClassAdd(cl$(wid+'_button_loaddoc'), 'disabled' ); cl$(wid+'_button_loaddoc').onclick = function(){}; }//END Печать ваучера //Печать договора/квитанции if( maBooking.STATUS_START<=thisObj.data.status && thisObj.data.status<=maBooking.STATUS_FINISH ){ thisObj.wdg.utils.jscClassRemove(cl$(wid+'_button_loaddog'), 'disabled' ); cl$(wid+'_button_loaddog').onclick = function(){ thisObj.loadDog(); }; thisObj.wdg.utils.jscClassRemove(cl$(wid+'_button_receipt'), 'disabled' ); cl$(wid+'_button_receipt').onclick = function(){ thisObj.loadReceipt(); }; } else{ cl$(wid+'_button_loaddog').disabled = true; thisObj.wdg.utils.jscClassAdd(cl$(wid+'_button_loaddog'), 'disabled' ); cl$(wid+'_button_loaddog').onclick = function(){}; cl$(wid+'_button_receipt').disabled = true; thisObj.wdg.utils.jscClassAdd(cl$(wid+'_button_receipt'), 'disabled' ); cl$(wid+'_button_receipt').onclick = function(){}; }//END Печать договора/квитанции //наверх cl$(wid+'_totop').onclick = function(){ window.setTimeout( function(){ cl$(wid+'_header').scrollIntoView({ behavior:'smooth' }); },50) };//END наверх thisObj.wdg.wBookingCard.style.zIndex = thisObj.wdg.zIndex+5; maBooking.current = thisObj; thisObj.wdg.wBookingCard.style.display = 'block'; }, true); }; maBooking.prototype.close = function(){ maBooking.current = false; this.wdg.wBookingCard.style.display = 'none'; } maBooking.prototype.print = function(){ } maBooking.prototype.getRoomEl = function(room, list){ var thisObj = this; var re = /BOOKINGID/gi; var rer = /ROOMID/gi; var vElRoom = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_room_tpl').cloneNode(true); vElRoom.id = 'cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_booking_'+this.data.id+'_room_'+room.ID; vElRoom.innerHTML = vElRoom.innerHTML.replace(re, this.data.id).replace(rer, room.ID); list.appendChild(vElRoom); if( room.gallery && room.gallery.length ){ img0 = room.gallery[0]; cl$(vElRoom.id+'_img').style.display = 'flex'; cl$(vElRoom.id+'_img').style.display = 'flex'; cl$(vElRoom.id+'_img').style.backgroundImage = 'url(\''+this.wdg.host+'/getimg.php?f='+img0.storageid+'&p='+img0.md+'&pt=1\')'; cl$(vElRoom.id+'_img').arrImg = room.gallery; cl$(vElRoom.id+'_img').onclick = function(){ thisObj.wdg.playGallery(room.gallery, room.client_descr); } } else{ cl$(vElRoom.id+'_img').style.display = 'none'; } cl$(vElRoom.id+'_name').innerHTML = room.num+' '+room.objtype.name; cl$(vElRoom.id+'_info').innerHTML = room.client_descr; cl$(vElRoom.id+'_amount').innerHTML = (room.amount/100)+this.rub; } maBooking.prototype.getOptionEl = function(obj, list, s){ var thisObj = this; var re = /BOOKINGID/gi; var rer = /OPTIONID/gi; var reb = /_option_/gi; var vElOption = cl$('cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_option_tpl').cloneNode(true); var base = '_option_'; if(s) base = '_srv_'; vElOption.id = 'cl_hotel_myaccount_widget_1eba75c00fb624d887095ae3a7c59374_booking_'+this.data.id+base+obj.id; vElOption.innerHTML = vElOption.innerHTML.replace(re, this.data.id).replace(rer, obj.id); if(s) vElOption.innerHTML = vElOption.innerHTML.replace(reb, base); list.appendChild(vElOption); var p = obj.price; if( (!s) && (!obj.isonce) ) p = p/(this.data.cntday); var legend = obj.cnt+'x'+( p/100)+this.rub; var legend_t = obj.cnt+' x '+( p/100)+this.rub; if( obj.ispersonal ){ legend += ('x'+(this.data.cntadult+this.data.cntchild)+'г.'); legend_t += (' x '+(this.data.cntadult+this.data.cntchild)+'гостей '); } if( !obj.isonce ){ legend += ( 'x'+(this.data.cntday)+'н.' ); legend_t += ( ' x '+(this.data.cntday)+' ночей' ); } cl$(vElOption.id+'_name').innerHTML = obj.name; cl$(vElOption.id+'_descr').innerHTML = obj.descr; cl$(vElOption.id+'_count').innerHTML = legend; cl$(vElOption.id+'_count').title = legend_t; cl$(vElOption.id+'_amount').innerHTML = (obj.amount/100)+this.rub; } maBooking.prototype.mailTo = function(){ this.wdg.wMail.mode = 'booking'; this.wdg.wMail.objid = this.data.id; this.wdg.wMail.header.innerHTML = 'Сообщение в отель '+this.data.hotelname; this.wdg.wMail.subj.value = 'Бронирование №'+this.data.id; this.wdg.wMail.msg.value = ''; var zI = this.wdg.utils.maxZIndex()+10; this.wdg.wMail.style.zIndex = zI; this.wdg.wMail.style.display = 'flex'; return false; }; maBooking.prototype.loadDoc = function(){ this.wdg.frmDoc.action = this.wdg.host+'rs/myaccount.booking.loaddoc.rs.php?aj=1&'+this.wdg.getparams(); this.wdg.frmDoc.objid.value = this.data.id; this.wdg.frmDoc.target = '_blank'; this.wdg.frmDoc.submit(); }; maBooking.prototype.loadDog = function(){ this.wdg.frmDoc.action = this.wdg.host+'rs/myaccount.booking.loaddog.rs.php?aj=1&'+this.wdg.getparams(); this.wdg.frmDoc.objid.value = this.data.id; this.wdg.frmDoc.target = '_blank'; this.wdg.frmDoc.submit(); }; maBooking.prototype.loadReceipt = function(){ this.wdg.frmDoc.action = this.wdg.host+'rs/myaccount.booking.showreceipt.rs.php?aj=1&'+this.wdg.getparams(); this.wdg.frmDoc.objid.value = this.data.id; this.wdg.frmDoc.target = '_blank'; this.wdg.frmDoc.submit(); }; window.addEventListener("message", function(e){ console.log(e) }, false); }//maBooking if( typeof(clTabs) !== "function" ) { function clTabs(tabsEl, utils, param){ this.utils = utils; this.param = param; var thisObj = this; var labels = tabsEl.getElementsByTagName('div'); for(var l=0; l /*vars*/ .cl_WDT_LK, .cl_GAL, .cl_calendar, .clwidget-progress-overlay { --clr-primary: rgba(242,121,33,1.00); /* цвет кнопок, активных иконок и ссылок */ --clr-secondary: rgba(86,76,76,1.00); /* цвет фона шапки виджета, окошек алертов и пр. */ --clr-default: rgba(51,51,51,1.00); /* цвет текста */ --clr-disabled: #aaaaaa; /* цвет неактивных элементов */ --clr-white: #fff; --clr-alpha: transparent; --b-rad: 10px; /* радиус скругления всех углов виджета */ --border: 1px solid; --f-family: Arial, sans-serif; --f-size: 14px !important; --f-small: 12px !important; --f-big: 18px !important; --f-weight: 400; --f-bold: 600; --sp-s: 5px; --sp-m: 10px; --sp-l: 15px; --sp-xl: 30px; --z-index: 1000000; } Личный кабинет. × Авторизация в личном кабинете CLOFF Электронная почта Пароль Забыли пароль? Отмена Войти Я согласен с условиями политики обработки персональных данных Личный кабинет. × Восстановление доступа в личный кабинет CLOFF Электронная почта Отмена Получить пароль Я согласен с условиями политики обработки персональных данных Личный кабинет. × Фамилия Имя Отчество Мои данные Мои бронирования в других отелях Выход Up Бронирования Заказы Мои данные Фамилия Имя Отчество Сохранить Список бронирований Архив бронирований Список заказов Архив заказов Внимание! × Внимание! Подтвердите действие! × Внимание! Подтвердите действие! × Внимание! Отправить сообщение × Тема: Сообщение: Бронь № 4354354-д от 4354354-д Название отеля на Главной улице города Адрес: ул. Ленина, д. 1, корп. 1, строение А Телефон: +7 (987) 654-32-10 Написать отелю e-mail Загрузить данные для регистрации Отменить бронирование Внесите предоплату до 23,05,2019 в противном случае бронирование будет автоматически отменено Детали: С 13.03.2019 по 03.05.2019 45 дней, 50 ночей Взрослые: 5 Дети: 4 Стоимость: 1800 RUB Скидка: 1800 RUB Доплата: 1800 RUB Сумма: 1800 RUB Внесено: 1800 RUB К оплате: 1800 RUB Оплатить Подробнее Заказ № 4354354-д от 4354354-д Название магаза на Главной улице города Статус: ул. Ленина, д. 1, корп. 1, строение А Стоимость: +7 (987) 654-32-10 Внесено: +7 (987) 654-32-10 К оплате: +7 (987) 654-32-10 Оплатить Подробнее Бронирование № × Название отеля на Главной улице города Адрес: ул. Ленина, д. 1, корп. 1, строение А Телефон: +7 (987) 654-32-10 Показать на карте №100500 С 13.03.2019 по 03.05.2019 45 дней, 50 ночей Взрослые: 4 Дети: 4 Стоимость: 1800 RUB Скидка: 1800 RUB Доплата: 1800 RUB Сумма: 1800 RUB Внесено: 1800 RUB К оплате: 1800 RUB Сюда пишем клоны блока ROOM Услуги Сюда пишем клоны блока OPTION Дополнительно Сюда пишем клоны блока OPTION Парковочное место: second Ранний заезд: second last Поздний выезд: second last Закрыть Наверх Заказ № × Название отеля на Главной улице города Адрес: ул. Ленина, д. 1, корп. 1, строение А Телефон: +7 (987) 654-32-10 №100500 От 13.03.2019 Стоимость: 1800 RUB Скидка: 1800 RUB Доплата: 1800 RUB Сумма: 1800 RUB Внесено: 1800 RUB К оплате: 1800 RUB Сюда пишем клоны блока POSITION Закрыть Наверх 2-х местный без балкона 2-х местный без балкона Название опции Красочное описание 5 150h. × CLOFF_logo_ext file_sign file_dollar file_template print_new email_alt dots_reg_h dots_reg_v bars delete_outline_alt attach_money calend guest bed_double bed_two chevron_left chevron_right chevron_right_w caret_up caret_down caret_down quest_circle_solid clock exit_new excl_triangle_solid check pet_paw '); document.body.appendChild(d); if(window.cloff_myaccount_widget == undefined){ var cloff_myaccount_widget = false; var clW_1eba75c00fb624d887095ae3a7c59374 = new jcClWidgetMyAccount1eba75c00fb624d887095ae3a7c59374({ hash:'1eba75c00fb624d887095ae3a7c59374', wid:2361, host:'https://hotel.cloff.ru/', mbrid:0 }); } //var cloff_myaccount_widget = clW_1eba75c00fb624d887095ae3a7c59374;