require_once "conn.php";
session_start();
header("Content-type: text/html; charset=utf-8");
$act = $_POST['act'];
$id=$_GET["id"];
if($act == "xiugaihuodongact"){
$id=$_POST['id'];
//获取post传入的biaoti参数,并保存到$biaoti中
$biaoti = $_POST['biaoti'];
//获取post传入的neirong参数,并保存到$neirong中
$neirong = $_POST['neirong'];
//获取post传入的shetuan参数,并保存到$shetuan中
$shetuan = $_POST['shetuan'];
//获取post传入的shetuanid参数,并保存到$shetuanid中
$shetuanid = $_POST['shetuanid'];
mysql_query("update t_huodong set biaoti = '$biaoti',neirong = '$neirong',shetuan = '$shetuan',shetuanid = '$shetuanid' where id = $id");
echo "
alert('修改活动成功')
";}
$res = mysql_query("select * from t_huodong where id = $id");
$huodong = mysql_fetch_array($res);
?>
修改活动修改活动
标题
内容
href="resource/simditor/styles/simditor.css" />
var editor = new Simditor({
textarea : $('#neirong'),
toolbar : ['title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale', 'color', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'image', 'hr', '|', 'indent', 'outdent', 'alignment'], //optional options
});
社团
<?php
//查询所有社团
$res = mysql_query("select * from t_shetuan");
//循环展示查询出的内容
while ($row = mysql_fetch_array($res)){
//输出row['mingzi']
echo "".$row['mingzi']."";
}
?>
$("#shetuan").val("<?php echo $huodong['shetuan'] ?>")
function shetuanchange(select){
$("#shetuanid").val($("#shetuanid option:eq("+select.selectedIndex+")").val()); }
function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i");
var r = window.location.search.substr(1).match(reg);
if (r!=) return (r[2]);
return ;
}
var shetuanid = GetQueryString("shetuanid");
if(shetuanid!=) {
$("#shetuanid").val(shetuanid);
var sel=document.getElementById("shetuanid");
var shetuanidselectedindex = sel.selectedIndex;
$("#shetuan").val($("#shetuan option:eq("+shetuanidselectedindex+")").val());
}
社团id
<?php
//查询所有社团id
$res = mysql_query("select * from t_shetuan");
//循环展示查询出的内容
while ($row = mysql_fetch_array($res)){
//输出row['id']
echo "".$row['id']."";
}
?>
$("#shetuanid").val("<?php echo $huodong['shetuanid'] ?>")
function shetuanchange(select){
$("#shetuanid").val($("#shetuanid option:eq("+select.selectedIndex+")").val()); }
function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i");
var r = window.location.search.substr(1).match(reg);
if (r!=) return (r[2]);
return ;
}
var shetuanid = GetQueryString("shetuanid");
if(shetuanid!=) {
$("#shetuanid").val(shetuanid);
var sel=document.getElementById("shetuanid");
var shetuanidselectedindex = sel.selectedIndex;
$("#shetuan").val($("#shetuan option:eq("+shetuanidselectedindex+")").val());
}
修改
2019 © qw. Pampered by qwbs