
if ((
$_SESSION["user"]== null ))
{
echo '
Member login';
}
else
{
ob_start();
/* güvenlik */
function guvenlik($par){
return htmlspecialchars(trim($par));
}
array_map('guvenlik', $_GET);
/* Productsim */
if ( isset($_GET['sepetim']) ){
} else
{
/* sepette kaç tane ürün var? */
$uyeid = $_SESSION["uyeid"];
$query2= mysql_query("SELECT COUNT(*) as adet FROM siparis where uye_id=".$uyeid." AND siparismi='H' ");
while($sql= mysql_fetch_array($query2) )
$sonuc = $sql["adet"];
if ( $sonuc!="0" ){
echo '
';
}
else {
echo '
';
}
}
}
?>
- '.$fadi.'
- My account
- Orders
- Log Out
siparisver ". $_REQUEST['siparisver']."
"; if ( isset($_GET['siparisver'])){ $uye_id = $_SESSION["uyeid"]; $siparis_id = rand(1,10000000); if (isset($uye_id)) { $sql = "select id,urun_id,uye_id,miktar,snot siparismi FROM siparis where siparismi = 'H' and uye_id=".$uye_id; $query= mysql_query($sql); while($sql= mysql_fetch_array($query) ) { $wid = $sql["id"]; $wnotId = "not_".$wid; $wadetId = "adet_".$wid; $not = $_REQUEST[$wnotId]; $adet = $_REQUEST[$wadetId]; $wuSql = "update siparis set snot='".$not."', miktar=".$adet.", siparis_id=".$siparis_id.", siparismi='E', siparis_tarih=NOW() where siparismi='H' and id=".$wid; $yonetici_sil_sorgu2 = mysql_query($wuSql); /* Orderse bir topluluk halinde id ver sepet yap */ } $siparis_sepet=mysql_query("insert into siparis_sepet (siparis_id,uye_id) values ('$siparis_id','$uye_id'); "); $yonetici_sil_sorgu3 = mysql_query($siparis_sepet); } header('Location:'.$_SERVER['HTTP_REFERER']); } /* sepetten ürün çıkart */ if ( isset($_GET['cikart']) ){ $uye_id = $_SESSION["uyeid"]; $gelen =$_REQUEST["cikart"]; if (isset($uye_id)) { $sql = "select id,urun_id,uye_id,miktar, siparismi FROM siparis where siparismi = 'H' and id='".$gelen."' and uye_id=".$uye_id ; $query= mysql_query($sql); while($sql= mysql_fetch_array($query) ) { $wid = $sql["id"]; $yonetici_sil_sorgu2 = mysql_query("delete from siparis where siparismi='H' and id=".$wid); $yonetici_sil_sorgu3 = mysql_query("delete from siparis_renk where siparis_id=".$wid.""); } } // header('Location:'.$_SERVER['HTTP_REFERER']); } ?> // Ürün ekleme işlemi if ( isset($_GET['ekle']) ){ /* sepete ürün ekle */ if(is_array($_REQUEST['renkler'])){ foreach($_REQUEST['renkler'] AS $renklerid){ header('Location:'.$_SERVER['HTTP_REFERER']); } } // ben bunları cekerken, tek tek kaydetmem gerekecek renk kodlarını, orda nasıl parçalıcam $id = $_GET['ekle']; //***************************************************************************************************** $urun_id = $id; $uye_id = $_SESSION["uyeid"]; $miktar = $_POST['adet']; $siparismi = "H"; $yonetici_ekle_sorgu=mysql_query("insert into siparis (urun_id, uye_id, miktar, siparismi ) values ('$id', '$uye_id', '$miktar', '$siparismi' )"); $urunid = mysql_insert_id(); if(isset($_REQUEST['renkler'])) { $renkler = $_REQUEST['renkler']; foreach($renkler as $renk) { $yonetici_ekle_sorgu=mysql_query("insert into siparis_renk (siparis_id,renk_id) values ('$urunid','$renk'); "); } if ($urunid!="0") { $bilgi = '
Ürün Başarı ile Eklenmiştir ('.$urunid.') !
' ;
}
header('Location:'.$_SERVER['HTTP_REFERER']);
}
else
{
$bilgi = '
Hiç renk seçmediniz!
' ;
}
setcookie('urun['.$id.']', $id, time() + 86400);
header('Location:'.$_SERVER['HTTP_REFERER']);
}
/* Empty Cart */
if ( isset($_GET['bosalt']) ){
foreach ( $_COOKIE['urun'] as $key => $val ){
setcookie('urun['.$key.']', $key, time() - 86400);
}
header('Location:'.$_SERVER['HTTP_REFERER']);
}
/* sepetten ürün çıkart */
if ( isset($_GET['cikart']) ){
setcookie('urun['.$_GET['cikart'].']', $_GET['cikart'], time() - 86400);
header('Location:'.$_SERVER['HTTP_REFERER']);
}
?>
$xid=$_GET["id"];
$q2= mysql_query("select * from urunlerdb where id=".$xid." limit 1");
while($fx= mysql_fetch_array($q2) ) {
$xuadi= $fx["uadi"];
$xuozelliken= $fx["uozelliken"];
$xurl= $fx["url"];
$xurl1= $fx["url1"];
$xurl2= $fx["url2"];
$xurl3= $fx["url3"];
$xurl4= $fx["url4"];
$xkatid= $fx["katid"];
$xbeden= $fx["beden"];
$xid= $fx["id"];
$uid= $fx["katid"];
}
?>
if (($xurl==null)) {
echo ' ';
}else{
echo '
';
}
if (($xurl1==null)) {
echo ' ';
}else{
echo '
';
}
if (($xurl2==null)) {
echo ' ';
}else{
echo '';
}
if (($xurl3==null)) {
echo ' ';
}else{
echo '';
}
if (($xurl4==null)) {
echo ' ';
}else{
echo '';
}
?>
if (($xurl==null)) {
echo ' ';
}else{
echo '
';
}
if (($xurl1==null)) {
echo ' ';
}else{
echo '
';
}
if (($xurl2==null)) {
echo ' ';
}else{
echo '
';
}
if (($xurl3==null)) {
echo ' ';
}else{
echo '
';
}
if (($xurl4==null)) {
echo ' ';
}else{
echo '
';
}
?>
Other products
$qwert= mysql_query("select * from urunlerdb where katid='".$uid."' order by rand() limit 6");
while($fxs= mysql_fetch_array($qwert) ) {
$uadi= $fxs["uadi"];
$uozelliken= $fxs["uozelliken"];
$url= $fxs["url"];
$katid= $fxs["katid"];
$beden= $fxs["beden"];
$id= $fxs["id"];
echo '
'.(isset($_COOKIE['id'][$id]) ? ' [sepetten çıkart]' : ' Review Product').'
';
}
?>