添加页面使用如下:
php代码:
<?php
if($_POST["do"]=="add"){//#########################################
$x_gj="en";
$bt=$class1->check_sr($_POST["bt"],'i_no_h_j');
$type=7;
$jj=$class1->check_sr($_POST["jj"],'');
$zz=$class1->check_sr($_POST["zz"],'i_no_h_j');
$xb=$class1->check_sr($_POST["xb"],'i_no_h_j');
$lxxx=$class1->check_sr($_POST["lxxx"],'i_no_h_j');
$site=$class1->check_sr($_POST["site"],'i_no_h_j');
$text=$class1->check_sr($_POST["text"],'i_no_h_j');
if(get_magic_quotes_gpc()){$wznr = $_POST["FCKeditor1"];}else{$wznr = $_POST["FCKeditor1"] ;}
$nr=str_replace("'","",$wznr);
$x_sj="";
$x_ip=$class1->GetIP();;
$x_zt="no";
$sql1="insert into aa9_blog(x_gj,bt,type,jj,zz,xb,lxxx,site,text,nr,x_sj,x_ip,x_zt)
values('".$x_gj."','".$bt."','".$type."','".$jj."','".$zz."','".$xb."','".$lxxx."','".$site."','".$text."','".$nr."',now(),'".$x_ip."','".$x_zt."')";
$my1->my_q($sql1);
$class1->my_error("Submit Article ---- OK ","","http://www.yoursite.com/index.html","alert jump",true,false);
/*######################################### */}
?>
HTML代码:
<form id="xxx3" class="xxx3" name="xxx3" method="POST" action="add.php" >
<input type="hidden" id="FCKeditor1" name="FCKeditor1" value="" style="display:none" />
<input type="hidden" id="FCKeditor1___Config" value="AutoDetectLanguage=false&DefaultLanguage=en&SkinPath=/fckeditor_266/editor/skins/silver/" style="display:none" />
<iframe id="FCKeditor1___Frame" src="/fckeditor_266/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default" width="100%" height="600" frameborder="0" scrolling="no"></iframe>
<input type="hidden" name="do" value="add" />
<input type="submit" name="Submit" value="Submit Now">
</form>
|
修改页面使用如下:
php代码:
<?php
if($do=="up" and is_int(intval($id))){
$lb1=$class1->check_sr($_POST["sel1"],'i_int');
$lb2=$class1->check_sr($_POST["sel2"],'i_int');
$lb3=$class1->check_sr($_POST["sel3"],'i_int');
$lb4=$class1->check_sr($_POST["sel4"],'i_int');
$lb5=$class1->check_sr($_POST["sel5"],'i_int');
if($lb1>0){$x_lb=$lb1;}if($lb2>0){$x_lb=$lb2;}if($lb3>0){$x_lb=$lb3;}if($lb4>0){$x_lb=$lb4;}if($lb5>0){$x_lb=$lb5;}
if(get_magic_quotes_gpc()){$wznr = $_POST["FCKeditor1"];}else{$wznr = $_POST["FCKeditor1"] ;}
$nr=str_replace("'","",$wznr);
$lb=$x_lb;
$bt=$class1->check_sr($_POST["bt"],'');
$nr=$nr;
$x_sj=$class1->check_sr($_POST["x_sj"],'');
$sql1="update aa9_mywz set lb='".$lb."',bt='".$bt."',nr='".$nr."',x_sj='".$x_sj."' where id=".$id;
$my1->my_q($sql1);
$class1->my_error("ok!","",$class1->get_file_name("return")."?id=".$id,"alert jump",true,false);
}
?>
HTML代码:
<form id="xxx3" class="xxx3" name="xxx3" method="POST" action="update.php" >
<?php if(get_magic_quotes_gpc()){$nr = htmlspecialchars( stripslashes( $rs5["nr"] ) ) ;}else{$nr = htmlspecialchars( $rs5["nr"] ) ;}?>
<input type="hidden" id="FCKeditor1" name="FCKeditor1" value="<?php echo $nr;?>" style="display:none" />
<input type="hidden" id="FCKeditor1___Config" value="AutoDetectLanguage=false&DefaultLanguage=en&SkinPath=/fckeditor_266/editor/skins/silver/" style="display:none" />
<iframe id="FCKeditor1___Frame" src="/fckeditor_266/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default" width="100%" height="600" frameborder="0" scrolling="no"></iframe>
<input type="hidden" name="do" value="up" />
<input type="submit" name="Submit" value="修改">
</form>
|