<?php
$path="../../";
include("../../map.php");
include("../../scripts.php");
?>
<?php $sql=mysqli_query($conn, "select * from genel where id=".$_GET["id"]." order by s10 asc"); $rs=mysqli_fetch_assoc($sql);?>
<html style="background-color:white;">
<head>
    <meta http-equiv="Content-Language" content="tr">
</head>
<body>
    <form class="msa" name="frm" method="POST" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&durum=duzenle&id=<?php echo $_GET["id"];?>" enctype="multipart/form-data">
        <div class="panel panel-default">
            <div class="panel-heading">
				<?php echo $sdil[222]; //Ödeme?> <?php echo $sdil[207]; //Detay?> <?php if($_GET["durum"]=="ok"){echo "<i class=\"fa fa-check text-success\"></i>";}?>
				<select size=1 name="s19" style="width: 200px; float: right; margin-top: -5px; background: whitesmoke;" class="form-control e">
					<option value="0">Admin</option>
					<?php $sqlm=mysqli_query($conn, "select * from t5 where (s9=1 or s1=1) $luye"); while($rsm=mysqli_fetch_assoc($sqlm)){?>
					<option value="<?php echo $rsm["id"];?>" title="<?php echo $rsm["t1"];?>" alt="<?php echo $rsm["t1"];?>" style="color:#6699FF" <?php if (($rs["s19"]=="" and $rsm["id"]==$_SESSION["user_id"]) or ($rs["s19"]<>"" and $rsm["id"]==$rs["s19"])) {?>Selected<?php }?>><?php echo ihb($rsm["t1"]);?></option>
					<?php }?>
				</select>
			</div>
            <div class="panel-body"> 
                <!---->
                <?php if($rs["s2"]==0){?>
                    <label><?php echo $rs["t1"];?> <?php echo $sdil[223]; //Hesap?> <?php echo $sdil[224]; //Bilgileri?></label>
<div class="row">
                    <div class="col-md-9 col-xs-12">
                        <input type="text" name="n4" value="<?php echo $rs["n4"];?>" class="form-control" style="margin-bottom:5px;" title="Hesap Adı" placeholder="Hesap Adı">
                    </div>
                    <div class="col-md-3 col-xs-12">
                        <input type="text" name="t12" value="<?php if($rs["t12"]==""){echo $module["currency"];}else{echo $rs["t12"];}?>" class="form-control" style="margin-bottom:5px;" title="Para Birimi" placeholder="Para Birimi">
                    </div>
                    <div class="col-md-9 col-xs-12">
                        <input type="text" name="n2" value="<?php echo $rs["n2"];?>" class="form-control" title="Hesap No" placeholder="Hesap No">
                    </div>
                    <div class="col-md-3 col-xs-12">
                        <input type="text" name="n1" value="<?php echo $rs["n1"];?>" class="form-control" title="Şube No" placeholder="Şb">
                    </div>
                    <div class="col-md-9 col-xs-12">
                        <input type="text" name="n3" value="<?php echo $rs["n3"];?>" class="form-control" title="Iban No" placeholder="Iban No">
                    </div>
                    <div class="col-md-3 col-xs-12">
                        <input type="text" name="t4" value="<?php echo $rs["t4"];?>" class="form-control" title="Swift Code" placeholder="Swift Code">
                    </div>
 </div>
                <?php }elseif($rs["s2"]==1){?>
                    <label><?php echo $rs["t1"];?> VPos <?php echo $sdil[224]; //Bilgileri?></label>
<div class="row">
<div class="col-md-12 col-xs-12">
                    <input type="text" list="ln6" name="n6" value="<?php echo $rs["n6"];?>" class="form-control" style="margin-bottom:5px; width:95%; margin-top:3px; float: left;" title="(n6) PostUrl" placeholder="PostUrl">
                    <datalist id="ln6">
                        <option value="https://www.sanalakpos.com/fim/est3Dgate">Akbank</option>
                        <option value="https://sanalpos.teb.com.tr/fim/est3Dgate">Teb</option>
                        <option value="https://sanalpos.isbank.com.tr/fim/est3Dgate">İşbank </option>
                        <option value="https://sanalpos2.ziraatbank.com.tr/fim/est3Dgate">Ziraat bankası</option>
                        <option value="https://sanalpos.halkbank.com.tr/fim/est3Dgate">Halkbank</option>
                        <option value="https://sanalpos.ingbank.com.tr/fim/est3Dgate">ING</option>
                        <option value="https://sanalpos.sekerbank.com.tr/fim/est3Dgate">Şeker Bank</option>
                        <option value="https://setmpos.ykb.com">Y.Kredi Test</option>
                        <option value="https://www.posnet.ykb.com">Y.Kredi Gerçek</option>
                    </datalist>
				</div>
				<div class="col-md-12 col-xs-12">
                    <input type="checkbox" name="s4" style="margin-bottom:5px; width:4%; float:right; margin-left:1%; margin-top:3px;" class="form-control" value="1" <?php if($rs["s4"]==1){ echo "Checked"; }?> title="Aktif/Pasif">
                    <P style="font-size:10px">* Est alt yapısındakiler için girilmeli (Akbank, TEB, Halkbank, İşbank, Anadolubank, Cardplus, ING, Ziraatbank, Şekerbank, A Bank, TFKB, Fibabanka) & Yapıkredi</P>
				</div>
				<div class="col-md-6 col-xs-12">
                    <input type="text" name="n1" value="<?php echo $rs["n1"];?>" class="form-control" style="margin-bottom:5px; width:100%; float:left;" title="(n1) Mağaza(Üye işyeri) No" placeholder="Mağaza(Üye işyeri) No">
				</div>
				<div class="col-md-6 col-xs-12">
					<select class="form-control" name="t4"> 
                       <option value="3D_PAY_HOSTING" <?php if($rs["t4"]=="3D_PAY_HOSTING"){echo "selected";}?>>3D PAY HOSTING</option>
                        <option value="3D_PAY" <?php if($rs["t4"]=="3D_PAY"){echo "selected";}?>>3D PAY</option>
                        <option value="3D" <?php if($rs["t4"]=="3D"){echo "selected";}?>>3D</option>
                    </select>
				</div>
				<div class="col-md-12 col-xs-12">
                    <input type="text" name="n9" value="<?php echo $rs["n9"];?>" class="form-control" style="margin-bottom:5px; width:100%; float:left;" title="(n9) PosnetID" placeholder="PosnetID/SubMerchantID">
                    <P style="font-size:10px">* PosnetID {Yapıkredi} / SubMerchantID {Garanti - Alt Bayi}</P>
			</div>
			<div class="col-md-12 col-xs-12">
                    <input type="text" name="n2" value="<?php echo $rs["n2"];?>" class="form-control" style="margin-bottom:5px; width:100%;" title="(n2) Terminal No" placeholder="Terminal no">
</div>
<div class="col-md-12 col-xs-12">
                    <input type="text" name="n5" value="<?php echo $rs["n5"];?>" class="form-control" style="margin-bottom:5px; width:100%; margin-top:3px;" title="(n5) StoreKey(İşyeri Anahtarı)" placeholder="StoreKey">
					<P style="font-size:10px">* Garanti : 476172616e746953616e616c506f733132337177655a5843 *24 Byte Hex</P>
</div>
<div class="col-md-6 col-xs-6">
                    <input type="text" name="n3" value="<?php echo $rs["n3"];?>" class="form-control" style="margin-bottom:5px; width:100%;" title="(n3) Api Kullanıcı" placeholder="Api User">
</div>
<div class="col-md-6 col-xs-6">
                    <input type="password" name="n4" value="<?php echo $rs["n4"];?>" class="form-control" style="margin-bottom:5px; width:100%; margin-top:3px;" title="(n4) Api Şifresi" placeholder="Api Key">
</div>
</div>
                    <!---->
                <?php }elseif($rs["s2"]==3){?>
                    <label><?php echo $rs["t1"];?> Fintech <?php echo $sdil[224]; //Bilgileri?></label>
                    <div style="clear:both;"></div>
                    Fintech bilgileri tanımlar modülünden girilmektedir.
                <?php }?>
                <div class="row">
                    <div class="col-xs-6">
                        <input type="checkbox" class="" name="r1" value="ON" style="display:none; float:left; border:#fff; margin-right:5px; margin-top:3px; margin-left:2px;" alt="Resim Var/Yok" title="Resim Var/Yok">
                        <input class="form-control" type="file" name="n7" style="" onchange="document.frm.r1.checked=true;" accept="*">
                        <P>* 180x40px logosu</P>
                    </div>
                    <div class="col-xs-6">
                        <input type="text" name="t3" value="<?php echo $rs["t3"];?>" class="form-control" style="" title="(t3) Renk" placeholder="Renk">
                    </div>
                </div>
                <button type="submit" style="float:right; margin-right:10px; margin-top:5px;" id="btn" class="btn btn-primary">Kaydet</button>
                <?php if(!empty($rs["n7"])){?>
                    <div style="clear:both;"></div>
                    <a href="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"];?>&durum=rsil"><i class="fa fa-times" style="position:absolute; margin-top:-8px; margin-left:5px;"></i></a>
                    <img src="../../../deppo/image/<?php echo $rs["n7"];?>" style="margin-left:5px; height:65px;">
                <?php }?>
                <?php if($c7==1 and $rs["t2"]=="Havale"){?>
                    <div class="row">
                        <div class="col-xs-12">
                            <label>Açılış Bakiyesi</label>
                            <input type="text" name="pb1" value="<?php echo wprice($rs["pb1"]);?>" class="form-control" style="" placeholder="Açılış Bakiyesi">
                        </div>
                    </div>
                <?php }?>
            </div>
        </div>
    </form>
 <?php if($rs["s2"]<>0){?>
    <div class="accordion" id="accordion">
        <div class="card card-default" style="margin-top:0px !important;">
            <div class="card-header">
                <h4 class="card-title m-0">
                    <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapse1One">Taksitler</a>
                </h4>
            </div>
            <div id="collapse1One" class="collapse show">
                <div class="card-body no-padding" style="padding: 2px;">
                    <div class="" tabindex="0">
                        <table class="table" style="overflow:auto; font-size:14px;">
                            <tr class="tittr mdn">
                                <td class="w12 mw20"><?php echo translate("#Taksit")?></td>
                                <td class="w12 mw20">+ <?php echo translate("#Oran")?></td>
                                <td class="w15 mw20"><?php echo translate("#V.Fark")?> %</td>
                                <td class="w8 dn"><?php echo translate("#Sıra")?></td>
                                <td class="w8 mw20"><?php echo translate("#İşlem")?></td>
                            </tr>                                                               
                            <form method="POST" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"];?>&durum=ekle2">
                                <input type="hidden" value="taksit" name="ne">
                                <input type="hidden" name="s4" value="0">
                                <tr class="addtr">
                                    <td class="mpr">
                                        <input type="text" name="s2" value="0" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="Taksit" class="form-control">
                                        <span class="rph ddn mfs10"><?php echo translate("#Taksit")?></span>
                                    </td>
                                    <td class="mpr">
                                        <input type="text" name="s3" size="5" value="0" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="+ Oran" class="form-control">
                                        <span class="rph ddn mfs10">+ <?php echo translate("#Oran")?></span>
                                    </td>
                                    <td class="mpr">
                                        <input type="text" name="pb1" size="5" value="0"  onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="Vade Farkı" class="form-control">
                                        <span class="rph ddn mfs10"><?php echo translate("#Vade Farkı")?></span>
                                    </td>
                                    <td class="w8 dn">
                                        <input type="text" name="s10" value="0" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="Sıra" class="form-control">
                                        <span class="rph ddn"><?php echo translate("#Sıra")?></span>
                                    </td>   
                                    <td class="w8">
                                        <div class="input-group-btn">
                                            <button tabindex="-1" class="btn btn-warning " type="submit" <?php if($e10==1 and $MSA<>"1"){?>disabled<?php }?>><i class="fa fa-plus" ></i></button>
                                        </div>
                                    </td>
                                </td>
                            </tr>
                        </form>
                        <?php
							$sql=mysqli_query($conn, "select * from genel where ne='taksit' and s1=".$_GET["id"]." order by s1,s2 asc"); while($rs=mysqli_fetch_assoc($sql)){ $s1=$rs["s1"];
                            if($rs["s4"]=="" or $rs["s4"]=="0"){
                                ?>
                                <form method="POST" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $rs["id"];?>&id=<?php echo $rs["id"];?>&durum=duzenle2" style="margin-bottom:5px;" id="xf<?php echo $rs["id"];?>" name="xf<?php echo $rs["id"];?>">
                                    <input type="hidden" value="taksit" name="ne">
                                    <input type="hidden" name="s4" value="0">
                                    <tr class="btr">
                                        <td class="w12 mpr">
                                            <input type="text" name="s2" size="5" value="<?php echo $rs["s2"];?>" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="Taksit" class="form-control">
                                            <span class="rph ddn mfs10"><?php echo translate("#Taksit")?></span>
                                        </td>
                                        <td class="w12 mpr">
                                            <input type="text" name="s3" size="5" value="<?php echo $rs["s3"];?>" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="+ Oran" class="form-control">
                                            <span class="rph ddn mfs10">+ <?php echo translate("#Oran")?></span>
                                        </td>
                                        <td class="w12 mpr">
                                            <input type="text" name="pb1" size="5" value="<?php echo para($rs["pb1"]);?>" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="Vade Farkı" class="form-control">
                                            <span class="rph ddn mfs10"><?php echo translate("#Vade Farkı")?></span>
                                        </td>
                                        <td class="w8 dn">
                                            <input type="text" name="s10" size="1" value="<?php echo $rs["s10"];?>" title="Sıra" class="form-control">
                                            <span class="rph ddn">Sıra</span>
                                        </td>
                                        <td class="w8">
                                            <div class="input-group-btn">
                                                <button tabindex="-1" class="btn btn-warning " type="button" id="b<?php echo $rs["id"];?>" onclick="Ajaxs('<?php echo $rs["id"];?>','#result','AjaxPost');" <?php if($e10==1 and $MSA<>1){?>disabled<?php }?>  style="margin-right:5px;"><i class="fa fa-refresh" ></i></button>
                                                <?php if($e10==1 and $MSA<>1){?>
                                                    <button type="button" style="margin-left: 1px" tabindex="-1" class="btn btn-danger " href="#"><i class="fa fa-ban " ></i><span class="ddn"> -</span></button>
                                                <?php }else{?>
                                                    <button type="button" style="margin-left: 1px" tabindex="-1" class="btn btn-danger " onclick="location.href='?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"];?>&item=<?php echo $rs["id"];?>&durum=sil'; return confirm(' Bu Kayıt Silinecektir ! Onaylıyor musunuz ?');"><i class="fa fa-trash " ></i></button>
                                                <?php }?>
                                            </div>
                                        </td>
                                    </tr>
                                </form>
                            <?php }}?>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <?php $sqlts=mysqli_query($conn, "select * from genel where ne='tset' and s1=".$_GET["id"]." order by id desc"); while($tset=mysqli_fetch_assoc($sqlts)){?>
            <div class="card card-default" style="margin-top: 0px !important">
                <div class="card-header">
                    <h4 class="card-title m-0">
                        <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-t<?php echo $tset["id"]?>" aria-expanded="true" aria-controls="collapse-t<?php echo $tset["id"]?>" style="padding:0px 8px;">
                            <form action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&durum=dset&id=<?php echo $tset["id"]?>" method="post" style="float:left; padding:5px 0px;width: 100%;">
                                <input value="<?php if($tset["t1"]==""){?>Set-<?php echo $tset["id"]?><?php }else{?><?php echo $tset["t1"]?><?php }?>" name="set" class="form-control" style="width:90%; float:left;"  />
                                <button type="button" onclick="location.href='?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&durum=ssil&id=<?php echo $tset["id"]?>'" class="btn btn-xs btn-danger" style="float: right; margin-right: 10px;"><?php echo translate("Set Sil")?></button>
                            </form>
                        </a>
                    </h4>
                </div>
                <div id="collapse-t<?php echo $tset["id"]?>" class="collapse">
                    <div class="card-body no-padding" style="padding: 2px;">
                        <table class="table table-no-more table-bordered table-striped mb-0">
                            <tr class="tittr  mdn">
                                <td class="w10"><?php echo translate("#Taksit")?></td>
                                <td class="w10 dn">+ <?php echo translate("#Oran")?></td>
                                <td class="w10"><?php echo translate("#V.Fark")?> %</td>
                                <td><?php echo translate("#Banka")?></td>
                                <td class="w8 dn"><?php echo translate("#Sıra")?></td>  
                                <td class="w8"><?php echo translate("#İşlem")?></td>
                            </tr>       
                            <form method="POST" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&durum=ekle2">
                                <input type="hidden" value="taksit" name="ne">
                                <input type="hidden" name="s4" value="<?php echo $tset["id"]?>">
                                <tr>
                                    <td class="w12">
                                        <input type="text" name="s2" value="0" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="Taksit" class="form-control">
                                    </td>
                                    <td class="w12 dn">
                                        <input type="text" name="s3" size="5" value="0" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="+ Oran" class="form-control">
                                    </td>
                                    <td class="w12">
                                        <input type="text" name="pb1" size="5" value="0"  onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="Vade Farkı" class="form-control">
                                    </td>
                                    <td class="w8 dn">
                                        <input type="text" name="s10" value="0" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="Sıra" class="form-control">
                                    </td>
                                    <td class="w8">
                                        <div class="input-group-btn">
                                            <button tabindex="-1" class="btn btn-warning" type="submit" <?php if($e10==1 and $MSA<>1){?>disabled<?php }?>><i class="fa fa-plus"></i><span class="ddn"> <?php echo $sdil[201]; //ekle?></span></button>
                                        </div>
                                    </td>
                                </td>
                            </tr>
                        </form>
                        <?php $sql=mysqli_query($conn, "select * from genel where ne='taksit' and s4='".$tset["id"]."' order by s1,s2 asc"); while($rs=mysqli_fetch_assoc($sql)){ $s1=$rs["s1"]; ?>
                            <form method="POST" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $rs["id"];?>&durum=duzenle2" style="margin-bottom:5px;">
                                <input type="hidden" value="taksit" name="ne">
                                <input type="hidden" name="s4" value="<?php echo $tset["id"]?>">
                                <tr>
                                    <td class="w12">
                                        <input type="text" name="s2" size="5" value="<?php echo $rs["s2"];?>" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="Taksit" class="form-control">
                                    </td>
                                    <td class="w12 dn">
                                        <input type="text" name="s3" size="5" value="<?php echo $rs["s3"];?>" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="+ Oran" class="form-control">
                                    </td>
                                    <td class="w12">
                                        <input type="text" name="pb1" size="5" value="<?php echo para($rs["pb1"]);?>" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }" title="Vade Farkı" class="form-control">
                                    </td>
                                    <td class="w8 dn">
                                        <input type="text" name="s10" size="1" value="<?php echo $rs["s10"];?>" title="Sıra" class="form-control">
                                    </td>
                                    <td class="w8">
                                        <div class="input-group-btn">
                                            <button tabindex="-1" class="btn btn-warning" type="submit" <?php if($e10==1 and $MSA<>1){?>disabled<?php }?> style="margin-right:5px;"><i class="fa fa-refresh" ></i><span class="ddn"> <?php echo $sdil[203]; //Güncelle?></span></button>
                                            <button type="button" style="margin-left: 1px" tabindex="-1" class="btn btn-danger" href="location.href='?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"];?>&item=<?php echo $rs["id"];?>&durum=sil'; return confirm(' Bu Kayıt Silinecektir ! Onaylıyor musunuz ?');"><i class="fa fa-trash" ></i><span class="ddn"> <?php echo $sdil[204]; //Kaldır?></span></button>
                                        </div>
                                    </td>
                                </tr>
                            </form>
                        <?php }?>
                    </table>
                </div>
            </div>
        </div>
    <?php }?>
