if ($carray = @file('../lang/' . $langkurz . '/' . $_REQUEST['filename'])) { while (list(, $value) = each($carray)) { $file_content .= $value; } } elseif (strpos($_REQUEST['filename'], '.css') && ($carray = @file("../{$designpath}" . $_REQUEST['filename']))) { while (list(, $value) = each($carray)) { $file_content .= $value; $rich_editor = false; } } if (substr($_REQUEST['filename'], 0, 5) == 'mail_') { $rich_editor = false; } } if ($rich_editor) { $editor = new rich($caption, "filecontent", stripslashes($file_content), "1000", "500", "../../mydir/", $DOMAIN . "/mydir/", false, false); $editor->set_lang($admlang); $editor->simple_mode(true); $editor->active_mode(false); $editor->hide_tb("font", false); $editor->hide_tb("link", false); $editor->hide_tb("special_chars", false); $editor->hide_tb("image", false); $editor->hide_tb("source", true); $editor->hide_tb("form", true); $editor->hide_tb("snippets", true); $editor->hide_tb("size", false); $editor->hide_tb("style", false); $editor->hide_tb("absolute_position", false); $editor->hide_tb("hr", false); $editor->hide_tb("table", false);
/** * function_description * * @author John.meng * @since version - Jan 18, 2006 * @param datatype paramname description * @return datatype description */ function opLeftTop() { global $__Lang__, $UrlParameter, $SiteDB, $AddIPObj, $__SITE_VAR__, $form, $FlushPHPObj, $thisDAO, $smarty, $class_path; include_once PEAR_DIR . 'HTML/QuickForm.php'; $form = new HTML_QuickForm('firstForm', 'post', '', '_self', "onsubmit='save_in_textarea_all();'"); $renderer =& $form->defaultRenderer(); $renderer->setFormTemplate("\n<form{attributes}>\n<table border=\"0\" class=\"new_table\">\n{content}\n</table>\n</form>"); $renderer->setHeaderTemplate("\n\t<tr>\n\t\t<td class=\"grid_table_head\" align=\"left\" valign=\"top\" colspan=\"2\"><b>{header}</b></td>\n\t</tr>"); $class_path = INCLUDE_DIR . "editor/"; $CurrentUserPathImages = HTML_IMAGES_DIR; $SiteCssFile = CURRENT_HTML_DIR . "style.css"; $Content = $this->_DAO->getSiteVarValue($__SITE_VAR__['SITE_LEFT_TOP'], SITE_LARGE_CONFIG_TABLE); $ed_4 = new rich("", 'SiteQuickLink', $Content, "450", "350", "../../" . $CurrentUserPathImages, "../../" . $CurrentUserPathImages, false, false); $ed_4->set_default_stylesheet($SiteCssFile); $ed_4->myModule(true); $editors = $ed_4->draw(); $smarty->assign("class_path_editor", $class_path); $form->addElement('header', null, $__Lang__['langGeneralUpdate'] . " " . $__Lang__['langBaseInfo']); $form->addElement('static', 'SiteQuickLink', NULL, $editors); //array('rows' => 8, 'cols' => 40) $form->addElement('submit', null, $__Lang__['langGeneralSubmit']); $form->addElement('hidden', 'Module', $_REQUEST['Module']); $form->addElement('hidden', 'Page', $_REQUEST['Page']); $form->addElement('hidden', 'Action', $_REQUEST['Action']); $form->addElement('hidden', 'Step', 'Step3'); if ($form->validate()) { if (get_magic_quotes_gpc()) { $record["VarValue"] = stripslashes($_POST['SiteQuickLink']); } else { $record["VarValue"] = $_POST['SiteQuickLink']; } $record["VarName"] = $__SITE_VAR__['SITE_LEFT_TOP']; $record = $record + $this->_DAO->baseField(); $this->_DAO->autoInsertOrUpdate(SITE_LARGE_CONFIG_TABLE, $record, array('VersionCode', 'VarName')); echo "<SCRIPT LANGUAGE='JavaScript'>opener.window.location.reload();window.close();</SCRIPT>"; } $html_code = "<link rel=\"StyleSheet\" type=\"text/css\" href=\"" . $class_path . "rich_files/rich.css\"><script language=\"JScript.Encode\" src=\"" . $class_path . "rich_files/rich.js\"></script>" . $form->toHTML(); $smarty->assign("Main", str_replace(ROOT_DIR, "../", $html_code)); }
?> </td> </tr> <tr> <td align="right" valign="top"><b><font color="#C40000"> <?php echo $_SP[74]; ?> : </b></td> <td colspan="2"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td> <?php $editor = new rich('', "text", $_POST['text'], "500", "200", "../../mydir/", $DOMAIN . "/mydir/"); $editor->set_lang($admlang); $editor->simple_mode(true); $editor->active_mode(false); $editor->hide_tb("help"); $editor->hide_tb("link", false); $editor->hide_tb("source", true); $editor->hide_tb("align", true); $editor->hide_tb("special_chars", false); $editor->hide_tb("image", false); $editor->set_borders_visibility(true); $editor->set_br_on_enter(true); $editor->draw(); #print '<textarea name="text" style="width:500;height:500">'.htmlspecialchars($_POST['text']).'</textarea>'; ?> </td>