Jump to content

Recommended Posts

Once again, thanks SO much for all your help. I get this error:

Parse error: syntax error, unexpected $end in /home/virtu857/public_html/aandwtechsupport.co.cc/menu.php on line 201

 

This is my code. Line 201 is the very last line:

<?
/*
* Exemplar Web hosting
* http://www.exemplar.biz
*
* Title: PHP Online Invoice System
* Version: 2.0
* Author: Exemplar
* Date: 01-01-2006
*
*/
session_start();
if(!session_is_registered("client_id"))
{
header("Location: index.html");
exit;
}

if ($client_name !== 'admin')
{
include "client_header.php";

$url_access=$_SERVER['REQUEST_URI'] ;

$isql = "INSERT INTO client_access (clientid,client_name,fname,lname,ipaddr,date,timein,url_viewed,isloggedin)
VALUES ('$client_id','$client_name','$fname','$lname','$remoteaddr','$date_in','$time_in','$url_access','$cisloggedin')";
$result = mysql_query($isql);
?>
<h2><br>Hello <b>
  <?=$client_name?>

  Here are your invoices:
  </b></h2>

<?

$result = mysql_query("SELECT * FROM invoices WHERE clientid = '$client_id' ORDER BY id",$db);

echo "<p><table border=1 cellspacing=0 cellpadding=2 bordercolor=#000000 width=90%>";
echo "<tr align=top>
<td class=topHeadrow5><b>Inv. #</b></td>
<td class=topHeadrow5><b>Invoice Date</b></td>
<td class=topHeadrow5><b>Due Date</b></td>
<td class=topHeadrow5><b>Total</b></td>
<td class=topHeadrow5><b>Status</b></td>
<td class=topHeadrow5> </td></tr>";

while ($row = mysql_fetch_array($result))
{
$id = $row["id"];
$date = $row["date"];
$bill_date = $row["bill_date"];
$due_date = $row["due_date"];
$paid_date = $row["paid_date"];
$dateshow = fixDate($date);
$dateshow1 = fixDate($bill_date);
$dateshow2 = fixDate($due_date);
$dateshow3 = fixDate($paid_date);
$total = $row["total"];
$status = $row["status"];

if ($alternate == "1") {
$color = "#ffffff";
$alternate = "2";
}
else {
$color = "#c0c0c0";
$alternate = "1";
}

echo "<tr valign=top bgcolor=$color><td>$id</td><td>$dateshow</td><td>$dateshow2</td><td align=right>$currency$total</td>";
if($status == "paid"){
echo "<td bgcolor=#33cc33>$status</td>";
}else{
echo "<td>$status</td>";
}
echo "<td>[ <a href='invoice.php?id=$id'>view</a> ] [ <a target=_blank href='invoice_print.php?id=$id'>Print</a> ]</td></tr>";
}
echo "</table>";
//-------------------------------------------------Begin Admin-------------------------------------------------
}
elseif ($client_name == 'admin')
{

$url_access=$_SERVER['REQUEST_URI'] ;

?>

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

<!--  Version: Multiflex-1.2                                   -->
<!--  Date:    September 21, 2007                              -->
<!--  Author:  1234.info                                       -->
<!--  License: Fully open source without restrictions.         -->
<!--           Please keep footer credits in the form of       -->
<!--           "Design by 1234.info"                           -->

<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  <meta name="description" content="Your description goes here" />
  <meta name="keywords" content="your,keywords,come,here" />
  <meta name="author" content="Design: 1234.info / Modified: Your Name" />
  <link rel="stylesheet" type="text/css" media="screen,projection" href="./css/style_screen.css" />
  <link rel="stylesheet" type="text/css" media="print" href="./css/style_print.css" />
  <title>MultiFlex-1.2 - Basic Options</title>
</head>

<body>
  <div class="page-container">

  	<!-- HEADER -->
    <!-- Global Navigation -->
    <div class="nav-global-container">
      <div class="nav-global nav-global-font">
		  <ul>
    	    <li><a href="index.html">home</a></li>
    	    <li><a href="contactus.html">contact</a></li>
         	<li><a href="about.html">about us</a></li>																		
          					
        </ul>
	  </div>
    </div>				

    <!-- Sitename and Banner -->
	<div class="site-name">
	  A and W Tech Support
	  <div class="site-slogan">				 
			Tech support...the right way!
		</div>
	</div>		 						
	<div><img class="img-header" src="./img/header.gif" alt=""/></div>

    <!-- Main Navigation -->												
    <div class="nav-main nav-main-font">			
		<ul>
        <li><a href="index.html">Home</a></li>
        <li><a href="services.html">Services</a></li>
        <li><a href="login.php" class="selected">My Account</a></li>
        <li><a href="register.php">Register</a></li>
        <li><a href="staff.html">Staff</a></li>
        <li><a href="contactus.html">Contact Us</a></li>
<li><a href="quote.html">Request a Quote</li>
<li><a href="logout.php">Logout</li>	
	  </ul>
	</div>
	<div class="buffer"></div>

  	<!-- Sub-Navigation -->
	<div class="nav-sub nav-sub-font">
      <ul>
        <li class="title">Admin Options</li>
        <li class="group"><a href="menu.php">Main Menu</a></li>		
        <li class="group"><a href="editclient.php">Add Client</a></li>
        <li class="group"><a href="select_client.php">Create Invoice</a></li>
        <li class="group"><a href="clients.php">Manage Clients</a></li>
        <li class="group"><a href="payment_record.php">Payment Records</a></li>
        <li class="group"><a href="admins.php">Manage Admins</a></li>
        <li class="group"><a href="search.php">Search Clients</a></li>
        <li class="group"><a href="inv_search.php">Search Invoices</a></li>
        <li class="group"><a href="support/scp/admin.php">Help Desk</a></li>
        <li class="group"><a href="newusers.php" target="_blank">New Users</a><li>
        
      </ul>
    </div>				

    <!-- WRAP CONTENT AND SIDEBAR -->
    <div class="container-content-sidebar">						

  		<!-- 	CONTENT -->
		<div class="content content-font">

        <!-- Page title -->		
	  	<div class="content-pagetitle">Welcome <?=$client_name?></div>			
      
			<!-- Text container -->
			<div class="contentbox-container">
				<div class="contentbox-full">
        		<div class="contentbox-noshading">
						<p>Welcome back, <?=$client_name?>. You can use the links on the sidebar to navigate.</p>
          	</div>
        	</div>
      	</div>        
    	</div>

    	<!-- SIDEBAR -->		
	  <div class="sidebar sidebar-font">
			<!-- Empty -->
		</div>

    <!-- END WRAP CONTENT AND SIDEBAR -->
	</div>		

    <!-- FOOTER -->
    <div class="footer footer-font">
       <p><b>Copyright © 2010 A and W Tech Support | All Rights Reserved</b></p>
       <p>Design by <a href="http://1234.info/">1234.info</a> | We reserve the right to deny anyone technical support at any time, for any reason. No information on this website may be redistributed without the written consent of <b>A and W Tech Support</b> &copy. If any of these requirements or any of the rules and regulations stated in our contract, which can be dispursed by request or by clicking <a href="contract.html">here</a>, legal actions may apply.</p>
    </div>
  </div>
</body>
</html>

 

I get this error when I try to login as an Admin. I haven't tested out the Client part as I'm still working on the Admin part.

Link to comment
https://forums.phpfreaks.com/topic/207322-why-is-this-happening/
Share on other sites

You have the gap due your floated div's being larger then the parent element. Rule of thumb:

 

width + padding + border + margin = totalwidth

 

Count the totalwidth for both div's and you'll see you'll have a number greater then the width of your parent element. Open firebug, hit the HTML tab, then hit the markup tab on your right.

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.