Annotation of /mambo/branches/4.6/includes/HTML_toolbar.php
Parent Directory
|
Revision Log
Revision 1335 - (view) (download)
| 1 : | alwarren | 1335 | <?php |
| 2 : | /** | ||
| 3 : | * @package Mambo | ||
| 4 : | * @author Mambo Foundation Inc see README.php | ||
| 5 : | * @copyright Mambo Foundation Inc. | ||
| 6 : | * See COPYRIGHT.php for copyright notices and details. | ||
| 7 : | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see | ||
| 8 : | * LICENSE.php | ||
| 9 : | * Mambo 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; version 2 of the | ||
| 12 : | * License. | ||
| 13 : | */ | ||
| 14 : | |||
| 15 : | /** | ||
| 16 : | * Utility class for the button bar | ||
| 17 : | */ | ||
| 18 : | class mosToolBar { | ||
| 19 : | |||
| 20 : | /** | ||
| 21 : | * Writes the start of the button bar table | ||
| 22 : | */ | ||
| 23 : | function startTable() { | ||
| 24 : | ?> | ||
| 25 : | <table cellpadding="0" cellspacing="0" border="0" width="99%"> | ||
| 26 : | <tr> | ||
| 27 : | <?php | ||
| 28 : | } | ||
| 29 : | |||
| 30 : | /** | ||
| 31 : | * Writes a custom option and task button for the button bar | ||
| 32 : | * @param string The task to perform (picked up by the switch($task) blocks | ||
| 33 : | * @param string The image to display | ||
| 34 : | * @param string The image to display when moused over | ||
| 35 : | * @param string The alt text for the icon image | ||
| 36 : | * @param boolean True if required to check that a standard list item is checked | ||
| 37 : | */ | ||
| 38 : | function custom( $task='', $icon='', $iconOver='', $alt='', $listSelect=true ) { | ||
| 39 : | if ($listSelect) { | ||
| 40 : | $href = "javascript:if (document.adminForm.boxchecked.value == 0){ alert('".T_('Please make a selection from the list to') ." $alt');}else{submitbutton('$task')}"; | ||
| 41 : | } else { | ||
| 42 : | $href = "javascript:submitbutton('$task')"; | ||
| 43 : | } | ||
| 44 : | ?> | ||
| 45 : | <td width="25" align="center"> | ||
| 46 : | <a href="<?php echo $href;?>" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','images/<?php echo $iconOver;?>',1);"> | ||
| 47 : | <img name="<?php echo $task;?>" src="images/<?php echo $icon;?>" alt="<?php echo $alt;?>" border="0" /> | ||
| 48 : | </a> | ||
| 49 : | </td> | ||
| 50 : | <?php | ||
| 51 : | } | ||
| 52 : | |||
| 53 : | /** | ||
| 54 : | * Writes the common 'new' icon for the button bar | ||
| 55 : | * @param string An override for the task | ||
| 56 : | * @param string An override for the alt text | ||
| 57 : | */ | ||
| 58 : | function addNew( $task='new', $alt=null ) { | ||
| 59 : | if (is_null($alt)) $alt = T_('New'); | ||
| 60 : | |||
| 61 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 62 : | $image = $mainframe->ImageCheck( 'new.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 63 : | $image2 = $mainframe->ImageCheck( 'new_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 64 : | ?> | ||
| 65 : | <td width="25" align="center"> | ||
| 66 : | <a href="javascript:submitbutton('<?php echo $task;?>');" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2; ?>',1);"> | ||
| 67 : | <?php echo $image; ?> | ||
| 68 : | </a> | ||
| 69 : | </td> | ||
| 70 : | <?php | ||
| 71 : | } | ||
| 72 : | |||
| 73 : | /** | ||
| 74 : | * Writes a common 'publish' button | ||
| 75 : | * @param string An override for the task | ||
| 76 : | * @param string An override for the alt text | ||
| 77 : | */ | ||
| 78 : | function publish( $task='publish', $alt=null ) { | ||
| 79 : | if (is_null($alt)) $alt = T_('Published'); | ||
| 80 : | |||
| 81 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 82 : | $image = $mainframe->ImageCheck( 'publish.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 83 : | $image2 = $mainframe->ImageCheck( 'publish_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 84 : | ?> | ||
| 85 : | <td width="25" align="center"> | ||
| 86 : | <a href="javascript:submitbutton('<?php echo $task;?>');" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2; ?>',1);"> | ||
| 87 : | <?php echo $image; ?> | ||
| 88 : | </a> | ||
| 89 : | </td> | ||
| 90 : | <?php | ||
| 91 : | } | ||
| 92 : | |||
| 93 : | /** | ||
| 94 : | * Writes a common 'publish' button for a list of records | ||
| 95 : | * @param string An override for the task | ||
| 96 : | * @param string An override for the alt text | ||
| 97 : | */ | ||
| 98 : | function publishList( $task='publish', $alt=null ) { | ||
| 99 : | if (is_null($alt)) $alt = T_('Published'); | ||
| 100 : | |||
| 101 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 102 : | $image = $mainframe->ImageCheck( 'publish.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 103 : | $image2 = $mainframe->ImageCheck( 'publish_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 104 : | ?> | ||
| 105 : | <td width="25" align="center"> | ||
| 106 : | <a href="javascript:if (document.adminForm.boxchecked.value == 0){ alert('<?php echo T_('Please make a selection from the list to publish')?> '); } else {submitbutton('<?php echo $task;?>', '');}" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2; ?>',1);"> | ||
| 107 : | <?php echo $image; ?> | ||
| 108 : | </a> | ||
| 109 : | </td> | ||
| 110 : | <?php | ||
| 111 : | } | ||
| 112 : | |||
| 113 : | /** | ||
| 114 : | * Writes a common 'unpublish' button | ||
| 115 : | * @param string An override for the task | ||
| 116 : | * @param string An override for the alt text | ||
| 117 : | */ | ||
| 118 : | function unpublish( $task='unpublish', $alt=null ) { | ||
| 119 : | if (is_null($alt)) $alt = T_('Unpublished'); | ||
| 120 : | |||
| 121 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 122 : | $image = $mainframe->ImageCheck( 'unpublish.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 123 : | $image2 = $mainframe->ImageCheck( 'unpublish_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 124 : | ?> | ||
| 125 : | <td width="25" align="center"> | ||
| 126 : | <a href="javascript:submitbutton('<?php echo $task;?>');" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2; ?>',1);" > | ||
| 127 : | <?php echo $image; ?> | ||
| 128 : | </a> | ||
| 129 : | </td> | ||
| 130 : | <?php | ||
| 131 : | } | ||
| 132 : | |||
| 133 : | /** | ||
| 134 : | * Writes a common 'unpublish' button for a list of records | ||
| 135 : | * @param string An override for the task | ||
| 136 : | * @param string An override for the alt text | ||
| 137 : | */ | ||
| 138 : | function unpublishList( $task='unpublish', $alt=null ) { | ||
| 139 : | if (is_null($alt)) $alt = T_('Unpublished'); | ||
| 140 : | |||
| 141 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 142 : | $image = $mainframe->ImageCheck( 'unpublish.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 143 : | $image2 = $mainframe->ImageCheck( 'unpublish_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 144 : | ?> | ||
| 145 : | <td width="25" align="center"> | ||
| 146 : | <a href="javascript:if (document.adminForm.boxchecked.value == 0){ alert('<?php T_('Please make a selection from the list to unpublish') ?>'); } else {submitbutton('<?php echo $task;?>', '');}" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2; ?>',1);" > | ||
| 147 : | <?php echo $image; ?> | ||
| 148 : | </a> | ||
| 149 : | </td> | ||
| 150 : | <?php | ||
| 151 : | } | ||
| 152 : | |||
| 153 : | /** | ||
| 154 : | * Writes a common 'archive' button for a list of records | ||
| 155 : | * @param string An override for the task | ||
| 156 : | * @param string An override for the alt text | ||
| 157 : | */ | ||
| 158 : | function archiveList( $task='archive', $alt=null ) { | ||
| 159 : | if (is_null($alt)) $alt = T_('Archive'); | ||
| 160 : | |||
| 161 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 162 : | $image = $mainframe->ImageCheck( 'archive.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 163 : | $image2 = $mainframe->ImageCheck( 'archive_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 164 : | ?> | ||
| 165 : | <td width="25" align="center"> | ||
| 166 : | <a href="javascript:if (document.adminForm.boxchecked.value == 0){ alert('<?php T_('Please make a selection from the list to archive') ?>'); } else {submitbutton('<?php echo $task;?>', '');}" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2; ?>',1);"> | ||
| 167 : | <?php echo $image; ?> | ||
| 168 : | </a> | ||
| 169 : | </td> | ||
| 170 : | <?php | ||
| 171 : | } | ||
| 172 : | |||
| 173 : | /** | ||
| 174 : | * Writes an unarchive button for a list of records | ||
| 175 : | * @param string An override for the task | ||
| 176 : | * @param string An override for the alt text | ||
| 177 : | */ | ||
| 178 : | function unarchiveList( $task='unarchive', $alt=null ) { | ||
| 179 : | if (is_null($alt)) $alt = T_('Unarchive'); | ||
| 180 : | |||
| 181 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 182 : | $image = $mainframe->ImageCheck( 'unarchive.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 183 : | $image2 = $mainframe->ImageCheck( 'unarchive_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 184 : | ?> | ||
| 185 : | <td width="25" align="center"> | ||
| 186 : | <a href="javascript:if (document.adminForm.boxchecked.value == 0){ alert('<?php T_('Please select a news story to unarchive') ?>'); } else {submitbutton('<?php echo $task;?>', '');}" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2; ?>',1);"> | ||
| 187 : | <?php echo $image; ?> | ||
| 188 : | </a> | ||
| 189 : | </td> | ||
| 190 : | <?php | ||
| 191 : | } | ||
| 192 : | |||
| 193 : | /** | ||
| 194 : | * Writes a common 'edit' button for a list of records | ||
| 195 : | * @param string An override for the task | ||
| 196 : | * @param string An override for the alt text | ||
| 197 : | */ | ||
| 198 : | function editList( $task='edit', $alt=null ) { | ||
| 199 : | if (is_null($alt)) $alt = T_('Edit'); | ||
| 200 : | |||
| 201 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 202 : | $image = $mainframe->ImageCheck( 'html.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 203 : | $image2 = $mainframe->ImageCheck( 'html_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 204 : | ?> | ||
| 205 : | <td width="25" align="center"> | ||
| 206 : | <a href="javascript:if (document.adminForm.boxchecked.value == 0){ alert('<?php T_('Please select an item from the list to edit') ?>'); } else {submitbutton('<?php echo $task;?>', '');}" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2; ?>',1);"> | ||
| 207 : | <?php echo $image; ?> | ||
| 208 : | </a> | ||
| 209 : | </td> | ||
| 210 : | <?php | ||
| 211 : | } | ||
| 212 : | |||
| 213 : | /** | ||
| 214 : | * Writes a common 'edit' button for a template html | ||
| 215 : | * @param string An override for the task | ||
| 216 : | * @param string An override for the alt text | ||
| 217 : | */ | ||
| 218 : | function editHtml( $task='edit_source', $alt=null ) { | ||
| 219 : | if (is_null($alt)) $alt = T_('Edit HTML'); | ||
| 220 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 221 : | $image = $mainframe->ImageCheck( 'html.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 222 : | $image2 = $mainframe->ImageCheck( 'html_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 223 : | ?> | ||
| 224 : | <td width="25" align="center"> | ||
| 225 : | <a href="javascript:if (document.adminForm.boxchecked.value == 0){ alert('<?php T_('Please select an item from the list to edit') ?>'); } else {submitbutton('<?php echo $task;?>', '');}" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2; ?>',1);"> | ||
| 226 : | <?php echo $image; ?> | ||
| 227 : | </a> | ||
| 228 : | </td> | ||
| 229 : | <?php | ||
| 230 : | } | ||
| 231 : | |||
| 232 : | /** | ||
| 233 : | * Writes a common 'edit' button for a template css | ||
| 234 : | * @param string An override for the task | ||
| 235 : | * @param string An override for the alt text | ||
| 236 : | */ | ||
| 237 : | function editCss( $task='edit_css', $alt=null ) { | ||
| 238 : | if (is_null($alt)) $alt = T_('Edit CSS'); | ||
| 239 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 240 : | $image = $mainframe->ImageCheck( 'css.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 241 : | $image2 = $mainframe->ImageCheck( 'css_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 242 : | ?> | ||
| 243 : | <td width="25" align="center"> | ||
| 244 : | <a href="javascript:if (document.adminForm.boxchecked.value == 0){ alert('<?php T_('Please select an item from the list to edit') ?>'); } else {submitbutton('<?php echo $task;?>', '');}" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2; ?>',1);"> | ||
| 245 : | <?php echo $image; ?> | ||
| 246 : | </a> | ||
| 247 : | </td> | ||
| 248 : | <?php | ||
| 249 : | } | ||
| 250 : | |||
| 251 : | /** | ||
| 252 : | * Writes a common 'delete' button for a list of records | ||
| 253 : | * @param string Postscript for the 'are you sure' message | ||
| 254 : | * @param string An override for the task | ||
| 255 : | * @param string An override for the alt text | ||
| 256 : | */ | ||
| 257 : | function deleteList( $msg='', $task='remove', $alt=null ) { | ||
| 258 : | if (is_null($alt)) $alt = T_('Delete'); | ||
| 259 : | |||
| 260 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 261 : | $image = $mainframe->ImageCheck( 'delete.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 262 : | $image2 = $mainframe->ImageCheck( 'delete_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 263 : | ?> | ||
| 264 : | <td width="25" align="center"> | ||
| 265 : | <a href="javascript:if (document.adminForm.boxchecked.value == 0){ alert('<?php T_('Please make a selection from the list to delete') ?>'); } else if (confirm('<?php T_('Are you sure you want to delete selected items?') ?> <?php echo $msg;?>')){ submitbutton('<?php echo $task;?>');}" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2; ?>',1);"> | ||
| 266 : | <?php echo $image; ?> | ||
| 267 : | </a> | ||
| 268 : | </td> | ||
| 269 : | <?php | ||
| 270 : | } | ||
| 271 : | |||
| 272 : | /** | ||
| 273 : | * Writes a preview button for a given option (opens a popup window) | ||
| 274 : | * @param string The name of the popup file (excluding the file extension) | ||
| 275 : | */ | ||
| 276 : | function preview( $popup='' ) { | ||
| 277 : | global $database; | ||
| 278 : | $sql = "SELECT template FROM #__templates_menu WHERE client_id='0' AND menuid='0'"; | ||
| 279 : | $database->setQuery( $sql ); | ||
| 280 : | $cur_template = $database->loadResult(); | ||
| 281 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 282 : | $image = $mainframe->ImageCheck( 'preview.png', 'images/', NULL, NULL, T_('Preview'), 'preview' ); | ||
| 283 : | $image2 = $mainframe->ImageCheck( 'preview_f2.png', 'images/', NULL, NULL, T_('Preview'), 'preview', 0 ); | ||
| 284 : | ?> | ||
| 285 : | <td width="25" align="center"> | ||
| 286 : | <a href="#" onclick="window.open('popups/<?php echo $popup;?>.php?t=<?php echo $cur_template; ?>', 'win1', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('preview','','<?php echo $image2; ?>',1);"> | ||
| 287 : | <?php echo $image; ?> | ||
| 288 : | </a> | ||
| 289 : | </td> | ||
| 290 : | <?php | ||
| 291 : | } | ||
| 292 : | |||
| 293 : | /** | ||
| 294 : | * Writes a save button for a given option | ||
| 295 : | * @param string An override for the task | ||
| 296 : | * @param string An override for the alt text | ||
| 297 : | */ | ||
| 298 : | function save( $task='save', $alt=null ) { | ||
| 299 : | if (is_null($alt)) $alt = T_('Save'); | ||
| 300 : | |||
| 301 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 302 : | $image = $mainframe->ImageCheck( 'save.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 303 : | $image2 = $mainframe->ImageCheck( 'save_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 304 : | ?> | ||
| 305 : | <td width="25" align="center"> | ||
| 306 : | <a href="javascript:submitbutton('<?php echo $task;?>');" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2;?>',1);"> | ||
| 307 : | <?php echo $image;?> | ||
| 308 : | </a> | ||
| 309 : | </td> | ||
| 310 : | <?php | ||
| 311 : | } | ||
| 312 : | |||
| 313 : | /** | ||
| 314 : | * Writes a save button for a given option (NOTE this is being deprecated) | ||
| 315 : | */ | ||
| 316 : | function savenew() { | ||
| 317 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 318 : | $image = $mainframe->ImageCheck( 'save.png', '/images/', NULL, NULL, T_('save'), 'save' ); | ||
| 319 : | $image2 = $mainframe->ImageCheck( 'save_f2.png', '/images/', NULL, NULL, T_('save'), 'save', 0 ); | ||
| 320 : | ?> | ||
| 321 : | <td width="25" align="center"> | ||
| 322 : | <a href="javascript:submitbutton('savenew');" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('save','','<?php echo $image2;?>',1);"> | ||
| 323 : | <?php echo $image;?> | ||
| 324 : | </a> | ||
| 325 : | </td> | ||
| 326 : | <?php | ||
| 327 : | } | ||
| 328 : | |||
| 329 : | /** | ||
| 330 : | * Writes a save button for a given option (NOTE this is being deprecated) | ||
| 331 : | */ | ||
| 332 : | function saveedit() { | ||
| 333 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 334 : | $image = $mainframe->ImageCheck( 'save.png', '/images/', NULL, NULL, T_('save'), 'save' ); | ||
| 335 : | $image2 = $mainframe->ImageCheck( 'save_f2.png', '/images/', NULL, NULL, T_('save'), 'save', 0 ); | ||
| 336 : | ?> | ||
| 337 : | <td width="25" align="center"> | ||
| 338 : | <a href="javascript:submitbutton('saveedit');" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('save','','<?php echo $image2;?>',1);"> | ||
| 339 : | <?php echo $image;?> | ||
| 340 : | </a> | ||
| 341 : | </td> | ||
| 342 : | <?php | ||
| 343 : | } | ||
| 344 : | |||
| 345 : | /** | ||
| 346 : | * Writes a cancel button and invokes a cancel operation (eg a checkin) | ||
| 347 : | * @param string An override for the task | ||
| 348 : | * @param string An override for the alt text | ||
| 349 : | */ | ||
| 350 : | function cancel( $task='cancel', $alt=null ) { | ||
| 351 : | if (is_null($alt)) $alt = T_('Cancel'); | ||
| 352 : | |||
| 353 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 354 : | $image = $mainframe->ImageCheck( 'cancel.png', '/images/', NULL, NULL, $alt, $task ); | ||
| 355 : | $image2 = $mainframe->ImageCheck( 'cancel_f2.png', '/images/', NULL, NULL, $alt, $task, 0 ); | ||
| 356 : | ?> | ||
| 357 : | <td width="25" align="center"> | ||
| 358 : | <a href="javascript:submitbutton('<?php echo $task;?>');" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2;?>',1);"> | ||
| 359 : | <?php echo $image;?> | ||
| 360 : | </a> | ||
| 361 : | </td> | ||
| 362 : | <?php | ||
| 363 : | } | ||
| 364 : | |||
| 365 : | /** | ||
| 366 : | * Writes a cancel button that will go back to the previous page without doing | ||
| 367 : | * any other operation | ||
| 368 : | */ | ||
| 369 : | function back() { | ||
| 370 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 371 : | $image = $mainframe->ImageCheck( 'back.png', '/images/', NULL, NULL, T_('back'), 'cancel' ); | ||
| 372 : | $image2 = $mainframe->ImageCheck( 'back_f2.png', '/images/', NULL, NULL, T_('back'), 'cancel', 0 ); | ||
| 373 : | ?> | ||
| 374 : | <td width="25" align="center"> | ||
| 375 : | <a href="javascript:window.history.back();" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('cancel','','images/<?php echo $image2;?>',1);"> | ||
| 376 : | <?php echo $image;?> | ||
| 377 : | </a> | ||
| 378 : | </td> | ||
| 379 : | <?php | ||
| 380 : | } | ||
| 381 : | |||
| 382 : | /** | ||
| 383 : | * Write a divider between menu buttons | ||
| 384 : | */ | ||
| 385 : | function divider() { | ||
| 386 : | $image = $mainframe->ImageCheck( 'menu_divider.png', '/images/' ); | ||
| 387 : | ?> | ||
| 388 : | <td width="25" align="center"> | ||
| 389 : | <?php echo $image; ?> | ||
| 390 : | </td> | ||
| 391 : | <?php | ||
| 392 : | } | ||
| 393 : | |||
| 394 : | /** | ||
| 395 : | * Writes a media_manager button | ||
| 396 : | * @param string The sub-drectory to upload the media to | ||
| 397 : | */ | ||
| 398 : | function media_manager( $directory = '' ) { | ||
| 399 : | $mainframe =& mosMainFrame::getInstance(); | ||
| 400 : | $image = $mainframe->ImageCheck( 'upload.png', '/images/', NULL, NULL, T_('Upload Image'), 'uploadPic' ); | ||
| 401 : | $image2 = $mainframe->ImageCheck( 'upload_f2.png', '/images/', NULL, NULL, T_('Upload Image'), 'uploadPic', 0 ); | ||
| 402 : | ?> | ||
| 403 : | <td width="25" align="center"> | ||
| 404 : | <a href="#" onclick="popupWindow('popups/uploadimage.php?directory=<?php echo $directory; ?>','win1',250,100,'no');" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('uploadPic','','<?php echo $image2; ?>',1);"> | ||
| 405 : | <?php echo $image; ?> | ||
| 406 : | </a> | ||
| 407 : | </td> | ||
| 408 : | <?php | ||
| 409 : | } | ||
| 410 : | |||
| 411 : | /** | ||
| 412 : | * Writes a spacer cell | ||
| 413 : | * @param string The width for the cell | ||
| 414 : | */ | ||
| 415 : | function spacer( $width='' ) | ||
| 416 : | { | ||
| 417 : | if ($width != '') { | ||
| 418 : | ?> | ||
| 419 : | <td width="<?php echo $width;?>"> </td> | ||
| 420 : | <?php | ||
| 421 : | } else { | ||
| 422 : | ?> | ||
| 423 : | <td> </td> | ||
| 424 : | <?php | ||
| 425 : | } | ||
| 426 : | } | ||
| 427 : | |||
| 428 : | /** | ||
| 429 : | * Writes the end of the menu bar table | ||
| 430 : | */ | ||
| 431 : | function endTable() { | ||
| 432 : | ?> | ||
| 433 : | </tr> | ||
| 434 : | </table> | ||
| 435 : | <?php | ||
| 436 : | } | ||
| 437 : | } | ||
| 438 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

