<!--- here for reference purposes
<cfqueryparam cfsqltype="cf_sql_integer" value="#select_no#">
<cfqueryparam cfsqltype="cf_sql_integer" value="#church_id#">
<cfqueryparam cfsqltype="cf_sql_integer" value="#gallery_id#">
<cfqueryparam cfsqltype="cf_sql_bigint" value="#ministry_id#">
<cfqueryparam cfsqltype="cf_sql_varchar" value="#new_pass#">
<cfqueryparam cfsqltype="cf_sql_varchar" value="#login_pass#">
<cfqueryparam cfsqltype="cf_sql_varchar" value="#login_name#">
<cfqueryparam cfsqltype="cf_sql_varchar" value="#article_id#">
<cfqueryparam cfsqltype="cf_sql_bigint" value="#calendar_id#">
<cfqueryparam cfsqltype="cf_sql_varchar" value="#pagename#">
<cfqueryparam cfsqltype="cf_sql_integer" value="#church_id#">
<cfqueryparam cfsqltype="cf_sql_bigint" value="#user#">
<cfqueryparam cfsqltype="cf_sql_bigint" value="#session.user_id#">
<cfqueryparam cfsqltype="cf_sql_bigint" value="#thread_id#">
<cfqueryparam cfsqltype="cf_sql_bigint" value="#user_id#">
<cfqueryparam cfsqltype="cf_sql_varchar" value="#namesearch#">
<cfqueryparam cfsqltype="cf_sql_varchar" value="#eventtype#">
<cfqueryparam cfsqltype="CF_SQL_TIMESTAMP" value="#firstdate#">
<cfqueryparam cfsqltype="cf_sql_bigint" value="#article_id#">
<cfqueryparam cfsqltype="cf_sql_integer" value="#ministry_id#">
<cfqueryparam cfsqltype="cf_sql_integer" value="#gallery_id#">
--->
<cfparam name="get_bio" default="yes">
<cfparam name="spanclass" default="text_medium">
<cfparam name="article_id" default="not_present">
<!---
<cfoutput>
DEBUG BEGIN:
my article_id = "#article_id#"<br />
my ministry_id = "#ministry_id#"<br />
END DEBUG<br />
</cfoutput>
--->
<!---
<cfquery datasource="DSN_Vineyard" name="ministry_update">
SELECT article_date as update_date, article_title as update_title, created_by as ministry_leader,
ministry_desc, article_id, mission_statement, author_name,
(SELECT rtrim(first_name) + ' ' + rtrim(last_name) from users where user_id = created_by) as u_by,
file_content1, file_content2, file_content3
FROM articles2, ministries
WHERE articles2.ministrY_id = ministries.ministry_id
AND ministries.ministry_id = #ministry_id#
AND articles2.article_type = 'M'
<cfif isDefined("article_id") and val(article_id)>
AND article_id = #val(article_id)#
<cfelse> AND article_id = (SELECT max(article_id) FROM articles2 x WHERE article_type = 'M'
AND x.ministry_id = ministries.ministry_id AND article_date = (SELECT max(article_date)
FROM articles2 y WHERE article_type = 'M' AND Y.ministry_id = ministries.ministry_id))
</cfif>
</cfquery>
<cfif ministry_update.recordcount gt 0>
<cfquery datasource="DSN_Vineyard" name="article_sections">
SELECT * FROM article_section WHERE article_id = #ministry_update.article_id#
</cfquery>
</cfif>
--->
<!--- new query --->
<!--- articles2 are now text_modalities & article_section is now text_modules --->
<cfquery datasource="DSN_Vineyard" name="ministry_update">
SELECT article_date as update_date, article_title as update_title, created_by as ministry_leader,
ministry_desc, article_id, mission_statement, author_name,
(SELECT rtrim(first_name) + ' ' + rtrim(last_name) from users where user_id = created_by) as u_by,
file_content1, file_content2, file_content3
FROM text_modalities, ministries
WHERE text_modalities.ministrY_id = ministries.ministry_id
AND ministries.ministry_id = #ministry_id#
AND text_modalities.article_type = 'M'
<cfif isDefined("article_id") and val(article_id)>
AND article_id = #val(article_id)#
<cfelse> AND article_id = (SELECT max(article_id) FROM text_modalities x WHERE article_type = 'M'
AND x.ministry_id = ministries.ministry_id AND article_date = (SELECT max(article_date)
FROM text_modalities y WHERE article_type = 'M' AND Y.ministry_id = ministries.ministry_id))
</cfif>
</cfquery>
<cfif ministry_update.recordcount gt 0>
<cfquery datasource="DSN_Vineyard" name="article_sections">
SELECT * FROM text_modules WHERE article_id = #ministry_update.article_id#
</cfquery>
</cfif>
<cfoutput> mr #ministry_update.article_id# xx <cfif (get_bio is "yes") and (ministry_update.recordcount gt 0)>
<!-- QUERY FOR THE AUTHOR'S PICTURE --> <CFQUERY datasource="DSN_Vineyard" name="biopic">
SELECT * from biographies where user_id = #ministry_update.ministry_leader# </cfquery>
<cfloop query="biopic"> <cfif photo_file is not ""> <img alt="" src="images/#photo_file#" width=40 border="2" align="left" hspace="5">
</cfif> </cfloop> </cfif> <span class="caption"> #ministry_update.update_title#
</span><br> <Cfif trim(ministry_update.file_content1) is not ""> <span class="text_small">
<a href="#ministry_update.file_content1#" target="_blank"> <cfif (trim(ministry_update.file_content1) contains ".wav") or (trim(ministry_update.file_content1) contains ".avi") or (trim(ministry_update.file_content1) contains ".wmv") or (trim(ministry_update.file_content1) contains ".wma") or (trim(ministry_update.file_content1) contains ".cda") or (trim(ministry_update.file_content1) contains ".asx") or (trim(ministry_update.file_content1) contains ".mp3") or (trim(ministry_update.file_content1) contains ".asx") or (trim(ministry_update.file_content1) contains ".asf") or (trim(ministry_update.file_content1) contains ".mpeg") or (trim(ministry_update.file_content1) contains ".mpg") or (trim(ministry_update.file_content3) contains ".mov") or (trim(ministry_update.file_content3) contains ".swf")>
<img src="images/listen.gif" border="0"> listen <cfelse> <img src="images/document.gif" border="0">
attachment </cfif> </a> </span> </cfif> <Cfif trim(ministry_update.file_content2) is not "">
<span class="text_small"> <a href="#ministry_update.file_content2#" target="_blank">
<cfif (trim(ministry_update.file_content2) contains ".wav") or (trim(ministry_update.file_content2) contains ".avi") or (trim(ministry_update.file_content2) contains ".wmv") or (trim(ministry_update.file_content2) contains ".wma") or (trim(ministry_update.file_content2) contains ".cda") or (trim(ministry_update.file_content2) contains ".asx") or (trim(ministry_update.file_content2) contains ".mp3") or (trim(ministry_update.file_content2) contains ".asx") or (trim(ministry_update.file_content2) contains ".asf") or (trim(ministry_update.file_content2) contains ".mpeg") or (trim(ministry_update.file_content2) contains ".mpg") or (trim(ministry_update.file_content3) contains ".mov") or (trim(ministry_update.file_content3) contains ".swf")>
<img src="images/listen.gif" border="0"> - listen <cfelse> <img src="images/document.gif" border="0">
attachment </cfif> </a> </span> </cfif> <Cfif trim(ministry_update.file_content3) is not "">
<span class="text_small"> <a href="#ministry_update.file_content3#" target="_blank">
<cfif (trim(ministry_update.file_content3) contains ".wav") or (trim(ministry_update.file_content3) contains ".avi") or (trim(ministry_update.file_content3) contains ".wmv") or (trim(ministry_update.file_content3) contains ".wma") or (trim(ministry_update.file_content3) contains ".cda") or (trim(ministry_update.file_content3) contains ".asx") or (trim(ministry_update.file_content3) contains ".mp3") or (trim(ministry_update.file_content3) contains ".asx") or (trim(ministry_update.file_content3) contains ".asf") or (trim(ministry_update.file_content3) contains ".mpeg") or (trim(ministry_update.file_content3) contains ".mpg") or (trim(ministry_update.file_content3) contains ".mov") or (trim(ministry_update.file_content3) contains ".swf")>
<img src="images/listen.gif" border="0"> - listen <cfelse> <img src="images/document.gif" border="0">
attachment </cfif> </a> </span> </cfif> <cfif (trim(ministry_update.file_content1) is not "") or (trim(ministry_update.file_content2) is not "") or (trim(ministry_update.file_content3) is not "")>
<br><br> </cfif> <cfif ministry_update.recordcount gt 0> <cfloop query="article_sections">
<cfif trim(picture) is not ""><img src="http://www.#fromsite#.#ext#/images/#picture#"
<cfif (picwidth is not "") and (picwidth is not 0)> width="#picwidth#" </cfif>
<cfif (picheight is not "") and (picheight is not 0)> height="#picheight#" </cfif>
<cfif picborder is ""> border="0" <cfelse> border="#picborder#" </cfif>
<cfif picspace is ""> vspace="0" hspace="0" <cfelse> vspace="#picspace#" hspace="#picspace#" </cfif>
<cfif picjustify is not ""> align="#picjustify#" </cfif>
> </cfif> <cfif trim(heading) is not ""> <span class="caption">
#heading# </span> <br> </cfif> <span class="#spanclass#"> #ParagraphFormat(section_content)#
</span> <br><Br> </cfloop> </cfif> <cfif ministry_update.recordcount eq 0> <p><span class="text_medium"><i>No
information is currently available.</i></span><br><br></p></cfif> </cfoutput>
|