<?php
    //Update 2025-01-17
    date_default_timezone_set('Asia/Jakarta');
    $category = '';

    function visitor_log($msg){
        $log_file_data = 'log/log_' . date('Y-M-d') . '.log';
        file_put_contents($log_file_data,$msg."\n",FILE_APPEND);
    }
    
    function getUserIP()
    {
        // Get real visitor IP behind CloudFlare network
        if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
                  $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
                  $_SERVER['HTTP_CLIENT_IP'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
        }
        $client  = @$_SERVER['HTTP_CLIENT_IP'];
        $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
        $remote  = $_SERVER['REMOTE_ADDR'];
    
        if(filter_var($client, FILTER_VALIDATE_IP))
        {
            $ip = $client;
        }
        elseif(filter_var($forward, FILTER_VALIDATE_IP))
        {
            $ip = $forward;
        }
        else
        {
            $ip = $remote;
        }
    
        return $ip;
    }

    $user_ip = getUserIP();
    visitor_log('Log '.date('d-m-Y H:i:s').' AR-Fashion Visitor: '.$user_ip);
    
    
    
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <title>Jual kaos polos murah dan berkualitas</title>
    
    <meta name="description" content="Jual kaos polos murah dan berkualitas dengan berbagai macam warna serta bahan pilihan.">
    <meta name="keywords" content="kaos polos, kaos polos murah, kaos polos murah berkualitas, jual kaos polos murah"/>
    <meta name="author" content="PT. AR Group Berkah Bersama">

    <!-- Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bitter:ital@1&family=Poppins:ital,wght@0,100;0,300;0,400;0,700;1,700&display=swap"/>
        
    <!-- Favicon -->
    <link rel="shortcut icon" href="ar-favicon.ico" type="image/x-icon" />

    <!-- Bootstrap + Creative Studio main styles -->
	<link rel="stylesheet" href="assets/css/creative-studio2.css">
    
    <!-- My Style -->
    <link rel="stylesheet" href="polosh/css/style.css?version=1.2" />
    <!-- -->
    
    <style>
    	.btn-book-now{
    	    color:white !important;
    	    background-color:#74164b;
    	    border:thin solid #74164b;
    	    padding:2px 9px;
    	    border-radius:50px;
    	    cursor:pointer;
            -webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
            -moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
            box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
            white-space:nowrap;
    	}
    	
    	/*
    	.navbar{
    	    padding:1rem 5% !important;
    	}*/
    	
    	.navbar-nav{
    	    display:none;
    	}
    	
    	#search-filtered a:hover{
    	    background-color:lightgray;
    	}
        #shopping-cart-button .quantity-bedge {
            left:1rem !important;
            top:-0.7rem !important;
        }
        
        @media (max-width: 768px) {
            .navbar .navbar-nav {
                display:block;
                padding:1rem 5% !important;
            }
        }
        
    </style>
    
    <!-- Meta Pixel Code -->
    <!-- tidak dipakai sementara
    <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');
        fbq('init', '751894080410022');
        fbq('track', 'PageView');
    </script>
    <noscript><img height="1" width="1" style="display:none"
    src="https://www.facebook.com/tr?id=751894080410022&ev=PageView&noscript=1"
    /></noscript>
    <!-- End Meta Pixel Code -->

    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-Q829820CCP"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'G-Q829820CCP');
    </script>
    <!-- End Google tag (gtag.js) -->
    
</head>

