| 1 |
<?php |
<?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 all HTML drawing classes |
* Utility class for all HTML drawing classes |
|
* @package Mambo |
|
| 17 |
*/ |
*/ |
| 18 |
|
|
| 19 |
class mosHTML { |
class mosHTML { |
| 29 |
echo '<tr>'; |
echo '<tr>'; |
| 30 |
echo '<td class="item">' . $folder . '/</td>'; |
echo '<td class="item">' . $folder . '/</td>'; |
| 31 |
echo '<td align="left">'; |
echo '<td align="left">'; |
| 32 |
echo is_writable( "../$folder" ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>' . '</td>'; |
echo is_writable( "../$folder" ) ? '<b><span class="green">'.T_('Writeable').'</span></b>' : '<b><span class="red">'.T_('Unwriteable').'</span></b>' . '</td>'; |
| 33 |
echo '</tr>'; |
echo '</tr>'; |
| 34 |
} |
} |
| 35 |
|
|
| 44 |
* @returns string HTML for the select list |
* @returns string HTML for the select list |
| 45 |
*/ |
*/ |
| 46 |
function selectList ( &$arr, $tag_name, $tag_attribs, $key, $text, $selected=NULL ) { |
function selectList ( &$arr, $tag_name, $tag_attribs, $key, $text, $selected=NULL ) { |
| 47 |
|
if (is_array($arr)){ |
| 48 |
reset( $arr ); |
reset( $arr ); |
| 49 |
|
} |
| 50 |
$html = "\n<select name=\"$tag_name\" $tag_attribs>"; |
$html = "\n<select name=\"$tag_name\" $tag_attribs>"; |
| 51 |
for ($i=0, $n=count( $arr ); $i < $n; $i++ ) { |
for ($i=0, $n=count( $arr ); $i < $n; $i++ ) { |
| 52 |
$k = $arr[$i]->$key; |
$k = $arr[$i]->$key; |
| 53 |
$t = $arr[$i]->$text; |
$t = $arr[$i]->$text; |
| 54 |
$id = @$arr[$i]->id; |
$id = isset($arr[$i]->id) ? $arr[$i]->id : null; |
| 55 |
|
|
| 56 |
$extra = ''; |
$extra = ''; |
| 57 |
$extra .= $id ? " id=\"" . $arr[$i]->id . "\"" : ''; |
$extra .= $id ? " id=\"" . $arr[$i]->id . "\"" : ''; |
| 105 |
*/ |
*/ |
| 106 |
function monthSelectList( $tag_name, $tag_attribs, $selected ) { |
function monthSelectList( $tag_name, $tag_attribs, $selected ) { |
| 107 |
$arr = array( |
$arr = array( |
| 108 |
mosHTML::makeOption( '01', _JAN ), |
mosHTML::makeOption( '01', T_('January') ), |
| 109 |
mosHTML::makeOption( '02', _FEB ), |
mosHTML::makeOption( '02', T_('February') ), |
| 110 |
mosHTML::makeOption( '03', _MAR ), |
mosHTML::makeOption( '03', T_('March') ), |
| 111 |
mosHTML::makeOption( '04', _APR ), |
mosHTML::makeOption( '04', T_('April') ), |
| 112 |
mosHTML::makeOption( '05', _MAY ), |
mosHTML::makeOption( '05', T_('May') ), |
| 113 |
mosHTML::makeOption( '06', _JUN ), |
mosHTML::makeOption( '06', T_('June') ), |
| 114 |
mosHTML::makeOption( '07', _JUL ), |
mosHTML::makeOption( '07', T_('July') ), |
| 115 |
mosHTML::makeOption( '08', _AUG ), |
mosHTML::makeOption( '08', T_('August') ), |
| 116 |
mosHTML::makeOption( '09', _SEP ), |
mosHTML::makeOption( '09', T_('September') ), |
| 117 |
mosHTML::makeOption( '10', _OCT ), |
mosHTML::makeOption( '10', T_('October') ), |
| 118 |
mosHTML::makeOption( '11', _NOV ), |
mosHTML::makeOption( '11', T_('November') ), |
| 119 |
mosHTML::makeOption( '12', _DEC ) |
mosHTML::makeOption( '12', T_('December') ) |
| 120 |
); |
); |
| 121 |
|
|
| 122 |
return mosHTML::selectList( $arr, $tag_name, $tag_attribs, 'value', 'text', $selected ); |
return mosHTML::selectList( $arr, $tag_name, $tag_attribs, 'value', 'text', $selected ); |
| 129 |
* @param mixed The key that is selected |
* @param mixed The key that is selected |
| 130 |
* @returns string HTML for the select list values |
* @returns string HTML for the select list values |
| 131 |
*/ |
*/ |
| 132 |
function yesnoSelectList( $tag_name, $tag_attribs, $selected, $yes=_CMN_YES, $no=_CMN_NO ) { |
function yesnoSelectList( $tag_name, $tag_attribs, $selected, $yes=false, $no=false ) { |
| 133 |
$arr = array( |
$arr = array( |
| 134 |
mosHTML::makeOption( '0', $no ), |
mosHTML::makeOption( '0', $no ? $no : T_('No') ), |
| 135 |
mosHTML::makeOption( '1', $yes ), |
mosHTML::makeOption( '1', $yes ? $yes : T_('Yes') ), |
| 136 |
); |
); |
| 137 |
|
|
| 138 |
return mosHTML::selectList( $arr, $tag_name, $tag_attribs, 'value', 'text', $selected ); |
return mosHTML::selectList( $arr, $tag_name, $tag_attribs, 'value', 'text', $selected ); |
| 151 |
function radioList( &$arr, $tag_name, $tag_attribs, $selected=null, $key='value', $text='text' ) { |
function radioList( &$arr, $tag_name, $tag_attribs, $selected=null, $key='value', $text='text' ) { |
| 152 |
reset( $arr ); |
reset( $arr ); |
| 153 |
$html = ""; |
$html = ""; |
| 154 |
for ($i=0, $n=count( $arr ); $i < $n; $i++ ) { |
foreach ($arr as $choice) { |
| 155 |
$k = $arr[$i]->$key; |
$id = @$choice->id; |
| 156 |
$t = $arr[$i]->$text; |
$extra = $id ? " id=\"" . $choice->id . "\"" : ''; |
|
$id = @$arr[$i]->id; |
|
|
|
|
|
$extra = ''; |
|
|
$extra .= $id ? " id=\"" . $arr[$i]->id . "\"" : ''; |
|
| 157 |
if (is_array( $selected )) { |
if (is_array( $selected )) { |
| 158 |
foreach ($selected as $obj) { |
foreach ($selected as $obj) { |
| 159 |
$k2 = $obj->$key; |
if ($choice->$key == $obj->$key) { |
| 160 |
if ($k == $k2) { |
$extra .= ' selected="selected"'; |
|
$extra .= " selected=\"selected\""; |
|
| 161 |
break; |
break; |
| 162 |
} |
} |
| 163 |
} |
} |
| 164 |
} else { |
} else { |
| 165 |
$extra .= ($k == $selected ? " checked=\"checked\"" : ''); |
$extra .= ($choice->$key == $selected ? " checked=\"checked\"" : ''); |
| 166 |
} |
} |
| 167 |
$html .= "\n\t<input type=\"radio\" name=\"$tag_name\" value=\"".$k."\"$extra $tag_attribs />" . $t; |
$html .= "\n\t<input type=\"radio\" name=\"$tag_name\" value=\"".$choice->$key."\"$extra $tag_attribs />" . $choice->$text; |
| 168 |
} |
} |
| 169 |
$html .= "\n"; |
$html .= "\n"; |
| 170 |
return $html; |
return $html; |
| 177 |
* @param mixed The key that is selected |
* @param mixed The key that is selected |
| 178 |
* @returns string HTML for the radio list |
* @returns string HTML for the radio list |
| 179 |
*/ |
*/ |
| 180 |
function yesnoRadioList( $tag_name, $tag_attribs, $selected, $yes=_CMN_YES, $no=_CMN_NO ) { |
function yesnoRadioList( $tag_name, $tag_attribs, $selected, $yes=false, $no=false ) { |
| 181 |
|
|
| 182 |
$arr = array( |
$arr = array( |
| 183 |
mosHTML::makeOption( '0', $no, true ), |
mosHTML::makeOption( '0', $no ? $no : T_('No') ), |
| 184 |
mosHTML::makeOption( '1', $yes, true ) |
mosHTML::makeOption( '1', $yes ? $yes : T_('Yes') ) |
| 185 |
); |
); |
| 186 |
return mosHTML::radioList( $arr, $tag_name, $tag_attribs, $selected ); |
return mosHTML::radioList( $arr, $tag_name, $tag_attribs, $selected ); |
| 187 |
} |
} |
| 202 |
} |
} |
| 203 |
|
|
| 204 |
function sortIcon( $base_href, $field, $state='none' ) { |
function sortIcon( $base_href, $field, $state='none' ) { |
| 205 |
global $mosConfig_live_site; |
$mosConfig_live_site = mamboCore::get('mosConfig_live_site'); |
|
|
|
| 206 |
$alts = array( |
$alts = array( |
| 207 |
'none' => _CMN_SORT_NONE, |
'none' => T_('No Sorting'), |
| 208 |
'asc' => _CMN_SORT_ASC, |
'asc' => T_('Sort Ascending'), |
| 209 |
'desc' => _CMN_SORT_DESC, |
'desc' => T_('Sort Descending'), |
| 210 |
); |
); |
| 211 |
$next_state = 'asc'; |
$next_state = 'asc'; |
| 212 |
if ($state == 'asc') { |
if ($state == 'asc') { |
| 231 |
<div align="center" style="margin-top: 30px; margin-bottom: 30px;"> |
<div align="center" style="margin-top: 30px; margin-bottom: 30px;"> |
| 232 |
<a href='javascript:window.close();'> |
<a href='javascript:window.close();'> |
| 233 |
<span class="small"> |
<span class="small"> |
| 234 |
<?php echo _PROMPT_CLOSE;?> |
<?php echo T_('Close Window');?> |
| 235 |
</span> |
</span> |
| 236 |
</a> |
</a> |
| 237 |
</div> |
</div> |
| 248 |
?> |
?> |
| 249 |
<div class="back_button"> |
<div class="back_button"> |
| 250 |
<a href='javascript:history.go(-1)'> |
<a href='javascript:history.go(-1)'> |
| 251 |
<?php echo _BACK; ?> |
<?php echo T_('Back'); ?> |
| 252 |
</a> |
</a> |
| 253 |
</div> |
</div> |
| 254 |
<?php |
<?php |
| 275 |
* Writes Print icon |
* Writes Print icon |
| 276 |
*/ |
*/ |
| 277 |
function PrintIcon( &$row, &$params, $hide_js, $link, $status=NULL ) { |
function PrintIcon( &$row, &$params, $hide_js, $link, $status=NULL ) { |
|
global $mosConfig_live_site, $mosConfig_absolute_path, $cur_template, $Itemid; |
|
| 278 |
if ( $params->get( 'print' ) && !$hide_js ) { |
if ( $params->get( 'print' ) && !$hide_js ) { |
| 279 |
// use default settings if none declared |
// use default settings if none declared |
| 280 |
if ( !$status ) { |
if ( !$status ) { |
| 283 |
|
|
| 284 |
// checks template image directory for image, if non found default are loaded |
// checks template image directory for image, if non found default are loaded |
| 285 |
if ( $params->get( 'icons' ) ) { |
if ( $params->get( 'icons' ) ) { |
| 286 |
$mainframe = mosMainFrame::getInstance(); |
$mainframe =& mosMainFrame::getInstance(); |
| 287 |
$image = $mainframe->ImageCheck( 'printButton.png', '/images/M_images/', NULL, NULL, _CMN_PRINT ); |
$image = $mainframe->ImageCheck( 'printButton.png', '/images/M_images/', NULL, NULL, T_('Print')); |
| 288 |
} else { |
} else { |
| 289 |
$image = _ICON_SEP .' '. _CMN_PRINT. ' '. _ICON_SEP; |
$image = _ICON_SEP .' '. T_('Print'). ' '. _ICON_SEP; |
| 290 |
} |
} |
| 291 |
|
|
| 292 |
if ( $params->get( 'popup' ) && !$hide_js ) { |
if ( $params->get( 'popup' ) && !$hide_js ) { |
| 293 |
// Print Preview button - used when viewing page |
// Print Preview button - used when viewing page |
| 294 |
?> |
?> |
| 295 |
<td align="right" width="100%" class="buttonheading"> |
<td align="right" class="buttonheading"> |
| 296 |
<a href="#" onclick="javascript:window.print(); return false" title="<?php echo _CMN_PRINT;?>"> |
<a href="#" onclick="javascript:window.print(); return false" title="<?php echo T_('Print');?>"> |
| 297 |
<?php echo $image;?> |
<?php echo $image;?> |
| 298 |
</a> |
</a> |
| 299 |
</td> |
</td> |
| 301 |
} else { |
} else { |
| 302 |
// Print Button - used in pop-up window |
// Print Button - used in pop-up window |
| 303 |
?> |
?> |
| 304 |
<td align="right" width="100%" class="buttonheading"> |
<td align="right" class="buttonheading"> |
| 305 |
<a href="javascript:void window.open('<?php echo $link; ?>', 'win2', '<?php echo $status; ?>');" title="<?php echo _CMN_PRINT;?>"> |
<a href="javascript:void window.open('<?php echo $link; ?>', 'win2', '<?php echo $status; ?>');" title="<?php echo T_('Print');?>"> |
| 306 |
<?php echo $image;?> |
<?php echo $image;?> |
| 307 |
</a> |
</a> |
| 308 |
</td> |
</td> |
| 358 |
$replacement .= "//--> \n"; |
$replacement .= "//--> \n"; |
| 359 |
$replacement .= "</script> \n"; |
$replacement .= "</script> \n"; |
| 360 |
$replacement .= "<noscript> \n"; |
$replacement .= "<noscript> \n"; |
| 361 |
$replacement .= _CLOAKING; |
$replacement .= T_('This email address is being protected from spam bots, you need Javascript enabled to view it'); |
| 362 |
$replacement .= "\n</noscript> \n"; |
$replacement .= "\n</noscript> \n"; |
| 363 |
|
|
| 364 |
return $replacement; |
return $replacement; |
| 383 |
<table cellspacing="0" cellpadding="4" border="0" align="center"> |
<table cellspacing="0" cellpadding="4" border="0" align="center"> |
| 384 |
<tr align="center"> |
<tr align="center"> |
| 385 |
<td> |
<td> |
| 386 |
<img src="images/publish_y.png" width="12" height="12" border="0" alt="Pending" /> |
<img src="images/publish_y.png" width="12" height="12" border="0" alt="<?php echo T_('Pending') ?>" /> |
| 387 |
</td> |
</td> |
| 388 |
<td> |
<td> |
| 389 |
Published, but is <u>Pending</u> | |
<?php echo T_('Published, but is <u>Pending</u>') ?> | |
| 390 |
</td> |
</td> |
| 391 |
<td> |
<td> |
| 392 |
<img src="images/publish_g.png" width="12" height="12" border="0" alt="Visible" /> |
<img src="images/publish_g.png" width="12" height="12" border="0" alt="<?php echo T_('Visible') ?>" /> |
| 393 |
</td> |
</td> |
| 394 |
<td> |
<td> |
| 395 |
Published and is <u>Current</u> | |
<?php echo T_('Published and is <u>Current</u>') ?> | |
| 396 |
</td> |
</td> |
| 397 |
<td> |
<td> |
| 398 |
<img src="images/publish_r.png" width="12" height="12" border="0" alt="Finished" /> |
<img src="images/publish_r.png" width="12" height="12" border="0" alt="<?php echo T_('Finished') ?>" /> |
| 399 |
</td> |
</td> |
| 400 |
<td> |
<td> |
| 401 |
Published, but has <u>Expired</u> | |
<?php echo T_('Published, but has <u>Expired</u>') ?> | |
| 402 |
</td> |
</td> |
| 403 |
<td> |
<td> |
| 404 |
<img src="images/publish_x.png" width="12" height="12" border="0" alt="Finished" /> |
<img src="images/publish_x.png" width="12" height="12" border="0" alt="<?php echo T_('Finished') ?>" /> |
| 405 |
</td> |
</td> |
| 406 |
<td> |
<td> |
| 407 |
Not Published |
<?php echo T_('Not Published') ?> |
| 408 |
</td> |
</td> |
| 409 |
</tr> |
</tr> |
| 410 |
<tr> |
<tr> |
| 411 |
<td colspan="8" align="center"> |
<td colspan="8" align="center"> |
| 412 |
Click on icon to toggle state. |
<?php echo T_('Click on icon to toggle state.') ?> |
| 413 |
</td> |
</td> |
| 414 |
</tr> |
</tr> |
| 415 |
</table> |
</table> |
| 446 |
</tr> |
</tr> |
| 447 |
<tr> |
<tr> |
| 448 |
<td width="90px" valign="top"> |
<td width="90px" valign="top"> |
| 449 |
Menu |
<?php echo T_('Menu') ?> |
| 450 |
</td> |
</td> |
| 451 |
<td> |
<td> |
| 452 |
<a href="javascript:go2( 'go2menu', '<?php echo $menu->menutype; ?>' );" title="Go to Menu"> |
<a href="javascript:go2( 'go2menu', '<?php echo $menu->menutype; ?>' );" title="<?php echo T_('Go to Menu') ?>"> |
| 453 |
<?php echo $menu->menutype; ?> |
<?php echo $menu->menutype; ?> |
| 454 |
</a> |
</a> |
| 455 |
</td> |
</td> |
| 456 |
</tr> |
</tr> |
| 457 |
<tr> |
<tr> |
| 458 |
<td width="90px" valign="top"> |
<td width="90px" valign="top"> |
| 459 |
Link Name |
<?php echo T_('Link Name') ?> |
| 460 |
</td> |
</td> |
| 461 |
<td> |
<td> |
| 462 |
<strong> |
<strong> |
| 463 |
<a href="javascript:go2( 'go2menuitem', '<?php echo $menu->menutype; ?>', '<?php echo $menu->id; ?>' );" title="Go to Menu Item"> |
<a href="javascript:go2( 'go2menuitem', '<?php echo $menu->menutype; ?>', '<?php echo $menu->id; ?>' );" title="<?php echo T_('Go to Menu Item') ?>"> |
| 464 |
<?php echo $menu->name; ?> |
<?php echo $menu->name; ?> |
| 465 |
</a> |
</a> |
| 466 |
</strong> |
</strong> |
| 468 |
</tr> |
</tr> |
| 469 |
<tr> |
<tr> |
| 470 |
<td width="90px" valign="top"> |
<td width="90px" valign="top"> |
| 471 |
State |
<?php echo T_('State') ?> |
| 472 |
</td> |
</td> |
| 473 |
<td> |
<td> |
| 474 |
<?php |
<?php |
| 475 |
switch ( $menu->published ) { |
switch ( $menu->published ) { |
| 476 |
case -2: |
case -2: |
| 477 |
echo '<font color="red">Trashed</font>'; |
echo '<font color="red">'.T_('Trashed').'</font>'; |
| 478 |
break; |
break; |
| 479 |
case 0: |
case 0: |
| 480 |
echo 'UnPublished'; |
echo T_('UnPublished') ; |
| 481 |
break; |
break; |
| 482 |
case 1: |
case 1: |
| 483 |
default: |
default: |
| 484 |
echo '<font color="green">Published</font>'; |
echo '<font color="green">'.T_('Published').'</font>'; |
| 485 |
break; |
break; |
| 486 |
} |
} |
| 487 |
?> |
?> |
| 525 |
</tr> |
</tr> |
| 526 |
<tr> |
<tr> |
| 527 |
<td width="90px" valign="top"> |
<td width="90px" valign="top"> |
| 528 |
Menu |
<?php echo T_('Menu') ?> |
| 529 |
</td> |
</td> |
| 530 |
<td> |
<td> |
| 531 |
<a href="javascript:go2( 'go2menu', '<?php echo $menu->menutype; ?>' );" title="Go to Menu"> |
<a href="javascript:go2( 'go2menu', '<?php echo $menu->menutype; ?>' );" title="<?php echo T_('Go to Menu') ?>"> |
| 532 |
<?php echo $menu->menutype; ?> |
<?php echo $menu->menutype; ?> |
| 533 |
</a> |
</a> |
| 534 |
</td> |
</td> |
| 535 |
</tr> |
</tr> |
| 536 |
<tr> |
<tr> |
| 537 |
<td width="90px" valign="top"> |
<td width="90px" valign="top"> |
| 538 |
Type |
<?php echo T_('Type') ?> |
| 539 |
</td> |
</td> |
| 540 |
<td> |
<td> |
| 541 |
<?php echo $menu->type; ?> |
<?php echo $menu->type; ?> |
| 543 |
</tr> |
</tr> |
| 544 |
<tr> |
<tr> |
| 545 |
<td width="90px" valign="top"> |
<td width="90px" valign="top"> |
| 546 |
Item Name |
<?php echo T_('Item Name') ?> |
| 547 |
</td> |
</td> |
| 548 |
<td> |
<td> |
| 549 |
<strong> |
<strong> |
| 550 |
<a href="javascript:go2( 'go2menuitem', '<?php echo $menu->menutype; ?>', '<?php echo $menu->id; ?>' );" title="Go to Menu Item"> |
<a href="javascript:go2( 'go2menuitem', '<?php echo $menu->menutype; ?>', '<?php echo $menu->id; ?>' );" title="<?php echo T_('Go to Menu Item') ?>"> |
| 551 |
<?php echo $menu->name; ?> |
<?php echo $menu->name; ?> |
| 552 |
</a> |
</a> |
| 553 |
</strong> |
</strong> |
| 555 |
</tr> |
</tr> |
| 556 |
<tr> |
<tr> |
| 557 |
<td width="90px" valign="top"> |
<td width="90px" valign="top"> |
| 558 |
State |
<?php echo T_('State') ?> |
| 559 |
</td> |
</td> |
| 560 |
<td> |
<td> |
| 561 |
<?php |
<?php |
| 562 |
switch ( $menu->published ) { |
switch ( $menu->published ) { |
| 563 |
case -2: |
case -2: |
| 564 |
echo '<font color="red">Trashed</font>'; |
echo '<font color="red">'.T_('Trashed').'</font>'; |
| 565 |
break; |
break; |
| 566 |
case 0: |
case 0: |
| 567 |
echo 'UnPublished'; |
echo T_('UnPublished'); |
| 568 |
break; |
break; |
| 569 |
case 1: |
case 1: |
| 570 |
default: |
default: |
| 571 |
echo '<font color="green">Published</font>'; |
echo '<font color="green">'.T_('Published').'</font>'; |
| 572 |
break; |
break; |
| 573 |
} |
} |
| 574 |
?> |
?> |
| 592 |
$checked_out_text .= '<tr><td>'. $date .'</td></tr>'; |
$checked_out_text .= '<tr><td>'. $date .'</td></tr>'; |
| 593 |
$checked_out_text .= '<tr><td>'. $time .'</td></tr>'; |
$checked_out_text .= '<tr><td>'. $time .'</td></tr>'; |
| 594 |
$checked_out_text .= '</table>'; |
$checked_out_text .= '</table>'; |
| 595 |
$hover = 'onMouseOver="return overlib(\''. $checked_out_text .'\', CAPTION, \'Checked Out\', BELOW, RIGHT);" onMouseOut="return nd();"'; |
$hover = 'onMouseOver="return overlib(\''. $checked_out_text .'\', CAPTION, \''.T_('Checked Out') .'\', BELOW, RIGHT);" onMouseOut="return nd();"'; |
| 596 |
} |
} |
| 597 |
$checked = '<img src="images/checked_out.png" '. $hover .'/>'; |
$checked = '<img src="images/checked_out.png" '. $hover .'/>'; |
| 598 |
|
|
| 603 |
* Loads all necessary files for JS Overlib tooltips |
* Loads all necessary files for JS Overlib tooltips |
| 604 |
*/ |
*/ |
| 605 |
function loadOverlib() { |
function loadOverlib() { |
|
global $mosConfig_live_site; |
|
| 606 |
?> |
?> |
| 607 |
<script language="Javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script> |
<script language="Javascript" src="<?php echo mamboCore::get('mosConfig_live_site');?>/includes/js/overlib_mini.js"></script> |
| 608 |
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> |
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> |
| 609 |
<?php |
<?php |
| 610 |
} |
} |
| 614 |
* Loads all necessary files for JS Calendar |
* Loads all necessary files for JS Calendar |
| 615 |
*/ |
*/ |
| 616 |
function loadCalendar() { |
function loadCalendar() { |
| 617 |
global $mosConfig_live_site; |
$mosConfig_live_site = mamboCore::get('mosConfig_live_site'); |
| 618 |
?> |
?> |
| 619 |
<link rel="stylesheet" type="text/css" media="all" href="<?php echo $mosConfig_live_site;?>/includes/js/calendar/calendar-mos.css" title="green" /> |
<link rel="stylesheet" type="text/css" media="all" href="<?php echo $mosConfig_live_site;?>/includes/js/calendar/calendar-mos.css" title="green" /> |
| 620 |
<!-- import the calendar script --> |
<!-- import the calendar script --> |
| 646 |
} |
} |
| 647 |
|
|
| 648 |
function CheckedOutProcessing( &$row, $i ) { |
function CheckedOutProcessing( &$row, $i ) { |
| 649 |
global $my; |
$my = mamboCore::get('currentUser'); |
|
|
|
| 650 |
if ( $row->checked_out ) { |
if ( $row->checked_out ) { |
| 651 |
$checked = mosCommonHTML::checkedOut( $row ); |
$checked = mosCommonHTML::checkedOut( $row ); |
| 652 |
} else { |
} else { |
| 659 |
function PublishedProcessing( &$row, $i ) { |
function PublishedProcessing( &$row, $i ) { |
| 660 |
$img = $row->published ? 'publish_g.png' : 'publish_x.png'; |
$img = $row->published ? 'publish_g.png' : 'publish_x.png'; |
| 661 |
$task = $row->published ? 'unpublish' : 'publish'; |
$task = $row->published ? 'unpublish' : 'publish'; |
| 662 |
$alt = $row->published ? 'Published' : 'Unpublished'; |
$alt = $row->published ? T_('Published') : T_('Unpublished'); |
| 663 |
$action = $row->published ? 'Unpublish Item' : 'Publish item'; |
$action = $row->published ? T_('Unpublish Item') : T_('Publish item'); |
| 664 |
|
|
| 665 |
$href = ' |
$href = ' |
| 666 |
<a href="javascript: void(0);" onclick="return listItemTask(\'cb'. $i .'\',\''. $task .'\')" title="'. $action .'"> |
<a href="javascript: void(0);" onclick="return listItemTask(\'cb'. $i .'\',\''. $task .'\')" title="'. $action .'"> |
| 672 |
} |
} |
| 673 |
} |
} |
| 674 |
|
|
| 675 |
|
/** |
| 676 |
|
* Tab Creation handler |
| 677 |
|
* @package Mambo |
| 678 |
|
* @author Phil Taylor |
| 679 |
|
*/ |
| 680 |
|
class mosTabs { |
| 681 |
|
/** @var int Use cookies */ |
| 682 |
|
var $useCookies = 0; |
| 683 |
|
|
| 684 |
|
/** |
| 685 |
|
* Constructor |
| 686 |
|
* Includes files needed for displaying tabs and sets cookie options |
| 687 |
|
* @param int useCookies, if set to 1 cookie will hold last used tab between page refreshes |
| 688 |
|
*/ |
| 689 |
|
function mosTabs($useCookies) { |
| 690 |
|
$mosConfig_live_site = mamboCore::get('mosConfig_live_site'); |
| 691 |
|
echo "<link id=\"luna-tab-style-sheet\" type=\"text/css\" rel=\"stylesheet\" href=\"" . $mosConfig_live_site. "/includes/js/tabs/tabpane.css\" />"; |
| 692 |
|
echo "<script type=\"text/javascript\" src=\"". $mosConfig_live_site . "/includes/js/tabs/tabpane.js\"></script>"; |
| 693 |
|
$this->useCookies = $useCookies; |
| 694 |
|
} |
| 695 |
|
|
| 696 |
|
/** |
| 697 |
|
* creates a tab pane and creates JS obj |
| 698 |
|
* @param string The Tab Pane Name |
| 699 |
|
*/ |
| 700 |
|
function startPane($id){ |
| 701 |
|
echo "<div class=\"tab-page\" id=\"".$id."\">"; |
| 702 |
|
echo "<script type=\"text/javascript\">\n"; |
| 703 |
|
echo " var tabPane1 = new WebFXTabPane( document.getElementById( \"".$id."\" ), ".$this->useCookies." )\n"; |
| 704 |
|
echo "</script>\n"; |
| 705 |
|
} |
| 706 |
|
|
| 707 |
|
/** |
| 708 |
|
* Ends Tab Pane |
| 709 |
|
*/ |
| 710 |
|
function endPane() { |
| 711 |
|
echo "</div>"; |
| 712 |
|
} |
| 713 |
|
|
| 714 |
|
/* |
| 715 |
|
* Creates a tab with title text and starts that tabs page |
| 716 |
|
* @param tabText - This is what is displayed on the tab |
| 717 |
|
* @param paneid - This is the parent pane to build this tab on |
| 718 |
|
*/ |
| 719 |
|
function startTab( $tabText, $paneid ) { |
| 720 |
|
echo "<div class=\"tab-page\" id=\"".$paneid."\">"; |
| 721 |
|
echo "<h2 class=\"tab\">".$tabText."</h2>"; |
| 722 |
|
echo "<script type=\"text/javascript\">\n"; |
| 723 |
|
echo " tabPane1.addTabPage( document.getElementById( \"".$paneid."\" ) );"; |
| 724 |
|
echo "</script>"; |
| 725 |
|
} |
| 726 |
|
|
| 727 |
|
/* |
| 728 |
|
* Ends a tab page |
| 729 |
|
*/ |
| 730 |
|
function endTab() { |
| 731 |
|
echo "</div>"; |
| 732 |
|
} |
| 733 |
|
} |
| 734 |
|
|
| 735 |
?> |
?> |