/**
  * Update main options
  *
  * @access privat
  */
 function _update_main_options()
 {
     // init var - used if a config value has been modified
     $this->B->_modified = FALSE;
     if (isset($_POST['update_main_options_email'])) {
         $this->B->sys['option']['email'] = $_POST['site_email'];
         $this->B->_modified = TRUE;
     } elseif (isset($_POST['update_main_options_title'])) {
         $search_array = array('\'', '"');
         $replace_array = array(''', '"');
         $this->B->sys['option']['site_title'] = str_replace($search_array, $replace_array, commonUtil::stripSlashes_special($_POST['site_title']));
         $this->B->sys['option']['site_desc'] = str_replace($search_array, $replace_array, commonUtil::stripSlashes_special($_POST['site_desc']));
         $this->B->_modified = TRUE;
     } elseif (isset($_POST['update_main_options_tpl'])) {
         $this->B->sys['option']['tpl'] = $_POST['tplgroup'];
         $this->B->_modified = TRUE;
     } elseif (isset($_POST['update_main_options_view'])) {
         $this->B->sys['option']['view'] = $_POST['viewgroup'];
         $this->B->_modified = TRUE;
     } elseif (isset($_POST['update_main_options_cache_enabled'])) {
         if (isset($_POST['cacheenabled'])) {
             $this->B->sys['option']['cache'] = TRUE;
         } else {
             $this->B->sys['option']['cache'] = FALSE;
         }
         $this->B->_modified = TRUE;
     } elseif (isset($_POST['update_main_options_cache_delete'])) {
         M(MOD_COMMON, 'cache_delete');
         $this->B->_modified = TRUE;
     }
 }
Пример #2
0
  <tr bgcolor="#666699">
    <td colspan="2"><span class="style1">&nbsp;&nbsp;&nbsp;Options Management</span></td>
  </tr>
  <tr>
    <td width="86%" align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="76%" align="left" valign="top">
    <form action="index.php?admin=1&m=option" method="post" name="email" id="email">
        <table width="100%"  border="0" cellspacing="4" cellpadding="4">
          <tr>
            <td colspan="2" align="left" valign="top"><span class="optiontitle">Administrator email</span></td>
          </tr>
          <tr>
            <td width="87%" align="left" valign="top">
              <input name="site_email" type="text" size="70" maxlength="1024" value="<?php 
echo htmlspecialchars(commonUtil::stripSlashes_special($B->sys['option']['email']));
?>
">
              &nbsp; 
            </td>
            <td width="13%" align="left" valign="top"><input type="submit" name="update_main_options_email" value="update" onclick="subok(this.form.update_main_options_email);"></td>
          </tr>
        </table>   
    </form> 
    <form action="index.php?admin=1&m=option" method="post" name="title" id="title">    
        <table width="100%"  border="0" cellspacing="4" cellpadding="4">
          <tr>
            <td colspan="2" align="left" valign="top"><span class="optiontitle">Site title and description </span></td>
          </tr>
          <tr>
            <td width="87%" align="left" valign="top">