root/c3crm/sugarcrm/trunk/login.php
Revision 1257 (by jianting, 05/14/06 19:24:55) |
---|
<?php require_once('include/utils.php'); require_once('config.php'); global $sugar_config; // Retrieve username and password 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']); //$login_user_name = "admin"; } else { $login_user_name = $sugar_config['default_user_name']; } $_session['login_user_name'] = $login_user_name; } $current_module_strings['VLD_ERROR'] = base64_decode('UGxlYXNlIHJlcGxhY2UgdGhlIFN1Z2FyQ1JNIGxvZ29zLg=='); // Retrieve username and 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; } if(isset($_SESSION["login_error"])) { $login_error = $_SESSION['login_error']; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>C3CRM-¿ª·ÅÔŽŽúÂë¿Í»§¹Øϵ¹ÜÀíϵͳ</TITLE> <META http-equiv=Content-Type content="text/html; charset=GBK"> <LINK id=style_sheet href="images/primacommonstyle.css" type=text/css rel=stylesheet> <script type="text/javascript" language="JavaScript"> <!-- Begin var homepage = parent.document.location.href ; if(homepage != null && homepage.indexOf("home") > -1) { parent.document.location.href = "login.php"; } function set_focus() { if (document.DetailView.user_name.value != '') { document.DetailView.user_password.focus(); document.DetailView.user_password.select(); } else document.DetailView.user_name.focus(); } function toggleDisplay(id){ if(this.document.getElementById( id).style.display=='none'){ this.document.getElementById( id).style.display='inline' if(this.document.getElementById(id+"link") != undefined){ this.document.getElementById(id+"link").style.display='none'; } document['options'].src = 'include/images/options_up.gif'; }else{ this.document.getElementById( id).style.display='none' if(this.document.getElementById(id+"link") != undefined){ this.document.getElementById(id+"link").style.display='inline'; } document['options'].src = 'include/images/options.gif'; } } // End --> </script> <style type="text/css"> body { margin: 0px 0px 0px 0px; font-family: Arial, Verdana, Helvetica, sans-serif; color: #444444; font-size: 12px; background-color: #ffffff; } .body { font-size: 12px; } .buttonLogin { border: 1px solid #444444; font-size: 11px; color: #ffffff; background-color: #666666; font-weight: bold; } input,select { border: 1px solid #bbbbbb; font-size: 11px; background-color: #ffffff; } table,td { color: #444444; font-size: 11px; } p { MARGIN-TOP: 0px; MARGIN-BOTTOM: 10px; } form { margin: 0px; } .dataLabel { font-weight: bold; vertical-align : top; } .dataField { font-weight: bold; vertical-align : top; } </style> </HEAD> <BODY> <form action="index.php" method="post" name="DetailView" id="form"> <TABLE height="80%" cellSpacing=0 cellPadding=0 width="100%" bgColor=#ffffff border=0> <TBODY> <TR> <TD vAlign=center noWrap align=middle width="100%" height="100%"> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD> <TABLE height=59 cellSpacing=0 cellPadding=0 width=611 align=center border=0> <TBODY> <TR> <TD width=34 rowSpan=2><IMG height=59 src="images/top-1.gif" width=34></TD> <TD height=15><IMG height=15 src="images/top-2.gif" width=537></TD> <TD width=40 rowSpan=2><IMG height=59 src="images/top-3.gif" width=40></TD></TR> <TR> <TD bgColor=#e8e8e8 height=44> <TABLE cellSpacing=0 cellPadding=0 width=537 border=0> <TBODY> <TR> <TD width=200 height=44></TD> <TD width=137 height=44></TD> <TD align=right width=200 height=44></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR> <TR> <TD background=images/cplogin_bg.gif> <TABLE height=294 cellSpacing=0 cellPadding=0 width=611 align=center border=0> <TBODY> <TR> <TD vAlign=top width=611 background=images/middle-bg.gif height=294> <TABLE cellSpacing=0 cellPadding=0 width=611 border=0> <TBODY> <TR> <TD width=110 height=52> </TD> <TD vAlign=bottom width=501 height=52><!--IMG height=40 src="images/controlpanel.gif" width=130--></TD></TR></TBODY></TABLE> <TABLE width=611 height="237" border=0 cellPadding=0 cellSpacing=0> <TBODY> <TR> <TD width=600 height=60> </TD> <TD vAlign=top width=250 height=93> </TD></TR> <TR> <TD width=311 height=25> </TD> <TD id=login_td align=middle width=300 height=25><!--INPUT type=image src="images/cplogin_login.gif" border=0--></TD></TR> <TR vAlign=bottom> <TD colSpan=2 height=112> <input type="hidden" name="gmto" value=""> <input type="hidden" name="module" value="Users"> <input type="hidden" name="action" value="Authenticate"> <input type="hidden" name="return_module" value="Users"> <input type="hidden" name="return_action" value="Login"> <input type="hidden" name="login_module" value="<?php if (isset($_GET['login_module'])) echo $_GET['login_module']; ?>"> <input type="hidden" name="login_action" value="<?php if (isset($_GET['login_action'])) echo $_GET['login_action']; ?>"> <input type="hidden" name="login_record" value="<?php if (isset($_GET['login_record'])) echo $_GET['login_record']; ?>"> <script type="text/javascript" language="JavaScript"> d = new Date(); document.DetailView.gmto.value = d.getTimezoneOffset(); </script> <?php if (isset($_REQUEST['ck_login_language_20'])) { $display_language = $_REQUEST['ck_login_language_20']; } else { $display_language = $sugar_config['default_language']; } if (isset($_REQUEST['ck_login_theme_20'])) { $display_theme = $_REQUEST['ck_login_theme_20']; } else { $display_theme = $sugar_config['default_theme']; } ?> <TABLE width=598 border=0 cellPadding=0 cellSpacing=1> <TBODY> <TR> <TD align=right width=78>Óû§Ãû£º</TD> <TD width=150><input type="text" name="user_name" size=10 value=<?php echo "\"$login_user_name\"/>"; if (!empty($sugar_config['default_user_name'])) echo " ({$sugar_config['default_user_name']})"; ?></TD> <TD width=366> </TD> </TR> <TR> <TD align=right>ÃÜ¡¡Â룺</TD> <TD><input type="password" name="user_password" size=10 value=<?php echo "\"$login_password\"/>"; if (!empty($sugar_config['default_password'])) echo " ({$sugar_config['default_password']})"; ?></TD> <TD><input name="imageField" type="image" src="images/cplogin_login.gif" width="71" height="25" border="0"></TD> </TR> <TR> <TD align=right>Óï¡¡ÑÔ£º</TD> <TD><select style='width: 120px' name='login_language'><?php $the_languages = get_languages(); echo get_select_options_with_id($the_languages, $display_language); ?></select></TD> <TD> </TD> </TR> <TR> <TD align=right>·ç¡¡žñ£º</TD> <TD><select style='width: 120px' name='login_theme'><?php echo get_select_options_with_id(get_themes(), $display_theme) ?></select></TD> <TD> </TD> </TR> </TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE> </TD></TR></TBODY></TABLE> <SCRIPT language=JavaScript> var message = ''; if ( message != "" ) alert ( message ) ; </SCRIPT> <?php echo "<table height='20%' cellSpacing=0 cellPadding=0 width='100%' bgColor=#ffffff border=0><tr><td align='center' class='copyRight'>"; //Under the C3CRM License you can not change code below. echo ('© 2004-2006 <a href="http://www.c3crm.com" target="_blank" class="copyRightLink">C3CRM</a> <a href="http://www.sugarcrm.com" target="_blank" class="copyRightLink">SugarCRM Inc.</a> All Rights Reserved.<br />'); // Under the Sugar Public License referenced above, you are required to leave in all copyright statements in both // the code and end-user application as well as the the powered by image. You can not change the url or the image below . echo "<A href='http://www.sugarforge.org' target='_blank'><img style='margin-top: 2px' border='0' width='106' height='23' src='include/images/poweredby_sugarcrm.png' alt='Powered By SugarCRM'></a>\n"; // End Required Image echo "</td></tr></table>\n"; echo "</body></html>"; ?>
Note: See TracBrowser for help on using the browser.