<commit_before>
<?php require_once 'config.inc.php'; ?>
<div class="header">

	<div class="imageleft">
    <img src="<?php echo SITE_BASE . "/images/dog_and_cat_green_bg.jpg"?>">
	</div>
	
	<div class="admin">
		<ul>
		<?php if(!isset($_SESSION['UserId'])) //checks out true if nobody is logged in
			{
			?>
				<!-- REGISTER link -->
				<li <?php if(basename($_SERVER['SCRIPT_NAME']) == 'register.php') { ?>class="current"<?php } ?>><a href="<?php echo SITE_BASE; ?>/register.php">Register</a></li>
				
				<!-- LOGIN link -->
				<li <?php if(basename($_SERVER['SCRIPT_NAME']) == 'login.php') { ?>class="current"<?php } ?>><a href="<?php echo SITE_BASE; ?>/login.php">Login</a></li>
				
				<?php
			}
			else	//else, a user must be logged in so we show them some different options
			{
				?>
				
				<!-- USER PROFILE link -->
				<li <?php if(basename($_SERVER['SCRIPT_NAME']) == 'profile.php') { ?>class="current"<?php } ?>><a href="<?php echo SITE_BASE; ?>/users/profile.php">Update My Information</a></li>
					
				<?php
				if(is_admin()) {
				?>
					<!-- MANAGE USERS link: only available to administrators -->
					<li <?php if(strpos($_SERVER['SCRIPT_NAME'], 'users/admin.php')) { ?>class="current"<?php } ?>><a href="<?php echo SITE_BASE; ?>/users/admin.php">Manage Users</a></li>
				<?php
				} 
				?>
					
				
				<!-- LOGOUT link -->
				<li><a href="<?php echo SITE_BASE; ?>/logout.php">Logout</a></li>
				<?php
			}
			?>
	
		</ul>
	</div>
			
</div>

<div class="nav">
		<ul>
			
			<!-- SITE HOME link -->
			<li
			<?php 
				//checks if the current page matches the string '/users/index.php'
				if(basename($_SERVER['SCRIPT_NAME']) == 'index.php') { echo "class=\"current\""; }
			?> >
			
			<a href="<?php echo SITE_BASE; ?>">Home</a>
			</li>
			
			
			
			<!-- ABOUT US link -->
			<li
			<?php 
			
				if(basename($_SERVER['SCRIPT_NAME']) == 'aboutus.php') { echo "class=\"current\""; }
			?> >
			
			<a href="<?php echo SITE_BASE; ?>/aboutus.php">About Us</a>
			</li>
			
		
			<!-- DONATE link -->
			<li
			<?php 
			
				if(basename($_SERVER['SCRIPT_NAME']) == 'donate.php') { echo "class=\"current\""; }
			?> >
			
			<a href="<?php echo SITE_BASE; ?>/donate.php">Donate</a>
			</li>
			
			
				<!-- CONTACT US link -->
			<li
			<?php 
				if(basename($_SERVER['SCRIPT_NAME']) == 'contactus.php') { echo "class=\"current\""; }
			?> >
			
			<a href="<?php echo SITE_BASE; ?>/contactus.php">Contact Us</a>
			</li>
			
            <?php
           //determine if the user is logged in so we can display conditional 
           //tabs 

            if(isset($_SESSION) && isset($_SESSION['UserId']))
            {
                $userId = $_SESSION['UserId'];
                $userRole = getUserRole($userId);
            }
            else
            {
                $userRole = array();
            }

            //VOLUNTEER link 
            if(in_array("Volunteer", $userRole) || empty($userRole))
            {
			    echo "<li ";
                if(basename($_SERVER['SCRIPT_NAME']) == 'volunteer.php') { echo "class=\"current\""; }
            
                echo" >";
             
                if(empty($userRole))
                {
                    echo "<a href='". SITE_BASE . "/volunteer.php'>Volunteer Your Services</a>";
                }
                else
                {
                    echo "<a href='". SITE_BASE . "/users/volunteer_form.php'>Volunteer Your Services</a>";
                }
                echo "</li>";
            }

			// REQUEST PET ASSISTANCE link
            if(in_array("Client", $userRole) || empty($userRole))
            {
                echo "<li ";
                
                    if(basename($_SERVER['SCRIPT_NAME']) == 'client.php') { echo "class=\"current\""; }
                echo " >";
                if(empty($userRole))
                {
                    echo "<a href='" . SITE_BASE . "/users/client_page.php'>Request Pet Assistance</a>";
                }
                else
                {
                    echo "<a href='" . SITE_BASE . "/users/client_page.php'>Request Pet Assistance</a>";
                }

                echo"</li>"; 
            }
            
            // My Info
            if(in_array("Client", $userRole) || empty($userRole))
            {
                echo "<li ";
                
                    if(basename($_SERVER['SCRIPT_NAME']) == 'client_page.php') { echo "class=\"current\""; }
                echo " >";
                if(empty($userRole))
                {
//                     echo "<a href='" . SITE_BASE . "/client_page.php'>Request Pet Assistance</a>";
                }
                else
                {
                    echo "<a href='" . SITE_BASE . "/users/client_page.php'>Request Pet Assistance</a>";
                }

                echo"</li>"; 
            }
