本文整理汇总了PHP中getEditorContents函数的典型用法代码示例。如果您正苦于以下问题:PHP getEditorContents函数的具体用法?PHP getEditorContents怎么用?PHP getEditorContents使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getEditorContents函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: editContent
/**
* Writes the edit form for new and existing content item
*
* A new record is defined when <var>$row</var> is passed with the <var>id</var>
* property set to 0.
* @param mosContent The category object
* @param string The html for the groups select list
*/
function editContent(&$row, $section, &$lists, &$images, &$access, $myid, $sectionid, $task, $Itemid)
{
global $mosConfig_live_site;
mosMakeHtmlSafe($row);
$Returnid = intval(mosGetParam($_REQUEST, 'Returnid', $Itemid));
?>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
<link rel="stylesheet" type="text/css" media="all" href="includes/js/calendar/calendar-mos.css" title="green" />
<!-- import the calendar script -->
<script type="text/javascript" src="<?php
echo $mosConfig_live_site;
?>
/includes/js/calendar/calendar.js"></script>
<!-- import the language module -->
<script type="text/javascript" src="<?php
echo $mosConfig_live_site;
?>
/includes/js/calendar/lang/calendar-en.js"></script>
<script language="Javascript" src="<?php
echo $mosConfig_live_site;
?>
/includes/js/overlib_mini.js"></script>
<script language="javascript" type="text/javascript">
onunload = WarnUser;
var folderimages = new Array;
<?php
$i = 0;
foreach ($images as $k => $items) {
foreach ($items as $v) {
echo "\n\tfolderimages[" . $i++ . "] = new Array( '{$k}','" . addslashes($v->value) . "','" . addslashes($v->text) . "' );";
}
}
?>
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
// var goodexit=false;
// assemble the images back into one field
form.goodexit.value=1
var temp = new Array;
for (var i=0, n=form.imagelist.options.length; i < n; i++) {
temp[i] = form.imagelist.options[i].value;
}
form.images.value = temp.join( '\n' );
try {
form.onsubmit();
}
catch(e){}
// do field validation
if (form.title.value == "") {
alert ( "<?php
echo T_('Content item must have a title');
?>
" );
} else if (parseInt('<?php
echo $row->sectionid;
?>
')) {
// for content items
if (getSelectedValue('adminForm','catid') < 1) {
alert ( "<?php
echo T_('Please select a category');
?>
" );
//} else if (form.introtext.value == "") {
// alert ( "<?php
echo T_('Content item must have intro text');
?>
" );
} else {
<?php
getEditorContents('editor1', 'introtext');
getEditorContents('editor2', 'fulltext');
?>
submitform(pressbutton);
}
//} else if (form.introtext.value == "") {
// alert ( "<?php
echo T_('Content item must have intro text');
?>
" );
} else {
// for static content
<?php
getEditorContents('editor1', 'introtext');
?>
submitform(pressbutton);
}
//.........这里部分代码省略.........
开发者ID:jwest00724,项目名称:mambo,代码行数:101,代码来源:content.html.php
示例2: edit
static function edit(&$row, $section, &$lists, $redirect)
{
global $my, $mosConfig_live_site, $mainframe, $option, $doc;
// for J 1.6
$doc->addStyleSheet($mosConfig_live_site . '/components/com_booklibrary/includes/booklibrary.css');
$doc->addScript($mosConfig_live_site . '/components/com_booklibrary/includes/functions.js');
$aa = $row->id ? _BOOKLIBRARY_HEADER_EDIT : _BOOKLIBRARY_HEADER_ADD;
$a = $aa . " " . _BOOKLIBRARY_CATEGORY . " " . $row->name;
$html = '<div class="book_manager_caption"><img src="./components/com_booklibrary/images/cfg.png"/>' . $a . '</div>';
$app = JFactory::getApplication();
$app->JComponentTitle = $html;
if ($row->image == "") {
$row->image = 'blank.png';
}
mosMakeHtmlSafe($row, ENT_QUOTES, 'description');
?>
<script language="javascript" type="text/javascript">
Joomla.submitbutton = function(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
/* [inserted by]: Wonderer */
alias = document.getElementById('alias'); alias = trim(alias.value);
cat_name = document.getElementById('cat_name'); cat_name = trim(cat_name.value);
title = document.getElementById('title'); title.value = cat_name;
if ( alias == '' ) { alert( "<?php
echo _BOOKLIBRARY_ADMIN_INFOTEXT_CAT_CHECK_ERR_ALIAS;
?>
" );return;}
if ( cat_name == '' ) { alert( "<?php
echo _BOOKLIBRARY_ADMIN_INFOTEXT_CAT_CHECK_ERR_NAME;
?>
" );return;}
if ( title == '' ) { alert( "<?php
echo _BOOKLIBRARY_ADMIN_INFOTEXT_CAT_CHECK_ERR_TITLE;
?>
" );return;}
// --
if ( form.name.value == "" ) {
alert('<?php
echo _BOOKLIBRARY_DML_CAT_MUST_SELECT_NAME;
?>
');
} else {
<?php
getEditorContents('editor1', 'description');
?>
submitform(pressbutton);
}
}
function trim(string)
{
return string.replace(/(^\s+)|(\s+$)/g, "");
}
</script>
<?php
global $database;
//my !!!!! -------- langdescription ----------------------------------------------------------------------------------------------
$lg = JFactory::getLanguage();
$installed = $lg->getKnownLanguages();
$languages_row[] = mosHTML::makeOption('*', 'All');
foreach ($installed as $installang) {
$langname = $installang['name'];
$languages_row[] = mosHTML::makeOption($langname, $langname);
}
$langlistshow = mosHTML::selectList($languages_row, 'langshow', 'class="inputbox" size="1"', 'value', 'text', $row->langshow);
$lists['langshow'] = $langlistshow;
//end of my langdecription --------- !!!! ---------------------------------------------------------------------------------------
?>
<form id="adminForm" action="index.php" method="post" name="adminForm">
<table width="100%" class="my_table bl_admin_categories_category">
<tr>
<td valign="top">
<table class="adminform my_table bl_admin_edit_category" width="100%">
<tr>
<th colspan="3"><h1><?php
echo _BOOKLIBRARY_CATEGORIES__DETAILS;
?>
</h1></th>
</tr>
<tr>
<td width="20%"><?php
echo "ID";
?>
:</td>
<td colspan="2" width="80%">
<input readonly="readonly" class="text_area id" type="text" name="catid" id="catid" value="<?php
echo $row->id;
?>
" size="50" maxlength="50" title="" />
</td>
//.........这里部分代码省略.........
开发者ID:rdegennaro,项目名称:Check-It,代码行数:101,代码来源:booklibrary.html.php
示例3: preview
/**
* Writes a preview button for a given option (opens a popup window)
* @param string The name of the popup file (excluding the file extension)
*/
public static function preview($popup = '', $updateEditors = false)
{
global $database;
$image2 = mosAdminMenus::ImageCheckAdmin('preview_f2.png', '/administrator/images/', NULL, NULL, 'Preview', 'preview', 1, 'middle', 'Preview');
$sql = "SELECT template" . "\n FROM #__templates_menu" . "\n WHERE client_id = 0" . "\n AND menuid = 0";
$database->setQuery($sql);
$cur_template = $database->loadResult();
?>
<td>
<script language="javascript" type="text/javascript">
<!--
public static function popup() {
<?php
if ($updateEditors) {
getEditorContents('editor1', 'introtext');
getEditorContents('editor2', 'fulltext');
}
?>
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');
}
//-->
</script>
<a class="toolbar" href="#" onclick="popup();">
<?php
echo $image2;
?>
<br />Preview</a>
</td>
<?php
}
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:40,代码来源:menubar.html.php
示例4: editDocument
function editDocument(&$row, &$lists, $last, $created, &$params)
{
global $database, $mosConfig_offset, $mosConfig_live_site, $mosConfig_locale, $mosConfig_absolute_path;
$tabs = new mosTabs(1);
mosMakeHtmlSafe($row);
DOCMAN_Compat::calendarJS();
?>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
<script language="JavaScript" src="<?php
echo $mosConfig_live_site;
?>
/includes/js/overlib_mini.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
// do field validation
<?php
dmHTML::docEditFieldsJS();
/* Include all edits at once */
?>
if ( $msg != "" ){
$msghdr = "<?php
echo _DML_ENTRY_ERRORS;
?>
";
$msghdr += '\n=================================';
alert( $msghdr+$msg+'\n' );
}else {
<?php
getEditorContents('editor1', 'dmdescription');
?>
submitform( pressbutton );
}
}
//--> end submitbutton
</script>
<style>
select option.label { background-color: #EEE; border: 1px solid #DDD; color : #333; }
</style>
<?php
$tmp = ($row->id ? _DML_EDIT : _DML_ADD) . ' ' . _DML_DOCUMENT;
dmHTML::adminHeading($tmp, 'documents');
?>
<form action="index2.php" method="post" name="adminForm" class="adminform" id="dm_formedit">
<table class="adminform">
<tr>
<th colspan="3"><?php
echo _DML_TITLE_DOCINFORMATION;
?>
</th>
</tr>
<?php
HTML_DMDocuments::_showTabBasic($row, $lists, $last, $created);
?>
<tr>
<td colspan="2">
<?php
$tabs->startPane("content-pane");
$tabs->startTab(_DML_DOC, "document-page");
HTML_DMDocuments::_showTabDocument($row, $lists, $last, $created);
$tabs->endTab();
$tabs->startTab(_DML_TAB_PERMISSIONS, "ownership-page");
HTML_DMDocuments::_showTabPermissions($row, $lists, $last, $created);
$tabs->endTab();
$tabs->startTab(_DML_TAB_LICENSE, "license-page");
HTML_DMDocuments::_showTabLicense($row, $lists, $last, $created);
if (isset($params)) {
$tabs->endTab();
$tabs->startTab(_DML_TAB_DETAILS, "details-page");
HTML_DMDocuments::_showTabDetails($row, $lists, $last, $created, $params);
}
$tabs->endTab();
$tabs->endPane();
?>
</td>
</tr>
</table>
<input type="hidden" name="original_dmfilename" value="<?php
echo $lists['original_dmfilename'];
?>
" />
<input type="hidden" name="dmsubmitedby" value="<?php
echo $row->dmsubmitedby;
?>
" />
<input type="hidden" name="id" value="<?php
echo $row->id;
?>
" />
<input type="hidden" name="option" value="com_docman" />
//.........这里部分代码省略.........
开发者ID:RangerWalt,项目名称:ecci,代码行数:101,代码来源:documents.html.php
示例5: editModule
/**
* Writes the edit form for new and existing module
*
* A new record is defined when <var>$row</var> is passed with the <var>id</var>
* property set to 0.
* @param mosCategory The category object
* @param array <p>The modules of the left side. The array elements are in the form
* <var>$leftorder[<i>order</i>] = <i>label</i></var>
* where <i>order</i> is the module order from the db table and <i>label</i> is a
* text label associciated with the order.</p>
* @param array See notes for leftorder
* @param array An array of select lists
* @param object Parameters
*/
function editModule(&$row, &$orders2, &$lists, &$params, $option)
{
global $mosConfig_live_site;
global $adminLanguage;
$tabs = new mosTabs(0);
?>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
if ( ( pressbutton == 'save' ) && ( document.adminForm.title.value == "" ) ) {
alert("<?php
echo $adminLanguage->A_COMP_MOD_MUST_TITLE;
?>
");
} else {
<?php
if ($row->module == "") {
getEditorContents('editor1', 'content');
}
?>
submitform(pressbutton);
}
submitform(pressbutton);
}
<!--
var originalOrder = '<?php
echo $row->ordering;
?>
';
var originalPos = '<?php
echo $row->position;
?>
';
var orders = new Array(); // array in the format [key,value,text]
<?php
$i = 0;
foreach ($orders2 as $k => $items) {
foreach ($items as $v) {
echo "\n\torders[" . $i++ . "] = new Array( \"{$k}\",\"{$v->value}\",\"{$v->text}\" );";
}
}
?>
//-->
</script>
<table class="adminheading">
<tr>
<th class="modules">
<?php
echo $row->id ? 'Edit' : 'New';
?>
<?php
echo $lists['client_id'] ? $adminLanguage->A_COMP_MAMB_ADMIN : $adminLanguage->A_COMP_MAMB_SITE;
?>
<?php
echo $adminLanguage->A_COMP_MOD_MODULE;
?>
->
<?php
echo $row->title;
?>
</th>
</tr>
</table>
<form action="index2.php" method="post" name="adminForm">
<table cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td width="60%" valign="top">
<table class="adminform">
<tr>
<th colspan="2">
<?php
echo $adminLanguage->A_COMP_MOD_DETAILS;
?>
</th>
<tr>
<tr>
<td width="100" align="left">
<?php
echo $adminLanguage->A_COMP_TITLE;
?>
:
</td>
//.........这里部分代码省略.........
开发者ID:cwcw,项目名称:cms,代码行数:101,代码来源:admin.modules.html.php
示例6: FORMS_MENU_SAVE_CANCEL
/**
* The function to handle all default page situations
* not responsible for lists!
*/
function FORMS_MENU_SAVE_CANCEL()
{
global $mosConfig_absolute_path, $mosConfig_live_site, $mosConfig_lang, $VM_LANG, $page, $limitstart, $vmIcons;
$no_menu = (int) $_REQUEST['no_menu'];
$bar =& vmToolBar::getInstance('virtuemart');
$is_iframe = vmGet($_REQUEST, 'is_iframe', 0);
$product_parent_id = vmGet($_REQUEST, 'product_parent_id', 0);
$product_id = vmGet($_REQUEST, 'product_id');
$script = '';
if (is_array($product_id)) {
$product_id = "";
}
// These editor arrays tell the toolbar to load correct "getEditorContents" script parts
// This is necessary for WYSIWYG Editors like TinyMCE / mosCE / FCKEditor
$editor1_array = array('product.product_form' => 'product_desc', 'shopper.shopper_group_form' => 'shopper_group_desc', 'product.product_category_form' => 'category_description', 'manufacturer.manufacturer_form' => 'mf_desc', 'store.store_form' => 'vendor_store_desc', 'product.product_type_parameter_form' => 'parameter_description', 'product.product_type_form' => 'product_type_description', 'vendor.vendor_form' => 'vendor_store_desc');
$editor2_array = array('store.store_form' => 'vendor_terms_of_service', 'vendor.vendor_form' => 'vendor_terms_of_service');
$editor1 = isset($editor1_array[$page]) ? $editor1_array[$page] : '';
$editor2 = isset($editor2_array[$page]) ? $editor2_array[$page] : '';
if ($no_menu) {
vmCommonHTML::loadExtJS();
}
$script .= '
var submitbutton = function(pressbutton){
var form = document.adminForm;
if (pressbutton == \'cancel\') {
submitform( pressbutton );
return;
}
';
if ($editor1 != '') {
if (vmIsJoomla(1.5)) {
jimport('joomla.html.editor');
$editor_type = $GLOBALS['mainframe']->getCfg('editor');
if ($editor_type != 'none') {
$editor = JEditor::getInstance();
$script .= $editor->getContent($editor1);
}
} else {
ob_start();
getEditorContents('editor1', $editor1);
$script .= ob_get_contents();
ob_end_clean();
}
}
if ($editor2 != '') {
if (vmIsJoomla(1.5)) {
jimport('joomla.html.editor');
$editor_type = $GLOBALS['mainframe']->getCfg('editor');
if ($editor_type != 'none') {
$editor = JEditor::getInstance();
$script .= $editor->getContent($editor2);
}
} else {
ob_start();
getEditorContents('editor2', $editor2);
$script .= ob_get_contents();
ob_end_clean();
}
}
if ($no_menu) {
$admin = defined('_VM_IS_BACKEND') ? '/administrator' : '';
$script .= "\r\n // define some private variables\r\n var dialog, showBtn;\r\n\r\n var showDialog = function( content ) {\r\n \tExt.Msg.show( { \r\n \t\ttitle: '" . $VM_LANG->_('PEAR_LOG_NOTICE') . "',\r\n \t\tmsg: content,\r\n \t\tautoCreate: true,\r\n width:400,\r\n height:180,\r\n modal: false,\r\n resizable: false,\r\n buttons: Ext.Msg.OK,\r\n shadow:true,\r\n animEl:Ext.get( 'vm-toolbar' )\r\n });\r\n " . (DEBUG ? "" : "setTimeout('Ext.Msg.hide()', 3000);") . "\r\n };\r\n \r\n // return a public interface\r\n var onSuccess = function(o,c) {\r\n\t\tshowDialog( o.responseText );\r\n\t};\r\n var onFailure = function(o) {\r\n\t\tExt.Msg.alert( 'Error!', 'Save action failed: ' + o.statusText );\r\n\t};\r\n\tvar onCallback=function(o,s,r) {\r\n\t\t//if( s ) alert( 'Success' );\r\n\t\t//else alert( 'Failure' );\r\n\t}\r\n\t\r\n \tExt.Ajax.request( { method: 'POST',\r\n \t\t\t\t\t\turl: '{$_SERVER['PHP_SELF']}',\r\n \t\t\t\t\t\tsuccess: onSuccess,\r\n \t\t\t\t\t\tfailure: onFailure,\r\n \t\t\t\t\t\tcallback: onCallback,\r\n \t\t\t\t\t\tisUpload: true,\r\n \t\t\t\t\t\tform: document.adminForm,\r\n \t\t\t\t\t\tparams: { no_html:1 }\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t);\r\n\t";
} else {
$script .= "\n\t\t\tsubmitform( pressbutton );\n";
}
$script .= "\t\t}\n";
$bar->buttons .= $script;
if ($page == "product.product_form" && !empty($product_id)) {
if (empty($product_parent_id)) {
// add new attribute
$href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_attribute_form&product_id=" . $product_id . "&limitstart=" . $limitstart . "&no_menu={$no_menu}";
$alt = $VM_LANG->_('PHPSHOP_ATTRIBUTE_FORM_MNU');
$bar->customHref($href, 'new', $alt);
} else {
// back to parent product
$href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_form&product_id={$product_parent_id}&limitstart=" . $limitstart . "&no_menu={$no_menu}";
$alt = $VM_LANG->_('PHPSHOP_PRODUCT_FORM_RETURN_LBL');
$bar->customHref($href, $vmIcons['back_icon'], $vmIcons['back_icon2'], $alt);
// new child product
$href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_form&product_parent_id={$product_parent_id}&limitstart=" . $limitstart . "&no_menu={$no_menu}";
$alt = $VM_LANG->_('PHPSHOP_PRODUCT_FORM_ADD_ANOTHER_ITEM_MNU');
$bar->customHref($href, 'new', $alt);
}
// Go to Price list
$href = $_SERVER['PHP_SELF'] . "?page=product.product_price_list&product_id={$product_id}&product_parent_id={$product_parent_id}&limitstart={$limitstart}&return_args=&option=com_virtuemart&no_menu={$no_menu}";
$alt = $VM_LANG->_('PHPSHOP_PRICE_LIST_MNU');
$bar->customHref($href, 'new', $alt);
// add product type
$href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_product_type_form&product_id={$product_id}&product_parent_id={$product_parent_id}&limitstart={$limitstart}&no_menu={$no_menu}";
$alt = $VM_LANG->_('PHPSHOP_PRODUCT_PRODUCT_TYPE_FORM_MNU');
$bar->customHref($href, 'new', $alt);
/*** Adding an item is only pssible, if the product has attributes ***/
if (ps_product::product_has_attributes($product_id)) {
// Add Item
$href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_form&product_parent_id={$product_id}&limitstart={$limitstart}&no_menu={$no_menu}";
//.........这里部分代码省略.........
开发者ID:albertobraschi,项目名称:Hab,代码行数:101,代码来源:toolbar.html.php
示例7: JLMS_cLook_Feel
function JLMS_cLook_Feel(&$row, &$lists, $option)
{
JHTML::_('behavior.tooltip');
?>
<script language="javascript" type="text/javascript">
<!--
function setgood() {
return true;
}
function submitbutton(pressbutton) {
var form = document.adminForm;
<?php
if (class_exists('JFactory')) {
$editor =& JLMS07062010_JFactory::getEditor();
echo $editor->save('frontpage_text_guest');
} else {
getEditorContents('editor3', 'frontpage_text_guest');
}
?>
try {
form.onsubmit();
} catch(e) {
//alert(e);
}
var form2 = document.adminForm_text_guest;
try {
form2.onsubmit();
} catch(e) {
//alert(e);
}
form.frontpage_text_guest.value = form2.frontpage_text_guest.value;
submitform( pressbutton );
}
<?php
if (JLMS_J16version()) {
?>
Joomla.submitbutton = submitbutton;
<?php
}
?>
//-->
</script>
<?php
//for table
$colgroup = '
<colgroup>
<col width="180">
</colgroup>
';
?>
<div>
<table width="100%" >
<tr>
<td width="220" valign="top">
<div>
<?php
echo joomla_lms_adm_html::JLMS_menu();
?>
</div>
</td>
<td valign="top">
<div class="width-100">
<fieldset class="adminform">
<?php
if (!class_exists('JToolBarHelper')) {
?>
<table class="adminheading">
<tr>
<th class="config"><?php
echo _JOOMLMS_COMP_NAME;
?>
:
<small>
<?php
echo _JLMS_LF_APPEARANCE;
?>
</small>
</th>
</tr>
</table>
<?php
}
?>
<table width="100%" border="0">
<tr>
<td valign="top" >
<form action="index.php" method="post" name="adminForm" onsubmit="setgood();">
<table >
<tr>
<td>
<div class="width-100">
<fieldset class="adminform"><legend><?php
echo _JLMS_LF_JLMS_TOP_MENU;
?>
</legend>
<table cellpadding="0" cellspacing="0">
<?php
//.........这里部分代码省略.........
开发者ID:parkmi,项目名称:dolschool14,代码行数:101,代码来源:admin.joomla_lms.html.php
示例8: edit
/**
* Writes the edit form for new and existing categories
*
* A new record is defined when <var>$row</var> is passed with the <var>id</var>
* property set to 0. Note that the <var>section</var> property <b>must</b> be defined
* even for a new record.
* @param mosCategory The category object
* @param string The html for the image list select list
* @param string The html for the image position select list
* @param string The html for the ordering list
* @param string The html for the groups select list
*/
function edit(&$row, $option, &$lists, &$menus)
{
global $mosConfig_live_site;
if ($row->name != '') {
$name = $row->name;
} else {
$name = "Nova Seção";
}
if ($row->image == "") {
$row->image = 'blank.png';
}
mosMakeHtmlSafe($row, ENT_QUOTES, 'descrição');
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
if ( pressbutton == 'menulink' ) {
if ( form.menuselect.value == "" ) {
alert( "Selecione um menu" );
return;
} else if ( form.link_type.value == "" ) {
alert( "Por favor, selecione um tipo de menu" );
return;
} else if ( form.link_name.value == "" ) {
alert( "Por favor, informe um nome para este item do menu" );
return;
}
}
if (form.name.value == ""){
alert("Seção tem que possuir um nome");
} else if (form.title.value ==""){
alert("A seção tem que possuir um título");
} else {
<?php
getEditorContents('editor1', 'description');
?>
submitform(pressbutton);
}
}
</script>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th class="sections">
Seção:
<small>
<?php
echo $row->id ? 'Editar' : 'Nova';
?>
</small>
<small><small>
[ <?php
echo stripslashes($name);
?>
]
</small></small>
</th>
</tr>
</table>
<table width="100%">
<tr>
<td valign="top" width="60%">
<table class="adminform">
<tr>
<th colspan="3">
Detalhes da Seção
</th>
<tr>
<tr>
<td width="100">
Âmbito:
</td>
<td width="85%" colspan="2">
<strong>
<?php
echo $row->scope;
?>
</strong>
</td>
</tr>
//.........这里部分代码省略.........
开发者ID:patricmutwiri,项目名称:joomlaclube,代码行数:101,代码来源:admin.sections.html.php
示例9: getEditorContents
";
}
}
}
}
if ( msg != '' ){
msghdr = '<?php
echo _DML_ENTRY_ERRORS;
?>
';
msghdr += '\n=================================';
alert( msghdr + msg + '\n' );
} else {
/* for static content */
<?php
getEditorContents('editor1', 'dmdescription');
?>
submitform(pressbutton);
}
}
function setgood() {
document.adminForm.goodexit.value=1;
}
function WarnUser() {
}
<?php
die;
开发者ID:RangerWalt,项目名称:ecci,代码行数:31,代码来源:form_docedit.tpl.php
示例10: edit
/**
* Writes the edit form for new and existing categories
*
* A new record is defined when <var>$row</var> is passed with the <var>id</var>
* property set to 0. Note that the <var>section</var> property <b>must</b> be defined
* even for a new record.
* @param mosCategory The category object
* @param string The html for the image list select list
* @param string The html for the image position select list
* @param string The html for the ordering list
* @param string The html for the groups select list
*/
function edit(&$row, $option, &$lists, &$menus)
{
global $mosConfig_live_site;
if ($row->name != '') {
$name = $row->name;
} else {
$name = "New Section";
}
if ($row->image == "") {
$row->image = 'blank.png';
}
mosMakeHtmlSafe($row, ENT_QUOTES, 'description');
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
if ( pressbutton == 'menulink' ) {
if ( form.menuselect.value == "" ) {
alert( "Please select a Menu" );
return;
} else if ( form.link_type.value == "" ) {
alert( "Please select a menu type" );
return;
} else if ( form.link_name.value == "" ) {
alert( "Please enter a Name for this menu item" );
return;
}
}
if (form.name.value == ""){
alert("Section must have a name");
} else if (form.title.value ==""){
alert("Section must have a title");
} else {
<?php
getEditorContents('editor1', 'description');
?>
submitform(pressbutton);
}
}
</script>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th class="sections">
Section:
<small>
<?php
echo $row->id ? 'Edit' : 'New';
?>
</small>
<small><small>
[ <?php
echo stripslashes($name);
?>
]
</small></small>
</th>
</tr>
</table>
<table width="100%">
<tr>
<td valign="top" width="60%">
<table class="adminform">
<tr>
<th colspan="3">
Section Details
</th>
<tr>
<tr>
<td width="100">
Scope:
</td>
<td width="85%" colspan="2">
<strong>
<?php
echo $row->scope;
?>
</strong>
</td>
</tr>
//.........这里部分代码省略.........
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:101,代码来源:admin.sections.html.php
示例11: edit
/**
* Writes the edit form for new and existing categories
*
* A new record is defined when <var>$row</var> is passed with the <var>id</var>
* property set to 0. Note that the <var>section</var> property <b>must</b> be defined
* even for a new record.
* @param mosCategory The category object
* @param string The html for the image list select list
* @param string The html for the image position select list
* @param string The html for the ordering list
* @param string The html for the groups select list
*/
function edit(&$row, $option, &$lists, &$menus)
{
global $mosConfig_live_site;
if ($row->name != '') {
$name = $row->name;
} else {
$name = T_("New Section");
}
if ($row->image == "") {
$row->image = 'blank.png';
}
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
if ( pressbutton == 'menulink' ) {
if ( form.menuselect.value == "" ) {
alert( "<?php
echo T_('Please select a Menu');
?>
" );
return;
} else if ( form.link_type.value == "" ) {
alert( "<?php
echo T_('Please select a menu type');
?>
" );
return;
} else if ( form.link_name.value == "" ) {
alert( "<?php
echo T_('Please enter a Name for this menu item');
?>
" );
return;
}
}
if (form.name.value == ""){
alert("<?php
echo T_('Section must have a name');
?>
");
} else if (form.title.value ==""){
alert("<?php
echo T_('Section must have a title');
?>
");
} else {
<?php
getEditorContents('editor1', 'description');
?>
submitform(pressbutton);
}
}
// show / hide publishing information
function displayParameterInfo()
{
if(document.getElementById('simpleediting').style.display == 'block')
{
document.getElementById('simpleediting').style.display = 'none';
document.getElementById('show').style.display = 'block';
document.getElementById('hide').style.display = 'none';
document.adminForm.simple_editing.value ='on';
}
else
{
document.getElementById('simpleediting').style.display = 'block';
document.getElementById('show').style.display = 'none';
document.getElementById('hide').style.display = 'block';
document.adminForm.simple_editing.value ='off';
}
}
</script>
<?php
if ($_SESSION['simple_editing'] == 'on') {
$simpleediting = 'none';
$simple = 'block';
$advanced = 'none';
} else {
$advanced = 'block';
$simple = 'none';
//.........这里部分代码省略.........
开发者ID:jwest00724,项目名称:mambo,代码行数:101,代码来源:admin.sections.html.php
示例12: editLicense
function editLicense($option, &$row)
{
global $mosConfig_absolute_path;
mosMakeHtmlSafe($row);
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
if (form.name.value == "") {
alert ( "<?php
echo _E_WARNTITLE;
?>
" );
} else {
<?php
getEditorContents('editor1', 'license');
?>
submitform( pressbutton );
}
}
</script>
<form action="index2.php" method="post" name="adminForm" id="adminForm">
<?php
$tmp = ($row->id ? _DML_EDIT : _DML_ADD) . ' ' . _DML_LICENSES;
dmHTML::adminHeading($tmp, 'licenses');
?>
<table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
<tr>
<td width="20%" align="right"><?php
echo _DML_NAME;
?>
:</td>
<td width="80%">
<input class="inputbox" type="text" name="name" size="50" maxlength="100" value="<?php
echo $row->name;
?>
" />
</td>
</tr>
<tr>
<td valign="top" align="right"><?php
echo _DML_LICENSE_TEXT;
?>
:</td>
<td>
<?php
DOCMAN_Compat::editorArea('editor1', $row->license, 'license', '700', '600', '60', '30');
?>
</td>
</tr>
<input type="hidden" name="id" value="<?php
echo $row->id;
?>
" />
<input type="hidden" name="option" value="com_docman" />
<input type="hidden" name="section" value="licenses" />
<input type="hidden" name="task" value="" />
<?php
echo DOCMAN_token::render();
?>
</form>
</table>
<?php
include_once $mosConfig_absolute_path . "/components/com_docman/footer.php";
}
开发者ID:RangerWalt,项目名称:ecci,代码行数:73,代码来源:licenses.html.php
示例13: edit
/**
* Writes the edit form for new and existing categories
* @param mosCategory The category object
* @param string
* @param array
*/
function edit(&$row, &$lists, $redirect, $menus)
{
if ($row->image == "") {
$row->image = 'blank.png';
}
if ($redirect == 'content') {
$component = 'Content';
} else {
$component = ucfirst(substr($redirect, 4));
if ($redirect == 'com_contact_details') {
$component = 'Contact';
}
}
mosMakeHtmlSafe($row, ENT_QUOTES, 'description');
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton, section) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
if ( pressbutton == 'menulink' ) {
if ( form.menuselect.value == "" ) {
alert( "Please select a Menu" );
return;
} else if ( form.link_type.value == "" ) {
alert( "Please select a menu type" );
return;
} else if ( form.link_name.value == "" ) {
alert( "Please enter a Name for this menu item" );
return;
}
}
if ( form.name.value == "" ) {
alert("Category must have a name");
} else if (form.title.value ==""){
alert("Category must have a title");
} else {
<?php
getEditorContents('editor1', 'description');
?>
submitform(pressbutton);
}
}
</script>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th class="categories">
Category:
<small>
<?php
echo $row->id ? 'Edit' : 'New';
?>
</small>
<small><small>
[ <?php
echo $component;
?>
: <?php
echo stripslashes($row->name);
?>
]
</small></small>
</th>
</tr>
</table>
<table width="100%">
<tr>
<td valign="top" width="60%">
<table class="adminform">
<tr>
<th colspan="3">
Category Details
</th>
<tr>
<tr>
<td>
Category Title:
</td>
<td colspan="2">
<input class="text_area" type="text" name="title" value="<?php
echo stripslashes($row->title);
?>
" size="50" maxlength="50" title="A short name to appear in menus" />
</td>
</tr>
<tr>
<td>
//.........这里部分代码省略.........
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:101,代码来源:admin.categories.html.php
示例14: showEditDocument
function showEditDocument($doc_details, &$lists, $option, $id)
{
$JLMS_CONFIG =& JLMSFactory::getConfig();
$Itemid = $JLMS_CONFIG->get('Itemid');
$is_dis_start = !($doc_details->publish_start == 1);
$is_dis_end = !($doc_details->publish_end == 1);
?>
<script language="javascript" type="text/javascript">
<!--//--><![CDATA[//><!--
window.addEvent('domready', function() {
<?php
if ($is_dis_start) {
?>
document.adminForm.startday.disabled = true;
document.adminForm.startmonth.disabled = true;
document.adminForm.startyear.disabled = true;
<?php
}
if ($is_dis_end) {
?>
document.adminForm.endday.disabled = true;
document.adminForm.endmonth.disabled = true;
document.adminForm.endyear.disabled = true;
<?php
}
?>
}
);
function setgood() {
return true;
}
function submitbutton(pressbutton) {
var form=document.adminForm;
try {
form.onsubmit();
} catch(e) {
//alert(e);
}
if (is_start_c == 1) {if (form.start_date.value == ''){jlms_getDate('start');}}
if (is_end_c == 1) {if (form.end_date.value == ''){jlms_getDate('end');}}
<?php
if (!$doc_details->id && !($doc_details->folder_flag == 1)) {
?>
if ((pressbutton=='save_doc') && ((form.userfile0.value=="") && (form.doc_name0.value==""))){alert("<?php
echo _JLMS_DOCS_SELECT_FILE_OR_ENTER_NAME;
?>
");
<?php
} else {
?>
if ((pressbutton=='save_doc') && (form.doc_name0.value=="")){alert("<?php
echo _JLMS_PL_ENTER_NAME;
?>
");
<?php
}
?>
} else {
<?php
if (class_exists('JFactory')) {
$editor =& JLMS07062010_JFactory::getEditor();
echo $editor->save('doc_description');
} else {
getEditorContents('editor1', 'doc_description');
}
?>
form.task.value = pressbutton;
form.submit();
}
}
function submitbutton_aF2(pb, ri2) {
var form=document.adminForm
|
请发表评论