Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reindent; replace short open tag which should fix issues if short ope…
…n 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
- Loading branch information
Dave Goodwin
committed
Oct 19, 2011
1 parent
a83ba77
commit 6e661ee
Showing
1 changed file
with
37 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,70 @@ | ||
<? | ||
<?php | ||
|
||
require("../../../config.php"); | ||
require("../../../session.php"); | ||
require_once("../../../config.php"); | ||
|
||
require("../database_library.php"); | ||
require("../user_library.php"); | ||
require("../error_library.php"); | ||
|
||
if(is_user_admin()){ | ||
|
||
$database_id = database_connect("templates list connected","template list failed"); | ||
|
||
$query="select * from " . $xerte_toolkits_site->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 "<p style=\"margin:5px\">Upload a template<br><form style=\"margin:5px\" method=\"post\" enctype=\"multipart/form-data\" id=\"importpopup\" name=\"importform\" target=\"upload_iframe\" action=\"website_code/php/import/import_template.php\" onsubmit=\"javascript:iframe_check_initialise();\"><input name=\"filenameuploaded\" type=\"file\" /><br /><input type=\"submit\" name=\"submitBtn\" value=\"Upload\" onsubmit=\"javascript:iframe_check_initialise()\" /></form></p>"; | ||
$query_response = mysql_query($query); | ||
|
||
echo "<p style=\"margin:20px 0 0 5px\">Manage Existing templates</p>"; | ||
echo "<p style=\"margin:5px\">Upload a template<br><form style=\"margin:5px\" method=\"post\" enctype=\"multipart/form-data\" id=\"importpopup\" name=\"importform\" target=\"upload_iframe\" action=\"website_code/php/import/import_template.php\" onsubmit=\"javascript:iframe_check_initialise();\"><input name=\"filenameuploaded\" type=\"file\" /><br /><input type=\"submit\" name=\"submitBtn\" value=\"Upload\" onsubmit=\"javascript:iframe_check_initialise()\" /></form></p>"; | ||
|
||
while($row = mysql_fetch_array($query_response)){ | ||
echo "<p style=\"margin:20px 0 0 5px\">Manage Existing templates</p>"; | ||
|
||
echo "<div class=\"template\" id=\"" . $row['template_name'] . "\" savevalue=\"" . $row['template_type_id'] . "\"><p>" . $row['template_name'] . " <a href=\"javascript:templates_display('" . $row['template_name'] . "')\">View</a></p></div><div class=\"template_details\" id=\"" . $row['template_name'] . "_child\">"; | ||
echo "<p>This template is of type " . $row['template_framework'] . "</p>"; | ||
while($row = mysql_fetch_array($query_response)){ | ||
|
||
if($row['template_framework']=="xerte"){ | ||
echo "<div class=\"template\" id=\"" . $row['template_name'] . "\" savevalue=\"" . $row['template_type_id'] . "\"><p>" . $row['template_name'] . " <a href=\"javascript:templates_display('" . $row['template_name'] . "')\">View</a></p></div><div class=\"template_details\" id=\"" . $row['template_name'] . "_child\">"; | ||
echo "<p>This template is of type " . $row['template_framework'] . "</p>"; | ||
|
||
$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 "<p>This template is version number " . $version[1] . "</p>"; | ||
$version = explode('"',substr($template_check,$start_point,strpos($template_check," ",$start_point)-$start_point)); | ||
|
||
} | ||
echo "<p>This template is version number " . $version[1] . "</p>"; | ||
|
||
echo "<p>The description for this template is <form><textarea id=\"" . $row['template_type_id'] . "desc\">" . $row['description'] . "</textarea></form></p>"; | ||
echo "<p>This template was uploaded on " . $row['date_uploaded'] . "</p>"; | ||
echo "<p>The template has the following name for users<form><textarea id=\"" . $row['template_type_id'] . "display\">" . $row['display_name'] . "</textarea></form></p>"; | ||
echo "<p>The template has the following example (0 means no example)<form><textarea id=\"" . $row['template_type_id'] . "example\">" .$row['display_id'] . "</textarea></form></p>"; | ||
echo "<p>The following users can access this template (* means everyone)<form><textarea id=\"" . $row['template_type_id'] . "access\">" .$row['access_rights'] . "</textarea></form></p>"; | ||
echo "<p>The date uploaded for this template is (altering this affects the order they are displayed / most recent first ) - <form><textarea id=\"" . $row['template_type_id'] . "_date_uploaded\">" . $row['date_uploaded'] . "</textarea></form></p>"; | ||
echo "<p>This template is currently set as "; | ||
} | ||
|
||
echo "<select "; | ||
echo "<p>The description for this template is <form><textarea id=\"" . $row['template_type_id'] . "desc\">" . $row['description'] . "</textarea></form></p>"; | ||
echo "<p>This template was uploaded on " . $row['date_uploaded'] . "</p>"; | ||
echo "<p>The template has the following name for users<form><textarea id=\"" . $row['template_type_id'] . "display\">" . $row['display_name'] . "</textarea></form></p>"; | ||
echo "<p>The template has the following example (0 means no example)<form><textarea id=\"" . $row['template_type_id'] . "example\">" .$row['display_id'] . "</textarea></form></p>"; | ||
echo "<p>The following users can access this template (* means everyone)<form><textarea id=\"" . $row['template_type_id'] . "access\">" .$row['access_rights'] . "</textarea></form></p>"; | ||
echo "<p>The date uploaded for this template is (altering this affects the order they are displayed / most recent first ) - <form><textarea id=\"" . $row['template_type_id'] . "_date_uploaded\">" . $row['date_uploaded'] . "</textarea></form></p>"; | ||
echo "<p>This template is currently set as "; | ||
|
||
if($row['active']=="0"){ | ||
echo "<select "; | ||
|
||
echo " SelectedItem=\"true\" name=\"type\" id=\"" . $row['template_type_id'] . "active\" ><option value=\"true\">Active</option><option value=\"false\" selected=\"selected\">Unactive</option></select></p>"; | ||
if($row['active']=="0"){ | ||
|
||
}else{ | ||
echo " SelectedItem=\"true\" name=\"type\" id=\"" . $row['template_type_id'] . "active\" ><option value=\"true\">Active</option><option value=\"false\" selected=\"selected\">Unactive</option></select></p>"; | ||
|
||
echo " SelectedItem=\"true\" name=\"type\" id=\"" . $row['template_type_id'] . "active\" ><option value=\"true\" selected=\"selected\">Active</option><option value=\"false\">Unactive</option></select></p>"; | ||
}else{ | ||
|
||
} | ||
echo " SelectedItem=\"true\" name=\"type\" id=\"" . $row['template_type_id'] . "active\" ><option value=\"true\" selected=\"selected\">Active</option><option value=\"false\">Unactive</option></select></p>"; | ||
|
||
echo "<p>Upload a new version of this template<br><form method=\"post\" enctype=\"multipart/form-data\" id=\"importpopup\" name=\"importform\" target=\"upload_iframe\" action=\"website_code/php/import/import_template.php\" onsubmit=\"javascript:iframe_check_initialise();\"><input name=\"filenameuploaded\" type=\"file\" /><br /><input type=\"hidden\" name=\"replace\" value=\"" . $row['template_type_id'] . "\" /><input type=\"hidden\" name=\"folder\" value=\"" . $row['template_name'] . "\" /><input type=\"hidden\" name=\"version\" value=\"" . $version[1] . "\" /><input type=\"submit\" name=\"submitBtn\" value=\"Upload\" onsubmit=\"javascript:iframe_check_initialise()\" /></form></p>"; | ||
} | ||
|
||
echo "</div>"; | ||
echo "<p>Upload a new version of this template<br><form method=\"post\" enctype=\"multipart/form-data\" id=\"importpopup\" name=\"importform\" target=\"upload_iframe\" action=\"website_code/php/import/import_template.php\" onsubmit=\"javascript:iframe_check_initialise();\"><input name=\"filenameuploaded\" type=\"file\" /><br /><input type=\"hidden\" name=\"replace\" value=\"" . $row['template_type_id'] . "\" /><input type=\"hidden\" name=\"folder\" value=\"" . $row['template_name'] . "\" /><input type=\"hidden\" name=\"version\" value=\"" . $version[1] . "\" /><input type=\"submit\" name=\"submitBtn\" value=\"Upload\" onsubmit=\"javascript:iframe_check_initialise()\" /></form></p>"; | ||
|
||
echo "</div>"; | ||
|
||
} | ||
|
||
} | ||
|
||
}else{ | ||
|
||
echo "the feature is for administrators only"; | ||
echo "the feature is for administrators only"; | ||
|
||
} | ||
|
||
?> | ||
?> |