PageRenderTime 49ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/index.php

https://github.com/AvinashMudunuri/Modernize
PHP | 186 lines | 171 code | 14 blank | 1 comment | 12 complexity | 8a17a4c1bd4eb625c156fc4dd0f262d1 MD5 | raw file
  1. <?php
  2. require_once('Connections/powermigrate.php');
  3. include("includes/common.php");
  4. ?>
  5. <?php
  6. $editFormAction = $_SERVER['PHP_SELF'];
  7. if (isset($_SERVER['QUERY_STRING'])) {
  8. $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
  9. }
  10. if ((isset($_POST["MM_login"])) && ($_POST["MM_login"] == "login_form"))
  11. {
  12. $error = array();
  13. if (!isset($_SESSION)) {
  14. session_start();
  15. }
  16. $loginUsername = htmlspecialchars($_POST['email'],ENT_QUOTES);
  17. $password = sha1($_POST['password']);
  18. $MM_redirectLoginSuccess = "details.php";
  19. mysql_select_db($database_powermigrate, $powermigrate);
  20. $LoginRS__query=sprintf("SELECT email, password FROM customers WHERE email=%s AND password=%s AND isactive = '1'",
  21. GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
  22. $LoginRS = mysql_query($LoginRS__query, $powermigrate) or die(mysql_error());
  23. $LoginRS_Row = mysql_fetch_array($LoginRS);;
  24. $loginFoundUser = mysql_num_rows($LoginRS);
  25. $fname = $LoginRS_Row['first_name'];
  26. $lname = $LoginRS_Row['last_name'];
  27. $id = $LoginRS_Row['id'];
  28. if ($loginFoundUser) {
  29. $update_LastLogin = sprintf("UPDATE customers SET last_login = NOW() WHERE email = %s",
  30. GetSQLValueString($loginUsername, "text"));
  31. $update_result = mysql_query($update_LastLogin, $powermigrate);
  32. $loginStrGroup = "";
  33. if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
  34. //declare two session variables and assign them
  35. $_SESSION['MM_Username'] = $loginUsername;
  36. $_SESSION['MM_UserGroup'] = $loginStrGroup;
  37. $_SESSION['MM_fname'] = $fname;
  38. $_SESSION['MM_lname'] = $lname;
  39. header("Location: " . $MM_redirectLoginSuccess );
  40. }
  41. else {
  42. $error['invalid'] = 'Invalid Username or Password';
  43. }
  44. }
  45. ?>
  46. <?php include("header.php");?>
  47. <script type="text/javascript">
  48. $(document).ready(function(){
  49. $("#login_form").validate();
  50. });
  51. </script>
  52. <div id="main-content">
  53. <div id="indexImg">
  54. <div id="banner">
  55. <div id="banner_text">
  56. <p class="bannerText" style="padding-top:40px; font-size:18px">Modernize Now. Decide Later.
  57. <p class="bannerText">&nbsp;</p>
  58. <p class="bannerText">
  59. Migrate your PowerBuilder applications to Java or .NET web for free.You'll be able to view and test the translated
  60. application at no cost or obligation before deciding whether to purchase.</p>
  61. </p>
  62. <br />
  63. </div>
  64. <div style="width:250px;padding-left:45px;">
  65. <p class="button"><a href="register.php">Get Started Now</a></p>
  66. </div>
  67. </div>
  68. </div>
  69. <div id="mid_content">
  70. <div id="mid_left">
  71. <div id="mid_left_content">
  72. <p class="heading">4 Easy Steps to Migrate Your PowerBuilder Applications</p>
  73. <ul class="mid_left_list">
  74. <li>Sign up for a ModernizeNow Account </li><br />
  75. <li>Upload code for each PowerBuilder application you want to
  76. migrate indicating as a target either .NET or Java web </li><br />
  77. <li>Within 48 hours , we'll send you a link to view and test the
  78. migrated application--there is no cost or obligation for this service
  79. </li><br />
  80. <li>If the modernized application is to your satisfaction,
  81. you can choose to purchase the migrated code,
  82. which will be delivered immediately along with instructions for implementation
  83. </li>
  84. </ul>
  85. </div>
  86. </div>
  87. <div id="mid_center">
  88. <div id="mid_center_content">
  89. <p class="heading_center">&quot;SoftSol's automation tools were accurate and
  90. efficient in migrating all of our business logic to the new application&quot;</p>
  91. <p>&nbsp;&nbsp;--Principle Project Manager, Genentech, Inc</p>
  92. <br />
  93. <p class="heading">Satisfied Modernization Clients</p>
  94. <div id="images">
  95. <table width="100%" cellpadding="2" cellspacing="5">
  96. <tr>
  97. <td>
  98. <img src="images/hbo.png" align="baseline" alt="HBO" width="120" height="100" />
  99. </td>
  100. <td>
  101. <img src="images/mittal.jpg" align="baseline" alt="HBO" width="120" height="100" />
  102. </td>
  103. <td>
  104. <img src="images/california.png" align="baseline" alt="HBO" width="100" height="100" />
  105. </td>
  106. <tr>
  107. <tr>
  108. <td>
  109. <img src="images/calipers.jpg" align="baseline" alt="HBO" width="120" height="100" />
  110. </td>
  111. <td>
  112. <img src="images/infor.png" align="baseline" alt="HBO" width="120" height="62" />
  113. </td>
  114. <td></td>
  115. <tr>
  116. </table>
  117. </div>
  118. </div>
  119. </div>
  120. <div id="mid_right">
  121. <div id="mid_right_content">
  122. <p class="heading">Existing User Login</p>
  123. <form id="login_form" method="POST" name="login_form">
  124. <table align="center">
  125. <tr><td align="left"><label for="email">Email Address:</label></td></tr>
  126. <tr><td align="left"><input type="text" name="email" id="email" class="required email" /></td></tr>
  127. <tr><td align="left"><label for="password">Password:</label></td></tr>
  128. <tr><td align="left">
  129. <input type="password" name="password" id="password" class="required" minlength="6"/></td></tr>
  130. <tr>
  131. <td align="left">
  132. <input type="submit" value=" Login " style="margin-top:5px;color:#085299;font-weight:bold"/>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td align="left">
  137. <a href="forgotPassword.php"> Forgot Password</a>
  138. </td>
  139. </tr>
  140. <tr>
  141. <td align="left" class="error" style="text-wrap:normal">
  142. <?php
  143. if (isset($error)) {
  144. echo '<ul>';
  145. foreach ($error as $alert) {
  146. echo "<li class='warning'>$alert</li>\n";
  147. }
  148. echo '</ul>';
  149. }
  150. ?>
  151. </td>
  152. </tr>
  153. </table>
  154. <input type="hidden" name="MM_login" value="login_form" />
  155. </form>
  156. <hr />
  157. <p class="heading">Questions?</p>
  158. <div id="leftside2">
  159. <div id="iamonline">
  160. <div id="con1">
  161. <a class="thickbox "
  162. href="http://www.softsol.net/contactus.aspx?KeepThis=true&TB_iframe=true&height=450&width=640"
  163. title="Contact Us">Contact Now</a>
  164. </div>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. <?php include("footer.php");?>