<?php }?>
</body>
</html>
<?php
echo $footer;
if($_GET["durum"]=="duzenle"){
    if($_POST["r1"]<>""){
        $kaydedilecekyer = "../../../deppo/image";
        $kaynak  = $_FILES['n7']['tmp_name'];  //Burası resminiz kök klasörünün yerini verir  
        $tipi = $_FILES['n7']['type']; // Dosyanın Tipi
        $adi  = $_FILES["n7"]["name"]; // Dosyanın PCdeki Adı
        $uzanti = explode('.',$_FILES['n7']['name']);
        $rand = substr(md5(uniqid(rand())),0,10);
        $yeni = "".$rand.".".$uzanti[count($uzanti)-1]."";
        move_uploaded_file ($_FILES['n7']['tmp_name'], $kaydedilecekyer . "/".$yeni);
        $Rs = mysqli_query($conn, "update genel set n7='".$yeni."' where id=".$_GET["id"]."");
    }
    if(!empty($_POST["s4"])){$s4=$_POST["s4"];}else{$s4="0";}
    if($_POST["pb1"]<>""){$pb1=$_POST["pb1"];}else{$pb1="0";}
    $Rs = mysqli_query($conn, "update genel set t3='".$_POST["t3"]."', t4='".$_POST["t4"]."', t5='".$_POST["t5"]."', t12='".$_POST["t12"]."', n1='".$_POST["n1"]."', n2='".$_POST["n2"]."', n3='".$_POST["n3"]."', n4='".$_POST["n4"]."', n5='".$_POST["n5"]."', n6='".$_POST["n6"]."', n8='".$_POST["n8"]."', n9='".$_POST["n9"]."', pb1='".sprice($pb1)."', s19='".$_POST["s19"]."' where id=".$_GET["id"]."");
    echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$_GET["id"]."&durum=ok",self,0,0);
}elseif($_GET["durum"] == "rsil"){
    $dosya="../../../deppo/image/".$rs["n7"]."";
    unlink($dosya);
    $Rs = mysqli_query($conn, "update genel set n7='' where id=".$_GET["id"]."");
    echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$_GET["id"]."&durum=ok",self,0,0);
}elseif($_GET["durum"]=="ekle2"){
    $ss2 = explode(',',$_POST["s2"]);
    $sql = $conn->query("insert into genel(s1,s2,s3,s4,s10,t1,pb1,ne) values ('".$_GET["id"]."', '".$_POST["s2"]."','".$_POST["s3"]."','".$_POST["s4"]."','".$_POST["s10"]."', '".$_POST["t1"]."', '".sprice($_POST["pb1"])."', '".$_POST["ne"]."')");
    echo "<SCRIPT LANGUAGE='JavaScript'>window.location='?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$_GET["id"]."&durum=ok_2';</script>";
}elseif($_GET["durum"]=="duzenle2"){
    $Rs = mysqli_query($conn, "update genel set s2='".$_POST["s2"]."', s3='".$_POST["s3"]."', s4='".$_POST["s4"]."', pb1='".sprice($_POST["pb1"])."', s10='".$_POST["s10"]."' where id=".$_GET["id"]."");  
}elseif($_GET["durum"]=="sil"){
    $sql = mysqli_query($conn, "delete from genel where id=".$_GET["item"]."");
    $sql = mysqli_query($conn, "delete from genel where ne='taksit' and s1=".$_GET["item"]."");
    echo "<SCRIPT LANGUAGE='JavaScript'>window.location='?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$_GET["id"]."&durum=ok_1';</script>";
}elseif($_GET["durum"]=="sekle"){
    $sql = $conn->query("insert into genel(ne) values ('tset')");
    echo "<SCRIPT LANGUAGE='JavaScript'>window.location='?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&durum=ok_2';</script>";
}elseif($_GET["durum"]=="ssil"){
    $sql = mysqli_query($conn, "delete from genel where id=".$_GET["id"]."");
    $sql = mysqli_query($conn, "delete from genel where ne='taksit' and s4=".$_GET["id"]."");
    echo "<SCRIPT LANGUAGE='JavaScript'>window.location='?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&durum=ok_1';</script>";
}elseif($_GET["durum"]=="dset"){
    $Rs = mysqli_query($conn, "update genel set t1='".$_POST["set"]."' where id=".$_GET["id"]."");  
    echo "<SCRIPT LANGUAGE='JavaScript'>window.location='?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&durum=ok_2';</script>";
}
?>