<?php

if(isset($_POST['btnLogout']))
 {
	session_start();
	session_destroy();
} 


include('rights.php');
include('config.php');
include('includes/_admin_top.php');


?>

<div class="flex flex-col md:flex-row">
	<?php include('includes/_admin_menus.php') ?>

	<div class="main-content flex-1 bg-gray-100 md:mt-2 pb-24 md:pb-5">

            <div class="bg-blue-800 p-2 shadow text-xl text-white">
                <div class="d-table">
                	<div class="pull-left">
                	<h3 class="font-bold pl-2">Create New pack</h3>
                </div>
                <div class="pull-right">
                	<a href="stickerpack.php" style="float:right;" class="btn btn-success"><i class="fa fa-list" aria-hidden="true"></i> List</a>
                </div>
                </div>
            </div>

        <form id="newpackForm">
            <div class="flex flex-wrap" id="stickerpackstable">
            		<div class="w-full col-md-12 p-3">
            			<div class="card">
            				<div class="card-body">
	            				<div class="form-group">
								    <label for="exampleInputEmail1">Sticker Pack Name</label>
								    <input type="text" class="form-control" id="StickerPackName" name="StickerPackName" placeholder="Big Emoji">
							  	</div>
							  	<div class="form-group">
								    <label for="exampleInputEmail1">publisher</label>
								    <input type="text" class="form-control" id="publisher" value="<?php echo $__default_publisher?>" name="publisher" placeholder="StickerAdmin">
							  	</div>
							  	<div class="form-group" style="display:none">
								    <label for="exampleInputEmail1">Publisher Email</label>
								    <input type="Email" class="form-control" id="publisher_email"  value="<?php echo $__default_publisher_email ?>" name="publisher_email" placeholder="StickerAdmin@mail.com">
							  	</div>
							  	<div class="form-group" >
								    <label for="exampleInputEmail1">Signal Sticker Pack URL</label>
								    <input type="Website" class="form-control" id="publisher_website" value="" name="SignalStickerPackURL" placeholder="https://signal.art/addstickers/#pack_id=63b631e382fa310af6d279b51574d7bb&pack_key=cf299d497d45ece302dedf92b67a13dc61d7e77f356beaf9444d6801ce99f089">
							  	</div>
								
								<div class="form-group" >
								    <input type="checkbox" id="IsAnimated" value="value1" name="IsAnimated" > Is Animated
							  	</div>
            				</div>
            			</div>
            			<br>
            			<div class="card">
            				<div class="card-body">
	            				<div class="row"> 
	            					<div class="col-md-10">
	            						<div class="form-group">
										    <label for="exampleInputEmail1">Select Preview Sticker Images</label>
										    <input id='upload' name="upload[]" type="file" accept="image/png" multiple="multiple" />
									  	</div>
	            					</div>
	            					<div class="col-md-2">
	            						<button type="button" class="btn btn-secondary btn-sm" onclick="_clearStickers()"><i class="fa fa-times" aria-hidden="true"></i> Clear (<b><span id="stickerCount">0</span></b>) </button>
	            					</div>
	            				</div>
	            					
							  	<div id="imgArea"></div>
							  	<div id="hiddenArea"></div>
            				</div>
            			</div>
            			<br>
            			<div class="card">
            				<div class="card-body">
            					<div class="text-right">
            							<button type="button" onclick="_SaveData()" id="btnSave" class="btn btn-success"> Save </button>
            					</div>
            				</div>
            			</div>
	            			
            			
            		</div>
            </div>
        </form>

            
        </div>

</div>
<?php  include('includes/_admin_bottom.php')?>

<script type="text/javascript" src="scripts/newpack.js?v=1"></script>

