<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <?php
        $TTpikselKodu = ($site["site_tiktok_donusum"]) ? preg_split('/\r\n|[\r\n]/', trim($site["site_tiktok_donusum"])) : null;
        if (!isset($_SESSION['purchase_tracked'])) {
            $_SESSION['purchase_tracked'] = true;
            // TikTok kodunu göster
            if ($TTpikselKodu) :
    ?>
        <!-- TikTok Purchase Event Code -->
        <!--
        <script>
            !function(w, d, t) {
                w.TiktokAnalyticsObject = t;
                var ttq = w[t] = w[t] || [];
                ttq.methods = ["ready", "page", "track", "identify", "instances", "debug", "on", "off", "once", "ready", "alias", "group", "enableCookie", "disableCookie"];
                ttq.setAndDefer = function(t, e) {
                    t[e] = function() {
                        t.push([e].concat(Array.prototype.slice.call(arguments, 0)))
                    }
                };
                for (var i = 0; i < ttq.methods.length; i++) {
                    ttq.setAndDefer(ttq, ttq.methods[i])
                }
                ttq.instance = function(t) {
                    var e = ttq._i[t] || [];
                    for (var n = 0; n < ttq.methods.length; n++) {
                        ttq.setAndDefer(e, ttq.methods[n])
                    }
                    return e
                };
                ttq.load = function(e, n) {
                    var i = "https://analytics.tiktok.com/i18n/pixel/events.js";
                    ttq._i = ttq._i || {};
                    ttq._i[e] = [];
                    ttq._i[e]._u = i;
                    ttq._t = ttq._t || {};
                    ttq._t[e] = +new Date();
                    ttq._o = ttq._o || {};
                    ttq._o[e] = n || {};
                    var o = document.createElement("script");
                    o.type = "text/javascript";
                    o.async = true;
                    o.src = i + "?sdkid=" + e + "&lib=" + t;
                    var a = document.getElementsByTagName("script")[0];
                    a.parentNode.insertBefore(o, a)
                };
    
                <?php if (!empty($TTpikselKodu[0]) && $total > 0): ?>
                    ttq.load('<?= trim($TTpikselKodu[0]); ?>');
                    ttq.ready(function () {
                        ttq.instance('<?= trim($TTpikselKodu[0]); ?>').track('CompletePayment', {
                            value: <?= $total ?? 0 ?>,
                            currency: 'TRY'
                        });
                    });
                <?php endif; ?>
            }(window, document, 'ttq');
        -->
        </script>
    	<script>
    	!function (w, d, t) {
    	  w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(
    	var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var r="https://analytics.tiktok.com/i18n/pixel/events.js",o=n&&n.partner;ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=r,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};n=document.createElement("script")
    	;n.type="text/javascript",n.async=!0,n.src=r+"?sdkid="+e+"&lib="+t;e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(n,e)};
    
    	  ttq.load('<?= trim($TTpikselKodu[0]); ?>');
    	  ttq.page();
    	}(window, document, 'ttq');
    
    	ttq.track('Purchase', {
    		"contents": [
    			{
    				"content_id": "927", 
    				"content_name": "Product",
    				"content_type": "product" 
    			}
    		],
    		"value": <?= $total ?? 0 ?>, 
    		"currency": "TRY" 
    	});
    	</script>
        
        <!-- End TikTok Purchase Event Code -->
    <?php endif; }?>
    <?php
    $FBpikselKodu = ($site["site_fb_piksel"]) ? preg_split('/\r\n|[\r\n]/', trim($site["site_fb_piksel"])) : null;
    if ($FBpikselKodu) :
    ?>
        <!-- Facebook Dönüşüm Kodu -->
        <script>
            ! function(f, b, e, v, n, t, s) {
                if (f.fbq) return;
                n = f.fbq = function() {
                    n.callMethod ?
                        n.callMethod.apply(n, arguments) : n.queue.push(arguments)
                };
                if (!f._fbq) f._fbq = n;
                n.push = n;
                n.loaded = !0;
                n.version = '2.0';
                n.queue = [];
                t = b.createElement(e);
                t.async = !0;
                t.src = v;
                s = b.getElementsByTagName(e)[0];
                s.parentNode.insertBefore(t, s)
            }(window, document, 'script',
                'https://connect.facebook.net/en_US/fbevents.js');
            <?php foreach ($FBpikselKodu as $piksel) : ?>
                fbq('init', '<?= $piksel; ?>');
            <?php endforeach; ?>
            fbq('track', 'PageView');
            fbq('track', 'Purchase');
        </script>
        <?php foreach ($FBpikselKodu as $piksel) : ?>
            <noscript>
                <img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=<?= $piksel; ?>&ev=PageView&noscript=1" />
            </noscript>
        <?php endforeach; ?>
        <!-- Facebook Dönüşüm Kodu -->
    <?php endif; ?>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
    <title>SİPARİŞ SONUCU</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta name="description" content="">
    <meta name="keywords" content="">

    <style type="text/css">
        body {
            margin-left: 0px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
        }

        * {
            border: 0;
        }

        @media screen and (min-width: 600px) {
            .imge {
                width: auto;
            }
        }

        @media screen and (max-width: 600px) {
            .imge {
                width: 100%;
            }
        }
    </style>




</head>

<body style="background-color:#fff">


    <link rel="stylesheet" type="text/css" href="lightbox/themes/default/jquery.lightbox.css" />
    <script type="text/javascript" src="lightbox/jquery.lightbox.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(function() {
            jQuery('.lightbox').lightbox();


        });
    </script>


    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td align="center"><a href="/"><img src="../siparis_alindi.jpg" class="imge" /></a></td>
        </tr>
        <tr>
            <td align="center"><a href="/"></td>
        </tr>
    </table>



</body>

</html>