جایگذاری

خرید بک لینک
samanfc20 آفلاین
عضو جدید
**

ارسالها: 31
تاریخ عضویت: ۱۳۹۴ بهمن ۳۰
اعتبار: 0

تشکرها : 0
( 0 تشکر در 0 ارسال )

ارسال: #1
جایگذاری
با سلام.

دوستان من میخوام بجای id=25 یک متغیر تعریف کنم.کسی میتونه راهنمایی کنه؟
فایل دستور دهنده:

کد PHP:

<!DOCTYPE html>
<
html lang="en">
<
head>
<
meta charset="utf-8">
<
meta name="viewport" content="width=device-width, initial-scale=1.0">
<
meta name="description" content="">
<!--
www.20script.ir -->
<
meta name="author" content="Mosaddek">
<
meta name="keyword" content="FlatLab, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
<
link rel="shortcut icon" href="img/favicon.html">
<
title>ویرایش ملک</title>
<!--
Bootstrap core CSS -->
<
link href="css/bootstrap.min.css" rel="stylesheet">
<
link href="css/bootstrap-reset.css" rel="stylesheet">
<!--
exteal css-->
<
link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
<!--
Custom styles for this template -->
<
link href="css/style.css" rel="stylesheet">
<
link href="css/style-responsive.css" rel="stylesheet" />
<!--
HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
<!--[if
lt IE 9]>
<
script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<section id="container" class="">
<!--header start-->
<?php include ("header.php");?>
<!--header end-->
<!--sidebar start-->
<?php include ("sidebar.php");?>
<?php
include('../config/connect.php');
$sql2="select * from amlak where id=25 ";
$stmt2=$db->prepare($sql2);
$stmt2->execute();
$result2=$stmt2->fetch(PDO::FETCH_ASSOC);
$id2=$result2['id'];
$parent=$result2['parent'];
$ok=$result2['ok'];
$vizhe=$result2['vizhe'];
$tarikh=$result2['tarikh'];
$mantaghe=$result2['mantaghe'];
$price=$result2['price'];
$loan=$result2['loan'];
$amlakbase=$result2['amlakbase'];
$melksanad=$result2['melksanad'];
$melkclass=$result2['melkclass'];
$zirbana=$result2['zirbana'];
$masahat=$result2['masahat'];
$img1=$result2['image11'];
$img2=$result2['image2'];
$img3=$result2['image3'];
$img4=$result2['image4'];
$img5=$result2['image5'];
$adress=$result2['adress'];
$name=$result2['name'];
$tel=$result2['tel'];
$otagh=$result2['otagh'];
?>
<form action="edite_status_sucessfully.php" method="POST">
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<!-- page start-->
<div class="row">
<aside class="profile-nav col-lg-3">
<section class="panel">
<div class="user-heading round">
<a href="#">
<img src="img/profile-avatar.jpg" alt="">
</a>
<p style="font-size:20px;">نام و نام خانوادگی:<?php echo $name; ?></p>
<p>تلفن تماس:<?php echo $tel; ?></p>
</div>
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#"><i class="icon-user"></i>مشخصات ملک ثبت شده</a></li>
<li style="margin-right:20px;"><i class="icon-calendar"></i><span style="margin-right:5px;">تاریخ ثبت شده این ملک:<?php echo $tarikh; ?></span></li>
</ul>
</section>
</aside>
<aside class="profile-info col-lg-9">
<section class="panel">
<footer class="panel-footer">
<input type="submit" value="ذخیره تغییرات" class="btn btn-danger pull-right">
<ul class="nav nav-pills">
<li>
<a><input type="checkbox" name="ok" style="margin-right:20px;margin-top:10px;padding-right:10px;">تایید ملک برای انتشار</a>
</li>
<li>
<a><input type="checkbox" name="vizhe" style="margin-right:20px;margin-top:10px;padding-right:10px;">ویژه سازی ملک</a>
</li>
</ul>
</footer>
</section>
<section class="panel">
<div class="panel-body bio-graph-info">

