<?php

	include "library.php";

	$cxn = start_code( true );

    exit_if_search_bot();

    exit_if_session_expired( $cxn );



    $id = val( $_SESSION, "id" );

    $menu = val( $_GET, "menu" );


    if ($menu == "jobs")
    {
	    page_header( "Jobs", $cxn );
	    
        show_mobile_jobs_buttons();
    }
    else
    if ($menu == "jobseekers")    
    {
	    page_header( "Jobseekers", $cxn );
	
        show_mobile_jobseekers_buttons();
    }
    else
    if ($menu == "advertisers")    
    {
	    page_header( "Advertisers", $cxn );

        show_mobile_advertisers_buttons();
    }
    else
    if ($menu == "information")    
    {
	    page_header( "Information", $cxn );     

        show_mobile_information_buttons();
    }
    else
    if ($menu == "other")    
    {
	    page_header( "Other", $cxn );

        show_mobile_other_buttons( $id );
    }
    

    echo "<br><br><br><br><br>";


    echo "</body>";
	
    echo "</html>";



    function show_mobile_jobs_buttons()
    {
        echo "<br><br>";
    
        echo "<table width='100%' cellpadding='0' cellspacing='0' style='border-collapse: collapse'>";
    
        echo "<tr>";
    
    	echo "<td width='20%'></td><td width='60%' align='left'>";

    	show_green_button3( "&nbsp;&nbsp;Search Jobs", 170, "/search_jobs.php" );

    	echo "</td><td width='20%'></td></tr><tr><td width='20%'></td><td width='60%' align='left'>";

    	show_green_button3( "&nbsp;&nbsp;View a Jobs", 170, "/view_one_job.php" );

    	echo "</td><td width='20%'></td></tr><tr><td width='20%'></td><td width='60%' align='left'>";

    	show_green_button3( "&nbsp;&nbsp;Create Jobseeker Profile", 170, "/edit_jobseeker_profile.php", "newprofile", "true" );

    	echo "</td><td width='20%'></td></tr><tr><td width='20%'></td><td width='60%' align='left'>";

    	show_green_button3( "&nbsp;&nbsp;View My Jobseeker Profile", 170, "/display_jobseeker_profile.php", "showid", "-1", "returnpoint", "main" );

    	echo "</td><td width='20%'></td></tr><tr><td width='20%'></td><td width='60%' align='left'>";

    	show_green_button3_bottom( "&nbsp;&nbsp;Edit My Jobseeker Profile", 170, "/edit_jobseeker_profile.php", "newprofile", "false" );

    	echo "</td><td width='20%'></td></tr></table>";

    }



    function show_mobile_jobseekers_buttons()
    {
        echo "<br><br>";
    
        echo "<table width='100%' cellpadding='0' cellspacing='0' style='border-collapse: collapse'>";
    
        echo "<tr>";
    
    	echo "<td width='20%'></td><td width='60%' align='left'>";

    	show_green_button3( "&nbsp;&nbsp;Search Jobseekers", 160, "/search_jobseekers.php" );

    	echo "</td><td width='15%'></td></tr><tr><td width='15%'></td><td width='60%' align='left'>";

    	show_green_button3_bottom( "&nbsp;&nbsp;View a Jobseeker", 160, "/view_one_jobseeker.php" );

    	echo "</td><td width='20%'></td></tr></table>";
    }



    function show_mobile_advertisers_buttons()
    {
        echo "<br><br>";        
        
        echo "<table width='100%' cellpadding='0' cellspacing='0' style='border-collapse: collapse'>";
    
        echo "<tr>";
    
    	echo "<td width='20%'></td><td width='60%' align='left'>";
    	
    	show_green_button3( "&nbsp;&nbsp;Post a Job", 160, "/edit_job.php", "newjob", "true" );

    	echo "</td><td width='20%'></td></tr><tr><td width='20%'></td><td width='60%' align='left'>";

    	show_green_button3( "&nbsp;&nbsp;List Jobs", 160, "/list_jobs.php", "newjob", "true" );

    	echo "</td><td width='20%'></td></tr><tr><td width='20%'></td><td width='60%' align='left'>";

    	show_green_button3( "&nbsp;&nbsp;Create an Advertiser Profile", 160, "/edit_advertiser.php", "newadvertiserprofile", "true" );
    	
    	echo "</td><td width='20%'></td></tr><tr><td width='20%'></td><td width='60%' align='left'>";

    	show_green_button3( "&nbsp;&nbsp;Edit My Advertiser Profile", 160, "/edit_advertiser.php", "newadvertiserprofile", "false" );

    	echo "</td><td width='20%'></td></tr><tr><td width='20%'></td><td width='60%' align='left'>";
    	
    	show_green_button3_bottom( "&nbsp;&nbsp;View an Advertiser", 160, "/view_one_advertiser.php" );

    	echo "</td><td width='20%'></td></tr></table>";
    }



    function show_mobile_other_buttons( $id )
    {
        echo "<br><br>";
    
        echo "<table width='100%' cellpadding='0' cellspacing='0' style='border-collapse: collapse'>";
    
        echo "<tr>";


    	echo "</td><td width='15%'></td></tr><tr><td width='15%'></td><td width='60%' align='left'>";


    	show_green_button3( "&nbsp;&nbsp;Jobseeker Login", 200, "/jobseeker_main_menu_login.php" );

    	echo "</td><td width='15%'></td></tr><tr><td width='15%'></td><td width='60%' align='left'>";    


    	show_green_button3( "&nbsp;&nbsp;Advertiser Login", 200, "/advertiser_main_menu_login.php" );

    	echo "</td><td width='15%'></td></tr><tr><td width='15%'></td><td width='60%' align='left'>";    

    	show_green_button3_bottom( "&nbsp;&nbsp;Logout", 200, "/session_kill.php" );

    	echo "</td><td width='15%'></td></tr></table>";
    }


    function show_mobile_information_buttons()
    {
        echo "<br><br>";
    
        echo "<table width='100%' cellpadding='0' cellspacing='0' style='border-collapse: collapse'>";
    
        echo "<tr>";

    	echo "</td><td width='20%'></td></tr><tr><td width='15%'></td><td width='60%' align='left'>";

    	show_green_button3( "&nbsp;&nbsp;FAQ", 180, "faq.php" );


    	echo "</td><td width='20%'></td></tr><tr><td width='15%'></td><td width='60%' align='left'>";

    	show_green_button3( "&nbsp;&nbsp;Policies", 180, "/policies.php" );

    	echo "</td><td width='20%'></td></tr><tr><td width='15%'></td><td width='60%' align='left'>";


    	show_green_button3( "&nbsp;&nbsp;About Us", 180, "/about_us.php" );

    	echo "</td><td width='20%'></td></tr><tr><td width='20%'></td><td width='60%' align='left'>";
    
    	show_green_button3_bottom( "&nbsp;&nbsp;Contact Us", 180, "/contact_us.php" );

    	echo "</td><td width='20%'></td></tr></table>";
    }


        // tab style buttons for mobile screen buttons
        
    function show_green_button3( $text, $size, $page="", $param1="", $value1="", $param2="", $value2="", $param3="", $value3="", $param4="", $value4="", $param5="", $value5=""  )
	{
		$url = url_encode( $page, $param1, $value1, $param2, $value2, $param3, $value3, $param4, $value4, $param5, $value5 );

		echo "<div onclick=\"window.location.href='".$url."'\" class='greenbuttonmobile3' style='line-height: 50px; width:100%; align:left' >".$text."</div> ";
	}


        // different style to main menu tabs
        
    function show_green_button3_bottom( $text, $size, $page="", $param1="", $value1="", $param2="", $value2="", $param3="", $value3="", $param4="", $value4="", $param5="", $value5=""  )
	{
		$url = url_encode( $page, $param1, $value1, $param2, $value2, $param3, $value3, $param4, $value4, $param5, $value5 );

		echo "<div onclick=\"window.location.href='".$url."'\" class='greenbuttonmobile3_bottom' style='line-height: 50px; width:100%; align:left' >".$text."</div> ";			
	}

?>

