2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2006 by Greg Gay & Joel Kronenberg */
6 /* Adaptive Technology Resource Centre / University of Toronto */
9 /* This program is free software. You can redistribute it and/or*/
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /****************************************************************/
15 if (!defined('AT_INCLUDE_PATH')) { exit; }
19 <?php echo _AT('release_date'); ?><br />
20 <?php if ($_POST['day']) { ?>
22 $today_day = $_POST['day'];
23 $today_mon = $_POST['month'];
24 $today_year = $_POST['year'];
26 $today_hour = $_POST['hour'];
27 $today_min = $_POST['min'];
29 <?php require(AT_INCLUDE_PATH.'html/release_date.inc.php'); ?>
30 <?php echo _AT('applies_to_all_sub_pages'); ?>
34 <label for="keys"><?php echo _AT('keywords'); ?></label><br />
35 <textarea name="keywords" class="formfield" cols="73" rows="2" id="keys"><?php echo ContentManager::cleanOutput($_POST['keywords']); ?></textarea>
39 <input type="hidden" name="button_1" value="-1" />
41 if ($contentManager->getNumSections() > (1 - (bool)(!$cid))) {
43 , _AT('editor_properties_instructions',
44 '<img src="'.$_base_path.'images/after.gif" alt="'._AT('after_topic', '').'" title="'._AT('after_topic', '').'" />',
45 '<img src="'.$_base_path.'images/before.gif" alt="'._AT('before_topic', '').'" title="'._AT('before_topic', '').'" />',
46 '<img src="'.$_base_path.'images/child_of.gif" alt="'._AT('child_of', '').'" title="'._AT('child_of', '').'" />')
49 echo '<p>' , _AT('editor_properties_insturctions_related') , '</p>';
52 $old_pid = $_POST['pid'];
53 $old_ordering = $_POST['ordering'];
55 if (isset($_POST['move'])) {
56 $arr = explode('_', key($_POST['move']), 2);
57 $new_pid = $_POST['new_pid'] = $arr[0];
58 $new_ordering = $_POST['new_ordering'] = $arr[1];
60 $new_pid = $_POST['new_pid'];
61 $new_ordering = $_POST['new_ordering'];
64 echo '<input type="hidden" name="new_ordering" value="'.$new_ordering.'" />';
65 echo '<input type="hidden" name="new_pid" value="'.$new_pid.'" />';
70 <th colspan="2"><?php echo _AT('move'); ?></th>
71 <th><?php echo _AT('related_topics'); ?></th>
76 <td><?php echo _AT('home'); ?></td>
80 $content_menu = $contentManager->_menu;
82 $old_ordering = count($contentManager->getContent($pid))+1;
85 $current = array('content_id' => -1,
86 'ordering' => $old_ordering,
87 'title' => $_POST['title']);
89 $content_menu[$old_pid][] = $current;
92 if (($old_pid != $new_pid) || ($old_ordering != $new_ordering) || ($cid == 0)) {
94 $children = $content_menu[$old_pid];
96 $children_current = array($children[$old_ordering-1]);
97 unset($content_menu[$old_pid][$old_ordering-1]);
99 if ($old_pid != $new_pid) {
100 $num_children = count($content_menu[$old_pid]);
102 foreach($content_menu[$old_pid] as $id => $child) {
103 $content_menu[$old_pid][$id]['ordering'] = $i;
108 $children = $content_menu[$new_pid];
109 if (!isset($children)) {
113 $children_above = array_slice($children, 0, $new_ordering-1);
115 $children_below = array_slice($children, $new_ordering-1);
117 $content_menu[$new_pid] = array_merge($children_above, $children_current, $children_below);
120 foreach($content_menu[$new_pid] as $id => $child) {
121 $content_menu[$new_pid][$id]['ordering'] = $i;
127 $contentManager->printMoveMenu($content_menu, 0, 0, '', array());