Subdomain Posts
ColdFusion | 8 hours ago
Java | 9 hours ago
Java | 9 hours ago
ColdFusion | 13 hours ago
ColdFusion | 16 hours ago
ColdFusion | 22 hours ago
ColdFusion | 1 day ago
ColdFusion | 3 days ago
ColdFusion | 6 days ago
ColdFusion | 8 days ago
Recent Posts
None | 22 sec ago
None | 30 sec ago
None | 36 sec ago
Java | 1 min ago
MySQL | 1 min ago
Linden Scripting | 1 min ago
Diff | 1 min ago
PHP | 2 min ago
HTML | 2 min ago
PHP | 3 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Scott Stewart on the 17th of Aug 2009 05:02:08 PM Download | Raw | Embed | Report
  1. <script type="text/javascript">
  2.         $("#IC_SQL_SUBMIT").click(function(){
  3.                 var SQLDSN = $("#SQLDSN").val();
  4.                 var IC_SQL = $("#IC_SQL").val();
  5.                 var IC_SQL_TT = $("#IC_SQL_TT").val();
  6.                 var IC_SQL_NAME = $("#IC_SQL_NAME").val();
  7.             var dataString={IC_SQL:IC_SQL,IC_SQL_TT:IC_SQL_TT,SQLDSN:SQLDSN,IC_SQL_NAME:IC_SQL_NAME};
  8.                    
  9.                 $.ajax({  
  10.                 type:'POST',  
  11.                 url: 'actions/act_adminDAO.cfm?a=si',  
  12.                 data: dataString,
  13.                 success: function() {  
  14.                         $("#IC_GenAdmin").load("display/dsp_SQLEntry.cfm?l=y");
  15.                 },
  16.                 error: function() {
  17.                     alert(dataString);
  18.                 }
  19.                        
  20.                        
  21.              });  
  22.                 return false;
  23.         });
  24.        
  25.         $(".IC_SQL_EDIT").click(function() {
  26.                 $("#dialog").load($(this).attr('rel'), function() {
  27.                         $(this)
  28.                         .dialog('destroy')
  29.                         .dialog({
  30.                         title: 'Edit SQL Statement',
  31.                                         modal: 'true',
  32.                                         position: 'top',
  33.                         open: function() { $(this).hijack()},
  34.                                         buttons: {
  35.                                         Go: function() {
  36.                                                         var SQL_ID = $("input#SQL_ID").val();
  37.                                         var SQLDSN = $("#SQLDSN").val();
  38.                                                         var IC_EDIT_SQL = $("input#IC_EDIT_SQL").val();
  39.                                                         var IC_SQL_TT = $("#IC_SQL_TT").val();
  40.                                                         var IC_EDIT_SQL_NAME = $("input#IC_EDIT_SQL_NAME").val();
  41.                                                         var dataString={SQL_ID:SQL_ID,
  42.                                                                                         SQLDSN:SQLDSN,
  43.                                                                                         IC_EDIT_SQL_NAME:IC_EDIT_SQL_NAME,
  44.                                                                                         IC_EDIT_SQL:IC_EDIT_SQL,
  45.                                                                                         IC_SQL_TT:IC_SQL_TT
  46.                                                                                         };
  47.                                                        
  48.                                                 $.ajax({  
  49.                                                 type:'POST',  
  50.                                                 url: 'actions/act_AdminDAO.cfm?a=se',  
  51.                                                 data: dataString,  
  52.                                                                         cache: false,
  53.                                                 success: function() {  
  54.                                                                                 $("#IC_GenAdmin").load("display/dsp_SQLEntry.cfm");
  55.                                                                                
  56.                                                 },
  57.                                                 error: function() {
  58.                                                 alert(dataString);
  59.                                                 }
  60.                                                 })
  61.                                                                 $(this).dialog("close");
  62.                                                         },
  63.                                 Cancel: function(){$(this).dialog('close')}
  64.                                 }
  65.                                  })
  66.                            });
  67.                         });
  68.                        
  69.         $(".IC_SQL_DELETE").click(function() {
  70.                 $("#dialog").load($(this).attr('rel'), function() {
  71.                         $(this)
  72.                         .dialog('destroy')
  73.                         .dialog({
  74.                         title: 'Delete SQL Statement',
  75.                                         modal: 'true',
  76.                                         position: 'top',
  77.                         open: function() { $(this).hijack()},
  78.                                         buttons: {
  79.                                         Go: function() {
  80.                                                 var sql_id = $("input#sql_id").val();
  81.                                                 var dataString={sql_id:sql_id};
  82.                                                 $.ajax({  
  83.                                                 type:'POST',  
  84.                                                 url: 'actions/act_AdminDAO.cfm?a=sd',  
  85.                                                 data: dataString,
  86.                                                                         cache: false,  
  87.                                                 success: function() {  
  88.                                                 $("#IC_GenAdmin").load("display/dsp_SQLEntry.cfm");
  89.                                                 },
  90.                                                 error: function() {
  91.                                                 alert(dataString);
  92.                                                 }
  93.                                                 })  
  94.                                                         },
  95.                                 close: function(){$(this).dialog('close')}
  96.                                 }
  97.                                  })
  98.                            });
  99.                         });
  100.  
  101. <cfinclude template="../includes/_adminLoader.cfm">
  102. <div id="dialog" style="display:none"></div>
  103. <cfif IsDefined("url.l") and url.l is "y">
  104.         <div id="IC_SQL_Confirm"><span style="color:red;">SQL Statement Saved</span></div>
  105. </cfif>
  106.         <tr>
  107.                 <td>
  108.                         <form name="IC_postSQL" id="IC_postSQL" method="post">
  109.                                 <fieldset id="postSQL" name="postSQL" method="post" width="25%">
  110.                                         <legend>Autocomplete SQL</legend>
  111.                                         <label for="SQLDSN">Select A Datasource</label><br/>
  112.                                         <select id="SQLDSN" name="SQLDSN">
  113.                                                 <cfloop index="i" array="#cgsDSNList#">
  114.                                                         <option value="<cfoutput>#i#</cfoutput>"><cfoutput>#i#</cfoutput></option>
  115.                                                 </cfloop>
  116.                                         </select>
  117.                                         <p/>
  118.                                         <label for="IC_SQL_NAME">Enter The Statement Name</label><br/>
  119.                                         <input type="text" id="IC_SQL_NAME" name="IC_SQL_NAME">
  120.                                         <p/>
  121.                                         <label for="IC_SQL">Enter the SQL Statement</label>
  122.                                         <br/>
  123.                                         <textarea name="IC_SQL" id="IC_SQL" cols="45" rows="10"></textarea>
  124.                                         <p/>
  125.                                         <label for="IC_SQL_TT">Select A Template Type</label>
  126.                                         <select id="IC_SQL_TT" name="SQL_TT">
  127.                                                 <cfoutput query="TT_select">
  128.                                                         <option value="#PK_ID#">#template_type#</option>
  129.                                                 </cfoutput>
  130.                                         </select>
  131.                                         <p/>
  132.                                         <button name="IC_SQL_SUBMIT" id="IC_SQL_SUBMIT">Post SQL Statement</button>
  133.                                 </fieldset>
  134.                         </form>
  135.                 </td>
  136.                 <td>
  137.                         <fieldset id="IC_postSQLDisp" name="IC_postSQLDisp" method="post">
  138.                                 <legend>SQL Statements</legend>
  139.                                         <table id="IC_SQL_DISP" name="IC_SQL_DISP" border="0">
  140.                                                 <cfoutput query="SQLSelect">
  141.                                                         <tr bgcolor="silver">
  142.                                                                 <td>#statement_name#</td>
  143.                                                                 <td><button id="IC_SQL_EDIT_BUT" rel="display/dsp_editSQLEntry.cfm?a=se&sql_id=#SQL_PK_ID#"" name="IC_SQL_EDIT_BUT" class="IC_SQL_EDIT">Edit</button></td>
  144.                                                                 <td><button id="IC_SQL_DELETE_BUT" rel="display/dsp_deleteSQLEntry.cfm?a=sd&sql_id=#SQL_PK_ID#" name="IC_SQL_DELETE_BUT" class="IC_SQL_DELETE">Delete</button></td>
  145.                                                         </tr>
  146.                                                 </cfoutput>
  147.                                         </table>
  148.                         </fieldset>
  149.                 </td>
  150.         </tr>
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: