function openModuleLoginDialog(isIFrame) { if ($("#trv_module_dialog_login:visible").length == 0) { isIFrame = (isIFrame == null || !isIFrame) ? 0:1; var position = getIFramePosition(isIFrame); $("#trv_module_dialog_login").dialog({ close: function(event, ui) { $(this).dialog('destroy'); moduleLoginClearForwardLoginUrl(); }, open: function(event, ui) { var loginValidator = initFormValidator('trv_module_login_form','trv_core_input_white_validator_error'); loginValidator.resetForm(); $('#moduleLoginInputUsername').select(); }, closeOnEscape: true, resizable: false, position: position, minHeight: 210, height: 'auto', width: 350, modal: true, bgiframe: true, title: "Giriş" }); } } function openModulePasswordForgotDialog(isIFrame) { if ($("#trv_module_dialog_password_forgot").length != 0) { $('#trv_module_dialog_login').dialog('close'); } if ($("#trv_module_dialog_password_forgot").length == 0) { blockScreen(); isIFrame = (isIFrame == null || !isIFrame) ? 0:1; var position = getIFramePosition(isIFrame); $("body").append(""); $("#trv_module_dialog_password_forgot").load("http://www.it-matchmaker.com.tr/core/modules/matchmaker_login/components/dialog_password_forgot.php?isIFrame="+isIFrame+"&full_path=NVkzNENoeWMoUmQ1aGFGPUZgcnRvelhISD0rPktLMG0sYzJEOmlZN3ktKj5kOW9WPG5KS1phRH5HQz5aemBzbnMpbl93QjRyViYrZEBiPVpHaig3&app_language=tr&PHPSESSID=dc78a0c357d91d2b94da3d3b33bc3eaa").dialog({ close: function(event, ui) { $(this).dialog('destroy'); $("#trv_module_dialog_password_forgot").remove(); }, closeOnEscape: true, resizable: false, position: position, minHeight: 250, height: 'auto', width: 400, modal: true, bgiframe: true, title: "Şifrenizi mi unuttunuz?" }); } } function moduleLoginSend(isIFrame) { isIFrame = (isIFrame == null || !isIFrame) ? 0:1; var position = getIFramePosition(isIFrame); if (isFormValid('trv_module_login_form',position, isIFrame,'trv_core_input_white_validator_error')) { blockScreen(); $.trv_postJson({ blockScreen: false, module_name: "matchmaker_login", errorDailogPosition: position, errorDailogCenterText: true, ajax_type: "LOGIN", parameter: { userName: $('input#moduleLoginInputUsername').val(), userPassword: $('input#moduleLoginInputPassword').val() }, onSuccess: function(data) { if (data.code == 0) { if (data.domainSwitchLogin != null) { $("form#trv_module_login_form").attr("action", "http://www.it-matchmaker.com.tr/homepage/quick_login.php?md5="+data.message+"&fromDomain="+data.domainSwitchLogin); } else if (data.forwardLoginUrl != null) { if (data.hasForwardUrlParams) { $("form#trv_module_login_form").attr("action", data.forwardLoginUrl+"?PHPSESSID=dc78a0c357d91d2b94da3d3b33bc3eaa"); } else { $("form#trv_module_login_form").attr("action", data.forwardLoginUrl+"&PHPSESSID=dc78a0c357d91d2b94da3d3b33bc3eaa"); } } else { $("form#trv_module_login_form").attr("action", "http://www.it-matchmaker.com.tr/matchmaker/login_switcher.php?PHPSESSID=dc78a0c357d91d2b94da3d3b33bc3eaa"); } $("form#trv_module_login_form").submit(); } else if (data.code == 20 || data.code == 21 || data.code == 22) { unblockScreen(); $("#trv_module_dialog_login").dialog("close"); var infoText = "IT-Matchmaker üzerinde kullanıcı hesabınız otomatik olarak yönlendirildi."; if (data.code == 21) { infoText = "IT-Matchmaker üzerinde kullanıcı hesabınız otomatik olarak yönlendirildi."; } else if (data.code == 22) { infoText = ""; } infoDialog("BİLGİ",infoText,null,null,"moduleLoginVendorLogin('"+data.message+"')", position, "İLERİ"); } } }); } } function moduleLoginVendorLogin(md5) { var newWindow = window.open("http://www.it-matchmaker.com.tr/homepage/quick_login.php?md5="+md5, "itmatchmaker"); newWindow.focus(); } function moduleLoginPasswordSend(isIFrame) { isIFrame = (isIFrame == null || !isIFrame) ? 0:1; var position = getIFramePosition(isIFrame); if (isFormValid('trv_module_login_password_forgoten_form',position, isIFrame,'trv_core_input_white_validator_error')) { $.trv_postJson({ module_name: "matchmaker_login", ajax_type: "NEW_PASSWORD", errorDailogPosition: position, errorDailogCenterText: true, parameter: { userName: $('input#moduleLoginForgotenInputUsername').val(), userEmail: $('input#moduleLoginInputEMail').val() }, onSuccess: function(data) { $("#trv_module_dialog_password_forgot").dialog("close"); infoDialog("BİLGİ","Şifre e-mail ile gönderilmiştir.",null,null,null, position); } }); } } function moduleLoginClearForwardLoginUrl() { $.trv_postJson({ blockScreen: false, module_name: "matchmaker_login", ajax_type: "CLEAR_FORWARD_LOGIN" }); }