<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<title>AppICE | Admin Dashboard</title>
	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
	<meta content="" name="description">
	<meta content="" name="author">
	
	<!-- ================== BEGIN BASE CSS STYLE ================== -->
	<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet">
	<link href="/assets/plugins/jquery-ui/themes/base/minified/jquery-ui.min.css" rel="stylesheet">
	<link href="/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
	<link href="/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet">
	<link href="/assets/css/animate.min.css" rel="stylesheet">
	<link href="/assets/css/style.min.css" rel="stylesheet">
	<link href="/assets/css/style-responsive.min.css" rel="stylesheet">
	<link href="/assets/css/theme/default.css" rel="stylesheet" id="theme">
	<!-- ================== END BASE CSS STYLE ================== -->
	
	<!-- ================== BEGIN PAGE LEVEL STYLE ================== -->
	<link href="/assets/plugins/bootstrap-datepicker/css/datepicker.css" rel="stylesheet">
	<link href="/assets/plugins/bootstrap-datepicker/css/datepicker3.css" rel="stylesheet">
    <link href="/assets/plugins/gritter/css/jquery.gritter.css" rel="stylesheet">
	<!-- ================== END PAGE LEVEL STYLE ================== -->

	<!-- ================== BEGIN PAGE LEVEL STYLE ================== -->
	<!-- ================== END PAGE LEVEL STYLE ================== -->

	<!-- ================== BEGIN BASE JS ================== -->
	<script src="/assets/plugins/pace/pace.min.js"></script>
	<!-- ================== END BASE JS ================== -->

	<link href="/assets/plugins/DataTables/css/data-table.css" rel="stylesheet" />
	
	
</head>
<body class=" pace-done"><div class="pace  pace-inactive"><div class="pace-progress" data-progress-text="100%" data-progress="99" style="width: 100%;">
  <div class="pace-progress-inner"></div>
