<?php session_start();
//  Developed by Roshan Bhattarai
//  Visit http://roshanbh.com.np for this script and more.
//  This notice MUST stay intact for legal use

// if session is not set redirect the user
if(empty($_SESSION['u_name']))
	header("Location:index.php");

//if logout then destroy the session and redirect the user
if(isset($_GET['logout']))
{
	session_destroy();
	header("Location:index.php");
}

include ("config.php");
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">



	<script type="text/javascript" src="js/ajax.js"></script>
	<script type="text/javascript" src="js/ajax-dynamic-list.js"></script>
	<style type="text/css">
<!--
.style4 {color: #FFFFFF}
-->
    </style>
	<br />

<SCRIPT language="javascript">
	function validateForm()
  {
    var	form=document.submitform;
	var a=document.submitform.TelephoneNo.value;
   // var gen=document.submitform.Gender.value;
    //var dep=document.submitform.Department.value;
	
    if(form.BusNo.value=="")
	{
		alert("Please Enter BusNo Number");
		form.BusNo.focus();
		return false;
	}
	if(form.BusNo.value.charAt(0)==" ")
	{
		  alert("Please Provide Valid Bus Number");
          form.BusNo.value="";
		  form.BusNo.focus();
		     return false;
    }
	
	 if(!IsNumeric(form.BusNo.value))
              {
                  alert("Please Provide Valid BusNo Number! BusNo Number Must be Numeric");
                 form.BusNo.value="";
                  form.BusNo.focus();
                  return false;
              }
              if(isAlphaspace(form.BusNo.value))
                  {
                     alert("Please Provide Valid BusNo Number! BusNo Number Must be Numeric");
                    form.BusNo.value="";
                    form.BusNo.focus();
                    return false;

                  }
	
	

if(form.RouteNo.value=="")
	{
		alert("Please Enter Route Number");
		form.RouteNo.focus();
		return false;
	}
	if(form.RouteNo.value.charAt(0)==" ")
	{
		  alert("Please Provide Valid Route Number");
          form.RouteNo.value="";
		  form.RouteNo.focus();
		     return false;
    }
	
	
	 if(!IsNumeric(form.RouteNo.value))
              {
                  alert("Please Provide Valid RouteNo Number! RouteNo Number Must be Numeric");
                 form.RouteNo.value="";
                  form.RouteNo.focus();
                  return false;
              }
              if(isAlphaspace(form.RouteNo.value))
                  {
                     alert("Please Provide Valid RouteNo Number! RouteNo Number Must be Numeric");
                    form.RouteNo.value="";
                    form.RouteNo.focus();
                    return false;

                  }
	
	
	
	if(form.RouteName.value=="")
	{
		alert("Please Enter Route Number");
		form.RouteName.focus();
		return false;
	}
	if(form.RouteName.value.charAt(0)==" ")
	{
		  alert("Please Provide Valid Route Number");
          form.RouteName.value="";
		  form.RouteName.focus();
		     return false;
    }


      

	if(form.TelephoneNo.value!=''){
	
	 if(form.TelephoneNo.value.charAt(0)!=9)
              {
                  alert("Please Provide Valid Mobile No! Phone number must be 10 digits");
                  form.TelephoneNo.value="";
                 form.TelephoneNo.focus();
                 return false;
              }
	
            if(!IsNumeric(form.TelephoneNo.value))
              {
                  alert("Please Provide Valid MobileNo");
                 form.TelephoneNo.value="";
                  form.TelephoneNo.focus();
                  return false;
              }
              if(isAlphaspace(form.TelephoneNo.value))
                  {
                    alert("Please Provide Valid MobileNo");
                    form.TelephoneNo.value="";
                    form.TelephoneNo.focus();
                    return false;

                  }
               if(a.length!=10)
                  {
                  alert("Please Provide Valid Mobile No! Phone number must be 10 digits");
                  form.TelephoneNo.focus();
                  return false;
                  }
                 
		}
}	
        function IsNumeric(sText)
                 {
                       var ValidChars = "0123456789";
                      var IsNumber=true;
                       var Char;
                       for (i = 0; i < sText.length && IsNumber == true; i++)
                       {
                         Char = sText.charAt(i);
                         if (ValidChars.indexOf(Char) == -1)
                         {
                            IsNumber = false;
                         }
                       }
                       return IsNumber;
                  }
          function isAlphaspace(sText)
                 {
                       var ValidChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
                      var IsChars=true;
                       var Char;
                       for (i = 0; i < sText.length && IsChars == true; i++)
                       {
                         Char = sText.charAt(i);
                         if (ValidChars.indexOf(Char) == -1)
                         {
                            IsChars = false;
                         }
                       }
                       return IsChars;
                  }

 </SCRIPT>


<style type="text/css">
<!--
#Layer3 {
	position:absolute;
	width:738px;
	height:115px;
	z-index:1;
	top: 186px;
}
-->
</style>

