⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 settings_other.php

📁 通达OA部分源代码
💻 PHP
字号:
<?
include_once("myconnect.php");
include_once("logincheck.php");
function RTESafe($strText) {
	//returns safe code for preloading in the RTE
	$tmpString = trim($strText);
	
	//convert all types of single quotes
	$tmpString = str_replace(chr(145), chr(39), $tmpString);
	$tmpString = str_replace(chr(146), chr(39), $tmpString);
	$tmpString = str_replace("'", "&#39;", $tmpString);
	
	//convert all types of double quotes
	$tmpString = str_replace(chr(147), chr(34), $tmpString);
	$tmpString = str_replace(chr(148), chr(34), $tmpString);
//	$tmpString = str_replace("\"", "\"", $tmpString);
	
	//replace carriage returns & line feeds
	$tmpString = str_replace(chr(10), " ", $tmpString);
	$tmpString = str_replace(chr(13), " ", $tmpString);
	
	return $tmpString;
}

function main()
{
	$sbq_con="select * from sbbleads_config where sb_id=1";
	$sbrow_con=mysql_fetch_array(mysql_query($sbq_con));
	$sb_how_to_sell=$sbrow_con["sb_how_to_sell"];
	$sb_how_to_buy=$sbrow_con["sb_how_to_buy"];
	
?>
<script language="JavaScript" type="text/javascript" src="richtext.js"></script>
<script language="JavaScript">
<!--

function validate(form)
{
	updateRTEs();
	if ( form.sb_how_to_sell.value == "" ) 
	{
      	alert('Please specify how to sell help text!');
	   	return false;
	}
	if ( form.sb_how_to_buy.value == "" ) 
	{
       alert('Please specify how to buy help text!');
	   return false;
	}
	return true;
}
//-->
</script>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td> 
      <form name="form123" method="post" action="update_other_set.php" onSubmit="return validate(this);">
        <table width="90%" border="0" align="center" cellpadding="2" cellspacing="5" class="onepxtable">
          <tr class="titlestyle"> 
            <td colspan="3">&nbsp;Help Text</td>
          </tr>
          <tr valign="top"> 
            <td width="40%" align="right" class="innertablestyle"><font class="normal"><strong>How 
              To Sell Help Text</strong></font></td>
            <td width="6"><font class="red">*</font></td>
            <TD width="60%" valign="middle"> <font class='normal'> 
              <script language="JavaScript" type="text/javascript">
<!--

<?
$content = $sb_how_to_sell;
$content = RTESafe($content);
?>//Usage: initRTE(imagesPath, includesPath, cssFile)
initRTE("../images/", "", "");

//Usage: writeRichText(fieldname, html, width, height, buttons)
writeRichText('sb_how_to_sell', '<?=$content?>', 450, 200, true, false);

//uncomment the following to see a demo of multiple RTEs on one page
//document.writeln('<br><br>');
//writeRichText('rte2', 'read-only text', 450, 100, true, false);
//-->
/*document.write("<br><font class='smalltext'>Description length must not exceed <?php echo $sbrow_con['sb_description_length'];?> characters</font>");*/
</script>
              </font> <noscript>
              <p><font class="normal"><b>Javascript must be enabled to use this 
                form.</b></font></p>
              </noscript></TD>
          </tr>
          <tr valign="top"> 
            <td align="right" class="innertablestyle"><font class="normal"><strong>How 
              To Buy Help Text</strong></font></td>
            <td><font class="red">*</font></td>
            <TD valign="middle"> <font class='normal'> 
              <script language="JavaScript" type="text/javascript">
<!--

<?
$content = $sb_how_to_buy;
$content = RTESafe($content);
?>//Usage: initRTE(imagesPath, includesPath, cssFile)
initRTE("../images/", "", "");

//Usage: writeRichText(fieldname, html, width, height, buttons)
writeRichText('sb_how_to_buy', '<?=$content?>', 450, 200, true, false);

//uncomment the following to see a demo of multiple RTEs on one page
//document.writeln('<br><br>');
//writeRichText('rte2', 'read-only text', 450, 100, true, false);
//-->
/*document.write("<br><font class='smalltext'>Description length must not exceed <?php echo $sbrow_con['sb_description_length'];?> characters</font>");*/
</script>
              </font> <noscript>
              <p><font class="normal"><b>Javascript must be enabled to use this 
                form.</b></font></p>
              </noscript></TD>
          </tr>
          <tr valign="top"> 
            <td align="right" class="innertablestyle">&nbsp;</td>
            <td>&nbsp;</td>
            <td><input type="submit" name="Submit2" value="Update">
            </td>
          </tr>
        </table>
        <p align="center">&nbsp;</p>
        </form>
</td>
  </tr>
</table>
<?
}  //End of main
include_once("template.php");
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -