2 /************************************************************************/
\r
4 /************************************************************************/
\r
5 /* Copyright (c) 2010 */
\r
6 /* Inclusive Design Institute */
\r
8 /* This program is free software. You can redistribute it and/or */
\r
9 /* modify it under the terms of the GNU General Public License */
\r
10 /* as published by the Free Software Foundation. */
\r
11 /************************************************************************/
\r
13 if (!defined('TR_INCLUDE_PATH')) { exit; }
\r
16 <script type="text/javascript" language="javascript">
\r
18 //trans.editor.editor_pref = "<?php if(isset($_SESSION['prefs']['PREF_CONTENT_EDITOR'])) echo $_SESSION['prefs']['PREF_CONTENT_EDITOR'] ?>";
\r
21 <input type="hidden" name="displayhead" id="displayhead" value="<?php if ($_POST['displayhead']==1 || $_REQUEST['displayhead']==1 || $_GET['displayhead']==1) echo '1'; else echo '0'; ?>" />
\r
22 <input type="hidden" name="displaypaste" id="displaypaste" value="<?php if ($_POST['displaypaste']==1 || $_REQUEST['displaypaste']==1 || $_GET['displaypaste']==1) echo '1'; else echo '0'; ?>" />
\r
23 <input type="hidden" name="complexeditor" id="complexeditor" value="<?php if ($_POST['complexeditor']==1 || $_REQUEST['complexeditor']==1 || $_GET['complexeditor']==1) echo '1'; else echo '0'; ?>" />
\r
27 <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="ctitle"><strong><?php echo _AT('title'); ?></strong></label>
\r
28 <input type="text" name="title" id="ctitle" size="60" class="formfield" value="<?php echo ContentManager::cleanOutput($_POST['title']); ?>" />
\r
30 <span class="nowrap">
\r
31 <label for="formatting_radios"><span class="required" title="<?php echo _AT('required_field'); ?>">*</span><strong><?php echo _AT('formatting'); ?></strong></label>
\r
32 <span class="bordered" id="formatting_radios">
\r
33 <input type="radio" name="formatting" value="0" id="text" <?php if ($_POST['formatting'] == 0) { echo 'checked="checked"'; } ?> />
\r
34 <label for="text"><?php echo _AT('plain_text'); ?></label>
\r
36 <input type="radio" name="formatting" value="1" id="html" <?php if ($_POST['formatting'] == 1) { echo 'checked="checked"'; } ?> />
\r
37 <label for="html"><?php echo _AT('html'); ?></label>
\r
39 <input type="radio" name="formatting" value="2" id="weblink" <?php if ($_POST['formatting'] == 2) { echo 'checked="checked"'; } ?> />
\r
40 <label for="weblink"><?php echo _AT('weblink'); ?></label>
\r
46 if ($content_row['content_path']) {
\r
47 echo ' <div class="row"><strong>'._AT('packaged_in').':</strong> '.$content_row['content_path'].'</div>';
\r
49 if (trim($_POST['head']) == '<br />') {
\r
50 $_POST['head'] = '';
\r
53 $_POST['head'] = $stripslashes($_POST['head']);
\r
56 <script type="text/javascript" language="javascript">
\r
58 trans.editor.content_path = "<?php if(isset($content_row['content_path'])) echo $content_row['content_path']; ?>";
\r
59 trans.editor.course_id = "<?php if(isset($cid)) echo $_course_id; ?>";
\r
60 trans.editor.content_id = "<?php if(isset($cid)) echo $cid; ?>";
\r
61 trans.editor.head_enabled_title = "<?php echo _AT('customized_head_enabled_title'); ?>";
\r
62 trans.editor.head_disabled_title = "<?php echo _AT('customized_head_disabled_title'); ?>";
\r
63 trans.editor.paste_enabled_title = "<?php echo _AT('paste_enabled_title'); ?>";
\r
64 trans.editor.paste_disabled_title = "<?php echo _AT('paste_disabled_title'); ?>";
\r
65 trans.editor.fileman_enabled_title = "<?php echo _AT('fileman_enabled_title').' - '._AT('new_window'); ?>";
\r
66 trans.editor.fileman_disabled_title = "<?php echo _AT('fileman_disabled_title'); ?>";
\r
67 trans.editor.accessibility_enabled_title = "<?php echo _AT('accessibility_enabled').' - '._AT('new_window'); ?>";
\r
68 trans.editor.accessibility_disabled_title = "<?php echo _AT('accessibility_disabled'); ?>";
\r
69 trans.editor.processing_text = "<?php echo _AT('processing'); ?>";
\r
70 trans.base_href = "<?php echo TR_BASE_HREF; ?>";
\r
74 <div class="row fl-container fl-fix">
\r
75 <ul id="content-tool-links">
\r
76 <li><img id="previewtool" class="fl-col clickable" src="<?php echo TR_BASE_HREF.'images/preview.png'?>" title="<?php echo _AT('preview').' - '._AT('new_window'); ?>" alt="<?php echo _AT('preview').' - '._AT('new_window'); ?>" height="30" width="30" /><?php echo _AT('preview'); ?></li>
\r
77 <li><img id="accessibilitytool" class="fl-col" src="" title="" alt="" height="30" width="30" /><?php echo _AT('accessibility'); ?></li>
\r
78 <li><img id="headtool" class="fl-col" src="" title="" alt="" height="30" width="30" /><?php echo _AT('customized_head'); ?></li>
\r
79 <li><img id="pastetool" class="fl-col" title="" src="" alt="" height="30" width="30"/><?php echo _AT('paste'); ?></li>
\r
80 <li><img id="filemantool" class="fl-col" title="" src="" alt="" height="30" width="30" /><?php echo _AT('files'); ?></li>
\r
82 <!-- ******** Tool Manager *******
\r
86 foreach($all_tools as $tool) {
\r
87 if($tool['tool_file'] != '' && $tool['table'] != '') {
\r
88 $sql_assoc = "SELECT * FROM ".TABLE_PREFIX.$tool['table']." WHERE content_id='$cid'";
\r
89 $tool_row = $dao->execute($sql_assoc);
\r
90 if (is_array($tool_row)) $num_row = count($tool_row);
\r
93 $tool['alt'] = $tool['title'].' '._AT('added');
\r
95 $tool['alt'] = $tool['title'].' '._AT('none');
\r
100 <!-- TODO LAW note problem here with one tool_file variable for multiple tools -->
\r
101 <script type="text/javascript" language="javascript">
\r
103 trans.editor.tool_file = "<?php if(isset($tool['tool_file'])) echo $tool['tool_file'] ?>";
\r
106 <img class="fl-col clickable tool" src="<?php echo $tool['img']; ?>" alt="<?php echo $tool['alt']; ?>" title="<?php echo $tool['title']; ?>" height="30" width="30" />
\r
112 ****** end Tool Manager ***** -->
\r
114 </div> <!-- end toolbar -->
\r
116 <!-- Customized head -->
\r
117 <div id="head" class="row fl-fix">
\r
118 <label for="headtext"><?php echo _AT('customized_head'); ?>
\r
119 <small>(<?php echo _AT('customized_head_note'); ?>)</small></label>
\r
120 <input type="checkbox" name="use_customized_head" id="use_customized_head" value="1" <?php if ($_POST['use_customized_head']) { echo 'checked="checked"'; } ?> />
\r
121 <label for="use_customized_head"><?php echo _AT('use_customized_head'); ?></label>
\r
122 <textarea id="headtext" name="head" cols="" rows="10"><?php echo htmlspecialchars($_POST['head']); ?></textarea>
\r
125 <!-- Paste from file -->
\r
126 <div id="paste" class="row">
\r
127 <div><?php echo _AT('paste_file')?><small>(<?php echo _AT('html_only'); ?>)</small></div>
\r
128 <input title="<?php echo _AT('browse_for_upload'); ?>" type="file" name="uploadedfile_paste" id="uploadedfile" class="formfield" size="20" />
\r
129 <input type="submit" name="submit_file" value="<?php echo _AT('upload'); ?>" class="button" />
\r
134 if (trim($_POST['body_text']) == '<br />') {
\r
135 $_POST['body_text'] = '';
\r
138 $_POST['body_text'] = $stripslashes($_POST['body_text']);
\r
143 <span id="textSpan">
\r
144 <label for="body_text"><strong><?php echo _AT('body'); ?></strong></label>
\r
145 <textarea name="body_text" id="body_text" cols="" rows="20"><?php echo htmlspecialchars($_POST['body_text']);?></textarea>
\r
147 <span id="weblinkSpan">
\r
148 <label for="weblink_text"><?php echo _AT('weblink'); ?></label>
\r
149 <input name="weblink_text" id="weblink_text" value="<?php echo ($_POST['weblink_text']!=''?htmlspecialchars($_POST['weblink_text']):'http://'); ?>" />
\r