<style type="text/css">

	/* START CSS NEEDED ONLY IN DEMO */
	/*html{
		height:100%;
	}
	body{
		font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
		width:100%;
		height:100%;
		margin:0px;
		text-align:left;
	}

	#mainContainer{
		width:660px;
		margin:0 auto;
		text-align:left;
		height:100%;
		background-color:#FFF;
		border-left:3px double #000;
		border-right:3px double #000;
	}
	#formContent{
		padding:5px;
	}*/
	/* END CSS ONLY NEEDED IN DEMO */


	/* Big box with list of options */
	#ajax_listOfOptions{
		position:absolute;	/* Never change this one */
		width:175px;	/* Width of box */
		height:250px;	/* Height of box */
		overflow:auto;	/* Scrolling features */
		border:1px solid #317082;	/* Dark green border */
		background-color:#FFF;	/* White background color */
		text-align:left;
		font-size:0.9em;
		z-index:100;
	}
	#ajax_listOfOptions div{	/* General rule for both .optionDiv and .optionDivSelected */
		margin:1px;
		padding:1px;
		cursor:pointer;
		font-size:0.9em;
	}
	#ajax_listOfOptions .optionDiv{	/* Div for each item in list */

	}
	#ajax_listOfOptions .optionDivSelected{ /* Selected item in the list */
		background-color:#317082;
		color:#FFF;
	}
	#ajax_listOfOptions_iframe{
		background-color:#F00;
		position:absolute;
		z-index:5;
	}

	form{
		display:inline;
	}

	</style>


<head>

	<style type="text/css">


	.multipleSelectBoxControl span{	/* Labels above select boxes*/
		font-family:arial;
		font-size:11px;
		font-weight:bold;
	}
	.multipleSelectBoxControl div select{	/* Select box layout */
		font-family:arial;
		height:100%;
	}
	.multipleSelectBoxControl input{	/* Small butons */
		width:25px;	
	}
	
	.multipleSelectBoxControl div{
		float:left;
	}
		
	.multipleSelectBoxDiv
	
	
	
	
	/* change these styles if you like */
