Location: PHPKode > projects > eCanteen > ecanteen/top.php
<?
//Copyright David Byrne 2007

//This file is part of eCanteen.

//    eCanteen is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.

//    eCanteen is distributed in the hope that it will be useful
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.

//    You should have received a copy of the GNU General Public License
//    along with eCanteen.  If not, see <http://www.gnu.org/licenses/>.
?>
<html>
<head>
<?
session_start();
include("include/constants.php");?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <title>Online Canteen</title>
        
        <!-- Standard reset, fonts and grids -->

        <link rel="stylesheet" type="text/css" href="yuiutils/build/reset-fonts-grids/reset-fonts-grids.css" >
 

        <!-- CSS for Menu "yuiutils/build/reset-fonts-grids/reset-fonts-grids.css" -->

        <link rel="stylesheet" type="text/css" href="yuiutils/build/menu/assets/skins/sam/menu.css"> 
 

        <!-- Page-specific styles -->

        <style type="text/css">

            div.yui-b p {
            
                margin: 0 0 .5em 0;
                color: #999;
            
            }
            
            div.yui-b p strong {
            
                font-weight: bold;
                color: #000;
            
            }
            
            div.yui-b p em {

                color: #000;
            
            }            
            
            h1 {

                font-weight: bold;
                margin: 0 0 1em 0;
                padding: .25em .5em;
                background-color: #ccc;

            }

            #productsandservices {
            
                margin: 0 0 10px 0;
            
            }

        </style>


        <!-- Dependency source files -->

        <script type="text/javascript" src="yuiutils/build/yahoo-dom-event/yahoo-dom-event.js"></script>
        <script type="text/javascript" src="yuiutils/build/container/container_core.js"></script>


        <!-- Menu source file -->

        <script type="text/javascript" src="yuiutils/build/menu/menu.js"></script>


        <script type="text/javascript">

            // Initialize and render the menu bar when it is available in the DOM

            YAHOO.util.Event.onContentReady("productsandservices", function () {

                // Instantiate and render the menu bar

                var oMenuBar = new YAHOO.widget.MenuBar("productsandservices", { autosubmenudisplay: true, hidedelay: 750, lazyload: true });

                /*
                     Call the "render" method with no arguments since the markup for 
                     this menu already exists in the DOM.
                */

                oMenuBar.render();

            });
						
						YAHOO.util.Event.onContentReady("productsandservices2", function () {

                // Instantiate and render the menu bar

                var oMenuBar2 = new YAHOO.widget.MenuBar("productsandservices2", { autosubmenudisplay: true, hidedelay: 750, lazyload: true });

                /*
                     Call the "render" method with no arguments since the markup for 
                     this menu already exists in the DOM.
                */

                oMenuBar2.render();

            });

        </script>

    
</head>
<body class="yui-skin-sam" id="yahoo-com" align="left">
      <div id="doc" class="yui-t1" style="width:100%">
            <div id="hd">
                <!-- start: your content here -->
               <center><img src="backgrounds/goldmist.jpg" alt="food" width="800" height="150"/></center>
                    <!--<h1>Menu Bar</h1>-->
        
                <!-- end: your content here -->
            </div>
