Skip to content

Commit

Permalink
Added new function to get the template framework
Browse files Browse the repository at this point in the history
git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/branches/1.9@482 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
pgogy committed Nov 12, 2012
1 parent d33fe5f commit 3434d2f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions website_code/php/template_library.php
Expand Up @@ -24,3 +24,18 @@ function get_maximum_template_number(){

}

function get_template_type($template_id){

global $xerte_toolkits_site;

$row = db_query_one("SELECT template_framework as frame, {$xerte_toolkits_site->database_table_prefix}originaltemplatesdetails.template_name as tname FROM {$xerte_toolkits_site->database_table_prefix}templatedetails, {$xerte_toolkits_site->database_table_prefix}originaltemplatesdetails WHERE {$xerte_toolkits_site->database_table_prefix}templatedetails.template_type_id = {$xerte_toolkits_site->database_table_prefix}originaltemplatesdetails.template_type_id and template_id = ?", array($template_id));

if($row == false) {
receive_message($_SESSION['toolkits_logon_username'], "ADMIN", "CRITICAL", "Failed to get template type", "Failed to get the template type");
}
else {
return $row['frame'] . "_" . $row['tname'];
}

}

0 comments on commit 3434d2f

Please sign in to comment.