table.drasticgrid {font: 12px arial; table-layout: fixed; border-spacing: 2px;}
table.drasticgrid th, td, tr {padding:0; margin:0;}
th.th			{background-image: url(images/back_header.jpg); cursor: pointer;} 
th.thmouseover	{background-image: url(images/back_header_mo.jpg); color: black;}
/* If you want to use different backgrounds for readonly / editable use this:
th.thmouseover.readonly	{background-image: url(../img/back_header_mo.jpg);}
th.thmouseover.editable	{background-image: url(../img/back_header_mo_editable.jpg);}
*/
tr				{color: #505050; cursor: default;}
tr.rowmouseover	td.tdeven, tr.rowmouseover td.tdodd  {background: #E5EAFF; color: black;}
tr.rowselected	td.tdeven, tr.rowselected td.tdodd {background: #CCD5FF; color: black; font-weight: bolder;}
td.tdeven		{background: #ffffff;}
td.tdodd		{background: #F9F9F9;}
td.divdel		{background: none;}

img.imgdel		{background: none;}
img.imgadd		{cursor: pointer;}
textarea.ddtypetext {background: transparent; color: #505050; font: 12px arial; border-style: none;}
textarea.ddtypetextedit {background: white; color: #505050; font: 12px arial; border-style: solid; border-width: 1px; border-color: #D3D3D3;}
input {margin: 0; padding: 0; background: white; color: #505050; font: 12px arial;}
input.inset {margin: 0; padding: 0;border-style: solid; border-width: 1px; border-color: #D3D3D3;}
select {background: white; color: #505050; font: 12px arial; border-style: solid; border-width: 1px; border-color: #D3D3D3;}

div.tddiv {position: relative;}
div.divth {position: relative;}
img.imgedit {position: absolute; right:0px; top:0px; z-index:1; cursor: pointer;}

.divth {overflow: hidden; white-space: nowrap; text-align: left;}
.divtd {overflow: hidden; white-space: nowrap; margin: 0pt; padding: 0pt;}

/* For slider */
td#colslider.visible {padding:0; margin:0; border: #A8C1DA solid 1px;}
div.slider  {width: 16px; background: #eee;}
div.knob, div.up, div.down {width: 12px; background: lightgrey; border: #A8C1DA solid 1px;}
div.knobmouseover, div.upmouseover, div.downmouseover {background: #B5B5B5; border: #6C7B89 solid 1px;}
div.up {margin: 0 0 1px 0}
div.down {margin: 1px 0 0 0}
div#tick {font-weight:bold; position: absolute; cursor: default;}
	</style>
	<script type="text/javascript">
	
	/************************************************************************************************************
	(C) www.dhtmlgoodies.com, October 2005
	
	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	
	
	Terms of use:
	You are free to use this script as long as the copyright message is kept intact. However, you may not
	redistribute, sell or repost it without our permission.
	
	Thank you!
	
	www.dhtmlgoodies.com
	Alf Magne Kalleland
	
	************************************************************************************************************/
	
		
	var fromBoxArray = new Array();
	var toBoxArray = new Array();
	var selectBoxIndex = 0;
	var arrayOfItemsToSelect = new Array();
	
	
	function moveSingleElement()
	{
	 
		var selectBoxIndex = this.parentNode.parentNode.id.replace(/[^\d]/g,'');
		var tmpFromBox;
		var tmpToBox;
		//===============================Call ajax to update DB starts======================================================================================
		
		var index=document.editbus.fromBox.selectedIndex;//For debugging
		//alert(document.editbus.fromBox.options[index].value);//For debugging	
		
		
		//===============================Call ajax to update DB starts======================================================================================
		
		
		if(this.tagName.toLowerCase()=='select'){			
			tmpFromBox = this;
					if(tmpFromBox==fromBoxArray[selectBoxIndex])
					{
					   tmpToBox = toBoxArray[selectBoxIndex];//To right double click
					   
					   
					}
			        else
					{ 
					  tmpToBox = fromBoxArray[selectBoxIndex];//To left double click
					 
					}
		}else{
		
			if(this.value.indexOf('>')>=0)
			{			 
		     	tmpFromBox = fromBoxArray[selectBoxIndex];//To right button				
				tmpToBox = toBoxArray[selectBoxIndex];	
			}
			else
			{
				tmpFromBox = toBoxArray[selectBoxIndex];//To left button
				tmpToBox = fromBoxArray[selectBoxIndex];	
			}
		}
		
		for(var no=0;no<tmpFromBox.options.length;no++)
		{
			if(tmpFromBox.options[no].selected)
			{
				tmpFromBox.options[no].selected = false;
				tmpToBox.options[tmpToBox.options.length] = new Option(tmpFromBox.options[no].text,tmpFromBox.options[no].value);
				
				for(var no2=no;no2<(tmpFromBox.options.length-1);no2++)
				{
					tmpFromBox.options[no2].value = tmpFromBox.options[no2+1].value;
					tmpFromBox.options[no2].text = tmpFromBox.options[no2+1].text;
					tmpFromBox.options[no2].selected = tmpFromBox.options[no2+1].selected;
				}
				no = no -1;
				tmpFromBox.options.length = tmpFromBox.options.length-1;
											
			}			
		}
		
		
		var tmpTextArray = new Array();
		for(var no=0;no<tmpFromBox.options.length;no++){
			tmpTextArray.push(tmpFromBox.options[no].text + '___' + tmpFromBox.options[no].value);			
		}
		tmpTextArray.sort();
		var tmpTextArray2 = new Array();
		for(var no=0;no<tmpToBox.options.length;no++){
			tmpTextArray2.push(tmpToBox.options[no].text + '___' + tmpToBox.options[no].value);			
		}		
		tmpTextArray2.sort();
		
		for(var no=0;no<tmpTextArray.length;no++){
			var items = tmpTextArray[no].split('___');
			tmpFromBox.options[no] = new Option(items[0],items[1]);
			
		}		
		
		for(var no=0;no<tmpTextArray2.length;no++){
			var items = tmpTextArray2[no].split('___');
			tmpToBox.options[no] = new Option(items[0],items[1]);			
		}
	}
	
	function sortAllElement(boxRef)
	{
		var tmpTextArray2 = new Array();
		for(var no=0;no<boxRef.options.length;no++){
			tmpTextArray2.push(boxRef.options[no].text + '___' + boxRef.options[no].value);			
		}		
		tmpTextArray2.sort();		
		for(var no=0;no<tmpTextArray2.length;no++){
			var items = tmpTextArray2[no].split('___');
			boxRef.options[no] = new Option(items[0],items[1]);			
		}		
		
	}
	function moveAllElements()
	{
		var selectBoxIndex = this.parentNode.parentNode.id.replace(/[^\d]/g,'');
		var tmpFromBox;
		var tmpToBox;		
		if(this.value.indexOf('>')>=0){
			tmpFromBox = fromBoxArray[selectBoxIndex];
			tmpToBox = toBoxArray[selectBoxIndex];			
		}else{
			tmpFromBox = toBoxArray[selectBoxIndex];
			tmpToBox = fromBoxArray[selectBoxIndex];
		}
		
		for(var no=0;no<tmpFromBox.options.length;no++){
			tmpToBox.options[tmpToBox.options.length] = new Option(tmpFromBox.options[no].text,tmpFromBox.options[no].value);			
		}	
		
		tmpFromBox.options.length=0;
		sortAllElement(tmpToBox);
		
	}
	
	
	/* This function highlights options in the "to-boxes". It is needed if the values should be remembered after submit. Call this function onsubmit for your form */
	function multipleSelectOnSubmit()
	{
		for(var no=0;no<arrayOfItemsToSelect.length;no++){
			var obj = arrayOfItemsToSelect[no];
			for(var no2=0;no2<obj.options.length;no2++){
				obj.options[no2].selected = true;
			}
		}
		
	}
	
	function createMovableOptions(fromBox,toBox,totalWidth,totalHeight,labelLeft,labelRight)
	{		
		fromObj = document.getElementById(fromBox);
		toObj = document.getElementById(toBox);
		
		arrayOfItemsToSelect[arrayOfItemsToSelect.length] = toObj;

		
		fromObj.ondblclick = moveSingleElement;
		toObj.ondblclick = moveSingleElement;

		
		fromBoxArray.push(fromObj);
		toBoxArray.push(toObj);
		
		var parentEl = fromObj.parentNode;
		
		var parentDiv = document.createElement('DIV');
		parentDiv.className='multipleSelectBoxControl';
		parentDiv.id = 'selectBoxGroup' + selectBoxIndex;
		parentDiv.style.width = totalWidth + 'px';
		parentDiv.style.height = totalHeight + 'px';
		parentEl.insertBefore(parentDiv,fromObj);
		
		
		var subDiv = document.createElement('DIV');
		subDiv.style.width = (Math.floor(totalWidth/2) - 15) + 'px';
		fromObj.style.width = (Math.floor(totalWidth/2) - 15) + 'px';

		var label = document.createElement('SPAN');
		label.innerHTML = labelLeft;
		subDiv.appendChild(label);
		
		subDiv.appendChild(fromObj);
		subDiv.className = 'multipleSelectBoxDiv';
		parentDiv.appendChild(subDiv);
		
		
		var buttonDiv = document.createElement('DIV');
		buttonDiv.style.verticalAlign = 'middle';
		buttonDiv.style.paddingTop = (totalHeight/2) - 50 + 'px';
		buttonDiv.style.width = '30px';
		buttonDiv.style.textAlign = 'center';
		parentDiv.appendChild(buttonDiv);
		
		var buttonRight = document.createElement('INPUT');
		buttonRight.type='button';
		buttonRight.value = '>';
		buttonDiv.appendChild(buttonRight);	
		buttonRight.onclick = moveSingleElement;
		
	
		var buttonAllRight = document.createElement('INPUT');
		buttonAllRight.type='button';
		buttonAllRight.value = '>>';
		//buttonAllRight.style.background-image="tick.png";
		//buttonAllRight.onclick = moveAllElements;
		//buttonDiv.appendChild(buttonAllRight);	
		
		
		
		
		
			
		
		var buttonLeft = document.createElement('INPUT');
		buttonLeft.style.marginTop='10px';
		buttonLeft.type='button';
		buttonLeft.value = '<';
		buttonLeft.onclick = moveSingleElement;
		buttonDiv.appendChild(buttonLeft);		
		
		var buttonAllLeft = document.createElement('INPUT');
		buttonAllLeft.type='button';
		buttonAllLeft.value = '<<';
		//buttonAllLeft.onclick = moveAllElements;
		///buttonDiv.appendChild(buttonAllLeft);
		
		var subDiv = document.createElement('DIV');
		subDiv.style.width = (Math.floor(totalWidth/2) - 15) + 'px';
		toObj.style.width = (Math.floor(totalWidth/2) - 15) + 'px';

		var label = document.createElement('SPAN');
		label.innerHTML = labelRight;
		subDiv.appendChild(label);
				
		subDiv.appendChild(toObj);
		parentDiv.appendChild(subDiv);		
		
		toObj.style.height = (totalHeight - label.offsetHeight) + 'px';
		fromObj.style.height = (totalHeight - label.offsetHeight) + 'px';

			
		selectBoxIndex++;
		
	}
	
	
	
	</script>









<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Edit Bus Information</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="css/mm_health_nutr.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//---------------   END LOCALIZEABLE   ---------------
</script>

<link href="css/ddsmoothmenu.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/form.js"></script>

<script type="text/javascript" src="js/ddsmoothmenu.js"></script>

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
	function submitForm() {
	
	    var val=new Array();
		var index=document.editbus.toBox.length;
		var dat="";
		for(i=0;i<index;i++)
		{
		 val[i]=document.editbus.toBox.options[i].value;
		 if(dat=="")
		 { 
		   dat=dat+"val"+i+"="+val[i];
		 }
		 else
		 {
		    dat=dat+"&val"+i+"="+val[i];
		 }
		
		}
		var busno=document.editbus.newBus;
		var busindex=document.editbus.newBus.selectedIndex;
		var newbusno=busno.options[busindex].value;
		dat=dat+"&newbusno="+newbusno;
		//alert(dat);
		//+ "&TelephoneNo=" + TelephoneNo+ "&RegNo=" + RegNo+ "&RouteNo=" + RouteNo+ "&RouteName=" + RouteName
//    if(validateForm()){
//
//    $('div.success').fadeOut();
//        // we want to store the values from the form input box, then send via ajax below
//        var BusNo = $('#BusNo').attr('value');
//        var TelephoneNo = $('#TelephoneNo').attr('value');
//        var RegNo =$('#RegNo').attr('value');
//        var RouteNo =$('#RouteNo').attr('value');
//        var RouteName =$('#RouteName').attr('value');
                $.ajax({
                type: "POST",
                url: "quickeditbus_ajax.php",

                    data: dat,
                success: function(data){
                if(data=='Done') //if Admision number allready exists
              {alert("Successfully Updated");}
              else
              {alert("Error Try Again");}
                    //$('form#submit').hide();
                    //$('form#submit :input').val("");
                    //$('div.success').fadeIn();
                }
            });
//        return false;
//
//    }
//    else{
//
//    alert("Valid data");
//    }
	}

function populateselect()
{
 $busno=document.editbus.newBus.options[document.editbus.newBus.selectedIndex].value;
  $.ajax({
                type: "POST",
                url: "populateselectbox.php",

                    data: 'busno='+$busno,
                success: function(data){dopoulate(data);}
            });
 
}
function dopoulate(data)
{
 //alert(data);
 var opt=new Array();
 opt=data.split('%%');
 
 
 
 var fromboxopt=new Array();
 fromboxopt=opt[0].split('##');
// alert(opt[0]);
  // alert(fromboxopt[i]);
   var fbox = document.getElementById("fromBox");
   fbox.length=0;
   for(index in fromboxopt)
   {
        if(fromboxopt[index]!=''&&fromboxopt[index]!=' '&&fromboxopt[index]!='  ')
		{
          fbox.options[fbox.options.length] = new Option(fromboxopt[index], fromboxopt[index]);
	    }
   }
 
 
 var toboxopt=new Array();
 toboxopt=opt[1].split('**');
// alert(opt[1]);
   var tbox = document.getElementById("toBox");
   tbox.length=0;
   for(index in toboxopt)
   {
		if(toboxopt[index]!=' '&&toboxopt[index]!=''&&toboxopt[index]!='  ')
		{
		tbox.options[tbox.options.length] = new Option(toboxopt[index], toboxopt[index]);
		}
   }
}
</script>




<style type="text/css">
#Layer1 {
	position:absolute;
	width:166px;
	height:34px;
	z-index:1;
	left: 329px;
	top: 368px;
}
#Layer2 {
	position:absolute;
	width:499px;
	height:227px;
	z-index:2;
	top: 28px;
}


.style3 {color: #FF0000}
.style7 {font-size: 14px}
.style9 {
	color: #990000;
	font-size: 16px;
}
</style>
</head>

<body>
<table width="968" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr bgcolor="#FFFFFF">
    <td colspan="3" rowspan="2" bgcolor="#FFFFFF" class="style4">&nbsp;</td>
    <td height="50" colspan="2" align="center" valign="bottom" nowrap="nowrap" bgcolor="#FFFFFF" id="logo">Bus Information Management System</td>
    <td width="7" bgcolor="#FFFFFF">&nbsp;</td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td height="22" colspan="2" align="center" valign="top" bgcolor="#FFFFFF" id="tagline">MOHANDAS COLLEGE OF ENGINEERING AND TECHNOLOGY</td>
	<td width="7" bgcolor="#FFFFFF">&nbsp;</td>
  </tr>

  <tr>
    <td colspan="6" bgcolor="#FFFFFF"><img src="images/mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
  </tr>
  <tr>
    <td height="19" colspan="6"> <div id="smoothmenu1" class="ddsmoothmenu">

  <!--################Start Main Menu #####################-->

<ul>
	<li><a href="MainMenu.php">Home</a> </li>
	
	<!--############NEW SUBMENU#############-->
	<li><a href="#">New</a>
 	  <ul>
 		 <li><a href="NewStudent.php">Student</a></li>
		 <li><a href="NewStaff.php">Staff</a></li>
 		 <li><a href="NewBus.php">Bus</a></li>
 		 <li><a href="NewRoute.php">Bus Stop</a></li>
 		 <li><a href="NewUser.php">User</a></li>
  		 <li><a href="EditNews.php">Information</a></li>
      </ul>
    </li>
  
	<!--############EDIT SUBMENU#############-->	<li><a href="#">Edit</a>
 	  <ul>
	    
		  <li><a href="EditStudent.php">Student</a></li>
  		  <li><a href="Editstaff.php">Staff</a></li>
 		  <li><a href="Editbus.php">Bus</a></li>
		  <li><a href="#">Status</a>
		    <ul>
		      <li><a href="quickeditstudent.php">Student</a></li>
  		      <li><a href="quickeditstaff.php">Staff</a></li>
			  <li><a href="quickeditbus.php">Bus</a></li>
		    </ul>
		  </li>
      </ul>
	</li>

		<!--############Start Print Submenu#############-->
	<li><a href="print.php">Print</a></li><!--############End Print Submenu#############-->
		
<li><a href="changepass.php">Change Password</a></li>
  </li>
  <li><a href="MainMenu.php?logout">Logout</a></li>
    	
	
  <li><a href="contactus.php">Contact Us</a></li>
    </ul>
	
  </li>
  
  </ul>
  
  <!--################End Main Menu#####################--><br style="clear: left" />
</div></td>
  </tr>

  <tr>
    <td colspan="6" bgcolor="#FFFFFF"><img src="images/mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
  </tr>

  <tr>
    <td height="42" valign="top" bgcolor="#79CAFF">&nbsp;</td>
    <td>&nbsp;</td>
    <td colspan="3" valign="top" bgcolor="#FFFFFF" class="pageName style3"><h2>&nbsp;</h2></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td width="172" height="320" valign="top" bgcolor="#79CAFF"><table width="172" border="0" cellpadding="0" cellspacing="0" bgcolor="#79CAFF" id="navigation">
      <tr>
        <td width="172" bgcolor="#79CAFF">&nbsp;<br />
          &nbsp;<a href="MainMenu.php" class="navText">Home</a></td>
      </tr> <tr>
        <td width="172" bordercolor="#666666" ><a href="changepass.php"  class="navText">Change Password</a></td>
      </tr>   
     <tr>
        <td width="172" height="23" bordercolor="#666666" ><a href="upgrade.php" class="navText">Upgrade </a></td>
      </tr>   
    
      <tr>
        <td width="172" bordercolor="#666666" ><a href="MainMenu.php?logout" class="navText">Log Out</a></td>
      </tr> 
	   <tr>
        <td width="172" bordercolor="#666666" ></td>
      </tr>
	     <tr>
        <td width="172" height="23" bordercolor="#666666" ><a href="contactus.php" class="navText">Contact Us </a></td>
      </tr>
    </table>
      <br />
  	&nbsp;<br />
  	&nbsp;<br />
  	&nbsp;<br /> 	</td>
    <td width="6">&nbsp;</td>
    <td colspan="3" valign="top" bgcolor="#FFFFFF">
      <h1 align="left">
        <form method="post" action="" onsubmit="multipleSelectOnSubmit()" name="editbus">
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="style9">Select a  Bus Number </span>
      <select name="newBus" id="newBus" onchange="populateselect()">
    <option value="0">Select</option>
		<?	
		$query_disp="select * from bus";
		$result_disp = mysql_query($query_disp);
		while($query_data = mysql_fetch_array($result_disp))
		{
		 echo '<option value="'.$query_data['BusNumber'].'">'.$query_data['BusNumber'].'</option>';
		} 
		?> 
 </select>
  </br>
  </br>
  </br>
  </br>
  <select name="fromBox" multiple id="fromBox">
  </select>
  <select multiple name="toBox" id="toBox">
 
  </select>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="Submit" value="Submit"  onclick="submitForm()"/>
        </form>
  <script type="text/javascript">
</script>
  <script type="text/javascript">createMovableOptions("fromBox","toBox",500,300,'Available Bus Stops','Stops Of Selected Bus');
  </script>
  <p><span class="style7">You move elements by clicking on the buttons or by double clicking on select box items</span></p>
        </form>
        <br />
    </h1></td>
    <td width="7">&nbsp;</td>
  </tr>
  <tr>
   <td colspan="7" bgcolor="#79CAFF"><div align="center"><strong>Copyright 2009. businfo.info All rights reserved.&nbsp;</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="style1">Powered by <a href="http://mobalive.mobi/" style="text-decoration:none">mobalive.mobi</a></span></div>  </td>
  </tr>
</table>
</body>
</html>
