include/edittype.php

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
session_start();
require('../conn.php');
require('../functions.php');
require('admin.php');
$id=guolv($_GET['id']);
if(is_numeric($id)){
	$row=$mysql->query("select * from `typedata` where `id` in({$id})");
}

//同步修改价格
//修改
if($_POST){
	$type_name=guolv($_POST['type_name']);
	$type_pp=guolv($_POST['type_pp']);
	$type_vippp=guolv($_POST['type_vippp']);
	$type_id=guolv($_POST['type_id']);
	$type_author=guolv($_POST['type_author']);
	if($type_name!==''){
		$mysql->query("update `typedata` set `name`='{$type_name}',`type_pp`='{$type_pp}',`type_vippp`='{$type_vippp}',`type_author`='{$type_author}' where `id`='{$type_id}'");
		$mysql->query("update `article` set `money`='{$type_pp}' where `type`='{$type_id}'");
		echo "<script>alert('修改成功');location.href='edittype.php?id={$type_id}'</script>";
	}
}
?>

<?php include('head.php')?>    

    <div class="container-fluid">
        
        <div class="row-fluid">
		<?php
		include('left.php');
		?>
<div class="span9">
            <h1 class="page-title">分类修改</h1>
<div class="well">
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane active in" id="home">
	  <div class="well">
<form id="tab" action="edittype.php" method="post">
        <label>分类名称</label>
        <input type="text" value="<?php echo $row[0]['name']?>" style="width:200px" name="type_name">
        <label>普通分类单价</label>
        <input type="text" value="<?php echo $row[0]['type_pp']?>" style="width:200px" name="type_pp">
		<label>VIP分类单价</label>
        <input type="text" value="<?php echo $row[0]['type_vippp']?>" style="width:200px" name="type_vippp">
        <label>公众号广告位(支持UBB)</label>
        <input type="text" value="<?php echo $row[0]['type_author']?>" style="width:500px" name="type_author" value=""> [author=http://www.baidu.com]公众号[/author]			
 <input type="hidden" value="<?php echo $id?>" name="type_id">			
		 <label></label>
		 <button class="btn btn-primary"><i class="icon-save"></i> 修改&同步分类文章价格</button>
    </form>
	  </div>
      </div>
      <div class="tab-pane fade" id="profile">
      </div>
  </div>

</div>
后面还有 29 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。