/**
  * 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));
 }
Exemplo n.º 2
0
        $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);
        $editor->hide_tb("adv_table", true);
        $editor->hide_tb("paragraph", false);
        $editor->set_borders_visibility(true);
        $editor->set_br_on_enter($set_on);
        $editor->set_snippets(array('MYDIR' => "%[MYDIR]%"));
        if ($show_styles) {
            $editor->set_default_stylesheet('../' . $designpath . 'style.css');
        }
        $editor->draw();
    } else {
        print '<textarea wrap="off" rows="29" name="filecontent" cols="105" style="width:1000;font: bold fixedsys, courier, lucida Console, arial; font-size: 12px; background-color: #FFFFEC">' . htmlspecialchars($file_content) . '</textarea>';
    }
    ?>
   </td></tr>  <tr><td valign="top">   <table width=100%><tr><td><input type="submit" value=" <?php 
    echo $_SP[274];
    ?>
 " name="submit" onClick="return confirm('<?php 
    echo $_SP[50];
    ?>
')"></td>   <td align=right>   <?php 
    if ($_REQUEST['filename'] && file_exists('../lang/' . $langkurz . '/backup/' . $_REQUEST['filename'])) {
        print '<input type="submit" value="' . $_SP[510] . '" name="restore" onClick="return confirm(\'' . $_SP[510] . '\')" style="margin-left:300;color:blue;background:#C8C8C8">';