<body>

    <header>
        <nav class="navbar" x-data="">
            
            <a href="#" class="navbar-logo">
                <img src="polosh/img/ralm-logo.png" alt="Logo Ralm" height="50px"/>
            </a>
    
            <h1 style="color:white;font-weight:bold !important">Polosh</h1>
    
            <div class="navbar-nav">
                <a href="/">Home</a>
                <a href="#product">Products</a>
                <a href="#footer">Contact</a>
            </div>
            
            <div class="navbar-extra">
                <a id="shopping-cart-button" style="cursor:pointer">
                    <i data-feather="shopping-cart"></i>
                    <span class="quantity-bedge" x-show="$store.cart.quantity" x-text="$store.cart.quantity"></span>
                </a>
                <a href="#" id="hamburger-menu" aria-label="Show menu"><i data-feather="menu"></i></a>
                
            </div>
    
            <x-shopping_cart_v2/>
        </nav>
    </header>

    <main>
        <section id="home" class="hero">
            <div class="content" style="z-index:1">
                <h1 style="font-weight:bold">Kaos Polosh <span>Berkualitas</span></h1>
                <p>Kaos polos dengan berbagai macam warna serta bahan pilihan.</p>
                <br>
                <h1 style="color:lightgray;text-shadow: 1px 1px 3px rgba(1, 1, 3, 0.5)">Mulai dari:</h1>
                <h1 style="color:orange;text-shadow: 1px 1px 3px rgba(1, 1, 3, 0.5);font-weight:bold">50 ribu-an</h1>
                <a href="#product" class="cta" style="text-decoration:none">Lihat Produk &#8594;</a>
            </div>
    
        </section>
        <!-- Hero Section End -->

    <!-- Product Section Start -->
    <section id="product" class="product" x-data="products">
        <h2><span>Katalog</span> Produk Kami</h2>
        <p style="color:black">Berbagai macam warna untuk kaos polos lengan pendek.</p>
    
        <div class="row">
            <template x-for="(item, index) in items" :key="index">
                <div class="product-card">
                    <div class="product-image">
                        <img :src="`${item.img}`" :alt="item.name" />
                    </div>
                    <div class="product-content">
                        <div x-text="item.name" style="color:#74164b;font-size:15pt"> </div>
                        <div class="product-price" x-text="item.price ? rupiah(item.price) : 'Harga: Pilih ukuran' " style="margin-bottom:3px"></div>

                        <ul class="product-sizesx" style="list-style-type:none">
                            <li style="display:inline-block;margin:5px">Ukuran:</li>
                            <li style="display:inline-block;margin:5px">
                                <select :id="'item_' + item.id" x-model="item.price" 
                                    @change="if($el.selectedIndex == 0){
                                        item.size=null;
                                        item.price=null;
                                    }else{
                                        selectedSize=item.sizes[$el.selectedIndex - 1];
                                        item.size=selectedSize.name;
                                        item.sizeId=selectedSize.id;
                                        item.weight=selectedSize.weight;
                                    }"
                                >

                                <option selected>Pilih:</option>
                                <template x-for="size in item.sizes">
                                    <option :value="size.price" x-text="size.name" :id="size.id"></option>
                                </template>
                                </select>
                            </li>
                            <li class="btn-book-now" @click.prevent="$store.cart.add(item)" style="display:inline-block;margin:5px">Add to Cart &#8594;</li>
                        </div>


                    </div>
                </div>
            </template>
        </div>
        <div class="row">
            
        </div>
    </section>
    <!-- Product Section End -->
    
    </main>

    <footer id="kontak" style="text-align:left">
        <section class="has-bg-imgx py-0x" id="kontak" style="background-color:#74164B;color:#fff">
            <div class="container">
                <div class="row">
                    <div class="col-sm-3">
                        <span style="font-size:15pt">BASED</span>
                        <hr>
                        <p>Jalan TB Simatupang, Mujair Raya<br>
                            RT/RW 001/008. No. 21E.<br>
                            Jatipadang - Pasar Minggu<br>
                            Jakarta Selatan 12540<br>
                            T. +62 812-9199-6485<br>
                            I. +62 889-199-6485
                        </p>
                    </div>
                        
                    <div class="col-sm-3">
                        <span style="font-size:15pt">COMMODITY</span>
                        <hr>
                        <p>AR CARE<br>
                        Scenting / Diffuser System <br>
                        Aroma / Fragrance oil <br>
                        <br>
                        AR CLEAN<br>
                        Car Interior Detailing specialist<br>
                        Furniture Interior Detailing Specialist</p>
                    </div>
                    
                    <div class="col-sm-3">
                        <span style="font-size:15pt">INFORMATION</span>
                        <hr>
                        <p>Article AR CARE<br>
                        Article AR CLEAN<br>
                        Free Trial Scenting <br>
                        Free Consult Product & Service</p>
                    </div>
                    
                    <div class="col-sm-3">
                        <img src="assets/imgs/ar-care-footer-logo-1.png" alt="image" style="margin:0 10px">
                        <img src="assets/imgs/ar-care-footer-logo-2.png" alt="image" style="margin:0 10px">
                    </div>
                    <div class="col-sm-3">
                        <br>
                        <span style="font-size:15pt">LINKED US</span>
                        <hr>
                        <div>
                            <a style="color:white" href="https://www.instagram.com/by_arsolution?igsh=NTc4MTIwNjQ2YQ" aria-label="Instagram"><i data-feather="instagram"></i></a>
                            <a style="color:white" href="https://www.facebook.com/ByArsolution?mibextid=WC7FNe" aria-label="Facebook"><i data-feather="facebook"></i></a>
                            <a style="color:white" href="https://www.youtube.com/@By-Arsolution" aria-label="Youtube"><i data-feather="youtube"></i></a>
                            <a style="color:white" href="http://wa.me/6281291996485?text=Hallo!" aria-label="Whatsapp"><i data-feather="message-circle"></i></a>
                        </div>
        
                    </div>
                </div>
            </div>
        </section>
    </footer>

    <!-- Start of ChatBox -->
    <div id="chat-box" style="position:fixed; right:15px; z-index:9999; display:block;border:solid thin #9999;border-radius:6px;box-shadow:0 0 15px gray">
    	<div style="width:300px;background:orange;border-radius:6px 6px 0 0;padding:15px;color:#fff">
        	<div style="text-align: right">
                <a id="closeit" class="link" style="cursor:pointer;color:#000000"><i class="ti-close"></i></a>    		
        	</div>
    	    
    		<div style="font-size:2.5rem">Hallo!</div>
    		<div style="-webkit-font-smoothing: antialiased">Silahkan chat dengan marketing kami.</div>
    	</div>
    	
    	<div style="background:#fff;padding:15px 10px;height:200px">
    		<div class="qlwapp-account qlwapp-click" data-phone="6281291996485" data-name="Mr. Abdul Rahman"
    		  style="display:flex;padding:10px;text-decoration:none;cursor:pointer">
    			
    			<div class="qlwapp-avatar" style="width:36px;height:36px;display: flex">
    				<div class="qlwapp-avatar-container" style="width:36px;border-radius:50%">
    					<img alt="CS Avatar" src="assets/imgs/cs-avatar-men.png" style="width:100%;height:auto">
    				</div>
    			</div>
    			
    			<div class="qlwapp-info" style="margin-left:5px"> 
    			    <span style="display:flex;color:#999999" class="qlwapp-label">Marketing</span> 
    				<span style="display:flex" class="qlwapp-name">Mr. Abdul Rahman</span>
    			</div>

    			<div class="qlwapp-info" style="flex-grow: 1;text-align: right">
    				<i class="fa fa-whatsapp fa-small"></i>
    			</div>
    		</div>
    	</div>
    	
    	<div style="padding:10px 20px;background-color:lightgray;border-radius: 0 0 6px 6px;color:#666666;font-size:9pt;text-align:right;-webkit-font-smoothing:antialiased">
    		Copyright 2024
    	</div>
    	
    </div>
    <!-- End of ChatBox -->
    
    <!-- Chat Button -->
	<span id="chat-btn"  style="position:fixed;bottom:12px;right:20px;cursor:pointer;z-index:8888;background-color:#fff;color:#000000;border-radius:50px;padding:3px 5px 0 5px;border:solid 1.5px orange">
        <!--
	    <i class="fa fa-smile-o" style="vertical-align:middle;font-size:18pt"></i>
	    <span style="font-family:helvetica;font-size:13pt;font-style:italic;-webkit-font-smoothing:antialiased;text-decoration:none;vertical-align:middle"> Hallo! ada yang bisa di bantu? </span>
        -->
    	<div>
    		<div class="qlwapp-account" data-phone="6281291996485" data-name="Mr. Abdul Rahman"
    		  style="display:flex;text-decoration:none;cursor:pointer;line-height:1.3;-webkit-font-smoothing:antialiased">
    			
    			<div class="qlwapp-avatar" style="width:36px;height:36px;display: flex">
    				<div class="qlwapp-avatar-container" style="width:36px;border-radius:50%">
    					<img alt="CS Avatar" src="assets/imgs/cs-avatar-men.png" style="width:100%;height:auto;border-radius:50%">
    				</div>
    			</div>
    			
    			<div class="qlwapp-info" style="margin-left:5px"> 
    			    <span style="display:flex;color:#999999;font-size:0.9rem" class="qlwapp-label">Chat Marketing</span> 
    				<span style="display:flex" class="qlwapp-name">Mr. Abdul Rahman</span>
    			</div>

    			<div class="qlwapp-info" style="flex-grow: 1;text-align: right;font-size:1.8rem;margin-left:10px">
    				<i class="fa fa-whatsapp fa-small"></i>
    			</div>
    		</div>
    	</div>
	</span>
	<!-- End of Chat btn -->

    <!-- Feather icons-->
        <!--<script src="https://unpkg.com/feather-icons"></script>-->
        <script src="https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.29.2/feather.min.js"></script>
    <!-- Feather Icons -->
    <script>
        feather.replace();
    </script>

    <!-- Alpine JS -->
    <script src="https://cdn.jsdelivr.net/npm/@alpinejs/persist@3.x.x/dist/cdn.min.js"></script>
    <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>

    <!-- Midtrans -->
    <script type="text/javascript" src="https://app.midtrans.com/snap/snap.js" data-client-key="Mid-client-5MMOc21fQAac7v9b"></script>

    <!-- My Js -->
    <script src="care/assets/js/script.js?version=1.1"></script>
    <!-- App js -->
    <script src="care/assets/src/app.js?version=2.0"></script>
    
    <script src="care/assets/vendors/jquery/jquery-3.4.1.js"></script>
    <link rel="stylesheet" href="assets/vendors/themify-icons/css/themify-icons.css">
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
 
