more changes
authorCindy Li <cli@ocad.ca>
Fri, 18 Dec 2009 19:11:19 +0000 (19:11 -0000)
committerCindy Li <cli@ocad.ca>
Fri, 18 Dec 2009 19:11:19 +0000 (19:11 -0000)
183 files changed:
docs/documentation/frame_content.php
docs/documentation/frame_header.php
docs/documentation/frame_toc.php
docs/documentation/handbook_footer.inc.php
docs/documentation/handbook_header.inc.php
docs/documentation/index.php
docs/documentation/oauth_server_api.php
docs/documentation/print.php
docs/documentation/search.php
docs/documentation/web_service_api.php
docs/home/ims/ims_import.php [new file with mode: 0644]
docs/home/index.php
docs/images/action_add.png [new file with mode: 0644]
docs/images/action_delete.png [new file with mode: 0644]
docs/images/download.png [new file with mode: 0644]
docs/images/transfer.gif [new file with mode: 0644]
docs/include/classes/A4a/A4a.class.php [new file with mode: 0644]
docs/include/classes/A4a/A4a.tmpl.php [new file with mode: 0644]
docs/include/classes/A4a/A4aExport.class.php [new file with mode: 0644]
docs/include/classes/A4a/A4aImport.class.php [new file with mode: 0644]
docs/include/classes/DAO/ConfigDAO.class.php
docs/include/classes/DAO/DAO.class.php
docs/include/classes/DAO/LangCodesDAO.class.php
docs/include/classes/DAO/LanguageTextDAO.class.php
docs/include/classes/DAO/LanguagesDAO.class.php
docs/include/classes/DAO/MailQueueDAO.class.php
docs/include/classes/DAO/MyownPatchesDAO.class.php
docs/include/classes/DAO/MyownPatchesDependentDAO.class.php
docs/include/classes/DAO/MyownPatchesFilesDAO.class.php
docs/include/classes/DAO/OAuthClientServersDAO.class.php
docs/include/classes/DAO/OAuthClientTokensDAO.class.php
docs/include/classes/DAO/OAuthServerConsumersDAO.class.php
docs/include/classes/DAO/OAuthServerTokensDAO.class.php
docs/include/classes/DAO/PatchesDAO.class.php
docs/include/classes/DAO/PatchesFilesActionsDAO.class.php
docs/include/classes/DAO/PatchesFilesDAO.class.php
docs/include/classes/DAO/PrivilegesDAO.class.php
docs/include/classes/DAO/ThemesDAO.class.php
docs/include/classes/DAO/UserGroupPrivilegeDAO.class.php
docs/include/classes/DAO/UserGroupsDAO.class.php
docs/include/classes/DAO/UsersDAO.class.php
docs/include/classes/Language/Language.class.php
docs/include/classes/Language/LanguageEditor.class.php
docs/include/classes/Language/LanguageManager.class.php
docs/include/classes/Language/LanguageParser.class.php
docs/include/classes/Language/LanguageUtility.class.php
docs/include/classes/Language/LanguagesParser.class.php
docs/include/classes/Language/RemoteLanguageManager.class.php
docs/include/classes/Menu.class.php
docs/include/classes/Message/Message.class.php
docs/include/classes/QTI/QTIImport.class.php [new file with mode: 0644]
docs/include/classes/QTI/QTIParser.class.php [new file with mode: 0644]
docs/include/classes/User.class.php
docs/include/classes/Utility.class.php
docs/include/classes/Weblinks/Weblinks.class.php [new file with mode: 0644]
docs/include/classes/Weblinks/Weblinks.tmpl.php [new file with mode: 0644]
docs/include/classes/Weblinks/WeblinksExport.class.php [new file with mode: 0644]
docs/include/classes/Weblinks/WeblinksParser.class.php [new file with mode: 0644]
docs/include/classes/phpmailer/aframemailer.class.php
docs/include/classes/sqlutility.class.php
docs/include/classes/zipfile.class.php
docs/include/config.inc.php [deleted file]
docs/include/constants.inc.php
docs/include/footer.inc.php
docs/include/handbook_pages.inc.php
docs/include/handleResponse.php
docs/include/header.inc.php
docs/include/jscripts/handleResponse.js
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/coal.css
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/hc.css
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/hci.css
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/mist.css
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/slate.css
docs/include/lib/filemanager.inc.php [new file with mode: 0644]
docs/include/lib/mime.inc.php
docs/include/lib/output.inc.php
docs/include/page_constants.inc.php
docs/include/phpCache/phpCache.inc.php
docs/include/securimage/securimage_show.php
docs/include/vitals.inc.php
docs/index.php
docs/install/db/db_schema.sql
docs/install/db/language_text.sql
docs/install/include/classes/sqlutility.php
docs/install/include/common.inc.php
docs/install/include/config_template.php
docs/install/include/footer.inc.php
docs/install/include/header.inc.php
docs/install/include/step1.php
docs/install/include/step2.php
docs/install/include/step3.php
docs/install/include/step4.php
docs/install/include/step5.php
docs/install/include/step6.php
docs/install/include/step7.php
docs/install/include/upgrade_header.php
docs/install/include/ustep1.php
docs/install/include/ustep2.php
docs/install/include/ustep3.php
docs/install/include/ustep4.php
docs/install/include/ustep5.php
docs/install/index.php
docs/install/install.php
docs/install/not_installed.php
docs/install/stylesheet.css
docs/install/upgrade.php
docs/language/index.php
docs/language/index_inline_editor_submit.php
docs/language/language_add_edit.php
docs/language/language_delete.php
docs/login.php
docs/logout.php
docs/oauth/access_token.php
docs/oauth/authorization.php
docs/oauth/classes/MyOAuthServer.class.php
docs/oauth/lib/OAuth.php
docs/oauth/register_consumer.php
docs/oauth/request_token.php
docs/oauth_client.php
docs/profile/change_email.php
docs/profile/change_password.php
docs/profile/index.php
docs/register.php
docs/svn.php
docs/system/index.php
docs/themes/default/change_password.tmpl.php
docs/themes/default/confirmmessage.tmpl.php
docs/themes/default/errormessage.tmpl.php
docs/themes/default/feedbackmessage.tmpl.php
docs/themes/default/forms.css
docs/themes/default/home/index.tmpl.php [deleted file]
docs/themes/default/include/footer.tmpl.php
docs/themes/default/include/handbook_footer.tmpl.php
docs/themes/default/include/handbook_header.tmpl.php
docs/themes/default/include/header.tmpl.php
docs/themes/default/infomessage.tmpl.php
docs/themes/default/language/index.tmpl.php
docs/themes/default/language/language_add_edit.tmpl.php
docs/themes/default/login.tmpl.php
docs/themes/default/password_reminder.tmpl.php
docs/themes/default/password_reminder_feedback.tmpl.php
docs/themes/default/profile/change_email.tmpl.php
docs/themes/default/profile/change_password.tmpl.php
docs/themes/default/profile/index.tmpl.php
docs/themes/default/readme.txt
docs/themes/default/register.tmpl.php
docs/themes/default/style_popup.css
docs/themes/default/styles.css
docs/themes/default/system/index.tmpl.php
docs/themes/default/theme.cfg.php
docs/themes/default/theme_info.xml
docs/themes/default/updater/index.tmpl.php
docs/themes/default/updater/myown_patches.tmpl.php
docs/themes/default/updater/patch_create_edit.tmpl.php
docs/themes/default/user/index.tmpl.php
docs/themes/default/user/user_group.tmpl.php
docs/themes/default/user/user_group_create_edit.tmpl.php
docs/themes/default/user/user_password.tmpl.php
docs/themes/default/warningmessage.tmpl.php
docs/translation/index.php
docs/updater/classes/Patch.class.php
docs/updater/classes/PatchCreator.class.php
docs/updater/classes/PatchListParser.class.php
docs/updater/classes/PatchParser.class.php
docs/updater/include/common.inc.php
docs/updater/include/json.inc.php
docs/updater/include/patch_xml_template.inc.php
docs/updater/index.php
docs/updater/myown_patches.php
docs/updater/myown_patches_inline_editor_submit.php
docs/updater/patch_create.php
docs/updater/patch_creator.php
docs/updater/patch_delete.php
docs/updater/patch_edit.php
docs/user/index.php
docs/user/index_inline_editor_submit.php
docs/user/user_create_edit.php
docs/user/user_delete.php
docs/user/user_group.php
docs/user/user_group_create_edit.php
docs/user/user_group_delete.php
docs/user/user_group_inline_editor_submit.php
docs/user/user_password.php

index 5bcdea2..1d71dac 100644 (file)
@@ -1,6 +1,6 @@
 <?php \r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -10,8 +10,8 @@
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
 \r
 if (isset($_GET['p'])) {\r
        $this_page = htmlentities($_GET['p']);\r
index cd6b78c..3083aad 100644 (file)
@@ -1,6 +1,6 @@
 <?php \r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -10,8 +10,8 @@
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
 \r
 if (isset($_GET['p'])) {\r
        $this_page = htmlentities($_GET['p']);\r
@@ -24,7 +24,7 @@ if (isset($_GET['p'])) {
 <html lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>">\r
 <head>\r
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
-       <title><?php echo _AT('AFrame_documentation'); ?></title>\r
+       <title><?php echo _AT('Transformable_documentation'); ?></title>\r
 <style type="text/css">\r
 body { font-family: Verdana,Arial,sans-serif; font-size: x-small; margin: 0px; padding: 3px; background: #f4f4f4; color: #afafaf; }\r
 ul, ol { list-style: none; padding-left: 0px; margin-left: -15px; }\r
index d0cc2d1..8ac0f90 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,9 +10,9 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', '../include/');
-include(AF_INCLUDE_PATH.'vitals.inc.php');
-include(AF_INCLUDE_PATH.'handbook_pages.inc.php');
+define('TR_INCLUDE_PATH', '../include/');
+include(TR_INCLUDE_PATH.'vitals.inc.php');
+include(TR_INCLUDE_PATH.'handbook_pages.inc.php');
 
 /**
  * handbook toc printer
index 447d411..26cb57f 100644 (file)
@@ -1,6 +1,6 @@
 <?php \r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-if (!defined('AF_INCLUDE_PATH')) { exit; } \r
+if (!defined('TR_INCLUDE_PATH')) { exit; } \r
 \r
 if (isset($prev_page)) $savant->assign('prev_page', $prev_page);\r
 if (isset($next_page)) $savant->assign('next_page', $next_page);\r
 \r
 $savant->assign('pages', $_pages);\r
-$savant->assign('base_path', AF_BASE_HREF);\r
+$savant->assign('base_path', TR_BASE_HREF);\r
 \r
 $savant->display('include/handbook_footer.tmpl.php');\r
 ?>\r
index 247e745..a63005e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,8 +10,8 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; } 
-include(AF_INCLUDE_PATH.'handbook_pages.inc.php');
+if (!defined('TR_INCLUDE_PATH')) { exit; } 
+include(TR_INCLUDE_PATH.'handbook_pages.inc.php');
 
 global $handbook_pages;
 global $merged_array;
@@ -60,7 +60,7 @@ if (isset($next_page)) $savant->assign('next_page', $next_page);
 
 $savant->assign('pages', $_pages);
 $savant->assign('this_page', $this_page);
-$savant->assign('base_path', AF_BASE_HREF);
+$savant->assign('base_path', TR_BASE_HREF);
 $savant->assign('theme', $_SESSION['prefs']['PREF_THEME']);
 
 $savant->display('include/handbook_header.tmpl.php');
index c621f8a..4a8f8a2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,9 +10,9 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', '../include/');
-include(AF_INCLUDE_PATH.'vitals.inc.php');
-include(AF_INCLUDE_PATH.'handbook_pages.inc.php');
+define('TR_INCLUDE_PATH', '../include/');
+include(TR_INCLUDE_PATH.'vitals.inc.php');
+include(TR_INCLUDE_PATH.'handbook_pages.inc.php');
 
 global $handbook_pages;
 
@@ -42,7 +42,7 @@ if (isset($_GET['p'])) {
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>" lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>"> 
 <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-       <title><?php echo _AT('AFrame_handbook'); ?></title>
+       <title><?php echo _AT('Transformable_handbook'); ?></title>
 
 <script type="text/javascript">
 
@@ -98,7 +98,7 @@ function hide() {
        </frameset>
 
        <noframes>
-               <h1><?php echo _AT('AFrame_handbook'); ?></h1>
+               <h1><?php echo _AT('Transformable_handbook'); ?></h1>
                <p><a href="frame_toc.html">Table of Contents</a></p>
         </noframes>
 </frameset>
index 8631b14..d6833f9 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
+define('TR_INCLUDE_PATH', '../include/');\r
 \r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include(AF_INCLUDE_PATH.'header.inc.php');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include(TR_INCLUDE_PATH.'header.inc.php');\r
 ?>\r
 <div class="output-form" style="line-height:150%">\r
 \r
 <h1>OAuth Server API</h1>\r
-<p>AFrame implements the OAuth Core 1.0 specification.</p>\r
+<p>Transformable implements the OAuth Core 1.0 specification.</p>\r
 <p>The <a href="http://oauth.net/documentation/getting-started" target="_blank">OAuth</a> protocol enables web services consumers to access protected resources via an API without requiring users to supply the service credentials to the consumers. It's a generic methodology for unobtrusive, wire protocol level authenticated data access over HTTP.</p>\r
 \r
-<p>AFrame exposes the following API endpoints:</p>\r
+<p>Transformable exposes the following API endpoints:</p>\r
 \r
     <div id="toc">\r
       <ul>\r
-        <li><a href="<?php echo AF_BASE_HREF.'documentation/oauth_server_api.php'; ?>#register_consumer">Register consumer</a></li>\r
-        <li><a href="<?php echo AF_BASE_HREF.'documentation/oauth_server_api.php'; ?>#request_token">Request token</a></li>\r
-        <li><a href="<?php echo AF_BASE_HREF.'documentation/oauth_server_api.php'; ?>#authorization">Authorization</a></li>\r
-        <li><a href="<?php echo AF_BASE_HREF.'documentation/oauth_server_api.php'; ?>#access_token">Access token</a></li>\r
+        <li><a href="<?php echo TR_BASE_HREF.'documentation/oauth_server_api.php'; ?>#register_consumer">Register consumer</a></li>\r
+        <li><a href="<?php echo TR_BASE_HREF.'documentation/oauth_server_api.php'; ?>#request_token">Request token</a></li>\r
+        <li><a href="<?php echo TR_BASE_HREF.'documentation/oauth_server_api.php'; ?>#authorization">Authorization</a></li>\r
+        <li><a href="<?php echo TR_BASE_HREF.'documentation/oauth_server_api.php'; ?>#access_token">Access token</a></li>\r
       </ul>\r
     </div>\r
     \r
@@ -62,9 +62,9 @@ include(AF_INCLUDE_PATH.'header.inc.php');
 <h3>Example</h3><br />\r
 <span style="font-weight: bold">Request</span>\r
 <pre style="background-color:#F7F3ED;"> \r
-<?php echo AF_BASE_HREF; ?>oauth/register_consumer.php?consumer=http%3A%2F%2Flocalhost%2Faframe%2F&expire=300<br />\r
+<?php echo TR_BASE_HREF; ?>oauth/register_consumer.php?consumer=http%3A%2F%2Flocalhost%2Ftransformable%2F&expire=300<br />\r
 </pre>\r
-<p>Goal: Registers consumer http://localhost/aframe/ and requests that the assigned access token expires in 5 minutes.</p>\r
+<p>Goal: Registers consumer http://localhost/transformable/ and requests that the assigned access token expires in 5 minutes.</p>\r
 \r
 <span style="font-weight:bold">Success response</span>\r
 <pre style="background-color:#F7F3ED;"> \r
@@ -131,7 +131,7 @@ error=Empty+parameter+%22consumer%22.<br />
 <h3>Example</h3><br />\r
 <span style="font-weight: bold">Request</span>\r
 <pre style="background-color:#F7F3ED;"> \r
-<?php echo AF_BASE_HREF; ?>oauth/request_token.php?oauth_consumer_key=8862a51faa12c1b1&<br />oauth_signature_method=HMAC-SHA1&oauth_signature=tVWpcskRSY34wxhv%2BP9NcgXuuGk%3D&<br />oauth_timestamp=1255524495&oauth_nonce=3e43dd6ce0e09614e79e2a4b53e124c8&oauth_version=1.0<br />\r
+<?php echo TR_BASE_HREF; ?>oauth/request_token.php?oauth_consumer_key=8862a51faa12c1b1&<br />oauth_signature_method=HMAC-SHA1&oauth_signature=tVWpcskRSY34wxhv%2BP9NcgXuuGk%3D&<br />oauth_timestamp=1255524495&oauth_nonce=3e43dd6ce0e09614e79e2a4b53e124c8&oauth_version=1.0<br />\r
 </pre>\r
 \r
 <span style="font-weight:bold">Success response</span>\r
@@ -177,7 +177,7 @@ error=Consumer+is+not+registered.<br />
 <h3>Example</h3><br />\r
 <span style="font-weight: bold">Request</span>\r
 <pre style="background-color:#F7F3ED;"> \r
-<?php echo AF_BASE_HREF; ?>oauth/authorization.php?oauth_token=086cbfe90b41a7fdf9&oauth_callback=<?php echo urlencode(AF_BASE_HREF);?><br />\r
+<?php echo TR_BASE_HREF; ?>oauth/authorization.php?oauth_token=086cbfe90b41a7fdf9&oauth_callback=<?php echo urlencode(TR_BASE_HREF);?><br />\r
 </pre>\r
 \r
 <span style="font-weight:bold">Success response</span>\r
@@ -248,7 +248,7 @@ error=Empty+oauth+token.<br />
 <h3>Example</h3><br />\r
 <span style="font-weight: bold">Request</span>\r
 <pre style="background-color:#F7F3ED;"> \r
-<?php echo AF_BASE_HREF; ?>oauth/access_token.php?oauth_consumer_key=8862a51faa12c1b1&oauth_token=086cbfe90b41a7fdf9&\r
+<?php echo TR_BASE_HREF; ?>oauth/access_token.php?oauth_consumer_key=8862a51faa12c1b1&oauth_token=086cbfe90b41a7fdf9&\r
 oauth_signature_method=HMAC-SHA1&oauth_signature=tVWpcskRSY34wxhv%2BP9NcgXuuGk%3D&oauth_timestamp=1255524495&\r
 oauth_nonce=3e43dd6ce0e09614e79e2a4b53e124c8&oauth_version=1.0<br />\r
 </pre>\r
@@ -265,4 +265,4 @@ error=Invalid+oauth+request+token.<br />
 </pre>\r
 <p>A fail response returns error message.</p> \r
 \r
-<?php include(AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
+<?php include(TR_INCLUDE_PATH.'footer.inc.php'); ?>\r
index b733e5d..968556c 100644 (file)
@@ -1,6 +1,6 @@
 <?php 
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,9 +10,9 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', '../include/');
-include(AF_INCLUDE_PATH.'vitals.inc.php');
-include(AF_INCLUDE_PATH.'handbook_pages.inc.php');
+define('TR_INCLUDE_PATH', '../include/');
+include(TR_INCLUDE_PATH.'vitals.inc.php');
+include(TR_INCLUDE_PATH.'handbook_pages.inc.php');
 
 global $handbook_pages, $_pages;
 
index 52dfccc..3ea0273 100644 (file)
@@ -1,6 +1,6 @@
 <?php \r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include_once(AF_INCLUDE_PATH.'handbook_pages.inc.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/LanguageTextDAO.class.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(TR_INCLUDE_PATH.'handbook_pages.inc.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/LanguageTextDAO.class.php');\r
 \r
 ?>\r
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
 <html lang="<?php if ($missing_lang) { echo DEFAULT_LANGUAGE_CODE; } else { echo $req_lang; } ?>">\r
 <head>\r
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
-       <title><?php echo _AT('AFrame_documentation'); ?></title>\r
+       <title><?php echo _AT('Transformable_documentation'); ?></title>\r
        <base target="body" />\r
 <style>\r
 body { font-family: Verdana,Arial,sans-serif; font-size: x-small; margin: 0px; padding: 0px; background: #fafafa; margin-left: -5px; }\r
index 25533d2..06eb559 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
+define('TR_INCLUDE_PATH', '../include/');\r
 \r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include(AF_INCLUDE_PATH.'header.inc.php');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include(TR_INCLUDE_PATH.'header.inc.php');\r
 ?>\r
 <div class="output-form" style="line-height:150%">\r
 \r
-<h1>AFrame Web Service API</h1>\r
-<p>Interface applications with the AFrame through its experimental API. This is version 0.1, dated Mar 2009.</p>\r
+<h1>Transformable Web Service API</h1>\r
+<p>Interface applications with the Transformable through its experimental API. This is version 0.1, dated Mar 2009.</p>\r
 <p>[Your content here.]</p>\r
-<?php include(AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
+<?php include(TR_INCLUDE_PATH.'footer.inc.php'); ?>\r
diff --git a/docs/home/ims/ims_import.php b/docs/home/ims/ims_import.php
new file mode 100644 (file)
index 0000000..e70bb13
--- /dev/null
@@ -0,0 +1,1145 @@
+<?php
+/************************************************************************/
+/* Transformable                                                        */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* This program is free software. You can redistribute it and/or        */
+/* modify it under the terms of the GNU General Public License          */
+/* as published by the Free Software Foundation.                        */
+/************************************************************************/
+
+define('TR_INCLUDE_PATH', '../../include/');
+require_once(TR_INCLUDE_PATH.'vitals.inc.php');
+
+require_once(TR_INCLUDE_PATH.'classes/Utility.class.php'); /* for clr_dir() and preImportCallBack and dirsize() */
+require_once(TR_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php'); /* for clr_dir() and preImportCallBack and dirsize() */
+require_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php'); /* for clr_dir() and preImportCallBack and dirsize() */
+require_once(TR_INCLUDE_PATH.'classes/DAO/ContentDAO.class.php'); /* for clr_dir() and preImportCallBack and dirsize() */
+require_once(TR_INCLUDE_PATH.'classes/ContentUtility.class.php'); /* for clr_dir() and preImportCallBack and dirsize() */
+require_once(TR_INCLUDE_PATH.'lib/filemanager.inc.php'); /* for clr_dir() and preImportCallBack and dirsize() */
+require_once(TR_INCLUDE_PATH.'lib/pclzip.lib.php');
+require_once(TR_INCLUDE_PATH.'lib/qti.inc.php'); 
+//require(TR_INCLUDE_PATH.'classes/QTI/QTIParser.class.php');  
+require_once(TR_INCLUDE_PATH.'classes/QTI/QTIImport.class.php');
+require_once(TR_INCLUDE_PATH.'classes/A4a/A4aImport.class.php');
+//require(TR_INCLUDE_PATH.'../tools/ims/ns.inc.php');  //namespace, no longer needs, delete it after it's stable.
+require_once(TR_INCLUDE_PATH.'classes/Weblinks/WeblinksParser.class.php');
+
+global $_current_user;
+/* make sure the user has author privilege */
+if (!isset($_current_user) || !$_current_user->isAuthor())
+{
+       $msg->addError('NO_PRIV');
+       include(TR_INCLUDE_PATH.'header.inc.php');
+       $msg->printAll(); 
+       include(TR_INCLUDE_PATH.'footer.inc.php');
+       exit;
+}
+
+/* to avoid timing out on large files */
+@set_time_limit(0);
+$_SESSION['done'] = 1;
+
+$html_head_tags = array("style", "script");
+
+$package_base_path = '';
+$xml_base_path = '';
+$element_path = array();
+$imported_glossary = array();
+$character_data = '';
+$test_message = '';
+$content_type = '';
+$skip_ims_validation = false;
+
+
+/**
+ * Validate all the XML in the package, including checking XSDs, missing data.
+ * @param      string          the path of the directory that contains all the package files
+ * @return     boolean         true if every file exists in the manifest, false if any is missing.
+ */
+function checkResources($import_path){
+       global $items, $msg, $skip_ims_validation;
+
+       if (!is_dir($import_path)){
+               return;
+       }
+
+       //if the package has access for all content, skip validation for now. 
+       //todo: import the XSD into our validator
+       if ($skip_ims_validation){
+               return true;
+       }
+
+       //generate a file tree
+       $data = rscandir($import_path);
+
+       //check if every file is presented in the manifest
+       foreach($data as $filepath){
+               $filepath = substr($filepath, strlen($import_path));
+
+               //validate xml via its xsd/dtds
+               if (preg_match('/(.*)\.xml/', $filepath)){
+                       $dom = new DOMDocument();
+                       $dom->load(realpath($import_path.$filepath));
+
+                       if (!@$dom->schemaValidate('main.xsd')){
+                               $msg->addError('MANIFEST_FAILED_VALIDATION - '.$filepath);
+                       }
+                       //if this is the manifest file, we do not have to check for its existance.
+                       if (preg_match('/(.*)imsmanifest\.xml/', $filepath)){
+                               continue;
+                       }
+               }
+
+               $flag = false;
+               $file_exists_in_manifest = false;
+
+               //check if every file in manifest indeed exists
+               foreach($items as $name=>$fileinfo){
+                       if (is_array($fileinfo['file'])){
+                               if(in_array($filepath, $fileinfo['file'])){
+                                       $file_exists_in_manifest = true;
+
+                                       //validate the xml by its schema
+                                       if (preg_match('/imsqti\_(.*)/', $fileinfo['type'])){
+                                               $qti = new QTIParser($fileinfo['type']);
+                                               $xml_content = @file_get_contents($import_path . $fileinfo['href']);
+                                               $qti->parse($xml_content);
+                                               if ($msg->containsErrors()){
+                                                       $flag = false;
+                                               } else {
+                                                       $flag = true;
+                                               }
+                                       } else {
+                                               $flag = true;
+                                       }
+                               }
+                       }
+               }
+
+               //check if all the files exists in the manifest, if not, throw error.
+               if (!$file_exists_in_manifest){
+                       $msg->addError('MANIFEST_NOT_WELLFORM: MISSING REFERENCES');
+                       break;
+               }
+
+               if ($flag == false){
+                       //add an error message if it doesn't have any. 
+                       if (!$msg->containsErrors()){
+                               $msg->addError('MANIFEST_NOT_WELLFORM: MISSING REFERENCES');
+                       }
+                       return false;
+               }
+       }
+       return true;
+}
+
+/*
+ * @example rscandir(dirname(__FILE__).'/'));
+ * @param string $base
+ * @param array $omit
+ * @param array $data
+ * @return array
+ */
+function rscandir($base='', &$data=array()) {
+  $array = array_diff(scandir($base), array('.', '..')); # remove ' and .. from the array */
+  
+  foreach($array as $value) : /* loop through the array at the level of the supplied $base */
+    if (is_dir($base.$value)) : /* if this is a directory */
+//       don't save the directory name
+//       $data[] = $base.$value.'/'; /* add it to the $data array */
+      $data = rscandir($base.$value.'/', $data); /* then make a recursive call with the
+      current $value as the $base supplying the $data array to carry into the recursion */
+     
+    elseif (is_file($base.$value)) : /* else if the current $value is a file */
+      $data[] = $base.$value; /* just add the current $value to the $data array */
+     
+    endif;
+   
+  endforeach;
+  return $data; // return the $data array
+}
+
+/**
+ * Function to restructure the $items.  So that old import will merge the top page into its children, and
+ * create a new folder on top of it
+ */
+function rehash($items){
+       global $order;
+       $parent_page_maps = array();    //old=>new
+       $temp_popped_items = array();
+       $rehashed_items = array();      //the reconstructed array
+       foreach($items as $id => $content){
+               $parent_obj = $items[$content['parent_content_id']];
+               $rehashed_items[$id] = $content;        //copy
+
+               //first check if there exists a mapping for this item, if so, simply replace is and next.
+               if (isset($parent_page_maps[$content['parent_content_id']])){
+                       $rehashed_items [$id]['parent_content_id'] = $parent_page_maps[$content['parent_content_id']];
+                       $rehashed_items [$id]['ordering']++;
+               } 
+               //If its parent page is a top page and have an identiferref
+               else if (isset($parent_obj) && isset($parent_obj['href'])){                     
+                       if (!isset($parent_obj['href'])){
+                               //check if this top page is already a folder, if so, next.
+                               continue;
+                       }
+                       //else, make its parent page to a folder
+                       $new_item['title'] = $parent_obj['title'];
+                       $new_item['parent_content_id'] = $parent_obj['parent_content_id'];
+                       $new_item['ordering'] = $parent_obj['ordering'];
+
+               //assign this new parent folder to the pending items array
+                       $new_item_name = $content['parent_content_id'].'_FOLDER';
+                       //a not so brilliant way to append the folder in its appropriate position
+                       $reordered_hashed_items = array();  //use to store the new rehashed item with the correct item order
+                       foreach($rehashed_items as $rh_id=>$rh_content){
+                           if ($rh_id == $content['parent_content_id']){
+                               //add the folder in before the parent subpage.
+                               $reordered_hashed_items[$new_item_name] = $new_item;
+                           }
+                           $reordered_hashed_items[$rh_id] = $rh_content;  //clone
+                       }
+                       $rehashed_items = $reordered_hashed_items;  //replace it back
+                       unset($reordered_hashed_items);
+                       $parent_page_maps[$content['parent_content_id']] = $new_item_name;  //save this page on the hash map
+
+                       //reconstruct the parent
+                       $rehashed_items[$content['parent_content_id']]['parent_content_id'] = $parent_page_maps[$content['parent_content_id']];
+                       $rehashed_items[$content['parent_content_id']]['ordering'] = 0; //always the first one.
+
+                       //reconstruct itself
+                       $rehashed_items[$id]['parent_content_id'] = $parent_page_maps[$content['parent_content_id']];
+                       $rehashed_items[$id]['ordering']++;
+
+               }
+       }
+
+       return $rehashed_items;
+}
+
+
+/** 
+ * This function will take the test accessment XML and add these to the database.
+ * @param      string  The path of the XML, without the import_path.
+ * @param      mixed   An item singleton.  Contains the info of this item, namely, the accessment details.
+ *                                     The item must be an object created by the ims class.
+ * @param      string  the import path
+ * @return     mixed   An Array that contains all the question IDs that have been imported.
+ */
+ function addQuestions($xml, $item, $import_path){
+       $qti_import = new QTIImport($import_path);
+
+       $tests_xml = $import_path.$xml;
+       
+       //Mimic the array for now.
+       $test_attributes['resource']['href'] = $item['href'];
+       $test_attributes['resource']['type'] = preg_match('/imsqti_xmlv1p2/', $item['type'])==1?'imsqti_xmlv1p2':'imsqti_xmlv1p1';
+       $test_attributes['resource']['file'] = $item['file'];
+
+       //Get the XML file out and start importing them into our database.
+       //TODO: See question_import.php 287-289.
+       $qids = $qti_import->importQuestions($test_attributes);
+
+       return $qids;
+ }
+
+
+
+       /* called at the start of en element */
+       /* builds the $path array which is the path from the root to the current element */
+       function startElement($parser, $name, $attrs) {
+               global $items, $path, $package_base_path, $import_path;
+               global $element_path;
+               global $xml_base_path, $test_message, $content_type;
+               global $current_identifier, $msg;
+
+               if ($element_path === array('manifest', 'metadata', 'imsmd:lom', 'imsmd:general', 'imsmd:title') && $name == 'imsmd:langstring') {
+                       global $package_primay_lang;
+                       $package_primay_lang = trim($attrs['xml:lang']);
+               }
+               
+               if ($name == 'manifest' && isset($attrs['xml:base']) && $attrs['xml:base']) {
+                       $xml_base_path = $attrs['xml:base'];
+               } else if ($name == 'file') {
+                       // check if it misses file references
+                       if(!isset($attrs['href']) || $attrs['href']==''){
+                               $msg->addError('MANIFEST_NOT_WELLFORM');
+                       }
+
+                       // special case for webCT content packages that don't specify the `href` attribute 
+                       // with the `<resource>` element.
+                       // we take the `href` from the first `<file>` element.
+                       if (isset($items[$current_identifier]) && ($items[$current_identifier]['href'] == '')) {
+                               $attrs['href'] = urldecode($attrs['href']);
+                               $items[$current_identifier]['href'] = $attrs['href'];
+                       }
+
+                       $temp_path = pathinfo($attrs['href']);
+                       $temp_path = explode('/', $temp_path['dirname']);
+
+                       //for IMSCC, assume that all resources lies in the same folder, except styles.css
+                       if ($items[$current_identifier]['type']=='webcontent'){
+                               if ($package_base_path=="") {
+                                       $package_base_path = $temp_path;
+                               } 
+                               elseif (is_array($package_base_path) && $content_type != 'IMS Common Cartridge') {
+                                       //if this is a content package, we want only intersection
+                                       $package_base_path = array_intersect($package_base_path, $temp_path);
+                                       $temp_path = $package_base_path;
+                               }
+                               //added these 2 lines in so that pictures would load.  making the elseif above redundant.
+                               //if there is a bug for pictures not load, then it's the next 2 lines.
+                               $package_base_path = array_intersect($package_base_path, $temp_path);
+                               $temp_path = $package_base_path;
+                       }
+                       $items[$current_identifier]['new_path'] = implode('/', $temp_path);     
+                       if (    isset($_POST['allow_test_import']) && isset($items[$current_identifier]) 
+                                               && preg_match('/((.*)\/)*tests\_[0-9]+\.xml$/', $attrs['href'])) {
+                               $items[$current_identifier]['tests'][] = $attrs['href'];
+                       } 
+                       if (    isset($_POST['allow_a4a_import']) && isset($items[$current_identifier])) {
+                               $items[$current_identifier]['a4a_import_enabled'] = true;
+                       }
+               } else if (($name == 'item') && ($attrs['identifierref'] != '')) {
+                       $path[] = $attrs['identifierref'];
+               } else if (($name == 'item') && ($attrs['identifier'])) {
+                       $path[] = $attrs['identifier'];
+//             } else if (($name == 'resource') && is_array($items[$attrs['identifier']]))  {
+               } else if (($name == 'resource')) {
+                       $current_identifier = $attrs['identifier'];
+                       $items[$current_identifier]['type'] = $attrs['type'];
+                       if ($attrs['href']) {
+                               $attrs['href'] = urldecode($attrs['href']);
+
+                               $items[$attrs['identifier']]['href'] = $attrs['href'];
+
+                               // href points to a remote url
+                               if (preg_match('/^http.*:\/\//', trim($attrs['href'])))
+                                       $items[$attrs['identifier']]['new_path'] = '';
+                               else // href points to local file
+                               {
+                                       $temp_path = pathinfo($attrs['href']);
+                                       $temp_path = explode('/', $temp_path['dirname']);
+                                       if (empty($package_base_path)) {
+                                               $package_base_path = $temp_path;
+                                       } 
+                                       $items[$attrs['identifier']]['new_path'] = implode('/', $temp_path);
+                               }
+                       }
+               } else if ($name=='dependency' && $attrs['identifierref']!='') {
+                       //if there is a dependency, attach it to the item array['file']
+                       $items[$current_identifier]['dependency'][] = $attrs['identifierref'];
+               }
+               if (($name == 'item') && ($attrs['parameters'] != '')) {
+                       $items[$attrs['identifierref']]['test_message'] = $attrs['parameters'];
+               }
+               if ($name=='file'){
+                       if(!isset($items[$current_identifier]) && $attrs['href']!=''){
+                               $items[$current_identifier]['href']      = $attrs['href'];
+                       }
+                       if (file_exists($import_path.$attrs['href'])){
+                               $items[$current_identifier]['file'][] = $attrs['href'];
+                       } else {
+                               $msg->addError('IMS_FILES_MISSING');
+                       }
+               }               
+               if ($name=='cc:authorizations'){
+                       //don't have authorization setup.
+                       $msg->addError('IMS_AUTHORIZATION_NOT_SUPPORT');
+               }
+       array_push($element_path, $name);
+}
+
+       /* called when an element ends */
+       /* removed the current element from the $path */
+       function endElement($parser, $name) {
+               global $path, $element_path, $my_data, $items;
+               global $current_identifier, $skip_ims_validation;
+               global $msg, $content_type;             
+               static $resource_num = 0;
+               
+               if ($name == 'item') {
+                       array_pop($path);
+               } 
+
+               //check if this is a test import
+               if ($name == 'schema'){
+                       if (trim($my_data)=='IMS Question and Test Interoperability'){                  
+                               $msg->addError('IMPORT_FAILED');debug('1');exit;
+                       } 
+                       $content_type = trim($my_data);
+               }
+
+               //Handles A4a
+               if ($current_identifier != ''){
+                       $my_data = trim($my_data);
+                       $last_file_name = $items[$current_identifier]['file'][(sizeof($items[$current_identifier]['file']))-1];
+
+                       if ($name=='originalAccessMode'){                               
+                               if (in_array('accessModeStatement', $element_path)){
+                                       $items[$current_identifier]['a4a'][$last_file_name][$resource_num]['access_stmt_originalAccessMode'][] = $my_data;
+                               } elseif (in_array('adaptationStatement', $element_path)){
+                                       $items[$current_identifier]['a4a'][$last_file_name][$resource_num]['adapt_stmt_originalAccessMode'][] = $my_data;
+                               }                       
+                       } elseif (($name=='language') && in_array('accessModeStatement', $element_path)){
+                               $items[$current_identifier]['a4a'][$last_file_name][$resource_num]['language'][] = $my_data;
+                       } elseif ($name=='hasAdaptation') {
+                               $items[$current_identifier]['a4a'][$last_file_name][$resource_num]['hasAdaptation'][] = $my_data;
+                       } elseif ($name=='isAdaptationOf'){
+                               $items[$current_identifier]['a4a'][$last_file_name][$resource_num]['isAdaptationOf'][] = $my_data;
+                       } elseif ($name=='accessForAllResource'){
+                               /* the head node of accessForAll Metadata, if this exists in the manifest. Skip XSD validation,
+                                * because A4a doesn't have a xsd yet.  Our access for all is based on ISO which will not pass 
+                                * the current IMS validation.  
+                                * Also, since ATutor is the only one (as of Oct 21, 2009) that exports IMS with access for all
+                                * content, we can almost assume that any ims access for all content is by us, and is valid. 
+                                */
+                               $skip_ims_validation = true;
+                               $resource_num++;
+                       } elseif($name=='file'){
+                               $resource_num = 0;      //reset resournce number to 0 when the file tags ends
+                       }
+               }
+
+               if ($element_path === array('manifest', 'metadata', 'imsmd:lom', 'imsmd:general', 'imsmd:title', 'imsmd:langstring')) {
+                       global $package_base_name;
+                       $package_base_name = trim($my_data);
+               }
+
+               if ($element_path === array('manifest', 'metadata', 'imsmd:lom', 'imsmd:general', 'imsmd:description', 'imsmd:langstring')) {
+                       global $package_base_description;
+                       $package_base_description = trim($my_data);
+               }
+
+               array_pop($element_path);
+               $my_data = '';
+       }
+
+       /* called when there is character data within elements */
+       /* constructs the $items array using the last entry in $path as the parent element */
+       function characterData($parser, $data){
+               global $path, $items, $order, $my_data, $element_path;
+               global $current_identifier;
+
+               $str_trimmed_data = trim($data);
+                               
+               if (!empty($str_trimmed_data)) {
+                       $size = count($path);
+                       if ($size > 0) {
+                               $current_item_id = $path[$size-1];
+                               if ($size > 1) {
+                                       $parent_item_id = $path[$size-2];
+                               } else {
+                                       $parent_item_id = 0;
+                               }
+
+                               if (isset($items[$current_item_id]['parent_content_id']) && is_array($items[$current_item_id])) {
+
+                                       /* this item already exists, append the title           */
+                                       /* this fixes {\n, \t, `, &} characters in elements */
+
+                                       /* horible kludge to fix the <ns2:objectiveDesc xmlns:ns2="http://www.utoronto.ca/atrc/tile/xsd/tile_objective"> */
+                                       /* from TILE */
+                                       if (in_array('accessForAllResource', $element_path)){
+                                               //skip this tag
+                                       } elseif ($element_path[count($element_path)-1] != 'ns1:objectiveDesc') {
+                                               $items[$current_item_id]['title'] .= $data;
+                                       }
+       
+                               } else {
+                                       $order[$parent_item_id]++;
+                                       $item_tmpl = array(     'title'                 => $data,
+                                                                               'parent_content_id' => $parent_item_id,
+                                                                               'ordering'                      => $order[$parent_item_id]-1);
+                                       //append other array values if it exists
+                                       if (is_array($items[$current_item_id])){
+                                               $items[$current_item_id] = array_merge($items[$current_item_id], $item_tmpl);
+                                       } else {
+                                               $items[$current_item_id] = $item_tmpl;
+                                       }
+                               }
+                       }
+               }
+
+               $my_data .= $data;
+       }
+
+       /* glossary parser: */
+       function glossaryStartElement($parser, $name, $attrs) {
+               global $element_path;
+
+               array_push($element_path, $name);
+       }
+
+       /* called when an element ends */
+       /* removed the current element from the $path */
+       function glossaryEndElement($parser, $name) {
+               global $element_path, $my_data, $imported_glossary;
+               static $current_term;
+
+               if ($element_path === array('glossary', 'item', 'term')) {
+                       $current_term = $my_data;
+
+               } else if ($element_path === array('glossary', 'item', 'definition')) {
+                       $imported_glossary[trim($current_term)] = trim($my_data);
+               }
+
+               array_pop($element_path);
+               $my_data = '';
+       }
+
+       function glossaryCharacterData($parser, $data){
+               global $my_data;
+
+               $my_data .= $data;
+       }
+
+if (!isset($_POST['submit']) && !isset($_POST['cancel'])) {
+       /* just a catch all */
+       
+       $errors = array('FILE_MAX_SIZE', ini_get('post_max_size'));
+       $msg->addError($errors);
+
+       header('Location: ../index.php');
+       exit;
+} else if (isset($_POST['cancel'])) {
+       $msg->addFeedback('IMPORT_CANCELLED');
+
+       header('Location: ../index.php');
+       exit;
+}
+
+if (isset($_POST['url']) && ($_POST['url'] != 'http://') ) {
+       if ($content = @file_get_contents($_POST['url'])) {
+
+               // save file to /content/
+               $filename = substr(time(), -6). '.zip';
+               $full_filename = TR_TEMP_DIR . $filename;
+
+               if (!$fp = fopen($full_filename, 'w+b')) {
+                       echo "Cannot open file ($filename)";
+                       exit;
+               }
+
+               if (fwrite($fp, $content, strlen($content) ) === FALSE) {
+                       echo "Cannot write to file ($filename)";
+                       exit;
+               }
+               fclose($fp);
+       }       
+       $_FILES['file']['name']     = $filename;
+       $_FILES['file']['tmp_name'] = $full_filename;
+       $_FILES['file']['size']     = strlen($content);
+       unset($content);
+       $url_parts = pathinfo($_POST['url']);
+       $package_base_name_url = $url_parts['basename'];
+}
+$ext = pathinfo($_FILES['file']['name']);
+$ext = $ext['extension'];
+
+if ($ext != 'zip') {
+       $msg->addError('IMPORTDIR_IMS_NOTVALID');
+} else if ($_FILES['file']['error'] == 1) {
+       $errors = array('FILE_MAX_SIZE', ini_get('upload_max_filesize'));
+       $msg->addError($errors);
+} else if ( !$_FILES['file']['name'] || (!is_uploaded_file($_FILES['file']['tmp_name']) && !$_POST['url'])) {
+       $msg->addError('FILE_NOT_SELECTED');
+} else if ($_FILES['file']['size'] == 0) {
+       $msg->addError('IMPORTFILE_EMPTY');
+} 
+
+if ($msg->containsErrors()) {
+       if (isset($_GET['tile'])) {
+               header('Location: '.$_base_path.'tools/tile/index.php');
+       } else {
+               header('Location: ../index.php');
+       }
+       exit;
+}
+
+/* check if ../content/import/ exists */
+$import_path = TR_TEMP_DIR . 'import/';
+$content_path = TR_TEMP_DIR;
+
+if (!is_dir($import_path)) {
+       if (!@mkdir($import_path, 0700)) {
+               $msg->addError('IMPORTDIR_FAILED');
+       }
+}
+
+$import_path .= Utility::getRandomStr(16).'/';
+if (is_dir($import_path)) {
+       clr_dir($import_path);
+}
+
+if (!@mkdir($import_path, 0700)) {
+       $msg->addError('IMPORTDIR_FAILED');
+}
+
+if ($msg->containsErrors()) {
+       if (isset($_GET['tile'])) {
+               header('Location: '.$_base_path.'tools/tile/index.php');
+       } else {
+               header('Location: ../index.php');
+       }
+       exit;
+}
+
+/* extract the entire archive into TR_COURSE_CONTENT . import/$course using the call back function to filter out php files */
+error_reporting(0);
+$archive = new PclZip($_FILES['file']['tmp_name']);
+if ($archive->extract( PCLZIP_OPT_PATH,        $import_path,
+                                               PCLZIP_CB_PRE_EXTRACT,  'preImportCallBack') == 0) {
+       $msg->addError('IMPORT_FAILED');debug('2');exit;
+       echo 'Error : '.$archive->errorInfo(true);
+       clr_dir($import_path);
+       header('Location: ../index.php');
+       exit;
+}
+error_reporting(TR_ERROR_REPORTING);
+
+/* get the course's max_quota */
+//$sql = "SELECT max_quota FROM ".TABLE_PREFIX."courses WHERE course_id=$course_id";
+//$result = mysql_query($sql, $db);
+//$q_row       = mysql_fetch_assoc($result);
+//
+//if ($q_row['max_quota'] != TR_COURSESIZE_UNLIMITED) {
+//
+//     if ($q_row['max_quota'] == TR_COURSESIZE_DEFAULT) {
+//             $q_row['max_quota'] = $MaxCourseSize;
+//     }
+//     $totalBytes   = dirsize($import_path);
+//     $course_total = dirsize($import_path);
+//     $total_after  = $q_row['max_quota'] - $course_total - $totalBytes + $MaxCourseFloat;
+//
+//     if ($total_after < 0) {
+//             /* remove the content dir, since there's no space for it */
+//             $errors = array('NO_CONTENT_SPACE', number_format(-1*($total_after/TR_KBYTE_SIZE), 2 ) );
+//             $msg->addError($errors);
+//             
+//             clr_dir($import_path);
+//
+//             if (isset($_GET['tile'])) {
+//                     header('Location: '.$_base_path.'tools/tile/index.php');
+//             } else {
+//                     header('Location: index.php');
+//             }
+//             exit;
+//     }
+//}
+
+
+$items = array(); /* all the content pages */
+$order = array(); /* keeps track of the ordering for each content page */
+$path  = array();  /* the hierarchy path taken in the menu to get to the current item in the manifest */
+$dependency_files = array(); /* the file path for the dependency files */
+
+/*
+$items[content_id/resource_id] = array(
+                                                                       'title'
+                                                                       'real_content_id' // calculated after being inserted
+                                                                       'parent_content_id'
+                                                                       'href'
+                                                                       'ordering'
+                                                                       );
+*/
+
+$ims_manifest_xml = @file_get_contents($import_path.'imsmanifest.xml');
+
+if ($ims_manifest_xml === false) {
+       $msg->addError('NO_IMSMANIFEST');
+
+       if (file_exists($import_path . 'atutor_backup_version')) {
+               $msg->addError('NO_IMS_BACKUP');
+       }
+
+       clr_dir($import_path);
+
+       if (isset($_GET['tile'])) {
+               header('Location: '.$_base_path.'tools/tile/index.php');
+       } else {
+               header('Location: ../index.php');
+       }
+       exit;
+}
+
+$xml_parser = xml_parser_create();
+
+xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, false); /* conform to W3C specs */
+xml_set_element_handler($xml_parser, 'startElement', 'endElement');
+xml_set_character_data_handler($xml_parser, 'characterData');
+
+if (!xml_parse($xml_parser, $ims_manifest_xml, true)) {
+       die(sprintf("XML error: %s at line %d",
+                               xml_error_string(xml_get_error_code($xml_parser)),
+                               xml_get_current_line_number($xml_parser)));
+}
+
+xml_parser_free($xml_parser);
+// skip glossary
+/* check if the glossary terms exist */
+//$glossary_path = '';
+//if ($content_type == 'IMS Common Cartridge'){
+//     $glossary_path = 'GlossaryItem/';
+//}
+//if (file_exists($import_path . $glossary_path . 'glossary.xml')){
+//     $glossary_xml = @file_get_contents($import_path.$glossary_path.'glossary.xml');
+//     $element_path = array();
+//
+//     $xml_parser = xml_parser_create();
+//
+//     /* insert the glossary terms into the database (if they're not in there already) */
+//     /* parse the glossary.xml file and insert the terms */
+//     xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, false); /* conform to W3C specs */
+//     xml_set_element_handler($xml_parser, 'glossaryStartElement', 'glossaryEndElement');
+//     xml_set_character_data_handler($xml_parser, 'glossaryCharacterData');
+//
+//     if (!xml_parse($xml_parser, $glossary_xml, true)) {
+//             die(sprintf("XML error: %s at line %d",
+//                                     xml_error_string(xml_get_error_code($xml_parser)),
+//                                     xml_get_current_line_number($xml_parser)));
+//     }
+//     xml_parser_free($xml_parser);
+//     $contains_glossary_terms = true;
+//     foreach ($imported_glossary as $term => $defn) {
+//             if (!$glossary[urlencode($term)]) {
+//                     $sql = "INSERT INTO ".TABLE_PREFIX."glossary VALUES (NULL, $_SESSION[course_id], '$term', '$defn', 0)";
+//                     mysql_query($sql, $db); 
+//             }
+//     }
+//}
+
+// Check if all the files exists in the manifest, iff it's a IMS CC package.
+if ($content_type == 'IMS Common Cartridge') {
+       checkResources($import_path);
+}
+
+// Check if there are any errors during parsing.
+if ($msg->containsErrors()) {
+       if (isset($_GET['tile'])) {
+               header('Location: '.$_base_path.'tools/tile/index.php');
+       } else {
+               header('Location: ../index.php');
+       }
+       exit;
+}
+
+/* initialize DAO objects */
+$coursesDAO = new CoursesDAO();
+$contentDAO = new ContentDAO();
+
+/* generate a unique new package base path based on the package file name and date as needed. */
+/* the package name will be the dir where the content for this package will be put, as a result */
+/* the 'content_path' field in the content table will be set to this path. */
+/* $package_base_name_url comes from the URL file name (NOT the file name of the actual file we open)*/
+if (!$package_base_name && $package_base_name_url) {
+       $package_base_name = substr($package_base_name_url, 0, -4);
+} else if (!$package_base_name) {
+       $package_base_name = substr($_FILES['file']['name'], 0, -4);
+}
+
+// create course
+if (isset($_POST['hide_course']))
+       $access = 'private';
+else
+       $access = 'public';
+
+$course_id = $coursesDAO->Create($_SESSION['user_id'], 'top', $access, $package_base_name, $package_base_description, 
+             '', '', '', '', $package_primay_lang, '', '');
+
+$package_base_name = strtolower($package_base_name);
+$package_base_name = str_replace(array('\'', '"', ' ', '|', '\\', '/', '<', '>', ':'), '_' , $package_base_name);
+$package_base_name = preg_replace("/[^A-Za-z0-9._\-]/", '', $package_base_name);
+
+if (is_dir(TR_TEMP_DIR . $course_id.'/'.$package_base_name)) {
+       $package_base_name .= '_'.date('ymdHis');
+}
+
+if ($package_base_path) {
+       $package_base_path = implode('/', $package_base_path);
+} elseif (empty($package_base_path)){
+       $package_base_path = '';
+}
+
+if ($xml_base_path) {
+       $package_base_path = $xml_base_path . $package_base_path;
+
+       mkdir(TR_TEMP_DIR .$course_id.'/'.$xml_base_path);
+       $package_base_name = $xml_base_path . $package_base_name;
+}
+
+/* get the top level content ordering offset */
+//$sql = "SELECT MAX(ordering) AS ordering FROM ".TABLE_PREFIX."content WHERE course_id=$_SESSION[course_id] AND content_parent_id=$cid";
+//$result = mysql_query($sql, $db);
+//$row = mysql_fetch_assoc($result);
+$order_offset = $contentDAO->getMaxOrdering($course_id, 0); /* it's nice to have a real number to deal with */
+$lti_offset = array(); //since we don't need lti tools, the ordering needs to be subtracted
+//reorder the items stack
+$items = rehash($items);
+
+foreach ($items as $item_id => $content_info) 
+{      
+       //formatting field, default 1
+       $content_formatting = 1;        //CONTENT_TYPE_CONTENT
+
+       //if this is any of the LTI tools, skip it. (ie. Discussion Tools, Weblinks, etc)
+       //take this condition out once the LTI tool kit is implemented.
+       if ($content_info['type']=='imsdt_xmlv1p0'){
+               $lti_offset[$content_info['parent_content_id']]++;
+               continue;
+       }
+
+       //don't want to display glossary as a page
+       if ($content_info['href']== $glossary_path . 'glossary.xml'){
+               continue;
+       }
+
+       //handle the special case of cc import, where there is no content association. The resource should
+       //still be imported.
+       if(!isset($content_info['parent_content_id'])){
+               //if this is a question bank 
+               if ($content_info['type']=="imsqti_xmlv1p2/imscc_xmlv1p0/question-bank"){
+                       addQuestions($content_info['href'], $content_info, $import_path);
+               }
+       }
+
+       //if it has no title, most likely it is not a page but just a normal item, skip it
+       if (!isset($content_info['title'])){
+               continue;
+       }
+       
+       //check dependency immediately, then handles it
+       $head = '';
+       if (is_array($content_info['dependency']) && !empty($content_info['dependency'])){
+               foreach($content_info['dependency'] as $dependency_ref){
+                       //handle styles 
+                       if (preg_match('/(.*)\.css$/', $items[$dependency_ref]['href'])){
+                               //calculate where this is based on our current base_href. 
+                               //assuming the dependency folders are siblings of the item
+                               $head = '<link rel="stylesheet" type="text/css" href="../'.$items[$dependency_ref]['href'].'" />';
+                       }
+               }
+       }
+       
+       // remote href
+       if (preg_match('/^http.*:\/\//', trim($content_info['href'])) )
+       {
+               $content = '<a href="'.$content_info['href'].'" target="_blank">'.$content_info['title'].'</a>';
+       }
+       else
+       {
+               if (isset($content_info['href'], $xml_base_path)) {
+                       $content_info['href'] = $xml_base_path . $content_info['href'];
+               }
+               if (!isset($content_info['href'])) {
+                       // this item doesn't have an identifierref. so create an empty page.
+                       // what we called a folder according to v1.2 Content Packaging spec
+                       // Hop over
+                       $content = '';
+                       $ext = '';
+                       $last_modified = date('Y-m-d H:i:s');
+               } else {
+                       $file_info = @stat($import_path.$content_info['href']);
+                       if ($file_info === false) {
+                               continue;
+                       }
+               
+                       $path_parts = pathinfo($import_path.$content_info['href']);
+                       $ext = strtolower($path_parts['extension']);
+
+                       $last_modified = date('Y-m-d H:i:s', $file_info['mtime']);
+               }
+               if (in_array($ext, array('gif', 'jpg', 'bmp', 'png', 'jpeg'))) {
+                       /* this is an image */
+                       $content = '<img src="'.$content_info['href'].'" alt="'.$content_info['title'].'" />';
+               } else if ($ext == 'swf') {
+                       /* this is flash */
+            /* Using default size of 550 x 400 */
+
+                       $content = '<object type="application/x-shockwave-flash" data="' . $content_info['href'] . '" width="550" height="400"><param name="movie" value="'. $content_info['href'] .'" /></object>';
+
+               } else if ($ext == 'mov') {
+                       /* this is a quicktime movie  */
+            /* Using default size of 550 x 400 */
+
+                       $content = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="550" height="400" codebase="http://www.apple.com/qtactivex/qtplugin.cab"><param name="src" value="'. $content_info['href'] . '" /><param name="autoplay" value="true" /><param name="controller" value="true" /><embed src="' . $content_info['href'] .'" width="550" height="400" controller="true" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>';
+
+               /* Oct 19, 2009
+                * commenting this whole chunk out.  It's part of my test import codes, not sure why it's here, 
+                * and I don't think it should be here.  Remove this whole comment after further testing and confirmation.
+                * @harris
+                *
+                       //Mimic the array for now.
+                       $test_attributes['resource']['href'] = $test_xml_file;
+                       $test_attributes['resource']['type'] = isset($items[$item_id]['type'])?'imsqti_xmlv1p2':'imsqti_xmlv1p1';
+                       $test_attributes['resource']['file'] = $items[$item_id]['file'];
+//                     $test_attributes['resource']['file'] = array($test_xml_file);
+
+                       //Get the XML file out and start importing them into our database.
+                       //TODO: See question_import.php 287-289.
+                       $qids = $qti_import->importQuestions($test_attributes);
+               
+                */
+               } else if ($ext == 'mp3') {
+                       $content = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="200" height="15" codebase="http://www.apple.com/qtactivex/qtplugin.cab"><param name="src" value="'. $content_info['href'] . '" /><param name="autoplay" value="false" /><embed src="' . $content_info['href'] .'" width="200" height="15" autoplay="false" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>';
+               } else if (in_array($ext, array('wav', 'au'))) {
+                       $content = '<embed SRC="'.$content_info['href'].'" autostart="false" width="145" height="60"><noembed><bgsound src="'.$content_info['href'].'"></noembed></embed>';
+
+               } else if (in_array($ext, array('txt', 'css', 'html', 'htm', 'csv', 'asc', 'tsv', 'xml', 'xsl'))) {
+                       /* this is a plain text file */
+                       $content = file_get_contents($import_path.$content_info['href']);
+                       if ($content === false) {
+                               /* if we can't stat() it then we're unlikely to be able to read it */
+                               /* so we'll never get here. */
+                               continue;
+                       }
+
+                       // get the contents of the 'head' element
+                       $head .= ContentUtility::getHtmlHeadByTag($content, $html_head_tags);
+                       
+                       // Specifically handle eXe package
+                       // NOTE: THIS NEEDS WORK! TO FIND A WAY APPLY EXE .CSS FILES ONLY ON COURSE CONTENT PART.
+                       // NOW USE OUR OWN .CSS CREATED SOLELY FOR EXE
+                       $isExeContent = false;
+
+                       // check xml file in eXe package
+                       if (preg_match("/<organization[ ]*identifier=\"eXe*>*/", $ims_manifest_xml))
+                       {
+                               $isExeContent = true;
+                       }
+
+                       // use ATutor's eXe style sheet as the ones from eXe conflicts with ATutor's style sheets
+                       if ($isExeContent)
+                       {
+                               $head = preg_replace ('/(<style.*>)(.*)(<\/style>)/ms', '\\1@import url(/docs/exestyles.css);\\3', $head);
+                       }
+
+                       // end of specifically handle eXe package
+
+                       $content = ContentUtility::getHtmlBody($content);
+                       if ($contains_glossary_terms) 
+                       {
+                               // replace glossary content package links to real glossary mark-up using [?] [/?]
+                               // refer to bug 3641, edited by Harris
+                               $content = preg_replace('/<a href="([.\w\d\s]+[^"]+)" target="body" class="at-term">([.\w\d\s&;"]+|.*)<\/a>/i', '[?]\\2[/?]', $content);
+                       }
+
+                       /* potential security risk? */
+                       if ( strpos($content_info['href'], '..') === false && !preg_match('/((.*)\/)*tests\_[0-9]+\.xml$/', $content_info['href'])) {
+//                             @unlink($import_path.$content_info['href']);
+                       }
+               } else if ($ext) {
+                       /* non text file, and can't embed (example: PDF files) */
+                       $content = '<a href="'.$content_info['href'].'">'.$content_info['title'].'</a>';
+               }       
+       }
+       $content_parent_id = $cid;
+       if ($content_info['parent_content_id'] !== 0) {
+               $content_parent_id = $items[$content_info['parent_content_id']]['real_content_id'];
+               //if it's not there, use $cid
+               if (!$content_parent_id){
+                       $content_parent_id = $cid;
+               }
+       }
+
+       $my_offset = 0;
+       if ($content_parent_id == $cid) {
+               $my_offset = $order_offset;
+       }
+
+       /* replace the old path greatest common denomiator with the new package path. */
+       /* we don't use str_replace, b/c there's no knowing what the paths may be         */
+       /* we only want to replace the first part of the path.  
+       */
+       if ($package_base_path != '') {
+               $content_info['new_path'] = $package_base_name . substr($content_info['new_path'], strlen($package_base_path));
+       } else {
+               $content_info['new_path'] = $package_base_name . '/' . $content_info['new_path'];
+       }
+
+       //handles weblinks
+       if ($content_info['type']=='imswl_xmlv1p0'){
+               $weblinks_parser = new WeblinksParser();
+               $xml_content = @file_get_contents($import_path . $content_info['href']);
+               $weblinks_parser->parse($xml_content);
+               $content_info['title'] = $weblinks_parser->getTitle();
+               $content = $weblinks_parser->getUrl();
+               $content_folder_type = CONTENT_TYPE_WEBLINK;
+               $content_formatting = 2;
+       }
+       $head = addslashes($head);
+       $content_info['title'] = addslashes($content_info['title']);
+       $content_info['test_message'] = addslashes($content_info['test_message']);
+
+       //if this file is a test_xml, create a blank page instead, for imscc.
+       if (preg_match('/((.*)\/)*tests\_[0-9]+\.xml$/', $content_info['href']) 
+               || preg_match('/imsqti\_(.*)/', $content_info['type'])) {
+               $content = '';
+       } else {
+               $content = addslashes($content);
+       }
+
+       //check for content_type
+       if ($content_formatting!=CONTENT_TYPE_WEBLINK){
+               $content_folder_type = ($content==''?CONTENT_TYPE_FOLDER:CONTENT_TYPE_CONTENT);
+       }
+
+       $items[$item_id]['real_content_id'] = $contentDAO->Create($course_id, intval($content_parent_id), 
+                           ($content_info['ordering'] + $my_offset - $lti_offset[$content_info['parent_content_id']] + 1),
+                           $last_modified, 0, $content_formatting, "", $content_info['new_path'], $content_info['title'],
+                           $content, $head, 1, $content_info['test_message'], 0, $content_folder_type);
+//     $sql= 'INSERT INTO '.TABLE_PREFIX.'content'
+//           . '(course_id, 
+//               content_parent_id, 
+//               ordering,
+//               last_modified, 
+//               revision, 
+//               formatting, 
+//               head,
+//               use_customized_head,
+//               keywords, 
+//               content_path, 
+//               title, 
+//               text,
+//                       test_message,
+//                       content_type) 
+//            VALUES 
+//                          ('.$_SESSION['course_id'].','                                                                                                                      
+//                          .intval($content_parent_id).','            
+//                          .($content_info['ordering'] + $my_offset - $lti_offset[$content_info['parent_content_id']] + 1).','
+//                          .'"'.$last_modified.'",                                                                                                    
+//                           0,'
+//                          .$content_formatting.' ,"'
+//                          . $head .'",
+//                          1,
+//                           "",'
+//                          .'"'.$content_info['new_path'].'",'
+//                          .'"'.$content_info['title'].'",'
+//                          .'"'.$content.'",'
+//                              .'"'.$content_info['test_message'].'",'
+//                              .$content_folder_type.')';
+//
+//     $result = mysql_query($sql, $db) or die(mysql_error());
+
+       /* get the content id and update $items */
+//     $items[$item_id]['real_content_id'] = mysql_insert_id($db);
+
+       /* get the tests associated with this content */
+       if (!empty($items[$item_id]['tests']) || strpos($items[$item_id]['type'], 'imsqti_xmlv1p2/imscc_xmlv1p0') !== false){
+               $qti_import = new QTIImport($import_path);
+
+               if (isset($items[$item_id]['tests'])){
+                       $loop_var = $items[$item_id]['tests'];
+               } else {
+                       $loop_var = $items[$item_id]['file'];
+               }
+
+               foreach ($loop_var as $array_id => $test_xml_file){
+                       //call subrountine to add the questions.
+                       $qids = addQuestions($test_xml_file, $items[$item_id], $import_path);
+                       
+                       //import test
+                       $tid = $qti_import->importTest($content_info['title']);
+
+                       //associate question and tests
+                       foreach ($qids as $order=>$qid){
+                               if (isset($qti_import->weights[$order])){
+                                       $weight = round($qti_import->weights[$order]);
+                               } else {
+                                       $weight = 0;
+                               }
+                               $new_order = $order + 1;
+                               $sql = "INSERT INTO " . TABLE_PREFIX . "tests_questions_assoc" . 
+                                               "(test_id, question_id, weight, ordering, required) " .
+                                               "VALUES ($tid, $qid, $weight, $new_order, 0)";
+                               $result = mysql_query($sql, $db);
+                       }
+
+                       //associate content and test
+                       $sql =  'INSERT INTO ' . TABLE_PREFIX . 'content_tests_assoc' . 
+                                       '(content_id, test_id) ' .
+                                       'VALUES (' . $items[$item_id]['real_content_id'] . ", $tid)";
+                       $result = mysql_query($sql, $db);
+               
+//                     if (!$msg->containsErrors()) {
+//                             $msg->addFeedback('IMPORT_SUCCEEDED');
+//                     }
+               }
+       }
+
+       /* get the a4a related xml */
+       if (isset($items[$item_id]['a4a_import_enabled']) && isset($items[$item_id]['a4a']) && !empty($items[$item_id]['a4a'])) {
+               $a4a_import = new A4aImport($items[$item_id]['real_content_id']);
+               $a4a_import->setRelativePath($items[$item_id]['new_path']);
+               $a4a_import->importA4a($items[$item_id]['a4a']);
+       }
+}
+
+if ($package_base_path == '.') {
+       $package_base_path = '';
+}
+
+// loop through the files outside the package folder, and copy them to its relative path
+if (is_dir(TR_TEMP_DIR . 'import/'.$course_id.'/resources')) {
+       $handler = opendir(TR_TEMP_DIR . 'import/'.$course_id.'/resources');
+       while ($file = readdir($handler)){
+               $filename = TR_TEMP_DIR . 'import/'.$course_id.'/resources/'.$file;
+               if(is_file($filename)){
+                       @rename($filename, TR_TEMP_DIR .$course_id.'/'.$package_base_name.'/'.$file);
+               }
+       }
+       closedir($handler);
+}
+
+$course_dir = TR_TEMP_DIR.$course_id.'/';
+
+if (!is_dir($course_dir)) {
+       if (!@mkdir($course_dir, 0700)) {
+               $msg->addError('IMPORTDIR_FAILED');
+       }
+}
+
+
+if (@rename($import_path.$package_base_path, $course_dir.$package_base_name) === false) {
+       if (!$msg->containsErrors()) {
+               $msg->addError('IMPORT_FAILED');debug('3');exit;
+       }
+}
+//check if there are still resources missing
+foreach($items as $idetails){
+       $temp_path = pathinfo($idetails['href']);
+       @rename($import_path.$temp_path['dirname'], $course_dir.$package_base_name . '/' . $temp_path['dirname']);
+}
+clr_dir($import_path);
+
+if (isset($_POST['url'])) {
+       @unlink($full_filename);
+}
+
+
+//if ($_POST['s_cid'] || $course_id){
+       if (!$msg->containsErrors()) {
+               $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
+       }
+       header('Location: ../course.php?cid='.$course_id);
+       exit;
+//} else {
+//     if (!$msg->containsErrors()) {
+//             $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
+//     }
+//     if ($_GET['tile']) {
+//             header('Location: '.TR_BASE_HREF.'tools/tile/index.php');
+//     } else {
+//             header('Location: ../course.php?cid='.$course_id);
+//     }
+//     exit;
+//}
+
+?>
index 72d0d8f..20dd827 100644 (file)
@@ -1,17 +1,76 @@
-<?php\r
-/************************************************************************/\r
-/* AFrame                                                               */\r
-/************************************************************************/\r
-/* Copyright (c) 2009                                                   */\r
-/* Adaptive Technology Resource Centre / University of Toronto          */\r
-/*                                                                      */\r
-/* This program is free software. You can redistribute it and/or        */\r
-/* modify it under the terms of the GNU General Public License          */\r
-/* as published by the Free Software Foundation.                        */\r
-/************************************************************************/\r
-\r
-define('AF_INCLUDE_PATH', '../include/');\r
-require(AF_INCLUDE_PATH.'vitals.inc.php');\r
-\r
-$savant->display('home/index.tmpl.php');\r
+<?php
+/************************************************************************/
+/* Transformable                                                        */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* This program is free software. You can redistribute it and/or        */
+/* modify it under the terms of the GNU General Public License          */
+/* as published by the Free Software Foundation.                        */
+/************************************************************************/
+
+define('TR_INCLUDE_PATH', '../include/');
+require(TR_INCLUDE_PATH.'vitals.inc.php');
+require(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
+require(TR_INCLUDE_PATH.'classes/DAO/UserCoursesDAO.class.php');
+
+global $_current_user;
+
+$coursesDAO = new CoursesDAO();
+$userCoursesDAO = new UserCoursesDAO();
+
+if (isset($_GET['action'], $_GET['cid']) && $_SESSION['user_id'] > 0)
+{
+       $cid = intval($_GET['cid']);
+       
+       if ($_GET['action'] == 'remove') $userCoursesDAO->Delete($_SESSION['user_id'], $cid);
+}
+
+// retrieve data to display
+if ($_SESSION['user_id'] > 0) {
+       // get my authoring courses
+       $my_authoring_courses = $coursesDAO->getAuthoringCourses($_SESSION['user_id']);
+       if (is_array($my_authoring_courses))
+       {
+               foreach ($my_authoring_courses as $course)
+               {
+                       $course['my_own_course'] = 1;
+                       $my_courses[] = $course;
+               }
+       }
+       
+       // get courses that are authored by others
+       $other_ppl_courses = $userCoursesDAO->getByUserID($_SESSION['user_id']); 
+       if (is_array($other_ppl_courses))
+       {
+               foreach ($other_ppl_courses as $course)
+               {
+                       $course['my_own_course'] = 0;
+                       $other_courses[] = $course;
+               }
+       }
+       
+       // merge my courses and other ppl's courses
+       if (is_array($my_courses) && is_array($other_courses)) $courses = array_merge($my_courses, $other_courses);
+       else if (is_array($my_courses)) $courses = $my_courses;
+       else $courses = $other_courses;
+}
+
+
+if (is_array($courses))
+{
+       $curr_page_num = intval($_GET['p']);
+       if (!$curr_page_num) {
+               $curr_page_num = 1;
+       }       
+       $savant->assign('courses', $courses);
+       $savant->assign('curr_page_num', $curr_page_num);
+       
+       $savant->display('home/index_course.tmpl.php');
+}
+else
+{
+       $savant->display('home/index_search.tmpl.php');
+}
 ?>
\ No newline at end of file
diff --git a/docs/images/action_add.png b/docs/images/action_add.png
new file mode 100644 (file)
index 0000000..d91b835
Binary files /dev/null and b/docs/images/action_add.png differ
diff --git a/docs/images/action_delete.png b/docs/images/action_delete.png
new file mode 100644 (file)
index 0000000..c779804
Binary files /dev/null and b/docs/images/action_delete.png differ
diff --git a/docs/images/download.png b/docs/images/download.png
new file mode 100644 (file)
index 0000000..7e6636e
Binary files /dev/null and b/docs/images/download.png differ
diff --git a/docs/images/transfer.gif b/docs/images/transfer.gif
new file mode 100644 (file)
index 0000000..3131207
Binary files /dev/null and b/docs/images/transfer.gif differ
diff --git a/docs/include/classes/A4a/A4a.class.php b/docs/include/classes/A4a/A4a.class.php
new file mode 100644 (file)
index 0000000..bd4870e
--- /dev/null
@@ -0,0 +1,243 @@
+<?php
+/********************************************************************/
+/* ATutor                                                                                                                      */
+/********************************************************************/
+/* Copyright (c) 2002-2008 by Greg Gay, Cindy Qi Li, & Harris Wong     */
+/* Adaptive Technology Resource Centre / University of Toronto         */
+/* http://atutor.ca                                                                                                    */
+/*                                                                                                                                     */
+/* This program is free software. You can redistribute it and/or       */
+/* modify it under the terms of the GNU General Public License         */
+/* as published by the Free Software Foundation.                                       */
+/********************************************************************/
+// $Id: A4a.class.php 8077 2008-10-23 18:32:31Z hwong $
+
+
+/**
+ * Accessforall General class.
+ * Based on the specification at: 
+ *             http://www.imsglobal.org/accessibility/index.html
+ *
+ * @date       Oct 3rd, 2008
+ * @author     Harris Wong
+ */
+class A4a {
+       //variables
+       var $cid = 0;                                           //content id
+       var $resource_types = array();          //resource types hash mapping
+       var $relative_path = '';                        //relative path to the file 
+
+       //Constructor
+       function A4a($cid){
+               $this->cid = intval($cid);
+       }
+
+
+       // Return resources type hash mapping.
+       function getResourcesType($type_id=0){
+               global $db;
+
+               $type_id = intval($type_id);
+
+               //if this is the first time calling this function, grab the list from db
+               if (empty($resource_types)){
+                       $sql = 'SELECT * FROM '.TABLE_PREFIX.'resource_types';
+                       $result = mysql_query($sql, $db);
+                       while ($row = mysql_fetch_assoc($result)){
+                               $this->resource_types[$row['type_id']] = $row['type'];
+                       }
+               }
+
+               if (!empty($this->resource_types[$type_id])){
+                       return $this->resource_types[$type_id];         
+               }
+               return $this->resource_types;
+       }
+
+       
+       // Get primary resources
+       function getPrimaryResources(){
+               global $db;
+
+               $pri_resources = array(); // cid=>[resource, language code]
+               $sql = 'SELECT * FROM '.TABLE_PREFIX.'primary_resources WHERE content_id='.$this->cid;
+               $result = mysql_query($sql, $db);
+               if (mysql_numrows($result) > 0){
+                       while ($row = mysql_fetch_assoc($result)){
+                               $pri_resources[$row['primary_resource_id']]['resource'] = $row['resource'];
+                               if ($row['language_code'] != ''){
+                                       $pri_resources[$row['primary_resource_id']]['language_code'] = $row['language_code'];
+                               }
+                       }
+               }
+               return $pri_resources;
+       }
+
+
+       // Get primary resources types
+       function getPrimaryResourcesTypes($pri_resource_id=0){
+               global $db;
+
+               $pri_resource_id = intval($pri_resource_id);
+
+               //quit if id not specified
+               if ($pri_resource_id == 0) {
+                       return array();
+               }
+
+               $pri_resources_types = array(); // cid=>[type id]+
+               $sql = 'SELECT * FROM '.TABLE_PREFIX.'primary_resources_types WHERE primary_resource_id='.$pri_resource_id;
+               $result = mysql_query($sql, $db);
+               if ($result){
+                       while ($row = mysql_fetch_assoc($result)){
+                               $pri_resources_types[$pri_resource_id][] = $row['type_id'];
+                       }
+               }
+               return $pri_resources_types;
+       }
+
+
+       // Get secondary resources 
+       function getSecondaryResources($pri_resource_id=0){
+               global $db;
+
+               $pri_resource_id = intval($pri_resource_id);
+
+               //quit if id not specified
+               if ($pri_resource_id == 0) {
+                       return array();
+               }
+
+               $sec_resources = array(); // cid=>[resource, language code]
+               $sql = 'SELECT * FROM '.TABLE_PREFIX.'secondary_resources WHERE primary_resource_id='.$pri_resource_id;
+               $result = mysql_query($sql, $db);
+               if ($result){
+                       while ($row = mysql_fetch_assoc($result)){
+                               $sec_resources[$row['secondary_resource_id']]['resource'] = $row['secondary_resource'];
+                               if ($row['language_code'] != ''){
+                                       $sec_resources[$row['secondary_resource_id']]['language_code'] = $row['language_code'];
+                               }
+                       }
+               }
+               return $sec_resources;
+       }
+
+
+       // Get secondary resources types
+       function getSecondaryResourcesTypes($sec_resource_id=0){
+               global $db;
+
+               $sec_resource_id = intval($sec_resource_id);
+
+               //quit if id not specified
+               if ($sec_resource_id == 0) {
+                       return array();
+               }
+
+               $sec_resources_types = array(); // cid=>[type id]+
+               $sql = 'SELECT * FROM '.TABLE_PREFIX.'secondary_resources_types WHERE secondary_resource_id='.$sec_resource_id;
+               $result = mysql_query($sql, $db);
+               if ($result){
+                       while ($row = mysql_fetch_assoc($result)){
+                               $sec_resources_types[] = $row['type_id'];
+                       }
+               }
+               return $sec_resources_types;
+       }
+
+
+       // Insert primary resources into the db
+       // @return primary resource id.
+       function setPrimaryResource($content_id, $file_name, $lang){
+               global $addslashes, $db; 
+
+               $content_id = intval($content_id);
+               $file_name = $addslashes($file_name);
+               $lang = $addslashes($lang);
+
+               $sql = "INSERT INTO ".TABLE_PREFIX."primary_resources SET content_id=$content_id, resource='$file_name', language_code='$lang'";
+               $result = mysql_query($sql, $db);
+               if ($result){
+                       return mysql_insert_id();
+               }
+               return false;
+       }
+
+       // Insert primary resource type
+       function setPrimaryResourceType($primary_resource_id, $type_id){
+               global $db; 
+
+               $primary_resource_id= intval($primary_resource_id);
+               $type_id = intval($type_id);
+
+               $sql = "INSERT INTO ".TABLE_PREFIX."primary_resources_types SET primary_resource_id=$primary_resource_id, type_id=$type_id";
+               $result = mysql_query($sql, $db);
+       }
+
+       // Insert secondary resource
+       // @return secondary resource id
+       function setSecondaryResource($primary_resource_id, $file_name, $lang){
+               global $addslashes, $db; 
+
+               $primary_resource_id = intval($primary_resource_id);
+               $file_name = $addslashes($file_name);
+               $lang = $addslashes($lang);
+
+               $sql = "INSERT INTO ".TABLE_PREFIX."secondary_resources SET primary_resource_id=$primary_resource_id, secondary_resource='$file_name', language_code='$lang'";
+               $result = mysql_query($sql, $db);
+               if ($result){
+                       return mysql_insert_id();
+               }
+               return false;
+       }
+
+       // Insert secondary resource
+       function setSecondaryResourceType($secondary_resource, $type_id){
+               global $db;
+
+               $secondary_resource = intval($secondary_resource);
+               $type_id = intval($type_id);
+
+               $sql = "INSERT INTO ".TABLE_PREFIX."secondary_resources_types SET secondary_resource_id=$secondary_resource, type_id=$type_id";
+               $result = mysql_query($sql, $db);
+       }
+
+       
+       // Set the relative path to all files
+       function setRelativePath($path){
+               $this->relative_path = $path . '/';
+       }
+
+
+       // Delete all materials associated with this content
+       function deleteA4a(){
+               global $db; 
+
+               $pri_resource_ids = array();
+
+               // Get all primary resources ID out that're associated with this content
+               $sql = 'SELECT a.primary_resource_id FROM '.TABLE_PREFIX.'primary_resources a LEFT JOIN '.TABLE_PREFIX.'primary_resources_types b ON a.primary_resource_id=b.primary_resource_id WHERE content_id='.$this->cid;
+               $result = mysql_query($sql);
+
+               while($row=mysql_fetch_assoc($result)){
+                       $pri_resource_ids[] = $row['primary_resource_id'];
+               }
+
+               //If the are primary resources found
+               if (!empty($pri_resource_ids)){
+                       $glued_pri_ids = implode(",", $pri_resource_ids);
+
+                       // Delete all secondary a4a
+                       $sql = 'DELETE c, d FROM '.TABLE_PREFIX.'secondary_resources c LEFT JOIN '.TABLE_PREFIX.'secondary_resources_types d ON c.secondary_resource_id=d.secondary_resource_id WHERE primary_resource_id IN ('.$glued_pri_ids.')';
+                       $result = mysql_query($sql);
+
+                       // If successful, remove all primary resources
+                       if ($result){
+                               $sql = 'DELETE a, b FROM '.TABLE_PREFIX.'primary_resources a LEFT JOIN '.TABLE_PREFIX.'primary_resources_types b ON a.primary_resource_id=b.primary_resource_id WHERE content_id='.$this->cid;
+                               mysql_query($sql);
+                       }
+               }
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/docs/include/classes/A4a/A4a.tmpl.php b/docs/include/classes/A4a/A4a.tmpl.php
new file mode 100644 (file)
index 0000000..b248dd6
--- /dev/null
@@ -0,0 +1,50 @@
+<accessForAllResource>  
+       <?php 
+       if (!empty($this->orig_access_mode)):
+       foreach($this->orig_access_mode as $orig_access_mode):
+       ?>
+       <accessModeStatement>           
+               <originalAccessMode><?php echo $orig_access_mode; ?></originalAccessMode>
+               <accessModeUsage>informative</accessModeUsage>
+               <language><?php echo $this->language_code; ?></language>
+       </accessModeStatement>
+       <?php 
+       endforeach;
+       endif; 
+       ?>
+       
+       <?php if (!empty($this->secondary_resources)): ?>
+       <?php foreach ($this->secondary_resources as $uri): ?>
+       <hasAdaptation><?php echo $this->relative_path.$uri; ?></hasAdaptation>
+       <?php endforeach; ?>
+       <?php endif; ?>
+
+       <?php if (isset($this->primary_resources) && $this->primary_resources!=''): ?>
+       <isAdaptation>
+               <isAdaptationOf><?php echo $this->relative_path.$this->primary_resource_uri; ?></isAdaptationOf>
+               <extent>full</extent>
+       </isAdaptation>
+       <?php foreach ($this->primary_resources as $type_id): ?>
+       <adaptationStatement>
+                       <?php
+                       switch($type_id){
+                               case 1:
+                                       $orig_access_mode = 'auditory';
+                                       break;
+                               case 3:
+                                       $orig_access_mode = 'textual';
+                                       break;
+                               case 2:
+                               case 4:
+                                       //sign language, and visual
+                                       $orig_access_mode = 'visual';
+                                       break;
+                               default:
+                                       $orig_access_mode = '';
+                       }
+               ?>
+               <originalAccessMode><?php echo $orig_access_mode; ?></originalAccessMode>
+       </adaptationStatement>
+       <?php endforeach; ?>
+       <?php endif; ?>
+</accessForAllResource>
\ No newline at end of file
diff --git a/docs/include/classes/A4a/A4aExport.class.php b/docs/include/classes/A4a/A4aExport.class.php
new file mode 100644 (file)
index 0000000..7424708
--- /dev/null
@@ -0,0 +1,170 @@
+<?php
+/****************************************************************/
+/* ATutor                                                                                                              */
+/****************************************************************/
+/* Copyright (c) 2002-2009                                                                             */
+/* Adaptive Technology Resource Centre / University of Toronto  */
+/* http://atutor.ca                                                                                            */
+/*                                                              */
+/* This program is free software. You can redistribute it and/or*/
+/* modify it under the terms of the GNU General Public License  */
+/* as published by the Free Software Foundation.                               */
+/****************************************************************/
+// $Id: A4aExport.class.php 8804 2009-09-29 21:17:00Z hwong $
+
+require_once(AT_INCLUDE_PATH.'classes/A4a/A4a.class.php');
+//require(AT_INCLUDE_PATH.'classes/zipfile.class.php'); // for zipfile
+
+/**
+ * Accessforall Export class.
+ * Based on the specification at: 
+ *             http://www.imsglobal.org/accessibility/index.html
+ *
+ * @date       Oct 3rd, 2008
+ * @author     Harris Wong
+ */
+class A4aExport extends A4a {
+       var $original_files = array();  //store all the primary/original resources in [id]=>[incrementer]=>[resource, language, type]
+//     var $alternative_files = array();       //secondary files aka. alternative, equivalent
+
+       /**
+        * Get information for this content
+        * @return the xml content
+        */     
+       function getAlternative(){
+               $resources = parent::getPrimaryResources();
+
+               foreach($resources as $rid => $prop){
+                       $resources_types = parent::getPrimaryResourcesTypes($rid);
+                       $temp = array();
+                       $secondary_array = array();
+                       foreach($resources_types as $rtid){
+                               $sec_resources['secondary_resources'] = parent::getSecondaryResources($rid);
+                               //determine secondary resource type
+                               foreach ($sec_resources['secondary_resources'] as $sec_id => $sec_resource){
+                                       $current_sec_file = $sec_resource['resource'];
+                                       $secondary_array['secondary_resources'][] = $current_sec_file ;
+
+                                       //add to secondary file array if it's not there
+                                       if (!isset($this->original_files[$current_sec_file]) || empty($this->original_files[$current_sec_file]) ){
+                                               //TODO merge these values i think
+                                               $this->original_files[$current_sec_file ] = $sec_resource;
+                                               $this->original_files[$current_sec_file ]['resource_type'][$prop['resource']] = parent::getSecondaryResourcesTypes($sec_id);
+                                       } else {
+                                               $this->original_files[$current_sec_file ]['resource_type'][$prop['resource']] = parent::getSecondaryResourcesTypes($sec_id);
+                                       }
+                                       //add this primary file ref, and the resources type to the secondary file
+                                       $this->original_files[$current_sec_file]['primary_resources'][$prop['resource']] = $rtid;
+//                                     $this->original_files[$current_sec_file]['primary_resources'][$prop['resource']]['language_code'] = $sec_resource['language_code'];
+
+                               }
+                               $res_type['resource_type'] = $rtid;     //could be 1+
+                               $temp = array_merge($prop, $res_type, $secondary_array);
+                       }
+                       if (!empty($temp)){
+                               $this->original_files[$temp['resource']] = $temp;
+                       }
+               }
+               return $this->original_files;
+       }
+
+       /**
+        * Get all secondary files
+        * @return array of secondary files that is being used in this->content.
+        */
+       function getAllSecondaryFiles(){
+               global $db;
+               $secondary_files = array();
+
+               $sql = "SELECT DISTINCT secondary_resource FROM ".TABLE_PREFIX."primary_resources a LEFT JOIN ".TABLE_PREFIX."secondary_resources s
+                               ON a.primary_resource_id = s.primary_resource_id WHERE content_id=".$this->cid;
+               $result = mysql_query ($sql);
+               if ($result){
+                       while ($row = mysql_fetch_assoc($result)){
+                               if (!empty($row['secondary_resource'])){
+                                       $secondary_files[] = $row['secondary_resource'];
+                               }
+                       }
+               }
+               return $secondary_files;
+       }
+
+       // Save all the xml into an array. 
+       // key=filename, value=xml content
+       function exportA4a(){
+               global $savant;
+
+               $xml_array = array();   //array of xml
+
+               // Get the alt content first.
+               $this->getAlternative();
+
+               // Get original files' xml 
+               foreach($this->original_files as $id=>$resource){
+                       $orig_access_mode = array();
+
+                       foreach($resource['resource_type'] as $type_id){
+                               if (!is_array($type_id)){
+                                       //primary resource will always have just on type
+                                       $orig_access_mode[] = $this->getResourceNameById($type_id);
+                               }
+                       }
+                       $savant->assign('relative_path', $this->relative_path); //the template will need the relative path
+                       $savant->assign('orig_access_mode', $orig_access_mode);
+                       $savant->assign('language_code', $resource['language_code']);
+                       $savant->assign('secondary_resources', $resource['secondary_resources']);
+                       
+                       // If this is an alternative, and it is mapping to 
+                       // 1+ original files.  Each of these mapping requires
+                       // its own xml
+                       if(isset($resource['primary_resources'])){
+                               foreach($resource['primary_resources'] as $uri=>$pri_resource_types){
+                                       $savant->assign('primary_resource_uri', $uri);
+                                       $savant->assign('primary_resources', $pri_resource_types);
+                                       //A file can be both original and alternative, and each could represent diff language
+                                       //Tried to resolve but the A4a v.2 only accept 1 language
+//                                     $savant->assign('language_code', $pri_resource_types['language_code']);
+                                       //overwrite orig_access_mode                                    
+                                       $orig_access_mode = array(); //reinitialize
+                                       foreach($resource['resource_type'][$uri] as $type_id){
+                                               $orig_access_mode[] = $this->getResourceNameById($type_id);
+                                       }
+                                       $savant->assign('orig_access_mode', $orig_access_mode);
+                                       $xml_array[$id.' to '.$uri] = $savant->fetch(AT_INCLUDE_PATH.'classes/A4a/A4a.tmpl.php');
+                               }
+                       } else {
+                               $savant->assign('primary_resource_uri', '');
+                               $savant->assign('primary_resources', '');
+                               $xml_array[$id] = $savant->fetch(AT_INCLUDE_PATH.'classes/A4a/A4a.tmpl.php');
+                       }
+               }
+               return $xml_array;
+       }
+
+       /**
+        * Get resource name by id
+        * @return      array
+        */
+       function getResourceNameById($type_id){
+               $orig_access_mode = '';
+
+               switch($type_id){
+                       case 1:
+                               $orig_access_mode = 'auditory';
+                               break;
+                       case 3:
+                               $orig_access_mode = 'textual';
+                               break;
+                       case 2:
+                       case 4:
+                               $orig_access_mode = 'visual';
+                               break;
+                       default:
+                               $orig_access_mode = '';
+               }
+               return $orig_access_mode;
+       }
+
+}
+
+?>
\ No newline at end of file
diff --git a/docs/include/classes/A4a/A4aImport.class.php b/docs/include/classes/A4a/A4aImport.class.php
new file mode 100644 (file)
index 0000000..e349a40
--- /dev/null
@@ -0,0 +1,116 @@
+<?php
+/************************************************************************/
+/* Transformable                                                        */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* This program is free software. You can redistribute it and/or        */
+/* modify it under the terms of the GNU General Public License          */
+/* as published by the Free Software Foundation.                        */
+/************************************************************************/
+
+require_once(TR_INCLUDE_PATH.'classes/A4a/A4a.class.php');
+
+/**
+ * Accessforall Import  class.
+ * Based on the specification at: 
+ *             http://www.imsglobal.org/accessibility/index.html
+ *
+ * @date       Oct 9th, 2008
+ * @author     Harris Wong
+ */
+class A4aImport extends A4a {
+       //Constructor
+       function A4aImport($cid){
+               parent::A4a($cid);              //call its parent
+       }
+
+       /** 
+        * Import AccessForAll
+        * @param       array   XML items generated by the IMS import
+        */
+       function importA4a($items){
+               //use the items array data and insert it into the database.
+               foreach ($items as $file_path => $a4a_resources){
+                       foreach ($a4a_resources as $resource){
+                               //If it has adaptation/alternative, this is a primary file.
+                               if (isset($resource['hasAdaptation']) && !empty($resource['hasAdaptation'])){
+                                       //we only have one language in the table, [1], [2], etc will be the same
+                                       $pri_lang = $resource['language'][0];   
+
+                                       //insert primary resource
+                                       $primary_id = $this->setPrimaryResource($this->cid, str_replace($this->relative_path, '', $file_path), $pri_lang);
+
+                                       //get primary resource type
+                                       $resources_attrs = $resource['access_stmt_originalAccessMode'];
+
+                                       $attrs = $this->toResourceTypeId($resources_attrs);
+                                       
+                                       //insert primary resource type associations
+                                       foreach ($attrs as $resource_type_id){
+                                               $this->setPrimaryResourceType($primary_id, $resource_type_id);
+                                       }
+
+                                       //insert secondary resource
+                                       $secondary_resources = $resource['hasAdaptation'];      //uri array
+                                       foreach ($secondary_resources as $secondary_resource){
+                                               //some paths will reference files above this directory, as a result
+                                               //we will see ../, but since everything is under 'resources/', the relative_path
+                                               //we can safely take it out.
+                                               $secondary_resource = preg_replace('/^\.\.\//', '', $secondary_resource);
+                                               $secondary_files = $items[$this->relative_path.$secondary_resource];
+                                               //check if this secondary file is the adaptation of 
+                                               // this primary file 
+                                               foreach($secondary_files as $secondary_file){
+                                                       //isAdaptation is 1-to-1 mapping, save to use [0]
+                                                       if(($this->relative_path.$secondary_file['isAdaptationOf'][0]) == $file_path){
+                                                               $secondary_lang = $secondary_file['language'][0];
+
+                                                               //access_stmt_originalAccessMode cause we want the language for the secondary file.
+                                                               $secondary_attr = $this->toResourceTypeId($secondary_file['access_stmt_originalAccessMode']);
+                                                               $secondary_id = $this->setSecondaryResource($primary_id, $secondary_resource, $secondary_lang);
+
+                                                               //insert secondary resource type associations
+                                                               foreach ($secondary_attr as $secondary_resource_type_id){
+                                                                       $this->setSecondaryResourceType($secondary_id, $secondary_resource_type_id);
+                                                               }
+                                                               break;  //1-to-1 mapping, no need to go further
+                                                       }
+                                               }
+                                       } //foreach of secondary_resources
+                               }                               
+                       } //foreach of resources
+               } //foreach of item array
+       }
+
+       /**
+        * By the given attrs array, decide which resource type it is
+        *      auditory = type 1
+        *      textual  = type 3
+        *      visual   = type 4
+        * @param       array
+        * return type id array
+        */
+        function toResourceTypeId($resources_attrs){
+                $result = array();
+
+                //if empty
+                if (empty($resources_attrs)){
+                        return $result;
+                }
+
+                if (in_array('auditory', $resources_attrs)){
+                        $result[] = 1;
+                }
+                if (in_array('textual', $resources_attrs)){
+                        $result[] = 3;
+                }
+                if (in_array('visual', $resources_attrs)){
+                        $result[] = 4;
+                }
+                return $result;
+        }
+}
+
+?>
\ No newline at end of file
index f69bb6f..250c556 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
 * @package     DAO
 */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class ConfigDAO extends DAO {
 
index 8f0123c..e62d7f5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index 7ac202c..26bf3ff 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
 * @package     DAO
 */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class LangCodesDAO extends DAO {
 
index d172e9b..9e5fca0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
 * @package     DAO
 */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class LanguageTextDAO extends DAO {
 
@@ -148,7 +148,7 @@ class LanguageTextDAO extends DAO {
        function getHelpByMatchingText($text, $lang)
        {
                $sql    = "SELECT * FROM ".TABLE_PREFIX."language_text 
-                                               WHERE term like 'AF_HELP_%'
+                                               WHERE term like 'TR_HELP_%'
                                                AND lower(cast(text as char)) like '%".strtolower($text)."%' 
                                                AND language_code='".$lang."' 
                                                ORDER BY variable";
index 57d1080..5b4168f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
 * @package     DAO
 */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class LanguagesDAO extends DAO {
 
@@ -138,7 +138,7 @@ class LanguagesDAO extends DAO {
        function getAllEnabled()
        {
            $sql = "SELECT * FROM ".TABLE_PREFIX."languages l
-                    WHERE status = ".AF_STATUS_ENABLED."
+                    WHERE status = ".TR_STATUS_ENABLED."
                     ORDER BY l.native_name";
            return $this->execute($sql);
        }
index 53f486a..9fb36fe 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
 * @package     DAO
 */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class MailQueueDAO extends DAO {
 
index 8dba4a9..17c8b9a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
  * @package    DAO
  */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class MyownPatchesDAO extends DAO {
 
@@ -101,7 +101,7 @@ class MyownPatchesDAO extends DAO {
 
                // check if the required fields are filled
                if (($fieldName == 'system_patch_id' || $fieldName == 'applied_version') && $fieldValue == '')
-                       return array(_AT('AF_ERROR_EMPTY_FIELD'));
+                       return array(_AT('TR_ERROR_EMPTY_FIELD'));
 
                $sql = "UPDATE ".TABLE_PREFIX."myown_patches 
                           SET ".$fieldName."='".$addslashes($fieldValue)."'
index 2978925..e64dcdc 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
  * @package    DAO
  */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class MyownPatchesDependentDAO extends DAO {
 
index 6a8943e..f50ecb9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
  * @package    DAO
  */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class MyownPatchesFilesDAO extends DAO {
 
index 6d07084..96337e3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 * @package     DAO
 */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
-require_once(AF_INCLUDE_PATH. 'classes/Utility.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/Utility.class.php');
 
 class OAuthClientServersDAO extends DAO {
 
index 74fcb12..b8a8894 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
 * @package     DAO
 */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class OAuthClientTokensDAO extends DAO {
 
index 8d9a4f6..38bfc7d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 * @package     DAO
 */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
-require_once(AF_INCLUDE_PATH. 'classes/Utility.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/Utility.class.php');
 
 class OAuthServerConsumersDAO extends DAO {
 
index 5d58d1c..7c2e78c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
 * @package     DAO
 */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class OAuthServerTokensDAO extends DAO {
 
index 0d1340c..9a981a5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
  * @package    DAO
  */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class PatchesDAO extends DAO {
 
index 7e5b2b2..e7fbb3f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
  * @package    DAO
  */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class PatchesFilesActionsDAO extends DAO {
 
index 4785235..1ab039c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
  * @package    DAO
  */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class PatchesFilesDAO extends DAO {
 
index 95034d5..c1b4142 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
 * @package     DAO
 */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class PrivilegesDAO extends DAO {
 
index 16b0bac..d5c5b32 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
 * @package     DAO
 */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class ThemesDAO extends DAO {
 
@@ -59,7 +59,7 @@ class ThemesDAO extends DAO {
        */
        function getDefaultTheme()
        {
-    $sql = "SELECT * FROM ".TABLE_PREFIX."themes WHERE status=".AF_STATUS_DEFAULT;
+    $sql = "SELECT * FROM ".TABLE_PREFIX."themes WHERE status=".TR_STATUS_DEFAULT;
     return $this->execute($sql);
   }
 
@@ -72,7 +72,7 @@ class ThemesDAO extends DAO {
        */
        function getEnabledTheme()
        {
-    $sql = "SELECT * FROM ".TABLE_PREFIX."themes WHERE status in (".AF_STATUS_ENABLED.", ".AF_STATUS_DEFAULT.")";
+    $sql = "SELECT * FROM ".TABLE_PREFIX."themes WHERE status in (".TR_STATUS_ENABLED.", ".TR_STATUS_DEFAULT.")";
     return $this->execute($sql);
   }
 
index 448ae9c..1b0894f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
  * @package    DAO
  */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class UserGroupPrivilegeDAO extends DAO {
 
index e52504f..01a8812 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,9 +17,9 @@
  * @package    DAO
  */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
 
 class UserGroupsDAO extends DAO {
 
@@ -141,7 +141,7 @@ class UserGroupsDAO extends DAO {
                global $addslashes;
 
                // check if the required fields are filled
-               if ($fieldName == 'title' && $fieldValue == '') return array(_AT('AF_ERROR_EMPTY_FIELD'));
+               if ($fieldName == 'title' && $fieldValue == '') return array(_AT('TR_ERROR_EMPTY_FIELD'));
                
                $sql = "UPDATE ".TABLE_PREFIX."user_groups 
                           SET ".$fieldName."='".$addslashes($fieldValue)."'
@@ -160,7 +160,7 @@ class UserGroupsDAO extends DAO {
        public function Delete($userGroupID)
        {
                // delete user_group_privilege
-               include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupPrivilegeDAO.class.php');
+               include_once(TR_INCLUDE_PATH.'classes/DAO/UserGroupPrivilegeDAO.class.php');
                
                $userGroupPrivilegeDAO = new UserGroupPrivilegeDAO();
                $userGroupPrivilegeDAO->DeleteByUserGroupID($userGroupID);
index 055690c..7cb5cfb 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
  * @package    DAO
  */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
-require_once(AF_INCLUDE_PATH. 'classes/Utility.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/Utility.class.php');
 
 class UsersDAO extends DAO {
 
@@ -63,7 +63,9 @@ class UsersDAO extends DAO {
         *          false and add error into global var $msg, if unsuccessful
         * @author  Cindy Qi Li
         */
-       public function Create($user_group_id, $login, $pwd, $email, $first_name, $last_name, $status)
+       public function Create($user_group_id, $login, $pwd, $email, $first_name, $last_name, 
+                              $is_author, $organization, $phone, $address, $city,
+                              $province, $country, $postal_code, $status)
        {
                global $addslashes;
 
@@ -72,17 +74,26 @@ class UsersDAO extends DAO {
                $email = $addslashes(trim($email));
                $first_name = $addslashes(str_replace('<', '', trim($first_name)));
                $last_name = $addslashes(str_replace('<', '', trim($last_name)));
-
-               if ($this->isFieldsValid('new', $user_group_id,$login, $email,$first_name, $last_name))
+               $organization = $addslashes(trim($organization));
+               $phone = $addslashes(trim($phone));
+               $address = $addslashes(trim($address));
+               $city = $addslashes(trim($city));
+               $province = $addslashes(trim($province));
+               $country = $addslashes(trim($country));
+               $postal_code = $addslashes(trim($postal_code));
+
+               if ($this->isFieldsValid('new', $user_group_id, $login, $email,$first_name, $last_name,
+                                        $is_author, $organization, $phone, $address, $city,
+                                    $province, $country, $postal_code))
                {
                        if ($status == "")
                        {
-                               if (defined('AF_EMAIL_CONFIRMATION') && AF_EMAIL_CONFIRMATION)
+                               if (defined('TR_EMAIL_CONFIRMATION') && TR_EMAIL_CONFIRMATION)
                                {
-                                       $status = AF_STATUS_UNCONFIRMED;
+                                       $status = TR_STATUS_UNCONFIRMED;
                                } else
                                {
-                                       $status = AF_STATUS_ENABLED;
+                                       $status = TR_STATUS_ENABLED;
                                }
                        }
 
@@ -94,6 +105,14 @@ class UsersDAO extends DAO {
                                       first_name,
                                       last_name,
                                       email,
+                                      is_author,
+                                      organization,
+                                      phone,
+                                      address,
+                                      city,
+                                      province,
+                                      country,
+                                      postal_code,
                                       web_service_id,
                                       status,
                                       create_date
@@ -104,6 +123,14 @@ class UsersDAO extends DAO {
                                       '".$first_name."',
                                       '".$last_name."', 
                                       '".$email."',
+                                      ".$is_author.",
+                                      '".$organization."',
+                                      '".$phone."',
+                                      '".$address."',
+                                      '".$city."',
+                                      '".$province."',
+                                      '".$country."',
+                                      '".$postal_code."',
                                       '".Utility::getRandomStr()."',
                                       ".$status.", 
                                       now()
@@ -139,7 +166,9 @@ class UsersDAO extends DAO {
         *          false and add error into global var $msg, if unsuccessful
         * @author  Cindy Qi Li
         */
-       public function Update($userID, $user_group_id, $login, $email, $first_name, $last_name, $status)
+       public function Update($userID, $user_group_id, $login, $email, $first_name, $last_name, 
+                              $is_author, $organization, $phone, $address, $city,
+                              $province, $country, $postal_code, $status)
        {
                global $addslashes, $msg;
 
@@ -148,8 +177,17 @@ class UsersDAO extends DAO {
                $email = $addslashes(trim($email));
                $first_name = $addslashes(str_replace('<', '', trim($first_name)));
                $last_name = $addslashes(str_replace('<', '', trim($last_name)));
-
-               if ($this->isFieldsValid('update', $user_group_id,$login, $email,$first_name, $last_name))
+               $organization = $addslashes(trim($organization));
+               $phone = $addslashes(trim($phone));
+               $address = $addslashes(trim($address));
+               $city = $addslashes(trim($city));
+               $province = $addslashes(trim($province));
+               $country = $addslashes(trim($country));
+               $postal_code = $addslashes(trim($postal_code));
+               
+               if ($this->isFieldsValid('update', $user_group_id,$login, $email,$first_name, $last_name,
+                                        $is_author, $organization, $phone, $address, $city,
+                                    $province, $country, $postal_code))
                {
                        /* insert into the db */
                        $sql = "UPDATE ".TABLE_PREFIX."users
@@ -158,6 +196,14 @@ class UsersDAO extends DAO {
                                       first_name = '".$first_name."',
                                       last_name = '".$last_name."',
                                       email = '".$email."',
+                                      is_author = ".$is_author.",
+                                      organization = '".$organization."',
+                                      phone = '".$phone."',
+                                      address = '".$address."',
+                                      city = '".$city."',
+                                      province = '".$province."',
+                                      country = '".$country."',
+                                      postal_code = '".$postal_code."',
                                       status = '".$status."'
                                 WHERE user_id = ".$userID;
 
@@ -180,17 +226,17 @@ class UsersDAO extends DAO {
                global $addslashes;
                
                // check if the required fields are filled
-               if ($fieldValue == '') return array(_AT('AF_ERROR_EMPTY_FIELD'));
+               if ($fieldValue == '') return array(_AT('TR_ERROR_EMPTY_FIELD'));
                
                if ($fieldName == 'login')
                {
                        if (!$this->isLoginValid($fieldValue))
                        {
-                               return array(_AT('AF_ERROR_LOGIN_CHARS'));
+                               return array(_AT('TR_ERROR_LOGIN_CHARS'));
                        }
                        else if ($this->isLoginExists($fieldValue))
                        {
-                               return array(_AT('AF_ERROR_LOGIN_EXISTS'));
+                               return array(_AT('TR_ERROR_LOGIN_EXISTS'));
                        }
                }
                                
@@ -198,11 +244,11 @@ class UsersDAO extends DAO {
                {
                        if (!$this->isEmailValid($fieldValue))
                        {
-                               return array(_AT('AF_ERROR_EMAIL_INVALID'));
+                               return array(_AT('TR_ERROR_EMAIL_INVALID'));
                        }
                        else if ($this->isEmailExists($fieldValue))
                        {
-                               return array(_AT('AF_ERROR_EMAIL_EXISTS'));
+                               return array(_AT('TR_ERROR_EMAIL_EXISTS'));
                        }
                }
                                                
@@ -458,7 +504,9 @@ class UsersDAO extends DAO {
         *          false   if update unsuccessful
         * @author  Cindy Qi Li
         */
-       private function isFieldsValid($validate_type, $user_group_id, $login, $email, $first_name, $last_name)
+       private function isFieldsValid($validate_type, $user_group_id, $login, $email, $first_name, $last_name,
+                                      $is_author, $organization, $phone, $address, $city,
+                                      $province, $country, $postal_code)
        {
                global $msg;
                
@@ -507,6 +555,23 @@ class UsersDAO extends DAO {
                        $missing_fields[] = _AT('last_name');
                }
 
+               // when user requests to be an author, author information is necessary
+               if ($is_author <> 0 && $is_author <> 1)
+               {
+                       $msg->addError('INVALID_CHECKBOX_STATUS');
+               }
+               
+               if ($is_author == 1)
+               {
+                       if (!$organization) $missing_fields[] = _AT('organization');
+                       if (!$phone) $missing_fields[] = _AT('phone');
+                       if (!$address) $missing_fields[] = _AT('address');
+                       if (!$city) $missing_fields[] = _AT('city');
+                       if (!$province) $missing_fields[] = _AT('province');
+                       if (!$country) $missing_fields[] = _AT('country');
+                       if (!$postal_code) $missing_fields[] = _AT('postal_code');
+               }
+               
                if ($missing_fields)
                {
                        $missing_fields = implode(', ', $missing_fields);
@@ -574,5 +639,6 @@ class UsersDAO extends DAO {
 
                return is_array($this->execute($sql));
        }
+
 }
 ?>
\ No newline at end of file
index acdb667..1200b1d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -19,7 +19,7 @@
 * @see         LanguageManager::getMyLanguage()
 * @package     Language
 */
-include_once(AF_INCLUDE_PATH.'classes/DAO/LangCodesDAO.class.php');
+include_once(TR_INCLUDE_PATH.'classes/DAO/LangCodesDAO.class.php');
 
 class Language {
        // all private
@@ -30,7 +30,7 @@ class Language {
        var $nativeName;
        var $englishName;
        var $status;
-       var $aframe_version;
+       var $transformable_version;
 
        // constructor
        function Language($language_row) {
@@ -42,7 +42,7 @@ class Language {
                        $this->nativeName        = $language_row['native_name'];
                        $this->englishName       = $language_row['english_name'];
                        $this->status            = $language_row['status'];
-                       $this->aframe_version    = isset($language_row['version']) ? $language_row['version'] : VERSION;
+                       $this->transformable_version    = isset($language_row['version']) ? $language_row['version'] : VERSION;
 
                        $langCodesDAO = new LangCodesDAO();
                        $row_langCodes = $langCodesDAO->GetLangCodeBy3LetterCode($this->getParentCode($language_row['language_code']));
@@ -90,8 +90,8 @@ class Language {
                return $this->regularExpression;
        }
 
-       function getAFrameVersion() {
-               return $this->aframe_version;
+       function getTransformableVersion() {
+               return $this->transformable_version;
        }
 
        function getTranslatedName() {
@@ -157,7 +157,7 @@ class Language {
                if (!$code && isset($this)) {
                        $code = $this->code;
                }
-               $peices = explode(AF_LANGUAGE_LOCALE_SEP, $code, 2);
+               $peices = explode(TR_LANGUAGE_LOCALE_SEP, $code, 2);
                return $peices[0];
        }
 
@@ -167,17 +167,17 @@ class Language {
                if (!$code && isset($this)) {
                        $code = $this->code;
                }
-               $peices = explode(AF_LANGUAGE_LOCALE_SEP, $code, 2);
+               $peices = explode(TR_LANGUAGE_LOCALE_SEP, $code, 2);
                return $peices[1];
        }
        
        function getXML($part=FALSE) {
                if (!$part) {
                        $xml = '<?xml version="1.0" encoding="iso-8859-1"?>
-                       <!-- This is an AFrame language pack -->
+                       <!-- This is an Transformable language pack -->
 
                        <!DOCTYPE language [
-                          <!ELEMENT aframe-version (#PCDATA)>
+                          <!ELEMENT transformable-version (#PCDATA)>
                           <!ELEMENT charset (#PCDATA)>
                           <!ELEMENT reg-exp (#PCDATA)>
                           <!ELEMENT native-name (#PCDATA)>
@@ -189,7 +189,7 @@ class Language {
                } 
 
                $xml .= '<language code="'.$this->code.'">
-                       <aframe-version>'.VERSION.'</aframe-version>
+                       <transformable-version>'.VERSION.'</transformable-version>
                        <charset>'.$this->characterSet.'</charset>
                        <reg-exp>'.$this->regularExpression.'</reg-exp>
                        <native-name>'.$this->nativeName.'</native-name>
index ec51912..975e535 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -18,8 +18,8 @@
 * @author      Joel Kronenberg
 * @package     Language
 */
-include_once(AF_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');
-include_once(AF_INCLUDE_PATH.'classes/DAO/LanguageTextDAO.class.php');
+include_once(TR_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');
+include_once(TR_INCLUDE_PATH.'classes/DAO/LanguageTextDAO.class.php');
 
 class LanguageEditor extends Language {
 
@@ -226,7 +226,7 @@ class LanguageEditor extends Language {
 
                // check if this language exists before calling this method
 
-               require_once(AF_INCLUDE_PATH . 'classes/sqlutility.class.php');
+               require_once(TR_INCLUDE_PATH . 'classes/sqlutility.class.php');
                $sqlUtility = new SqlUtility();
 
                $sqlUtility->queryFromFile($language_sql_file, TABLE_PREFIX);
@@ -266,9 +266,9 @@ class LanguageEditor extends Language {
                }
                $sql_dump = substr($sql_dump, 0, -3) . ";";
 
-               $readme = 'This is an AFrame language pack. Use the administrator Language section to import this language pack or manually import the contents of the SQL file into your [table_prefix]language_text table, where `table_prefix` should be replaced with your correct AFrame table prefix as defined in ./include/config.inc.php .';
+               $readme = 'This is an Transformable language pack. Use the administrator Language section to import this language pack or manually import the contents of the SQL file into your [table_prefix]language_text table, where `table_prefix` should be replaced with your correct Transformable table prefix as defined in ./include/config.inc.php .';
 
-               require(AF_INCLUDE_PATH . 'classes/zipfile.class.php');
+               require(TR_INCLUDE_PATH . 'classes/zipfile.class.php');
                $zipfile = new zipfile();
 
                $zipfile->add_file($sql_dump, 'language_text.sql');
@@ -281,7 +281,7 @@ class LanguageEditor extends Language {
                } else {
                        $version = str_replace('.','_',VERSION);
 
-                       $zipfile->send_file('AFrame_' . $version . '_' . $this->code);
+                       $zipfile->send_file('Transformable_' . $version . '_' . $this->code);
                }
        }
 
index edd6058..357ca73 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 
 require_once(dirname(__FILE__) . '/Language.class.php');
 
-//define('AF_LANG_STATUS_EMPTY',       0);
-//define('AF_LANG_STATUS_INCOMPLETE',  1);
-//define('AF_LANG_STATUS_COMPLETE',    2);
-//define('AF_LANG_STATUS_PUBLISHED',   3);
+//define('TR_LANG_STATUS_EMPTY',       0);
+//define('TR_LANG_STATUS_INCOMPLETE',  1);
+//define('TR_LANG_STATUS_COMPLETE',    2);
+//define('TR_LANG_STATUS_PUBLISHED',   3);
 
 /**
 * LanguageManager
@@ -57,7 +57,7 @@ class LanguageManager {
        * Initializes availableLanguages and numLanguages.
        */
        function LanguageManager() {
-               require_once(AF_INCLUDE_PATH. 'classes/DAO/LanguagesDAO.class.php');
+               require_once(TR_INCLUDE_PATH. 'classes/DAO/LanguagesDAO.class.php');
                $languagesDAO = new LanguagesDAO();
                
                // initialize available lanuguages. Available languages are the ones with status "enabled"
@@ -209,7 +209,7 @@ class LanguageManager {
 
                foreach ($this->availableLanguages as $codes) {
                        $language = current($codes);
-                       if ($language->getStatus() == AF_STATUS_ENABLED) {
+                       if ($language->getStatus() == TR_STATUS_ENABLED) {
                                echo '<option value="'.$language->getCode().'"';
                                if ($language->getCode() == $current_language) {
                                        echo ' selected="selected"';
@@ -227,7 +227,7 @@ class LanguageManager {
                foreach ($this->availableLanguages as $codes) {
                        $language = current($codes);
 
-                       if ($language->getStatus() == AF_STATUS_ENABLED) {
+                       if ($language->getStatus() == TR_STATUS_ENABLED) {
 
                                if ($delim){
                                        echo ' | ';
@@ -258,12 +258,12 @@ class LanguageManager {
        // public
        // import language pack from specified file
        function import($filename) {
-               require_once(AF_INCLUDE_PATH . 'lib/pclzip.lib.php');
-               require_once(AF_INCLUDE_PATH . 'classes/Language/LanguageParser.class.php');
+               require_once(TR_INCLUDE_PATH . 'lib/pclzip.lib.php');
+               require_once(TR_INCLUDE_PATH . 'classes/Language/LanguageParser.class.php');
 
                global $languageManager, $msg;
 
-               $import_path = AF_TEMP_DIR . 'import/';
+               $import_path = TR_TEMP_DIR . 'import/';
 
                $archive = new PclZip($filename);
                if ($archive->extract(PCLZIP_OPT_PATH,  $import_path) == 0) {
@@ -276,7 +276,7 @@ class LanguageManager {
                $languageParser->parse($language_xml);
                $languageEditor =& $languageParser->getLanguageEditor(0);
 
-               if ($languageEditor->getAFrameVersion() != VERSION) 
+               if ($languageEditor->getTransformableVersion() != VERSION) 
                {
                                $msg->addError('LANG_WRONG_VERSION');
                }
@@ -298,16 +298,16 @@ class LanguageManager {
        }
 
        // public
-       // imports LIVE language from the AFrame language database
+       // imports LIVE language from the Transformable language database
        function liveImport($language_code) {
                global $db;
 
-               $tmp_lang_db = mysql_connect(AF_LANG_DB_HOST, AF_LANG_DB_USER, AF_LANG_DB_PASS);
+               $tmp_lang_db = mysql_connect(TR_LANG_DB_HOST, TR_LANG_DB_USER, TR_LANG_DB_PASS);
                // set database connection using utf8
                mysql_query("SET NAMES 'utf8'", $tmp_lang_db);
                
                if (!$tmp_lang_db) {
-                       /* AF_ERROR_NO_DB_CONNECT */
+                       /* TR_ERROR_NO_DB_CONNECT */
                        echo 'Unable to connect to db.';
                        exit;
                }
index 9db3e6d..07d8b6c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -51,7 +51,7 @@ class LanguageParser {
 
        // public
        function getLanguageEditor($row_num) {
-               require_once(AF_INCLUDE_PATH.'classes/Language/LanguageEditor.class.php');
+               require_once(TR_INCLUDE_PATH.'classes/Language/LanguageEditor.class.php');
                return new LanguageEditor($this->language_rows[$row_num]);
        }
 
@@ -68,7 +68,7 @@ class LanguageParser {
        /* called when an element ends */
        /* removed the current element from the $path */
        function endElement($parser, $name) {
-               if ($this->element_path == array('language', 'aframe-version')) {
+               if ($this->element_path == array('language', 'transformable-version')) {
                        $this->language_rows[$this->row_num]['version'] = trim($this->character_data);
 
                } else if ($this->element_path === array('language', 'charset')) {
index 857baf6..2e9ef67 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 * @author      Cindy Qi Li\r
 */\r
 \r
-if (!defined('AF_INCLUDE_PATH')) exit;\r
+if (!defined('TR_INCLUDE_PATH')) exit;\r
 \r
 class LanguageUtility {\r
 \r
        /**\r
-       * return language code from given AFrame language code\r
+       * return language code from given Transformable language code\r
        * @access  public\r
        * @param   $code\r
        * @return  language code\r
@@ -31,12 +31,12 @@ class LanguageUtility {
                if (!$code && isset($this)) {\r
                        $code = $this->code;\r
                }\r
-               $peices = explode(AF_LANGUAGE_LOCALE_SEP, $code, 2);\r
+               $peices = explode(TR_LANGUAGE_LOCALE_SEP, $code, 2);\r
                return $peices[0];\r
        }\r
 \r
        /**\r
-       * return charset from given AFrame language code\r
+       * return charset from given Transformable language code\r
        * @access  public\r
        * @param   $code\r
        * @return  charset\r
@@ -46,7 +46,7 @@ class LanguageUtility {
                if (!$code && isset($this)) {\r
                        $code = $this->code;\r
                }\r
-               $peices = explode(AF_LANGUAGE_LOCALE_SEP, $code, 2);\r
+               $peices = explode(TR_LANGUAGE_LOCALE_SEP, $code, 2);\r
                return $peices[1];\r
        }\r
 }\r
index 8bc4aec..74871e6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index df9d8b2..5ecc58e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 * @package     Language
 */
 
-require_once(AF_INCLUDE_PATH.'classes/Language/LanguageParser.class.php');
-require_once(AF_INCLUDE_PATH.'classes/Language/LanguagesParser.class.php');
+require_once(TR_INCLUDE_PATH.'classes/Language/LanguageParser.class.php');
+require_once(TR_INCLUDE_PATH.'classes/Language/LanguagesParser.class.php');
 
 class RemoteLanguageManager extends LanguageManager {
 
        function RemoteLanguageManager() {
                $version = str_replace('.','_',VERSION);
-               $language_xml = @file_get_contents('http://update.aframe.ca/languages/'.$version.'/languages.xml');
+               $language_xml = @file_get_contents('http://update.transformable.ca/languages/'.$version.'/languages.xml');
                if ($language_xml === FALSE) {
                        // fix for bug #2896
-                       $language_xml = @file_get_contents('http://update.aframe.ca/languages/1_5_3/languages.xml');
+                       $language_xml = @file_get_contents('http://update.transformable.ca/languages/1_5_3/languages.xml');
                }
                if ($language_xml !== FALSE) {
 
@@ -53,7 +53,7 @@ class RemoteLanguageManager extends LanguageManager {
        function fetchLanguage($language_code, $filename) {
                $version = str_replace('.','_',VERSION);
 
-               $language_pack = @file_get_contents('http://update.aframe.ca/languages/' . $version . '/aframe_' . $version . '_' . $language_code . '.zip');
+               $language_pack = @file_get_contents('http://update.transformable.ca/languages/' . $version . '/transformable_' . $version . '_' . $language_code . '.zip');
 
                if ($language_pack) {
                        $fp = fopen($filename, 'wb+');
@@ -65,7 +65,7 @@ class RemoteLanguageManager extends LanguageManager {
        }
 
        function import($language_code) {
-               $filename = tempnam(AF_TEMP_DIR . 'import', $language_code);
+               $filename = tempnam(TR_TEMP_DIR . 'import', $language_code);
                if ($this->fetchLanguage($language_code, $filename)) {
                        parent::import($filename);
                }
index d66e5d9..4e217b8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -23,9 +23,9 @@
  * @package    Menu
  */
 
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/PrivilegesDAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/PrivilegesDAO.class.php');
 
 class Menu {
 
@@ -47,14 +47,14 @@ class Menu {
         */
        function Menu()
        {
-               $this->pages[AF_NAV_TOP] = array();        // top tab pages
+               $this->pages[TR_NAV_TOP] = array();        // top tab pages
 
-               $this->init();           // Initialize $this->pages[AF_NAV_PUBLIC] & $this->pages
+               $this->init();           // Initialize $this->pages[TR_NAV_PUBLIC] & $this->pages
                $this->setTopPages();    // set top pages based on user id
 
                // decide current page.
                // if the page that user tries to access is from one of the public link
-               // but not define in user's priviledge pages, re-direct to the first $this->pages[AF_NAV_TOP]
+               // but not define in user's priviledge pages, re-direct to the first $this->pages[TR_NAV_TOP]
                $this->setCurrentPage();
                $this->sub_menus = $this->setSubMenus($this->current_page);   // loop recursively to set $this->submenus to the top parent of $this->current_page
                $this->root_page = $this->setRootPage($this->current_page);  
@@ -63,7 +63,7 @@ class Menu {
        }
 
        /**
-        * initialize: public accessible items ($this->pages[AF_NAV_PUBLIC]); all accessible pages ($this->pages)
+        * initialize: public accessible items ($this->pages[TR_NAV_PUBLIC]); all accessible pages ($this->pages)
         * @access  private
         * @param   user id
         * @return  true
@@ -85,10 +85,10 @@ class Menu {
                {
                        foreach ($rows as $id => $row)
                        {
-                               $this->pages[AF_NAV_PUBLIC][] = array($row['link'] => array('title_var'=>$row['title_var'], 'parent'=>AF_NAV_TOP));
+                               $this->pages[TR_NAV_PUBLIC][] = array($row['link'] => array('title_var'=>$row['title_var'], 'parent'=>TR_NAV_TOP));
                        }
                }
-               // end of initializing $this->pages[AF_NAV_PUBLIC]
+               // end of initializing $this->pages[TR_NAV_PUBLIC]
 
                return true;
        }
@@ -119,13 +119,13 @@ class Menu {
                {
                        foreach ($rows as $id => $row)
                        {
-                               $this->pages[AF_NAV_TOP][] = array('url' => $_base_path.$row['link'], 'title' => _AT($row['title_var']));
+                               $this->pages[TR_NAV_TOP][] = array('url' => $_base_path.$row['link'], 'title' => _AT($row['title_var']));
 
                                // add section pages if it has not been defined in $this->pages
                                if (!isset($this->pages[$row['link']]))
                                {
                                        $this->pages = array_merge($this->pages, 
-                                                          array($row['link'] => array('title_var'=>$row['title_var'], 'parent'=>AF_NAV_TOP)));
+                                                          array($row['link'] => array('title_var'=>$row['title_var'], 'parent'=>TR_NAV_TOP)));
                                }
                        }
                }
@@ -136,7 +136,7 @@ class Menu {
        /**
         * Decide current page.
         * if the page that user tries to access is from one of the public link
-        * but not define in user's priviledge pages, re-direct to the first $this->pages[AF_NAV_TOP]
+        * but not define in user's priviledge pages, re-direct to the first $this->pages[TR_NAV_TOP]
         * @access  private
         * @return  true
         * @author  Cindy Qi Li
@@ -155,7 +155,7 @@ class Menu {
                        }
 
                        // re-direct to first $_pages URL
-                       foreach ($this->pages[AF_NAV_TOP] as $page)
+                       foreach ($this->pages[TR_NAV_TOP] as $page)
                        {
                                if ($_base_path.$this->current_page != $page['url'])
                                {
@@ -214,12 +214,16 @@ class Menu {
        */
        private function setBackToPage() 
        {
+               $back_to_page = '';
+               
                unset($this->path[0]);
                if (isset($this->path[2]['url'], $this->sub_menus[0]['url']) && $this->path[2]['url'] == $this->sub_menus[0]['url']) {
                        $back_to_page = $this->path[3];
-               } else if (isset($this->path[1]['url'], $this->sub_menus[0]['url']) && $this->path[1]['url'] == $this->sub_menus[0]['url']) {
+               } 
+               else if (isset($this->path[1]['url'], $this->sub_menus[0]['url']) && $this->path[1]['url'] == $this->sub_menus[0]['url']) {
                        $back_to_page = isset($this->path[2]) ? $this->path[2] : null;
-               } else if (isset($this->path[1])) {
+               } 
+               else if (isset($this->path[1])) {
                        $back_to_page = $this->path[1];
                }
                
@@ -236,7 +240,7 @@ class Menu {
         */
        private function isPublicLink($url)
        {
-               foreach ($this->pages[AF_NAV_PUBLIC] as $page => $garbage)
+               foreach ($this->pages[TR_NAV_PUBLIC] as $page => $garbage)
                {
                        if ($page == $url) return true;
                }
@@ -285,7 +289,7 @@ class Menu {
         */
        public function getTopPages()
        {
-               return $this->pages[AF_NAV_TOP];
+               return $this->pages[TR_NAV_TOP];
        }
 
        /**
index 715fcc6..9cf60d8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -46,12 +46,12 @@ class Message {
        * @see /include/lib/lang_constant.inc.php
        * @var array    
        */
-       var $prefix = array( 'error'  =>'AF_ERROR_',
-                                               'feedback' => 'AF_FEEDBACK_',
-                                               'warning' => 'AF_WARNING_',
-                                               'info' => 'AF_INFOS_',
-                                               'help' => 'AF_HELP_',
-                                               'confirm' => 'AF_CONFIRM_'
+       var $prefix = array( 'error'  =>'TR_ERROR_',
+                                               'feedback' => 'TR_FEEDBACK_',
+                                               'warning' => 'TR_WARNING_',
+                                               'info' => 'TR_INFOS_',
+                                               'help' => 'TR_HELP_',
+                                               'confirm' => 'TR_CONFIRM_'
                                  );
        
        /**
diff --git a/docs/include/classes/QTI/QTIImport.class.php b/docs/include/classes/QTI/QTIImport.class.php
new file mode 100644 (file)
index 0000000..16657af
--- /dev/null
@@ -0,0 +1,410 @@
+<?php
+/************************************************************************/
+/* Transformable                                                        */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* This program is free software. You can redistribute it and/or        */
+/* modify it under the terms of the GNU General Public License          */
+/* as published by the Free Software Foundation.                        */
+/************************************************************************/
+
+if (!defined('TR_INCLUDE_PATH')) exit;
+
+require(TR_INCLUDE_PATH.'classes/testQuestions.class.php');
+require(TR_INCLUDE_PATH.'classes/QTI/QTIParser.class.php');    
+
+/**
+* QTIImport
+* Class for prehandling the POST values before importing each QTI question into ATutor
+* Some definitions for the QTI question type: ///
+*      1       Multiple choices
+*      2       True/false
+*      3       Open ended
+*      4       Likert
+*      5       Simple Matching
+*      6       Ordering
+*      7       Multiple Answers
+*      8       Graphical Matching
+* @access      public
+* @author      Harris Wong
+*/
+class QTIImport {
+       var $qti_params  = array();
+       var $qid                 = array();             //store the question_id that is generated by this import
+       var $import_path = '';
+       var $title               = '';
+       var $weights     = array();
+
+       //Constructor
+       function QTIImport($import_path){
+               $this->import_path = $import_path;
+       }
+
+       //Creates the parameters array for TestQuestion::importQTI
+       function constructParams($qti_params){
+               global $addslashes;
+               //save guarding
+               $qti_params['required']         = intval($qti_params['required']);
+               $qti_params['question']         = trim($qti_params['question']);
+               $qti_params['category_id']      = intval($qti_params['category_id']);
+               $qti_params['feedback']         = trim($qti_params['feedback']);
+
+               //assign answers
+               if (sizeof($qti_params['answers']) > 1){
+                       $qti_params['answer'] = $qti_params['answers'];
+               } elseif (sizeof($qti_params['answers'])==1) {
+                       $qti_params['answer'] = intval($qti_params['answers'][0]);
+               }
+               $this->qti_params = $qti_params;
+       }
+       
+       //Decide which question type to import based in the integer
+       function getQuestionType($question_type){
+               $qti_obj = TestQuestions::getQuestion($question_type);
+               if ($qti_obj != null){
+                       $qid = $qti_obj->importQTI($this->qti_params);
+                       if ($qid  > 0) {
+                               $this->qid = $qid;
+                       }
+               }
+       }
+
+
+       /**
+        * This function will add the attributes that are extracted from the qti xml
+        * into the database.
+        *
+        * @param       array   attributes that are extracted from the QTI XML.
+        * @return      int             the question ids.
+        */
+       function importQuestions($attributes){
+               global $supported_media_type, $msg;
+               $qids = array();
+
+               foreach($attributes as $resource=>$attrs){
+                       if (preg_match('/imsqti\_(.*)/', $attrs['type'])){
+                               //Instantiate class obj
+                               $xml = new QTIParser($attrs['type']);
+                               $xml_content = @file_get_contents($this->import_path . $attrs['href']);
+                               $xml->setRelativePath($package_base_name);
+
+                               if (!$xml->parse($xml_content)){        
+                                       $msg->addError('QTI_WRONG_PACKAGE');
+                                       break;
+                               }
+//if ($attrs[href] =='56B1BEDC-A820-7AA8-A21D-F32017189445/56B1BEDC-A820-7AA8-A21D-F32017189445.xml'){
+//     debug($xml, 'attributes');
+//}
+                               //import file, should we use file href? or jsut this href?
+                               //Aug 25, use both, so then it can check for respondus media as well.
+                               foreach($attrs['file'] as $file_id => $file_name){
+                                       $file_pathinfo = pathinfo($file_name);
+                                       if ($file_pathinfo['basename'] == $attrs['href']){
+                                               //This file will be parsed later
+                                               continue;
+                                       } 
+
+                                       if (in_array($file_pathinfo['extension'], $supported_media_type)){
+                                               //copy medias over.
+                                               $this->copyMedia(array($file_name), $xml->items);
+                                       }
+                               }               
+
+                               for ($loopcounter=0; $loopcounter<$xml->item_num; $loopcounter++){
+                                       //Create POST values.
+                                       unset($test_obj);               //clear cache
+                                       $test_obj['required']           = 1;
+                                       $test_obj['preset_num'] = 0;
+                                       $test_obj['category_id']        = 0;
+                                       $test_obj['question']           = $xml->question[$loopcounter];
+                                       $test_obj['feedback']           = $xml->feedback[$loopcounter];
+                                       $test_obj['groups']             = $xml->groups[$loopcounter];
+                                       $test_obj['property']           = intval($xml->attributes[$loopcounter]['render_fib']['property']);
+                                       $test_obj['choice']             = array();
+                                       $test_obj['answers']            = array();
+
+                                       //assign choices
+                                       $i = 0;
+
+                                       //trim values
+                                       if (is_array($xml->answers[$loopcounter])){
+                                               array_walk($xml->answers[$loopcounter], 'trim_value');
+                                       }
+                                       //TODO: The groups is 1-0+ choices.  So we should loop thru groups, not choices.
+                                       if (is_array($xml->choices[$loopcounter])){             
+                                               foreach ($xml->choices[$loopcounter] as $choiceNum=>$choiceOpt){
+                                                       if (sizeof($test_obj['groups'] )>0) {
+                                                               foreach ($xml->answers[$loopcounter] as $ansNum=>$ansOpt){
+                                                                       if ($choiceNum == $ansOpt){
+                                                                               //Not exactly efficient, worst case N^2
+                                                                               $test_obj['answers'][$ansNum] = $i;
+                                                                       }                       
+                                                               }               
+                                                       } else {
+                                                               //save answer(s)
+                                                               if (is_array($xml->answers[$loopcounter]) && in_array($choiceNum, $xml->answers[$loopcounter])){
+                                                                       $test_obj['answers'][] = $i;
+                                                               }               
+                                                       }
+                                                       $test_obj['choice'][] = $choiceOpt;
+                                                       $i++;
+                                               }
+                                       }
+
+               //                      unset($qti_import);
+                                       $this->constructParams($test_obj);
+//debug($xml->getQuestionType($loopcounter), 'lp_'.$loopcounter);
+                                       //Create questions
+                                       $this->getQuestionType($xml->getQuestionType($loopcounter));
+
+                                       //save question id 
+                                       $qids[] = $this->qid;
+
+                                       //Dependency handling
+                                       if (!empty($attrs['dependency'])){
+                                               $xml_items = array_merge($xml_items, $xml->items);
+                                       }
+                               }
+
+                               //assign title
+                               if ($xml->title != ''){
+                                       $this->title = $xml->title;
+                               }
+
+                               //assign marks/weights
+                               $this->weights = $xml->weights;
+
+                               $xml->close();
+                       } elseif ($attrs['type'] == 'webcontent') {
+                               //webcontent, copy it over.
+                               $this->copyMedia($attrs['file'], $xml_items);
+                       }
+               }
+//debug($qids, 'qids');
+               return $qids;
+       }
+
+       /**
+        * This function is to import a test and returns the test id.
+        * @param       string  custmom test title
+        *
+        * @return      int             test id
+        */
+       function importTest($title='') {
+               global $msg, $db;
+
+               $missing_fields                         = array();
+               $test_obj['title']                      = $title;
+               $test_obj['description']        = '';
+               $test_obj['num_questions']      = 0;
+               $test_obj['num_takes']          = 0;
+               $test_obj['content_id']         = 0;
+               $test_obj['passpercent']        = 0;
+               $test_obj['passscore']          = 0;
+               $test_obj['passfeedback']       = 0;
+               $test_obj['failfeedback']       = 0;
+               $test_obj['num_takes']          = 0;
+               $test_obj['anonymous']          = 0;
+               $test_obj['allow_guests']       = $_POST['allow_guests'] ? 1 : 0;
+               $test_obj['instructions']       = '';
+               $test_obj['display']            = 0;
+               $test_obj['result_release']     = 0;
+               $test_obj['random']                     = 0;
+
+               // currently these options are ignored for tests:
+               $test_obj['format']                     = intval($test_obj['format']);
+               $test_obj['order']                      = 1;  //intval($test_obj['order']);
+               $test_obj['difficulty']         = 0;  //intval($test_obj['difficulty']);        /* avman */
+                       
+               //Title of the test is empty, could be from question database export or some other system's export.
+               //Either prompt for a title, or generate a random title
+               if ($test_obj['title'] == '') {
+                       if ($this->title != '') {
+                               $test_obj['title'] = $this->title;
+                       } else {
+//                             $test_obj['title'] = 'random title';
+                               
+                               //set marks to 0 if no title? 
+                               $this->weights = array();
+                       }
+               }
+
+               /*
+               if ($test_obj['random'] && !$test_obj['num_questions']) {
+                       $missing_fields[] = _AT('num_questions_per_test');
+               }
+
+               if ($test_obj['pass_score']==1 && !$test_obj['passpercent']) {
+                       $missing_fields[] = _AT('percentage_score');
+               }
+
+               if ($test_obj['pass_score']==2 && !$test_obj['passscore']) {
+                       $missing_fields[] = _AT('points_score');
+               }
+
+               if ($missing_fields) {
+                       $missing_fields = implode(', ', $missing_fields);
+                       $msg->addError(array('EMPTY_FIELDS', $missing_fields));
+               }
+               */
+
+               $day_start      = intval(date('j'));
+               $month_start= intval(date('n'));
+               $year_start     = intval(date('Y'));
+               $hour_start     = intval(date('G'));
+               $min_start      = intval(date('i'));
+
+               $day_end        = $day_start;
+               $month_end      = $month_start;
+               $year_end       = $year_start;  //as of Oct 21,09. Check http://www.atutor.ca/atutor/mantis/view.php?id=3961
+               $hour_end       = $hour_start;
+               $min_end        = $min_start;
+
+               if (!checkdate($month_start, $day_start, $year_start)) {
+                       $msg->addError('START_DATE_INVALID');
+               }
+
+               if (!checkdate($month_end, $day_end, $year_end)) {
+                       $msg->addError('END_DATE_INVALID');
+               }
+
+               if (mktime($hour_end,   $min_end,   0, $month_end,   $day_end,   $year_end) < 
+                       mktime($hour_start, $min_start, 0, $month_start, $day_start, $year_start)) {
+                               $msg->addError('END_DATE_INVALID');
+               }
+
+               if (!$msg->containsErrors()) {
+                       if (strlen($month_start) == 1){
+                               $month_start = "0$month_start";
+                       }
+                       if (strlen($day_start) == 1){
+                               $day_start = "0$day_start";
+                       }
+                       if (strlen($hour_start) == 1){
+                               $hour_start = "0$hour_start";
+                       }
+                       if (strlen($min_start) == 1){
+                               $min_start = "0$min_start";
+                       }
+
+                       if (strlen($month_end) == 1){
+                               $month_end = "0$month_end";
+                       }
+                       if (strlen($day_end) == 1){
+                               $day_end = "0$day_end";
+                       }
+                       if (strlen($hour_end) == 1){
+                               $hour_end = "0$hour_end";
+                       }
+                       if (strlen($min_end) == 1){
+                               $min_end = "0$min_end";
+                       }
+
+                       $start_date = "$year_start-$month_start-$day_start $hour_start:$min_start:00";
+                       $end_date       = "$year_end-$month_end-$day_end $hour_end:$min_end:00";
+
+                       //If title exceeded database defined length, truncate it.
+                       $test_obj['title'] = validate_length($test_obj['title'], 100);
+
+                       $sql_params = array (   $_SESSION['course_id'], 
+                                                                       $test_obj['title'], 
+                                                                       $test_obj['description'], 
+                                                                       $test_obj['format'], 
+                                                                       $start_date, 
+                                                                       $end_date, 
+                                                                       $test_obj['order'], 
+                                                                       $test_obj['num_questions'], 
+                                                                       $test_obj['instructions'], 
+                                                                       $test_obj['content_id'], 
+                                                                       $test_obj['passscore'], 
+                                                                       $test_obj['passpercent'], 
+                                                                       $test_obj['passfeedback'], 
+                                                                       $test_obj['failfeedback'], 
+                                                                       $test_obj['result_release'], 
+                                                                       $test_obj['random'], 
+                                                                       $test_obj['difficulty'], 
+                                                                       $test_obj['num_takes'], 
+                                                                       $test_obj['anonymous'], 
+                                                                       '', 
+                                                                       $test_obj['allow_guests'], 
+                                                                       $test_obj['display']);
+
+                       $sql = vsprintf(TR_SQL_TEST, $sql_params);
+                       $result = mysql_query($sql, $db);
+                       $tid = mysql_insert_id($db);
+               //debug($qti_import->weights, 'weights');                       
+               }
+               return $tid;
+       }
+
+
+       /*
+        * Match the XML files to the actual files found in the content, then copy the media 
+        * over to the content folder based on the actual links.  *The XML file names might not be right.
+        * @param       array   The list of file names provided by the manifest's resources
+        * @param       array   The list of relative files that is used in the question contents.  Default empty.
+        */
+       function copyMedia($files, $xml_items = array()){
+               global $msg;
+               foreach($files as $file_num => $file_loc){
+                       //skip test xml files
+                       if (preg_match('/tests\_[0-9]+\.xml/', $file_loc)){
+                               continue;
+                       }
+
+                       $new_file_loc ='';
+
+                       /**
+                               Use the items list to handle and check which path it is from, so then it won't blindly truncate 'resource/' from the path
+                               - For any x in xml_files, any y in new_file_loc, any k in the set of strings; such that k concat x = y, then use y, else use x
+                               - BUG: Same filename fails.  If resource/folder1/file1.jpg, and resource/file1.jpg, both will get replaced with file1.jpg
+                       */
+                       if(!empty($xml_items)){
+                               foreach ($xml_items as $xk=>$xv){
+                                       if (($pos = strpos($file_loc, $xv))!==false){
+                                               //address the bug mentioned aboe.
+                                               //check if there is just one level of directory in this extra path.
+                                               //based on the assumption that most installation are just using 'resources/' or '{FOLDER_NAME}/'
+                                               $shortened = substr($file_loc, 0, $pos);
+                                               $num_of_occurrences = split('/', $shortened);
+                                               if (sizeof($num_of_occurrences) == 2){
+                                                       $new_file_loc = $xv;
+                                                       break;
+                                               }
+                                       } 
+                               }
+                       }
+
+                       if ($new_file_loc==''){
+                               $new_file_loc = $file_loc;
+                       }
+               
+                       //Check if the file_loc has been changed, if not, don't move it, let ims class to handle it
+                       //we only want to touch the files that the test/surveys use
+                       if ($new_file_loc!=$file_loc){
+                               //check if new folder is there, if not, create it.
+                               createDir(TR_CONTENT_DIR .$_SESSION['course_id'].'/'.$new_file_loc );
+                               
+                               //copy files over
+               //                      if (rename(TR_CONTENT_DIR . 'import/'.$_SESSION['course_id'].'/'.$file_loc, 
+               //                              TR_CONTENT_DIR .$_SESSION['course_id'].'/'.$package_base_name.'/'.$new_file_loc) === false) {
+                               //overwrite files
+                               if (file_exists(TR_CONTENT_DIR .$_SESSION['course_id'].'/'.$new_file_loc)){
+                                       unlink(TR_CONTENT_DIR .$_SESSION['course_id'].'/'.$new_file_loc);
+                               }
+                               if (file_exists(TR_CONTENT_DIR.'import/'.$_SESSION['course_id'].'/'.$file_loc)){
+                                       if (copy(TR_CONTENT_DIR . 'import/'.$_SESSION['course_id'].'/'.$file_loc, 
+                                               TR_CONTENT_DIR .$_SESSION['course_id'].'/'.$new_file_loc) === false) {
+                                               //TODO: Print out file already exist error.
+                                               if (!$msg->containsErrors()) {
+                       //                              $msg->addError('FILE_EXISTED');
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/QTI/QTIParser.class.php b/docs/include/classes/QTI/QTIParser.class.php
new file mode 100644 (file)
index 0000000..a2cac77
--- /dev/null
@@ -0,0 +1,463 @@
+<?php
+/****************************************************************/
+/* ATutor                                                                                                              */
+/****************************************************************/
+/* Copyright (c) 2002-2009                                                                             */
+/* Adaptive Technology Resource Centre / University of Toronto  */
+/* http://atutor.ca                                                                                            */
+/*                                                              */
+/* This program is free software. You can redistribute it and/or*/
+/* modify it under the terms of the GNU General Public License  */
+/* as published by the Free Software Foundation.                               */
+/****************************************************************/
+// $Id: QTIParser.class.php 8799 2009-09-22 13:57:25Z hwong $
+
+//Constances
+define('AT_QTI_REPONSE_GRP',    1);
+define('AT_QTI_REPONSE_LID',    2);
+define('AT_QTI_REPONSE_STR',    3);
+
+/**
+* QTIParser
+* Class for parsing XML language info and returning a QTI Object
+* @access      public
+* @author      Harris Wong
+*/
+class QTIParser {
+       // all private
+       var $parser; // the XML handler
+       var $qti_type; // QTI specification versoin, imsqti_xmlv1p1, imsqti_item_xmlv2p1, imsqti_xmlv1p2
+       var $character_data; // tmp variable for storing the data
+       var $element_path; // array of element paths (basically a stack)
+       var $title;     //title for this question test
+       var $q_identifiers      = array();              //The identifier of the choice. This identifier must not be used by any other choice or item variable.
+       var $question = '';                                     //question of this QTI
+       var $response_type      = array();              //detects what type of question this would be.
+       var $relative_path      = '';                   //the relative path to all resources in this xml.
+
+       //stacks
+       var $choices            = array();      //answers array that keep tracks of all the correct answers
+       var $groups                     = array();      //groups for matching, the left handside to match with the different choices
+       var $attributes         = array();      //tag attribute
+       var $answers            = array();      //correct answers 
+       var $response_label = array();  //temporary holders for response labels
+       var $field_label        = array();              //fields label
+       var $field_entry        = array();      //fields entry
+       var $feedback           = array();              //question feedback
+       var $item_num           = 0;            //item number
+       var $items                      = array();      //stacks of media items, ie. img, embed, ahref etc. 
+       var $qmd_itemtype       = -1;           //qmd flag
+       var $temp_answer        = array();      //store the temp answer stack
+       var $answers_for_matching       = array();
+       var $weights            = array();      //the weight of each question
+
+       //constructor
+       function QTIParser($qti_type='') {
+               $this->qti_type = $qti_type;
+               $this->parser = xml_parser_create(); 
+
+               xml_set_object($this->parser, $this);
+               xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false); /* conform to W3C specs */
+               xml_set_element_handler($this->parser, 'startElement', 'endElement');
+               xml_set_character_data_handler($this->parser, 'characterData');
+       }
+
+       // public
+       // @return      true if parsed successfully, false otherwise
+       function parse($xml_data) {
+               $this->element_path   = array();
+               $this->character_data = '';
+               xml_parse($this->parser, $xml_data, TRUE);
+
+               //Loop thru each item and replace if existed
+               foreach ($this->answers_for_matching as $afm_k => $afk_v){
+                       if (!empty($this->answers_for_matching[$afm_k])){
+                               $this->answers[$afm_k] = $afk_v;
+                       }
+               }
+
+               if(in_array('questestinterop', $this->element_path) ||
+                       in_array('assessment', $this->element_path)){
+                       //this is a v2.1+ package
+                       return false;
+               } else {
+                       return true;
+               }
+       }
+
+       // private
+       function startElement($parser, $name, $attributes) {
+               global $msg;
+//             debug($attributes, $name );
+               //save attributes.
+               switch($name) {
+                       case 'section':
+                               $this->title = $attributes['title'];
+                               break;
+                       case 'response_lid':
+                               if ($this->response_type[$this->item_num] <= 0) {
+                                       $this->response_type[$this->item_num] = AT_QTI_REPONSE_LID;
+                               }
+                       case 'response_grp':
+                               if ($this->response_type[$this->item_num] <= 0) {
+                                       $this->response_type[$this->item_num] = AT_QTI_REPONSE_GRP;
+                               }
+                       case 'response_str':
+                               $this->attributes[$this->item_num][$name]['ident'] = $attributes['ident'];
+                               $this->attributes[$this->item_num][$name]['rcardinality'] = $attributes['rcardinality'];
+                               if ($this->response_type[$this->item_num] <= 0) {
+                                       $this->response_type[$this->item_num] = AT_QTI_REPONSE_STR;
+                               }
+                               break;
+                       case 'response_label':
+                                       if(!isset($this->choices[$this->item_num][$attributes['ident']])){
+                                               if (!is_array($this->response_label[$this->item_num])){
+                                                       $this->response_label[$this->item_num] = array();       
+                                               }
+                                               array_push($this->response_label[$this->item_num], $attributes['ident']);
+                                       }
+                               break;
+                       case 'varequal':
+                               $this->attributes[$this->item_num][$name]['respident'] = $attributes['respident'];
+                               break;
+                       case 'setvar':
+                               $this->attributes[$this->item_num][$name]['varname'] = $attributes['varname'];
+                               break;
+                       case 'render_choice':
+                               $this->attributes[$this->item_num][$name]['shuffle'] = $attributes['shuffle'];
+                               $this->attributes[$this->item_num][$name]['minnumber'] = $attributes['minnumber'];
+                               $this->attributes[$this->item_num][$name]['maxnumber'] = $attributes['maxnumber'];
+                               break;
+                       case 'render_fib':
+                               $rows = intval($attributes['rows']);
+                               $property = 1;
+
+                               //1,2,3,4 according to tools/tests/create_question_long.php
+                               if ($rows == 1){
+                                       $property = 2;
+                               } elseif ($rows > 1 && $rows <= 5){
+                                       $property = 3;
+                               } elseif ($rows > 5){
+                                       $property = 4;
+                               }
+                               $this->attributes[$this->item_num][$name]['property'] = $property;
+                               break;
+                       case 'matimage':
+                               $this->attributes[$this->item_num][$name]['imagtype'] = $attributes['imagtype'];
+                               $this->attributes[$this->item_num][$name]['uri'] = $attributes['uri'];
+                               break;
+                       case 'mataudio':
+                               $this->attributes[$this->item_num][$name]['audiotype'] = $attributes['audiotype'];
+                               $this->attributes[$this->item_num][$name]['uri'] = $attributes['uri'];
+                               break;
+                       case 'matvideo':
+                               $this->attributes[$this->item_num][$name]['videotype'] = $attributes['videotype'];
+                               $this->attributes[$this->item_num][$name]['uri'] = $attributes['uri'];
+                               break;
+                       case 'matapplet':
+                               $this->attributes[$this->item_num][$name]['uri'] = $attributes['uri'];
+                               $this->attributes[$this->item_num][$name]['width'] = intval($attributes['width']);
+                               $this->attributes[$this->item_num][$name]['height'] = intval($attributes['height']);
+                               break;
+                       case 'setvar':
+                               $this->attributes[$this->item_num][$name]['varname'] = $attributes['varname'];
+                               $this->attributes[$this->item_num][$name]['action'] = $attributes['action'];
+                               break;
+                       case 'itemproc_extension':
+                               if (preg_match('/imsqti_xmlv1p2\/imscc_xmlv1p0(.*)/', $this->qti_type)){
+                                       $msg->addError('QTI_WRONG_PACKAGE');
+                               }
+                               break;
+               }
+               array_push($this->element_path, $name);
+   }
+
+       // private
+       /* called when an element ends */
+       /* removed the current element from the $path */
+       function endElement($parser, $name) {
+               global $msg;
+               //check element path
+               $current_pos = count($this->element_path) - 1;
+               $last_element = $this->element_path[$current_pos - 1];
+
+               switch($name) {
+                       case 'item':
+                               $this->item_num++;
+                               break;
+                       case 'mattext':
+                               $this->mat_content[$this->item_num] .= $this->reconstructRelativePath($this->character_data);
+                               break;
+                       case 'matimage':
+                               $this->mat_content[$this->item_num] .= '<img src="'.$this->attributes[$this->item_num][$name]['uri'].'" alt="Image Not loaded:'.$this->attributes[$this->item_num][$name]['uri'].'" />';
+                               break;
+                       case 'mataudio':
+                               $this->mat_content[$this->item_num] .= '<embed SRC="'.$this->attributes[$this->item_num][$name]['uri'].'" autostart="false" width="145" height="60"><noembed><bgsound src="'.$this->attributes[$this->item_num][$name]['uri'].'"></noembed></embed>';
+                               break;
+                       case 'matvideo':
+                               if ($this->attributes[$this->item_num][$name]['videotype'] == 'type/swf'){
+                                       $this->mat_content[$this->item_num] .= '<object type="application/x-shockwave-flash" data="' . $this->attributes[$this->item_num][$name]['uri'] . '" width="550" height="400"><param name="movie" value="'. $this->attributes[$this->item_num][$name]['uri'] .'" /></object>';                                  
+                               } elseif ($this->attributes[$this->item_num][$name]['videotype'] == 'type/mov'){
+                                       $this->mat_content[$this->item_num] .= '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="550" height="400" codebase="http://www.apple.com/qtactivex/qtplugin.cab"><param name="src" value="'. $this->attributes[$this->item_num][$name]['uri'] . '" /><param name="autoplay" value="true" /><param name="controller" value="true" /><embed src="' . $this->attributes[$this->item_num][$name]['uri'] .'" width="550" height="400" controller="true" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>';
+                               }
+                               break;
+                       case 'matapplet':
+                               (($this->attributes[$this->item_num][$name]['width'] != 0)? $width = $this->attributes[$this->item_num][$name]['width'] : $width = 460);
+                               (($this->attributes[$this->item_num][$name]['height'] != 0)? $height = $this->attributes[$this->item_num][$name]['height'] : $height = 160);
+                               $this->mat_content[$this->item_num] .= '<applet code="'.$this->attributes[$this->item_num][$name]['uri'].'" width="'.$width.'" height="'.$height.'" alt="Applet not loaded."></applet>';
+                               break;
+                       case 'material':
+                               //check who is mattext's ancestor, started from the most known inner layer
+                               if (in_array('response_label', $this->element_path)){
+                                       if(!in_array($this->mat_content, $this->choices)){
+                                               //This is one of the choices.
+                                               if (!empty($this->response_label[$this->item_num])){
+                                                       $this->choices[$this->item_num][array_pop($this->response_label[$this->item_num])] = $this->mat_content[$this->item_num];
+                                               }
+                                       }
+                               } elseif (in_array('response_grp', $this->element_path) || in_array('response_lid', $this->element_path)){
+                                       //for matching, where there are groups
+                                       //keep in mind that Respondus handles this by using response_lid
+                                       $this->groups[$this->item_num][] = $this->reconstructRelativePath($this->mat_content[$this->item_num]);
+//                                     debug($this->character_data, 'harris - groups');
+                               } elseif (in_array('presentation', $this->element_path)){
+                                       $this->question[$this->item_num] = $this->reconstructRelativePath($this->mat_content[$this->item_num]);
+                               } elseif (in_array('itemfeedback', $this->element_path)){
+                                       $this->feedback[$this->item_num] = $this->mat_content[$this->item_num];
+                               }
+                               //once material is closed, reset the mat_content variable.
+                               $this->mat_content[$this->item_num] = '';
+                               break;
+                       case 'varequal':
+                               //stores the answers (either correct or incorrect) into a stack
+                               $this->temp_answer[$this->attributes[$this->item_num][$name]['respident']]['name'][] = $this->character_data;
+                               //responses handling, remember to save the answers or match them up
+                               if (!is_array($this->answers[$this->item_num])){
+                                       $this->answers[$this->item_num] = array();
+                               }
+                               array_push($this->answers[$this->item_num], $this->reconstructRelativePath($this->character_data));
+                               break;
+                       case 'setvar':
+                               $this->temp_answer[$this->attributes[$this->item_num]['varequal']['respident']]['value'][] = $this->character_data;
+                               $this->temp_answer[$this->attributes[$this->item_num]['varequal']['respident']]['attribute'][] = $this->attributes[$this->item_num]['setvar']['varname'];
+                               break;
+                       case 'respcondition':
+                               if (empty($this->temp_answer)) {
+                                       break;
+                               }
+
+                               //closing this tag means a selection of choices have ended.  Assign the correct answer in this case.
+                               $tv = $this->temp_answer[$this->attributes[$this->item_num]['varequal']['respident']];
+//                             debug($tv, 'harris'.$this->item_num);
+//                             debug($this->answers_for_matching[$this->item_num], 'answers');
+
+                               //If matching, then attribute = 'Respondus_correct'; otherwise it is 'que_score'
+                               if ($this->getQuestionType($this->item_num) == 5){
+                                       if ($tv['answerAdded']!=true && !empty($tv['attribute'])){
+                                               foreach ($tv['attribute'] as $att_id => $att_value){
+                                                       //Handles Respondus' (and blakcboard, angels, etc) responses schemas
+                                                       if (strtolower($att_value)=='respondus_correct'){
+                                                               //Then this is the right answer
+                                                               if (!is_array($this->answers_for_matching[$this->item_num])){
+                                                                       $this->answers_for_matching[$this->item_num] = array();
+                                                               }
+                                                               //The condition here is to check rather the answers have been duplicated, otherwise the indexing won't be right.
+                                                               //sizeof[answers] != sizeof[questions], then the index matching is wrong.
+                                                               //Created a problem though, which is then many-to-1 matching fails, cuz answers will be repeated.
+                                                               //Sep 2,08, Fixed by adding a flag into the array
+       //                                                      if (!in_array($tv['name'][$att_id], $this->answers_for_matching[$this->item_num])){
+                                                                       array_push($this->answers_for_matching[$this->item_num], $tv['name'][$att_id]);
+                                                                       $this->temp_answer[$this->attributes[$this->item_num]['varequal']['respident']]['answerAdded'] = true;
+                                                                       
+                                                                       //add mark
+                                                                       $this->weights[$this->item_num] = floatval($tv['value'][$att_id]);
+       //                                                      } 
+                                                               break;
+                                                       } 
+                                               }
+                                       }
+                               } else {
+                                       $pos = sizeof($tv['value']) - 1;        //position of the last entry of the "temp answer's value" array
+                                       //Retrieve the last entry of the "temp answer's value" array
+                                       $current_answer = $tv['value'][$pos];
+                                       if (floatval($current_answer) > 0){
+                                               if (!is_array($this->answers_for_matching[$this->item_num])){
+                                                       $this->answers_for_matching[$this->item_num] = array();
+                                               }                                                       
+//                                                     if (!in_array($tv['name'][$val_id], $this->answers_for_matching[$this->item_num])){
+                                                       array_push($this->answers_for_matching[$this->item_num], $tv['name'][$pos]);
+                                                       
+                                                       //add mark
+                                                       $this->weights[$this->item_num] += floatval($current_answer);
+//                                                     } 
+                                       }
+                               } 
+                               break;
+                       case 'fieldlabel':
+                               $this->field_label[$this->item_num] = $this->character_data;
+                               break;
+                       case 'fieldentry':
+                               $this->field_entry[$this->item_num][$this->field_label[$this->item_num]] = $this->character_data;
+                               break;
+                       case 'qmd_itemtype':
+                               //Deprecated as of QTI 1.2.
+                               if (empty($this->field_entry[$this->item_num][$name])){
+                                       $this->field_entry[$this->item_num][$name] = $this->character_data;
+                               } 
+                               break;
+                       default:
+                               break;
+               }
+//             debug($this->element_path, "Ele Path");
+
+               //pop stack and reset character data, o/w it will stack up
+               array_pop($this->element_path);
+               $this->character_data = '';
+       }
+
+       // private      
+       function characterData($parser, $data){
+               global $addslashes;
+               if (trim($data)!=''){
+                       $this->character_data .= $addslashes(preg_replace('/[\t\0\x0B(\r\n)]*/', '', $data));
+//                     $this->character_data .= trim($data);
+               }
+       }
+
+       /*
+        * This function returns the question type of this XML.
+        * @access      public 
+        * @param       the item_num
+        * @return  1-8, in the order of m/c, t/f, open eneded, likert, s match, order, m/a, g match
+                               false for not found.
+        */
+       function getQuestionType($item_num){
+               switch ($this->field_entry[$item_num]['qmd_questiontype']){
+                       case 'Multiple-choice':
+                               //1, 4
+                               //likert have no answers
+                               if (empty($this->answers)){
+                                       return 4;
+                               }
+                               return 1;
+                               break;
+                       case 'True/false':
+                               return 2;
+                               break;
+                       case 'FIB-string':
+                               return 3;
+                               break;
+                       case 'Multiple-response':
+                               return 7;
+                               break;
+               } 
+
+               switch ($this->field_entry[$item_num]['qmd_itemtype']){
+                       case 'Matching':
+                               //matching
+                               return 5;
+                               break;
+               }
+
+               //handles CC packages
+               switch ($this->field_entry[$item_num]['cc_profile']){
+                       case 'cc.multiple_choice.v0p1':
+                               return 1;
+                               break;
+                       case 'cc.true_false.v0p1':
+                               return 2;
+                               break;
+                       case 'cc.fib.v0p1':
+                               return 3;
+                               break;
+                       case 'cc.multiple_response.v0p1':
+                               return 7;
+                               break;
+               }
+       
+
+               //Check if this is an ordering, or matching
+               $response_obj;
+               switch ($this->response_type[$item_num]){
+                       case AT_QTI_REPONSE_LID:
+                               $response_obj = $this->attributes[$item_num]['response_lid'];
+                               break;
+                       case AT_QTI_REPONSE_GRP:
+                               $response_obj = $this->attributes[$item_num]['response_grp'];
+                               break;
+                       case AT_QTI_REPONSE_STR:
+                               $response_obj = $this->attributes[$item_num]['response_str'];
+                               return 3;       //no need to parse the rcardinality?
+                               break;
+               }
+               if ($response_obj['rcardinality'] == 'Ordered'){
+                       return 6;
+               } elseif ($response_obj['rcardinality'] == 'Multiple'){
+                       //TODO Multiple answers, Simple matching and Graphical matching
+                       if (empty($this->field_entry[$item_num])){
+                               return 7;
+                       }
+                       return 5;
+               } elseif ($response_obj['rcardinality'] == 'Single'){
+                       return 1; //assume mc
+               }
+
+               //None found.
+               return false;
+       }
+
+
+       //set relative path
+       //must be used before calling parse.  Otherwise it will be null.
+       //private
+       function setRelativePath($path){
+               if ($path != ''){
+                       if ($path[-1] != '/'){
+                               $path .= '/'; 
+                       }
+                       $this->relative_path = $path;
+               }
+       }
+
+
+       //private
+       //when importing, the path of the images are all changed.  Have to parse them out and add the extra path in.
+       //No longer needed to reconstruct, just needed to save the path, as of Aug 25th, 08.  Decided to overwrite files if the same name exist.  
+       function reconstructRelativePath($path){
+               //match img tag, all.
+//             if (preg_match_all('/\<img(\s[^\>])*\ssrc\=[\\\\]?\"([^\\\\^\"]+)[\\\\]?\".*\/?\>/i', $path, $matches) > 0){
+//fixes multiple image tags within a $path
+               if (preg_match_all('/\<img(\s[\w^img]+\=[\\\\]?\"[^\\\\^\"]+[\\\\]?\")*\ssrc\=[\\\\]?\"([^\\\\^\"]+)[\\\\]?\"/i', $path, $matches) > 0){
+                       foreach ($matches[2] as $k=>$v){
+                               if(strpos($v, 'http://')===false && !in_array($v, $this->items)) {
+                                       $this->items[] = $v;    //save the url of this media.
+       //                              $path = str_replace($v, $this->relative_path.$v, $path);
+                               }
+                       }
+                       return $path;
+               } elseif (preg_match_all('/\<embed(\s[^\>])*\ssrc\=[\\\\]?\"([^\\\\^\"]+)[\\\\]?\".*/i', $path, $matches) > 0){
+                       foreach ($matches[2] as $k=>$v){
+                               if(strpos($v, 'http://')===false && !in_array($v, $this->items)) {
+                                       $this->items[] = $v;    //save the url of this media.
+       //                              $path = str_replace($v, $this->relative_path.$v, $path);
+                               }
+                       }
+                       return $path;
+               } else {
+                       return $path;   
+               }
+       }
+
+
+       //public
+       function close(){
+               //Free the XML parser
+               unset($this->response_label);
+               unset($this->field_label);
+               unset($this->temp_answer);
+               xml_parser_free($this->parser);
+       }
+
+}
+
+?>
\ No newline at end of file
index f1a86dc..d839582 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -17,8 +17,9 @@
  * @package    User
  */
 
-define('AF_INCLUDE_PATH', '../../include/');
-require_once(AF_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
+if (!defined('TR_INCLUDE_PATH')) exit;
+
+require_once(TR_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
 
 class User {
 
@@ -64,6 +65,20 @@ class User {
                return $this->userDAO->getUserByID($this->userID);
        }
 
+       /**
+        * Check if user is an author 
+        * @access  public
+        * @param   none
+        * @return  true : if is an author
+        *          false : if not an author
+        * @author  Cindy Qi Li
+        */
+       public function isAuthor()
+       {
+               $row = $this->userDAO->getUserByID($this->userID);
+               return $row['is_author'];
+       }
+
        /**
         * Check if user is admin 
         * @access  public
@@ -76,7 +91,7 @@ class User {
        {
                $row = $this->userDAO->getUserByID($this->userID);
                
-               if ($row['user_group_id'] == AF_USER_GROUP_ADMIN)
+               if ($row['user_group_id'] == TR_USER_GROUP_ADMIN)
                        return true;
                else
                        return false;
index 44126f2..d13e0c0 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -16,7 +16,7 @@
 * @author      Cindy Qi Li\r
 */\r
 \r
-if (!defined('AF_INCLUDE_PATH')) exit;\r
+if (!defined('TR_INCLUDE_PATH')) exit;\r
 \r
 class Utility {\r
 \r
diff --git a/docs/include/classes/Weblinks/Weblinks.class.php b/docs/include/classes/Weblinks/Weblinks.class.php
new file mode 100644 (file)
index 0000000..4de96f1
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+/****************************************************************/
+/* ATutor                                                                                                              */
+/****************************************************************/
+/* Copyright (c) 2002-2009                                                                             */
+/* Adaptive Technology Resource Centre / University of Toronto  */
+/* http://atutor.ca                                                                                            */
+/*                                                              */
+/* This program is free software. You can redistribute it and/or*/
+/* modify it under the terms of the GNU General Public License  */
+/* as published by the Free Software Foundation.                               */
+/****************************************************************/
+// $Id: Weblinks.class.php 8119 2008-10-29 13:53:06Z hwong $
+
+/**
+ * A class for Weblinks object
+ * based on:
+ *  http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_5/imswl_v1p0_localised.xsd
+ */
+
+class Weblinks {
+       //global variables
+       var $title      = '';
+       var $url        = array();      //prefs
+
+
+       /**
+        * Constructor
+        * For now, uses only title and URL
+        */
+       function Weblinks($title, $url){
+               $this->title = $title;
+               $this->url['href'] = $url;
+               $this->setUrlPrefs();   //set defaults values
+       }
+
+       /**
+        * Set Url prefs
+        * @param       string          resembles HTML target attribute, [_self, _blank, _parent, _top, <name>], default '_self'
+        * @param       string          browser window settings
+        */
+       function setUrlPrefs($target='_self', $window_features=''){
+               $this->url['target'] = $target;
+               $this->url['window_features'] = $window_features;
+       }
+
+
+       /**
+        * Return the title of this weblink
+        * @return      string
+        */
+       function getTitle(){
+               return $this->title;
+       }
+
+
+       /**
+        * Return the URL array of this weblink
+        * @return      mixed
+        */
+       function getUrl(){
+               return $this->url;
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Weblinks/Weblinks.tmpl.php b/docs/include/classes/Weblinks/Weblinks.tmpl.php
new file mode 100644 (file)
index 0000000..b11dae3
--- /dev/null
@@ -0,0 +1,7 @@
+<?php echo '<?xml version="1.0" encoding="UTF-8"?>' ?>
+<wl:webLink
+  xmlns:wl="http://www.imsglobal.org/xsd/imswl_v1p0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <title><?php echo $this->title; ?></title>
+  <url href="<?php echo $this->url_href; ?>" target="<?php echo $this->url_target; ?>"/>
+</wl:webLink>
diff --git a/docs/include/classes/Weblinks/WeblinksExport.class.php b/docs/include/classes/Weblinks/WeblinksExport.class.php
new file mode 100644 (file)
index 0000000..bb6522b
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+/****************************************************************/
+/* ATutor                                                                                                              */
+/****************************************************************/
+/* Copyright (c) 2002-2009                                                                             */
+/* Adaptive Technology Resource Centre / University of Toronto  */
+/* http://atutor.ca                                                                                            */
+/*                                                              */
+/* This program is free software. You can redistribute it and/or*/
+/* modify it under the terms of the GNU General Public License  */
+/* as published by the Free Software Foundation.                               */
+/****************************************************************/
+// $Id: WeblinksExport.class.php 8119 2008-10-29 13:53:06Z hwong $
+
+/**
+ * A very simple class to generates a singular webcontent weblink xml file.
+ * Based on the namespace:
+ * http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_5/imswl_v1p0_localised.xsd
+ */
+class WeblinksExport {
+       //Global Variables
+       var     $wl;    //weblink obj
+
+       /**
+        * Constructor
+        * @param       mixed   Weblink Object, ref Weblinks.class.php
+        */
+       function WeblinksExport($wl){
+               $this->wl = $wl;
+       }
+
+
+       /** 
+        * Export
+        */
+       function export(){
+               global $savant;
+
+               //localize
+               $wl = $this->wl;
+
+               //assign all the neccessarily values to the template.
+               $savant->assign('title', htmlentities($wl->getTitle(), ENT_QUOTES, 'UTF-8'));
+               $url = $wl->getUrl();
+               $savant->assign('url_href', htmlentities($url['href'], ENT_QUOTES, 'UTF-8'));
+               $savant->assign('url_target', $url['target']);
+               //TODO: not supported yet
+               //$savant->assign('url_window_features', $url['window_features']);
+
+               //generates xml
+               $xml = $savant->fetch(AT_INCLUDE_PATH.'classes/Weblinks/Weblinks.tmpl.php');
+
+               return $xml;
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Weblinks/WeblinksParser.class.php b/docs/include/classes/Weblinks/WeblinksParser.class.php
new file mode 100644 (file)
index 0000000..015b592
--- /dev/null
@@ -0,0 +1,102 @@
+<?php
+/****************************************************************/
+/* ATutor                                                                                                              */
+/****************************************************************/
+/* Copyright (c) 2002-2009                                                                             */
+/* Adaptive Technology Resource Centre / University of Toronto  */
+/* http://atutor.ca                                                                                            */
+/*                                                              */
+/* This program is free software. You can redistribute it and/or*/
+/* modify it under the terms of the GNU General Public License  */
+/* as published by the Free Software Foundation.                               */
+/****************************************************************/
+// $Id: WeblinksParser.class.php 8782 2009-09-04 17:33:07Z hwong $
+
+/**
+* WeblinksParser
+* Class for parsing XML language info and returning a Weblink Object
+* @access      public
+* @author      Harris Wong
+*/
+class WeblinksParser {
+       //private
+       var $parser; // the XML handler
+       var $character_data; // tmp variable for storing the data
+       var $element_path; // array of element paths (basically a stack)
+       var $title;     //link's title
+       var $url; //url
+
+       //constructor
+       function WeblinksParser() {
+               $this->parser = xml_parser_create(); 
+
+               xml_set_object($this->parser, $this);
+               xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false); /* conform to W3C specs */
+               xml_set_element_handler($this->parser, 'startElement', 'endElement');
+               xml_set_character_data_handler($this->parser, 'characterData');
+       }
+
+
+       // public
+       // @return      true if parsed successfully, false otherwise
+       function parse($xml_data) {
+               $this->element_path   = array();
+               $this->character_data = '';
+               xml_parse($this->parser, $xml_data, TRUE);              
+       }
+
+       // private
+       function startElement($parser, $name, $attributes) {
+               //save attributes.
+               switch($name) {
+                       case 'url':
+                               $this->url = $attributes['href'];
+                               break;
+               }
+               array_push($this->element_path, $name);
+   }
+
+       // private
+       /* called when an element ends */
+       /* removed the current element from the $path */
+       function endElement($parser, $name) {
+               //check element path
+               $current_pos = count($this->element_path) - 1;
+               $last_element = $this->element_path[$current_pos - 1];
+
+               switch($name) {
+                       case 'title':
+                               $this->title = $this->character_data;
+                               break;
+               }
+
+               //pop stack and reset character data, o/w it will stack up
+               array_pop($this->element_path);
+               $this->character_data = '';
+       }
+
+       // private      
+       function characterData($parser, $data){
+               global $addslashes;
+               if (trim($data)!=''){
+                       $this->character_data .= preg_replace('/[\t\0\x0B(\r\n)]*/', '', $data);
+//                     $this->character_data .= trim($data);
+               }
+       }
+
+       //public
+       function close(){
+               //Free the XML parser
+               xml_parser_free($this->parser);
+       }
+
+       //gets
+       function getTitle(){
+               return $this->title;
+       }
+       function getUrl(){
+               return $this->url;
+       }
+}
+
+?>
index ec00e62..d57703f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 require(dirname(__FILE__) . '/class.phpmailer.php');
 
 /**
-* AFrameMailer is modified from AFrameMailer
+* TransformableMailer is modified from TransformableMailer
 *
-* AFrameMailer extends PHPMailer and sets all the default values
-* that are common for AFrame.
+* TransformableMailer extends PHPMailer and sets all the default values
+* that are common for Transformable.
 * @access  public
 * @see     include/classes/phpmailer/class.phpmailer.php
-* @since   AFrame 0.1
+* @since   Transformable 0.1
 * @author  Cindy Li
 */
-class AFrameMailer extends PHPMailer {
+class TransformableMailer extends PHPMailer {
 
        /**
        * The constructor sets whether to use SMTP or Sendmail depending
        * on the value of MAIL_USE_SMTP defined in the config.inc.php file.
        * @access  public
-       * @since   AFrame 0.2
+       * @since   Transformable 0.2
        * @author  Joel Kronenberg
        */
-       function AFrameMailer() {
+       function TransformableMailer() {
                if (MAIL_USE_SMTP) {
                        $this->IsSMTP(); // set mailer to use SMTP
                        $this->Host = ini_get('SMTP');  // specify main and backup server
@@ -51,7 +51,7 @@ class AFrameMailer extends PHPMailer {
        }
 
        /**
-       * Appends a custom AFrame footer to all outgoing email then sends the email.
+       * Appends a custom Transformable footer to all outgoing email then sends the email.
        * If mail_queue is enabled then instead of sending the mail out right away, it 
        * places it in the database and waits for the cron to send it using SendQueue().
        * The mail queue does not support reply-to, or attachments, and converts all BCCs
@@ -59,15 +59,15 @@ class AFrameMailer extends PHPMailer {
        * @access  public
        * @return  boolean      whether or not the mail was sent (or queued) successfully.
        * @see     parent::send()
-       * @since   AFrame 0.1
+       * @since   Transformable 0.1
        * @author  Joel Kronenberg
        */
        function Send() {
                global $_config;
 
-               // attach the AFrame footer to the body first:
+               // attach the Transformable footer to the body first:
                $this->Body .=  "\n\n".'----------------------------------------------'."\n";
-               $this->Body .= _AT('sent_via_AFrame', AF_BASE_HREF);
+               $this->Body .= _AT('sent_via_Transformable', TR_BASE_HREF);
 
                $this->Body .= "\n"._AT('home').': http://atutor.ca';
 
@@ -75,7 +75,7 @@ class AFrameMailer extends PHPMailer {
                // for each bcc or to or cc
                if ($_config['enable_mail_queue'] && !$this->attachment) 
                {
-                       require_once(AF_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');
+                       require_once(TR_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');
                        $mailQueueDAO = new MailQueueDAO();
                        
                        for ($i = 0; $i < count($this->to); $i++) {
@@ -97,13 +97,13 @@ class AFrameMailer extends PHPMailer {
        * Sends all the queued mail. Called by ./admin/cron.php.
        * @access public
        * @return void
-       * @since AFrame 0.2
+       * @since Transformable 0.2
        * @author Joel Kronenberg
        */
        function SendQueue() {
                global $db;
 
-               require_once(AF_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');
+               require_once(TR_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');
                $mailQueueDAO = new MailQueueDAO();
                $rows = $mailQueueDAO->getAll();
 
@@ -128,7 +128,7 @@ class AFrameMailer extends PHPMailer {
                        }
                        if ($mail_ids) 
                        {
-                               include(AF_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');
+                               include(TR_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');
                                $mailQueueDAO = new MailQueueDAO();
        
                                $mail_ids = substr($mail_ids, 0, -1); // remove the last comma
index c2e239b..6d419b4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -148,7 +148,7 @@ class SqlUtility
        function queryFromFile($sql_file_path, $table_prefix){
                global $db, $progress, $errors;
                
-               include_once(AF_INCLUDE_PATH.'classes/DAO/DAO.class.php');
+               include_once(TR_INCLUDE_PATH.'classes/DAO/DAO.class.php');
                $dao = new DAO();
                
                $tables = array();
index b258efb..291e40b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
diff --git a/docs/include/config.inc.php b/docs/include/config.inc.php
deleted file mode 100644 (file)
index 3928767..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php 
-/************************************************************************/
-/* AFrame                                                               */
-/************************************************************************/
-/* Copyright (c) 2009                                                   */
-/* Adaptive Technology Resource Centre / University of Toronto          */
-/*                                                                      */
-/* This program is free software. You can redistribute it and/or        */
-/* modify it under the terms of the GNU General Public License          */
-/* as published by the Free Software Foundation.                        */
-/************************************************************************/
-/* This file was generated by the AFrame 0.1 installation script.       */
-/* File generated 2009-10-07 09:10:45                                   */
-/************************************************************************/
-/************************************************************************/
-/* the database user name                                               */
-define('DB_USER',                      'root');
-
-/* the database password                                                */
-define('DB_PASSWORD',                  '');
-
-/* the database host                                                    */
-define('DB_HOST',                      'localhost');
-
-/* the database tcp/ip port                                             */
-define('DB_PORT',                      '3306');
-
-/* the database name                                                    */
-define('DB_NAME',                      'aframe');
-
-/* The prefix to add to table names to avoid conflicts with existing    */
-/* tables. Default: AF_                                                 */
-define('TABLE_PREFIX',                 'AF_');
-
-/* Where the temporary files are located.  This includes all file       */
-/* manager and imported files.  If security is a concern, it is         */
-/* recommended that the temporary directory be moved outside of the web        */
-/* accessible area.                                                                                                            */
-define('AF_TEMP_DIR', 'C:\\Development\\aframe\\temp\\');
-
-/* DO NOT ALTER THIS LAST LINE                                          */
-define('AF_INSTALL', TRUE);
-
-?>
\ No newline at end of file
index 6fe03ab..02924a0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 /**
  * constants, some more constants are loaded from table 'config' @ include/vitals.inc.php
@@ -29,34 +29,43 @@ $_config_defaults['pref_defaults']      = 'a:1:{s:10:"PREF_THEME";s:7:"default";
 $_config = $_config_defaults;
 
 define('VERSION',              '0.1');
+
 define('UPDATE_SERVER', 'http://update.atutor.ca');
 define('SVN_TAG_FOLDER', 'http://atutorsvn.atrc.utoronto.ca/repos/atutor/tags/');
+define('RESULTS_PER_PAGE', 10);
 
 // language constants
 define('DEFAULT_LANGUAGE_CODE', 'eng');
 define('DEFAULT_CHARSET', 'utf-8');
-define('AF_LANGUAGE_LOCALE_SEP', '-');
+define('TR_LANGUAGE_LOCALE_SEP', '-');
 //$_config['default_language'] = DEFAULT_LANGUAGE_CODE;
 
-/* User group type */
-define('AF_USER_GROUP_ADMIN', 1);
-define('AF_USER_GROUP_USER', 2);
+// User group type
+define('TR_USER_GROUP_ADMIN', 1);
+define('TR_USER_GROUP_USER', 2);
 
-/* User status */
-define('AF_STATUS_DISABLED', 0);
-define('AF_STATUS_ENABLED', 1);
-define('AF_STATUS_DEFAULT', 2);
-define('AF_STATUS_UNCONFIRMED', 3);
+// User status
+define('TR_STATUS_DISABLED', 0);
+define('TR_STATUS_ENABLED', 1);
+define('TR_STATUS_DEFAULT', 2);
+define('TR_STATUS_UNCONFIRMED', 3);
+
+// content type
+define('CONTENT_TYPE_CONTENT',  0);
+define('CONTENT_TYPE_FOLDER', 1);
+define('CONTENT_TYPE_WEBLINK', 2);
+
+define('TR_KBYTE_SIZE', 1024);
 
 function get_status_by_code($status_code)
 {
-       if ($status_code == AF_STATUS_DISABLED)
+       if ($status_code == TR_STATUS_DISABLED)
                 return _AT('disabled');
-       else if ($status_code == AF_STATUS_ENABLED)
+       else if ($status_code == TR_STATUS_ENABLED)
                 return _AT('enabled');
-       else if ($status_code == AF_STATUS_DEFAULT)
+       else if ($status_code == TR_STATUS_DEFAULT)
                 return _AT('default');
-       else if ($status_code == AF_STATUS_UNCONFIRMED)
+       else if ($status_code == TR_STATUS_UNCONFIRMED)
                 return _AT('unconfirmed');
        else
                return '';
@@ -64,7 +73,7 @@ function get_status_by_code($status_code)
 
 /* User status */
 /* how many days until the password reminder link expires */
-define('AF_PASSWORD_REMINDER_EXPIRY', 2);
+define('TR_PASSWORD_REMINDER_EXPIRY', 2);
 
 /* how long cache objects can persist  */
 /* in seconds. should be low initially, but doesn't really matter. */
@@ -85,7 +94,7 @@ if (isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on')) {
        $server_protocol = 'http://';
 }
 
-$dir_deep       = substr_count(AF_INCLUDE_PATH, '..');
+$dir_deep       = substr_count(TR_INCLUDE_PATH, '..');
 $url_parts      = explode('/', $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']);
 $_base_href     = array_slice($url_parts, 0, count($url_parts) - $dir_deep-1);
 $_base_href     = $server_protocol . implode('/', $_base_href).'/';
@@ -95,8 +104,8 @@ $endpos = strlen($_base_href);
 $_base_href     = substr($_base_href, 0, $endpos);
 $_base_path  = substr($_base_href, strlen($server_protocol . $_SERVER['HTTP_HOST']));
 
-define('AF_BASE_HREF', $_base_href);
-define('AF_GUIDES_PATH', $_base_path . 'documentation/');
+define('TR_BASE_HREF', $_base_href);
+define('TR_GUIDES_PATH', $_base_path . 'documentation/');
 
 /* relative uri */
 $_rel_url = '/'.implode('/', array_slice($url_parts, count($url_parts) - $dir_deep-1));
index 60efbf6..3ec25df 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -12,7 +12,7 @@
 
 global $savant;
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 $savant->display('include/footer.tmpl.php');
 ?>
index 152a433..6d228d1 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
index 9800d80..cd44fc4 100644 (file)
@@ -1,5 +1,5 @@
 //************************************************************************/\r
-//* AFrame                                                               */\r
+//* Transformable                                                        */\r
 //************************************************************************/\r
 //* Copyright (c) 2009                                                   */\r
 //* Adaptive Technology Resource Centre / University of Toronto          */\r
index aef6526..1cded42 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 //Timer, to display "Time Spent" in footer, debug information
 $mtime = microtime(); 
@@ -29,7 +29,7 @@ global $_pages;
 global $_current_user;
 global $validate_content;
 
-include_once(AF_INCLUDE_PATH.'classes/Menu.class.php');
+include_once(TR_INCLUDE_PATH.'classes/Menu.class.php');
 
 $menu =new Menu();
 $_top_level_pages = $menu->getTopPages();
@@ -46,6 +46,7 @@ $_sub_menus = $menu->getSubMenus();
 $back_to_page = $menu->getBackToPage();
 
 //debug($_base_path.$current_page);
+//debug($back_to_page);
 //debug($_sub_menus);
 //exit;
 
@@ -58,7 +59,7 @@ $back_to_page = $menu->getBackToPage();
 $savant->assign('top_level_pages', $_top_level_pages);
 $savant->assign('current_top_level_page', $_current_root_page);
 $savant->assign('sub_menus', $_sub_menus);
-$savant->assign('back_to_page', $back_to_page);
+if ($back_to_page <> '') $savant->assign('back_to_page', $back_to_page);
 $savant->assign('current_page', $_base_path.$current_page);
 
 $savant->assign('page_title', _AT($_all_pages[$current_page]['title_var']));
@@ -76,7 +77,7 @@ if ($myLang->isRTL()) {
 
 $savant->assign('lang_code', $_SESSION['lang']);
 $savant->assign('lang_charset', $myLang->getCharacterSet());
-$savant->assign('base_path', AF_BASE_HREF);
+$savant->assign('base_path', TR_BASE_HREF);
 $savant->assign('theme', $_SESSION['prefs']['PREF_THEME']);
 
 $theme_img  = $_base_path . 'themes/'. $_SESSION['prefs']['PREF_THEME'] . '/images/';
@@ -87,6 +88,8 @@ if (isset($validate_content))
        $savant->assign('show_jump_to_report', 1);
 }
 
+// get custom head
+$custom_head = '';
 if (isset($_custom_css)) {
        $custom_head = '<link rel="stylesheet" href="'.$_custom_css.'" type="text/css" />';
 }
@@ -99,7 +102,7 @@ if (isset($_custom_head)) {
 if (isset($_pages[$current_page]['guide'])) 
 {
        $script_name = substr($_SERVER['PHP_SELF'], strlen($_base_path));
-       $savant->assign('guide', AF_GUIDES_PATH .'index.php?p='. htmlentities($script_name));
+       $savant->assign('guide', TR_GUIDES_PATH .'index.php?p='. htmlentities($script_name));
 }
 
 $savant->assign('custom_head', $custom_head);
index 1d7604d..5bf36ce 100644 (file)
@@ -1,5 +1,5 @@
 //************************************************************************/\r
-//* AFrame                                                               */\r
+//* Transformable                                                        */\r
 //************************************************************************/\r
 //* Copyright (c) 2009                                                   */\r
 //* Adaptive Technology Resource Centre / University of Toronto          */\r
index e336c12..38f0dfa 100644 (file)
@@ -11,7 +11,7 @@
 .fl-theme-coal .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
 .fl-theme-coal .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
 .fl-theme-coal .ui-widget input,.fl-theme-coal .ui-widget select,.fl-theme-coal .ui-widget textarea,.fl-theme-coal .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
-.fl-theme-coal .ui-widget-content{border:1px solid #ccc;background:#ccc url(images/ui-bg_flAF_75_cccccc_40x100.png) 50% 50% repeat-x;color:#222;}
+.fl-theme-coal .ui-widget-content{border:1px solid #ccc;background:#ccc url(images/ui-bg_flTR_75_cccccc_40x100.png) 50% 50% repeat-x;color:#222;}
 .fl-theme-coal .ui-widget-content a{color:#222;}
 .fl-theme-coal .ui-widget-header{border:1px solid #00000;background:#575757 url(images/ui-bg_highlight-soft_25_575757_1x100.png) 50% 50% repeat-x;color:#ccc;font-weight:bold;}
 .fl-theme-coal .ui-widget-header a{color:#ccc;}
 .fl-theme-coal .ui-corner-right{-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;}
 .fl-theme-coal .ui-corner-left{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;}
 .fl-theme-coal .ui-corner-all{-moz-border-radius:0;-webkit-border-radius:0;}
-.fl-theme-coal .ui-widget-overlay{background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;opacity:.40;filter:Alpha(Opacity=40);}
-.fl-theme-coal .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;opacity:.50;filter:Alpha(Opacity=50);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-coal .ui-widget-overlay{background:#000 url(images/ui-bg_flTR_0_000000_40x100.png) 50% 50% repeat-x;opacity:.40;filter:Alpha(Opacity=40);}
+.fl-theme-coal .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flTR_0_000000_40x100.png) 50% 50% repeat-x;opacity:.50;filter:Alpha(Opacity=50);-moz-border-radius:5px;-webkit-border-radius:5px;}
 .fl-theme-coal .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
 .fl-theme-coal .ui-accordion .ui-accordion-li-fix{display:inline;}
 .fl-theme-coal .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
index 7a01546..cc84bf1 100644 (file)
 .fl-theme-hc .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
 .fl-theme-hc .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
 .fl-theme-hc .ui-widget input,.fl-theme-hc .ui-widget select,.fl-theme-hc .ui-widget textarea,.fl-theme-hc .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
-.fl-theme-hc .ui-widget-content{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;}
+.fl-theme-hc .ui-widget-content{border:1px solid #000;background:#fff url(images/ui-bg_flTR_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;}
 .fl-theme-hc .ui-widget-content a{color:#000;}
-.fl-theme-hc .ui-widget-header{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;font-weight:bold;}
+.fl-theme-hc .ui-widget-header{border:1px solid #000;background:#fff url(images/ui-bg_flTR_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;font-weight:bold;}
 .fl-theme-hc .ui-widget-header a{color:#000;}
-.fl-theme-hc .ui-state-default,.fl-theme-hc .ui-widget-content .ui-state-default{border:1px solid #000;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-hc .ui-state-default,.fl-theme-hc .ui-widget-content .ui-state-default{border:1px solid #000;background:#000 url(images/ui-bg_flTR_0_000000_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
 .fl-theme-hc .ui-state-default a,.fl-theme-hc .ui-state-default a:link,.fl-theme-hc .ui-state-default a:visited{color:#fff;text-decoration:none;outline:none;}
-.fl-theme-hc .ui-state-hover,.fl-theme-hc .ui-widget-content .ui-state-hover,.fl-theme-hc .ui-state-focus,.fl-theme-hc .ui-widget-content .ui-state-focus{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-hc .ui-state-hover,.fl-theme-hc .ui-widget-content .ui-state-hover,.fl-theme-hc .ui-state-focus,.fl-theme-hc .ui-widget-content .ui-state-focus{border:1px solid #000;background:#fff url(images/ui-bg_flTR_0_ffffff_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
 .fl-theme-hc .ui-state-hover a,.fl-theme-hc .ui-state-hover a:hover{color:#000;text-decoration:none;outline:none;}
-.fl-theme-hc .ui-state-active,.fl-theme-hc .ui-widget-content .ui-state-active{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-hc .ui-state-active,.fl-theme-hc .ui-widget-content .ui-state-active{border:1px solid #000;background:#fff url(images/ui-bg_flTR_0_ffffff_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
 .fl-theme-hc .ui-state-active a,.fl-theme-hc .ui-state-active a:link,.fl-theme-hc .ui-state-active a:visited{color:#000;outline:none;text-decoration:none;}
-.fl-theme-hc .ui-state-highlight,.fl-theme-hc .ui-widget-content .ui-state-highlight{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;}
+.fl-theme-hc .ui-state-highlight,.fl-theme-hc .ui-widget-content .ui-state-highlight{border:1px solid #000;background:#fff url(images/ui-bg_flTR_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;}
 .fl-theme-hc .ui-state-highlight a,.fl-theme-hc .ui-widget-content .ui-state-highlight a{color:#000;}
-.fl-theme-hc .ui-state-error,.fl-theme-hc .ui-widget-content .ui-state-error{border:1px solid #fff;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;color:#fff;}
+.fl-theme-hc .ui-state-error,.fl-theme-hc .ui-widget-content .ui-state-error{border:1px solid #fff;background:#000 url(images/ui-bg_flTR_0_000000_40x100.png) 50% 50% repeat-x;color:#fff;}
 .fl-theme-hc .ui-state-error a,.fl-theme-hc .ui-widget-content .ui-state-error a{color:#fff;}
 .fl-theme-hc .ui-state-error-text,.fl-theme-hc .ui-widget-content .ui-state-error-text{color:#fff;}
 .fl-theme-hc .ui-state-disabled,.fl-theme-hc .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
 .fl-theme-hc .ui-corner-right{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
 .fl-theme-hc .ui-corner-left{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
 .fl-theme-hc .ui-corner-all{-moz-border-radius:5px;-webkit-border-radius:5px;}
-.fl-theme-hc .ui-widget-overlay{background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;opacity:.75;filter:Alpha(Opacity=75);}
-.fl-theme-hc .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;opacity:100;filter:Alpha(Opacity=100);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-hc .ui-widget-overlay{background:#fff url(images/ui-bg_flTR_0_ffffff_40x100.png) 50% 50% repeat-x;opacity:.75;filter:Alpha(Opacity=75);}
+.fl-theme-hc .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flTR_0_000000_40x100.png) 50% 50% repeat-x;opacity:100;filter:Alpha(Opacity=100);-moz-border-radius:5px;-webkit-border-radius:5px;}
 .fl-theme-hc .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
 .fl-theme-hc .ui-accordion .ui-accordion-li-fix{display:inline;}
 .fl-theme-hc .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
index e174772..b2e277f 100644 (file)
 .fl-theme-hci .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
 .fl-theme-hci .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
 .fl-theme-hci .ui-widget input,.fl-theme-hci .ui-widget select,.fl-theme-hci .ui-widget textarea,.fl-theme-hci .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
-.fl-theme-hci .ui-widget-content{border:1px solid #fff;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;color:#fff;}
+.fl-theme-hci .ui-widget-content{border:1px solid #fff;background:#000 url(images/ui-bg_flTR_0_000000_40x100.png) 50% 50% repeat-x;color:#fff;}
 .fl-theme-hci .ui-widget-content a{color:#fff;}
-.fl-theme-hci .ui-widget-header{border:1px solid #fff;background:#999 url(images/ui-bg_flAF_0_999999_40x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold;}
+.fl-theme-hci .ui-widget-header{border:1px solid #fff;background:#999 url(images/ui-bg_flTR_0_999999_40x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold;}
 .fl-theme-hci .ui-widget-header a{color:#fff;}
-.fl-theme-hci .ui-state-default,.fl-theme-hci .ui-widget-content .ui-state-default{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-hci .ui-state-default,.fl-theme-hci .ui-widget-content .ui-state-default{border:1px solid #000;background:#fff url(images/ui-bg_flTR_0_ffffff_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
 .fl-theme-hci .ui-state-default a,.fl-theme-hci .ui-state-default a:link,.fl-theme-hci .ui-state-default a:visited{color:#000;text-decoration:none;outline:none;}
-.fl-theme-hci .ui-state-hover,.fl-theme-hci .ui-widget-content .ui-state-hover,.fl-theme-hci .ui-state-focus,.fl-theme-hci .ui-widget-content .ui-state-focus{border:1px solid #fff;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-hci .ui-state-hover,.fl-theme-hci .ui-widget-content .ui-state-hover,.fl-theme-hci .ui-state-focus,.fl-theme-hci .ui-widget-content .ui-state-focus{border:1px solid #fff;background:#000 url(images/ui-bg_flTR_0_000000_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
 .fl-theme-hci .ui-state-hover a,.fl-theme-hci .ui-state-hover a:hover{color:#fff;text-decoration:none;outline:none;}
-.fl-theme-hci .ui-state-active,.fl-theme-hci .ui-widget-content .ui-state-active{border:1px solid #fff;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-hci .ui-state-active,.fl-theme-hci .ui-widget-content .ui-state-active{border:1px solid #fff;background:#000 url(images/ui-bg_flTR_0_000000_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
 .fl-theme-hci .ui-state-active a,.fl-theme-hci .ui-state-active a:link,.fl-theme-hci .ui-state-active a:visited{color:#fff;outline:none;text-decoration:none;}
-.fl-theme-hci .ui-state-highlight,.fl-theme-hci .ui-widget-content .ui-state-highlight{border:1px solid #fff;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;color:#fff;}
+.fl-theme-hci .ui-state-highlight,.fl-theme-hci .ui-widget-content .ui-state-highlight{border:1px solid #fff;background:#000 url(images/ui-bg_flTR_0_000000_40x100.png) 50% 50% repeat-x;color:#fff;}
 .fl-theme-hci .ui-state-highlight a,.fl-theme-hci .ui-widget-content .ui-state-highlight a{color:#fff;}
-.fl-theme-hci .ui-state-error,.fl-theme-hci .ui-widget-content .ui-state-error{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;}
+.fl-theme-hci .ui-state-error,.fl-theme-hci .ui-widget-content .ui-state-error{border:1px solid #000;background:#fff url(images/ui-bg_flTR_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;}
 .fl-theme-hci .ui-state-error a,.fl-theme-hci .ui-widget-content .ui-state-error a{color:#000;}
 .fl-theme-hci .ui-state-error-text,.fl-theme-hci .ui-widget-content .ui-state-error-text{color:#000;}
 .fl-theme-hci .ui-state-disabled,.fl-theme-hci .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
 .fl-theme-hci .ui-corner-right{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
 .fl-theme-hci .ui-corner-left{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
 .fl-theme-hci .ui-corner-all{-moz-border-radius:5px;-webkit-border-radius:5px;}
-.fl-theme-hci .ui-widget-overlay{background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;opacity:.75;filter:Alpha(Opacity=75);}
-.fl-theme-hci .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;opacity:100;filter:Alpha(Opacity=100);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-hci .ui-widget-overlay{background:#000 url(images/ui-bg_flTR_0_000000_40x100.png) 50% 50% repeat-x;opacity:.75;filter:Alpha(Opacity=75);}
+.fl-theme-hci .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#fff url(images/ui-bg_flTR_0_ffffff_40x100.png) 50% 50% repeat-x;opacity:100;filter:Alpha(Opacity=100);-moz-border-radius:5px;-webkit-border-radius:5px;}
 .fl-theme-hci .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
 .fl-theme-hci .ui-accordion .ui-accordion-li-fix{display:inline;}
 .fl-theme-hci .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
index eb41f6c..6deb9a3 100644 (file)
@@ -11,7 +11,7 @@
 .fl-theme-mist .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
 .fl-theme-mist .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
 .fl-theme-mist .ui-widget input,.fl-theme-mist .ui-widget select,.fl-theme-mist .ui-widget textarea,.fl-theme-mist .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
-.fl-theme-mist .ui-widget-content{border:1px solid #ccc;background:#fff url(images/ui-bg_flAF_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222;}
+.fl-theme-mist .ui-widget-content{border:1px solid #ccc;background:#fff url(images/ui-bg_flTR_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222;}
 .fl-theme-mist .ui-widget-content a{color:#222;}
 .fl-theme-mist .ui-widget-header{border:1px solid #5A95CF;background:#9dcaf6 url(images/ui-bg_glass_75_9dcaf6_1x400.png) 50% 50% repeat-x;color:#222;font-weight:bold;}
 .fl-theme-mist .ui-widget-header a{color:#222;}
 .fl-theme-mist .ui-corner-right{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;}
 .fl-theme-mist .ui-corner-left{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;}
 .fl-theme-mist .ui-corner-all{-moz-border-radius:4px;-webkit-border-radius:4px;}
-.fl-theme-mist .ui-widget-overlay{background:#2e83ff url(images/ui-bg_flAF_0_2e83ff_40x100.png) 50% 50% repeat-x;opacity:.20;filter:Alpha(Opacity=20);}
-.fl-theme-mist .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;opacity:.30;filter:Alpha(Opacity=30);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-mist .ui-widget-overlay{background:#2e83ff url(images/ui-bg_flTR_0_2e83ff_40x100.png) 50% 50% repeat-x;opacity:.20;filter:Alpha(Opacity=20);}
+.fl-theme-mist .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flTR_0_000000_40x100.png) 50% 50% repeat-x;opacity:.30;filter:Alpha(Opacity=30);-moz-border-radius:5px;-webkit-border-radius:5px;}
 .fl-theme-mist .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
 .fl-theme-mist .ui-accordion .ui-accordion-li-fix{display:inline;}
 .fl-theme-mist .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
index 0774905..7b80bac 100644 (file)
@@ -11,7 +11,7 @@
 .fl-theme-slate .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
 .fl-theme-slate .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
 .fl-theme-slate .ui-widget input,.fl-theme-slate .ui-widget select,.fl-theme-slate .ui-widget textarea,.fl-theme-slate .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
-.fl-theme-slate .ui-widget-content{border:1px solid #999;background:#ebebeb url(images/ui-bg_flAF_0_ebebeb_40x100.png) 50% 50% repeat-x;color:#000;}
+.fl-theme-slate .ui-widget-content{border:1px solid #999;background:#ebebeb url(images/ui-bg_flTR_0_ebebeb_40x100.png) 50% 50% repeat-x;color:#000;}
 .fl-theme-slate .ui-widget-content a{color:#000;}
 .fl-theme-slate .ui-widget-header{border:1px solid #666;background:#666 url(images/ui-bg_glass_75_666666_1x400.png) 50% 50% repeat-x;color:#fff;font-weight:bold;}
 .fl-theme-slate .ui-widget-header a{color:#fff;}
@@ -21,9 +21,9 @@
 .fl-theme-slate .ui-state-hover a,.fl-theme-slate .ui-state-hover a:hover{color:#ebebeb;text-decoration:none;outline:none;}
 .fl-theme-slate .ui-state-active,.fl-theme-slate .ui-widget-content .ui-state-active{border:1px solid #ccc;background:#ebebeb url(images/ui-bg_highlight-hard_100_ebebeb_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
 .fl-theme-slate .ui-state-active a,.fl-theme-slate .ui-state-active a:link,.fl-theme-slate .ui-state-active a:visited{color:#000;outline:none;text-decoration:none;}
-.fl-theme-slate .ui-state-highlight,.fl-theme-slate .ui-widget-content .ui-state-highlight{border:1px solid #ccc;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;color:#666;}
+.fl-theme-slate .ui-state-highlight,.fl-theme-slate .ui-widget-content .ui-state-highlight{border:1px solid #ccc;background:#fff url(images/ui-bg_flTR_0_ffffff_40x100.png) 50% 50% repeat-x;color:#666;}
 .fl-theme-slate .ui-state-highlight a,.fl-theme-slate .ui-widget-content .ui-state-highlight a{color:#666;}
-.fl-theme-slate .ui-state-error,.fl-theme-slate .ui-widget-content .ui-state-error{border:1px solid #000;background:#666 url(images/ui-bg_flAF_0_666666_40x100.png) 50% 50% repeat-x;color:#fff;}
+.fl-theme-slate .ui-state-error,.fl-theme-slate .ui-widget-content .ui-state-error{border:1px solid #000;background:#666 url(images/ui-bg_flTR_0_666666_40x100.png) 50% 50% repeat-x;color:#fff;}
 .fl-theme-slate .ui-state-error a,.fl-theme-slate .ui-widget-content .ui-state-error a{color:#fff;}
 .fl-theme-slate .ui-state-error-text,.fl-theme-slate .ui-widget-content .ui-state-error-text{color:#fff;}
 .fl-theme-slate .ui-state-disabled,.fl-theme-slate .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
 .fl-theme-slate .ui-corner-right{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
 .fl-theme-slate .ui-corner-left{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
 .fl-theme-slate .ui-corner-all{-moz-border-radius:5px;-webkit-border-radius:5px;}
-.fl-theme-slate .ui-widget-overlay{background:#ccc url(images/ui-bg_flAF_0_cccccc_40x100.png) 50% 50% repeat-x;opacity:.50;filter:Alpha(Opacity=50);}
-.fl-theme-slate .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#999 url(images/ui-bg_flAF_0_999999_40x100.png) 50% 50% repeat-x;opacity:.50;filter:Alpha(Opacity=50);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-slate .ui-widget-overlay{background:#ccc url(images/ui-bg_flTR_0_cccccc_40x100.png) 50% 50% repeat-x;opacity:.50;filter:Alpha(Opacity=50);}
+.fl-theme-slate .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#999 url(images/ui-bg_flTR_0_999999_40x100.png) 50% 50% repeat-x;opacity:.50;filter:Alpha(Opacity=50);-moz-border-radius:5px;-webkit-border-radius:5px;}
 .fl-theme-slate .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
 .fl-theme-slate .ui-accordion .ui-accordion-li-fix{display:inline;}
 .fl-theme-slate .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
diff --git a/docs/include/lib/filemanager.inc.php b/docs/include/lib/filemanager.inc.php
new file mode 100644 (file)
index 0000000..02f3fb4
--- /dev/null
@@ -0,0 +1,424 @@
+<?php
+/************************************************************************/
+/* Transformable                                                        */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* This program is free software. You can redistribute it and/or        */
+/* modify it under the terms of the GNU General Public License          */
+/* as published by the Free Software Foundation.                        */
+/************************************************************************/
+
+if (!defined('TR_INCLUDE_PATH')) { exit; }
+
+/**
+* Allows the copying of entire directories.
+* @access  public
+* @param   string $source              the source directory
+* @param   string $dest                        the destination directory
+* @return  boolean                             whether the copy was successful or not
+* @link           http://www.php.net/copy
+* @author  www at w8c dot com
+*/
+function copys($source,$dest)
+{
+       if (!is_dir($source)) {
+               return false;
+       }
+       if (!is_dir($dest))     {
+               mkdir($dest);
+       }
+       
+       $h=@dir($source);
+       while (@($entry=$h->read()) !== false) {
+               if (($entry == '.') || ($entry == '..')) {
+                       continue;
+               }
+
+               if (is_dir("$source/$entry") && $dest!=="$source/$entry") {
+                       copys("$source/$entry", "$dest/$entry");
+               } else {
+                       @copy("$source/$entry", "$dest/$entry");
+               }
+       }
+       $h->close();
+       return true;
+} 
+
+/**
+* Enables deletion of directory if not empty
+* @access  public
+* @param   string $dir         the directory to delete
+* @return  boolean                     whether the deletion was successful
+* @author  Joel Kronenberg
+*/
+function clr_dir($dir) {
+       if(!$opendir = @opendir($dir)) {
+               return false;
+       }
+       
+       while(($readdir=readdir($opendir)) !== false) {
+               if (($readdir !== '..') && ($readdir !== '.')) {
+                       $readdir = trim($readdir);
+
+                       clearstatcache(); /* especially needed for Windows machines: */
+
+                       if (is_file($dir.'/'.$readdir)) {
+                               if(!@unlink($dir.'/'.$readdir)) {
+                                       return false;
+                               }
+                       } else if (is_dir($dir.'/'.$readdir)) {
+                               /* calls itself to clear subdirectories */
+                               if(!clr_dir($dir.'/'.$readdir)) {
+                                       return false;
+                               }
+                       }
+               }
+       } /* end while */
+
+       @closedir($opendir);
+       
+       if(!@rmdir($dir)) {
+               return false;
+       }
+       return true;
+}
+
+/**
+* Calculate the size in Bytes of a directory recursively.
+* @access  public
+* @param   string $dir         the directory to traverse
+* @return  int                         the total size in Bytes of the directory
+* @author  Joel Kronenberg
+*/
+function dirsize($dir) {
+       if (is_dir($dir)) {
+               $dh = @opendir($dir);
+       }
+       if (!$dh) {
+               return -1;
+       }
+       $size = 0;
+       while (($file = readdir($dh)) !== false) {
+    
+               if ($file != '.' && $file != '..') {
+                       $path = $dir.$file;
+                       if (is_dir($path)) {
+                               $size += dirsize($path.'/');
+                       } elseif (is_file($path)) {
+                               $size += filesize($path);
+                       }
+               }
+                
+       }
+       closedir($dh);
+       //       echo 'something';
+    //  exit;
+       return $size;
+ // exit;
+}
+
+/**
+* This function gets used by PclZip when extracting a zip archive.
+* @access  private
+* @return  int                         whether or not to include the file
+* @author  Joel Kronenberg
+*/
+       function preExtractCallBack($p_event, &$p_header) {
+               global $translated_file_names;
+
+               if ($p_header['folder'] == 1) {
+                       return 1;
+               }
+
+               if ($translated_file_names[$p_header['index']] == '') {
+                       return 0;
+               }
+
+               if ($translated_file_names[$p_header['index']]) {
+                       $p_header['filename'] = substr($p_header['filename'], 0, -strlen($p_header['stored_filename']));
+                       $p_header['filename'] .= $translated_file_names[$p_header['index']];
+               }
+               return 1;
+       }
+
+/**
+* This function gets used by PclZip when creating a zip archive.
+* @access  private
+* @return  int                         whether or not to include the file
+* @author  Joel Kronenberg
+*/
+       function preImportCallBack($p_event, &$p_header) {
+               global $IllegalExtentions;
+
+               if ($p_header['folder'] == 1) {
+                       return 1;
+               }
+
+               $path_parts = pathinfo($p_header['filename']);
+               $ext = $path_parts['extension'];
+
+               if (in_array($ext, $IllegalExtentions)) {
+                       return 0;
+               }
+
+               return 1;
+       }
+
+
+/* prints the <options> out of $cats which is an array of course categories where */
+/* $cats[parent_cat_id][] = $row */
+function print_course_cats($parent_cat_id, &$cats, $cat_row, $depth=0) {
+       $my_cats = $cats[$parent_cat_id];
+       if (!is_array($my_cats)) {
+               return;
+       }
+       foreach ($my_cats as $cat) {
+
+               echo '<option value="'.$cat['cat_id'].'"';
+               if($cat['cat_id'] == $cat_row){
+                       echo  ' selected="selected"';
+               }
+               echo '>';
+               echo str_pad('', $depth, '-');
+               echo $cat['cat_name'].'</option>'."\n";
+
+               print_course_cats($cat['cat_id'], $cats,  $cat_row, $depth+1);
+       }
+}
+
+// returns the most appropriate representation of Bytes in MB, KB, or B
+function get_human_size($num_bytes) {
+       $abs_num_bytes = abs($num_bytes);
+
+       if ($abs_num_bytes >= TR_KBYTE_SIZE * TR_KBYTE_SIZE) {
+               return round(bytes_to_megabytes($num_bytes), 2) .' '. _AT('mb');
+       } else if ($abs_num_bytes >= TR_KBYTE_SIZE) {
+               return round(bytes_to_kilobytes($num_bytes), 2) .' '._AT('kb') ;
+       }
+       // else:
+
+       return $num_bytes . ' '._AT('bt');
+}
+
+/**
+* Returns the MB representation of inputed bytes
+* @access  public
+* @param   int $num_bytes      the input bytes to convert
+* @return  int                         MB representation of $num_bytes
+* @author  Heidi Hazelton
+*/
+function bytes_to_megabytes($num_bytes) {
+       return $num_bytes/TR_KBYTE_SIZE/TR_KBYTE_SIZE;
+}
+
+/**
+* Returns the Byte representation of inputed MB
+* @access  public
+* @param   int $num_bytes      the input MB to convert
+* @return  int                         the Bytes representation of $num_bytes
+* @author  Heidi Hazelton
+*/
+function megabytes_to_bytes($num_bytes) {
+       return $num_bytes*TR_KBYTE_SIZE*TR_KBYTE_SIZE;
+}
+
+/**
+* Returns the KB representation of inputed Bytes
+* @access  public
+* @param   int $num_bytes      the input Bytes to convert
+* @return  int                         the KB representation of $num_bytes
+* @author  Heidi Hazelton
+*/
+function bytes_to_kilobytes($num_bytes) {
+       return $num_bytes/TR_KBYTE_SIZE;
+}
+
+/**
+* Returns the Bytes representation of inputed KBytes
+* @access  public
+* @param   int $num_bytes      the input KBytes to convert
+* @return  int                         the KBytes representation of $num_bytes
+* @author  Heidi Hazelton
+*/
+function kilobytes_to_bytes($num_bytes) {
+       return $num_bytes*TR_KBYTE_SIZE;
+}
+
+/**
+* Outputs the directories associated with a course in the form of <option> elements.
+* @access public
+* @param  string $cur_dir  the current directory to include in the options.
+* @author Norma Thompson
+*/
+function output_dirs($current_path,$cur_dir,$indent) {
+       // open the cur_dir
+       if ($dir = opendir($current_path.$cur_dir)) {
+
+               // recursively call output_dirs() for all directories in this directory
+               while (false !== ($file = readdir($dir)) ) {
+
+                       //if the name is not a directory 
+                       if( ($file == '.') || ($file == '..') ) {
+                               continue;
+                       }
+
+                       // if it is a directory call function
+                       if(is_dir($current_path.$cur_dir.$file)) {
+                               $ldir = explode('/',$cur_dir.$file);
+                               $count = count($ldir);
+                               $label = $ldir[$count-1];
+                               
+                               $dir_option .= '<option value="'.$cur_dir.$file.'/" >'.$indent.$label.'</option>';
+
+                               $dir_option .= output_dirs($current_path,$cur_dir.$file.'/',$indent.'--');
+                       }
+                       
+               } // end while  
+               
+               closedir($dir); 
+       }
+       return $dir_option;
+}
+
+function display_tree($current_path, $cur_dir, $pathext, $ignore_children = false) {
+       // open the cur_dir
+       static $list_array;
+       if (!isset($list_array)) {
+               $list_array = explode(',', $_GET['list']);
+       }
+       if ($dir = opendir($current_path . $cur_dir)) {
+
+               // recursively call output_dirs() for all directories in this directory
+               while (false !== ($file = readdir($dir)) ) {
+
+                       //if the name is not a directory 
+                       if( ($file == '.') || ($file == '..') ) {
+                               continue;
+                       }
+
+                       // if it is a directory call function
+                       if (is_dir($current_path . $cur_dir . $file)) {
+
+                               //$ldir = explode('/',$cur_dir.$file);
+                               //$count = count($ldir);
+                               //$label = $ldir[$count-1];
+
+                               $check = '';
+                               $here  = '';
+                               if ($cur_dir . $file == substr($pathext, 0, -1)) {
+                                       $check = 'checked="checked"';
+                                       $here = ' ' . _AT('current_location');
+                               } else if (($cur_dir == $pathext) && in_array($file, $list_array)) {
+                                       $ignore_children = true;
+                               }
+
+                               if ($ignore_children) {
+                                       $check = 'disabled="disabled"';
+                                       $class = ' disabled';
+                               }
+
+                               $dir_option .= '<ul><li class="folders'.$class.'">';
+                               $dir_option .= '<label><input type="radio" name="dir_name" value="'.$cur_dir.$file.'" '.$check. '/>'. $file . $here. '</label>';
+                               $dir_option .= ''.display_tree($current_path,$cur_dir.$file.'/', $pathext, $ignore_children).'';
+                               $dir_option .= '</li></ul>';
+
+                               if (($cur_dir == $pathext) && in_array($file, $list_array)) {
+                                       $ignore_children = false;
+                                       $class = '';
+                               }
+                       }
+
+                       
+               } // end while  
+               
+               closedir($dir); 
+       }
+       return $dir_option;
+}
+
+function course_realpath($file) {
+       if (!$_SESSION['course_id']) {
+               return FALSE;
+       }
+       
+       $course_path = TR_CONTENT_DIR . $_SESSION['course_id'];
+       
+       $path_parts = pathinfo($file);
+       
+       $dir_name   = $path_parts['dirname'];
+       $file_name  = $path_parts['basename'];
+       $ext_name   = $path_parts['extension'];
+
+       //1. determine the real path of the file/directory
+       if (is_dir($dir_name.DIRECTORY_SEPARATOR.$file_name) && $ext_name == '') {
+               //if directory ws passed through (moving file to diff directory)
+               $real = realpath($dir_name . DIRECTORY_SEPARATOR . $file_name);
+       } else {
+               //if file was passed through or no existant direcotry was passed through (rename/creating dir)
+               $real = realpath($dir_name);
+       }
+
+       //2. and whether its in the course content directory
+       if (substr($real, 0, strlen($course_path)) != $course_path) {
+               return FALSE;
+       }
+
+       //3. check if extensions are legal
+
+       //4. Otherwise return the real path of the file
+       return $real;
+}
+
+/**
+* Returns canonicalized absolute pathname to a file/directory in the content directory
+* @access public
+* @param  string $file the relative path to the file or directory
+* @return  string      the full path to the file or directory, FALSE if it does not exist in our content directory.
+*/
+function course_realpath_NEW_VERSION($file) {
+       if (!$_SESSION['course_id']) {
+               return FALSE;
+       }
+       
+       $course_path = TR_CONTENT_DIR . $_SESSION['course_id'];
+
+       // determine the real path of the file/directory
+       $real = realpath($course_path . DIRECTORY_SEPARATOR . $file);
+       
+       if (!file_exists($real)) {
+               // the file or directory does not exist
+               return FALSE;
+
+       } else if (substr($real, 0, strlen($course_path)) != $course_path) {
+               // the file or directory is not in the content path
+               return FALSE;
+
+       } else {
+               // Otherwise return the real path of the file
+               return $real;
+       }
+}
+
+/**
+* Returns the name of the readme file in the given directory
+* @access public
+* @param  string $dir_name the name of the directory
+* @return  string      the name of the readme file
+*/
+function get_readme($dir)
+{
+       if (!is_dir($dir)) return '';
+       
+       $dh = opendir($dir);
+       
+       while (($file = readdir($dh)) !== false) {
+               if (stristr($file, 'readme') && substr($file, -4) <> '.php')
+                       return $file;
+       }
+       
+       closedir($dh);
+       return '';
+}
+?>
\ No newline at end of file
index 82e3b53..057dfd5 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
index 40d99a6..354ab90 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,8 +10,8 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
-require(AF_INCLUDE_PATH . 'classes/DAO/LanguageTextDAO.class.php');
+if (!defined('TR_INCLUDE_PATH')) { exit; }
+require(TR_INCLUDE_PATH . 'classes/DAO/LanguageTextDAO.class.php');
 
 /**********************************************************************************/
 /* Output functions found in this file, in order:
@@ -45,7 +45,7 @@ function _AT() {
        // a feedback msg
        if (!is_array($args[0])) {
                /**
-                * Added functionality for translating language code String (AF_ERROR|AF_INFOS|AF_WARNING|AF_FEEDBACK).*
+                * Added functionality for translating language code String (TR_ERROR|TR_INFOS|TR_WARNING|TR_FEEDBACK).*
                 * to its text and returning the result. No caching needed.
                 * @author Jacek Materna
                 */
@@ -53,8 +53,8 @@ function _AT() {
                // Check for specific language prefix, extendible as needed
                // 0002767:  a substring+in_array test should be faster than a preg_match test.
                // replaced the preg_match with a test of the substring.
-               $sub_arg = substr($args[0], 0, 7); // 7 is the shortest type of msg (AF_INFO)
-               if (in_array($sub_arg, array('AF_ERRO','AF_INFO','AF_WARN','AF_FEED','AF_CONF'))) {
+               $sub_arg = substr($args[0], 0, 7); // 7 is the shortest type of msg (TR_INFO)
+               if (in_array($sub_arg, array('TR_ERRO','TR_INFO','TR_WARN','TR_FEED','TR_CONF'))) {
                        global $_base_path, $addslashes;
 
                        $args[0] = $addslashes($args[0]);
@@ -68,7 +68,7 @@ function _AT() {
                                $row = $rows[0];
                                // do not cache key as a digit (no contstant(), use string)
                                $msgs = str_replace('SITE_URL/', $_base_path, $row['text']);
-                               if (defined('AF_DEVEL') && AF_DEVEL) {
+                               if (defined('TR_DEVEL') && TR_DEVEL) {
                                        $msgs .= ' <small><small>('. $args[0] .')</small></small>';
                                }
                        }
@@ -79,7 +79,7 @@ function _AT() {
        
        // a template variable
        if (!isset($_template)) {
-               $url_parts = parse_url(AF_BASE_HREF);
+               $url_parts = parse_url(TR_BASE_HREF);
                $name = substr($_SERVER['PHP_SELF'], strlen($url_parts['path'])-1);
 
                if ( !($lang_et = cache(120, 'lang', $_SESSION['lang'].'_'.$name)) ) {
@@ -160,13 +160,13 @@ function _AT() {
        ?? %a: Lowercase Ante meridiem and Post meridiem am or pm 
        ?? %A: Uppercase Ante meridiem and Post meridiem AM or PM 
 
-       valid formAF_types:
-       AF_DATE_MYSQL_DATETIME:         YYYY-MM-DD HH:MM:SS
-       AF_DATE_MYSQL_TIMESTAMP_14:     YYYYMMDDHHMMSS
-       AF_DATE_UNIX_TIMESTAMP:         seconds since epoch
-       AF_DATE_INDEX_VALUE:            0-x, index into a date array
+       valid formTR_types:
+       TR_DATE_MYSQL_DATETIME:         YYYY-MM-DD HH:MM:SS
+       TR_DATE_MYSQL_TIMESTAMP_14:     YYYYMMDDHHMMSS
+       TR_DATE_UNIX_TIMESTAMP:         seconds since epoch
+       TR_DATE_INDEX_VALUE:            0-x, index into a date array
 */
-function AF_date($format='%Y-%M-%d', $timestamp = '', $formAF_type=AF_DATE_MYSQL_DATETIME) {   
+function TR_date($format='%Y-%M-%d', $timestamp = '', $formTR_type=TR_DATE_MYSQL_DATETIME) {   
        static $day_name_ext, $day_name_con, $month_name_ext, $month_name_con;
        global $_config;
 
@@ -214,7 +214,7 @@ function AF_date($format='%Y-%M-%d', $timestamp = '', $formAF_type=AF_DATE_MYSQL
                                                                'date_dec');
        }
 
-       if ($formAF_type == AF_DATE_INDEX_VALUE) {
+       if ($formTR_type == TR_DATE_INDEX_VALUE) {
                // apply timezone offset
                apply_timezone($timestamp);
        
@@ -231,11 +231,11 @@ function AF_date($format='%Y-%M-%d', $timestamp = '', $formAF_type=AF_DATE_MYSQL
 
        if ($timestamp == '') {
                $timestamp = time();
-               $formAF_type = AF_DATE_UNIX_TIMESTAMP;
+               $formTR_type = TR_DATE_UNIX_TIMESTAMP;
        }
 
        /* convert the date to a Unix timestamp before we do anything with it */
-       if ($formAF_type == AF_DATE_MYSQL_DATETIME) {
+       if ($formTR_type == TR_DATE_MYSQL_DATETIME) {
                $year   = substr($timestamp,0,4);
                $month  = substr($timestamp,5,2);
                $day    = substr($timestamp,8,2);
@@ -244,7 +244,7 @@ function AF_date($format='%Y-%M-%d', $timestamp = '', $formAF_type=AF_DATE_MYSQL
                $sec    = substr($timestamp,17,2);
            $timestamp  = mktime($hour, $min, $sec, $month, $day, $year);
 
-       } else if ($formAF_type == AF_DATE_MYSQL_TIMESTAMP_14) {
+       } else if ($formTR_type == TR_DATE_MYSQL_TIMESTAMP_14) {
            $year               = substr($timestamp,0,4);
            $month              = substr($timestamp,4,2);
            $day                = substr($timestamp,6,2);
@@ -302,10 +302,10 @@ function AF_date($format='%Y-%M-%d', $timestamp = '', $formAF_type=AF_DATE_MYSQL
        /**
        *       Transforms text based on formatting preferences.  Original $input is also changed (passed by reference).
        *       Can be called as:
-       *       1) $output = AF_print($input, $name);
+       *       1) $output = TR_print($input, $name);
        *          echo $output;
        *
-       *       2) echo AF_print($input, $name); // prefered method
+       *       2) echo TR_print($input, $name); // prefered method
        *
        * @access       public
        * @param        string $input                   text being transformed
@@ -313,11 +313,11 @@ function AF_date($format='%Y-%M-%d', $timestamp = '', $formAF_type=AF_DATE_MYSQL
        * @param        boolean $runtime_html   forcefully disables html formatting for $input (only used by fields that 
        *                                                                       have the 'formatting' option
        * @return       string                                  transformed $input
-       * @see          AF_FORMAT constants             in include/lib/constants.inc.php
+       * @see          TR_FORMAT constants             in include/lib/constants.inc.php
        * @see          query_bit()                             in include/vitals.inc.php
        * @author       Joel Kronenberg
        */
-       function AF_print($input, $name, $runtime_html = true) {
+       function TR_print($input, $name, $runtime_html = true) {
                global $_field_formatting;
 
                if (!isset($_field_formatting[$name])) {
@@ -329,44 +329,44 @@ function AF_date($format='%Y-%M-%d', $timestamp = '', $formAF_type=AF_DATE_MYSQL
                                $name = $parts[0].'.*';
                        } else {
                                /* field not set, and there's no global setting */
-                               /* same as AF_FORMAF_NONE */
+                               /* same as TR_FORMTR_NONE */
                                return $input;
                        }
                }
 
-               if (query_bit($_field_formatting[$name], AF_FORMAF_QUOTES)) {
+               if (query_bit($_field_formatting[$name], TR_FORMTR_QUOTES)) {
                        $input = str_replace('"', '&quot;', $input);
                }
 
-               if (query_bit($_field_formatting[$name], AF_FORMAF_CONTENT_DIR)) {
+               if (query_bit($_field_formatting[$name], TR_FORMTR_CONTENT_DIR)) {
                        $input = str_replace('CONTENT_DIR/', '', $input);
                }
 
-               if (query_bit($_field_formatting[$name], AF_FORMAF_HTML) && $runtime_html) {
+               if (query_bit($_field_formatting[$name], TR_FORMTR_HTML) && $runtime_html) {
                        /* what special things do we have to do if this is HTML ? remove unwanted HTML? validate? */
                } else {
                        $input = str_replace('<', '&lt;', $input);
                        $input = nl2br($input);
                }
 
-               /* this has to be here, only because AF_FORMAF_HTML is the only check that has an else-block */
-               if ($_field_formatting[$name] === AF_FORMAF_NONE) {
+               /* this has to be here, only because TR_FORMTR_HTML is the only check that has an else-block */
+               if ($_field_formatting[$name] === TR_FORMTR_NONE) {
                        return $input;
                }
 
-               if (query_bit($_field_formatting[$name], AF_FORMAF_EMOTICONS)) {
+               if (query_bit($_field_formatting[$name], TR_FORMTR_EMOTICONS)) {
                        $input = smile_replace($input);
                }
 
-               if (query_bit($_field_formatting[$name], AF_FORMAF_ATCODES)) {
+               if (query_bit($_field_formatting[$name], TR_FORMTR_ATCODES)) {
                        $input = trim(myCodes(' ' . $input . ' '));
                }
 
-               if (query_bit($_field_formatting[$name], AF_FORMAF_LINKS)) {
+               if (query_bit($_field_formatting[$name], TR_FORMTR_LINKS)) {
                        $input = trim(make_clickable(' ' . $input . ' '));
                }
 
-               if (query_bit($_field_formatting[$name], AF_FORMAF_IMAGES)) {
+               if (query_bit($_field_formatting[$name], TR_FORMTR_IMAGES)) {
                        $input = trim(image_replace(' ' . $input . ' '));
                }
 
@@ -693,7 +693,7 @@ function image_replace($text) {
        return $text;
 }
 
-function formAF_final_output($text, $nl2br = true) {
+function formTR_final_output($text, $nl2br = true) {
        global $_base_path;
 
        $text = str_replace('CONTENT_DIR/', '', $text);
@@ -733,7 +733,7 @@ function highlight($input, $var) {//$input is the string, $var is the text to be
 
 
 /* @See: ./index.php */
-function formAF_content($input, $html = 0, $glossary, $simple = false) {
+function formTR_content($input, $html = 0, $glossary, $simple = false) {
        global $_base_path, $_config_defaults;
 
        if (!$html) {
@@ -785,11 +785,11 @@ function formAF_content($input, $html = 0, $glossary, $simple = false) {
        }
 
        if ($html) {
-               $x = formAF_final_output($input, false);
+               $x = formTR_final_output($input, false);
                return $x;
        }
 
-       $output = formAF_final_output($input);
+       $output = formTR_final_output($input);
 
        $output = '<p>'.$output.'</p>';
 
@@ -828,7 +828,7 @@ function getTranslatedCodeStr($codes) {
                        while ($row = @mysql_fetch_assoc($result)) {
                                // do not cache key as a digit (no contstant(), use string)
                                $_cache_msgs_new[$row['term']] = str_replace('SITE_URL/', $_base_path, $row['text']);
-                               if (AF_DEVEL) {
+                               if (TR_DEVEL) {
                                        $_cache_msgs_new[$row['term']] .= ' <small><small>('.$row['term'].')</small></small>';
                                }
                        }
@@ -887,12 +887,16 @@ function print_paginator($current_page, $num_rows, $request_args, $rows_per_page
        $num_pages = ceil($num_rows / $rows_per_page);
        $request_args = '?'.$request_args;
 
-    if ($num_rows) {
+       if ($num_pages == 1) return;
+       if ($num_rows) {
                echo '<div class="paging">';
            echo '<ul>';
                
                $i=max($current_page-$window - max($window-$num_pages+$current_page,0), 1);
 
+           if ($current_page > 1)
+                       echo '<li><a href="'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p='.($current_page-1).'">'._AT('prev').'</a>&nbsp;&nbsp;&nbsp;</li>';
+    
                if ($i > 1) {
                        echo '<li><a href="'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p=1">1</a></li>';
                        if ($i > 2) {
@@ -913,6 +917,10 @@ function print_paginator($current_page, $num_rows, $request_args, $rows_per_page
                }
                        echo '<li><a href="'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p='.$num_pages.'">'.$num_pages.'</a></li>';
                }
+               
+               if ($current_page < $num_pages)
+                       echo '<li>&nbsp;&nbsp;&nbsp;<a href="'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p='.($current_page+1).'">'._AT('next').'</a></li>';
+               
                echo '</ul>';
                echo '</div>';
        }
index 0e58115..57e291c 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 \r
 /* constants to map privileges.privilege_id, used to load constant pages */\r
 \r
-define('AF_PRIV_HOME', 1);\r
-define('AF_PRIV_SYSTEM', 2);\r
-define('AF_PRIV_USER_MANAGEMENT', 3);\r
-define('AF_PRIV_LANGUAGE_MANAGEMENT', 4);\r
-define('AF_PRIV_TRANSLATION', 5);\r
-define('AF_PRIV_UPDATER', 6);\r
-define('AF_PRIV_PROFILE', 7);\r
+define('TR_PRIV_HOME', 1);\r
+define('TR_PRIV_SYSTEM', 2);\r
+define('TR_PRIV_USER_MANAGEMENT', 3);\r
+define('TR_PRIV_LANGUAGE_MANAGEMENT', 4);\r
+define('TR_PRIV_TRANSLATION', 5);\r
+define('TR_PRIV_UPDATER', 6);\r
+define('TR_PRIV_PROFILE', 7);\r
 \r
 /* constants used for menu item generation. Used in class Menu (include/classes/Menu.class.php) */\r
-define('AF_NAV_PUBLIC', 'AF_NAV_PUBLIC');  // public menus, when no user login\r
-define('AF_NAV_TOP', 'AF_NAV_TOP');        // top tab menus\r
+define('TR_NAV_PUBLIC', 'TR_NAV_PUBLIC');  // public menus, when no user login\r
+define('TR_NAV_TOP', 'TR_NAV_TOP');        // top tab menus\r
+\r
+global $_current_user;\r
 \r
 include_once('classes/DAO/PrivilegesDAO.class.php');\r
 $priviledgesDAO = new PrivilegesDAO();\r
@@ -40,32 +42,32 @@ foreach ($rows as $row)
        $privs[] = $row['privilege_id'];\r
 \r
 /* initialize pages accessed by public */\r
-//$_pages[AF_NAV_PUBLIC] = array('index.php' => array('parent'=>AF_NAV_PUBLIC));\r
+//$_pages[TR_NAV_PUBLIC] = array('index.php' => array('parent'=>TR_NAV_PUBLIC));\r
 \r
 /* define all accessible pages */\r
 // 1. public pages\r
 $_pages['register.php']['title_var'] = 'registration';\r
-$_pages['register.php']['parent']    = AF_NAV_PUBLIC;\r
-$_pages['register.php']['guide']    = 'AF_HELP_REGISTRATION';\r
+$_pages['register.php']['parent']    = TR_NAV_PUBLIC;\r
+$_pages['register.php']['guide']    = 'TR_HELP_REGISTRATION';\r
 \r
 $_pages['confirm.php']['title_var'] = 'confirm';\r
-$_pages['confirm.php']['parent']    = AF_NAV_PUBLIC;\r
+$_pages['confirm.php']['parent']    = TR_NAV_PUBLIC;\r
 \r
 $_pages['login.php']['title_var'] = 'login';\r
-$_pages['login.php']['parent']    = AF_NAV_PUBLIC;\r
-$_pages['login.php']['guide']    = 'AF_HELP_LOGIN';\r
+$_pages['login.php']['parent']    = TR_NAV_PUBLIC;\r
+$_pages['login.php']['guide']    = 'TR_HELP_LOGIN';\r
 $_pages['login.php']['children']  = array_merge(array('password_reminder.php'), isset($_pages['login.php']['children']) ? $_pages['login.php']['children'] : array());\r
 \r
 $_pages['logout.php']['title_var'] = 'logout';\r
-$_pages['logout.php']['parent']    = AF_NAV_PUBLIC;\r
+$_pages['logout.php']['parent']    = TR_NAV_PUBLIC;\r
 \r
 $_pages['password_reminder.php']['title_var'] = 'password_reminder';\r
 $_pages['password_reminder.php']['parent']    = 'login.php';\r
-$_pages['password_reminder.php']['guide']    = 'AF_HELP_PASSWORD_REMINDER';\r
+$_pages['password_reminder.php']['guide']    = 'TR_HELP_PASSWORD_REMINDER';\r
 \r
 $_pages['oauth/oauth_authenticate.php']['title_var'] = 'oauth_authenticate';\r
-$_pages['login.php']['parent']    = AF_NAV_PUBLIC;\r
-$_pages['login.php']['guide']    = 'AF_HELP_OAUTH_AUTHENTICATE';\r
+$_pages['login.php']['parent']    = TR_NAV_PUBLIC;\r
+$_pages['login.php']['guide']    = 'TR_HELP_OAUTH_AUTHENTICATE';\r
 \r
 // The scripts below need to be accessible by public. \r
 $_pages['guideline/view_guideline.php']['title_var'] = 'view_guideline';   // used in web service validation response\r
@@ -74,41 +76,47 @@ $_pages['documentation/web_service_api.php']['title_var'] = 'web_service_api';
 $_pages['documentation/oauth_server_api.php']['title_var'] = 'oauth_server_api';\r
 \r
 // home pages\r
-if (in_array(AF_PRIV_HOME, $privs))\r
+if (in_array(TR_PRIV_HOME, $privs))\r
 {\r
-       $_pages['checker/index.php']['title_var'] = 'aframe';\r
-       $_pages['checker/index.php']['parent']    = AF_NAV_PUBLIC;\r
-       $_pages['checker/index.php']['guide']    = 'AF_HELP_INDEX';\r
+       $_pages['home/index.php']['title_var'] = 'home';\r
+       $_pages['home/index.php']['parent']    = TR_NAV_PUBLIC;\r
+       $_pages['home/index.php']['guide']    = 'TR_HELP_INDEX';\r
        \r
-       $_pages['checker/suggestion.php']['parent']    = AF_NAV_PUBLIC;\r
-       $_pages['checker/suggestion.php']['guide']    = 'AF_HELP_SUGGESTION';\r
+       if (isset($_current_user) && $_current_user->isAuthor())\r
+       {\r
+               $_pages['home/index.php']['children']  = array_merge(array('home/create_course.php'), isset($_pages['home/index.php']['children']) ? $_pages['home/index.php']['children'] : array());\r
+               \r
+               $_pages['home/create_course.php']['title_var'] = 'create_course';\r
+               $_pages['home/create_course.php']['parent']    = 'home/index.php';\r
+               $_pages['home/create_course.php']['guide']    = 'TR_HELP_CREATE_COURSE';\r
+       }\r
 }\r
 \r
 // system pages\r
-if (in_array(AF_PRIV_SYSTEM, $privs))\r
+if (in_array(TR_PRIV_SYSTEM, $privs))\r
 {\r
        $_pages['system/index.php']['title_var'] = 'system';\r
-       $_pages['system/index.php']['parent']    = AF_NAV_PUBLIC;\r
-       $_pages['system/index.php']['guide']    = 'AF_HELP_SYSTEM';\r
+       $_pages['system/index.php']['parent']    = TR_NAV_PUBLIC;\r
+       $_pages['system/index.php']['guide']    = 'TR_HELP_SYSTEM';\r
 }\r
 \r
 // user pages\r
-if (in_array(AF_PRIV_USER_MANAGEMENT, $privs))\r
+if (in_array(TR_PRIV_USER_MANAGEMENT, $privs))\r
 {\r
        $_pages['user/index.php']['title_var'] = 'users';\r
-       $_pages['user/index.php']['parent']    = AF_NAV_TOP;\r
+       $_pages['user/index.php']['parent']    = TR_NAV_TOP;\r
        $_pages['user/index.php']['children']  = array_merge(array('user/user_create_edit.php',\r
                                                                   'user/user_group.php'), \r
                                                             isset($_pages['user/index.php']['children']) ? $_pages['user/index.php']['children'] : array());\r
-       $_pages['user/index.php']['guide']    = 'AF_HELP_USER';\r
+       $_pages['user/index.php']['guide']    = 'TR_HELP_USER';\r
 \r
        $_pages['user/user_create_edit.php']['title_var'] = 'create_user';\r
        $_pages['user/user_create_edit.php']['parent']    = 'user/index.php';\r
-       $_pages['user/user_create_edit.php']['guide']    = 'AF_HELP_CREATE_EDIT_USER';\r
+       $_pages['user/user_create_edit.php']['guide']    = 'TR_HELP_CREATE_EDIT_USER';\r
        \r
        $_pages['user/user_password.php']['title_var'] = 'change_password';\r
        $_pages['user/user_password.php']['parent']    = 'user/index.php';\r
-       $_pages['user/user_password.php']['guide']    = 'AF_HELP_USER_PASSWORD';\r
+       $_pages['user/user_password.php']['guide']    = 'TR_HELP_USER_PASSWORD';\r
 \r
        $_pages['user/user_delete.php']['title_var'] = 'delete_user';\r
        $_pages['user/user_delete.php']['parent']    = 'user/index.php';\r
@@ -117,66 +125,66 @@ if (in_array(AF_PRIV_USER_MANAGEMENT, $privs))
        $_pages['user/user_group.php']['parent']    = 'user/index.php';\r
        $_pages['user/user_group.php']['children']  = array_merge(array('user/user_group_create_edit.php'), \r
                                                             isset($_pages['user/user_group.php']['children']) ? $_pages['user/user_group.php']['children'] : array());\r
-       $_pages['user/user_group.php']['guide']    = 'AF_HELP_USER_GROUP';\r
+       $_pages['user/user_group.php']['guide']    = 'TR_HELP_USER_GROUP';\r
        \r
        $_pages['user/user_group_create_edit.php']['title_var'] = 'create_edit_user_group';\r
        $_pages['user/user_group_create_edit.php']['parent']    = 'user/user_group.php';\r
-       $_pages['user/user_group_create_edit.php']['guide']    = 'AF_HELP_CREATE_EDIT_USER_GROUP';\r
+       $_pages['user/user_group_create_edit.php']['guide']    = 'TR_HELP_CREATE_EDIT_USER_GROUP';\r
        \r
        $_pages['user/user_group_delete.php']['title_var'] = 'delete_user_group';\r
        $_pages['user/user_group_delete.php']['parent']    = 'user/user_group.php';\r
 }\r
 \r
 // language pages\r
-if (in_array(AF_PRIV_LANGUAGE_MANAGEMENT, $privs))\r
+if (in_array(TR_PRIV_LANGUAGE_MANAGEMENT, $privs))\r
 {\r
        $_pages['language/index.php']['title_var'] = 'language';\r
-       $_pages['language/index.php']['parent']    = AF_NAV_TOP;\r
+       $_pages['language/index.php']['parent']    = TR_NAV_TOP;\r
        $_pages['language/index.php']['children']  = array_merge(array('language/language_add_edit.php'), \r
                                                             isset($_pages['language/index.php']['children']) ? $_pages['language/index.php']['children'] : array());\r
-       $_pages['language/index.php']['guide']    = 'AF_HELP_LANGUAGE';\r
+       $_pages['language/index.php']['guide']    = 'TR_HELP_LANGUAGE';\r
 \r
        $_pages['language/language_add_edit.php']['title_var'] = 'add_language';\r
        $_pages['language/language_add_edit.php']['parent']    = 'language/index.php';\r
-       $_pages['language/language_add_edit.php']['guide']    = 'AF_HELP_ADD_EDIT_LANGUAGE';\r
+       $_pages['language/language_add_edit.php']['guide']    = 'TR_HELP_ADD_EDIT_LANGUAGE';\r
        \r
        $_pages['language/language_delete.php']['title_var'] = 'delete_language';\r
        $_pages['language/language_delete.php']['parent'] = 'language/index.php';\r
 }\r
 \r
 // translation\r
-if (in_array(AF_PRIV_TRANSLATION, $privs))\r
+if (in_array(TR_PRIV_TRANSLATION, $privs))\r
 {\r
        $_pages['translation/index.php']['title_var'] = 'translation';\r
-       $_pages['translation/index.php']['parent']    = AF_NAV_TOP;\r
-       $_pages['translation/index.php']['guide']    = 'AF_HELP_TRANSLATION';\r
+       $_pages['translation/index.php']['parent']    = TR_NAV_TOP;\r
+       $_pages['translation/index.php']['guide']    = 'TR_HELP_TRANSLATION';\r
 }\r
 \r
 // profile pages\r
-if (in_array(AF_PRIV_PROFILE, $privs))\r
+if (in_array(TR_PRIV_PROFILE, $privs))\r
 {\r
        $_pages['profile/index.php']['title_var'] = 'profile';\r
-       $_pages['profile/index.php']['parent']    = AF_NAV_TOP;\r
-       $_pages['profile/index.php']['guide']    = 'AF_HELP_PROFILE';\r
+       $_pages['profile/index.php']['parent']    = TR_NAV_TOP;\r
+       $_pages['profile/index.php']['guide']    = 'TR_HELP_PROFILE';\r
        $_pages['profile/index.php']['children']  = array_merge(array('profile/change_password.php', \r
                                                                      'profile/change_email.php'), \r
                                                                isset($_pages['profile/index.php']['children']) ? $_pages['profile/index.php']['children'] : array());\r
        \r
        $_pages['profile/change_password.php']['title_var'] = 'change_password';\r
        $_pages['profile/change_password.php']['parent']    = 'profile/index.php';\r
-       $_pages['profile/change_password.php']['guide']    = 'AF_HELP_CHANGE_PASSWORD';\r
+       $_pages['profile/change_password.php']['guide']    = 'TR_HELP_CHANGE_PASSWORD';\r
        \r
        $_pages['profile/change_email.php']['title_var'] = 'change_email';\r
        $_pages['profile/change_email.php']['parent']    = 'profile/index.php';\r
-       $_pages['profile/change_email.php']['guide']    = 'AF_HELP_CHANGE_EMAIL';\r
+       $_pages['profile/change_email.php']['guide']    = 'TR_HELP_CHANGE_EMAIL';\r
 }\r
 \r
 // updater pages\r
-if (in_array(AF_PRIV_UPDATER, $privs))\r
+if (in_array(TR_PRIV_UPDATER, $privs))\r
 {\r
        $_pages['updater/index.php']['title_var'] = 'updater';\r
-       $_pages['updater/index.php']['parent']    = AF_NAV_TOP;\r
-       $_pages['updater/index.php']['guide']    = 'AF_HELP_UPDATER';\r
+       $_pages['updater/index.php']['parent']    = TR_NAV_TOP;\r
+       $_pages['updater/index.php']['guide']    = 'TR_HELP_UPDATER';\r
        $_pages['updater/index.php']['children']  = array_merge(array('updater/myown_patches.php', \r
                                                                      'updater/patch_create.php'), \r
                                                                isset($_pages['updater/index.php']['children']) ? $_pages['updater/index.php']['children'] : array());\r
@@ -187,7 +195,7 @@ if (in_array(AF_PRIV_UPDATER, $privs))
        \r
        $_pages['updater/patch_create.php']['title_var'] = 'create_update';\r
        $_pages['updater/patch_create.php']['parent']    = 'updater/index.php';\r
-       $_pages['updater/patch_create.php']['guide']    = 'AF_HELP_CREATE_UPDATE';\r
+       $_pages['updater/patch_create.php']['guide']    = 'TR_HELP_CREATE_UPDATE';\r
 \r
        $_pages['updater/patch_edit.php']['title_var'] = 'edit_update';\r
        $_pages['updater/patch_edit.php']['parent']    = 'updater/index.php';\r
index 5db76bb..bffa5c6 100644 (file)
@@ -31,7 +31,7 @@ if (!defined('CACHE_DIR')) {
 
        $CACHE_DEBUG = 0;                       /* Default: 0 - Turn debugging on/off */
 
-       define('THIS_CACHE_DIR', CACHE_DIR . '/aframe_cache_' . DB_NAME);
+       define('THIS_CACHE_DIR', CACHE_DIR . '/transformable_cache_' . DB_NAME);
 
        define('CACHE_GC', .10);        /* Default: .10 - Probability of garbage collection */
        define('CACHE_USE_STORAGE_HASH', 0);    /* Default: 1 - Use storage hashing.  This will increase peformance if you are caching many pages. */ 
index 8a13c66..1b6c621 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 $_user_location        = 'public';
-define('AF_INCLUDE_PATH', '../');
-require (AF_INCLUDE_PATH.'vitals.inc.php');
+define('TR_INCLUDE_PATH', '../');
+require (TR_INCLUDE_PATH.'vitals.inc.php');
 session_start();
 
 include 'securimage.php';
index 54ce9ce..37e4f41 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
-define('AF_DEVEL', 0);
-define('AF_ERROR_REPORTING', E_ALL ^ E_NOTICE); // default is E_ALL ^ E_NOTICE, use E_ALL or E_ALL + E_STRICT for developing
+define('TR_DEVEL', 1);
+define('TR_ERROR_REPORTING', E_ALL ^ E_NOTICE); // default is E_ALL ^ E_NOTICE, use E_ALL or E_ALL + E_STRICT for developing
 
 // Emulate register_globals off. src: http://php.net/manual/en/faq.misc.php#faq.misc.registerglobals
 function unregister_GLOBALS() {
@@ -49,27 +49,27 @@ function unregister_GLOBALS() {
 
 /**** 0. start system configuration options block ****/
 error_reporting(0);
-include_once(AF_INCLUDE_PATH.'config.inc.php');
-error_reporting(AF_ERROR_REPORTING);
+include_once(TR_INCLUDE_PATH.'config.inc.php');
+error_reporting(TR_ERROR_REPORTING);
 
-if (!defined('AF_INSTALL') || !AF_INSTALL) {
+if (!defined('TR_INSTALL') || !TR_INSTALL) {
        header('Cache-Control: no-store, no-cache, must-revalidate');
        header('Pragma: no-cache');
 
-       $relative_path = substr(AF_INCLUDE_PATH, 0, -strlen('include/'));
+       $relative_path = substr(TR_INCLUDE_PATH, 0, -strlen('include/'));
        header('Location: ' . $relative_path . 'install/not_installed.php');
        exit;
 }
 /*** end system config block ****/
 
 /***** 1. database connection *****/
-//if (!defined('AF_REDIRECT_LOADED')){
-//     require_once(AF_INCLUDE_PATH.'lib/mysql_connect.inc.php');
+//if (!defined('TR_REDIRECT_LOADED')){
+//     require_once(TR_INCLUDE_PATH.'lib/mysql_connect.inc.php');
 //}
 /***** end database connection ****/
 
 /*** 2. constants ***/
-require_once(AF_INCLUDE_PATH.'constants.inc.php');
+require_once(TR_INCLUDE_PATH.'constants.inc.php');
 
 /*** 3. initilize session ***/
        @set_time_limit(0);
@@ -77,7 +77,7 @@ require_once(AF_INCLUDE_PATH.'constants.inc.php');
        @session_cache_limiter('private, must-revalidate');
 
        session_name('CheckerID');
-       error_reporting(AF_ERROR_REPORTING);
+       error_reporting(TR_ERROR_REPORTING);
 
        ob_start();
        session_set_cookie_params(0, $_base_path);
@@ -89,9 +89,9 @@ require_once(AF_INCLUDE_PATH.'constants.inc.php');
 /***** end session initilization block ****/
        
 /***** 4. load $_config from table 'config' *****/
-require(AF_INCLUDE_PATH.'phpCache/phpCache.inc.php'); // cache library
-require(AF_INCLUDE_PATH.'classes/DAO/ThemesDAO.class.php');
-require(AF_INCLUDE_PATH.'classes/DAO/ConfigDAO.class.php');
+require(TR_INCLUDE_PATH.'phpCache/phpCache.inc.php'); // cache library
+require(TR_INCLUDE_PATH.'classes/DAO/ThemesDAO.class.php');
+require(TR_INCLUDE_PATH.'classes/DAO/ConfigDAO.class.php');
 
 $configDAO = new ConfigDAO();
 $rows = $configDAO->getAll();
@@ -112,10 +112,10 @@ $IllegalExtentions = explode('|',$_config['illegal_extentions']);
 
 /***** 5. start language block *****/
        // set current language
-       require(AF_INCLUDE_PATH . 'classes/Language/LanguageManager.class.php');
+       require(TR_INCLUDE_PATH . 'classes/Language/LanguageManager.class.php');
        $languageManager = new LanguageManager();
 
-       $myLang =& $languageManager->getMyLanguage();
+       $myLang = $languageManager->getMyLanguage();
 
        if ($myLang === FALSE) {
                echo 'There are no languages installed!';
@@ -132,18 +132,18 @@ $IllegalExtentions = explode('|',$_config['illegal_extentions']);
 /***** end language block ****/
 
 /***** 6. load common libraries *****/
-       require(AF_INCLUDE_PATH.'lib/output.inc.php');           /* output functions */
+       require(TR_INCLUDE_PATH.'lib/output.inc.php');           /* output functions */
 /***** end load common libraries ****/
 
 /***** 7. initialize theme and template management *****/
-       require(AF_INCLUDE_PATH.'classes/Savant2/Savant2.php');
+       require(TR_INCLUDE_PATH.'classes/Savant2/Savant2.php');
 
        // set default template paths:
        $savant = new Savant2();
 
-       if (isset($_SESSION['prefs']['PREF_THEME']) && file_exists(AF_INCLUDE_PATH . '../themes/' . $_SESSION['prefs']['PREF_THEME']) && $_SESSION['user_id']>0) 
+       if (isset($_SESSION['prefs']['PREF_THEME']) && file_exists(TR_INCLUDE_PATH . '../themes/' . $_SESSION['prefs']['PREF_THEME']) && $_SESSION['user_id']>0) 
        {
-               if (!is_dir(AF_INCLUDE_PATH . '../themes/' . $_SESSION['prefs']['PREF_THEME']))
+               if (!is_dir(TR_INCLUDE_PATH . '../themes/' . $_SESSION['prefs']['PREF_THEME']))
                {
                        $_SESSION['prefs']['PREF_THEME'] = 'default';
                } 
@@ -164,11 +164,11 @@ $IllegalExtentions = explode('|',$_config['illegal_extentions']);
                $_SESSION['prefs']['PREF_THEME'] = get_default_theme();
        }
 
-       $savant->addPath('template', AF_INCLUDE_PATH . '../themes/' . $_SESSION['prefs']['PREF_THEME'] . '/');
+       $savant->addPath('template', TR_INCLUDE_PATH . '../themes/' . $_SESSION['prefs']['PREF_THEME'] . '/');
 
-       require(AF_INCLUDE_PATH . '../themes/' . $_SESSION['prefs']['PREF_THEME'] . '/theme.cfg.php');
+       require(TR_INCLUDE_PATH . '../themes/' . $_SESSION['prefs']['PREF_THEME'] . '/theme.cfg.php');
 
-       require(AF_INCLUDE_PATH.'classes/Message/Message.class.php');
+       require(TR_INCLUDE_PATH.'classes/Message/Message.class.php');
        $msg = new Message($savant);
 
 /***** end of initialize theme and template management *****/
@@ -178,7 +178,7 @@ $IllegalExtentions = explode('|',$_config['illegal_extentions']);
 if (isset($_SESSION['user_id']) && $_SESSION['user_id'] > 0)
 {
        // check if $_SESSION['user_id'] is valid
-       include_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
+       include_once(TR_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
        $usersDAO = new UsersDAO();
        $user = $usersDAO->getUserByID($_SESSION['user_id']);
        
@@ -186,14 +186,14 @@ if (isset($_SESSION['user_id']) && $_SESSION['user_id'] > 0)
                unset($_SESSION['user_id']);
        else
        {
-               include_once(AF_INCLUDE_PATH.'classes/User.class.php');
+               include_once(TR_INCLUDE_PATH.'classes/User.class.php');
                $_current_user = new User($_SESSION['user_id']);
        }
 }
 /***** end of initialize user instance *****/
 
 /*** 9. register pages based on user's priviledge ***/
-require_once(AF_INCLUDE_PATH.'page_constants.inc.php');
+require_once(TR_INCLUDE_PATH.'page_constants.inc.php');
 
 /**
  * This function is used for printing variables for debugging.
@@ -203,7 +203,7 @@ require_once(AF_INCLUDE_PATH.'page_constants.inc.php');
  * @author  Joel Kronenberg
  */
 function debug($var, $title='') {
-       if (!defined('AF_DEVEL') || !AF_DEVEL) {
+       if (!defined('TR_DEVEL') || !TR_DEVEL) {
                return;
        }
        
@@ -235,11 +235,11 @@ function debug($var, $title='') {
 * @author  Cindy Qi Li
 */
 function debug_to_log($var, $log='') {
-       if (!defined('AF_DEVEL') || !AF_DEVEL) {
+       if (!defined('TR_DEVEL') || !TR_DEVEL) {
                return;
        }
        
-       if ($log == '') $log = AF_TEMP_DIR. 'debug.log';
+       if ($log == '') $log = TR_TEMP_DIR. 'debug.log';
        $handle = fopen($log, 'a');
        fwrite($handle, "\n\n");
        fwrite($handle, date("F j, Y, g:i a"));
@@ -303,9 +303,71 @@ function get_default_theme() {
        
        $rows = $themesDAO->getDefaultTheme();
 
-       if (!is_dir(AF_INCLUDE_PATH . '../themes/' . $rows[0]['dir_name']))
+       if (!is_dir(TR_INCLUDE_PATH . '../themes/' . $rows[0]['dir_name']))
                return 'default';
        else
                return $rows[0]['dir_name'];
 }
+
+/**
+* This function cuts out requested tag information from html head
+* @access  public
+* @param   $text  html text
+* @param   $tags  a string or an array of requested tags
+* @author  Cindy Qi Li
+*/
+function get_html_head_by_tag($text, $tags)
+{
+       $head = get_html_head($text);
+       $rtn_text = "";
+       
+       if (!is_array($tags) && strlen(trim($tags)) > 0)
+       {
+               $tags = array(trim($tags));
+       }
+       
+       foreach ($tags as $tag)
+       {
+               $tag = strtolower($tag);
+
+               /* strip everything before <{tag}> */
+               $start_pos      = strpos($head, '<'.$tag);
+               $temp_head = $head;
+               
+               while ($start_pos !== false) 
+               {
+                       $temp_text = substr($temp_head, $start_pos);
+       
+                       /* strip everything after </{tag}> or />*/
+                       $end_pos        = strpos($temp_text, '</' . $tag . '>');
+       
+                       if ($end_pos !== false) 
+                       {
+                               $end_pos += strlen('</' . $tag . '>');
+                               
+                               // add an empty line after each tag information
+                               $rtn_text .= trim(substr($temp_text, 0, $end_pos)) . '
+       
+';
+                       }
+                       else  // match /> as ending tag if </tag> is not found
+                       {
+                               $end_pos        = strpos($temp_text, '/>');
+                               $end_pos += strlen('/>');
+                               
+                               // add an empty line after each tag information
+                               $rtn_text .= trim(substr($temp_text, 0, $end_pos)) . '
+       
+';
+                       }
+                       
+                       // initialize vars for next round of matching
+                       $temp_head = substr($temp_text, $end_pos);
+                       $start_pos = strpos($temp_head, '<'.$tag);
+               }
+       }
+       
+       return $rtn_text;
+}
+
 ?>
index c04721b..72e970d 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', 'include/');\r
+define('TR_INCLUDE_PATH', 'include/');\r
 \r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include(AF_INCLUDE_PATH.'header.inc.php');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include(TR_INCLUDE_PATH.'header.inc.php');\r
 \r
 // display footer\r
-include(AF_INCLUDE_PATH.'footer.inc.php');\r
+include(TR_INCLUDE_PATH.'footer.inc.php');\r
 \r
 ?>\r
index e422200..c395298 100644 (file)
@@ -12,6 +12,56 @@ CREATE TABLE `config` (
   PRIMARY KEY ( `name` )\r
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
 \r
+# --------------------------------------------------------\r
+# Table structure for table `content`\r
+# since 0.1\r
+\r
+CREATE TABLE `content` (\r
+  `content_id` mediumint(8) unsigned NOT NULL auto_increment,\r
+  `course_id` mediumint(8) unsigned NOT NULL default '0',\r
+  `content_parent_id` mediumint(8) unsigned NOT NULL default '0',\r
+  `ordering` mediumint(8) NOT NULL default '0',\r
+  `last_modified` TIMESTAMP NOT NULL,\r
+  `revision` tinyint(3) unsigned NOT NULL default '0',\r
+  `formatting` tinyint(4) NOT NULL default '0',\r
+  `keywords` TEXT NOT NULL ,\r
+  `content_path` TEXT NOT NULL ,\r
+  `title` VARCHAR(255) NOT NULL ,\r
+  `text` TEXT NOT NULL ,\r
+  `head` TEXT NOT NULL,\r
+  `use_customized_head` TINYINT(4) NOT NULL,\r
+  `test_message` TEXT NOT NULL,\r
+  `allow_test_export` TINYINT(1) UNSIGNED NOT NULL,\r
+  `content_type` TINYINT(1) UNSIGNED NOT NULL,\r
+  PRIMARY KEY  (`content_id`),\r
+  KEY `course_id` (`course_id`),\r
+  FULLTEXT(keywords, title, text)\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `courses`\r
+# since 0.1\r
+\r
+CREATE TABLE `courses` (\r
+  `course_id` mediumint(8) unsigned NOT NULL auto_increment,\r
+  `user_id` mediumint(8) unsigned NOT NULL default '0',\r
+  `content_packaging` enum('none','top','all') NOT NULL default 'top',\r
+  `access` enum('public','protected','private') NOT NULL default 'public',\r
+  `title` VARCHAR(255) NOT NULL ,\r
+  `description` TEXT NOT NULL ,\r
+  `course_dir_name` VARCHAR(255) NOT NULL,\r
+  `max_quota` varchar(30) NOT NULL default '',\r
+  `max_file_size` varchar(30) NOT NULL default '',\r
+  `copyright` text NOT NULL ,\r
+  `primary_language` varchar(5) NOT NULL default '',\r
+  `icon` varchar(75) NOT NULL default '',\r
+  `side_menu` VARCHAR( 255 ) NOT NULL default '',\r
+  `created_date` datetime NOT NULL default '0000-00-00 00:00:00',\r
+  `modified_date` datetime NOT NULL default '0000-00-00 00:00:00',\r
+  PRIMARY KEY  (`course_id`),\r
+  FULLTEXT(`title`, `description`)\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
+\r
 # --------------------------------------------------------\r
 # Table structure for table `languages`\r
 # since 0.1\r
@@ -794,7 +844,7 @@ INSERT INTO `lang_codes` (`code_3letters`, `direction`, `code_2letters`, `descri
 ('zxx', 'ltr', '', 'Nolinguisticcontent');\r
 \r
 # insert the default theme\r
-INSERT INTO `themes` VALUES ('AFrame', '0.1', 'default', NOW(), 'This is the default AFrame theme and cannot be deleted as other themes inherit from it. Please do not alter this theme directly as it would complicate upgrading. Instead, create a new theme derived from this one.', 2);\r
+INSERT INTO `themes` VALUES ('Transformable', '0.1', 'default', NOW(), 'This is the default Transformable theme and cannot be deleted as other themes inherit from it. Please do not alter this theme directly as it would complicate upgrading. Instead, create a new theme derived from this one.', 2);\r
 \r
 # insert privileges, user groups and user group privileges\r
 INSERT INTO `privileges` (`privilege_id`, `title_var`, `description`, `create_date`, `link`, `menu_sequence`, `open_to_public`) VALUES (1, 'home', 'Home', NOW(), 'home/index.php', 10, 1);\r
@@ -807,7 +857,7 @@ INSERT INTO `privileges` (`privilege_id`, `title_var`, `description`, `create_da
 \r
 INSERT INTO `user_groups` (`user_group_id`, `title`, `description`, `create_date`) VALUES (1, 'Administrator', 'Administrate users, user groups, languages and updates.', now());\r
 INSERT INTO `user_groups` (`user_group_id`, `title`, `description`, `create_date`) VALUES (2, 'User', 'Regular user.', now());\r
-INSERT INTO `user_groups` (`user_group_id`, `title`, `description`, `create_date`) VALUES (3, 'Translator', 'Translate AFrame terms into a foreign lanugage.', now());\r
+INSERT INTO `user_groups` (`user_group_id`, `title`, `description`, `create_date`) VALUES (3, 'Translator', 'Translate Transformable terms into a foreign lanugage.', now());\r
 \r
 INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (1, 1);\r
 INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (1, 2);\r
index 8271e00..4f307bf 100644 (file)
@@ -9,123 +9,92 @@ CREATE TABLE `language_text` (
   `revised_date` datetime NOT NULL default '0000-00-00 00:00:00',
   `context` text NOT NULL,
   PRIMARY KEY  (`language_code`,`variable`,`term`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
-INSERT INTO `language_text` VALUES ('eng', '_template','aframe','AFrame',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','login','Login',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','register','Register',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','registration','Registration',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','required_field_text','<div class=\"required\" title=\"Required Field\">*</div> indicates required fields.',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','login_name','Login Name',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','20_max_chars','20 character maximum',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','15_max_chars','15 character maximum',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','contain_only','May contain only letters, numbers, underscores, hyphens or periods.',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','password','Password',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','combination','Use a combination of letters, numbers and symbols',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','password_again','Password Again',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','email_address','Email Address',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','first_name','First Name',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','last_name','Last Name',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','cancel','Cancel',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','copyright','Web site engine\'s code is copyright &copy; 2009',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','web_service_api','Web Service API',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','lesson_builder','Lesson Builder',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','logout','Logout',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','welcome','Welcome',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','profile','Profile',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','options','Options',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','input','Input',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','search','Search',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','web_service_id','Web Service ID',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_REGISTER_SUCCESS','You have registered successfully. Your web service ID is %s. This ID must be presented when using web service. This ID can always be retrieved from \"Profile\" page.',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_template','edit_profile','Edit Profile',now(),'');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_ITEM','Are you sure you want to delete the following items? <strong>%s</strong>','2009-03-17 15:19:54','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_LANG','Are you sure you want to delete the language (<strong>%s</strong>)?','2009-02-23 15:13:50','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_MYOWN_UPDATE','Are you sure you want to <strong>delete</strong> update <strong>%s</strong>?','2009-06-22 14:49:02','Updater');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_USER','Are you sure you want to delete the following users? <strong>%s</strong>','2009-02-06 11:58:02','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_USER_GROUP','Are you sure you want to delete the following user groups? <strong>%s</strong>','2009-02-12 15:08:53','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_ACCOUNT_DISABLED','That account has been disabled.','2009-01-08 11:43:51','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_CANNOT_CONNECT','Cannot connect to URL: %s','2009-04-22 09:26:45','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_CANNOT_DEL_DEFAULT_LANG','Cannot delete default language <strong>%s</strong>. The system cannot run properly without it.','2009-02-23 15:47:44','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_CANNOT_UNZIP','Can NOT unzip the uploaded file.','2009-06-22 14:49:02','error msg');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_CHOOSE_ACTION','Please choose action for file <strong>%s</strong>','2009-06-22 14:49:02','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_CHOOSE_UNINSTALLED_UPDATE','Please choose an uninstalled update.','2009-06-22 14:49:02','Updater: error msg');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_CONFIRM_BAD','Your email address and account could not be confirmed.','2009-01-14 14:40:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_DB_NOT_UPDATED','Information could not be added to the database.','2009-01-09 11:34:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMAIL_EXISTS','An account with that email address already exists.','2009-01-09 11:34:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMAIL_INVALID','Email address was invalid.','2009-01-09 11:34:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMAIL_NOT_FOUND','No account found with that email address.','2009-01-14 14:40:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_FIELDS','The following required field(s) are empty:<br />\r\n%s.','2009-01-09 11:34:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_FIELD','Field cannot be empty. Data is not saved.','2009-01-09 11:34:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_SESSIONID','Empty Session ID.','2009-03-03 13:44:57','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_USER','Empty user.','2009-03-03 13:44:57','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_WEB_SERVICE_ID','Empty web service ID.','2009-03-04 14:53:18','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_FIRST_LAST_NAME_UNIQUE','First, second, and last names combination must be unique.','2009-01-09 11:34:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_FORMAT','Invalid format.','2009-03-03 13:44:57','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_LOGIN','Invalid login/password combination.','2009-01-08 11:43:51','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_SESSION','Invalid session.','2009-03-03 13:44:57','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_WEB_SERVICE_ID','Invalid web service ID.','2009-03-04 14:49:59','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_LANG_EMPTY','The text for this language has not been translated yet.','2009-02-24 13:57:01','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_LANG_EXISTS','The language you are trying to create already exists.','2009-02-24 09:20:45','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_LANG_WRONG_VERSION','The language pack you are trying to import is not compatible with this version of AFrame.','2009-02-24 13:58:25','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_LOGIN_CHARS','Your Login Name must only contain letters, numbers, periods, or underscores (_\'s).','2009-01-09 11:34:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_LOGIN_EXISTS','That login already exists, please choose another.','2009-01-09 11:34:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_NOT_LOCALHOST','Sorry, the IP address of localhost is not public. For security reasons, validating resources located at non-public IP addresses has been disabled in this service.','2009-04-22 09:26:45','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_NO_ACTION_SELECTED','No action selected.','2009-02-04 15:31:02','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_NO_ITEM_SELECTED','You must select an item before using a button.','2009-02-04 15:31:02','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_PAGE_NOT_FOUND','Page (%s) cannot be found','2008-12-12 13:28:09','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_PASSWORD_CHARS','The password must contain letters, numbers, and symbols.','2009-01-09 13:41:06','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_PASSWORD_LENGTH','Password must be at least 8 characters long.','2009-01-09 13:41:06','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_PASSWORD_MISMATCH','Passwords did not match.','2009-01-09 13:41:06','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_REMOVE_WRITE_PERMISSION','Please remove write permission from the listed files.','2009-06-22 14:49:02','error msg');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_SELECT_ONE_ITEM','Only <em>one</em> item must be selected.','2009-02-04 15:31:02','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_SENDING_ERROR','There was an error sending the email message.','2009-01-16 13:14:08','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_UPDATE_ALREADY_INSTALLED','The selected update is already installed.','2009-06-22 14:49:02','Updater');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_UPDATE_DEPENDENCY','Due to update dependency, please install the listed updates before installing this update: %s','2009-06-22 14:49:02','Updater');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_UPDATE_XML_NOT_FOUND','Update XML file is not found.','2009-06-22 14:49:02','error msg');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_WRONG_PASSWORD','Incorrect password.','2009-01-16 10:29:47','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_ACCOUNT_CONFIRMED','Account has been confirmed.','2009-01-14 14:40:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_ACTION_COMPLETED_SUCCESSFULLY','Action completed successfully.','2009-01-16 11:29:41','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CANCELLED','Successfully cancelled without any changes.','2009-01-14 14:40:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CHANGE_TO_SAME_EMAIL','The email address is same as what you currently have.','2009-01-16 11:54:46','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CONFIRMATION_SENT','An email confirmation message has been sent.','2009-01-14 14:40:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CONFIRM_EMAIL2','An email with instructions on retrieving your password has been sent.','2009-01-16 13:14:08','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CONFIRM_GOOD','Your email address has been confirmed successfully.','2009-01-14 14:40:42','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_IMPORT_LANG_SUCCESS','New language was successfully imported.','2009-02-24 13:58:25','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_LOGIN_SUCCESS','You have logged in successfully.','2009-01-08 11:43:51','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_LOGOUT','You have successfully been logged out.','2009-01-08 09:38:14','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_ONLY_ENGLISH','Only English language is defined in the system. There is no foreign languages to translate.','2009-02-18 11:52:10','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_PASSWORD_CHANGED','Password changed successfully.','2009-01-16 10:35:40','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_PROFILE_UPDATED','Your Profile was successfully updated.','2009-01-15 10:59:58','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_REGISTER_SUCCESS','You have registered successfully. Your web service ID is %s. This ID must be presented when using web service. This ID can always be retrieved from \"Profile\" page.','2009-03-04 13:30:45','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_REG_THANKS_CONFIRM','Thank-you for registering. Please follow the instructions in the email we sent you on how to confirm your account. You will need to confirm your account before you can login.','2009-01-09 14:07:11','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_UPDATE_CREATED_SUCCESSFULLY','The update has been created successfully.','2009-06-22 14:49:02','Updater: feedback msg');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_UPDATE_INSTALLED_SUCCESSFULLY','The update has been installed successfully.','2009-06-22 14:49:02','Updater: feedback msg');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_ADD_EDIT_LANGUAGE','<h2>Add/Edit Language</h2>\r\n\r\n     <p>Adding and Editing the language properties allows users to change the following:\r\n <ul>\r\n                <li>Language Code (3 digit ISO-639-2 language code)</li>\r\n            <li>Locale (two letter abritrary code to represent a variation of a language)</li>\r\n          <li>Character Set (should always be UTF-8)</li>\r\n             <li>Regular Expression (leave blank)</li>\r\n           <li>Language name translated</li>\r\n           <li>Language name in English</li>\r\n           <li>Status (enabled/disabled)</li>\r\n  </ul>\r\n       </p>\r\n        <p>When \"Status\" is set to enabled, the language is displayed in the selector at the bottom of AFrame pages, which allows users to switch to this language.</p>\r\n','2009-04-15 09:46:37','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_CHANGE_EMAIL','<h2>Change Email</h2>\r\n<p>This page allows users to change email addresses. </p>\r\n','2009-04-15 09:47:18','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_CHANGE_PASSWORD','<h2>Change Password</h2>\r\n<p>This page allows users to change passwords. The form authenticates users by checking their old password first, and then setting a new password and typing it again.</p>\r\n','2009-04-15 09:53:55','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_CREATE_EDIT_USER ','<h2>Create/Edit User</h2>\r\n\r\n<p>All fields on \"Create User\" and \"Edit User\" forms are required. Most fields are self-explanatory. When the \"Account Status\" field is set to disabled, the user is not able to login. </p>\r\n<p>User accounts can also be created by individuals using the Registration form available through the public pages of AFrame. The accounts created via the Registration form are automatically set to user group \"Regular User\". </p>','2009-06-04 13:00:03','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_CREATE_EDIT_USER_GROUP','<h2>Create/Edit User Group</h2>\r\n\r\n<p>All fields are relatively self-explanatory.</p>\r\n\r\n<p>There are six privileges provided by AFrame. Privileges are fixed and not changeable.\r\n     <dl>\r\n                <dt>Home</dt>\r\n               <dd>This is where user implements own functions.</dd>\r\n               <dt>User Management</dt>\r\n            <dd>Create, edit, delete users.</dd>\r\n                <dt>Language Management</dt>\r\n                <dd>Create, edit, delete, enable, disable languages.</dd>\r\n           <dt>Translation</dt>\r\n                <dd>Translate all AFrame terms into languages other than English, or edit existing English text.</dd>\r\n               <dt>Profile Management</dt>\r\n         <dd>Edit profile, change password or email.</dd>\r\n    </dl>\r\n</p>','2009-06-04 13:05:21','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_CREATE_UPDATE','<h2>Creating Update</h2>\r\n\r\n<p>If you happen to come across a bug you can fix, or have a new feature you would like added to the AFrame public distribution, you can use Create Update to put your changes into a form that can be easily added to the AFrame public code. Or, if you have a feature you are adding to one AFrame installation that you would like to have added to another, Create Update is ideal for reproducing your feature across installations. If you are creating new features that are not going to become part of the AFrame public source code, you can build them into a update so they can be reapplied from version to version as you upgrade your AFrame system. Creating updates does require knowledge of PHP, and of SQL if you plan on creating a update that changes the AFrame database. Please refer to the appropriate documentation for information on PHP and SQL. <p>\r\n\r\n<dl>\r\n       <dt>AFrame Update ID</dt>\r\n   <dd>The update id you give to your update must be different from all updates available for the particular version of AFrame it applies to. It is suggested you prefix your updates with a special identifier that represents the author or the authoring organization. If for example the University of Toronto is creating the update, a update ID might look like \"uoft_0002.\"</dd>\r\n     <dt>AFrame Version to Apply</dt>\r\n    <dd>This needs to be the exact version number of the AFrame version the update applies to (e.g 1.6). including any minor version numbers (e.g 1.6.1.2)  The exact version number can be found on the Administrator open screen under \"Statistics and Information.\" In most cases when applying a update created for an older version of AFrame, the \"AFrame version to Apply\" will need to be adjusted. Or, this can be adjusted manually in the patch.xml file included with the source code of the update.\r\n    </dd>\r\n       <dt>Description</dt>\r\n        <dd>This should be a detailed description of what the update does. Example might include \"fixes problem uploading files to filemanager\" for a bug fix, or \"added a timer function to tests\" for an added feature, or \"removes registration tab\" for a feature adjustment, etc. Include enough detail so those applying the update understand exactly what it will do..</dd>\r\n   <dt>SQL Statement</dt>\r\n      <dd>This optional field can be used to insert SQL commands which modify the AFrame database. It might be used to write an SQL statement to modify and existing table, such as changing a data type, or a field size, or to add or remove an field. It can also be used to insert SQL that generates a new table for a new feature created by a update, or it can be used to insert data into a table used by a feature created by the update. Any SQL can be included in this field. Be careful when running SQL, that that SQL is not going to interfere with upgrade SQL. If you are changing table structures and those same tables are being altered during an upgrade, the upgrade may fail.</dd>\r\n      <dt>Dependant Updates</dt>\r\n  <dd>It is common for later updates to require changes from earlier updates before they can be installed. If this is the case for the update you are creating, enter the update IDs into the Dependant Update ID field. Click on Add Dependent Update if additional dependencies are required. Be sure to check the updates on the opening screen of the Updater to see if the file you are modifying with your update is  being modified by an update.AFrame.ca update. If they are modifying the same files, you may need to include the ID numbers for those updates in the Dependant Updates for the update your are creating.</dd>\r\n      <dt>Files</dt>  \r\n    <dd>This area is where most AFrame updates are created. Click on <strong>Add File</strong>  to generate a update block. A update block can include one of four actions on the file being modified, as described below. As many update blocks as required can be added to a update. </dd>\r\n            <dl>\r\n        <dt>Add File</dt>\r\n   <dd>The <strong>Add</strong> action can be used to add a new file to AFrame. This action is often used in conjuction with other update blocks that alter or delete files, to add a replacement file for one deleted, or to perhaps add a required or include file needed by a modified section in the file being changed. In the <strong>File Name</strong> field enter the file name to be assigned to the file when it is installed. In the <strong>Directory</strong> field enter the <i>relative path</i> from the AFrame root directory in which the modified file is or will exist. Select  from <strong>Upload File</strong> using the Browse button to locate the file in your local computer\'s file system. Note that the upload file can have any name. It will be renamed to the file name listed in the File Name field when it is installed.</dd>\r\n     <dt>Alter File</dt>\r\n <dd>This option is used when you wish to make changes to a piece of code within an existing source code file. In the <strong>File Name</strong> field enter the name of the file in the AFrame source code that will be altered. In the <strong>Directory</strong> field enter the relative path to the directory in which the to be alter file exists, relative to the AFrame root directory. In the <strong>Code To Replace From</strong> field copy the code from the original file the will be replaced, or appended to, and in the <strong>Code To Replace To</strong> field enter to code that will replace the code above in the <i>From</i> field. Or, if you are adding code instead of replacing code, include the code from the field above so it gets added back if you are only using that code as a way of identifying a location in the file where new code is being added.</dd>\r\n     <dt>Delete File</dt>\r\n        <dd>This option will remove files from AFrame. In the <strong>File Name</strong>  field enter the name of the file to be deleted. In the <strong>Directory</strong> field enter the path to the directory in which the to be delete file exists, relative to the root directory of the AFrame installation. </dd>\r\n   <dt>Overwrite File</dt>\r\n     <dd>This option is used to replace an existing file in AFrame with a new one. In the <strong>File Name</strong>  field enter the name of the file to be replaced. In the <strong>Directory</strong> field enter the path to the directory in which the to be replaced file exists, relative to the root directory of the AFrame installation. In the <strong>Upload File</strong> field use the Browse button to choose a file from your local computer to replace the specified file. The upload file may be named anything. It will be renamed to the file it is replacing when the update is installed.</dd>\r\n     </dl>\r\n       <dt>Create Update</dt>\r\n      <dd>Click on this button to build the update into a downloadable zip file. This zip file can then be uploaded in the Upload field on the main Updater screen to apply a update to a system.</dd>\r\n    <dt>Save Update</dt>\r\n        <dd>Click on this button to save the developing update to the AFrame database for future reference. Though it is not required, you should save a copy of the update in this way, so it can be retrieved and edited if necessary. Or, if a update takes more than a single sitting to build, you can save it, then retrieve it later to continue.</dd>\r\n       <dt>Cancel</dt>\r\n     <dd>Press this button to ignore the latest changes to the update, and return to My Own Updates Screen.</dd>\r\n\r\n</dl>','2009-06-22 15:32:56','Updater');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_LANGUAGE','<h2>Language Management</h2>\r\n\r\n    <p>AFrame can be displayed in many different languages! Through the Language Manager language packs can be selected and imported.</p>\r\n\r\n<h3>Managing Existing Languages</h3>\r\n   <p>Installed languages can be edited, deleted, or exported as an AFrame language pack for redistribution. When exporting a language, a download prompt will appear asking to download a zip file of the language pack.</p>\r\n  <p>Note that the English language (language code: eng) cannot be deleted. This is the base language pack that ensures AFrame runs properly. When other languages are installed, users can disable it if they don\'t want AFrame to be displayed in English.</p>\r\n     \r\n<h3>Importing Languages</h3>\r\n    <p>Language packs can be imported by retreiving the package and then importing it into AFrame.</p>\r\n  <ol>\r\n                <li>Visit <a href=\"http://www.atutor.ca/aframe/translate/index.php\" target=\"_new\">AFrame Language Packs</a> to download one of the available language packs for your version.</li>\r\n              <li>Use the <code>Browse...</code> button to find the downloaded language pack.</li>\r\n                <li>Use the <code>Import</code> button to import the language.</li>\r\n </ol>\r\n\r\n   <p>You can contribute to the AFrame community by exporting a language pack from your AFrame installation, and attaching it to a message in the atutor.ca <a href=\"http://atutor.ca/forum/4/1.html\">Translation Forum</a>. Also see the <a href=\"http://atutor.ca/atutor/docs/translate.php\">Translator Documentation</a> for further details about translating AFrame.</p>','2009-06-04 13:08:15','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_LOGIN','<h2>Login</h2>\r\n\r\n<p>A user may login to AFrame with their Login Name or Email address, and the Password entered during <a href=\"../register.php\">registration</a>. Logging in gives users access to use more functions provided to regular user.</p>\r\n','2009-04-15 09:51:28','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_PASSWORD_REMINDER','<h2>Forgot Your Password</h2>\r\n\r\n<p>If you have forgotten your password, use the <em>Forgot your password?</em> link on the Login screen. The form will email the login name to you, along with a link you must follow to change your password.</p>\r\n','2009-04-15 09:51:37','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_PROFILE','<h2>Profile</h2>\r\n<p>This section allows a user to change elements of his/her personal profile.</p>\r\n\r\n<p>Although the login name cannot be altered, password, email address, and other personal information are editable.</p>\r\n','2009-04-15 09:51:47','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_REGISTRATION','<h2>Register</h2>\r\n\r\n<p>In order for a user to login to the AFrame system and save results from accessibility reviews, manage translate or administer the system, a unique system account needs to be created.  Use the <em>Register</em> link on the login screen to access the registration form. If email-confirmation has been enabled by the system administrator, a message will be sent to the email address entered, containing a link that must be followed to confirm the new account. Once this has been done, the login name or email address, and the password entered during registration can now be used on the <a href=\"../login.php\">Login</a> screen.</p>','2009-04-15 09:52:02','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_TRANSLATION','<h2>Translation</h2>\r\n\r\n <p>All fields are self-explanatory. Note that language drop down box lists all the languages defined in the current installation of AFrame, no matter the language status (enabled or disabled). If you are translating a new language for AFrame, first define the language using the Language management tool\'s Add Language feature. If you do not have access to the Language management tools, ask your AFrame administrators to add the language.</p>\r\n\r\n<p>You can contribute to the AFrame community by exporting a language pack from your AFrame installation, and attaching it to a message in the atutor.ca <a href=\"http://atutor.ca/forum/4/1.html\">Translation Forum</a>. Also see the <a href=\"http://atutor.ca/atutor/docs/translate.php\">Translator Documentation</a> for further details about translating AFrame.</p>','2009-06-04 13:17:38','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_UPDATER','<h2>Updater</h2>\r\n     <p>The Updater was introduce in AFrame 1.6 to allow administrators to update their systems with feature adjustments, security fixes, and other AFrame code changes in between AFrame releases. The Updater is included as a standard module with AFrame 1.6.1+, and installs as an extra module for 1.6.</p>\r\n<dl>\r\n        <dt>The Update List</dt>\r\n    <dd>On the opening screen of the Updater will appear a list of updates available for the version of AFrame you are using, along with a description of each update.  This list is retrieved from update.atutor.ca, as are the updates themselves, so you must be connected to the Internet. Updates are retrieved from update.atutor.ca by AFrame and applied as necessary. </dd>\r\n    <dt>File Permissions</dt>\r\n   <dd>In most cases you will be asked to temporarily grant write permission to the files that need to be updated or replaced, then once the update has been applied, you will be asked to change the permissions back to read only. It is important that you follow the instructions after updates have been applied, otherwise you run the risk of opening a security hole. \r\n </dd>\r\n       <dt>Types of Updates</dt>\r\n   <dd>Updates come in various forms. Some updates replace code in a file with new code. Others replace a file with a new file.  Others may do both on multiple files and multiple code changes. Other updates delete files that are no longer required.</dd>\r\n  <dt>Required and Non-Required Updates</dt>\r\n  <dd>In most cases you will want to install updates in the order they appear in the update list, but not all updates are required updates.  Some feature updates can be ignored if you do not need the features they would add or modify on your system. Other updates will have dependencies, requiring the administrator to install earlier updates before installing a later one. You will be prompted to install previous updates if there are dependencies.</dd>\r\n        <dt>Checks and File Backups</dt>\r\n    <dd>If you have made changes to a file the Updater wishes to change,  you will be prompted to continue or not. The updater compares your local file with the same file in the AFrame code repository, and if they differ the prompt will display. In many cases  the Updater can apply updates without changing the code you have modified, but if the code to be replaced was modified, the update will fail, or if the update replaces a file, your changes will be lost. In all cases the updater will create a backup of the files that were modified, identified by the filename plus the update number added as a suffix. Rename the file to its original name to restore that file back to its original state. You can list these files by clicking the view messages button next to the update listing after the update is installed. After you have confirmed that the updates were applied and are working properly, it is safe to delete the backup files, though it does not hurt to keep them around. </dd>\r\n    <dt>Private Updates</dt>\r\n    <dd>In some cases private updates can be applied by uploading a update file through the upload form below the update list.  Private updates are often those used to apply changes that are not being applied to the AFrame default source code, or to apply custom features, or to share updates between users, etc. When uploading a update, be sure the update id, defined in the patch.xml file, is unique . </dd>\r\n</dl>','2009-06-22 15:37:42','Updater');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_USER','<h2>User Management</h2>\r\n\r\n    <p>This section allows administrators to manage all user accounts. Each user belongs to a user group to which privileges are assigned.</p>\r\n\r\n<p>There are three types of default user groups that are created when AFrame is installed. These are described below along with the default privileges associated with each groups. \r\n      <dl>\r\n                <dt>Administrator</dt>\r\n              <dd>Administrators have privileges to use the Home, manage users, languages and manage their own profile.</dd>\r\n              <dt>Regular User</dt>\r\n               <dd>Regular users have privileges to use the Home and manage their own profile.</dd>\r\n                <dt>Translator</dt>\r\n         <dd>Translators have privileges to use the Home, translate AFrame terms from English to other languages, and to manage their own profile. The languages that can be used in the system are defined by users who have \"Language Management\" privileges.</dd>\r\n       </dl>\r\n</p>\r\n\r\n<h3>Creating User Accounts</h3>\r\n\r\n<p>The users who belong to a group that has \"User Management\" privileges can manually add users to the system by using <em>Create User</em>.</p>\r\n<p>User accounts can also be created by individuals using the Registration form available through the public pages of AFrame. The accounts created via the Registration form are automatically set to user group \"Regular User\". </p>\r\n\r\n<h3>User Group</h3>\r\n\r\n<p><em>User Group</em> is used to create new user groups and edit existing user groups.</p>','2009-06-04 12:55:56','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_USER_GROUP ','<h2>User Group</h2>\r\n\r\n<p>The User Group section allows administrators to manage user groups. User groups define the privileges that are granted to the users who are members of a group. Note that \"Administrator\" and \"Regular User\" groups can not  be deleted. They must exist for AFrame\'s proper operations. All other groups are optional.</p>\r\n\r\n<p>There are three default user groups in AFrame. Below is a description of the default privileges that are granted to each group. The privileges in user groups are editable by users who are a member of a group that has the \"User Management\" privilege.\r\n<dl>\r\n<dt>Administrator</dt>\r\n<dd>Administrators have privileges to use the Home, manage users, languages and manage their own profile.</dd>\r\n<dt>Regular User</dt>\r\n<dd>Regular users have privileges to use the Home and manage their own profile. </dd>\r\n<dt>Translator</dt>\r\n<dd>Translators have privileges to use the Home, translate AFrame terms from English to other languages, and to manage their own profile. The languages that can be used in the system are defined by users who have \"Language Management\" privileges.</dd>\r\n</dl>\r\n</p>','2009-06-04 13:04:37','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_USER_PASSWORD ','<h2>Change Password</h2>\r\n\r\n<p>All fields are required and self-explanatory. Once the new password is set successfully, an email notification is sent to the user.</p>\r\n','2009-04-15 09:53:11','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_INFOS_INVALID_USER','You must <a href=\"login.php\">login</a> to use this section.','2009-01-15 16:13:14','');
-INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_INFOS_UPDATE_INSTALLED_AND_REMOVE_PERMISSION','The update has been installed. Please remove write permission as instruction.','2009-06-22 14:49:02','Updater: info msg');
-INSERT INTO `language_text` VALUES ('eng', '_template','15_max_chars','8 characters minimum, 15 characters maximum','2009-01-09 10:16:38','');
-INSERT INTO `language_text` VALUES ('eng', '_template','20_max_chars','20 character maximum','2009-01-09 10:16:38','');
-INSERT INTO `language_text` VALUES ('eng', '_template','aframe_documentation','AFrame Documentation','2009-06-16 10:25:25','');
-INSERT INTO `language_text` VALUES ('eng', '_template','aframe_handbook','AFrame Handbook','2009-01-28 15:28:06','');
-INSERT INTO `language_text` VALUES ('eng', '_template','aframe_version_to_apply','AFrame Version to Apply','2009-06-22 14:49:02','Updater');
-INSERT INTO `language_text` VALUES ('eng', '_template','aframe_whatis','AFrame provides a basic frame to build an application. It has build-in functions to support multiple languages, translation, user/user group managment, updater and user profile managment.','2009-05-29 08:55:24','');
-INSERT INTO `language_text` VALUES ('eng', '_template','copyright','Web site engine\'s code is copyright &copy; 2009','2009-05-25 10:57:43','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_CONFIRM_DELETE_ITEM','Are you sure you want to delete the following items? <strong>%s</strong>','2009-03-17 15:19:54','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_CONFIRM_DELETE_LANG','Are you sure you want to delete the language (<strong>%s</strong>)?','2009-02-23 15:13:50','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_CONFIRM_DELETE_MYOWN_UPDATE','Are you sure you want to <strong>delete</strong> update <strong>%s</strong>?','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_CONFIRM_DELETE_USER','Are you sure you want to delete the following users? <strong>%s</strong>','2009-02-06 11:58:02','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_CONFIRM_DELETE_USER_GROUP','Are you sure you want to delete the following user groups? <strong>%s</strong>','2009-02-12 15:08:53','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_ACCOUNT_DISABLED','That account has been disabled.','2009-01-08 11:43:51','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_CANNOT_CONNECT','Cannot connect to URL: %s','2009-04-22 09:26:45','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_CANNOT_DEL_DEFAULT_LANG','Cannot delete default language <strong>%s</strong>. The system cannot run properly without it.','2009-02-23 15:47:44','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_CANNOT_UNZIP','Can NOT unzip the uploaded file.','2009-06-22 14:49:02','error msg');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_CHOOSE_ACTION','Please choose action for file <strong>%s</strong>','2009-06-22 14:49:02','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_CHOOSE_UNINSTALLED_UPDATE','Please choose an uninstalled update.','2009-06-22 14:49:02','Updater: error msg');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_CONFIRM_BAD','Your email address and account could not be confirmed.','2009-01-14 14:40:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_DB_NOT_UPDATED','Information could not be added to the database.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_EMAIL_EXISTS','An account with that email address already exists.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_EMAIL_INVALID','Email address was invalid.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_EMAIL_NOT_FOUND','No account found with that email address.','2009-01-14 14:40:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_EMPTY_FIELD','Field cannot be empty. Data is not saved.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_EMPTY_FIELDS','The following required field(s) are empty:<br />\r\n%s.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_EMPTY_SESSIONID','Empty Session ID.','2009-03-03 13:44:57','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_EMPTY_USER','Empty user.','2009-03-03 13:44:57','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_EMPTY_WEB_SERVICE_ID','Empty web service ID.','2009-03-04 14:53:18','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_FIRST_LAST_NAME_UNIQUE','First, second, and last names combination must be unique.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_INVALID_FORMAT','Invalid format.','2009-03-03 13:44:57','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_INVALID_LOGIN','Invalid login/password combination.','2009-01-08 11:43:51','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_INVALID_SESSION','Invalid session.','2009-03-03 13:44:57','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_INVALID_TOKEN_TYPE','Invalid token type.','2009-10-09 16:18:01','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_INVALID_WEB_SERVICE_ID','Invalid web service ID.','2009-03-04 14:49:59','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_LANG_EMPTY','The text for this language has not been translated yet.','2009-02-24 13:57:01','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_LANG_EXISTS','The language you are trying to create already exists.','2009-02-24 09:20:45','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_LANG_WRONG_VERSION','The language pack you are trying to import is not compatible with this version of Transformable.','2009-02-24 13:58:25','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_LOGIN_CHARS','Your Login Name must only contain letters, numbers, periods, or underscores (_\'s).','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_LOGIN_EXISTS','That login already exists, please choose another.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_NOT_LOCALHOST','Sorry, the IP address of localhost is not public. For security reasons, validating resources located at non-public IP addresses has been disabled in this service.','2009-04-22 09:26:45','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_NO_ACTION_SELECTED','No action selected.','2009-02-04 15:31:02','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_NO_ITEM_SELECTED','You must select an item before using a button.','2009-02-04 15:31:02','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_PAGE_NOT_FOUND','Page (%s) cannot be found','2008-12-12 13:28:09','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_PASSWORD_CHARS','The password must contain letters, numbers, and symbols.','2009-01-09 13:41:06','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_PASSWORD_LENGTH','Password must be at least 8 characters long.','2009-01-09 13:41:06','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_PASSWORD_MISMATCH','Passwords did not match.','2009-01-09 13:41:06','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_REMOVE_WRITE_PERMISSION','Please remove write permission from the listed files.','2009-06-22 14:49:02','error msg');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_SECRET_ERROR','Letters or numbers entered from the CAPTCHA image are incorrect. Try again.','2009-10-22 14:06:59','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_SELECT_ONE_ITEM','Only <em>one</em> item must be selected.','2009-02-04 15:31:02','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_SENDING_ERROR','There was an error sending the email message.','2009-01-16 13:14:08','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_UPDATE_ALREADY_INSTALLED','The selected update is already installed.','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_UPDATE_DEPENDENCY','Due to update dependency, please install the listed updates before installing this update: %s','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_UPDATE_XML_NOT_FOUND','Update XML file is not found.','2009-06-22 14:49:02','error msg');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_ERROR_WRONG_PASSWORD','Incorrect password.','2009-01-16 10:29:47','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_ACCOUNT_CONFIRMED','Account has been confirmed.','2009-01-14 14:40:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_ACTION_COMPLETED_SUCCESSFULLY','Action completed successfully.','2009-01-16 11:29:41','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_CANCELLED','Successfully cancelled without any changes.','2009-01-14 14:40:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_CHANGE_TO_SAME_EMAIL','The email address is same as what you currently have.','2009-01-16 11:54:46','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_CONFIRMATION_SENT','An email confirmation message has been sent.','2009-01-14 14:40:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_CONFIRM_EMAIL2','An email with instructions on retrieving your password has been sent.','2009-01-16 13:14:08','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_CONFIRM_GOOD','Your email address has been confirmed successfully.','2009-01-14 14:40:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_IMPORT_LANG_SUCCESS','New language was successfully imported.','2009-02-24 13:58:25','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_LOGIN_SUCCESS','You have logged in successfully.','2009-01-08 11:43:51','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_LOGOUT','You have successfully been logged out.','2009-01-08 09:38:14','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_ONLY_ENGLISH','Only English language is defined in the system. There is no foreign languages to translate.','2009-02-18 11:52:10','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_PASSWORD_CHANGED','Password changed successfully.','2009-01-16 10:35:40','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_PROFILE_UPDATED','Your Profile was successfully updated.','2009-01-15 10:59:58','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_REGISTER_SUCCESS','You have registered successfully. Your web service ID is %s. This ID must be presented when using web service. This ID can always be retrieved from \"Profile\" page.','2009-10-07 09:55:16','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_REG_THANKS_CONFIRM','Thank-you for registering. Please follow the instructions in the email we sent you on how to confirm your account. You will need to confirm your account before you can login.','2009-01-09 14:07:11','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_UPDATE_CREATED_SUCCESSFULLY','The update has been created successfully.','2009-06-22 14:49:02','Updater: feedback msg');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_FEEDBACK_UPDATE_INSTALLED_SUCCESSFULLY','The update has been installed successfully.','2009-06-22 14:49:02','Updater: feedback msg');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_ADD_EDIT_LANGUAGE','<h2>Add/Edit Language</h2>\r\n\r\n     <p>Adding and Editing the language properties allows users to change the following:\r\n <ul>\r\n                <li>Language Code (3 digit ISO-639-2 language code)</li>\r\n            <li>Locale (two letter abritrary code to represent a variation of a language)</li>\r\n          <li>Character Set (should always be UTF-8)</li>\r\n             <li>Regular Expression (leave blank)</li>\r\n           <li>Language name translated</li>\r\n           <li>Language name in English</li>\r\n           <li>Status (enabled/disabled)</li>\r\n  </ul>\r\n       </p>\r\n        <p>When \"Status\" is set to enabled, the language is displayed in the selector at the bottom of Transformable pages, which allows users to switch to this language.</p>\r\n','2009-04-15 09:46:37','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_CHANGE_EMAIL','<h2>Change Email</h2>\r\n<p>This page allows users to change email addresses. </p>\r\n','2009-04-15 09:47:18','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_CHANGE_PASSWORD','<h2>Change Password</h2>\r\n<p>This page allows users to change passwords. The form authenticates users by checking their old password first, and then setting a new password and typing it again.</p>\r\n','2009-04-15 09:53:55','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_CREATE_EDIT_USER ','<h2>Create/Edit User</h2>\r\n\r\n<p>All fields on \"Create User\" and \"Edit User\" forms are required. Most fields are self-explanatory. When the \"Account Status\" field is set to disabled, the user is not able to login. </p>\r\n<p>User accounts can also be created by individuals using the Registration form available through the public pages of Transformable. The accounts created via the Registration form are automatically set to user group \"Regular User\". </p>','2009-06-04 13:00:03','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_CREATE_EDIT_USER_GROUP','<h2>Create/Edit User Group</h2>\r\n\r\n<p>All fields are relatively self-explanatory.</p>\r\n\r\n<p>There are six privileges provided by Transformable. Privileges are fixed and not changeable.\r\n      <dl>\r\n                <dt>Home</dt>\r\n               <dd>This is where user implements own functions.</dd>\r\n               <dt>User Management</dt>\r\n            <dd>Create, edit, delete users.</dd>\r\n                <dt>Language Management</dt>\r\n                <dd>Create, edit, delete, enable, disable languages.</dd>\r\n           <dt>Translation</dt>\r\n                <dd>Translate all Transformable terms into languages other than English, or edit existing English text.</dd>\r\n                <dt>Profile Management</dt>\r\n         <dd>Edit profile, change password or email.</dd>\r\n    </dl>\r\n</p>','2009-06-04 13:05:21','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_CREATE_UPDATE','<h2>Creating Update</h2>\r\n\r\n<p>If you happen to come across a bug you can fix, or have a new feature you would like added to the Transformable public distribution, you can use Create Update to put your changes into a form that can be easily added to the Transformable public code. Or, if you have a feature you are adding to one Transformable installation that you would like to have added to another, Create Update is ideal for reproducing your feature across installations. If you are creating new features that are not going to become part of the Transformable public source code, you can build them into a update so they can be reapplied from version to version as you upgrade your Transformable system. Creating updates does require knowledge of PHP, and of SQL if you plan on creating a update that changes the Transformable database. Please refer to the appropriate documentation for information on PHP and SQL. <p>\r\n\r\n<dl>\r\n     <dt>Transformable Update ID</dt>\r\n    <dd>The update id you give to your update must be different from all updates available for the particular version of Transformable it applies to. It is suggested you prefix your updates with a special identifier that represents the author or the authoring organization. If for example the University of Toronto is creating the update, a update ID might look like \"uoft_0002.\"</dd>\r\n      <dt>Transformable Version to Apply</dt>\r\n     <dd>This needs to be the exact version number of the Transformable version the update applies to (e.g 1.6). including any minor version numbers (e.g 1.6.1.2)  The exact version number can be found on the Administrator open screen under \"Statistics and Information.\" In most cases when applying a update created for an older version of Transformable, the \"Transformable version to Apply\" will need to be adjusted. Or, this can be adjusted manually in the patch.xml file included with the source code of the update.\r\n       </dd>\r\n       <dt>Description</dt>\r\n        <dd>This should be a detailed description of what the update does. Example might include \"fixes problem uploading files to filemanager\" for a bug fix, or \"added a timer function to tests\" for an added feature, or \"removes registration tab\" for a feature adjustment, etc. Include enough detail so those applying the update understand exactly what it will do..</dd>\r\n   <dt>SQL Statement</dt>\r\n      <dd>This optional field can be used to insert SQL commands which modify the Transformable database. It might be used to write an SQL statement to modify and existing table, such as changing a data type, or a field size, or to add or remove an field. It can also be used to insert SQL that generates a new table for a new feature created by a update, or it can be used to insert data into a table used by a feature created by the update. Any SQL can be included in this field. Be careful when running SQL, that that SQL is not going to interfere with upgrade SQL. If you are changing table structures and those same tables are being altered during an upgrade, the upgrade may fail.</dd>\r\n       <dt>Dependant Updates</dt>\r\n  <dd>It is common for later updates to require changes from earlier updates before they can be installed. If this is the case for the update you are creating, enter the update IDs into the Dependant Update ID field. Click on Add Dependent Update if additional dependencies are required. Be sure to check the updates on the opening screen of the Updater to see if the file you are modifying with your update is  being modified by an update.Transformable.ca update. If they are modifying the same files, you may need to include the ID numbers for those updates in the Dependant Updates for the update your are creating.</dd>\r\n       <dt>Files</dt>  \r\n    <dd>This area is where most Transformable updates are created. Click on <strong>Add File</strong>  to generate a update block. A update block can include one of four actions on the file being modified, as described below. As many update blocks as required can be added to a update. </dd>\r\n             <dl>\r\n        <dt>Add File</dt>\r\n   <dd>The <strong>Add</strong> action can be used to add a new file to Transformable. This action is often used in conjuction with other update blocks that alter or delete files, to add a replacement file for one deleted, or to perhaps add a required or include file needed by a modified section in the file being changed. In the <strong>File Name</strong> field enter the file name to be assigned to the file when it is installed. In the <strong>Directory</strong> field enter the <i>relative path</i> from the Transformable root directory in which the modified file is or will exist. Select  from <strong>Upload File</strong> using the Browse button to locate the file in your local computer\'s file system. Note that the upload file can have any name. It will be renamed to the file name listed in the File Name field when it is installed.</dd>\r\n       <dt>Alter File</dt>\r\n <dd>This option is used when you wish to make changes to a piece of code within an existing source code file. In the <strong>File Name</strong> field enter the name of the file in the Transformable source code that will be altered. In the <strong>Directory</strong> field enter the relative path to the directory in which the to be alter file exists, relative to the Transformable root directory. In the <strong>Code To Replace From</strong> field copy the code from the original file the will be replaced, or appended to, and in the <strong>Code To Replace To</strong> field enter to code that will replace the code above in the <i>From</i> field. Or, if you are adding code instead of replacing code, include the code from the field above so it gets added back if you are only using that code as a way of identifying a location in the file where new code is being added.</dd>\r\n       <dt>Delete File</dt>\r\n        <dd>This option will remove files from Transformable. In the <strong>File Name</strong>  field enter the name of the file to be deleted. In the <strong>Directory</strong> field enter the path to the directory in which the to be delete file exists, relative to the root directory of the Transformable installation. </dd>\r\n     <dt>Overwrite File</dt>\r\n     <dd>This option is used to replace an existing file in Transformable with a new one. In the <strong>File Name</strong>  field enter the name of the file to be replaced. In the <strong>Directory</strong> field enter the path to the directory in which the to be replaced file exists, relative to the root directory of the Transformable installation. In the <strong>Upload File</strong> field use the Browse button to choose a file from your local computer to replace the specified file. The upload file may be named anything. It will be renamed to the file it is replacing when the update is installed.</dd>\r\n       </dl>\r\n       <dt>Create Update</dt>\r\n      <dd>Click on this button to build the update into a downloadable zip file. This zip file can then be uploaded in the Upload field on the main Updater screen to apply a update to a system.</dd>\r\n    <dt>Save Update</dt>\r\n        <dd>Click on this button to save the developing update to the Transformable database for future reference. Though it is not required, you should save a copy of the update in this way, so it can be retrieved and edited if necessary. Or, if a update takes more than a single sitting to build, you can save it, then retrieve it later to continue.</dd>\r\n        <dt>Cancel</dt>\r\n     <dd>Press this button to ignore the latest changes to the update, and return to My Own Updates Screen.</dd>\r\n\r\n</dl>','2009-06-22 15:32:56','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_LANGUAGE','<h2>Language Management</h2>\r\n\r\n    <p>Transformable can be displayed in many different languages! Through the Language Manager language packs can be selected and imported.</p>\r\n\r\n<h3>Managing Existing Languages</h3>\r\n    <p>Installed languages can be edited, deleted, or exported as an Transformable language pack for redistribution. When exporting a language, a download prompt will appear asking to download a zip file of the language pack.</p>\r\n   <p>Note that the English language (language code: eng) cannot be deleted. This is the base language pack that ensures Transformable runs properly. When other languages are installed, users can disable it if they don\'t want Transformable to be displayed in English.</p>\r\n       \r\n<h3>Importing Languages</h3>\r\n    <p>Language packs can be imported by retreiving the package and then importing it into Transformable.</p>\r\n   <ol>\r\n                <li>Visit <a href=\"http://www.atutor.ca/transformable/translate/index.php\" target=\"_new\">Transformable Language Packs</a> to download one of the available language packs for your version.</li>\r\n                <li>Use the <code>Browse...</code> button to find the downloaded language pack.</li>\r\n                <li>Use the <code>Import</code> button to import the language.</li>\r\n </ol>\r\n\r\n   <p>You can contribute to the Transformable community by exporting a language pack from your Transformable installation, and attaching it to a message in the atutor.ca <a href=\"http://atutor.ca/forum/4/1.html\">Translation Forum</a>. Also see the <a href=\"http://atutor.ca/atutor/docs/translate.php\">Translator Documentation</a> for further details about translating Transformable.</p>','2009-06-04 13:08:15','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_LOGIN','<h2>Login</h2>\r\n\r\n<p>A user may login to Transformable with their Login Name or Email address, and the Password entered during <a href=\"../register.php\">registration</a>. Logging in gives users access to use more functions provided to regular user.</p>\r\n','2009-04-15 09:51:28','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_PASSWORD_REMINDER','<h2>Forgot Your Password</h2>\r\n\r\n<p>If you have forgotten your password, use the <em>Forgot your password?</em> link on the Login screen. The form will email the login name to you, along with a link you must follow to change your password.</p>\r\n','2009-04-15 09:51:37','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_PROFILE','<h2>Profile</h2>\r\n<p>This section allows a user to change elements of his/her personal profile.</p>\r\n\r\n<p>Although the login name cannot be altered, password, email address, and other personal information are editable.</p>\r\n','2009-04-15 09:51:47','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_REGISTRATION','<h2>Register</h2>\r\n\r\n<p>In order for a user to login to the Transformable system and save results from accessibility reviews, manage translate or administer the system, a unique system account needs to be created.  Use the <em>Register</em> link on the login screen to access the registration form. If email-confirmation has been enabled by the system administrator, a message will be sent to the email address entered, containing a link that must be followed to confirm the new account. Once this has been done, the login name or email address, and the password entered during registration can now be used on the <a href=\"../login.php\">Login</a> screen.</p>','2009-04-15 09:52:02','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_TRANSLATION','<h2>Translation</h2>\r\n\r\n <p>All fields are self-explanatory. Note that language drop down box lists all the languages defined in the current installation of Transformable, no matter the language status (enabled or disabled). If you are translating a new language for Transformable, first define the language using the Language management tool\'s Add Language feature. If you do not have access to the Language management tools, ask your Transformable administrators to add the language.</p>\r\n\r\n<p>You can contribute to the Transformable community by exporting a language pack from your Transformable installation, and attaching it to a message in the atutor.ca <a href=\"http://atutor.ca/forum/4/1.html\">Translation Forum</a>. Also see the <a href=\"http://atutor.ca/atutor/docs/translate.php\">Translator Documentation</a> for further details about translating Transformable.</p>','2009-06-04 13:17:38','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_UPDATER','<h2>Updater</h2>\r\n     <p>The Updater was introduce in Transformable 1.6 to allow administrators to update their systems with feature adjustments, security fixes, and other Transformable code changes in between Transformable releases. The Updater is included as a standard module with Transformable 1.6.1+, and installs as an extra module for 1.6.</p>\r\n<dl>\r\n    <dt>The Update List</dt>\r\n    <dd>On the opening screen of the Updater will appear a list of updates available for the version of Transformable you are using, along with a description of each update.  This list is retrieved from update.atutor.ca, as are the updates themselves, so you must be connected to the Internet. Updates are retrieved from update.atutor.ca by Transformable and applied as necessary. </dd>\r\n      <dt>File Permissions</dt>\r\n   <dd>In most cases you will be asked to temporarily grant write permission to the files that need to be updated or replaced, then once the update has been applied, you will be asked to change the permissions back to read only. It is important that you follow the instructions after updates have been applied, otherwise you run the risk of opening a security hole. \r\n </dd>\r\n       <dt>Types of Updates</dt>\r\n   <dd>Updates come in various forms. Some updates replace code in a file with new code. Others replace a file with a new file.  Others may do both on multiple files and multiple code changes. Other updates delete files that are no longer required.</dd>\r\n  <dt>Required and Non-Required Updates</dt>\r\n  <dd>In most cases you will want to install updates in the order they appear in the update list, but not all updates are required updates.  Some feature updates can be ignored if you do not need the features they would add or modify on your system. Other updates will have dependencies, requiring the administrator to install earlier updates before installing a later one. You will be prompted to install previous updates if there are dependencies.</dd>\r\n        <dt>Checks and File Backups</dt>\r\n    <dd>If you have made changes to a file the Updater wishes to change,  you will be prompted to continue or not. The updater compares your local file with the same file in the Transformable code repository, and if they differ the prompt will display. In many cases  the Updater can apply updates without changing the code you have modified, but if the code to be replaced was modified, the update will fail, or if the update replaces a file, your changes will be lost. In all cases the updater will create a backup of the files that were modified, identified by the filename plus the update number added as a suffix. Rename the file to its original name to restore that file back to its original state. You can list these files by clicking the view messages button next to the update listing after the update is installed. After you have confirmed that the updates were applied and are working properly, it is safe to delete the backup files, though it does not hurt to keep them around. </dd>\r\n     <dt>Private Updates</dt>\r\n    <dd>In some cases private updates can be applied by uploading a update file through the upload form below the update list.  Private updates are often those used to apply changes that are not being applied to the Transformable default source code, or to apply custom features, or to share updates between users, etc. When uploading a update, be sure the update id, defined in the patch.xml file, is unique . </dd>\r\n</dl>','2009-06-22 15:37:42','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_USER','<h2>User Management</h2>\r\n\r\n    <p>This section allows administrators to manage all user accounts. Each user belongs to a user group to which privileges are assigned.</p>\r\n\r\n<p>There are three types of default user groups that are created when Transformable is installed. These are described below along with the default privileges associated with each groups. \r\n       <dl>\r\n                <dt>Administrator</dt>\r\n              <dd>Administrators have privileges to use the Home, manage users, languages and manage their own profile.</dd>\r\n              <dt>Regular User</dt>\r\n               <dd>Regular users have privileges to use the Home and manage their own profile.</dd>\r\n                <dt>Translator</dt>\r\n         <dd>Translators have privileges to use the Home, translate Transformable terms from English to other languages, and to manage their own profile. The languages that can be used in the system are defined by users who have \"Language Management\" privileges.</dd>\r\n        </dl>\r\n</p>\r\n\r\n<h3>Creating User Accounts</h3>\r\n\r\n<p>The users who belong to a group that has \"User Management\" privileges can manually add users to the system by using <em>Create User</em>.</p>\r\n<p>User accounts can also be created by individuals using the Registration form available through the public pages of Transformable. The accounts created via the Registration form are automatically set to user group \"Regular User\". </p>\r\n\r\n<h3>User Group</h3>\r\n\r\n<p><em>User Group</em> is used to create new user groups and edit existing user groups.</p>','2009-06-04 12:55:56','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_USER_GROUP ','<h2>User Group</h2>\r\n\r\n<p>The User Group section allows administrators to manage user groups. User groups define the privileges that are granted to the users who are members of a group. Note that \"Administrator\" and \"Regular User\" groups can not  be deleted. They must exist for Transformable\'s proper operations. All other groups are optional.</p>\r\n\r\n<p>There are three default user groups in Transformable. Below is a description of the default privileges that are granted to each group. The privileges in user groups are editable by users who are a member of a group that has the \"User Management\" privilege.\r\n<dl>\r\n<dt>Administrator</dt>\r\n<dd>Administrators have privileges to use the Home, manage users, languages and manage their own profile.</dd>\r\n<dt>Regular User</dt>\r\n<dd>Regular users have privileges to use the Home and manage their own profile. </dd>\r\n<dt>Translator</dt>\r\n<dd>Translators have privileges to use the Home, translate Transformable terms from English to other languages, and to manage their own profile. The languages that can be used in the system are defined by users who have \"Language Management\" privileges.</dd>\r\n</dl>\r\n</p>','2009-06-04 13:04:37','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_HELP_USER_PASSWORD ','<h2>Change Password</h2>\r\n\r\n<p>All fields are required and self-explanatory. Once the new password is set successfully, an email notification is sent to the user.</p>\r\n','2009-04-15 09:53:11','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_INFOS_INVALID_USER','You must <a href=\"login.php\">login</a> to use this section.','2009-01-15 16:13:14','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','TR_INFOS_UPDATE_INSTALLED_AND_REMOVE_PERMISSION','The update has been installed. Please remove write permission as instruction.','2009-06-22 14:49:02','Updater: info msg');
+INSERT INTO `language_text` VALUES ('eng', '_template','15_max_chars','15 character maximum','2009-10-07 09:55:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','20_max_chars','20 character maximum','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','add','Add','2009-03-24 13:47:37','');
 INSERT INTO `language_text` VALUES ('eng', '_template','add_a_file','Add A File','2009-06-22 14:49:02','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','add_dependent_update','Add A Dependent Update','2009-06-22 14:49:02','Updater');
@@ -133,11 +102,20 @@ INSERT INTO `language_text` VALUES ('eng', '_template','add_edit_group','Add/Edi
 INSERT INTO `language_text` VALUES ('eng', '_template','add_edit_language','Add/Edit Language','2009-02-23 13:27:38','');
 INSERT INTO `language_text` VALUES ('eng', '_template','add_language','Add Language','2009-02-18 15:56:02','');
 INSERT INTO `language_text` VALUES ('eng', '_template','add_privileges','Add Privileges','2009-02-17 09:45:53','');
+INSERT INTO `language_text` VALUES ('eng', '_template','transformable','Transformable','2009-10-07 09:55:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','transformable_documentation','Transformable Documentation','2009-06-16 10:25:25','');
+INSERT INTO `language_text` VALUES ('eng', '_template','transformable_handbook','Transformable Handbook','2009-01-28 15:28:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','transformable_version_to_apply','Transformable Version to Apply','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','transformable_whatis','Transformable provides a basic frame to build an application. It has build-in functions to support multiple languages, translation, user/user group managment, updater and user profile managment.','2009-05-29 08:55:24','');
 INSERT INTO `language_text` VALUES ('eng', '_template','all','All','2008-11-27 09:49:41','');
 INSERT INTO `language_text` VALUES ('eng', '_template','alter','Alter','2009-06-22 14:49:02','');
+INSERT INTO `language_text` VALUES ('eng', '_template','audible_captcha','Audible Version of CAPTCHA','2009-10-22 14:02:18','');
+INSERT INTO `language_text` VALUES ('eng', '_template','author','Author','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','available_to','Available To','2009-03-24 13:47:37','');
 INSERT INTO `language_text` VALUES ('eng', '_template','available_updates','Available Updates','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','back_to','Back To:','2009-03-24 13:47:37','');
 INSERT INTO `language_text` VALUES ('eng', '_template','calendar','Calendar','2009-04-06 10:43:09','');
-INSERT INTO `language_text` VALUES ('eng', '_template','cancel','Cancel','2009-01-09 10:29:35','');
+INSERT INTO `language_text` VALUES ('eng', '_template','cancel','Cancel','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','change_email','Change Email','2009-01-15 11:29:34','');
 INSERT INTO `language_text` VALUES ('eng', '_template','change_password','Change Password','2009-01-15 11:29:34','');
 INSERT INTO `language_text` VALUES ('eng', '_template','charset','Character Set','2009-02-20 11:43:44','');
@@ -145,10 +123,13 @@ INSERT INTO `language_text` VALUES ('eng', '_template','choose_lang','Choose a l
 INSERT INTO `language_text` VALUES ('eng', '_template','close_popup','Close Popup','2009-01-28 15:28:06','');
 INSERT INTO `language_text` VALUES ('eng', '_template','code_to_replace_from','Code To Replace From','2009-06-22 14:49:02','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','code_to_replace_to','Code To Replace To','2009-06-22 14:49:02','Updater');
-INSERT INTO `language_text` VALUES ('eng', '_template','combination','Use a combination of letters, numbers and symbols','2009-01-09 10:16:38','');
+INSERT INTO `language_text` VALUES ('eng', '_template','combination','Use a combination of letters, numbers and symbols','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','confirm_delete','Are you sure you want to delete these records?','2009-04-09 11:29:46','');
-INSERT INTO `language_text` VALUES ('eng', '_template','contain_only','May contain only letters, numbers, underscores, hyphens or periods.','2009-01-09 10:16:38','');
+INSERT INTO `language_text` VALUES ('eng', '_template','consumer','Consumer','2009-10-08 15:42:55','');
+INSERT INTO `language_text` VALUES ('eng', '_template','contact_email','Contact Email','2009-10-21 15:19:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','contain_only','May contain only letters, numbers, underscores, hyphens or periods.','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','continue','Continue','2009-06-22 14:49:02','');
+INSERT INTO `language_text` VALUES ('eng', '_template','copyright','Web site engine\'s code is copyright &copy; 2009','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','create_edit_update','Create/Edit Update','2009-06-22 14:49:01','');
 INSERT INTO `language_text` VALUES ('eng', '_template','create_edit_user','Create/Edit User','2009-02-05 10:25:08','');
 INSERT INTO `language_text` VALUES ('eng', '_template','create_edit_user_group','Create User Group','2009-02-18 11:13:36','');
@@ -156,6 +137,9 @@ INSERT INTO `language_text` VALUES ('eng', '_template','create_update','Create U
 INSERT INTO `language_text` VALUES ('eng', '_template','create_user','Create User','2009-01-21 15:58:32','');
 INSERT INTO `language_text` VALUES ('eng', '_template','date','Date','2009-02-27 16:07:19','');
 INSERT INTO `language_text` VALUES ('eng', '_template','date_created','Date Created','2009-02-17 12:02:27','');
+INSERT INTO `language_text` VALUES ('eng', '_template','default_language','Default Language','2009-10-21 15:19:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','default_max_file_size','Default: 1048576','2009-10-21 15:25:08','');
+INSERT INTO `language_text` VALUES ('eng', '_template','default_use_captcha','Default: Disable','2009-10-21 15:25:08','');
 INSERT INTO `language_text` VALUES ('eng', '_template','delete','Delete','2009-01-22 16:02:07','');
 INSERT INTO `language_text` VALUES ('eng', '_template','delete_language','Delete Language','2009-02-18 15:56:02','');
 INSERT INTO `language_text` VALUES ('eng', '_template','delete_this_file','Delete This File','2009-06-22 14:49:02','Updater');
@@ -172,13 +156,14 @@ INSERT INTO `language_text` VALUES ('eng', '_template','disabled','Disabled','20
 INSERT INTO `language_text` VALUES ('eng', '_template','done','Done','2009-06-22 16:16:50','');
 INSERT INTO `language_text` VALUES ('eng', '_template','edit','Edit','2009-01-22 16:02:07','');
 INSERT INTO `language_text` VALUES ('eng', '_template','edit_function','Edit Function','2009-03-17 14:58:36','');
-INSERT INTO `language_text` VALUES ('eng', '_template','edit_profile','Edit Profile','2009-01-16 10:52:51','');
+INSERT INTO `language_text` VALUES ('eng', '_template','edit_profile','Edit Profile','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','edit_update','Edit Update','2009-06-22 14:49:02','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','email','Email','2009-02-04 11:51:16','');
-INSERT INTO `language_text` VALUES ('eng', '_template','email_address','Email Address','2009-01-09 10:40:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','email_address','Email Address','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','email_confirmation_message','You have registered for an account on %1s. Please finish the registration process by confirming your email address by using the following link: %2s .','2009-01-14 13:25:55','');
 INSERT INTO `language_text` VALUES ('eng', '_template','email_confirmation_message2','To finish changing your account\'s email address on %1s, please confirm your email address by using the following link: %2s .','2009-01-16 11:07:44','');
 INSERT INTO `language_text` VALUES ('eng', '_template','email_confirmation_subject','Email Confirmation','2009-01-14 13:25:55','');
+INSERT INTO `language_text` VALUES ('eng', '_template','empty_param_consumer','Empty parameter \"consumer\".','2009-10-08 11:43:50','');
 INSERT INTO `language_text` VALUES ('eng', '_template','enable','Enable','2009-01-20 11:47:15','');
 INSERT INTO `language_text` VALUES ('eng', '_template','enabled','Enabled','2009-01-20 11:45:23','');
 INSERT INTO `language_text` VALUES ('eng', '_template','english_context','English Context','2008-12-01 13:18:57','');
@@ -189,31 +174,46 @@ INSERT INTO `language_text` VALUES ('eng', '_template','error_type','Error Type'
 INSERT INTO `language_text` VALUES ('eng', '_template','expand_add_privileges','Expand Add Privileges','2009-02-17 09:45:53','');
 INSERT INTO `language_text` VALUES ('eng', '_template','expected_result','Expected Result','2008-11-24 14:25:44','');
 INSERT INTO `language_text` VALUES ('eng', '_template','export','Export','2009-02-24 13:58:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','factory_default','Reset to Factory Defaults','2009-10-21 16:15:03','');
 INSERT INTO `language_text` VALUES ('eng', '_template','file','File','2009-06-22 14:49:01','');
 INSERT INTO `language_text` VALUES ('eng', '_template','files','Files','2009-06-22 14:49:01','');
 INSERT INTO `language_text` VALUES ('eng', '_template','file_name','File Name','2009-06-22 14:49:01','');
 INSERT INTO `language_text` VALUES ('eng', '_template','filter','Filter','2008-11-27 09:48:36','');
-INSERT INTO `language_text` VALUES ('eng', '_template','first_name','First Name','2009-01-09 10:40:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','first_name','First Name','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','get_my_update','Get My Update','2009-06-22 14:49:01','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','grant_write_permission','Please grant <strong>write</strong> permission to folders and files listed below:<p><strong>Note:</strong> To change permissions on Unix use <kbd>chmod a+rw</kbd> then the file name.</p>','2009-06-22 14:49:02','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','handbook_toc','Handbook Toc','2009-01-28 15:28:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','hide_contents','Hide Contents','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','home','Home','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','illegal_extentions','Illegal File Extensions','2009-10-21 15:19:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','image_validation_text','In the above image there are numbers and/or letters displayed.  Please type them into the following field.','2009-10-22 14:02:18','');
+INSERT INTO `language_text` VALUES ('eng', '_template','image_validation_text2','This helps ensure a live person is registering on this system.','2009-10-22 14:02:18','');
 INSERT INTO `language_text` VALUES ('eng', '_template','import','Import','2009-02-18 15:56:02','');
 INSERT INTO `language_text` VALUES ('eng', '_template','import_a_new_lang','Import a New Language','2009-02-24 13:58:06','');
 INSERT INTO `language_text` VALUES ('eng', '_template','info','Information','2009-03-06 11:29:10','');
-INSERT INTO `language_text` VALUES ('eng', '_template','input','Input','2008-11-21 14:16:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','input','Input','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','install','Install','2009-06-22 14:49:03','');
 INSERT INTO `language_text` VALUES ('eng', '_template','installed_date','Installed Date','2009-06-22 14:49:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','interface_terms','Interface Terms','2009-03-24 13:47:37','');
 INSERT INTO `language_text` VALUES ('eng', '_template','jump_to_content','Jump to Content','2009-05-25 10:17:46','');
 INSERT INTO `language_text` VALUES ('eng', '_template','language','Language','2009-04-14 10:35:06','');
 INSERT INTO `language_text` VALUES ('eng', '_template','lang_code','Language Code','2009-02-20 11:43:44','');
 INSERT INTO `language_text` VALUES ('eng', '_template','last_login','Last Login','2009-02-04 11:51:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','last_modified','Last Modified','2009-06-22 14:49:01','');
-INSERT INTO `language_text` VALUES ('eng', '_template','last_name','Last Name','2009-01-09 10:28:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','last_name','Last Name','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','last_update','Last Update','2009-02-17 12:02:27','');
+INSERT INTO `language_text` VALUES ('eng', '_template','latex_server','MimeTex Server for the LaTex service','2009-10-21 15:19:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','latex_server_info','For production purposes, please install mimeTeX on your own server.','2009-10-21 15:19:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','lesson_builder','Lesson Builder','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','locale','Locale','2009-02-23 13:27:38','');
+INSERT INTO `language_text` VALUES ('eng', '_template','login','Login','2009-10-07 09:55:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','login_name','Login Name','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','login_name_or_email','Login Name or Email','2009-01-09 10:40:36','');
 INSERT INTO `language_text` VALUES ('eng', '_template','login_text','Enter the Login Name (or email) and Password you chose at registration.<br /><br /><br />Not registered yet? <a href=\"register.php\" >Register</a> Or, <a href=\"password_reminder.php\">Forgot your password?</a><br /><br />','2009-01-29 14:24:45','');
-INSERT INTO `language_text` VALUES ('eng', '_template','logout','Logout','2009-01-08 09:31:41','');
+INSERT INTO `language_text` VALUES ('eng', '_template','logout','Logout','2009-10-07 09:55:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','match_all_words','Match All Words','2009-02-04 11:51:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','match_any_word','Match Any Word','2009-02-04 11:51:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','max_file_size','Maximum File Size','2009-10-21 15:25:22','');
 INSERT INTO `language_text` VALUES ('eng', '_template','msg_terms','Message Terms','2009-05-05 09:05:33','');
 INSERT INTO `language_text` VALUES ('eng', '_template','myown_updates','My Own Updates','2009-06-22 14:49:02','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','na','N/A','2009-02-23 14:31:55','');
@@ -224,13 +224,20 @@ INSERT INTO `language_text` VALUES ('eng', '_template','name_in_translated','Lan
 INSERT INTO `language_text` VALUES ('eng', '_template','never','Never','2009-02-05 11:25:19','');
 INSERT INTO `language_text` VALUES ('eng', '_template','new_or_translated','New or Translated Terms','2008-11-27 09:48:36','');
 INSERT INTO `language_text` VALUES ('eng', '_template','new_password','New Password','2009-01-16 10:52:03','');
+INSERT INTO `language_text` VALUES ('eng', '_template','new_terms','New Terms','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','next_chapter','Next Chapter','2009-01-28 15:28:06','');
 INSERT INTO `language_text` VALUES ('eng', '_template','no','No','2009-01-21 12:38:17','');
 INSERT INTO `language_text` VALUES ('eng', '_template','none_found','None Found.','2009-01-21 15:06:01','');
 INSERT INTO `language_text` VALUES ('eng', '_template','not_installed','Not Installed','2009-06-22 14:49:03','');
 INSERT INTO `language_text` VALUES ('eng', '_template','no_results_found','No results found.','2009-01-21 12:38:17','');
+INSERT INTO `language_text` VALUES ('eng', '_template','oauth_authenticate','OAuth User Authenticate','2009-10-19 10:45:38','');
+INSERT INTO `language_text` VALUES ('eng', '_template','oauth_server','OAuth server','2009-10-08 15:42:55','');
+INSERT INTO `language_text` VALUES ('eng', '_template','oauth_server_api','OAuth Server API','2009-10-19 10:45:38','');
+INSERT INTO `language_text` VALUES ('eng', '_template','options','Options','2009-10-07 09:55:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','or','Or','2009-10-22 16:02:10','');
 INSERT INTO `language_text` VALUES ('eng', '_template','overwrite','Overwrite','2009-06-22 14:49:01','');
-INSERT INTO `language_text` VALUES ('eng', '_template','password','Password','2009-01-09 10:40:36','');
-INSERT INTO `language_text` VALUES ('eng', '_template','password_again','New Password Again','2009-01-16 10:52:03','');
+INSERT INTO `language_text` VALUES ('eng', '_template','password','Password','2009-10-07 09:55:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','password_again','Password Again','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','password_blurb','Enter your account\'s email address below and an email with instructions on retrieving your password will be sent to you. The email address must be the same as the one you used for registration.','2009-01-16 13:19:57','');
 INSERT INTO `language_text` VALUES ('eng', '_template','password_changed','Password Changed','2009-02-06 09:08:32','');
 INSERT INTO `language_text` VALUES ('eng', '_template','password_change_confirm','Your password on %s has been changed successfully. Go to %s to login.','2009-01-16 13:17:32','');
@@ -239,18 +246,21 @@ INSERT INTO `language_text` VALUES ('eng', '_template','password_new_blurb','Ent
 INSERT INTO `language_text` VALUES ('eng', '_template','password_old','Old Password','2009-01-16 10:27:02','');
 INSERT INTO `language_text` VALUES ('eng', '_template','password_reminder','Password Reminder','2009-01-07 16:14:08','');
 INSERT INTO `language_text` VALUES ('eng', '_template','password_request2','Dear %1$s,\r\n\r\nYour login name is %1$s.\r\n\r\nTo set a new password, follow the link below.\r\n\r\n%4$s\r\n\r\n(If this link does not take you to the site, copy and paste it into the address bar of your internet browser)\r\n\r\nThe link will become invalid after %3$s days.','2009-01-16 13:05:25','');
+INSERT INTO `language_text` VALUES ('eng', '_template','previous_chapter','Previous Chapter','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','print_version','Print Version','2009-03-24 13:47:37','');
 INSERT INTO `language_text` VALUES ('eng', '_template','privileges','Privileges','2009-02-12 14:15:23','');
-INSERT INTO `language_text` VALUES ('eng', '_template','profile','Profile','2009-01-15 10:02:55','');
+INSERT INTO `language_text` VALUES ('eng', '_template','profile','Profile','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','published_date','Published Date','2009-01-21 12:38:17','');
-INSERT INTO `language_text` VALUES ('eng', '_template','register','Register','2009-01-08 09:30:56','');
-INSERT INTO `language_text` VALUES ('eng', '_template','registration','Registration','2009-01-08 15:51:23','');
-INSERT INTO `language_text` VALUES ('eng', '_template','relative_directory','Directory is relative directory to AFrame root, for example: docs/images/ or tools/tests/. Leave empty if it is AFrame root directory.','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','refresh_image','Refresh Image','2009-10-22 14:02:18','');
+INSERT INTO `language_text` VALUES ('eng', '_template','register','Register','2009-10-07 09:55:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','registration','Registration','2009-10-07 09:55:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','relative_directory','Directory is relative directory to Transformable root, for example: docs/images/ or tools/tests/. Leave empty if it is Transformable root directory.','2009-06-22 14:49:02','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','remove','Remove','2009-01-23 14:04:46','');
 INSERT INTO `language_text` VALUES ('eng', '_template','remove_write_permission','<span style=\"color:red\">Please <strong>REMOVE</strong> write permission on the listed folders and files for your security:</span><p><strong>Note:</strong> To remove permissions on Unix use <kbd>chmod 755</kbd> then the file name..</p>','2009-06-22 14:49:02','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','repair_example','Repair Example','2008-11-24 14:25:44','');
 INSERT INTO `language_text` VALUES ('eng', '_template','replace_file','Replace File','2009-06-22 14:49:02','');
 INSERT INTO `language_text` VALUES ('eng', '_template','required_field','Required Field','2009-01-08 15:51:23','');
-INSERT INTO `language_text` VALUES ('eng', '_template','required_field_text','<div class=\"required\" title=\"Required Field\">*</div> indicates required fields.','2009-01-08 15:51:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','required_field_text','<div class=\"required\" title=\"Required Field\">*</div> indicates required fields.','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','requirement','Requirement','2008-11-24 14:25:44','');
 INSERT INTO `language_text` VALUES ('eng', '_template','reset_filter','Reset Filter','2008-11-27 09:48:36','');
 INSERT INTO `language_text` VALUES ('eng', '_template','result','Result','2008-12-01 14:45:48','');
@@ -258,18 +268,24 @@ INSERT INTO `language_text` VALUES ('eng', '_template','results_found','Results
 INSERT INTO `language_text` VALUES ('eng', '_template','return_to_handbook','Return to Handbook','2009-01-28 15:28:06','');
 INSERT INTO `language_text` VALUES ('eng', '_template','save','Save','2009-01-15 10:01:07','');
 INSERT INTO `language_text` VALUES ('eng', '_template','save_and_close','Save and Close','2009-04-09 11:36:31','');
-INSERT INTO `language_text` VALUES ('eng', '_template','search','Search','2009-01-28 15:28:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','search','Search','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','search_phase','Search Phase','2008-12-01 13:18:57','');
 INSERT INTO `language_text` VALUES ('eng', '_template','search_str','Search String','2009-03-24 13:47:37','');
 INSERT INTO `language_text` VALUES ('eng', '_template','search_text','Search for terms that contains the given string. For example, search for phase \"desc\" returns all terms that contain string \"desc\".','2008-12-02 11:06:56','');
 INSERT INTO `language_text` VALUES ('eng', '_template','select','Select','2009-02-05 14:16:51','');
 INSERT INTO `language_text` VALUES ('eng', '_template','select_all','select/unselect all','2009-01-23 14:04:46','');
-INSERT INTO `language_text` VALUES ('eng', '_template','sent_via_aframe','Sent via an AFrame system at %s','2009-01-09 14:15:29','');
+INSERT INTO `language_text` VALUES ('eng', '_template','sent_via_transformable','Sent via an Transformable system at %s','2009-01-09 14:15:29','');
+INSERT INTO `language_text` VALUES ('eng', '_template','site_name','Site Name','2009-10-21 15:19:36','');
 INSERT INTO `language_text` VALUES ('eng', '_template','sql_statement','SQL Statement','2009-06-22 14:49:02','');
 INSERT INTO `language_text` VALUES ('eng', '_template','status','Status','2009-01-21 12:38:52','');
 INSERT INTO `language_text` VALUES ('eng', '_template','submit','Submit','2008-12-01 13:18:57','');
 INSERT INTO `language_text` VALUES ('eng', '_template','submit_no','No','2009-01-23 11:25:56','');
 INSERT INTO `language_text` VALUES ('eng', '_template','submit_yes','Yes','2009-01-23 11:25:56','');
+INSERT INTO `language_text` VALUES ('eng', '_template','system','System','2009-10-20 14:59:34','');
+INSERT INTO `language_text` VALUES ('eng', '_template','system_settings','System Settings','2009-10-21 10:48:59','');
+INSERT INTO `language_text` VALUES ('eng', '_template','system_update_id','System Update ID','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','term_type','Term Type','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','theme','Theme','2009-10-21 15:19:36','');
 INSERT INTO `language_text` VALUES ('eng', '_template','the_follow_errors_occurred','The following errors occurred:','2008-12-15 09:25:06','');
 INSERT INTO `language_text` VALUES ('eng', '_template','title','Title','2009-01-20 11:45:23','');
 INSERT INTO `language_text` VALUES ('eng', '_template','translated_context','Translated Context','2008-12-01 13:18:57','');
@@ -282,10 +298,10 @@ INSERT INTO `language_text` VALUES ('eng', '_template','updated_terms','Updated
 INSERT INTO `language_text` VALUES ('eng', '_template','updater','Updater','2009-06-22 14:49:01','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','updater_alter_modified_files','The listed files have been modified locally. If you choose to proceed, your local file will be modified. The original\nfile will be backup before the modification. Please note that the modification on your customized code may break your customization.<br>','2009-06-22 14:49:02','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','updater_overwrite_modified_files','The listed files have been modified locally. If you choose to proceed, the update file will be copied to your local machine. \nYou have to manually merge this file and your local copy.<br>','2009-06-22 14:49:02','Updater');
-INSERT INTO `language_text` VALUES ('eng', '_template','updater_show_backup_files','Below is the list of the backup files created by update installation. After ensuring AFrame works properly with the update, you may want to delete these files. If AFrame does not work properly with the update, you can always revert back to the old files by renaming the backup files \nto the original file names,  removing the [update_id].old portion of the file name. <br>','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','updater_show_backup_files','Below is the list of the backup files created by update installation. After ensuring Transformable works properly with the update, you may want to delete these files. If Transformable does not work properly with the update, you can always revert back to the old files by renaming the backup files \nto the original file names,  removing the [update_id].old portion of the file name. <br>','2009-06-22 14:49:02','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','updater_show_update_files','Below is the list of the update files copied to your computer. \nPlease manually merge the change between the update files and your local copy. <br>','2009-06-22 14:49:02','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','updates','Updates','2009-06-22 14:49:01','Updater');
-INSERT INTO `language_text` VALUES ('eng', '_template','update_dependent_update_not_installed','<br><span style=\"color: red\">Warning: There are update dependencies, please install the listed updates first: </span>','2009-06-22 14:49:03','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','update_dependent_update_not_installed','<br /><span style=\"color: red\">Warning: There are update dependencies, please install the listed updates first: </span>','2009-06-22 14:49:03','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','update_local_file_not_exist','Cannot proceed. The listed files are not exist in your local machine. If you renamed them to your copy, in order to proceed, please rename back.<br>','2009-06-22 14:49:02','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','upload','Upload','2009-06-22 14:49:01','');
 INSERT INTO `language_text` VALUES ('eng', '_template','upload_file','Upload File','2009-06-22 14:49:01','');
@@ -294,27 +310,14 @@ INSERT INTO `language_text` VALUES ('eng', '_template','user','User','2009-02-27
 INSERT INTO `language_text` VALUES ('eng', '_template','users','Users','2009-04-14 10:41:51','');
 INSERT INTO `language_text` VALUES ('eng', '_template','user_group','User Group','2009-02-04 11:51:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','user_status','User Status','2009-02-04 11:51:16','');
-INSERT INTO `language_text` VALUES ('eng', '_template','version_not_match','This update is for AFrame version %s. Does not match with your current AFrame version. The installation of it may break AFrame. Are you sure you want to proceed?','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','use_captcha','Allow the use of CAPTCHA','2009-10-21 15:25:18','');
+INSERT INTO `language_text` VALUES ('eng', '_template','version_not_match','This update is for Transformable version %s. Does not match with your current Transformable version. The installation of it may break Transformable. Are you sure you want to proceed?','2009-06-22 14:49:02','Updater');
 INSERT INTO `language_text` VALUES ('eng', '_template','view','View','2009-01-20 11:47:15','');
 INSERT INTO `language_text` VALUES ('eng', '_template','view_message','View Message','2009-06-22 14:49:01','');
 INSERT INTO `language_text` VALUES ('eng', '_template','warning','Warning','2009-05-29 16:19:57','');
-INSERT INTO `language_text` VALUES ('eng', '_template','web_service_api','Web Service API','2009-03-13 11:56:12','');
-INSERT INTO `language_text` VALUES ('eng', '_template','web_service_id','Web Service ID','2009-03-04 13:48:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','web_service_api','Web Service API','2009-10-07 09:55:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','web_service_id','Web Service ID','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','web_site','Web Site','2009-02-06 09:08:32','');
-INSERT INTO `language_text` VALUES ('eng', '_template','welcome','Welcome','2009-01-08 09:30:56','');
+INSERT INTO `language_text` VALUES ('eng', '_template','welcome','Welcome','2009-10-07 09:55:16','');
 INSERT INTO `language_text` VALUES ('eng', '_template','yes','Yes','2009-01-21 12:38:17','');
 INSERT INTO `language_text` VALUES ('eng', '_template','yyyy-mm-dd','yyyy-mm-dd','2009-01-21 15:06:01','');
-INSERT INTO `language_text` VALUES ('eng', '_template','match_all_words','Match All Words','2009-02-04 11:51:16','');
-INSERT INTO `language_text` VALUES ('eng', '_template','match_any_word','Match Any Word','2009-02-04 11:51:16','');
-INSERT INTO `language_text` VALUES ('eng', '_template','next_chapter','Next Chapter','2009-01-28 15:28:06','');
-INSERT INTO `language_text` VALUES ('eng', '_template','print_version','Print Version','2009-03-24 13:47:37','');
-INSERT INTO `language_text` VALUES ('eng', '_template','hide_contents','Hide Contents','2009-03-24 13:47:37','');
-INSERT INTO `language_text` VALUES ('eng', '_template','previous_chapter','Previous Chapter','2009-03-24 13:47:37','');
-INSERT INTO `language_text` VALUES ('eng', '_template','home','Home','2009-03-24 13:47:37','');
-INSERT INTO `language_text` VALUES ('eng', '_template','term_type','Term Type','2009-03-24 13:47:37','');
-INSERT INTO `language_text` VALUES ('eng', '_template','new_terms','New Terms','2009-03-24 13:47:37','');
-INSERT INTO `language_text` VALUES ('eng', '_template','interface_terms','Interface Terms','2009-03-24 13:47:37','');
-INSERT INTO `language_text` VALUES ('eng', '_template','system_update_id','System Update ID','2009-03-24 13:47:37','');
-INSERT INTO `language_text` VALUES ('eng', '_template','available_to','Available To','2009-03-24 13:47:37','');
-INSERT INTO `language_text` VALUES ('eng', '_template','author','Author','2009-03-24 13:47:37','');
-INSERT INTO `language_text` VALUES ('eng', '_template','back_to','Back To:','2009-03-24 13:47:37','');
index 0f94e41..d0da870 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index 52ea0c9..af43c44 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 error_reporting(E_ALL ^ E_NOTICE);
 
-/* aframe default configuration options */
+/* transformable default configuration options */
 /* used on: step3.php, step4.php, step5.php */
 $_defaults['admin_username'] = 'admin';
 $_defaults['admin_password'] = '';
 $_defaults['admin_email'] = '';
 
-$_defaults['site_name'] = 'AFrame';
+$_defaults['site_name'] = 'Transformable';
 $_defaults['header_img'] = '';
 $_defaults['header_logo'] = '';
 $_defaults['home_url'] = '';
index 4993309..5f973ea 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 function write_config_file($filename, $comments) {
        global $config_template;
@@ -51,7 +51,7 @@ function write_config_file($filename, $comments) {
 
 $config_template = "<"."?php 
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -79,17 +79,17 @@ define('DB_PORT',                      '{PORT}');
 define('DB_NAME',                      '{DBNAME}');
 
 /* The prefix to add to table names to avoid conflicts with existing    */
-/* tables. Default: AF_                                                 */
+/* tables. Default: TR_                                                 */
 define('TABLE_PREFIX',                 '{TABLE_PREFIX}');
 
 /* Where the temporary files are located.  This includes all file       */
 /* manager and imported files.  If security is a concern, it is         */
 /* recommended that the temporary directory be moved outside of the web        */
 /* accessible area.                                                                                                            */
-define('AF_TEMP_DIR', '{TEMP_DIR}');
+define('TR_TEMP_DIR', '{TEMP_DIR}');
 
 /* DO NOT ALTER THIS LAST LINE                                          */
-define('AF_INSTALL', TRUE);
+define('TR_INSTALL', TRUE);
 
 ?".">";
 
index 0f66958..db161d0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 ?>
 </div>
 <div style="margin-top: 20px; height: 30px; background-color: #354A81; padding: 10px">&nbsp;</div>
index 4005734..64c556e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 error_reporting(E_ALL ^ E_NOTICE);
 
 if ($step < 3) {
        error_reporting(0);
        include('../include/config.inc.php');
        error_reporting(E_ALL ^ E_NOTICE);
-       if (defined('AF_INSTALL')) {
-               echo 'AFrame appears to have been installed already.';
+       if (defined('TR_INSTALL')) {
+               echo 'Transformable appears to have been installed already.';
                exit;
        }
 }
@@ -35,13 +35,13 @@ $install_steps[7] = array('name' => 'Done!');
 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="utf-8"> 
 <head>
-       <title>AFrame Installation</title>
+       <title>Transformable Installation</title>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
        <link rel="stylesheet" href="stylesheet.css" type="text/css" />
 </head>
 <body>
 <div style="height: 70px; vertical-align: bottom; background-color: #354A81">
-       <h1 id="header">AFrame <?php echo $new_version; ?> Installation</h1>
+       <h1 id="header">Transformable <?php echo $new_version; ?> Installation</h1>
        <img src="../images/logo.png" height="29" width="84" alt="Logo" id="logo" />
 </div>
 <div style="clear: all"></div>
index 9d88267..0783d33 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 //clear session before using it
 unset($_SESSION['user_id']);
@@ -33,9 +33,9 @@ if (isset($_POST['submit'])) {
 
 print_progress($step);
 ?>
-<p>AFrame is licensed under the terms of the <a href="http://aframe.ca/services/licensing_gpl.php" target="_new">GNU General Public License (GPL)</a>, which essentially allows for the free distribution and modification of AFrame. AFrame has its own license that governs its use outside the bounds of the GPL.</p>
+<p>Transformable is licensed under the terms of the <a href="http://transformable.ca/services/licensing_gpl.php" target="_new">GNU General Public License (GPL)</a>, which essentially allows for the free distribution and modification of Transformable. Transformable has its own license that governs its use outside the bounds of the GPL.</p>
 
-<p>If you do not agree to the Terms of Use then you may not install and use AFrame.</p>
+<p>If you do not agree to the Terms of Use then you may not install and use Transformable.</p>
 
 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
        <input type="hidden" name="action" value="process" />
index fd90c26..bdfe423 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 if(isset($_POST['submit'])) {
        unset($errors);
@@ -27,7 +27,7 @@ if(isset($_POST['submit'])) {
                $result = mysql_query($sql, $db);
                $row = mysql_fetch_assoc($result);
                if (version_compare($row['version'], '4.1.10', '>=') === FALSE) {
-                       $errors[] = 'MySQL version '.$row['version'].' was detected. AFrame requires version 4.1.10 or later.';
+                       $errors[] = 'MySQL version '.$row['version'].' was detected. Transformable requires version 4.1.10 or later.';
                }
 
                if (!isset($errors)){
@@ -123,14 +123,14 @@ if (isset($errors)) {
        </tr>
        <tr>
                <td class="row1"><div class="required" title="Required Field">*</div><b><label for="name">Database Name:</label></b><br />
-                       The name of the database to use. It will be created if it does not exist.<br />Default: <kbd>aframe</kbd></td>
-               <td class="row1"><input type="text" name="db_name" id="name" value="<?php if (!empty($_POST['db_name'])) { echo stripslashes(htmlspecialchars($_POST['db_name'])); } else { echo 'aframe'; } ?>" class="formfield" /></td>
+                       The name of the database to use. It will be created if it does not exist.<br />Default: <kbd>transformable</kbd></td>
+               <td class="row1"><input type="text" name="db_name" id="name" value="<?php if (!empty($_POST['db_name'])) { echo stripslashes(htmlspecialchars($_POST['db_name'])); } else { echo 'transformable'; } ?>" class="formfield" /></td>
        </tr>
        <tr>
                <td class="row1"><div class="optional" title="Optional Field">?</div><b><label for="prefix">Table Prefix:</label></b><br />
                        The prefix to add to table names to avoid conflicts with existing tables.<br />
-                       Default: <kbd>AF_</kbd></td>
-               <td class="row1"><input type="text" name="tb_prefix" id="prefix" value="<?php if (!empty($_POST['tb_prefix'])) { echo stripslashes(htmlspecialchars($_POST['tb_prefix'])); } else { echo 'AF_'; } ?>" class="formfield" /></td>
+                       Default: <kbd>TR_</kbd></td>
+               <td class="row1"><input type="text" name="tb_prefix" id="prefix" value="<?php if (!empty($_POST['tb_prefix'])) { echo stripslashes(htmlspecialchars($_POST['tb_prefix'])); } else { echo 'TR_'; } ?>" class="formfield" /></td>
        </tr>
        </table>
 
index 6e5b272..f959af2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 if(isset($_POST['submit']) && ($_POST['action'] == 'process')) {
        unset($errors);
@@ -100,7 +100,7 @@ if (isset($_POST['step1']['old_version']) && $_POST['upgrade_action']) {
 }
 
 ?>
-<script language="JavaScript" src="<?php echo AF_INCLUDE_PATH; ?>../../include/jscripts/sha-1factory.js" type="text/javascript"></script>
+<script language="JavaScript" src="<?php echo TR_INCLUDE_PATH; ?>../../include/jscripts/sha-1factory.js" type="text/javascript"></script>
 
 <script type="text/javascript">
 function encrypt_password()
@@ -131,7 +131,7 @@ function encrypt_password()
                        <th colspan="2">Super Administrator Account</th>
                </tr>
                <tr>
-                       <td colspan="2" class="row1">The Super Administrator account is used for managing AFrame. The Super Administrator can also create additional Administrators each with their own privileges and roles. </td>
+                       <td colspan="2" class="row1">The Super Administrator account is used for managing Transformable. The Super Administrator can also create additional Administrators each with their own privileges and roles. </td>
                </tr>
                <tr>
                        <td class="row1"><div class="required" title="Required Field">*</div><b><label for="username">Administrator Username:</label></b><br />
index 0c10415..4f18deb 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 if (isset($_POST['submit'])) {
        $_POST['content_dir'] = $stripslashes($_POST['content_dir']);
@@ -133,7 +133,7 @@ else
                }
        
                if (strlen($content) == 0) {
-                       $headers[] = 'AFrame-Get: OK';
+                       $headers[] = 'Transformable-Get: OK';
                } else {
                        $headers[] = '';
                }
@@ -151,7 +151,7 @@ else
                }
        }
        
-       if (in_array('AFrame-Get: OK', $headers)) {
+       if (in_array('Transformable-Get: OK', $headers)) {
                $get_file = 'TRUE';
        } else {
                $get_file = 'FALSE';
@@ -180,7 +180,7 @@ else
        <tr>
                <td class="row1"><div class="required" title="Required Field">*</div><strong><label for="contentdir">Temporary Directory</label></strong>
                <p>It has been detected that your webserver does not support the protected temporary directory feature. The temporary directory stores all of the temporary files.</p>
-               <p>Due to that restriction your temporary directory must exist within your AFrame installation directory and cannot be moved. Its path is specified below. Please create it if it does not already exist.</p>
+               <p>Due to that restriction your temporary directory must exist within your Transformable installation directory and cannot be moved. Its path is specified below. Please create it if it does not already exist.</p>
                <br /><br />
                <input type="text" name="content_dir_disabled" id="contentdir" value="<?php if (!empty($_POST['content_dir'])) { echo $_POST['content_dir']; } else { echo $_defaults['content_dir']; } ?>" class="formfield" size="70" disabled="disabled" /></td>
        </tr>
@@ -189,7 +189,7 @@ else
        <table width="80%" class="tableborder" cellspacing="0" cellpadding="1" align="center">  
        <tr>
                <td class="row1"><div class="required" title="Required Field">*</div><strong><label for="contentdir">Temporary Directory</label></strong>
-               <p>Please specify where the temporary directory should be. The temporary directory stores all of the temporary files. As a security measure, the temporary directory should be placed <em>outside</em> of your AFrame installation (for example, to a non-web-accessible location that is not publically available).</p>
+               <p>Please specify where the temporary directory should be. The temporary directory stores all of the temporary files. As a security measure, the temporary directory should be placed <em>outside</em> of your Transformable installation (for example, to a non-web-accessible location that is not publically available).</p>
                
                <p>On a Windows machine, the path should look like <kbd>C:\temp</kbd>, while on Unix it should look like <kbd>/var/temp</kbd>.</p>
                
index 31b52a0..31ffd8c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 if (isset($_POST['submit']) && ($_POST['action'] == 'process')) {
        unset($_POST['submit']);
@@ -61,7 +61,7 @@ if (isset($errors)) {
 } else {
        require('include/config_template.php');
                
-       $comments = '/*'.str_pad(' This file was generated by the AFrame '.$new_version. ' installation script.', 70, ' ').'*/
+       $comments = '/*'.str_pad(' This file was generated by the Transformable '.$new_version. ' installation script.', 70, ' ').'*/
 /*'.str_pad(' File generated '.date('Y-m-d H:m:s'), 70, ' ').'*/';
 
        if (!write_config_file('../include/config.inc.php', $comments)) {
index 199ad6c..544b770 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 require('../svn.php');
 
@@ -74,10 +74,10 @@ if (isset($_POST['submit'])) {
                }
 
 //             $header = "POST /install_log.php HTTP/1.1\r\n";
-//             $header .= "Host: aframe.ca\r\n";
+//             $header .= "Host: transformable.ca\r\n";
 //             $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
 //             $header .= "Content-Length: " . strlen($request) . "\r\n\r\n";
-//             $fp = fsockopen('www.aframe.ca', 80, $errno, $errstr, 30);
+//             $fp = fsockopen('www.transformable.ca', 80, $errno, $errstr, 30);
 //
 //             if ($fp) {
 //                     fputs($fp, $header . $request . "\r\n\r\n");
@@ -106,10 +106,10 @@ print_progress($step);
 <br />
        <table width="80%" class="tableborder" cellspacing="0" cellpadding="1" align="center">  
        <tr>
-               <td class="row1" colspan="2">Submit the following information to the aframe.ca server anonymously? The information we gather helps us plan our development resources to better suit the needs of the community. You may optionally choose to send the URL of your AFrame installation.</td>
+               <td class="row1" colspan="2">Submit the following information to the transformable.ca server anonymously? The information we gather helps us plan our development resources to better suit the needs of the community. You may optionally choose to send the URL of your Transformable installation.</td>
        </tr>
        <tr>
-               <td class="row1" width="20%"><b>AFrame Version:</b></td>
+               <td class="row1" width="20%"><b>Transformable Version:</b></td>
                <td class="row1"><?php echo $new_version; ?> (build <?php echo $build . ' - '.$build_date; ?>)</td>
        </tr>
        <tr>
index 0e6c3c3..ea399d0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 print_progress($step);
 
 ?>
-<p><strong>Congratulations on your installation of AFrame <?php echo $new_version; ?><i>!</i></strong></p>
+<p><strong>Congratulations on your installation of Transformable <?php echo $new_version; ?><i>!</i></strong></p>
 
-<p>For security reasons once you have confirmed that AFrame has installed correctly, you should delete the <kbd>install/</kbd> directory,
+<p>For security reasons once you have confirmed that Transformable has installed correctly, you should delete the <kbd>install/</kbd> directory,
 and reset the permissions on the config.inc.php file to read only.</p>
 
 <br />
 
 <form method="get" action="../index.php">
        <div align="center">
-               <input type="submit" name="submit" value="&raquo; Go To AFrame!" class="button" />
+               <input type="submit" name="submit" value="&raquo; Go To Transformable!" class="button" />
        </div>
 </form>
\ No newline at end of file
index b894f44..f154b9b 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-if (!defined('AF_INCLUDE_PATH')) { exit; }\r
+if (!defined('TR_INCLUDE_PATH')) { exit; }\r
 \r
 error_reporting(E_ALL ^ E_NOTICE);\r
 \r
@@ -18,8 +18,8 @@ if ($step < 5) {
        error_reporting(0);\r
        include('../include/config.inc.php');\r
        error_reporting(E_ALL ^ E_NOTICE);\r
-       if (defined('AF_INSTALL')) {\r
-               include_once(AF_INCLUDE_PATH.'common.inc.php');\r
+       if (defined('TR_INSTALL')) {\r
+               include_once(TR_INCLUDE_PATH.'common.inc.php');\r
                echo print_meta_redirect();\r
                exit;\r
        }\r
index f0817f2..d59abad 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 session_unset();       //clear session before using it
 $_SESSION = array();
 print_progress($step);
@@ -20,7 +20,7 @@ if (isset($_POST['submit']) && (trim($_POST['old_path']) != '')) {
                if ( file_exists('../../'.$_POST['old_path'] . '/include/config.inc.php') ) {
                        
                        require('../../'.$_POST['old_path'] . '/include/constants.inc.php');
-                       $progress[] = 'Found AFrame version <kbd><b>'.VERSION . '</b></kbd> in path <kbd><b>'.$_POST['old_path'].'</b></kbd>.';
+                       $progress[] = 'Found Transformable version <kbd><b>'.VERSION . '</b></kbd> in path <kbd><b>'.$_POST['old_path'].'</b></kbd>.';
 
                        if (!version_compare(VERSION, $new_version, '<')) {
                                $errors[] = 'The version upgrading (<kbd><b>'.VERSION.'</b></kbd>) is not older than the new version (<kbd><b>'.$new_version.'</b></kbd>).';
@@ -77,8 +77,8 @@ if (isset($_POST['submit']) && (trim($_POST['old_path']) != '')) {
                                } else {
                                        echo '<input type="hidden" name="smtp" value="FALSE" />';
                                }
-                               if (defined('AF_FORCE_GET_FILE')) {
-                                       echo '<input type="hidden" name="get_file" value="'.(AF_FORCE_GET_FILE ? 'TRUE' : 'FALSE').'" />';
+                               if (defined('TR_FORCE_GET_FILE')) {
+                                       echo '<input type="hidden" name="get_file" value="'.(TR_FORCE_GET_FILE ? 'TRUE' : 'FALSE').'" />';
                                } else {
                                        echo '<input type="hidden" name="get_file" value="FALSE" />';
                                }
@@ -103,8 +103,8 @@ if (isset($_POST['submit']) && (trim($_POST['old_path']) != '')) {
                                        echo '<input type="hidden" name="contact_email" value="'.$_defaults['admin_email'].'" />';
                                }
 
-                               if (defined('AF_EMAIL_CONFIRMATION')) {
-                                       echo '<input type="hidden" name="email_confirmation" value="'.(AF_EMAIL_CONFIRMATION ? 'TRUE' : 'FALSE').'" />';
+                               if (defined('TR_EMAIL_CONFIRMATION')) {
+                                       echo '<input type="hidden" name="email_confirmation" value="'.(TR_EMAIL_CONFIRMATION ? 'TRUE' : 'FALSE').'" />';
                                } else {
                                        echo '<input type="hidden" name="email_confirmation" value="FALSE" />';
                                }
@@ -123,8 +123,8 @@ if (isset($_POST['submit']) && (trim($_POST['old_path']) != '')) {
                                        echo '<input type="hidden" name="cache_dir" value="' . $_defaults['cache_dir'] . '" />';
                                }
 
-                               if (defined('AF_TEMP_DIR')) {
-                                       echo '<input type="hidden" name="content_dir" value="'.AF_TEMP_DIR.'" />';
+                               if (defined('TR_TEMP_DIR')) {
+                                       echo '<input type="hidden" name="content_dir" value="'.TR_TEMP_DIR.'" />';
                                } else {
                                        echo '<input type="hidden" name="content_dir" value="'.$_defaults['content_dir'].'" />';
                                }
@@ -150,7 +150,7 @@ if (isset($errors)) {
 }
 
 ?>
-<p>Please specify the location of the old AFrame installation.</p>
+<p>Please specify the location of the old Transformable installation.</p>
 
 <ol>
        <li>Release Candidate (RC) installations cannot be upgraded.</li>
@@ -160,7 +160,7 @@ if (isset($errors)) {
        <li>All extra modules will have to be reinstalled before they can be enabled again.</li>
 </ol>
 
-<p>Select the old AFrame installation directory below.</p>
+<p>Select the old Transformable installation directory below.</p>
 
 <?php
        $dirs = scandir('../../');
index c117461..14732ad 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -13,7 +13,7 @@
 ignore_user_abort(true); 
 @set_time_limit(0); 
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 function update_one_ver($up_file) {
        global $progress;
@@ -48,7 +48,7 @@ $_POST['db_password'] = urldecode($_POST['db_password']);
                $result = mysql_query($sql, $db);
                $row = mysql_fetch_assoc($result);
                if (version_compare($row['version'], '4.0.2', '>=') === FALSE) {
-                       $errors[] = 'MySQL version '.$row['version'].' was detected. AFrame requires version 4.0.2 or later.';
+                       $errors[] = 'MySQL version '.$row['version'].' was detected. Transformable requires version 4.0.2 or later.';
                }
 
                if (!$errors) {
@@ -136,7 +136,7 @@ $_POST['db_password'] = urldecode($_POST['db_password']);
 ?>
 <table width="60%" class="tableborder" cellspacing="0" cellpadding="1" border="0" align="center">
 <tr>
-       <td colspan="2" class="row1"><p><small>All installed language packs and changes made to the default English language will be deleted. You will have to re-install any language packs by downloading the latest versions from aframe.ca. Some language packs may not currently be available.</small></p></td>
+       <td colspan="2" class="row1"><p><small>All installed language packs and changes made to the default English language will be deleted. You will have to re-install any language packs by downloading the latest versions from transformable.ca. Some language packs may not currently be available.</small></p></td>
 </tr>
 <tr>
        <td class="row1"><small><b><label for="dir">Continue with the upgrade?</label></b></small></td>
index f78e64d..80f67a4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 $_POST['db_login']    = urldecode($_POST['db_login']);
 $_POST['db_password'] = urldecode($_POST['db_password']);
index 7438050..0da6186 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 if(isset($_POST['submit'])) {
        unset($_POST['submit']);
index 5bc414c..2b7b88d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 print_progress($step);
 
 ?>
-<p><strong>Congratulations on your upgrade of AFrame <?php echo $new_version; ?><i>!</i></strong></p>
+<p><strong>Congratulations on your upgrade of Transformable <?php echo $new_version; ?><i>!</i></strong></p>
 
-<p>It is important that you login as the AFrame administrator to review and set any new System Configuration options.</p>
+<p>It is important that you login as the Transformable administrator to review and set any new System Configuration options.</p>
 <p>For security reasons,  after you have confirmed the installation was successful, it is also important that you delete the <kbd>install/</kbd> directory and reset the<kbd> /include/config.inc.php</kbd> file to read-only. On Linux/Unix systems, use <kbd>chmod a-w include/config.inc.php</kbd>.</p>
-<p>See the <a href="http://www.aframe.ca/forum/18/1.html">Support Forums</a> on <a href="http://www.aframe.ca/aframe/">aframe.ca</a> for additional help &amp; support.</p>
+<p>See the <a href="http://www.transformable.ca/forum/18/1.html">Support Forums</a> on <a href="http://www.transformable.ca/transformable/">transformable.ca</a> for additional help &amp; support.</p>
 
 <br />
 
 <form method="get" action="../checker/index.php">
        <div align="center">
-               <input type="submit" name="submit" value="&raquo; Go To AFrame!" class="button" />
+               <input type="submit" name="submit" value="&raquo; Go To Transformable!" class="button" />
        </div>
 </form>
\ No newline at end of file
index a334afe..996c78a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', 'include/');
+define('TR_INCLUDE_PATH', 'include/');
 error_reporting(E_ALL ^ E_NOTICE);
 
 require('../include/constants.inc.php');
@@ -28,15 +28,15 @@ $session_error = ob_get_contents();
 ob_end_clean();
 error_reporting(E_ALL ^ E_NOTICE);
 
-require(AF_INCLUDE_PATH.'header.inc.php');
+require(TR_INCLUDE_PATH.'header.inc.php');
 $bad  = '<img src="images/bad.gif" width="14" height="13" border="0" alt="Bad" title="Bad" />';
 $good = '<img src="images/feedback.gif" width="16" height="13" border="0" alt="Good" title="Good" />';
 
 $no_good = FALSE;
 $not_as_good = FALSE;
 ?>
-<h3>Welcome to the AFrame Installation</h3>
-<p>This process will step you through your AFrame installation or upgrade.</p>
+<h3>Welcome to the Transformable Installation</h3>
+<p>This process will step you through your Transformable installation or upgrade.</p>
 <p>During this process be sure not to use your browser's <em>Refresh</em> or <em>Reload</em> feature as it may complicate the installation process.</p>
 
 <h4>Requirements</h4>
@@ -227,8 +227,8 @@ $not_as_good = FALSE;
 <?php elseif ($not_as_good): ?>
        <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
        <tr>
-               <td class="row1"><strong>AFrame has indicated that the 'mbstring' library is missing from the PHP.  <br />
-                                               We strongly encourage you to install the 'mbstring' library before continuing, however, if you choose not to install the library from PHP, a third party library within AFrame will be used.  <br/><br/>
+               <td class="row1"><strong>Transformable has indicated that the 'mbstring' library is missing from the PHP.  <br />
+                                               We strongly encourage you to install the 'mbstring' library before continuing, however, if you choose not to install the library from PHP, a third party library within Transformable will be used.  <br/><br/>
                                                For production systems, we strongly encourage you to install the PHP with <a href="http://ca.php.net/manual/en/ref.mbstring.php" target="php_site">mbstring</a> support.  <br/><br/>
                                                You may choose to by pass the mbstring check for the installation at your own risk by clicking <a href="javascript:void(0);" onclick="javascript:document.form.next.disabled=false;">continue</a>.</strong></td>
                <td class="row1"></td>
@@ -252,7 +252,7 @@ $not_as_good = FALSE;
        </table>
        <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
        <tr>
-               <td class="row1"><strong>Upgrading from previous AFrame must have mbstring library installed.</strong></td>
+               <td class="row1"><strong>Upgrading from previous Transformable must have mbstring library installed.</strong></td>
                <td class="row1"></td>
        </tr>
        <tr>
@@ -290,4 +290,4 @@ $not_as_good = FALSE;
        
 <?php endif; ?>
 
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>
index 7845fd5..ef50b28 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,8 +10,8 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', 'include/');
-require(AF_INCLUDE_PATH.'common.inc.php');
+define('TR_INCLUDE_PATH', 'include/');
+require(TR_INCLUDE_PATH.'common.inc.php');
 
 if (!$new_version = $_POST['new_version']) {
        $new_version = $_POST['step2']['new_version'];
@@ -27,42 +27,42 @@ if ($_POST['submit'] == 'I Disagree'){
        Header ("Location: index.php");
 }
 
-require(AF_INCLUDE_PATH.'header.inc.php');
+require(TR_INCLUDE_PATH.'header.inc.php');
 
 /* agree to terms of use */
 if ($step == 1) {
-       require(AF_INCLUDE_PATH.'step1.php');
+       require(TR_INCLUDE_PATH.'step1.php');
 }
 
 /* db */
 if ($step == 2) {
-       require(AF_INCLUDE_PATH.'step2.php');
+       require(TR_INCLUDE_PATH.'step2.php');
 }
 
 /* create admin accounts and sytem preference */
 if ($step == 3) {      
-       require(AF_INCLUDE_PATH.'step3.php');
+       require(TR_INCLUDE_PATH.'step3.php');
 }
 
 /* accounts & preferences */
 if ($step == 4) {      
-       require(AF_INCLUDE_PATH.'step4.php');
+       require(TR_INCLUDE_PATH.'step4.php');
 }
 
 /* directory permissions and generating the config.inc.php file */
 if ($step == 5) {      
-       require(AF_INCLUDE_PATH.'step5.php');
+       require(TR_INCLUDE_PATH.'step5.php');
 }
 
 /* anonymous data collection */
 if ($step == 6) {      
-       require(AF_INCLUDE_PATH.'step6.php');
+       require(TR_INCLUDE_PATH.'step6.php');
 }
 
 /* done! */
 if ($step == 7) {      
-       require(AF_INCLUDE_PATH.'step7.php');
+       require(TR_INCLUDE_PATH.'step7.php');
 }
 
-require(AF_INCLUDE_PATH.'footer.inc.php');
+require(TR_INCLUDE_PATH.'footer.inc.php');
 ?>
\ No newline at end of file
index 5f2a949..f7d7fb6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', 'include/');
+define('TR_INCLUDE_PATH', 'include/');
 error_reporting(E_ALL ^ E_NOTICE);
 
 require('../include/constants.inc.php');
@@ -20,11 +20,11 @@ $new_version = VERSION;
 header('Cache-Control: no-store, no-cache, must-revalidate');
 header('Pragma: no-cache');
 
-require(AF_INCLUDE_PATH.'header.inc.php');
+require(TR_INCLUDE_PATH.'header.inc.php');
 ?>
 
 
-<p>AFrame does not appear to be installed. <a href="index.php">Continue on to the installation</a>.</p>
+<p>Transformable does not appear to be installed. <a href="index.php">Continue on to the installation</a>.</p>
 
 
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index f931b84..1e99e4d 100644 (file)
@@ -1,5 +1,5 @@
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto                     */
index 37379ae..9197d41 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', '../include/');
+define('TR_INCLUDE_PATH', '../include/');
 
 if (isset($_POST['new_version'])) {
        $new_version = $_POST['new_version'];
index 67b2b6e..f3b1d0e 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');\r
-include_once(AF_INCLUDE_PATH.'classes/Language/LanguageEditor.class.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');\r
+include_once(TR_INCLUDE_PATH.'classes/Language/LanguageEditor.class.php');\r
 \r
 $languagesDAO = new LanguagesDAO();\r
 \r
index 16bd971..4611fc3 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');\r
 \r
 if ($_POST['value'] == '')\r
 {\r
        $rtn['status'] = 'fail';\r
-       $rtn['error'][] = _AT('AF_ERROR_EMPTY_FIELD');\r
+       $rtn['error'][] = _AT('TR_ERROR_EMPTY_FIELD');\r
 }\r
 \r
 if (isset($_POST['field']) && isset($_POST['value']) && $_POST['value'] <> '')\r
index 1fdaa91..766e7ba 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
+define('TR_INCLUDE_PATH', '../include/');\r
 \r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/LangCodesDAO.class.php');\r
-include_once(AF_INCLUDE_PATH.'classes/Language/LanguageUtility.class.php');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/LangCodesDAO.class.php');\r
+include_once(TR_INCLUDE_PATH.'classes/Language/LanguageUtility.class.php');\r
 \r
 if (isset($_GET["id"])) \r
 {\r
@@ -53,7 +53,7 @@ else if (isset($_POST['save']))
        else  // create a new guideline\r
        {\r
                if (isset($_POST['locale']) && $_POST['locale'] <> '')\r
-                       $language_code = $_POST['lang_code'] . AF_LANGUAGE_LOCALE_SEP. $_POST['locale'];\r
+                       $language_code = $_POST['lang_code'] . TR_LANGUAGE_LOCALE_SEP. $_POST['locale'];\r
                else\r
                        $language_code = $_POST['lang_code'];\r
 \r
index 4d73ee4..e7cddf9 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
+define('TR_INCLUDE_PATH', '../include/');\r
 \r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');\r
 \r
 if (isset($_REQUEST['id']))\r
 {\r
@@ -45,10 +45,10 @@ $row = $languagesDAO->getByLangCodeAndCharset($lang_code, $charset);
 unset($hidden_vars);\r
 $hidden_vars['id'] = $_REQUEST['id'];\r
 \r
-require(AF_INCLUDE_PATH.'header.inc.php');\r
+require(TR_INCLUDE_PATH.'header.inc.php');\r
 \r
 $msg->addConfirm(array('DELETE_LANG', $row['native_name']), $hidden_vars);\r
 $msg->printConfirm();\r
 \r
-require(AF_INCLUDE_PATH.'footer.inc.php');\r
+require(TR_INCLUDE_PATH.'footer.inc.php');\r
 ?>\r
index f7c2e8c..b9d20ee 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', 'include/');
-require (AF_INCLUDE_PATH.'vitals.inc.php');
+define('TR_INCLUDE_PATH', 'include/');
+require (TR_INCLUDE_PATH.'vitals.inc.php');
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
 
 $usersDAO = new UsersDAO();
 
@@ -31,7 +31,7 @@ if (isset($_POST['submit']))
        }
        else
        {
-               if ($usersDAO->getStatus($user_id) == AF_STATUS_DISABLED)
+               if ($usersDAO->getStatus($user_id) == TR_STATUS_DISABLED)
                {
                        $msg->addError('ACCOUNT_DISABLED');
                }
index cfee0f5..c612eee 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,8 +10,8 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', 'include/');
-require(AF_INCLUDE_PATH.'vitals.inc.php');
+define('TR_INCLUDE_PATH', 'include/');
+require(TR_INCLUDE_PATH.'vitals.inc.php');
 
 // unset all session variables
 session_unset();
index 9a2cdb8..dd6c08a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
-define('AF_INCLUDE_PATH', '../include/');
-require_once(AF_INCLUDE_PATH.'vitals.inc.php');
+define('TR_INCLUDE_PATH', '../include/');
+require_once(TR_INCLUDE_PATH.'vitals.inc.php');
 require_once("common.inc.php");
 
 try {
index 444132d..2dba186 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 //     unset($_SESSION['user_id']);
 //}
 
-define('AF_INCLUDE_PATH', '../include/');
-require (AF_INCLUDE_PATH.'vitals.inc.php');
+define('TR_INCLUDE_PATH', '../include/');
+require (TR_INCLUDE_PATH.'vitals.inc.php');
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
-require_once(AF_INCLUDE_PATH. 'classes/DAO/OAuthServerTokensDAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/OAuthServerTokensDAO.class.php');
 
 $usersDAO = new UsersDAO();
 $oAuthServerTokensDAO = new OAuthServerTokensDAO();
@@ -54,7 +54,7 @@ if (isset($_POST['submit']))
        }
        else
        {
-               if ($usersDAO->getStatus($user_id) == AF_STATUS_DISABLED)
+               if ($usersDAO->getStatus($user_id) == TR_STATUS_DISABLED)
                {
                        $msg->addError('ACCOUNT_DISABLED');
                }
index 5f1b84c..37f5813 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-if (!defined('AF_INCLUDE_PATH')) exit;\r
+if (!defined('TR_INCLUDE_PATH')) exit;\r
 \r
-require_once(AF_INCLUDE_PATH."../oauth/lib/OAuth.php");\r
-require_once(AF_INCLUDE_PATH.'classes/DAO/OAuthServerConsumersDAO.class.php');\r
-require_once(AF_INCLUDE_PATH.'classes/DAO/OAuthServerTokensDAO.class.php');\r
-require_once(AF_INCLUDE_PATH.'classes/Utility.class.php');\r
+require_once(TR_INCLUDE_PATH."../oauth/lib/OAuth.php");\r
+require_once(TR_INCLUDE_PATH.'classes/DAO/OAuthServerConsumersDAO.class.php');\r
+require_once(TR_INCLUDE_PATH.'classes/DAO/OAuthServerTokensDAO.class.php');\r
+require_once(TR_INCLUDE_PATH.'classes/Utility.class.php');\r
 \r
 class MyOAuthServer extends OAuthServer {\r
   public function get_signature_methods() {\r
index 590cdbf..85cc975 100644 (file)
@@ -2,9 +2,9 @@
 // Modified from http://oauth.googlecode.com/svn/code/php/
 
 // vim: foldmethod=marker
-if (!defined('AF_INCLUDE_PATH')) exit;
+if (!defined('TR_INCLUDE_PATH')) exit;
 
-require_once(AF_INCLUDE_PATH. 'classes/DAO/OAuthServerConsumersDAO.class.php');
+require_once(TR_INCLUDE_PATH. 'classes/DAO/OAuthServerConsumersDAO.class.php');
 
 /* Generic exception class
  */
index e0bfa36..8a81a1b 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-require_once(AF_INCLUDE_PATH.'vitals.inc.php');\r
-require_once(AF_INCLUDE_PATH.'classes/Utility.class.php');\r
-require_once(AF_INCLUDE_PATH.'classes/DAO/OAuthServerConsumersDAO.class.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+require_once(TR_INCLUDE_PATH.'vitals.inc.php');\r
+require_once(TR_INCLUDE_PATH.'classes/Utility.class.php');\r
+require_once(TR_INCLUDE_PATH.'classes/DAO/OAuthServerConsumersDAO.class.php');\r
 \r
 if (!isset($_GET['consumer']))\r
 {\r
index 63aca10..f7301ab 100644 (file)
@@ -1,6 +1,6 @@
 <?php
-define('AF_INCLUDE_PATH', '../include/');
-require_once(AF_INCLUDE_PATH.'vitals.inc.php');
+define('TR_INCLUDE_PATH', '../include/');
+require_once(TR_INCLUDE_PATH.'vitals.inc.php');
 require_once("common.inc.php");
 
 try {
index 889792e..36f2f1e 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', 'include/');\r
-require_once(AF_INCLUDE_PATH.'vitals.inc.php');\r
-require_once(AF_INCLUDE_PATH.'classes/Utility.class.php');\r
+define('TR_INCLUDE_PATH', 'include/');\r
+require_once(TR_INCLUDE_PATH.'vitals.inc.php');\r
+require_once(TR_INCLUDE_PATH.'classes/Utility.class.php');\r
 require_once("oauth/lib/OAuth.php");\r
 \r
-require_once(AF_INCLUDE_PATH.'classes/DAO/OAuthClientServersDAO.class.php');\r
-require_once(AF_INCLUDE_PATH.'classes/DAO/OAuthClientTokensDAO.class.php');\r
+require_once(TR_INCLUDE_PATH.'classes/DAO/OAuthClientServersDAO.class.php');\r
+require_once(TR_INCLUDE_PATH.'classes/DAO/OAuthClientTokensDAO.class.php');\r
 \r
 // This part should be moved into include/constants.inc.php\r
-$oauth_server_url = "http://localhost/aframe/";\r
+$oauth_server_url = "http://localhost/transformable/";\r
 \r
 $register_consumer_url = $oauth_server_url.'oauth/register_consumer.php';\r
 $request_token_url = $oauth_server_url.'oauth/request_token.php';\r
 $authorization_url = $oauth_server_url.'oauth/authorization.php';\r
 $access_token_url = $oauth_server_url.'oauth/access_token.php';\r
 \r
-//$client_callback_url = AF_BASE_HREF.'index.php';\r
+//$client_callback_url = TR_BASE_HREF.'index.php';\r
 $client_callback_url = 'http://www.google.ca';\r
 \r
 // initialize oauth client\r
@@ -38,8 +38,8 @@ $expire_threshold = 0;
 $sig_method = new OAuthSignatureMethod_HMAC_SHA1(); // use HMAC signature method as default\r
 \r
 // 1. register consumer\r
-$oauth_server_response = file_get_contents($register_consumer_url.'?consumer='.urlencode(AF_BASE_HREF).'&expire='.$expire_threshold);\r
-debug('register consumer - request: '.$register_consumer_url.'?consumer='.urlencode(AF_BASE_HREF).'&expire='.$expire_threshold);\r
+$oauth_server_response = file_get_contents($register_consumer_url.'?consumer='.urlencode(TR_BASE_HREF).'&expire='.$expire_threshold);\r
+debug('register consumer - request: '.$register_consumer_url.'?consumer='.urlencode(TR_BASE_HREF).'&expire='.$expire_threshold);\r
 debug('register consumer - OAUTH response'.$oauth_server_response);\r
 \r
 // handle OAUTH response on register consumer\r
index 92e4d9e..0d90c91 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', '../include/');
-require(AF_INCLUDE_PATH.'vitals.inc.php');
-require_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
+define('TR_INCLUDE_PATH', '../include/');
+require(TR_INCLUDE_PATH.'vitals.inc.php');
+require_once(TR_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
 
 global $_current_user;
 
 if (!isset($_current_user)) 
 {
-       require(AF_INCLUDE_PATH.'header.inc.php');
+       require(TR_INCLUDE_PATH.'header.inc.php');
        $msg->printInfos('INVALID_USER');
-       require(AF_INCLUDE_PATH.'footer.inc.php');
+       require(TR_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
 
@@ -78,18 +78,18 @@ if (isset($_POST['submit']))
 
        if (!$msg->containsErrors()) 
        {
-               if (defined('AF_EMAIL_CONFIRMATION') && AF_EMAIL_CONFIRMATION) 
+               if (defined('TR_EMAIL_CONFIRMATION') && TR_EMAIL_CONFIRMATION) 
                {
                        //send confirmation email
                        $row    = $_current_user->getInfo();
 
                        if ($row['email'] != $_POST['email']) {
                                $code = substr(md5($_POST['email'] . $row['creation_date'] . $_SESSION['user_id']), 0, 10);
-                               $confirmation_link = AF_BASE_HREF . 'confirm.php?id='.$_SESSION['user_id'].SEP .'e='.urlencode($_POST['email']).SEP.'m='.$code;
+                               $confirmation_link = TR_BASE_HREF . 'confirm.php?id='.$_SESSION['user_id'].SEP .'e='.urlencode($_POST['email']).SEP.'m='.$code;
 
                                /* send the email confirmation message: */
-                               require(AF_INCLUDE_PATH . 'classes/phpmailer/aframemailer.class.php');
-                               $mail = new AFrameMailer();
+                               require(TR_INCLUDE_PATH . 'classes/phpmailer/transformablemailer.class.php');
+                               $mail = new TransformableMailer();
 
                                $mail->From     = $_config['contact_email'];
                                $mail->AddAddress($_POST['email']);
index 3dffa18..035da47 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', '../include/');
-require(AF_INCLUDE_PATH.'vitals.inc.php');
+define('TR_INCLUDE_PATH', '../include/');
+require(TR_INCLUDE_PATH.'vitals.inc.php');
 
 global $_current_user;
 
 if (!isset($_current_user)) {
-       require(AF_INCLUDE_PATH.'header.inc.php');
+       require(TR_INCLUDE_PATH.'header.inc.php');
        $msg->printInfos('INVALID_USER');
-       require(AF_INCLUDE_PATH.'footer.inc.php');
+       require(TR_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
 
@@ -69,9 +69,9 @@ if (isset($_POST['submit'])) {
 
                if (!$_current_user->setPassword($password)) 
                {
-                       require(AF_INCLUDE_PATH.'header.inc.php');
+                       require(TR_INCLUDE_PATH.'header.inc.php');
                        $msg->printErrors('DB_NOT_UPDATED');
-                       require(AF_INCLUDE_PATH.'footer.inc.php');
+                       require(TR_INCLUDE_PATH.'footer.inc.php');
                        exit;
                }
 
index d280642..53d1f1e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', '../include/');
-require(AF_INCLUDE_PATH.'vitals.inc.php');
-require_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
+define('TR_INCLUDE_PATH', '../include/');
+require(TR_INCLUDE_PATH.'vitals.inc.php');
+require_once(TR_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
 
 global $_current_user;
 
 if (!isset($_current_user))
 {
-       require(AF_INCLUDE_PATH.'header.inc.php');
+       require(TR_INCLUDE_PATH.'header.inc.php');
        $msg->printInfos('INVALID_USER');
-       require(AF_INCLUDE_PATH.'footer.inc.php');
+       require(TR_INCLUDE_PATH.'footer.inc.php');
        exit;
 }
 
@@ -31,43 +31,30 @@ if (isset($_POST['cancel'])) {
 }
 
 if (isset($_POST['submit'])) {
-       $missing_fields = array();
-
-       if (!$_POST['first_name']) {
-               $missing_fields[] = _AT('first_name');
-       }
-
-       if (!$_POST['last_name']) {
-               $missing_fields[] = _AT('last_name');
-       }
-
-       $_POST['first_name'] = str_replace('<', '', $_POST['first_name']);
-       $_POST['last_name'] = str_replace('<', '', $_POST['last_name']);
-
+       if (isset($_POST['is_author'])) $is_author = 1;
+       else $is_author = 0;
+               
        $usersDAO = new UsersDAO();
-       if ($usersDAO->getUserByName($_POST['first_name'], $_POST['last_name']))
+       $user_row = $usersDAO->getUserByID($_SESSION['user_id']);
+       
+       if ($usersDAO->Update($_SESSION['user_id'], 
+                         $user_row['user_group_id'],
+                      $user_row['login'],
+                         $user_row['email'],
+                         $_POST['first_name'],
+                         $_POST['last_name'],
+                      $is_author,
+                      $_POST['organization'],
+                      $_POST['phone'],
+                      $_POST['address'],
+                      $_POST['city'],
+                      $_POST['province'],
+                      $_POST['country'],
+                      $_POST['postal_code'],
+                         $_POST['status']))
+       
        {
-               $msg->addError('FIRST_LAST_NAME_UNIQUE');
-       }
-
-       if ($missing_fields) {
-               $missing_fields = implode(', ', $missing_fields);
-               $msg->addError(array('EMPTY_FIELDS', $missing_fields));
-       }
-       $login = strtolower($_POST['login']);
-
-       if (!$msg->containsErrors()) {
-               // insert into the db.
-               if (!$_current_user->setName($addslashes($_POST['first_name']), $addslashes($_POST['last_name']))) 
-               {
-                       $msg->printErrors('DB_NOT_UPDATED');
-                       exit;
-               }
-
                $msg->addFeedback('PROFILE_UPDATED');
-
-               header('Location: index.php');
-               exit;
        }
 }
 
@@ -78,7 +65,6 @@ if (!isset($_POST['submit'])) {
 }
 
 /* template starts here */
-
 $savant->assign('row', $row);
 
 global $onload;
index ddaaae2..5440c0d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', 'include/');
-require(AF_INCLUDE_PATH.'vitals.inc.php');
-include(AF_INCLUDE_PATH."securimage/securimage.php");
+define('TR_INCLUDE_PATH', 'include/');
+require(TR_INCLUDE_PATH.'vitals.inc.php');
+include(TR_INCLUDE_PATH."securimage/securimage.php");
 
 if (isset($_POST['cancel'])) {
        header('Location: index.php');
        exit;
 } else if (isset($_POST['submit'])) {
-       require_once(AF_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
+       require_once(TR_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
        $usersDAO = new UsersDAO();
        
        /* password check: password is verified front end by javascript. here is to handle the errors from javascript */
@@ -35,7 +35,7 @@ if (isset($_POST['cancel'])) {
                }
        }
        //CAPTCHA
-       if ($_config['use_captcha']==AF_STATUS_ENABLED){
+       if ($_config['use_captcha']==TR_STATUS_ENABLED){
                $img = new Securimage();
                $valid = $img->check($_POST['secret']);
                if (!$valid)
@@ -44,17 +44,28 @@ if (isset($_POST['cancel'])) {
 
        if (!$msg->containsErrors())
        {
-               $user_id = $usersDAO->Create(AF_USER_GROUP_USER,
-                  $_POST['login'],
+               if (isset($_POST['is_author'])) $is_author = 1;
+               else $is_author = 0;
+               
+               $user_id = $usersDAO->Create(TR_USER_GROUP_USER,
+                      $_POST['login'],
                              $_POST['form_password_hidden'],
                              $_POST['email'],
                              $_POST['first_name'],
                              $_POST['last_name'],
-                             '');
+                             $is_author,
+                             $_POST['organization'],
+                             $_POST['phone'],
+                             $_POST['address'],
+                             $_POST['city'],
+                             $_POST['province'],
+                             $_POST['country'],
+                             $_POST['postal_code'],
+                             TR_STATUS_ENABLED);
                
                if (is_int($user_id) && $user_id > 0)
                {
-                       if (defined('AF_EMAIL_CONFIRMATION') && AF_EMAIL_CONFIRMATION) {
+                       if (defined('TR_EMAIL_CONFIRMATION') && TR_EMAIL_CONFIRMATION) {
                                $msg->addFeedback('REG_THANKS_CONFIRM');
        
                                $code = substr(md5($_POST['email'] . $now . $user_id), 0, 10);
@@ -62,8 +73,8 @@ if (isset($_POST['cancel'])) {
                                $confirmation_link = $_base_href . 'confirm.php?id='.$user_id.SEP.'m='.$code;
        
                                /* send the email confirmation message: */
-                               require(AF_INCLUDE_PATH . 'classes/phpmailer/aframemailer.class.php');
-                               $mail = new AFrameMailer();
+                               require(TR_INCLUDE_PATH . 'classes/phpmailer/transformablemailer.class.php');
+                               $mail = new TransformableMailer();
        
                                $mail->From     = $_config['contact_email'];
                                $mail->AddAddress($_POST['email']);
@@ -99,7 +110,7 @@ $savant->assign('submit_button_text', _AT('register'));
 $savant->assign('show_user_group', false);
 $savant->assign('show_status', false);
 $savant->assign('show_password', true);
-if ($_config['use_captcha'] == AF_STATUS_ENABLED) $savant->assign('use_captcha', true);
+if ($_config['use_captcha'] == TR_STATUS_ENABLED) $savant->assign('use_captcha', true);
 
 $savant->display('register.tmpl.php');
 
index 43d248c..c79f427 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index cdf87aa..bd212e0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', '../include/');
-include_once(AF_INCLUDE_PATH.'vitals.inc.php');
-include_once(AF_INCLUDE_PATH.'classes/DAO/ConfigDAO.class.php');
-include_once(AF_INCLUDE_PATH.'classes/DAO/ThemesDAO.class.php');
-include_once(AF_INCLUDE_PATH.'classes/Utility.class.php');
+define('TR_INCLUDE_PATH', '../include/');
+include_once(TR_INCLUDE_PATH.'vitals.inc.php');
+include_once(TR_INCLUDE_PATH.'classes/DAO/ConfigDAO.class.php');
+include_once(TR_INCLUDE_PATH.'classes/DAO/ThemesDAO.class.php');
+include_once(TR_INCLUDE_PATH.'classes/Utility.class.php');
 
 // handle submit
 if (isset($_POST['cancel'])) {
index 32f8fe0..37e4959 100644 (file)
@@ -1,6 +1,6 @@
 <?php 
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -13,7 +13,7 @@
 global $onload;
 $onload = 'document.form.password.focus();';
 
-require(AF_INCLUDE_PATH.'header.inc.php'); 
+require(TR_INCLUDE_PATH.'header.inc.php'); 
 ?>
 
 <script language="JavaScript" src="include/jscripts/sha-1factory.js" type="text/javascript"></script>
@@ -38,7 +38,7 @@ function encrypt_password()
 }
 </script>
 
-<div class="center-input-form">
+<div class="input-form">
 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('password_reminder'); ?></legend>
 
        <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
@@ -90,4 +90,4 @@ function encrypt_password()
 </fieldset>
 </div>
 
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index 9a9347c..9fd0f85 100644 (file)
@@ -1,6 +1,6 @@
 <?php  
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index 50598fc..a00e608 100644 (file)
@@ -1,6 +1,6 @@
 <?php 
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index 81f0629..c8673c9 100644 (file)
@@ -1,6 +1,6 @@
 <?php 
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index 53dbd1b..a6883ba 100644 (file)
@@ -1,5 +1,5 @@
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -9,24 +9,6 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-div.center-input-form {
-       width: 95%; 
-       /* border: thin #CCCCCC solid; */
-       margin: 1em;
-       line-height:100%;
-       /* background-color: #F8F8F8; */
-       padding:1em;
-}
-
-div.center-input-form div.row {
-       background-color: #F8F8F8;
-}
-
-div.center-input-form p.submit_button
-{
-       text-align: center;
-}
-
 div.left-col {
        width: 65%; 
        float: left; 
@@ -113,26 +95,3 @@ div.input-form div.buttons input {
 .formfield:focus{
        background-color: #FFDAB9;
 }
-
-div.validator-output-form {
-       width: 95%; 
-       margin-left:1em; 
-       margin-right:auto;
-       padding: 10px 10px 20px 10px;
-       /* border: thin #CCCCCC solid; */
-       margin-bottom: 30px;
-       line-height:100%;
-       /*background-color: #F8F8F8; */
-       float: left; 
-       clear:left;
-}
-
-div.output-form {
-       width: 95%; 
-       margin-left:auto; 
-       margin-right:auto;
-       /* border: thin #CCCCCC solid; */
-       margin-bottom: 30px;
-       line-height:100%;
-       /* background-color: #F8F8F8; */
-}
diff --git a/docs/themes/default/home/index.tmpl.php b/docs/themes/default/home/index.tmpl.php
deleted file mode 100644 (file)
index 7e5663f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php 
-/************************************************************************/
-/* AFrame                                                               */
-/************************************************************************/
-/* Copyright (c) 2009                                                   */
-/* Adaptive Technology Resource Centre / University of Toronto          */
-/*                                                                      */
-/* This program is free software. You can redistribute it and/or        */
-/* modify it under the terms of the GNU General Public License          */
-/* as published by the Free Software Foundation.                        */
-/************************************************************************/
-
-require(AF_INCLUDE_PATH.'header.inc.php'); 
-?>
-
-This is AFrame home page!
-
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index fe0f6fc..7b1babb 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 
 global $languageManager, $_my_uri;
 
@@ -85,7 +85,7 @@ $mtime = $mtime[1] + $mtime[0];
 $endtime = $mtime; 
 $totaltime = ($endtime - $starttime); 
 
-if (defined('AF_DEVEL') && AF_DEVEL) 
+if (defined('TR_DEVEL') && TR_DEVEL) 
 {
        debug(TABLE_PREFIX, 'TABLE_PREFIX');
        debug(DB_NAME, 'DB_NAME');
index b8389ec..3055be6 100644 (file)
@@ -1,6 +1,6 @@
 <?php \r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
index c91ca3f..1e92f82 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index dc1e9a8..e7ce722 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-if (!defined('AF_INCLUDE_PATH')) { exit; }
+if (!defined('TR_INCLUDE_PATH')) { exit; }
 /* available header.tmpl.php variables:
  * $this->lang_code                    the ISO language code
  * SITE_NAME                           the site name from the config file
@@ -122,7 +122,7 @@ $starttime = $mtime;
 <div id="liquid-round"><div class="top"><span></span></div>
 <div class="center-content">
                <div id="logo">
-                       <a href="http://www.atutor.ca/"><img width="100" src="<?php echo $this->base_path.'themes/'.$this->theme; ?>/images/logo.png" height="30" alt="AFrame Logo" style="border:none;" /></a>
+                       <a href="http://www.atutor.ca/"><img width="100" src="<?php echo $this->base_path.'themes/'.$this->theme; ?>/images/logo.png" height="30" alt="Transformable Logo" style="border:none;" /></a>
                </div>
        <div id="banner">
 
@@ -133,20 +133,26 @@ $starttime = $mtime;
           echo _AT('welcome'). ' '.$this->user_name;
         ?>
                                &nbsp;&nbsp;
-                               <a href="<?php echo AF_BASE_HREF; ?>logout.php" ><?php echo _AT('logout'); ?></a>
+                               <a href="<?php echo TR_BASE_HREF; ?>logout.php" ><?php echo _AT('logout'); ?></a>
         <?php
         }
         else
         {
         ?>
-                               <a href="<?php echo AF_BASE_HREF; ?>login.php" ><?php echo _AT('login'); ?></a>
+                               <a href="<?php echo TR_BASE_HREF; ?>login.php" ><?php echo _AT('login'); ?></a>
                                &nbsp;&nbsp;
-                               <a href="<?php echo AF_BASE_HREF; ?>register.php" ><?php echo _AT('register'); ?></a>
+                               <a href="<?php echo TR_BASE_HREF; ?>register.php" ><?php echo _AT('register'); ?></a>
         <?php
         }
         ?>
        </span>
                
+       <div id="versioninfo">
+               <form target="_top" action="<?php echo TR_BASE_HREF; ?>home/search.php" method="get">
+               <input type="text" name="search_text" id="search_text" value="<?php if (isset($_GET['search_text'])) echo $_GET['search_text']; ?>" size="30" />
+               <input type="submit" name="search" value="<?php echo _AT("search"); ?>" />
+               </form>
+       </div>
        </div>
 
        <div class="topnavlistcontainer">
index ae12854..cd87581 100644 (file)
@@ -1,6 +1,6 @@
 <?php  
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index 7c08c70..0ffce29 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -11,9 +11,9 @@
 /************************************************************************/\r
 \r
 global $_custom_css;\r
-$_custom_css = AF_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
+$_custom_css = TR_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
 \r
-include(AF_INCLUDE_PATH.'header.inc.php');\r
+include(TR_INCLUDE_PATH.'header.inc.php');\r
 ?>\r
 <div id="editable_table">\r
 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form1">\r
@@ -109,7 +109,7 @@ jQuery(document).ready(function () {
                listeners: {\r
                        afterFinishEdit : function (newValue, oldValue, editNode, viewNode) {\r
                                if (newValue != oldValue)\r
-                                       rtn = jQuery.post("<?php echo AF_BASE_HREF; ?>language/index_inline_editor_submit.php", { "field":viewNode.id, "value":newValue }, \r
+                                       rtn = jQuery.post("<?php echo TR_BASE_HREF; ?>language/index_inline_editor_submit.php", { "field":viewNode.id, "value":newValue }, \r
                                                          function(data) {handleResponse(data, viewNode, oldValue); }, "json");\r
                        }\r
                }\r
@@ -122,5 +122,5 @@ jQuery(document).ready(function () {
 \r
 <?php \r
 // display footer\r
-include(AF_INCLUDE_PATH.'footer.inc.php');\r
+include(TR_INCLUDE_PATH.'footer.inc.php');\r
 ?>
\ No newline at end of file
index 4301952..af591ba 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -13,7 +13,7 @@
 global $onload;\r
 $onload = "initial();";\r
 \r
-include(AF_INCLUDE_PATH.'header.inc.php');\r
+include(TR_INCLUDE_PATH.'header.inc.php');\r
 ?>\r
 \r
 <form name="input_form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?><?php if (isset($_GET["id"])) echo '?id='.$_GET["id"]; ?>" >\r
@@ -22,7 +22,7 @@ include(AF_INCLUDE_PATH.'header.inc.php');
 <input type="hidden" name="charset" value="<?php echo $this->row["charset"]; ?>" />\r
 <?php }?>\r
 \r
-<div class="center-input-form">\r
+<div class="input-form">\r
 \r
 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('add_edit_language'); ?></legend>\r
        <table class="form-data" align="center">\r
@@ -133,4 +133,4 @@ function togglerowhighlight(obj, boxid) {
 //-->\r
 </script>\r
 \r
-<?php include(AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
+<?php include(TR_INCLUDE_PATH.'footer.inc.php'); ?>\r
index d442a94..f407568 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -13,7 +13,7 @@
 global $onload;\r
 $onload = 'document.form.form_login.focus();';\r
 \r
-include(AF_INCLUDE_PATH.'header.inc.php');\r
+include(TR_INCLUDE_PATH.'header.inc.php');\r
 ?>\r
 \r
 <script language="JavaScript" src="include/jscripts/sha-1factory.js" type="text/javascript"></script>\r
@@ -38,7 +38,7 @@ function encrypt_password() {
 <?php }?>\r
 <input type="hidden" name="form_password_hidden" value="" />\r
 \r
-       <div class="center-input-form">\r
+       <div class="input-form">\r
                <fieldset class="group_form"><legend class="group_form"><?php echo _AT('login') ;?></legend>\r
                        <table  align="center" width="90%">\r
                                <tr>\r
@@ -55,7 +55,7 @@ function encrypt_password() {
                                        <td><input type="password" class="formfield" name="form_password" size="50" id="pass" style="max-width:70%;width:70%;"/></td>\r
                                </tr>\r
 \r
-                               <tr>\r
+                               <tr align="center">\r
                                        <td colspan="2">\r
                                        <p class="submit_button">\r
                                                <input type="submit" name="submit" value="<?php echo _AT('login'); ?>" class="submit" onclick="return encrypt_password();" /> \r
@@ -67,4 +67,4 @@ function encrypt_password() {
        </div>\r
 </form>\r
 \r
-<?php include(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php include(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index be75984..bed68aa 100644 (file)
@@ -1,6 +1,6 @@
 <?php 
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 global $onload;
 $onload = 'document.form.form_email.focus();';
 
-require(AF_INCLUDE_PATH.'header.inc.php'); 
+require(TR_INCLUDE_PATH.'header.inc.php'); 
 ?>
 
-<div class="center-input-form">
+<div class="input-form">
 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('password_reminder'); ?></legend>
 
        <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
@@ -53,4 +53,4 @@ require(AF_INCLUDE_PATH.'header.inc.php');
 </fieldset>
 </div>
 
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index 48784cf..f00d207 100644 (file)
@@ -1,6 +1,6 @@
 <?php 
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,7 +10,7 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-require(AF_INCLUDE_PATH.'header.inc.php'); 
+require(TR_INCLUDE_PATH.'header.inc.php'); 
 
-require(AF_INCLUDE_PATH.'footer.inc.php'); 
+require(TR_INCLUDE_PATH.'footer.inc.php'); 
 ?>
\ No newline at end of file
index 5108bba..a606b0d 100644 (file)
@@ -1,6 +1,6 @@
 <?php 
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -12,7 +12,7 @@
 
 global $onload;
 $onload = 'document.form.form_password.focus();';
-require(AF_INCLUDE_PATH.'header.inc.php'); 
+require(TR_INCLUDE_PATH.'header.inc.php'); 
 
 ?>
 
@@ -26,7 +26,7 @@ function encrypt_password()
 }
 </script>
 
-<div class="center-input-form">
+<div class="input-form">
 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('change_email'); ?></legend>
 
        <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
@@ -67,4 +67,4 @@ function encrypt_password()
 </fieldset>
 </div>
 
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index 7e817d7..0ca19fc 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -13,7 +13,7 @@
 global $onload;
 $onload = 'document.form.old_password.focus();';
 
-require(AF_INCLUDE_PATH.'header.inc.php');
+require(TR_INCLUDE_PATH.'header.inc.php');
 ?>
 
 <script
@@ -43,7 +43,7 @@ function encrypt_password()
 }
 </script>
 
-<div class="center-input-form">
+<div class="input-form">
 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('change_password'); ?></legend>
 
        <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
@@ -104,4 +104,4 @@ function encrypt_password()
 </fieldset>
 </div>
 
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index 8d9755e..5e3b478 100644 (file)
@@ -1,6 +1,6 @@
 <?php 
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-require(AF_INCLUDE_PATH.'header.inc.php'); 
+// show or hide the author information based on the status of the checkbox "author content" 
+global $onload;
+$onload = "if (jQuery('#is_author').attr('checked')) jQuery('#table_is_author').show(); else jQuery('#table_is_author').hide();";
+
+require(TR_INCLUDE_PATH.'header.inc.php'); 
 ?>
 
 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form">
 <input name="password_error" type="hidden" />
 <input type="hidden" name="form_password_hidden" value="" />
 
-<div class="center-input-form">
+<div class="input-form">
 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('edit_profile'); ?></legend>
 
        <table class="form-data" align="center">
+               <tr align="center"><td>
+               <table>
                <tr>
                        <td colspan="2" align="left"><?php echo _AT('required_field_text') ;?><br /><br /><br /></td>
                </tr>
 
                <tr>
                        <th align="left"><?php echo _AT('login_name'); ?>:</th>
-                       <td align="left"><?php echo stripslashes(htmlspecialchars($_POST['login'])); ?></td>
+                       <td align="left"><?php echo stripslashes(htmlspecialchars($this->row['login'])); ?></td>
                </tr>
 
                <tr>
                        <th align="left"><?php echo _AT('web_service_id'); ?>:</th>
-                       <td align="left"><?php echo $_POST['web_service_id']; ?></td>
+                       <td align="left"><?php echo $this->row['web_service_id']; ?></td>
                </tr>
 
                <tr><td><br /></td></tr>
@@ -47,6 +53,56 @@ require(AF_INCLUDE_PATH.'header.inc.php');
                        <td align="left"><input id="last_name" name="last_name" type="text" value="<?php echo stripslashes(htmlspecialchars($_POST['last_name'])); ?>" /></td>
                </tr>
 
+               <tr>
+                       <td colspan="2">
+                               <input type="checkbox" name="is_author" id="is_author" <?php if (isset($_POST['is_author']) || (!isset($_POST['is_author']) && $this->user_row['is_author']==1)) echo 'checked="checked"'; ?> onclick="if (this.checked) jQuery('#table_is_author').show('slow'); else jQuery('#table_is_author').hide('slow');" /><label for="is_author"><?php echo _AT('is_author'); ?></label> 
+                       </td>
+               </tr>
+               </table>
+               </td></tr>
+               
+               <tr align="center"><td>
+               <table id="table_is_author">
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="organization"><?php echo _AT('organization'); ?></label>:</td>
+                       <td align="left"><input id="organization" name="organization" type="text" size="50" maxlength="100" value="<?php if (isset($_POST['organization'])) echo stripslashes(htmlspecialchars($_POST['organization'])); else echo stripslashes(htmlspecialchars($this->user_row['organization'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="phone"><?php echo _AT('phone'); ?></label>:</td>
+                       <td align="left"><input id="phone" name="phone" type="text" size="30" maxlength="30" value="<?php if (isset($_POST['phone'])) echo stripslashes(htmlspecialchars($_POST['phone'])); else echo stripslashes(htmlspecialchars($this->user_row['phone'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="address"><?php echo _AT('address'); ?></label>:</td>
+                       <td align="left"><input id="address" name="address" type="text" size="50" maxlength="100" value="<?php if (isset($_POST['address'])) echo stripslashes(htmlspecialchars($_POST['address'])); else echo stripslashes(htmlspecialchars($this->user_row['address'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="city"><?php echo _AT('city'); ?></label>:</td>
+                       <td align="left"><input id="city" name="city" type="text" size="30" maxlength="30" value="<?php if (isset($_POST['city'])) echo stripslashes(htmlspecialchars($_POST['city'])); else echo stripslashes(htmlspecialchars($this->user_row['city'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="province"><?php echo _AT('province'); ?></label>:</td>
+                       <td align="left"><input id="province" name="province" type="text" size="30" maxlength="30" value="<?php if (isset($_POST['province'])) echo stripslashes(htmlspecialchars($_POST['province'])); else echo stripslashes(htmlspecialchars($this->user_row['province'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="country"><?php echo _AT('country'); ?></label>:</td>
+                       <td align="left"><input id="country" name="country" type="text" size="30" maxlength="30" value="<?php if (isset($_POST['country'])) echo stripslashes(htmlspecialchars($_POST['country'])); else echo stripslashes(htmlspecialchars($this->user_row['country'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="postal_code"><?php echo _AT('postal_code'); ?></label>:</td>
+                       <td align="left"><input id="postal_code" name="postal_code" type="text" size="10" maxlength="10" value="<?php if (isset($_POST['postal_code'])) echo stripslashes(htmlspecialchars($_POST['postal_code'])); else echo stripslashes(htmlspecialchars($this->user_row['postal_code'])); ?>" /></td>
+               </tr>
+
+               </table>
+               </td></tr>
+               
+               <tr align="center"><td>
+               <table>
                <tr>
                        <td colspan="2">
                        <p class="submit_button">
@@ -55,10 +111,12 @@ require(AF_INCLUDE_PATH.'header.inc.php');
                        </p>
                        </td>
                </tr>
+               </table>
+               </td></tr>
        </table>
 </fieldset>
 
 </div>
 </form>
 
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index dbb10f1..dee84e6 100644 (file)
@@ -1,5 +1,5 @@
 \r
-Theme: AFrame Default Theme\r
+Theme: Transformable Default Theme\r
 Date:          December 2008\r
 \r
 Installing:     See section "Installing a New Theme" in the themes_readme.txt file located in the themes/ top directory.\r
index c849ca4..0b11795 100644 (file)
@@ -1,6 +1,6 @@
 <?php 
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
  * title: page title
  * submit_button_text: button text for submit button. "Register" at registration, "Save" at admin creating/editing user
  */
-$default_user_group_id = AF_USER_GROUP_USER;
+$default_user_group_id = TR_USER_GROUP_USER;
 
-require(AF_INCLUDE_PATH.'header.inc.php'); 
+// show or hide the author information based on the status of the checkbox "author content" 
+global $onload;
+$onload = "if (jQuery('#is_author').attr('checked')) jQuery('#table_is_author').show(); else jQuery('#table_is_author').hide();";
+
+require(TR_INCLUDE_PATH.'header.inc.php'); 
 ?>
 
 <script language="JavaScript" src="include/jscripts/sha-1factory.js" type="text/javascript"></script>
@@ -59,10 +63,12 @@ function encrypt_password()
 <input name="password_error" type="hidden" />
 <input type="hidden" name="form_password_hidden" value="" />
 
-<div class="center-input-form">
+<div class="input-form">
 <fieldset class="group_form"><legend class="group_form"><?php echo $this->title; ?></legend>
 
        <table class="form-data" align="center">
+       <tr align="center"><td>
+               <table>
                <tr>
                        <td colspan="2" align="left"><br/><?php echo _AT('required_field_text') ;?><br /><br /><br/></td>
                </tr>
@@ -118,9 +124,9 @@ function encrypt_password()
                </tr>
                <tr>
                        <td>
-                       <label for="secret"><img src="<?php echo AF_INCLUDE_PATH; ?>securimage/securimage_show.php?sid=<?php echo md5(uniqid(time())); ?>" id="simage" align="left" /></label>
-                       <a href="<?php echo AF_INCLUDE_PATH; ?>securimage/securimage_play.php" title="<?php echo _AT('audible_captcha'); ?>"><img src="<?php echo AF_INCLUDE_PATH; ?>securimage/images/audio_icon.gif" alt="<?php echo _AT('audible_captcha'); ?>" onclick="this.blur()" align="top" border="0"></a><br>
-                       <a href="#" title="<?php echo _AT('refresh_image'); ?>" onclick="document.getElementById('simage').src = '<?php echo AF_INCLUDE_PATH; ?>securimage/securimage_show.php?sid=' + Math.random(); return false"><img src="<?php echo AF_INCLUDE_PATH; ?>securimage/images/refresh.gif" alt="<?php echo _AT('refresh_image'); ?>" onclick="this.blur()" align="bottom" border="0"></a>
+                       <label for="secret"><img src="<?php echo TR_INCLUDE_PATH; ?>securimage/securimage_show.php?sid=<?php echo md5(uniqid(time())); ?>" id="simage" align="left" /></label>
+                       <a href="<?php echo TR_INCLUDE_PATH; ?>securimage/securimage_play.php" title="<?php echo _AT('audible_captcha'); ?>"><img src="<?php echo TR_INCLUDE_PATH; ?>securimage/images/audio_icon.gif" alt="<?php echo _AT('audible_captcha'); ?>" onclick="this.blur()" align="top" border="0"></a><br>
+                       <a href="#" title="<?php echo _AT('refresh_image'); ?>" onclick="document.getElementById('simage').src = '<?php echo TR_INCLUDE_PATH; ?>securimage/securimage_show.php?sid=' + Math.random(); return false"><img src="<?php echo TR_INCLUDE_PATH; ?>securimage/images/refresh.gif" alt="<?php echo _AT('refresh_image'); ?>" onclick="this.blur()" align="bottom" border="0"></a>
                        </td>
                        <td><input id="secret" name="secret" type="text" size="6" maxlength="6" value="" /></td>
                </tr>
@@ -148,10 +154,10 @@ function encrypt_password()
                <tr>
                        <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><?php echo _AT('status'); ?>:</td>
                        <td align="left">
-                               <input type="radio" name="status" id="statusD" value="<?php echo AF_STATUS_DISABLED; ?>" <?php if ((isset($_POST['status']) && $_POST['status']==0) || (!isset($_POST['status']) && $this->user_row['status']==AF_STATUS_DISABLED)) echo 'checked="checked"'; ?> /><label for="statusD"><?php echo _AT('disabled'); ?></label> 
-                               <input type="radio" name="status" id="statusE" value="<?php echo AF_STATUS_ENABLED; ?>" <?php if ((isset($_POST['status']) && $_POST['status']==1) || (!isset($_POST['status']) && $this->user_row['status']==AF_STATUS_ENABLED)) echo 'checked="checked"'; ?> /><label for="statusE"><?php echo _AT('enabled'); ?></label>
-                               <?php if (defined('AF_EMAIL_CONFIRMATION') && AF_EMAIL_CONFIRMATION) {?>
-                               <input type="radio" name="status" id="statusU" value="<?php echo AF_STATUS_UNCONFIRMED; ?>" <?php if ((isset($_POST['status']) && $_POST['status']==1) || (!isset($_POST['status']) && $this->user_row['status']==AF_STATUS_UNCONFIRMED)) echo 'checked="checked"'; ?> /><label for="statusU"><?php echo _AT('enabled'); ?></label>
+                               <input type="radio" name="status" id="statusD" value="<?php echo TR_STATUS_DISABLED; ?>" <?php if ((isset($_POST['status']) && $_POST['status']==0) || (!isset($_POST['status']) && $this->user_row['status']==TR_STATUS_DISABLED)) echo 'checked="checked"'; ?> /><label for="statusD"><?php echo _AT('disabled'); ?></label> 
+                               <input type="radio" name="status" id="statusE" value="<?php echo TR_STATUS_ENABLED; ?>" <?php if ((isset($_POST['status']) && $_POST['status']==1) || (!isset($_POST['status']) && $this->user_row['status']==TR_STATUS_ENABLED)) echo 'checked="checked"'; ?> /><label for="statusE"><?php echo _AT('enabled'); ?></label>
+                               <?php if (defined('TR_EMAIL_CONFIRMATION') && TR_EMAIL_CONFIRMATION) {?>
+                               <input type="radio" name="status" id="statusU" value="<?php echo TR_STATUS_UNCONFIRMED; ?>" <?php if ((isset($_POST['status']) && $_POST['status']==1) || (!isset($_POST['status']) && $this->user_row['status']==TR_STATUS_UNCONFIRMED)) echo 'checked="checked"'; ?> /><label for="statusU"><?php echo _AT('enabled'); ?></label>
                                <?php }?>
                        </td>
                </tr>
@@ -164,6 +170,56 @@ function encrypt_password()
                </tr>
                <?php }?>
 
+               <tr>
+                       <td colspan="2">
+                               <input type="checkbox" name="is_author" id="is_author" <?php if (isset($_POST['is_author']) || (!isset($_POST['is_author']) && $this->user_row['is_author']==1)) echo 'checked="checked"'; ?> onclick="if (this.checked) jQuery('#table_is_author').show('slow'); else jQuery('#table_is_author').hide('slow');" /><label for="is_author"><?php echo _AT('is_author'); ?></label> 
+                       </td>
+               </tr>
+               </table>
+               </td></tr>
+               
+               <tr align="center"><td>
+               <table id="table_is_author">
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="organization"><?php echo _AT('organization'); ?></label>:</td>
+                       <td align="left"><input id="organization" name="organization" type="text" size="50" maxlength="100" value="<?php if (isset($_POST['organization'])) echo stripslashes(htmlspecialchars($_POST['organization'])); else echo stripslashes(htmlspecialchars($this->user_row['organization'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="phone"><?php echo _AT('phone'); ?></label>:</td>
+                       <td align="left"><input id="phone" name="phone" type="text" size="30" maxlength="30" value="<?php if (isset($_POST['phone'])) echo stripslashes(htmlspecialchars($_POST['phone'])); else echo stripslashes(htmlspecialchars($this->user_row['phone'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="address"><?php echo _AT('address'); ?></label>:</td>
+                       <td align="left"><input id="address" name="address" type="text" size="50" maxlength="100" value="<?php if (isset($_POST['address'])) echo stripslashes(htmlspecialchars($_POST['address'])); else echo stripslashes(htmlspecialchars($this->user_row['address'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="city"><?php echo _AT('city'); ?></label>:</td>
+                       <td align="left"><input id="city" name="city" type="text" size="30" maxlength="30" value="<?php if (isset($_POST['city'])) echo stripslashes(htmlspecialchars($_POST['city'])); else echo stripslashes(htmlspecialchars($this->user_row['city'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="province"><?php echo _AT('province'); ?></label>:</td>
+                       <td align="left"><input id="province" name="province" type="text" size="30" maxlength="30" value="<?php if (isset($_POST['province'])) echo stripslashes(htmlspecialchars($_POST['province'])); else echo stripslashes(htmlspecialchars($this->user_row['province'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="country"><?php echo _AT('country'); ?></label>:</td>
+                       <td align="left"><input id="country" name="country" type="text" size="30" maxlength="30" value="<?php if (isset($_POST['country'])) echo stripslashes(htmlspecialchars($_POST['country'])); else echo stripslashes(htmlspecialchars($this->user_row['country'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="postal_code"><?php echo _AT('postal_code'); ?></label>:</td>
+                       <td align="left"><input id="postal_code" name="postal_code" type="text" size="10" maxlength="10" value="<?php if (isset($_POST['postal_code'])) echo stripslashes(htmlspecialchars($_POST['postal_code'])); else echo stripslashes(htmlspecialchars($this->user_row['postal_code'])); ?>" /></td>
+               </tr>
+
+               </table>
+               </td></tr>
+               
+               <tr align="center"><td>
+               <table>
                <tr>
                        <td colspan="2">
                        <p class="submit_button">
@@ -172,10 +228,12 @@ function encrypt_password()
                        </p>
                        </td>
                </tr>
+               </table>
+               </td></tr>
        </table>
 </fieldset>
 
 </div>
 </form>
 
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index 70fc236..ba4cc46 100644 (file)
@@ -1,5 +1,5 @@
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto                     */\r
index c624282..8eb9114 100644 (file)
@@ -1,5 +1,5 @@
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto                     */
@@ -16,14 +16,13 @@ html,body{
 
 /* main body attributes */
 body {
-       font-family: Verdana, Helevetica, Arial, sans-serif;
+       font-family: Arial, sans-serif;
        margin:0px;
-       font-size: small;
        background-color: white;
 }
 
 p {
-    text-align: justify;
+    /*text-align: justify;*/
     line-height: 150%;
        font-size: 1em;
 }
@@ -218,33 +217,26 @@ div.paging {
    width: 100%;
    text-align: center;
    margin: 0.5em auto;
+  font-size: smaller;
 }
 div.paging ul {
    list-style: none;
    display: inline;
    padding: 0px;
-   border: 1px solid #000;
 }
 div.paging li { 
        display: inline; 
-       padding-left: 2px; 
-       padding-right: 2px;
-       padding-top: 0px;
-       padding-bottom: 0px;
+       padding-left: 1px; 
+       padding-right: 1px;
 }
 
 div.paging li a {
-       text-decoration: none;
        padding-left: 4px;
        padding-right: 4px;
-       border-left: 1px solid white;
-       border-right: 1px solid white;
 }
 
 div.paging li a:hover, div.paging li a.current {
-   background-color: #F7F3ED;
-   border-left: 1px solid #000;
-   border-right: 1px solid #000;
+   color: #FFA20C;
 }
 
 /***************************************************************/
@@ -330,7 +322,7 @@ table.tabbed-table a, table.tabbed-table a:visited, table.tabbed-table a:hover {
        color: white; background-color: #365D95
 }
 #banner #logininfo {
-       font-size: 8pt
+       font-size: small
        font-weight:bold;
        margin-left: 10px; 
        margin-top: 2px; 
@@ -344,7 +336,7 @@ table.tabbed-table a, table.tabbed-table a:visited, table.tabbed-table a:hover {
 }
 #banner #versioninfo {
        font-size: 8pt; 
-       margin-right: 10px; 
+       margin-right: 500px; 
        margin-top: 2px; 
        position: absolute; 
        right: 0px; 
@@ -901,7 +893,7 @@ ul.topnavlist li a.selected {
 fieldset.group_form{
        margin:.5em;
        border:thin #6D7B8D solid;
-       min-height: 170px;
+       min-height: 100px;
        padding:.5em;
        background-color:#F8F8F8;;
 
@@ -1008,7 +1000,7 @@ pre.badgeSnippet {
 /* Liquid Round theme elements */
 
 #liquid-round {
-        width:85em;
+    /*width:85em;*/
        margin:0px auto;
        background:#fff url(images/leftside.gif) repeat-y left top;
 }
@@ -1116,3 +1108,28 @@ ul.navigation li a.active span{
        padding-right: 10px;
 }
 
+/* course search result display */
+.results {
+       margin: 0 16px;
+       padding-right: 1em;
+}
+
+li.course {
+       font-family:arial,sans-serif;
+       font-size:small;
+       margin:1em 0;
+}
+
+ol li {
+       list-style-image:none;
+       list-style-position:outside;
+       list-style-type:none;
+}
+
+.results h3 {
+       display:inline;
+       font-size:medium;
+       font-weight:normal;
+       margin:0;
+       padding:0;
+}
index dcba0b8..f67968d 100644 (file)
@@ -1,6 +1,6 @@
 <?php 
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 global $onload;
 $onload = 'document.form.site_name.focus();';
 
-require(AF_INCLUDE_PATH.'header.inc.php'); 
+require(TR_INCLUDE_PATH.'header.inc.php'); 
 ?>
 
 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form">
 
-<div class="center-input-form">
+<div class="input-form">
 <fieldset class="group_form"><legend class="group_form"><?php echo $this->title; ?></legend>
 
        <table class="form-data" align="center">
@@ -95,8 +95,8 @@ require(AF_INCLUDE_PATH.'header.inc.php');
                <tr>
                        <td align="left"><?php echo _AT('use_captcha'); ?>:</td>
                        <td align="left">
-                               <input type="radio" name="use_captcha" id="statusD" value="<?php echo AF_STATUS_DISABLED; ?>" <?php if ((isset($_POST['use_captcha']) && $_POST['use_captcha']==AF_STATUS_DISABLED) || (!isset($_POST['use_captcha']) && $this->config['use_captcha']==AF_STATUS_DISABLED)) echo 'checked="checked"'; ?> /><label for="statusD"><?php echo _AT('disabled'); ?></label> 
-                               <input type="radio" name="use_captcha" id="statusE" value="<?php echo AF_STATUS_ENABLED; ?>" <?php if ((isset($_POST['use_captcha']) && $_POST['use_captcha']==AF_STATUS_ENABLED) || (!isset($_POST['use_captcha']) && $this->config['use_captcha']==AF_STATUS_ENABLED)) echo 'checked="checked"'; ?> /><label for="statusE"><?php echo _AT('enabled'); ?></label>
+                               <input type="radio" name="use_captcha" id="statusD" value="<?php echo TR_STATUS_DISABLED; ?>" <?php if ((isset($_POST['use_captcha']) && $_POST['use_captcha']==TR_STATUS_DISABLED) || (!isset($_POST['use_captcha']) && $this->config['use_captcha']==TR_STATUS_DISABLED)) echo 'checked="checked"'; ?> /><label for="statusD"><?php echo _AT('disabled'); ?></label> 
+                               <input type="radio" name="use_captcha" id="statusE" value="<?php echo TR_STATUS_ENABLED; ?>" <?php if ((isset($_POST['use_captcha']) && $_POST['use_captcha']==TR_STATUS_ENABLED) || (!isset($_POST['use_captcha']) && $this->config['use_captcha']==TR_STATUS_ENABLED)) echo 'checked="checked"'; ?> /><label for="statusE"><?php echo _AT('enabled'); ?></label>
                        </td>
                </tr>
                
@@ -148,4 +148,4 @@ require(AF_INCLUDE_PATH.'header.inc.php');
 </div>
 </form>
 
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index b085c3c..5e07d18 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -18,8 +18,8 @@ $_theme['name'] = 'Default 0.1';
 /* The theme's version number. */
 $_theme['version'] = '0.1';
 
-/* Which version of AFrame is this theme intended for. */
-$_theme['aframe-version'] = '0.1';
+/* Which version of Transformable is this theme intended for. */
+$_theme['transformable-version'] = '0.1';
 
 /* author information */
 $_theme['author_name']  = 'Transformable';
index bc1324a..51964fb 100644 (file)
@@ -4,6 +4,6 @@
        <title>Default</title>\r
        <version>0.1</version>\r
        <last_updated>2008-12-12</last_updated>\r
-       <extra_info>This is AFrame default theme.</extra_info>\r
+       <extra_info>This is Transformable default theme.</extra_info>\r
 </theme>\r
 \r
index 8258ff9..9e8f964 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-//include(AF_INCLUDE_PATH.'header.inc.php');\r
+//include(TR_INCLUDE_PATH.'header.inc.php');\r
 global $dependent_patches;\r
 \r
 if (isset($this->javascript_run_now)) echo $this->javascript_run_now;\r
 ?>\r
 \r
-<div class="center-input-form">\r
+<div class="input-form">\r
 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">\r
 <fieldset class="group_form"><legend class="group_form"><?php echo _AT("updates"); ?></legend>\r
 \r
@@ -107,7 +107,7 @@ if (isset($this->javascript_run_now)) echo $this->javascript_run_now;
 </form>\r
 </div>\r
 \r
-<div class="center-input-form">\r
+<div class="input-form">\r
 <form name="frm_upload" enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" >\r
        <fieldset class="group_form"><legend class="group_form"><?php echo _AT("upload"); ?></legend>\r
        \r
@@ -152,4 +152,4 @@ function validate_filename() {
 //-->\r
 </script>\r
 \r
-<?php require (AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
+<?php require (TR_INCLUDE_PATH.'footer.inc.php'); ?>\r
index a0c0d41..9939415 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /************************************************************************/\r
 \r
 global $_custom_css;\r
-$_custom_css = AF_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
+$_custom_css = TR_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
 \r
-require(AF_INCLUDE_PATH.'header.inc.php'); \r
+require(TR_INCLUDE_PATH.'header.inc.php'); \r
 ?>\r
 \r
-<div class="center-input-form">\r
+<div class="input-form">\r
 <fieldset class="group_form"><legend class="group_form"><?php echo _AT("myown_updates"); ?></legend>\r
 \r
 <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">\r
@@ -26,7 +26,7 @@ require(AF_INCLUDE_PATH.'header.inc.php');
 <tr>\r
        <th scope="col">&nbsp;</th>\r
        <th scope="col"><?php echo _AT('system_update_id'); ?></th>\r
-       <th scope="col"><?php echo _AT('aframe_version_to_apply'); ?></th>\r
+       <th scope="col"><?php echo _AT('transformable_version_to_apply'); ?></th>\r
        <th scope="col"><?php echo _AT('description'); ?></th>\r
        <th scope="col"><?php echo _AT('last_modified'); ?></th>\r
 </tr>\r
@@ -81,7 +81,7 @@ jQuery(document).ready(function () {
                listeners: {\r
                        afterFinishEdit : function (newValue, oldValue, editNode, viewNode) {\r
                                if (newValue != oldValue)\r
-                                       rtn = jQuery.post("<?php echo AF_BASE_HREF; ?>updater/myown_patches_inline_editor_submit.php", \r
+                                       rtn = jQuery.post("<?php echo TR_BASE_HREF; ?>updater/myown_patches_inline_editor_submit.php", \r
                                          { "field":viewNode.id, "value":newValue }, \r
                                  function(data) { handleResponse(data, viewNode, oldValue); }, \r
                                  "json");\r
@@ -92,4 +92,4 @@ jQuery(document).ready(function () {
 //-->\r
 </script>\r
 \r
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>\r
index 4cbe4f9..dee2c01 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -11,7 +11,7 @@
 /************************************************************************/\r
 \r
 require ('include/json.inc.php');\r
-require (AF_INCLUDE_PATH.'header.inc.php');\r
+require (TR_INCLUDE_PATH.'header.inc.php');\r
 ?>\r
 \r
 <h2 align="center"><?php echo _AT("create_edit_update"); ?></h2>\r
@@ -38,8 +38,8 @@ require (AF_INCLUDE_PATH.'header.inc.php');
                <tr><th align="left" colspan="2"><small>&middot; <?php echo _AT('contain_only'); ?></small></th></tr>\r
 \r
                <tr>\r
-                       <th align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="aframe_version_to_apply"><?php echo _AT('aframe_version_to_apply'); ?>:</label></th>\r
-                       <td align="left"><input id="aframe_version_to_apply" name="aframe_version_to_apply" type="text" maxlength="100" size="30" value="<?php echo $this->patch_row['applied_version']; ?>" /></td>\r
+                       <th align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="transformable_version_to_apply"><?php echo _AT('transformable_version_to_apply'); ?>:</label></th>\r
+                       <td align="left"><input id="transformable_version_to_apply" name="transformable_version_to_apply" type="text" maxlength="100" size="30" value="<?php echo $this->patch_row['applied_version']; ?>" /></td>\r
                </tr>\r
 \r
                <tr>\r
@@ -341,4 +341,4 @@ window.onload = function() {
 //-->\r
 </script>\r
        \r
-<?php require (AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
+<?php require (TR_INCLUDE_PATH.'footer.inc.php'); ?>\r
index 65d8f77..94ca76f 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /************************************************************************/\r
 \r
 global $_custom_css;\r
-$_custom_css = AF_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
+$_custom_css = TR_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
 \r
-include(AF_INCLUDE_PATH.'header.inc.php');\r
+include(TR_INCLUDE_PATH.'header.inc.php');\r
 ?>\r
 \r
-<div class="center-input-form">\r
+<div class="input-form">\r
        <form name="filter_form" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>" >\r
        <fieldset class="group_form"><legend class="group_form"><?php echo _AT("filter"); ?></legend>\r
                <table class="filter">\r
@@ -27,8 +27,8 @@ include(AF_INCLUDE_PATH.'header.inc.php');
                <tr>\r
                        <th><?php echo _AT('user_status'); ?>:</th>\r
                        <td>\r
-                       <input type="radio" name="status" value="0" id="s0" <?php if ($_GET['status'] == AF_STATUS_DISABLED) { echo 'checked="checked"'; } ?> /><label for="s0"><?php echo _AT('disabled'); ?></label> \r
-                       <input type="radio" name="status" value="1" id="s1" <?php if ($_GET['status'] == AF_STATUS_ENABLED) { echo 'checked="checked"'; } ?> /><label for="s1"><?php echo _AT('enabled'); ?></label> \r
+                       <input type="radio" name="status" value="0" id="s0" <?php if ($_GET['status'] == TR_STATUS_DISABLED) { echo 'checked="checked"'; } ?> /><label for="s0"><?php echo _AT('disabled'); ?></label> \r
+                       <input type="radio" name="status" value="1" id="s1" <?php if ($_GET['status'] == TR_STATUS_ENABLED) { echo 'checked="checked"'; } ?> /><label for="s1"><?php echo _AT('enabled'); ?></label> \r
                        <input type="radio" name="status" value="" id="s" <?php if ($_GET['status'] === '') { echo 'checked="checked"'; } ?> /><label for="s"><?php echo _AT('all'); ?></label>\r
                        </td>\r
                </tr>\r
@@ -204,7 +204,7 @@ jQuery(document).ready(function () {
                listeners: {\r
                        afterFinishEdit : function (newValue, oldValue, editNode, viewNode) {\r
                                if (newValue != oldValue)\r
-                                       rtn = jQuery.post("<?php echo AF_BASE_HREF; ?>user/index_inline_editor_submit.php", { "field":viewNode.id, "value":newValue }, \r
+                                       rtn = jQuery.post("<?php echo TR_BASE_HREF; ?>user/index_inline_editor_submit.php", { "field":viewNode.id, "value":newValue }, \r
                                          function(data) { handleResponse(data, viewNode, oldValue); }, "json");\r
                        }\r
                }\r
@@ -213,4 +213,4 @@ jQuery(document).ready(function () {
 \r
 //-->\r
 </script>\r
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index d0ed3a8..cac0e1d 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -11,9 +11,9 @@
 /************************************************************************/\r
 \r
 global $_custom_css;\r
-$_custom_css = AF_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
+$_custom_css = TR_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
 \r
-include(AF_INCLUDE_PATH.'header.inc.php');\r
+include(TR_INCLUDE_PATH.'header.inc.php');\r
 ?>\r
 \r
 <form name="form" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">\r
@@ -104,7 +104,7 @@ jQuery(document).ready(function () {
                        {\r
                                if (newValue != oldValue)\r
                                {\r
-                                       rtn = jQuery.post("<?php echo AF_BASE_HREF; ?>user/user_group_inline_editor_submit.php", { "field":viewNode.id, "value":newValue }, \r
+                                       rtn = jQuery.post("<?php echo TR_BASE_HREF; ?>user/user_group_inline_editor_submit.php", { "field":viewNode.id, "value":newValue }, \r
                                          function(data) \r
                                          {\r
                                                if (data.status=="fail")\r
@@ -125,4 +125,4 @@ jQuery(document).ready(function () {
 });\r
 //-->\r
 </script>\r
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index 395d531..3962693 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -13,7 +13,7 @@
 global $onload;\r
 $onload = "initial();";\r
 \r
-include(AF_INCLUDE_PATH.'header.inc.php');\r
+include(TR_INCLUDE_PATH.'header.inc.php');\r
 ?>\r
 \r
 <form name="input_form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?><?php if (isset($_GET["id"])) echo '?id='.$_GET["id"]; ?>" >\r
@@ -170,4 +170,4 @@ function togglerowhighlight(obj, boxid) {
 //-->\r
 </script>\r
 \r
-<?php include(AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
+<?php include(TR_INCLUDE_PATH.'footer.inc.php'); ?>\r
index 6156dd5..7b22417 100644 (file)
@@ -1,6 +1,6 @@
 <?php 
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -13,7 +13,7 @@
 global $onload;
 $onload = 'document.form.password.focus();';
 
-require(AF_INCLUDE_PATH.'header.inc.php'); 
+require(TR_INCLUDE_PATH.'header.inc.php'); 
 ?>
 
 <script language="JavaScript" src="include/jscripts/sha-1factory.js" type="text/javascript"></script>
@@ -38,7 +38,7 @@ function encrypt_password()
 }
 </script>
 
-<div class="center-input-form">
+<div class="input-form">
 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('change_password'); ?></legend>
 
        <form action="<?php echo $_SERVER['PHP_SELF']; ?>?id=<?php echo $_GET['id']; ?>" method="post" name="form">
@@ -80,4 +80,4 @@ function encrypt_password()
 </fieldset>
 </div>
 
-<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php require(TR_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
index aee47c4..975e669 100644 (file)
@@ -1,6 +1,6 @@
 <?php  
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index 58bfc71..d3e2568 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', '../include/');
+define('TR_INCLUDE_PATH', '../include/');
 
-include_once(AF_INCLUDE_PATH.'vitals.inc.php');
-include_once(AF_INCLUDE_PATH.'classes/DAO/DAO.class.php');
-include_once(AF_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');
-include_once(AF_INCLUDE_PATH.'classes/DAO/LanguageTextDAO.class.php');
+include_once(TR_INCLUDE_PATH.'vitals.inc.php');
+include_once(TR_INCLUDE_PATH.'classes/DAO/DAO.class.php');
+include_once(TR_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');
+include_once(TR_INCLUDE_PATH.'classes/DAO/LanguageTextDAO.class.php');
 
 global $msg, $addslashes;
 
@@ -89,7 +89,7 @@ if (isset($_REQUEST["save"]))
 //$rows_lang = $languagesDAO->getAllExceptLangCode(DEFAULT_LANGUAGE_CODE);                             
 $rows_lang = $languagesDAO->getAll();                          
 
-include(AF_INCLUDE_PATH.'header.inc.php');
+include(TR_INCLUDE_PATH.'header.inc.php');
 ?>
 
 <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
@@ -284,5 +284,5 @@ if ($num_results > 0)
        echo '</div>'."\n";
 }
 
-include(AF_INCLUDE_PATH.'footer.inc.php'); 
+include(TR_INCLUDE_PATH.'footer.inc.php'); 
 ?>
index 07da322..0824c6c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 * @package     Patch
 */
 
-define('AF_INCLUDE_PATH', '../../');
+define('TR_INCLUDE_PATH', '../../');
 
-require_once(AF_INCLUDE_PATH. "classes/DAO/PatchesDAO.class.php");
-require_once(AF_INCLUDE_PATH. "classes/DAO/PatchesFilesDAO.class.php");
-require_once(AF_INCLUDE_PATH. "classes/DAO/PatchesFilesActionsDAO.class.php");
+require_once(TR_INCLUDE_PATH. "classes/DAO/PatchesDAO.class.php");
+require_once(TR_INCLUDE_PATH. "classes/DAO/PatchesFilesDAO.class.php");
+require_once(TR_INCLUDE_PATH. "classes/DAO/PatchesFilesActionsDAO.class.php");
 
 class Patch {
 
@@ -63,7 +63,7 @@ class Patch {
        */
        function Patch($patch_array, $patch_summary_array, $skipFilesModified, $patch_folder) 
        {
-               // add relative path to move to AFrame root folder
+               // add relative path to move to Transformable root folder
                for ($i = 0; $i < count($patch_array[files]); $i++)
                {
                        $patch_array[files][$i]['location'] = $this->relative_to_root . $patch_array[files][$i]['location'];
@@ -77,7 +77,7 @@ class Patch {
                $this ->patch_suffix = $patch_array['system_patch_id'];
                $this->skipFilesModified = $skipFilesModified;
                
-               $this->module_content_dir = AF_TEMP_DIR . "updater";
+               $this->module_content_dir = TR_TEMP_DIR . "updater";
                $this->patchesDAO = new PatchesDAO();
                $this->patchesFilesDAO = new PatchesFilesDAO();
                $this->patchesFilesActionsDAO = new PatchesFilesActionsDAO();
@@ -295,7 +295,7 @@ class Patch {
        }
        
        /**
-       * Check if AFrame version is same as "applied version" defined in the patch.
+       * Check if Transformable version is same as "applied version" defined in the patch.
        * @access  private
        * @return  true  if versions match
        *          false if versions don't match
@@ -435,8 +435,8 @@ class Patch {
        }
 
        /**
-       * Compare user's local file with SVN backup for user's AFrame version,
-       * if different, check table AF_patches_files to see if user's local file
+       * Compare user's local file with SVN backup for user's Transformable version,
+       * if different, check table TR_patches_files to see if user's local file
        * was altered by previous patch installation. If it is, return false 
        * (not modified), otherwise, return true (modified).
        * @access  private
@@ -452,7 +452,7 @@ class Patch {
 
                if (!$this->svn_server_connected) return true;
                
-               $svn_file = SVN_TAG_FOLDER . 'aframe_' . str_replace('.', '_', VERSION) .
+               $svn_file = SVN_TAG_FOLDER . 'transformable_' . str_replace('.', '_', VERSION) .
                            str_replace(substr($this->relative_to_root, 0, -1), '' , $folder) .$file;
                $local_file = $folder.$file;
 
@@ -483,7 +483,7 @@ class Patch {
                fwrite($fp, trim($this->patch_array['sql']));
                fclose($fp);
 
-               require(AF_INCLUDE_PATH . 'classes/sqlutility.class.php');
+               require(TR_INCLUDE_PATH . 'classes/sqlutility.class.php');
                $sqlUtility = new SqlUtility();
        
                $sqlUtility->queryFromFile($patch_sql_file, TABLE_PREFIX);
index 9182153..8b4c6db 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 * @package     PatchCreator
 */
 
-define('AF_INCLUDE_PATH', '../../include/');
-require_once (AF_INCLUDE_PATH.'vitals.inc.php');
+define('TR_INCLUDE_PATH', '../../include/');
+require_once (TR_INCLUDE_PATH.'vitals.inc.php');
 
-require_once(AF_INCLUDE_PATH. "../updater/include/patch_xml_template.inc.php");
-require_once(AF_INCLUDE_PATH."classes/DAO/MyownPatchesDAO.class.php");
-require_once(AF_INCLUDE_PATH."classes/DAO/MyownPatchesDependentDAO.class.php");
-require_once(AF_INCLUDE_PATH."classes/DAO/MyownPatchesFilesDAO.class.php");
+require_once(TR_INCLUDE_PATH. "../updater/include/patch_xml_template.inc.php");
+require_once(TR_INCLUDE_PATH."classes/DAO/MyownPatchesDAO.class.php");
+require_once(TR_INCLUDE_PATH."classes/DAO/MyownPatchesDependentDAO.class.php");
+require_once(TR_INCLUDE_PATH."classes/DAO/MyownPatchesFilesDAO.class.php");
 
 class PatchCreator {
 
@@ -48,7 +48,7 @@ class PatchCreator {
        * Array
        * (
        *     [system_patch_id] => Patch001
-       *     [aframe_version_to_apply] => 1.6
+       *     [transformable_version_to_apply] => 1.6
        *     [description] => this is a sample patch info array
        *     [sql_statement] => 
        *     [dependent_patches] => Array
@@ -97,9 +97,9 @@ class PatchCreator {
                $this->patch_info_array = $patch_info_array; 
                $this->current_patch_id = $patch_id;
                
-               $this->patch_xml_file = AF_TEMP_DIR . "updater/patch.xml";
+               $this->patch_xml_file = TR_TEMP_DIR . "updater/patch.xml";
 
-               $this->version_folder = AF_TEMP_DIR . "updater/" . str_replace('.', '_', $this->patch_info_array["aframe_version_to_apply"]) . "/";
+               $this->version_folder = TR_TEMP_DIR . "updater/" . str_replace('.', '_', $this->patch_info_array["transformable_version_to_apply"]) . "/";
                $this->patch_folder = $this->version_folder . $this->patch_info_array["system_patch_id"] . "/";
                
                $this->myownPatchesDAO = new MyownPatchesDAO();
@@ -147,7 +147,7 @@ class PatchCreator {
                {
                        $this->current_patch_id = $this->myownPatchesDAO->Create(
                                $this->patch_info_array["system_patch_id"], 
-                               $this->patch_info_array["aframe_version_to_apply"], 
+                               $this->patch_info_array["transformable_version_to_apply"], 
                                $this->patch_info_array["description"], 
                                $this->patch_info_array["sql_statement"]);
                }
@@ -155,7 +155,7 @@ class PatchCreator {
                {
                        $this->myownPatchesDAO->Update($this->current_patch_id, 
                                    $this->patch_info_array["system_patch_id"],
-                                   $this->patch_info_array["aframe_version_to_apply"],
+                                   $this->patch_info_array["transformable_version_to_apply"],
                                    $this->patch_info_array["description"],
                                    $this->patch_info_array["sql_statement"]);
                }
@@ -268,7 +268,7 @@ class PatchCreator {
                                         '{DEPENDENT_PATCHES}',
                                         '{FILES}'), 
                                                                 array($this->patch_info_array["system_patch_id"], 
-                                                                      $this->patch_info_array["aframe_version_to_apply"], 
+                                                                      $this->patch_info_array["transformable_version_to_apply"], 
                                                                       htmlspecialchars(stripslashes($this->htmlNewLine($this->patch_info_array["description"])), ENT_QUOTES), 
                                                                       htmlspecialchars(stripslashes($this->patch_info_array["sql_statement"]), ENT_QUOTES), 
                                                                       $dependent_patches,
@@ -310,7 +310,7 @@ class PatchCreator {
        */
        function createZIP() 
        {
-               require_once(AF_INCLUDE_PATH . '/classes/zipfile.class.php');
+               require_once(TR_INCLUDE_PATH . '/classes/zipfile.class.php');
 
                $zipfile = new zipfile();
        
index 935daa8..8e61feb 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index e20e5fd..40eaa13 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index 30ec239..a49d1ab 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -41,7 +41,7 @@ function print_feedback( $feedback, $notes='' ) {
        <div class="input-form">\r
        <table style="align:center; padding: 3px; background-color: #F8F8F8; border: 0">\r
        <tr>\r
-       <td><h3><img src="images/feedback.gif" align="top" alt="" class="img" /> <?php echo _AT('AF_FEEDBACK_UPDATE_INSTALLED_SUCCESSFULLY')?></h3>\r
+       <td><h3><img src="images/feedback.gif" align="top" alt="" class="img" /> <?php echo _AT('TR_FEEDBACK_UPDATE_INSTALLED_SUCCESSFULLY')?></h3>\r
                <?php\r
                        echo '<ul>';\r
                        foreach ($feedback as $p) {\r
index 9800d9a..9200551 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
index 54ccc79..3725ae4 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
index ebc81d3..afa5f1c 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
+define('TR_INCLUDE_PATH', '../include/');\r
 \r
-require (AF_INCLUDE_PATH.'vitals.inc.php');\r
+require (TR_INCLUDE_PATH.'vitals.inc.php');\r
 require_once('classes/PatchListParser.class.php');\r
-require_once(AF_INCLUDE_PATH. 'classes/Utility.class.php');\r
-require_once(AF_INCLUDE_PATH. 'classes/DAO/PatchesDAO.class.php');\r
+require_once(TR_INCLUDE_PATH. 'classes/Utility.class.php');\r
+require_once(TR_INCLUDE_PATH. 'classes/DAO/PatchesDAO.class.php');\r
 require_once('include/common.inc.php');\r
 \r
 set_time_limit(0);\r
@@ -74,7 +74,7 @@ if ($_POST['no'])
        exit;\r
 }\r
 \r
-require (AF_INCLUDE_PATH.'header.inc.php');\r
+require (TR_INCLUDE_PATH.'header.inc.php');\r
 \r
 if (trim($_POST['who']) != '') $who = trim($_POST['who']);\r
 elseif (trim($_REQUEST['who']) != '') $who = trim($_REQUEST['who']);\r
@@ -108,12 +108,12 @@ if ($server_connected)
 }\r
 // end of get patch list\r
 \r
-$module_content_folder = AF_TEMP_DIR . "updater/temp";\r
+$module_content_folder = TR_TEMP_DIR . "updater/temp";\r
 if (!is_dir($module_content_folder)) mkdir($module_content_folder);\r
 \r
 if ($_POST['install_upload'] && $_POST['uploading'])\r
 {\r
-       include_once(AF_INCLUDE_PATH . 'lib/pclzip.lib.php');\r
+       include_once(TR_INCLUDE_PATH . 'lib/pclzip.lib.php');\r
        \r
        // clean up module content folder\r
        Utility::clearDir($module_content_folder);\r
index 853d12e..9e624f9 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
+define('TR_INCLUDE_PATH', '../include/');\r
 \r
-require (AF_INCLUDE_PATH.'vitals.inc.php');\r
-require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
+require (TR_INCLUDE_PATH.'vitals.inc.php');\r
+require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
 \r
 if (isset($_POST['remove'], $_POST['myown_patch_id'])) \r
 {\r
index f5cbf81..3bb1492 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -10,9 +10,9 @@
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
 \r
 if (isset($_POST['field']))\r
 {\r
index 7393b08..dbb428a 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -10,8 +10,8 @@
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-require (AF_INCLUDE_PATH.'vitals.inc.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+require (TR_INCLUDE_PATH.'vitals.inc.php');\r
 \r
 // URL called by form action\r
 $savant->assign('url', dirname($_SERVER['PHP_SELF']) . "/patch_creator.php");\r
index ca25851..2bc17aa 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -10,8 +10,8 @@
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-require_once (AF_INCLUDE_PATH.'vitals.inc.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+require_once (TR_INCLUDE_PATH.'vitals.inc.php');\r
 \r
 if ($_POST['create'] || $_POST['save'])\r
 {\r
@@ -22,8 +22,8 @@ if ($_POST['create'] || $_POST['save'])
        if (!isset($_POST["system_patch_id"]) || trim($_POST["system_patch_id"]) == "")\r
                $missing_fields[] = _AT("system_update_id");\r
 \r
-       if (!isset($_POST["aframe_version_to_apply"]) || trim($_POST["aframe_version_to_apply"]) == "")\r
-               $missing_fields[] = _AT("aframe_version_to_apply");\r
+       if (!isset($_POST["transformable_version_to_apply"]) || trim($_POST["transformable_version_to_apply"]) == "")\r
+               $missing_fields[] = _AT("transformable_version_to_apply");\r
 \r
        // only check missing upload file when creating a update. don't check when save\r
        if (is_array($_POST['rb_action']) && $_POST['create'])\r
@@ -50,7 +50,7 @@ if ($_POST['create'] || $_POST['save'])
        if (!$msg->containsErrors()) \r
        {\r
                $patch_info = array("system_patch_id"=>$_POST["system_patch_id"],\r
-                             "aframe_version_to_apply"=>$_POST["aframe_version_to_apply"],\r
+                             "transformable_version_to_apply"=>$_POST["transformable_version_to_apply"],\r
                              "description"=>$_POST["description"],\r
                              "sql_statement"=>$_POST["sql_statement"]);\r
 \r
index c659363..f0bc2de 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-require(AF_INCLUDE_PATH.'vitals.inc.php');\r
-require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
-require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesDependentDAO.class.php');\r
-require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesFilesDAO.class.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+require(TR_INCLUDE_PATH.'vitals.inc.php');\r
+require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
+require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesDependentDAO.class.php');\r
+require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesFilesDAO.class.php');\r
 \r
 $myownPatchesDAO = new MyownPatchesDAO();\r
 \r
@@ -39,7 +39,7 @@ if (isset($_POST['submit_no'])) {
 }\r
 \r
 //require('../../include/header.inc.php');\r
-require(AF_INCLUDE_PATH.'header.inc.php');\r
+require(TR_INCLUDE_PATH.'header.inc.php');\r
 \r
 $_GET['myown_patch_id'] = intval($_GET['myown_patch_id']); \r
 $row = $myownPatchesDAO->getByID($_GET[myown_patch_id]);\r
@@ -56,6 +56,6 @@ if (!$row) {
        $msg->printConfirm();\r
 }\r
 \r
-require(AF_INCLUDE_PATH.'footer.inc.php');\r
+require(TR_INCLUDE_PATH.'footer.inc.php');\r
 \r
 ?>
\ No newline at end of file
index a29a5f0..5a4ed49 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-require(AF_INCLUDE_PATH.'vitals.inc.php');\r
-require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
-require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesDependentDAO.class.php');\r
-require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesFilesDAO.class.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+require(TR_INCLUDE_PATH.'vitals.inc.php');\r
+require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
+require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesDependentDAO.class.php');\r
+require_once(TR_INCLUDE_PATH.'classes/DAO/MyownPatchesFilesDAO.class.php');\r
  \r
 if (!isset($_REQUEST["myown_patch_id"]))\r
 {\r
index b608895..186f315 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -10,9 +10,9 @@
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include(AF_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include(TR_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
 \r
 // initialize constants\r
 $results_per_page = 50;\r
index 67b82b4..410d81d 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');\r
 \r
 if ($_POST['value'] == '')\r
 {\r
        $rtn['status'] = 'fail';\r
-       $rtn['error'][] = _AT('AF_ERROR_EMPTY_FIELD');\r
+       $rtn['error'][] = _AT('TR_ERROR_EMPTY_FIELD');\r
 }\r
 \r
 if (isset($_POST['field']) && isset($_POST['value']) && $_POST['value'] <> '')\r
index 5774302..0730ac2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', '../include/');
-include_once(AF_INCLUDE_PATH.'vitals.inc.php');
-include_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
-include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');
+define('TR_INCLUDE_PATH', '../include/');
+include_once(TR_INCLUDE_PATH.'vitals.inc.php');
+include_once(TR_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
+include_once(TR_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');
 
 // handle submit
 if (isset($_POST['cancel'])) {
        header('Location: index.php');
        exit;
 } else if (isset($_POST['submit'])) {
-       require_once(AF_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
+       require_once(TR_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
        $usersDAO = new UsersDAO();
        
        /* password check: password is verified front end by javascript. here is to handle the errors from javascript */
@@ -38,19 +38,30 @@ if (isset($_POST['cancel'])) {
        }
        else
        {
+               if (isset($_POST['is_author'])) $is_author = 1;
+               else $is_author = 0;
+               
                if (!isset($_GET['id']))  // create new user
                {
                        $user_id = $usersDAO->Create($_POST['user_group_id'],
-                         $_POST['login'],
+                             $_POST['login'],
                                      $_POST['form_password_hidden'],
                                      $_POST['email'],
                                      $_POST['first_name'],
                                      $_POST['last_name'],
+                                 $is_author,
+                                 $_POST['organization'],
+                                 $_POST['phone'],
+                                 $_POST['address'],
+                                 $_POST['city'],
+                                 $_POST['province'],
+                                 $_POST['country'],
+                                 $_POST['postal_code'],
                                      $_POST['status']);
                        
                        if (is_int($user_id) && $user_id > 0)
                        {
-                               if (defined('AF_EMAIL_CONFIRMATION') && AF_EMAIL_CONFIRMATION) {
+                               if (defined('TR_EMAIL_CONFIRMATION') && TR_EMAIL_CONFIRMATION) {
                                        $msg->addFeedback('REG_THANKS_CONFIRM');
                
                                        $code = substr(md5($_POST['email'] . $now . $user_id), 0, 10);
@@ -58,8 +69,8 @@ if (isset($_POST['cancel'])) {
                                        $confirmation_link = $_base_href . 'confirm.php?id='.$user_id.SEP.'m='.$code;
                
                                        /* send the email confirmation message: */
-                                       require(AF_INCLUDE_PATH . 'classes/phpmailer/aframemailer.class.php');
-                                       $mail = new AFrameMailer();
+                                       require(TR_INCLUDE_PATH . 'classes/phpmailer/transformablemailer.class.php');
+                                       $mail = new TransformableMailer();
                
                                        $mail->From     = $_config['contact_email'];
                                        $mail->AddAddress($_POST['email']);
@@ -84,6 +95,14 @@ if (isset($_POST['cancel'])) {
                                          $_POST['email'],
                                          $_POST['first_name'],
                                          $_POST['last_name'],
+                                     $is_author,
+                                     $_POST['organization'],
+                                     $_POST['phone'],
+                                     $_POST['address'],
+                                     $_POST['city'],
+                                     $_POST['province'],
+                                     $_POST['country'],
+                                     $_POST['postal_code'],
                                          $_POST['status']))
                        
                        {
index cf868a0..69dff83 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
+define('TR_INCLUDE_PATH', '../include/');\r
 \r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');\r
 \r
 $usersDAO = new UsersDAO();\r
 \r
@@ -37,7 +37,7 @@ else if (isset($_POST['submit_yes']))
        exit;\r
 }\r
 \r
-require(AF_INCLUDE_PATH.'header.inc.php');\r
+require(TR_INCLUDE_PATH.'header.inc.php');\r
 \r
 unset($hidden_vars);\r
 \r
@@ -52,5 +52,5 @@ $hidden_vars['id'] = $_REQUEST['id'];
 $msg->addConfirm(array('DELETE_USER', $names_html), $hidden_vars);\r
 $msg->printConfirm();\r
 \r
-require(AF_INCLUDE_PATH.'footer.inc.php');\r
+require(TR_INCLUDE_PATH.'footer.inc.php');\r
 ?>\r
index 312784c..80682ca 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-include_once(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/PrivilegesDAO.class.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+include_once(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/PrivilegesDAO.class.php');\r
 \r
 // handle submit\r
 if ( isset($_GET['edit']) && isset($_GET['id']) && count($_GET['id']) > 1) {\r
@@ -25,7 +25,7 @@ if ( isset($_GET['edit']) && isset($_GET['id']) && count($_GET['id']) > 1) {
        // cannot delete "admin" and "user" groups\r
        foreach ($_GET['id'] as $id)\r
        {\r
-               if ($id == AF_USER_GROUP_ADMIN || $id == AF_USER_GROUP_USER)\r
+               if ($id == TR_USER_GROUP_ADMIN || $id == TR_USER_GROUP_USER)\r
                {\r
                        $msg->addError('USER_GROUP_CANNOT_DELETE');\r
                        break;\r
index d40744a..2ce0d41 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
+define('TR_INCLUDE_PATH', '../include/');\r
 \r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupPrivilegeDAO.class.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/PrivilegesDAO.class.php');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/UserGroupPrivilegeDAO.class.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/PrivilegesDAO.class.php');\r
 \r
 unset($id);  // clean up the temporary id values set by vitals.inc.php\r
 \r
index 2fdcf89..b8ccc3d 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
+define('TR_INCLUDE_PATH', '../include/');\r
 \r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
 \r
 $userGroupsDAO = new UserGroupsDAO();\r
 \r
@@ -37,7 +37,7 @@ else if (isset($_POST['submit_yes']))
        exit;\r
 }\r
 \r
-require(AF_INCLUDE_PATH.'header.inc.php');\r
+require(TR_INCLUDE_PATH.'header.inc.php');\r
 \r
 unset($hidden_vars);\r
 \r
@@ -53,5 +53,5 @@ $hidden_vars['id'] = $_REQUEST['id'];
 $msg->addConfirm(array('DELETE_USER_GROUP', $names_html), $hidden_vars);\r
 $msg->printConfirm();\r
 \r
-require(AF_INCLUDE_PATH.'footer.inc.php');\r
+require(TR_INCLUDE_PATH.'footer.inc.php');\r
 ?>\r
index da7e8f9..23de378 100644 (file)
@@ -1,6 +1,6 @@
 <?php\r
 /************************************************************************/\r
-/* AFrame                                                               */\r
+/* Transformable                                                        */\r
 /************************************************************************/\r
 /* Copyright (c) 2009                                                   */\r
 /* Adaptive Technology Resource Centre / University of Toronto          */\r
@@ -10,9 +10,9 @@
 /* as published by the Free Software Foundation.                        */\r
 /************************************************************************/\r
 \r
-define('AF_INCLUDE_PATH', '../include/');\r
-include(AF_INCLUDE_PATH.'vitals.inc.php');\r
-include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
+define('TR_INCLUDE_PATH', '../include/');\r
+include(TR_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(TR_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
 \r
 if (isset($_POST['field']))\r
 {\r
index 30b11f3..32dd98d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************/
-/* AFrame                                                               */
+/* Transformable                                                        */
 /************************************************************************/
 /* Copyright (c) 2009                                                   */
 /* Adaptive Technology Resource Centre / University of Toronto          */
@@ -10,9 +10,9 @@
 /* as published by the Free Software Foundation.                        */
 /************************************************************************/
 
-define('AF_INCLUDE_PATH', '../include/');
-include_once(AF_INCLUDE_PATH.'vitals.inc.php');
-include_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
+define('TR_INCLUDE_PATH', '../include/');
+include_once(TR_INCLUDE_PATH.'vitals.inc.php');
+include_once(TR_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
 
 if (isset($_POST['cancel'])) {
        $msg->addFeedback('CANCELLED');
@@ -43,9 +43,9 @@ if (isset($_POST['submit'])) {
 
                if (!$usersDAO->setPassword($_GET['id'], $password)) 
                {
-                       require(AF_INCLUDE_PATH.'header.inc.php');
+                       require(TR_INCLUDE_PATH.'header.inc.php');
                        $msg->printErrors('DB_NOT_UPDATED');
-                       require(AF_INCLUDE_PATH.'footer.inc.php');
+                       require(TR_INCLUDE_PATH.'footer.inc.php');
                        exit;
                }
 
@@ -53,11 +53,11 @@ if (isset($_POST['submit'])) {
                $user_row = $usersDAO->getUserByID($_GET['id']);
 
                $tmp_message  = _AT('password_change_msg')."\n\n";
-               $tmp_message .= _AT('web_site').' : '.AF_BASE_HREF."\n";
+               $tmp_message .= _AT('web_site').' : '.TR_BASE_HREF."\n";
                $tmp_message .= _AT('login_name').' : '.$user_row['login']."\n";
                
-               require(AF_INCLUDE_PATH . 'classes/phpmailer/aframemailer.class.php');
-               $mail = new AFrameMailer;
+               require(TR_INCLUDE_PATH . 'classes/phpmailer/transformablemailer.class.php');
+               $mail = new TransformableMailer;
                $mail->From     = $_config['contact_email'];
                $mail->AddAddress($user_row['email']);
                $mail->Subject = $_config['site_name'] . ': ' . _AT('password_changed');