?>
					


			
		</ul>
</div>

<commit_msg>revert back nav<commit_after>
<?php require_once 'config.inc.php'; ?>
<div class="header">

	<div class="imageleft">
    <img src="<?php echo SITE_BASE . "/images/dog_and_cat_green_bg.jpg"?>">
	</div>
	
	<div class="admin">
		<ul>
		<?php if(!isset($_SESSION['UserId'])) //checks out true if nobody is logged in
			{
			?>
				<!-- REGISTER link -->
				<li <?php if(basename($_SERVER['SCRIPT_NAME']) == 'register.php') { ?>class="current"<?php } ?>><a href="<?php echo SITE_BASE; ?>/register.php">Register</a></li>
				
				<!-- LOGIN link -->
				<li <?php if(basename($_SERVER['SCRIPT_NAME']) == 'login.php') { ?>class="current"<?php } ?>><a href="<?php echo SITE_BASE; ?>/login.php">Login</a></li>
				
				<?php
			}
			else	//else, a user must be logged in so we show them some different options
			{
				?>
				
				<!-- USER PROFILE link -->
				<li <?php if(basename($_SERVER['SCRIPT_NAME']) == 'profile.php') { ?>class="current"<?php } ?>><a href="<?php echo SITE_BASE; ?>/users/profile.php">Update My Information</a></li>
					
				<?php
				if(is_admin()) {
				?>
					<!-- MANAGE USERS link: only available to administrators -->
					<li <?php if(strpos($_SERVER['SCRIPT_NAME'], 'users/admin.php')) { ?>class="current"<?php } ?>><a href="<?php echo SITE_BASE; ?>/users/admin.php">Manage Users</a></li>
				<?php
				} 
				?>
					
				
				<!-- LOGOUT link -->
				<li><a href="<?php echo SITE_BASE; ?>/logout.php">Logout</a></li>
				<?php
			}
			?>
	
		</ul>
	</div>
			
</div>

<div class="nav">
		<ul>
			
			<!-- SITE HOME link -->
			<li
			<?php 
				//checks if the current page matches the string '/users/index.php'
				if(basename($_SERVER['SCRIPT_NAME']) == 'index.php') { echo "class=\"current\""; }
			?> >
			
			<a href="<?php echo SITE_BASE; ?>">Home</a>
			</li>
			
			
			
			<!-- ABOUT US link -->
			<li
			<?php 
			
				if(basename($_SERVER['SCRIPT_NAME']) == 'aboutus.php') { echo "class=\"current\""; }
			?> >
			
			<a href="<?php echo SITE_BASE; ?>/aboutus.php">About Us</a>
			</li>
			
		
			<!-- DONATE link -->
			<li
			<?php 
			
				if(basename($_SERVER['SCRIPT_NAME']) == 'donate.php') { echo "class=\"current\""; }
			?> >
			
			<a href="<?php echo SITE_BASE; ?>/donate.php">Donate</a>
			</li>
			
			
				<!-- CONTACT US link -->
			<li
			<?php 
				if(basename($_SERVER['SCRIPT_NAME']) == 'contactus.php') { echo "class=\"current\""; }
			?> >
			
			<a href="<?php echo SITE_BASE; ?>/contactus.php">Contact Us</a>
			</li>
			
            <?php
           //determine if the user is logged in so we can display conditional 
           //tabs 

            if(isset($_SESSION) && isset($_SESSION['UserId']))
            {
                $userId = $_SESSION['UserId'];
                $userRole = getUserRole($userId);
            }
            else
            {
                $userRole = array();
            }

            //VOLUNTEER link 
            if(in_array("Volunteer", $userRole) || empty($userRole))
            {
			    echo "<li ";
                if(basename($_SERVER['SCRIPT_NAME']) == 'volunteer.php') { echo "class=\"current\""; }
            
                echo" >";
             
                if(empty($userRole))
                {
                    echo "<a href='". SITE_BASE . "/volunteer.php'>Volunteer Your Services</a>";
                }
                else
                {
                    echo "<a href='". SITE_BASE . "/users/volunteer.php'>Volunteer Your Services</a>";
                }
                echo "</li>";
            }

			// REQUEST PET ASSISTANCE link
            if(in_array("Client", $userRole) || empty($userRole))
            {
                echo "<li ";
                
                    if(basename($_SERVER['SCRIPT_NAME']) == 'client.php') { echo "class=\"current\""; }
                echo " >";
                if(empty($userRole))
                {
                    echo "<a href='" . SITE_BASE . "/client.php'>Request Pet Assistance</a>";
                }
                else
                {
                    echo "<a href='" . SITE_BASE . "/users/client.php'>Request Pet Assistance</a>";
                }

                echo"</li>"; 
            }
?>
					


			
		</ul>
</div>


{'fraction_non_alphanumeric': 0.19198427432565252, 'fraction_numerical': 0.0, 'mean_word_length': 1.6645330229851614, 'pattern_counts': {'":': 0, '<': 207, '<?xml version=': 0, '>': 207, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '750115', 'n_tokens_mistral': 3395, 'n_tokens_neox': 2825, 'n_words': 577}