PageRenderTime 37ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/AC/Admin/SysMn/m018e0328.asp

http://github.com/boss2009/ASP-site
ASP | 96 lines | 94 code | 2 blank | 0 comment | 7 complexity | b23bdf3909eb1468e3c86bdb69c320fd MD5 | raw file
  1. <%@language="JAVASCRIPT"%>
  2. <!--#include file="../../inc/ASPUtility.inc" -->
  3. <!--#include file="../../Connections/cnnASP02.asp" -->
  4. <!--#include file="../../inc/ASPCheckAdminLogin.inc" -->
  5. <%
  6. var MM_editAction = Request.ServerVariables("URL");
  7. if (Request.QueryString) {
  8. MM_editAction += "?" + Request.QueryString;
  9. }
  10. if (String(Request("MM_update")) == "true") {
  11. var Description = String(Request.Form("Description")).replace(/'/g, "''");
  12. var IsActive = ((Request.Form("IsActive")=="1") ? "1":"0");
  13. var rsFundingSource = Server.CreateObject("ADODB.Recordset");
  14. rsFundingSource.ActiveConnection = MM_cnnASP02_STRING;
  15. rsFundingSource.Source = "{call dbo.cp_Funding_Source3("+ Request.Form("MM_recordId") + ",'" + Description + "'," + IsActive + ",0,'E',0)}";
  16. rsFundingSource.CursorType = 0;
  17. rsFundingSource.CursorLocation = 2;
  18. rsFundingSource.LockType = 3;
  19. rsFundingSource.Open();
  20. Response.Redirect("m018q0328.asp");
  21. }
  22. var rsFundingSource = Server.CreateObject("ADODB.Recordset");
  23. rsFundingSource.ActiveConnection = MM_cnnASP02_STRING;
  24. rsFundingSource.Source = "{call dbo.cp_funding_source3("+Request.QueryString("insFunding_source_id")+",'',0,1,'Q',0)}";
  25. rsFundingSource.CursorType = 0;
  26. rsFundingSource.CursorLocation = 2;
  27. rsFundingSource.LockType = 3;
  28. rsFundingSource.Open();
  29. %>
  30. <html>
  31. <head>
  32. <title>Update Funding Source Lookup</title>
  33. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  34. <link rel="stylesheet" href="../../css/MyStyle.css" type="text/css">
  35. <script language="Javascript" src="../../js/MyFunctions.js"></script>
  36. <script for="document" event="onkeyup()" language="JavaScript">
  37. if (window.event.ctrlKey) {
  38. switch (window.event.keyCode) {
  39. case 83 :
  40. //alert("S");
  41. Save();
  42. break;
  43. case 85:
  44. //alert("U");
  45. document.frm0328.reset();
  46. break;
  47. case 76 :
  48. //alert("L");
  49. history.back();
  50. break;
  51. }
  52. }
  53. </script>
  54. <script language="Javascript">
  55. function Save(){
  56. if (Trim(document.frm0328.Description.value)==""){
  57. alert("Enter Description.");
  58. document.frm0328.Description.focus();
  59. return ;
  60. }
  61. document.frm0328.submit();
  62. }
  63. </script>
  64. </head>
  65. <body onLoad="document.frm0328.Description.focus();">
  66. <form name="frm0328" method="POST" action="<%=MM_editAction%>">
  67. <h5>Update Funding Source Lookup</h5>
  68. <hr>
  69. <table cellpadding="1" cellspacing="1">
  70. <tr>
  71. <td>Description:</td>
  72. <td><input type="text" name="Description" value="<%=(rsFundingSource.Fields.Item("chvfunding_source_name").Value)%>" tabindex="1" accesskey="F"></td>
  73. </tr>
  74. <tr>
  75. <td>Is Active:</td>
  76. <td><input type="checkbox" name="IsActive" <%=((rsFundingSource.Fields.Item("bitactive").Value == 1)?"CHECKED":"")%> value="1" tabindex="2" accesskey="L" class="chkstyle"></td>
  77. </tr>
  78. </table>
  79. <hr>
  80. <table cellpadding="1" cellspacing="1">
  81. <tr>
  82. <td><input type="button" value="Save" tabindex="3" onClick="Save();" class="btnstyle"></td>
  83. <td><input type="reset" value="Undo Changes" tabindex="4" class="btnstyle"></td>
  84. <td><input type="button" value="Close" tabindex="5" onClick="history.back()" class="btnstyle"></td>
  85. </tr>
  86. </table>
  87. <input type="hidden" name="MM_update" value="true">
  88. <input type="hidden" name="MM_recordId" value="<%= rsFundingSource.Fields.Item("insFunding_source_id").Value %>">
  89. </form>
  90. </body>
  91. </html>
  92. <%
  93. rsFundingSource.Close();
  94. %>