From 6e661ee3c1a5d9020c6332840be4fdc5ac50ca02 Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Wed, 19 Oct 2011 11:54:56 +0000 Subject: [PATCH] reindent; replace short open tag which should fix issues if short open tags are turned off (i.e. new 5.3 versions) git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@150 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641 --- website_code/php/management/templates.php | 77 +++++++++++------------ 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/website_code/php/management/templates.php b/website_code/php/management/templates.php index 60201b77ad..cc6523580d 100644 --- a/website_code/php/management/templates.php +++ b/website_code/php/management/templates.php @@ -1,73 +1,70 @@ -database_table_prefix . "originaltemplatesdetails"; + $database_id = database_connect("templates list connected","template list failed"); - $query_response = mysql_query($query); + $query="select * from " . $xerte_toolkits_site->database_table_prefix . "originaltemplatesdetails"; - echo "

Upload a template


"; + $query_response = mysql_query($query); - echo "

Manage Existing templates

"; + echo "

Upload a template


"; - while($row = mysql_fetch_array($query_response)){ + echo "

Manage Existing templates

"; - echo "

" . $row['template_name'] . " View

"; - echo "

This template is of type " . $row['template_framework'] . "

"; + while($row = mysql_fetch_array($query_response)){ - if($row['template_framework']=="xerte"){ + echo "

" . $row['template_name'] . " View

"; + echo "

This template is of type " . $row['template_framework'] . "

"; - $template_check = file_get_contents($xerte_toolkits_site->root_file_path . $xerte_toolkits_site->module_path . "xerte/parent_templates/" . $row['template_name'] . "/" . $row['template_name'] . ".rlt"); + if($row['template_framework']=="xerte"){ - $folder = explode('"',substr($template_check,strpos($template_check,"targetFolder"),strpos($template_check,"version")-strpos($template_check,"targetFolder"))); + $template_check = file_get_contents($xerte_toolkits_site->root_file_path . $xerte_toolkits_site->module_path . "xerte/parent_templates/" . $row['template_name'] . "/" . $row['template_name'] . ".rlt"); - $start_point = strpos($template_check,"version"); + $folder = explode('"',substr($template_check,strpos($template_check,"targetFolder"),strpos($template_check,"version")-strpos($template_check,"targetFolder"))); - $version = explode('"',substr($template_check,$start_point,strpos($template_check," ",$start_point)-$start_point)); + $start_point = strpos($template_check,"version"); - echo "

This template is version number " . $version[1] . "

"; + $version = explode('"',substr($template_check,$start_point,strpos($template_check," ",$start_point)-$start_point)); - } + echo "

This template is version number " . $version[1] . "

"; - echo "

The description for this template is

"; - echo "

This template was uploaded on " . $row['date_uploaded'] . "

"; - echo "

The template has the following name for users

"; - echo "

The template has the following example (0 means no example)

"; - echo "

The following users can access this template (* means everyone)

"; - echo "

The date uploaded for this template is (altering this affects the order they are displayed / most recent first ) -

"; - echo "

This template is currently set as "; + } - echo "

"; + echo "

This template was uploaded on " . $row['date_uploaded'] . "

"; + echo "

The template has the following name for users

"; + echo "

The template has the following example (0 means no example)

"; + echo "

The following users can access this template (* means everyone)

"; + echo "

The date uploaded for this template is (altering this affects the order they are displayed / most recent first ) -

"; + echo "

This template is currently set as "; - if($row['active']=="0"){ + echo "

"; + if($row['active']=="0"){ - }else{ + echo " SelectedItem=\"true\" name=\"type\" id=\"" . $row['template_type_id'] . "active\" >

"; - echo " SelectedItem=\"true\" name=\"type\" id=\"" . $row['template_type_id'] . "active\" >

"; + }else{ - } + echo " SelectedItem=\"true\" name=\"type\" id=\"" . $row['template_type_id'] . "active\" >

"; - echo "

Upload a new version of this template


"; + } - echo "
"; + echo "

Upload a new version of this template


"; + + echo "
"; + + } - } - }else{ - echo "the feature is for administrators only"; + echo "the feature is for administrators only"; } -?> \ No newline at end of file +?>