Skip to content

Commit

Permalink
Modularised
Browse files Browse the repository at this point in the history
git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@538 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
pgogy committed Nov 22, 2012
1 parent e60f6fd commit c21ab18
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
26 changes: 19 additions & 7 deletions website_code/php/properties/export_template.php
Expand Up @@ -12,7 +12,6 @@
require_once("../../../config.php");
_load_language_file("/website_code/php/properties/export_template.inc");


include "../template_status.php";

include "../url_library.php";
Expand All @@ -31,12 +30,25 @@

echo "<p class=\"header\"><span>" . EXPORT_TITLE . "</span></p>";

echo "<p>" . EXPORT_DESCRIPTION . "</p>";
echo "<ol type='1'>";
echo "<li>" . EXPORT_ZIP . "<ul><li><a href='" . $xerte_toolkits_site->site_url . url_return("export" , $_POST['template_id']) . "'>" . EXPORT_ZIP_LINK . "</a></li></li><br />";
echo "<li>" . EXPORT_SCORM . "<ol type='a'><li><a href='" . $xerte_toolkits_site->site_url . url_return("scorm_rich" , $_POST['template_id']) . "'>" . EXPORT_SCORM_12_LINK . "</a></li><br/><li><a href='" . $xerte_toolkits_site->site_url . url_return("scorm2004" , $_POST['template_id']) . "'>" . EXPORT_SCORM_2004_LINK . "</a></li><br /></ol></li>";
echo "<li>" . EXPORT_ZIP_ARCHIVE . "<ul><li><a href='" . $xerte_toolkits_site->site_url . url_return("export_full" , $_POST['template_id']) . "'>" . EXPORT_ZIP_ARCHIVE_LINK . "</a></li><br /></li>";
echo "</ol>";
$query_for_play_content_strip = str_replace("\" . \$xerte_toolkits_site->database_table_prefix . \"", $xerte_toolkits_site->database_table_prefix, $xerte_toolkits_site->play_edit_preview_query);

$safe_template_id = htmlentities($_POST['template_id']);

$query_for_play_content = str_replace("TEMPLATE_ID_TO_REPLACE", $safe_template_id, $query_for_play_content_strip);

$query_for_play_content_response = mysql_query($query_for_play_content);

$row_play = mysql_fetch_array($query_for_play_content_response);

if(file_exists($xerte_toolkits_site->root_file_path . "modules/" . $row_play['template_framework'] . "/export_page.php")){

require_once($xerte_toolkits_site->root_file_path . "modules/" . $row_play['template_framework'] . "/export_page.php");

}else{

echo "<p>" . EXPORT_NOT_AVAILABLE . "</p>";

}

}else{

Expand Down
1 change: 1 addition & 0 deletions website_code/php/properties/publish.php
Expand Up @@ -87,6 +87,7 @@

echo "<p>" . PUBLISH_WEB_ADDRESS . " <a target='_blank' href='" . $xerte_toolkits_site->site_url . url_return("play",mysql_real_escape_string($_POST['template_id'])) . "'>" . $xerte_toolkits_site->site_url . url_return("play",mysql_real_escape_string($_POST['template_id'])) . "</a></p>";


}

}else{
Expand Down

0 comments on commit c21ab18

Please sign in to comment.