Skip to content

Instantly share code, notes, and snippets.

<cfif len(cgi.http_referer) GT 0 AND NOT findnocase(cgi.http_host,cgi.http_referer)>
<cflocation url="AuthorizationRequired.html" addtoken="no">
<cfabort>
</cfif>
<cfif NOT ISDEFINED("form.username") >
<cflocation url="AuthorizationRequired.html" addtoken="no">
<cfabort>
</cfif>
<cfset variable.csh_id = 4>
<cfinclude template="../includes/header.cfm">
<cfinclude template="../includes/chamberNav.cfm">
<cfif isdefined("rightdisplayoutput.recordcount") and rightdisplayoutput.recordcount gt 0>
<div class="span6">
<cfelse>
<div class="span9">
</cfif><cfoutput>#trim(output.webtext)#</cfoutput>
<!---
STATUS: DEVELOPMENT
CREATED: 01/14/2012 MKL
DESC: Master Global Receipt
MODIFIED: 06/29/2013 MKL Added This Comment.
--->
<!--- Contains all the calls to the CSS and JQuery files --->
<cfinclude template="../../includes/header.cfm">
<cfinclude template="../../includes/masterinclude.cfm">
@mhenke
mhenke / awesome_query.cfm
Created November 12, 2013 19:43
awesome query
<CFQUERY DATASOURCE='#DataSource#' USERNAME='#DataUserName#' PASSWORD='#DataPassWord#' NAME="output">
<cfif isdefined("variable.csd_id")>
select h.csm_id, h.csh_id, h.csc_id, h.css_id, h.csd_id, h.PageTitle, h.WebText, h.Keywords, h.RightBarDisplay, h.pageURL
from chambersitedetail h
where h.csd_id = <cfqueryparam cfsqltype="integer" value="#variable.csd_id#"> and h.csm_id = 1
<cfelseif isdefined("variable.css_id")>
select h.csm_id, h.csh_id, h.csc_id, h.css_id, h.PageTitle, h.WebText, h.Keywords, h.RightBarDisplay, h.pageURL
from chambersitesubcategory h
where h.css_id = <cfqueryparam cfsqltype="integer" value="#variable.css_id#"> and h.csm_id = 1
<cfelseif isdefined("variable.csc_id")>
@mhenke
mhenke / awesome.js
Created November 9, 2013 17:45
awesome js function
function populateForEventProspectAdd () {
$('#CM_Name_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_company_name.value);
$('#IM_First_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_first_name.value);
$('#IM_Last_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_last_name.value);
$('#IM_Address1_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_address1.value);
$('#IM_Address2_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_address2.value);
$('#IM_City_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_city.value);
$('#IM_State_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_state.value);
$('#IM_Zip_' + document.FindCorporateM
@mhenke
mhenke / test.cfm
Created October 30, 2013 16:59
testing if any file extension passed via cfinclude gets processed by cfml engine
hi!
<cfinclude template="test2.html">
@mhenke
mhenke / pagename_action.cfm
Created May 29, 2013 00:24
datatables action page
<!--- sets filename as session variable --->
<cfset filename = evaluate("replace(GetFileFromPath(GetCurrentTemplatePath()),'_action.cfm','')") />
<cfset columnOrder = "name,title,phone,description">
<cfset columnCount = "c.name" />
<cfoutput>
<cfsavecontent variable="mycolumnstruct.phone">
ISNULL(RTRIM(N.first),'')+' '+CASE WHEN N.MIDDLE IS NOT NULL THEN ISNULL(RTRIM(N.middle),'')+' ' ELSE ''END +ISNULL(RTRIM(N.last),'')
</cfsavecontent>
@mhenke
mhenke / datatables_processing.cfm
Created May 29, 2013 00:23
updated datatables_processing.cfm
<!---
Script: DataTables server-side script for ColdFusion (cfm) and MySQL
License: GPL v2 or BSD (3-point)
Notes:
tested with DataTables 1.6.1 and jQuery 1.2.6+, Adobe ColdFusion 9 (but should work fine on at least 7+)
to work with pre 1.6 datatables replace both occurances of sSortDir_ with iSortDir_
Get a free developer version of ColdFusion from http://www.adobe.com/products/coldfusion/
or try out the open source railo cfml engine from http://www.getrailo.org/
or try out the open source openbd cfml engine from http://www.openbluedragon.org/
@mhenke
mhenke / orlando.html
Created March 3, 2013 18:57
jQuery Mobile - Part 2 envy band jquery mobile codeschool
<!DOCTYPE html>
<html>
<head>
<title>Envy Band</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
</head>
<body>
@mhenke
mhenke / index.html
Created March 3, 2013 00:54
jQuery Mobile - Part 1 envy band jquery mobile codeschool
<!DOCTYPE html>
<html>
<head>
<title>Envy Band</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
</head>
<body>