| [ Index ] | PHP Cross Reference of Mambo 4.6.5 |
|
| [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Mambo 4 * @subpackage Menus 5 * @author Mambo Foundation Inc see README.php 6 * @copyright (C) 2000 - 2009 Mambo Foundation Inc. 7 * See COPYRIGHT.php for copyright notices and details. 8 * @license GNU/GPL Version 2, see LICENSE.php 9 * 10 * Redistributions of files must retain the above copyright notice. 11 * 12 * Mambo is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU General Public License 14 * as published by the Free Software Foundation; version 2 of the License. 15 */ 16 17 /** ensure this file is being included by a parent file */ 18 defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); 19 20 /** 21 * Writes the edit form for new and existing content item 22 * 23 * A new record is defined when <var>$row</var> is passed with the <var>id</var> 24 * property set to 0. 25 */ 26 class content_menu_html { 27 28 function edit( &$menu, &$lists, &$params, $option, $content ) { 29 global $mosConfig_live_site; 30 ?> 31 <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> 32 <script type="text/javascript"> 33 function submitbutton(pressbutton) { 34 var form = document.adminForm; 35 if (pressbutton == 'cancel') { 36 submitform( pressbutton ); 37 return; 38 } 39 if (pressbutton == 'redirect') { 40 submitform( pressbutton ); 41 return; 42 } 43 44 // do field validation 45 if (trim(form.name.value) == ""){ 46 alert( "<?php echo T_('Link must have a name'); ?>" ); 47 } else if (trim(form.content_typed.value) == ""){ 48 alert( "<?php echo T_('You must select a Content to link to'); ?>" ); 49 } else { 50 form.link.value = "index.php?option=com_content&task=view&id=" + form.content_typed.value; 51 form.componentid.value = form.content_typed.value; 52 submitform( pressbutton ); 53 } 54 } 55 </script> 56 57 <form action="index2.php" method="post" name="adminForm"> 58 <table class="adminheading"> 59 <tr> 60 <th> 61 <?php echo $menu->id ? T_('Edit') : T_('Add');?> <?php echo T_('Menu Item :: Link - Static Content'); ?> 62 </th> 63 </tr> 64 </table> 65 66 <table width="100%"> 67 <tr valign="top"> 68 <td width="60%"> 69 <table class="adminform"> 70 <tr> 71 <th colspan="2"> 72 <?php echo T_('Details'); ?> 73 </th> 74 </tr> 75 <tr> 76 <td width="10%" align="right"> 77 <?php echo T_('Name:'); ?> 78 </td> 79 <td width="80%"> 80 <input class="inputbox" type="text" name="name" size="50" maxlength="100" value="<?php echo $menu->name; ?>" /> 81 </td> 82 </tr> 83 <tr> 84 <td width="10%" align="right" valign="top"> 85 <?php echo T_('Static Content:'); ?> 86 </td> 87 <td width="80%"> 88 <?php echo $lists['content']; ?> 89 </td> 90 </tr> 91 <tr> 92 <td width="10%" align="right">Url:</td> 93 <td width="80%"> 94 <?php echo $lists['link']; ?> 95 </td> 96 </tr> 97 <tr> 98 <td width="10%" align="right" valign="top"> 99 <?php echo T_('On Click, open:'); ?> 100 </td> 101 <td width="80%"> 102 <?php echo $lists['target']; ?> 103 </td> 104 </tr> 105 <tr> 106 <td align="right"> 107 <?php echo T_('Parent Item:'); ?> 108 </td> 109 <td> 110 <?php echo $lists['parent']; ?> 111 </td> 112 </tr> 113 <tr> 114 <td valign="top" align="right"> 115 <?php echo T_('Ordering:'); ?> 116 </td> 117 <td> 118 <?php echo $lists['ordering']; ?> 119 </td> 120 </tr> 121 <tr> 122 <td valign="top" align="right"> 123 <?php echo T_('Access Level:'); ?> 124 </td> 125 <td> 126 <?php echo $lists['access']; ?> 127 </td> 128 </tr> 129 <tr> 130 <td valign="top" align="right"><?php echo T_('Published:'); ?></td> 131 <td> 132 <?php echo $lists['published']; ?> 133 </td> 134 </tr> 135 <tr> 136 <td colspan="2"> </td> 137 </tr> 138 </table> 139 </td> 140 <td width="40%"> 141 <table class="adminform"> 142 <tr> 143 <th> 144 <?php echo T_('Parameters'); ?> 145 </th> 146 </tr> 147 <tr> 148 <td> 149 <?php echo $params->render();?> 150 </td> 151 </tr> 152 </table> 153 </td> 154 </tr> 155 </table> 156 157 <input type="hidden" name="scid" value="<?php echo $menu->componentid; ?>" /> 158 <input type="hidden" name="option" value="<?php echo $option;?>" /> 159 <input type="hidden" name="id" value="<?php echo $menu->id; ?>" /> 160 <input type="hidden" name="link" value="" /> 161 <input type="hidden" name="menutype" value="<?php echo $menu->menutype; ?>" /> 162 <input type="hidden" name="type" value="<?php echo $menu->type; ?>" /> 163 <input type="hidden" name="task" value="" /> 164 <input type="hidden" name="componentid" value="" /> 165 <input type="hidden" name="hidemainmenu" value="0" /> 166 </form> 167 <script src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js" type="text/javascript"></script> 168 <?php 169 } 170 171 } 172 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed May 23 00:05:01 2012 | Cross-referenced by PHPXref 0.7 |
| Mambo API: Mambo is Free software released under the GNU/General Public License, Version 2 |