</body>
	<script type="text/javascript">
	    /*
        const urlParams = new URLSearchParams(window.location.search);
        const paramValue = urlParams.get('ref_id');
        
        if(paramValue !== null){
            document.getElementById("ref-id").innerHTML = paramValue;
        }*/
  
        $(document).ready(function(){
        	var $myPanel = $("#chat-box");
        	var $myPanelHeight = parseInt($myPanel.height());
        	$myPanel.css({"opacity":0,"bottom":"-" + $myPanelHeight + "px"});
    
        	$("#chat-btn").click(function(){
        		setTimeout(function(){
        			$myPanel.animate({
            			opacity: 1,
            			bottom: '60'
            			},500,function(){				 
            		});
            	},100);
        	});
        
        	$("#closeit").click(function(){
        		setTimeout(function(){
        			$myPanel.animate({
            			opacity: 0,
            			bottom: '-' + $myPanelHeight
            			},500,function(){				 
            		});
            	},100);
        	});
        });
    
        btn = document.querySelectorAll(".qlwapp-click");
        for(let i = 0; i < btn.length; i++){
            btn[i].addEventListener("click", async function (e) {
                e.preventDefault();
                
                let phone = btn[i].getAttribute('data-phone');
                let name = btn[i].getAttribute('data-name');
                let token = "{{ csrf_token() }}";

                try {
                    const response = await fetch("chat-log", {
                        method: "POST",
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        body:JSON.stringify({phone:phone,name:name,_token:token}),
                    });
                
                    //const result = await response.text();
                    //console.log(result);

                } catch (err) {
                    console.log(err.message);
                }
        
                window.open("https://api.whatsapp.com/send/?phone=" + phone + "&text=Halo AR.");
            });
        }

        function openProduct(evt, cityName, tabName) {
                
            // Declare all variables
            var i, tabcontent, tablinks;

            // Get all elements with class="tabcontent" and hide them
            tabcontent = document.getElementsByName(tabName);
            for (i = 0; i < tabcontent.length; i++) {
                tabcontent[i].style.display = "none";
            }

            // Get all elements with class="tablinks" and remove the class "active"
            tablinks = document.getElementsByClassName("tablinks");
            for (i = 0; i < tablinks.length; i++) {
                tablinks[i].className = tablinks[i].className.replace(" active", "");
            }

            // Show the current tab, and add an "active" class to the button that opened the tab
            document.getElementById(cityName).style.display = "block";
            evt.currentTarget.className += " active";

        }    
    </script>
</html>