<? 


				if (!isset($_SESSION['CustomerID']))
{
?>

      <? }
  else
{?>
            <div id="bd" align="left">

                <!-- start: primary column from outer template -->
                <div id="yui-main" align="left">
                    <div class="yui-b" align="left">
                        <!-- start: stack grids here -->

                       <div id="productsandservices" class="yuimenubar yuimenubarnav" align="left" >
                            <div class="bd" style="width:100%">
                                <ul class="first-of-type" >

                                    <li class="yuimenubaritem"><a class="yuimenubaritemlabel">Minor Account Orders</a>
                
                                        <div id="Minor Accounts" class="yuimenu">
                                            <div class="bd">
                                                <ul>
																								<?
																								
																								mysql_connect(DB_SERVER,DB_USER,DB_PASS);
																								@mysql_select_db(DB_NAME) or die( "Unable to select database");
																							  $SQLStmnt="SELECT minorcustomer.`CustomerID`, minorcustomer.`MajorCustomerExtract$`, minorcustomer.`FirstName`, minorcustomer.`LastName`, class.`class`, minorcustomer.`Active_L2` FROM class INNER JOIN minorcustomer ON class.`classID` = minorcustomer.`class$` WHERE (((minorcustomer.`MajorCustomerExtract$`)=".$_SESSION['CustomerID'].") AND ((minorcustomer.`Active_L2`)=1)) ORDER BY class.`class`;";

																								$minorcustomers=mysql_query($SQLStmnt);

																								$minorcustomersnum=mysql_numrows($minorcustomers);
																								
																								
																								if (!($minorcustomersnum==0))
																								  {

    																								$datShortDate=date("Y-m-d");
																										$i=0;
    																								while($i < $minorcustomersnum)
    {
		$customerid=mysql_result($minorcustomers,$i,"customerid");
		$firstname=mysql_result($minorcustomers,$i,"firstname");
		$lastname=mysql_result($minorcustomers,$i,"lastname");
		$class=mysql_result($minorcustomers,$i,"class");
		 print "<li class=\"yuimenuitem\"><a class=\"yuimenuitemlabel\" href=\"user/usercalendar-sdates3.php?minor=".$customerid."&date=".$datShortDate."&minorname=".$firstname." ".$lastname."\" >".$firstname." ".$lastname."(".$class.")</a></li>";

    

		$i++;
    }

  } 
																								
																								?>
																						</ul>                    
                                            </div>
                                        </div>                                        
                                    
                                    </li>
                                    
                                    <li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="maintain/transactionssole.php">My Transactions</a>                
                                                                              
                                    
                                    </li>
																		
																		<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="useredit.php">My Password</a>
                
                                                                              
                                    
                                    </li>
																		
																		                                    </li>
																		
																		<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="maintain/minorcustomersole.php">Manage Minors</a></li>
																		
																		<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="maintain/majorone.php">My Details</a></li>
																		
																		<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="process.php">Logout</a></li>
                
																		<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="#">Credit=<?   echo "$".$_SESSION['credit'];?></a></li>


																		    



                                    </li>
																		
                                 </ul>           
                            </div>
                        </div>
												 </div>
                        </div>
												</div>


<?

if ($_SESSION['userlevel']>=3)
{


?>

<div id="bd">

                <!-- start: primary column from outer template -->
                <div id="yui-main">
                    <div class="yui-b">
                        <!-- start: stack grids here -->

                       <div id="productsandservices2" class="yuimenubar yuimenubarnav" >
                            <div class="bd" style="width:100%">
                                <ul class="first-of-type" >
<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="user/admincalendar-sdates5.php">Admin Calendar</a>
                                    </li>
																		
																		<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="#">Menu Admin</a>
																		<div id="information1" class="yuimenu">
                                            <div class="bd">                                        
                                                 <ul>
                                                    <li class="yuimenuitem"><a class="yuimenuitemlabel" href="maintain/itemtype.php">Menu Item Type</a></li>

                                                    <li class="yuimenuitem"><a class="yuimenuitemlabel" href="maintain/menuitem.php">Menu Items</a></li>
                                                   </ul> 
                                              
                                            </div>
                                        </div>        



                                    </li>
																		
																		<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="#">Customers</a>
																		<div id="information2" class="yuimenu">
                                            <div class="bd">                                        
                                                 <ul>
                                                    <li class="yuimenuitem"><a class="yuimenuitemlabel" href="maintain/majorcustomer.php">Major Customers</a></li>

                                                    <!---<li class="yuimenuitem"><a class="yuimenuitemlabel" href="admin/admin.php">Manage Major Users</a></li>--->

																										<li class="yuimenuitem"><a class="yuimenuitemlabel" href="maintain/minorcustomer.php">Minor Customers</a></li>
																										                                                
																									</ul>  
                                               
                                            </div>
                                        </div>        



                                    </li>
																		
																		<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="maintain/transactions.php">All Transactions</a>
                                    </li>
																		<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="user/payother.php">Make Manual Payment</a>
                                    </li>
																		
																		
																		<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="#">Site Admin</a>
																		<div id="information3" class="yuimenu">
                                            
                                            <div class="bd">
                                                <ul>                                        
                                                 
                                                    <li class="yuimenuitem"><a class="yuimenuitemlabel" href="maintain/siteone.php">Site Details</a> </li>

                                                    <li class="yuimenuitem"><a class="yuimenuitemlabel" href="maintain/break.php">Breaks</a></li>

																										<li class="yuimenuitem"><a class="yuimenuitemlabel" href="maintain/class.php">Classes</a></li>
																										<li class="yuimenuitem"><a class="yuimenuitemlabel" href="maintain/specialdate.php">Special Dates</a></li>
																								</ul>		                                                
																									  
                                                        
                            </div>
                        </div>
												</li>
												
												
												
												 </div>
                        </div>
												</div></div></div>



<?
}
}?>
<noscript>
This site requires JavaScript - please enable for this site.
</noscript>
</body>


</html>
Return current item: eCanteen