<div class="bio-graph-heading">
اگر این ملک را قبلا تایید نموده اید در صورت انجام ویرایش مجدد حتما باید تیک تایید را بزنید.در غیر این صورت این ملک منتشر نخواهد شد
</div>
<h1>مشخصات ملک ثبت شده</h1>
<div class="row">
<div class="bio-row">
<p>نوع فایل :&nbsp;<span>&nbsp;<?php echo $amlakbase; ?></span></p><a id="edite1" style="width:50px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">ویرایش</a>
<select id="edite_r1" name="amlakbase" style="display:none;">
<option value="<?php echo $amlakbase; ?>"><?php echo $amlakbase; ?></option>
include ("../config/connect.php");
$selected="select * from tbl1";
$slnt=$db->prepare($selected);
$slnt->execute();
while($res=$slnt->fetch(PDO::FETCH_ASSOC)){
$tbl1id=$res['id'];
$tbl1title=$res['title'];
$parent=$res['parent'];
echo'<option value="'.$tbl1title.'">'.$tbl1title.'</option>';
}
?>
</select>
</div>
<div class="bio-row">
<p>نوع ملک :&nbsp;<span>&nbsp;<?php echo $melkclass; ?></span></p><a id="edite2" style="width:50px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">ویرایش</a>
<select id="edite_r2" name="melkclass" style="display:none;">
<option value="<?php echo $melkclass; ?>"><?php echo $melkclass; ?></option>
<?php
include ("../config/connect.php");
$selected="select * from tbl3";
$slnt=$db->prepare($selected);
$slnt->execute();
while(
$res=$slnt->fetch(PDO::FETCH_ASSOC)){
$tbl1id=$res['id'];
$tbl1title=$res['title'];
$parent=$res['parent'];
echo
'<option value="'.$tbl1title.'">'.$tbl1title.'</option>';
}

?>
</select>
</div>
<div class="bio-row">
<p>تعداد اتاق :&nbsp;<span>&nbsp;<?php echo $otagh; ?> </span></p><a id="edite3" style="width:50px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">ویرایش</a>
<input id="edite_r3" name="otagh" type="text" value="<?php echo $otagh; ?>" style="display:none;">
</div>
<div class="bio-row">
<p>نوع سند :&nbsp;<span>&nbsp;<?php echo $melksanad; ?> </span></p><a id="edite4" style="width:50px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">ویرایش</a>
<select id="edite_r4" name="melksanad" style="display:none;">
<option value="<?php echo $melksanad; ?>"><?php echo $melksanad; ?></option>
<?php
include ("../config/connect.php");
$selected="select * from tbl2";
$slnt=$db->prepare($selected);
$slnt->execute();
while(
$res=$slnt->fetch(PDO::FETCH_ASSOC)){
$tbl1id=$res['id'];
$tbl1title=$res['title'];
$parent=$res['parent'];
echo
'<option value="'.$tbl1title.'">'.$tbl1title.'</option>';
}

?>
</select>
</div>
<div class="bio-row">
<p>متراژ مساحت :&nbsp;<span>&nbsp;<?php echo $masahat; ?> </span></p><a id="edite5" style="width:50px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">ویرایش</a>
<input type="text" id="edite_r5" name="masahat" value="<?php echo $masahat; ?>" style="display:none;">
</div>
<div class="bio-row">
<p>متراژ زیربنا :&nbsp;<span>&nbsp;<?php echo $zirbana; ?> </span></p><a id="edite6" style="width:50px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">ویرایش</a>
<input type="text" name="zirbana" id="edite_r6" value="<?php echo $zirbana; ?>" style="display:none;">
</div>
<div class="bio-row">
<p>قیمت خرید یا رهن :&nbsp;<span>&nbsp;<?php echo $price; ?> </span></p><a id="edite7" style="width:50px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">ویرایش</a>
<input type="text" name="price" id="edite_r7" value="<?php echo $price; ?>" style="display:none;">
</div>
<div class="bio-row">
<p>قیمت اجاره یا وام :&nbsp;<span>&nbsp;<?php echo $loan; ?> </span></p><a id="edite8" style="width:50px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">ویرایش</a>
<input type="text" name="loan" id="edite_r8" value="<?php echo $loan; ?>" style="display:none;">
</div>
<div class="bio-row">
<p>منطقه ملک مدنظر :&nbsp;<span>&nbsp;<?php echo $mantaghe; ?> </span></p><a id="edite9" style="width:50px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">ویرایش</a>
<input type="text" id="edite_r9" name="mantaghe" value="<?php echo $mantaghe; ?>" style="display:none;">
</div>
<div class="bio-row">
<p><img src="../<?php echo $img1; ?>" style="width:150px; height:100px;"></p><a id="edite10" style="width:80px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">تغییر تصویر</a>
</div>
<div class="bio-row">
<p><img src="../<?php echo $img2; ?>" style="width:150px; height:100px;"></p><a id="edite11" style="width:80px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">تغییر تصویر</a>
</div>
<div class="bio-row">
<p><img src="../<?php echo $img3; ?>" style="width:150px; height:100px;"></p><a id="edite12" style="width:80px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">تغییر تصویر</a>
</div>
<div class="bio-row">
<p><img src="../<?php echo $img4; ?>" style="width:150px; height:100px;"></p><a id="edite13" style="width:80px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">تغییر تصویر</a>
</div>
<div class="bio-row">
<p><img src="../<?php echo $img5; ?>" style="width:150px; height:100px;"></p><a id="edite14" style="width:80px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">تغییر تصویر</a>
</div>
<p style="margin-right:15px;color:#F44548;margin-bottom:30px;margin-top:10px;">توجه:مدیرگرامی،مواردی نظیر آدرس ملک،تلفن تماس و نام ونام خانوادگی ثبت کننده برای کاربران منتشر نخواهد شد.لذا نیازی به حذف کردن این موارد از مشخصات ثبت شده نمی باشد</p>