</div>
<div class="pace-activity"></div></div>

		<div class="alert alert-danger fade in m-b-15" style="position:relative;z-index:1021;display:none;" id="message">
								<strong id="messagebox"></strong>					
								<span class="close" onclick="closeMessage('message');">×</span>
							</div>

	<div class="alert alert-success fade in m-b-15" style="position:relative;z-index:1021;display:none;" id="messagesucess">
		<strong id="messageboxsucess"></strong>					
		<span class="close" onclick="closeMessage('messagesucess');">×</span>
	</div>
	<!-- begin #page-loader -->

	<div id="page-loader" class="fade in hide"><span class="spinner"></span></div>
	<!-- end #page-loader -->
	
	<!-- begin #page-container -->
	<div id="page-container" class="fade page-sidebar-fixed page-header-fixed in">
		<!-- begin #header -->
		<div id="header" class="header navbar navbar-default navbar-fixed-top">
			<!-- begin container-fluid -->
			<div class="container-fluid">
				<!-- begin mobile sidebar expand / collapse button -->
				<div class="navbar-header">
					<a href="" class="navbar-brand"><span class="navbar-logo"></span> AppICE Admin</a>
					<button type="button" class="navbar-toggle" data-click="sidebar-toggled">
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
				</div>
				<!-- end mobile sidebar expand / collapse button -->
				
				<!-- begin header navigation right -->
				<ul class="nav navbar-nav navbar-right">				
					<li class="dropdown">
						<a href="javascript:;" data-toggle="dropdown" class="dropdown-toggle f-s-14" style="display:none">
							<i class="fa fa-bell-o"></i>
							<span class="label">0</span>
						</a>					
					</li><li class="dropdown navbar-user">
						<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
							<img src="assets/img/user_icon.png" alt="" id="imgUserIcon"> 
							<span class="hidden-xs">
								
								
							</span> <b class="caret"></b>
						</a>
						<ul class="dropdown-menu animated fadeInLeft">
							<li class="arrow"></li>
							<li><a href="dashboard?action=profile">Edit Profile</a></li>
							<li style="display:none"><a href="javascript:;"><span class="badge badge-danger pull-right">2</span> Inbox</a></li>							
							<li><a href="javascript:;">Setting</a></li>
							<li class="divider"></li>
							<li><a href="logout">Log Out</a></li>
						</ul>
					</li>
				</ul>
				<!-- end header navigation right -->
			</div>
			<!-- end container-fluid -->
		</div>
		<!-- end #header -->
		
		<!-- begin #sidebar -->
		<div id="sidebar" class="sidebar">
			<!-- begin sidebar scrollbar -->
			<div data-scrollbar="true" data-height="100%">			
				<!-- begin sidebar nav -->
				<ul class="nav">					
					

					<li  name="menu-audiencesegment"><a href="#"><b class="caret pull-right"></b><i class="fa fa-users"></i> <span>Tracking System</span></a>
						<ul class="sub-menu" style="display:block">
							<li><a href="/admindashboard?action=promoters">Promoters</a></li>
							<li><a href="/admindashboard?action=pcampaigns">Promoter Campaigns</a></li>
							<li><a href="/admindashboard?action=clickreports">Click Reports</a></li>
						</ul>
					</li>

					<!--<li  name="menu-installs"><a href="#"><b class="caret pull-right"></b><i class="fa fa-child"></i> <span>How did we get them?</span></a>
						<ul class="sub-menu" style="display:block">
							<li><a href="dashboard?action=installs">App Installs</a></li>
							<li><a href="dashboard?action=uploads">Upload Past Data</a></li>
						</ul>
					</li>-->	


					
					<!-- begin sidebar minify button -->
					<li><a href="javascript:;" class="sidebar-minify-btn" data-click="sidebar-minify"><i class="fa fa-angle-double-left"></i></a>
					</li>
			        <!-- end sidebar minify button -->
					
	
			        
				</ul>
				<!-- end sidebar nav -->
			</div>
			<!-- end sidebar scrollbar -->
		</div>
		<div class="sidebar-bg"></div>
		<!-- end #sidebar -->
		
		
		<!-- begin #content -->
		<div id="content" class="content">	
			<div class="form-group" style="display:none">
                <label class="col-md-3 control-label">Member Id</label>
                <div class="col-md-6">
                    <input id="txtMemberId" type="text" class="form-control" placeholder="member id" value="<%=memberId%>"  >
                </div>
            </div>    	
	                        
			<%if (action=="promoters"){%>
				<div class="row"> 
					<div class="panel panel-info" id="divPromoters">
						<div class="panel-heading">
					      
					        <h4 class="panel-title">Promoters</h4>
					    </div>
					    <div class="panel-body">
					    	<button id="btnAddPromoter" type="button" class="btn btn-info m-r-5 m-b-5">Add New</button>
					    	<table id="tblPromoters" class="table table-striped table-bordered">
		                    		<thead style="font-size:12px">
		                    			<th>Name</th>
		                    			<th>Company</th>
		                    			<th>Adrdess</th>
		                    			<th>Email</th>
		                    			<th>Phone</th>
		                    			<th>Contact Person</th>
		                    			<th></th>
		                    		</thead>
		                    		<tbody style="font-size:12px"></tbody>
	                    	</table>
	                
				    	</div>
					</div>
					<!-- Start Promoter Section -->
					<div class="panel panel-info" id="divAddEditPromoters" style="display:none">
					    <div class="panel-heading">
					      
					        <h4 class="panel-title">Add Promoters </h4>
					    </div>
					    <div class="panel-body">
		        			<form class="form-horizontal">
		                        <div class="form-group">
		                            <label class="col-md-3 control-label">Promoter Name</label>
		                            <div class="col-md-6">
		                                <input  type="text" class="form-control" placeholder="Promoter name will be trated as source in tracking." data-bind="value:promoterName">
		                            </div>
		                        </div>
		                        <div class="form-group">
		                            <label class="col-md-3 control-label">Company</label>
		                            <div class="col-md-6">
		                                <input  type="text" class="form-control" placeholder="Company" data-bind="value:promoterCompany">
		                            </div>
		                        </div>
		                        <div class="form-group">
		                            <label class="col-md-3 control-label">Address</label>
		                            <div class="col-md-6">
		                                <textarea class="form-control" placeholder="Address" rows="5" data-bind="value:promoterAddress"></textarea>
		                            </div>
		                        </div>
		                        <div class="form-group">
		                            <label class="col-md-3 control-label">Email</label>
		                            <div class="col-md-6">
		                                <input type="email" class="form-control"  placeholder="Email" data-bind="value:promoterEmail" >
		                            </div>
		                        </div>
		                        <div class="form-group">
		                            <label class="col-md-3 control-label">Phone</label>
		                            <div class="col-md-6">
		                                <input type="text" class="form-control" placeholder="Phone" data-bind="value:promoterPhone">
		                            </div>
		                        </div>
		                        <div class="form-group">
		                            <label class="col-md-3 control-label">Contact Person</label>
		                            <div class="col-md-6">
		                                <input type="text" class="form-control" placeholder="Contact Person" data-bind="value:promoterContactPerson">
		                            </div>
		                        </div>
		                        <div class="form-group">
		                            <label class="col-md-3 control-label"></label>
		                            <div class="col-md-6">
		                                <button type="button" id="btnSavePromoter" class="btn btn-sm btn-success">Save Promoter</button>
		                                <button type="button" class="btn btn-sm btn-success" onClick="semusiAdminTrack.clearViewModel();semusiAdminTrack.cancelPromoter();">Cancel</button>
		                                <label style="color: red; width: 300px; display: none;" data-bind="visible:validate,text:validationMessage"></label>
		                            </div>
		                        </div>
		                        
		                    </form>
		                    
					    </div>
					</div>
					<!-- End Promoter Section -->
					
				</div>

			<%}%>
			
			<%if (action=="pcampaigns"){%>
				<div class="row">
					<div class="panel panel-info" id="divPCampaigns">
						<div class="panel-heading" >
					      
					        <h4 class="panel-title">Add Promoter Campaigns</h4>
					    </div>
					    <div class="panel-body">
					    	<button id="btnAddPromoterCampaign" type="button" class="btn btn-info m-r-5 m-b-5">Add New</button>
					    	<table id="tblCampaigns" class="table table-striped table-bordered">
		                		<thead style="font-size:12px">
		                			<th>Name</th>
		                			<th>Type</th>
		                			<th>Callback Url</th>
		                			<th>Callback Param</th>
		                			<th>Cost Per Install</th>
		                			<th>Store Url</th>
		                			<th></th>
		                		</thead>
		                		<tbody style="font-size:12px"></tbody>
	                		</table>
	                
				    	</div>
					</div>
	                	
					<div class="panel panel-info" id="divAddEditPCampaigns" style="display:none">
						    <div class="panel-heading">
						      
						        <h4 class="panel-title">Add Promoter Campaigns</h4>
						    </div>
						    <div class="panel-body">
			        			<form class="form-horizontal">
			        				<div class="form-group">
			                            <label class="col-md-3 control-label">Promoter</label>
			                            <div class="col-md-6">
			                                <select data-bind="value:campaignPromoterId" class="form-control" id="ddlPromoters">
			                                    
			                                    
			                                </select>
			                            </div>
			                        </div>
			                            	
			                        
			                        <div class="form-group">
			                            <label class="col-md-3 control-label">Campaign Name</label>
			                            <div class="col-md-6">
			                                <input  type="text" class="form-control" placeholder="Campaign Name" data-bind="value:campaignName">
			                            </div>
			                        </div>
			                        <div class="form-group">
			                            <label class="col-md-3 control-label">Campaign Type</label>
			                            <div class="col-md-6">
			                                <select class="form-control" data-bind="value:type">
			                                    <option>CPI</option>
			                                    
			                                </select>
			                            </div>
			                        </div>
			                        <div class="form-group">
			                            <label class="col-md-3 control-label">Select App</label>
			                            <div class="col-md-6">
			                                <select id="ddlApps" class="form-control" data-bind="value:appid">
			                                    
			                                </select>
			                            </div>
			                        </div>
			                        <div class="form-group">
			                            <label class="col-md-3 control-label">Callback URL</label>
			                            <div class="col-md-6">
			                                <input type="text" class="form-control"  placeholder="Callback Url" data-bind="value:callbackUrl" >
			                            </div>
			                        </div>
			                        <div class="form-group">
			                            <label class="col-md-3 control-label">Callback Parm Name</label>
			                            <div class="col-md-6">
			                                <input type="text" class="form-control" placeholder="Name of the parameter that will appeneded to callback url" data-bind="value:param">
			                            </div>
			                        </div>
			                        <div class="form-group">
			                            <label class="col-md-3 control-label">Cost Per Install</label>
			                            <div class="col-md-6">
			                                <input type="text" class="form-control" placeholder="Cost per install" data-bind="value:costPerInstall">
			                            </div>
			                        </div>
			                        <div class="form-group">
			                            <label class="col-md-3 control-label">App store URL</label>
			                            <div class="col-md-6">
			                                <input type="text" class="form-control" placeholder="App store url" data-bind="value:trackingUrl">
			                            </div>
			                        </div>
			                         <div class="form-group" id="divAppIceUrl" style="display:none">
			                            <label class="col-md-3 control-label">AppICE URL</label>
			                            <div class="col-md-6">
			                                <input type="text" class="form-control" id="txtappiceurl" data-bind="value:appIceUrl">
			                            </div>
			                        </div>
			                        <div class="form-group" style="display:none">
			                            <label class="col-md-3 control-label">Active</label>
			                            <div class="col-md-6">
			                                <select class="form-control" data-bind="value:isActive">
			                                    <option value="true">TRUE</option>
			                                    <option value="false">FALSE</option>
			                                </select>
			                            </div>
			                        </div>
			                        <div class="form-group">
			                            <label class="col-md-3 control-label"></label>
			                            <div class="col-md-6">
			                                <button type="button" id="btnSaveCampaign" class="btn btn-sm btn-success">Save Campaign</button>
			                                <button type="button" class="btn btn-sm btn-success" onClick="semusiAdminTrack.clearViewModel();semusiAdminTrack.cancelPromoterCampaign();">Cancel</button>
			                                <label style="color: red; width: 300px; display: none;" data-bind="visible:validate,text:validationMessage"></label>
			                            </div>
			                        </div>
			                	
			                        
			                    </form>
			                    
						    </div>
						</div>
		    	</div>
			<%}%>	
			<%if (action=="clickreports"){%>
				<div class="panel panel-info">
					<div class="panel-heading">
				        <h4 class="panel-title">Click Reports</h4>
				    </div>
				    <div class="panel-body">
				    	<form class="form-inline">
				    		
	                        <div class="form-group m-r-10">
								<label style="padding-right:16px;">Select App</label>
								<select id="ddlApps" class="form-control" ></select>
							</div>
							<div class="form-group m-r-10">
								<label style="padding-right:22px;">Promoter</label>
								<select id="ddlPromoters" class="form-control">
                                </select>
							</div>
							<div class="form-group m-r-10">
								<label >Campaign</label>
								<select id="ddlCampaigns" class="form-control">
                                </select>
							</div>
							
							
						</form>
						<form class="form-inline">
							<div class="form-group m-r-10">
								<label style="padding-right:15px;">Confirmed</label>
								<select id="ddlConfirmation" class="form-control">
									<option value="zzz">Both</option>
									<option value="true">True</option>
									<option value="false">False</option>
                                </select>
							</div>
							<div class="form-group m-r-10">
								<label style="padding-left:50px;">Status Code </label>
								<input type="text" class="form-control" id="txtStatusCode" placeholder="Status Code">
							</div>
						</form>
						<form class="form-inline">
							<div class="form-group m-r-10">
								<label style="padding-right:20px;">Click Date </label>
								<input type="text" class="form-control" id="txtClickFromDate" placeholder="From Date">
							</div>
							<div class="form-group m-r-10">
								<label>To</label>
								<input type="text" class="form-control" id="txtClickToDate" placeholder="To Date">
							</div>
						</form>
						<form class="form-inline">
							<div class="form-group m-r-10">
								<label>Confirm Date </label>
								<input type="text" class="form-control" id="txtConfirmFromDate" placeholder="From Date">
							</div>
							<div class="form-group m-r-10">
								<label>To</label>
								<input type="text" class="form-control" id="txtConfirmToDate" placeholder="To Date">
							</div>
							<button type="button" id="btnFilter" class="btn btn-sm btn-primary m-r-5">View</button>
							<label style="font-weight:bold" id="lblTotal"></label>
						</form>
				    	<table id="tblClickReport" class="table table-striped table-bordered">
	                    		<thead style="font-size:12px">
	                    			<th>ClickId</th>
	                    			<th>CreatedOn</th>
	                    			<th>ConfirmedOn</th>
	                    			<th>DID</th>
	                    			<th>StatusCode</th>
	                    		</thead>
	                    		<tbody style="font-size:12px"></tbody>
                    	</table>
                
			    	</div>
				</div>
			<%}%>	
		</div>	
		<!-- end #content -->	

	</div>
	<!-- end page container -->
	
	<!-- ================== BEGIN BASE JS ================== -->
	<script src="assets/plugins/jquery/jquery-3.6.0.min.js"></script>
	<script src="assets/plugins/jquery/jquery-migrate-1.1.0.min.js"></script>
	<script src="assets/plugins/jquery-ui/ui/minified/jquery-ui.min.js"></script>
	<script src="assets/plugins/bootstrap/js/bootstrap.min.js"></script>
	<!--[if lt IE 9]>
		<script src="assets/crossbrowserjs/html5shiv.js"></script>
		<script src="assets/crossbrowserjs/respond.min.js"></script>
		<script src="assets/crossbrowserjs/excanvas.min.js"></script>
	<![endif]-->
	<script src="assets/plugins/slimscroll/jquery.slimscroll.min.js"></script>
	<script src="assets/plugins/jquery-cookie/jquery.cookie.js"></script>
	<!-- ================== END BASE JS ================== -->
	
	<!-- ================== BEGIN PAGE LEVEL JS ================== -->
	<!--<script src="assets/plugins/gritter/js/jquery.gritter.js"></script>-->
	<script src="assets/plugins/flot/jquery.flot.min.js"></script>
	<script src="assets/plugins/flot/jquery.flot.time.min.js"></script>
	<script src="assets/plugins/flot/jquery.flot.resize.min.js"></script>
	<script src="assets/plugins/flot/jquery.flot.pie.min.js"></script>
	<script src="assets/plugins/sparkline/jquery.sparkline.js"></script>
	
	<script src="assets/js/dashboard.min.js"></script>	
	
	<script language="javascript" type="text/javascript" src="/javascripts/utils/store+json2.min.js"></script>
	<script language="javascript" type="text/javascript" src="/javascripts/utils/jquery.i18n.properties-min-1.0.9.js"></script>
	<script language="javascript" type="text/javascript" src="/javascripts/utils/moment/moment.min.js"></script>
    <script language="javascript" type="text/javascript" src="/javascripts/utils/moment/moment.isocalendar.min.js"></script>
    <script language="javascript" type="text/javascript" src="/javascripts/utils/moment/lang-all.min.js"></script>
    <script src="assets/js/apps.js"></script>

	<script src="/assets/plugins/DataTables/js/jquery.dataTables.js"></script>
	<script src="assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
	
	<script language="javascript" type="text/javascript" src="/javascripts/semusi/semusi.admin.track.js"></script>
	<!-- ================== END PAGE LEVEL JS ================== -->
	
	<script>
		$(document).ready(function() {
			semusiAdminTrack.Init();
		});

		function showMessage(key) {		
			$('#message').show();					
			$('#messagebox').text(key);
		}

		function showMessagesucess(key) {		
			$('#messagesucess').show();					
			$('#messageboxsucess').text(key);
		}

		function getParameterByName(name) {
		    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
		    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
		        results = regex.exec(location.search);
		    return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
		}

		closeMessage = function(id){
			$("#"+id).hide();
		}
		function setActiveMenu(){

			$("li[name='menu-dashboard']").removeClass('active');
			$("li[name='menu-myapps']").removeClass('active');
			$("li[name='menu-audiencesegment']").removeClass('active');
			$("li[name='menu-installs']").removeClass('active');
			$("li[name='menu-customevents']").removeClass('active');
			$("li[name='menu-engagementtools']").removeClass('active');
			$("li[name='menu-churn']").removeClass('active');
			$("li[name='menu-analytics']").removeClass('active');
			$("li[name='menu-settings']").removeClass('active');			

		}
		
		 		
		
	</script>


</div></body>