Jump to content

no idea what went wrong


scarezekiel

Recommended Posts

i dont know how to fix this problem..please help me guys

 

 

---  so this is my index

 

<?
session_start();
if(!isset($_SESSION['administrator'])){
header("location:../login.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">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>e-Leave</title>
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
</head>
<body>
<!-- Header -->
<div id="header">
<div class="shell">
	<!-- Logo + Top Nav -->
	<div id="top">
		<h1>e-Leave (Cpanel)</h1>
		<div id="top-navigation">
			Welcome <a href="#"><strong><? $user=($_SESSION['administrator']);  echo $user; ?></strong></a>
			<span>|</span>
			<a href="index.php">Home</a>
			<span>|</span>
			<a href="logout.php">Log out</a>
		</div>
	</div>
	<!-- End Logo + Top Nav -->

	<!-- Main Nav -->
	<? include ("../header/header_cpanel.php"); ?>
	<!-- End Main Nav -->
</div>
</div>
<!-- End Header -->

<!-- Container -->
<div id="container">
<div class="shell">


	<!-- Main -->
	<div id="main">
		<div class="cl"> </div>

		<!-- Content -->
		<div id="content">

	             <?
		if(isset($_GET[view])) {
		$view = $_GET[view];
		}

		if ($view == ''   ){
		include ('employeeleaveapplication.php'); 
		}

		if ($view == 'createaccount'   ){
		include ('createaccount.php'); 
		}

		if ($view == 'createaccounta'   ){
		include ('createaccount_add.php'); 
		}

		if ($view == 'createaccounti'   ){
		include ('createaccount_insert.php'); 
		}

		if ($view == 'createaccountd'   ){
		include ('createaccount_delete.php'); 
		}

		if ($view == 'createaccounte'   ){
		include ('createaccount_edit.php'); 
		}

		if ($view == 'createaccountu'   ){
		include ('createaccount_update.php'); 
		}

		if ($view == 'createlogina'   ){
		include ('createlogin_add.php'); 
		}

		if ($view == 'createlogini'   ){
		include ('createlogin_insert.php'); 
		}

		if ($view == 'employeedirectory'   ){
		include ('employeedirectory.php'); 
		}

		if ($view == 'employeedirectoryl'   ){
		include ('employeedirectory_list.php'); 
		}

		if ($view == 'employeedirectorya'   ){
		include ('employeedirectory_adjustment.php'); 
		}


		if ($view == 'employeedirectoryai'   ){
		include ('employeedirectory_adjustment_insert.php'); 
		}


	if ($view == 'employeedirectoryca'   ){
		include ('employeedirectory_cancel_adjustment.php'); 
		}


	if ($view == 'employeedirectorycl'   ){
		include ('employeedirectory_cancel_application.php'); 
		}

		if ($view == 'changepassword'   ){
		include ('changepassword.php'); 
		}

		if ($view == 'changepasswordi'   ){
		include ('changepassword_insert.php'); 
		}



		if ($view == 'branch'   ){
		include ('setup_branch.php'); 
		}

		if ($view == 'brancha'   ){
		include ('setup_branch_add.php'); 
		}


		if ($view == 'branchi'   ){
		include ('setup_branch_insert.php'); 
		}

		if ($view == 'branchd'   ){
		include ('setup_branch_delete.php'); 
		}

		if ($view == 'branche'   ){
		include ('setup_branch_edit.php'); 
		}

		if ($view == 'branchu'   ){
		include ('setup_branch_update.php'); 
		}



		if ($view == 'designation'   ){
		include ('setup_designation.php'); 
		}

		if ($view == 'designationa'   ){
		include ('setup_designation_add.php'); 
		}


		if ($view == 'designationi'   ){
		include ('setup_designation_insert.php'); 
		}

		if ($view == 'designationd'   ){
		include ('setup_designation_delete.php'); 
		}

		if ($view == 'designatione'   ){
		include ('setup_designation_edit.php'); 
		}

		if ($view == 'designationu'   ){
		include ('setup_designation_update.php'); 
		}


		if ($view == 'leavetype'   ){
		include ('setup_leavetype.php'); 
		}

		if ($view == 'leavetypea'   ){
		include ('setup_leavetype_add.php'); 
		}


		if ($view == 'leavetypei'   ){
		include ('setup_leavetype_insert.php'); 
		}

		if ($view == 'leavetyped'   ){
		include ('setup_leavetype_delete.php'); 
		}

		if ($view == 'leavetypee'   ){
		include ('setup_leavetype_edit.php'); 
		}

		if ($view == 'leavetypeu'   ){
		include ('setup_leavetype_update.php'); 
		}

		if ($view == 'publicholiday'   ){
		include ('setup_publicholiday.php'); 
		}


		if ($view == 'publicholidayd'   ){
		include ('setup_publicholiday_delete.php'); 
		}

		if ($view == 'publicholidaya'   ){
		include ('setup_publicholiday_add.php'); 
		}


		if ($view == 'publicholidayi'   ){
		include ('setup_publicholiday_insert.php'); 
		}

		if ($view == 'publicholidaye'   ){
		include ('setup_publicholiday_edit.php'); 
		}

		if ($view == 'publicholidayu'   ){
		include ('setup_publicholiday_update.php'); 
		}

		if ($view == 'report'   ){
		include ('report.php'); 
		}

		if ($view == 'report_leave'   ){
		include ('report_leave.php'); 
		}

		if ($view == 'print'   ){
		include ('report_print.php'); 
		}


	             ?>

		</div>
		<!-- End Content -->

		<!-- Sidebar -->
		<? include ("../header/dashboard_cpanel.php"); ?>
		<!-- End Sidebar -->

		<div class="cl"> </div>			
	</div>
	<!-- Main -->
</div>
</div>
<!-- End Container -->
<div id="footer">
<? include ("../footer/footer.php"); ?>
</div>
</body>
</html>

 

 

 

-- this is my dashboard panel code

 

<div id="sidebar">

			<!-- Box -->
			<div class="box">

				<!-- Box Head -->
				<div class="box-head">
					<h2><b>Dashboard</b></h2>
				</div>
				<!-- End Box Head-->

				<div class="box-content">
<a href="index.php?view=createaccount"><span> <img src="../images/createaccount.jpg"/> Create Account</span></a>
<div class="cl"> </div>
<div class="cl"> </div>
<a href="index.php?view=employeedirectory"><br><span> <img src="../images/employee.jpg"/> Employee Directory</span></a>
					<div class="cl"> </div>
<a href="index.php?view=report"><br><span> <img src="../images/status-report1.jpg"/> Report</span></a>			
					<div class="cl"> </div>			
<div class="cl"> </div><a href="index.php?view=changepassword"><br>
<span> <img src="../images/key.jpg"/> Change Password</span></a>
				</div>

			</div>

<div class="box">

			<!-- Box Head -->
				<div class="box-head">
					<h2><b>Setup</b></h2>
				</div>
				<!-- End Box Head-->	


				<div class="box-content">

<a href="index.php?view=branch"><br><span> <img src="../images/branch.jpg"/> Branch</span></a>
					<div class="cl"> </div>
<div class="cl"> </div><a href="index.php?view=designation"><br>
<span> <img src="../images/designation.jpg"/> Designation</span></a>
<div class="cl"> </div>
<div class="cl"> </div><br>
<a href="index.php?view=leavetype"><span> <img src="../images/leave.jpg"/> Leave Type</span></a>
<div class="cl"> </div>
<div class="cl"> </div><br>
<a href="index.php?view=publicholiday"><span> <img src="../images/pb.jpg"/> Public Holiday</span></a>

				</div>

			</div>

		</div>

 

 

----- and this is the where the problem page is

 

 

<!-- Box -->
			<div class="box">
				<!-- Box Head -->
				<div class="box-head">
					<h2 class="left">Report</h2>

				</div>
				<!-- End Box Head -->	

				<!-- Table -->
				<div class="table">

<div class="right">
<br>

					</div>

<div id="box" valign="top">
	<br>
        <h3><FORM name ="reportbutton" method="post" align="left" action="index.php?view=report"> <strong>Leave Application Listing </strong>|  <Input type = "Submit" Name = "Submit1" Class="button" VALUE = "Back To Report">  </h3> </FORM>
				<br><br>
<form name="leavebutton" method="post" action="index.php?view=report_leave">
<?
$b=$_GET['b'];
$m=$_GET['m'];
$y=$_GET['y'];

if  ($b <> '' && $m <> '' && $y <> '') {

$branch=$b;
$leavemonth=$m;
$leaveyear=$y;
}
else
{
$branch=$_POST['branch'];
$leavemonth=$_POST['leavemonth'];
$leaveyear=$_POST['leaveyear'];
}



$connection=mysql_connect("$server", "$username", "$password")
or die("Could not establish connection");
mysql_select_db($database_name, $connection)
or die ("Could not select database");


   
    $query="SELECT * from tblworkgroup";
    $result=mysql_query($query);?>


       	  Branch 
        <select name="branch" >
		<option value="all">ALL Branches</option>        
        <? while($row=mysql_fetch_array($result)) { ?>        	
   		 	<option value= "<?=$row['WorkGroupID']?>" <? if ($branch==$row['WorkGroupID']){ echo 'selected'; } ?> ><?=$row['WorkGroupName']?></option>
     <? } ?>
        </select>
           </td>
          </tr>
       <br><br><br>
		  Month   
	<select name="leavemonth" >
	<option value = "1" <? if ($leavemonth==1){ echo 'selected'; } ?>>January</option>
	<option value = "2" <? if ($leavemonth==2){ echo 'selected'; } ?>>February</option>
	<option value = "3" <? if ($leavemonth==3){ echo 'selected'; } ?>>March</option>
	<option value = "4" <? if ($leavemonth==4){ echo 'selected'; } ?>>April</option>
	<option value = "5" <? if ($leavemonth==5){ echo 'selected'; } ?>>May</option>
	<option value = "6" <? if ($leavemonth==6){ echo 'selected'; } ?>>June</option>
	<option value = "7" <? if ($leavemonth==7){ echo 'selected'; } ?>>July</option>
	<option value = "8" <? if ($leavemonth=={ echo 'selected'; } ?>>August</option>
	<option value = "9" <? if ($leavemonth==9){ echo 'selected'; } ?>>September</option>
	<option value = "10" <? if ($leavemonth==10){ echo 'selected'; } ?>>October</option>
	<option value = "11" <? if ($leavemonth==11){ echo 'selected'; } ?>>November</option>
	<option value = "12" <? if ($leavemonth==12){ echo 'selected'; } ?>>December</option> 
	</select>

	   
	Year   
	<select name="leaveyear" >
	<option value = "2010" 	<? if ($leaveyear==2010) { echo 'selected';} ?>>2010</option>
	<option value = "2011"	<? if ($leaveyear==2011) { echo 'selected';} ?>>2011</option>
	<option value = "2012"	<? if ($leaveyear==2012) { echo 'selected';} ?>>2012</option>
	<option value = "2013"	<? if ($leaveyear==2013) { echo 'selected';} ?>>2013</option>
	<option value = "2014"	<? if ($leaveyear==2014) { echo 'selected';} ?>>2014</option>
	<option value = "2015"	<? if ($leaveyear==2015) { echo 'selected';} ?>>2015</option>
	<option value = "2016"	<? if ($leaveyear==2016) { echo 'selected';} ?>>2016</option>
	<option value = "2017"	<? if ($leaveyear==2017) { echo 'selected';} ?>>2017</option>

	</select>


		  

<input type='submit' name='submit' value='Preview' Class="button" onclick='return validate()'>
   
   </div>

</form>			


<br /><br />

<div id="box" valign="top">
                	<h3> <strong>Leave Application Details</strong> &nbsp</h3> 
				<br><br>
	<FORM name="printbutton" method="post" align="left" action="report_print.php" target="_blank">
		<input type="hidden" name="leavemonth" value="<?php echo $leavemonth; ?>">
		<input type="hidden" name="leaveyear" value="<?php echo $leaveyear; ?>">
		<input type="hidden" name="branch" value="<?php echo $branch;?>">
		<Input type = "Submit" Name = "Submit1" Class="button" VALUE = "Print Leave Details">
	</form>					
                	<table width="80%" align="center" >
					<thead> 
<tr>
<th width="700px" align="left">Name</a></th>
                            	
<th width="500px" align="center"></a>Application Date</th>

<th width="500px" align="center"></a> </th>
                           
<th width="500x" align="right"></a>Reason</th>
</tr>
</thead>
<tbody>
<?
/*echo "branch:".$branch.'<br />';
echo "leavemonth:".$leavemonth.'<br />';
echo "leaveyear:".$leaveyear.'<br />';*/
//--------------------------------------------------
if ($leavemonth =='' ||  $leaveyear =='' || $branch == '') {
	// one value missing, so don't display		
}
else
{
	// start display data
	$branchtracker = '';

	if ($branch=='all'){
			$branch = '%';
	}

	$rs = mysql_query( " call vwleavereport('$leavemonth', '$leaveyear', $branch, 0);");
	$query="SELECT *, 
					MONTH(tblleaveapplication.DateFrom) as DFMonth,
					MONTH(tblleaveapplication.DateTo) as DTMonth,
					YEAR(tblleaveapplication.DateFrom) as DFYear
					FROM `tblleaveapplication`
					LEFT JOIN `tblemployee`
					ON tblleaveapplication.employeeid = tblemployee.id
					WHERE WorkGroupID LIKE '".$branch."'				
					AND (
					(MONTH(tblleaveapplication.DateFrom)=".$leavemonth." AND YEAR(tblleaveapplication.DateFrom)=".$leaveyear.")
					OR
					(MONTH(tblleaveapplication.DateTo)=".$leavemonth." AND YEAR(tblleaveapplication.DateFrom)=".$leaveyear.")
					)
					ORDER BY WorkGroupID
					";

	$result = mysql_query($query);
	while($row=mysql_fetch_array($result))
	{
		if ($branchtracker<>$row['WorkGroupID']){
			echo '<tr><td colspan=4 style="background-color: #e8e8e8; font-weight: bold;">'.$row['WorkGroupID'].'</td></tr>';
			$branchtracker = $row['WorkGroupID'];
		} 
		echo '<tr>';
			echo '<td>'.$row['EmployeeName'].'</td>';
			echo '<td>'.$row['DateFrom'].'</td>';
			echo '<td>'.$row['DateTo'].'</td>';
			echo '<td>'.$row['Purpose'].'</td>';				
		echo '</tr>';			
	}

}
?>

</table>

 

The problem is the panel should be out on the RIGHT side..how do i fix it.

 

post-131669-13482403271896_thumb.jpg

post-131669-13482403272107_thumb.jpg

Link to comment
Share on other sites

you've got a problem in your <.div><./div> s

 

When I do that I right click look at source and count them out open and closed because it can get complicated and only you know what div because you've got the css, but you are likely missing a <./div> just before you open the sidebar div ;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.