<div class="bio-row">
<p>آدرس ملک ثبت شده :&nbsp;<span style="width:175px !important;">&nbsp;<?php echo $adress; ?> </span></p><a id="edite15" style="width:50px;height:21px;background:#E4474A;float:right;border-radius:10px;color:#FFFFFF;text-align:center;cursor:pointer;">ویرایش</a>
<input type="text" id="edite_r15" name="adress" value="<?php echo $adress; ?>" style="display:none;">
</div>
</div>
</div>

</section>
<section>
</section>
</aside>
</div>
<!-- page end-->
</section>
</section>
</form>
<!--main content end-->
</section>
<!-- js placed at the end of the document so the pages load faster -->
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.scrollTo.min.js"></script>
<script src="js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="assets/jquery-knob/js/jquery.knob.js"></script>
<!--common script for all pages-->
<script src="js/common-scripts.js"></script>
<script>
//knob
$(".knob").knob();
</script>
<script type="text/javascript">
$("#edite1").click(function(){
$("#edite_r1").show();
});
$("#edite2").click(function(){
$("#edite_r2").show();
});
$("#edite3").click(function(){
$("#edite_r3").show();
});
$("#edite4").click(function(){
$("#edite_r4").show();
});
$("#edite5").click(function(){
$("#edite_r5").show();
});
$("#edite6").click(function(){
$("#edite_r6").show();
});
$("#edite7").click(function(){
$("#edite_r7").show();
});
$("#edite8").click(function(){
$("#edite_r8").show();
});
$("#edite9").click(function(){
$("#edite_r9").show();
});
$("#edite10").click(function(){
$("#edite_r10").show();
});
$("#edite15").click(function(){
$("#edite_r15").show();
});
</script>
</body>
</html>

فایل دستور گیرنده:

کد PHP:

<?php
session_start
();
if(!isset(
$_SESSION['email'])){header('location:login.php');}
include(
'injection.php');

include(

'../config/connect.php');
$mantaghe=$_POST['mantaghe'];
$mantaghe=check($mantaghe);
$price=$_POST['price'];
$price=check($price);
$loan=$_POST['loan'];
$loan=check($loan);
$amlakbase=$_POST['amlakbase'];
$amlakbase=check($amlakbase);
$melksanad=$_POST['melksanad'];
$melksanad=check($melksanad);
$melkclass=$_POST['melkclass'];
$melkclass=check($melkclass);
$zirbana=$_POST['zirbana'];
$zirbana=check($zirbana);
$masahat=$_POST['masahat'];
$masahat=check($masahat);
$tel=$_POST['tel'];
$tel=check($tel);
$otagh=$_POST['otagh'];
$otagh=check($otagh);
$array=array($tarikh,$sql);
if(isset(
$_POST['ok'])){$ok=1;}else{$ok=0;}
if(isset(
$_POST['vizhe'])){$vizhe=1;}else{$vizhe=0;}
$adress=$_POST['adress'];

if(
$amlakbase=='فروش'){$parent=1;}
if(
$amlakbase=='رهن و اجاره'){$parent=2;}
if(
$amlakbase=='معاوضه'){$parent=3;}
include(
'../config/connect.php');
$sql3="update amlak set ok='".$ok."',amlakbase='".$amlakbase."',melksanad='".$melksanad."',melkclass='".$melkclass."',price='".$price."',loan='".$loan."',parent='".$parent."',mantaghe='".$mantaghe."',zirbana='".$zirbana."',masahat='".$masahat."',tabaghe='".$tabaghe."',otagh='".$otagh."',adress='".$adress."',tel='".$tel."',vizhe='".$vizhe."' where id=25 ";
$stmt3=$db->prepare($sql3);
$stmt3->execute();
header('location:index.php');
?>
دیروز ۰۲:۴۰ عصر

php مرکز کد های سایت...

ما را در سایت php مرکز کد های سایت دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 155 تاريخ: يکشنبه 13 تير 1395 ساعت: 4:01

صفحه بندی