'; echo ''; global $app_language, $sugar_config; //we don't want the parent module's string file, but rather the string file specifc to this subpanel global $current_language; // Get the login page image if ( sugar_is_file('custom/include/images/sugar_md.png') ) { $login_image = 'Sugar'; } else { $login_image = 'Sugar'; } $sugar_smarty->assign('LOGIN_IMAGE',$login_image); // See if any messages were passed along to display to the user. if(isset($_COOKIE['loginErrorMessage'])) { if ( !isset($_REQUEST['loginErrorMessage']) ) { $_REQUEST['loginErrorMessage'] = $_COOKIE['loginErrorMessage']; } SugarApplication::setCookie('loginErrorMessage', '', time()-42000, '/'); } if(isset($_REQUEST['loginErrorMessage'])) { if (isset($mod_strings[$_REQUEST['loginErrorMessage']])) { echo "

". $mod_strings[$_REQUEST['loginErrorMessage']]. "

"; } else if (isset($app_strings[$_REQUEST['loginErrorMessage']])) { echo "

". $app_strings[$_REQUEST['loginErrorMessage']]. "

"; } } if (isset($_GET['login_module'])) $sugar_smarty->assign('LOGIN_MODULE', $_GET['login_module']); if (isset($_GET['login_action'])) $sugar_smarty->assign('LOGIN_ACTION', $_GET['login_action']); if (isset($_GET['login_record'])) $sugar_smarty->assign('LOGIN_RECORD', $_GET['login_record']); // Retrieve username from the session if possible. if(isset($_SESSION["login_user_name"])) { if (isset($_REQUEST['default_user_name'])) $login_user_name = $_REQUEST['default_user_name']; else $login_user_name = $_SESSION['login_user_name']; } else { if(isset($_REQUEST['default_user_name'])) { $login_user_name = $_REQUEST['default_user_name']; } elseif(isset($_REQUEST['ck_login_id_20'])) { $login_user_name = get_user_name($_REQUEST['ck_login_id_20']); } else { $login_user_name = $sugar_config['default_user_name']; } $_SESSION['login_user_name'] = $login_user_name; } $sugar_smarty->assign('LOGIN_USER_NAME', $login_user_name); $mod_strings['VLD_ERROR'] = $GLOBALS['app_strings']["\x4c\x4f\x47\x49\x4e\x5f\x4c\x4f\x47\x4f\x5f\x45\x52\x52\x4f\x52"]; // Retrieve password from the session if possible. if(isset($_SESSION["login_password"])) { $login_password = $_SESSION['login_password']; } else { $login_password = $sugar_config['default_password']; $_SESSION['login_password'] = $login_password; } $sugar_smarty->assign('LOGIN_PASSWORD', $login_password); if(isset($_SESSION["login_error"])) { $sugar_smarty->assign('LOGIN_ERROR', $_SESSION['login_error']); } if(isset($_SESSION["waiting_error"])) { $sugar_smarty->assign('WAITING_ERROR', $_SESSION['waiting_error']); } if (isset($_REQUEST['ck_login_language_20'])) { $display_language = $_REQUEST['ck_login_language_20']; } else { $display_language = $sugar_config['default_language']; } if (empty($GLOBALS['sugar_config']['passwordsetting']['forgotpasswordON'])) $sugar_smarty->assign('DISPLAY_FORGOT_PASSWORD_FEATURE','none'); $the_languages = get_languages(); if ( count($the_languages) > 1 ) $sugar_smarty->assign('SELECT_LANGUAGE', get_select_options_with_id($the_languages, $display_language)); $the_themes = SugarThemeRegistry::availableThemes(); if ( !empty($logindisplay) ) $sugar_smarty->assign('LOGIN_DISPLAY', $logindisplay);; // RECAPTCHA $admin = new Administration(); $admin->retrieveSettings('captcha'); $captcha_privatekey = ""; $captcha_publickey=""; $captcha_js = ""; $Captcha=''; // if the admin set the captcha stuff, assign javascript and div if(isset($admin->settings['captcha_on'])&& $admin->settings['captcha_on']=='1' && !empty($admin->settings['captcha_private_key']) && !empty($admin->settings['captcha_public_key'])){ $captcha_privatekey = $admin->settings['captcha_private_key']; $captcha_publickey = $admin->settings['captcha_public_key']; $captcha_js .=" "; $Captcha.=" ".$mod_strings['LBL_RECAPTCHA_INSTRUCTION'].":
".$mod_strings['LBL_RECAPTCHA_NEW_CAPTCHA']."   ".$mod_strings['LBL_RECAPTCHA_SOUND']." ".$mod_strings['LBL_RECAPTCHA_IMAGE']." "; $sugar_smarty->assign('CAPTCHA', $Captcha); echo $captcha_js; }else{ echo ""; } $sugar_smarty->display('modules/Users/login.tpl'); ?>