<?php

	//Appears only in admin section
  if(stripos($_SERVER['SCRIPT_NAME'],"/admin/")===false?false:true){
		
?>
	<script>
		$(document).ready(function(){
			$('#adminPickupsMenu ul').append($('<\li>').append($('<\a>').html("Receive").attr('href', 'mod.php?p=pickupreceiving&a=receive#')));
			$('#adminPickupsMenu ul').append($('<\li>').append($('<\a>').html("Verify").attr('href', '#').on('click', function(){
					$('#modalGoPickupID').unbind('click');
    			$('#modalGoPickupID').on('click', function() {
    				window.location ='mod.php?p=pickupreceiving&a=verify&pickup=' + $('#pickupID').val().split('-')[0];
    			});
    			$('#selectPickupID').modal('toggle');
					
				})));
			$('#adminPickupsMenu ul').append($('<\li>').append($('<\a>').html("Finalize").attr('href', '#').on('click', function(){
					$('#modalGoPickupID').unbind('click');
    			$('#modalGoPickupID').on('click', function() {
    				window.location ='mod.php?p=pickupreceiving&a=verify&pickup=' + $('#pickupID').val().split('-')[0] + '&finalize=true';
    			});
    			$('#selectPickupID').modal('toggle');
					
				})));
			$('#adminPickupsMenu ul').append($('<\li>').append($('<\a>').html("Pickups Waiting Approval Report").attr('href', 'mod.php?p=pickupreceiving&a=pickupsWaitingApproval')));
			$('#adminPickupsMenu ul').append($('<\li>').append($('<\a>').html("Waiting for Carrier Pickup Report").attr('href', 'mod.php?p=pickupreceiving&a=waitingPickups')));
		});
	</script>	
<?php

	//appears only in customer section both salesman and customer
  }else{
		
		
		
		
		
?>			
			
			
			
			
<?php			
		}
  

	
?>