📄 settings_other.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("'", "'", $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"> 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"> </td>
<td> </td>
<td><input type="submit" name="Submit2" value="Update">
</td>
</tr>
</table>
<p align="center"> </p>
</form>
</td>
</tr>
</table>
<?
} //End of main
include_once("template.php");
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -