Skip navigation
magnate0137
Currently Being Moderated

Im having a lot of problems with this code.

Jun 16, 2013 3:57 AM

Actually am a newbie to web programming this is the code below

 

 

<!doctype html>

<html lang="en">

<?php ('Content-type: text/html; charset=utf-8');

require_once('practice.php');

require_once('conn.php');

session_start();

?>

 

 

<head>

          <title>LAUTECH - ERMS</title>

          <link rel="stylesheet" href="styles.css" type="text/css" media="screen" />

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>

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

          <!--[if IE]>

<link rel="stylesheet" href="http://www.lautech.edu.ng/templates/ja_purity_ii/css/ie.css" type="text/css" />

<![endif]-->

 

 

<!--[if lt IE 7.0]>

<link rel="stylesheet" href="http://www.lautech.edu.ng/templates/ja_purity_ii/css/ie7minus.css" type="text/css" />

<style>

.main { width: expression(document.body.clientWidth < 770? "770px" : document.body.clientWidth > 1200? "1200px" : "auto"); }

</style>

<![endif]-->

 

 

<!--[if IE 7.0]>

<style>

.clearfix { display: inline-block; } /* IE7xhtml*/

</style>

<![endif]-->

    <style type="text/css">

<!--

.style2 {color: #000000}

-->

    </style>

</head>

<body>

 

 

          <header>

                    <h1>LAUTECH - ERMS</h1>

          </header>

          <nav>

                    <ul>

                              <li><a href="index.php">Home</a></li>

<li class="selected"><a href="#">About</a></li>

<li><a href="personnel.php">Personnel</a></li>

<li><a href="library.php">Library</a></li>

<li><a href="registry.php">Registry</a></li>

<li><a href="bursary.php">Bursary</a></li>

<li><a href="security.php">Security</a></li>

<li><a href="support.php">Support</a></li>

<li><a href="admin/index.php" target="_blank">Admin</a></li>

<li class="style1"><span class="style1">

                                <?php

            if ($_SESSION[login] == ""){

            echo "<b> <a href=\"index.php\">Login.</a></b>";

            } else if ($_SESSION[login] != ""){

            echo "<a href=\"logout.php\"> Log Out </a>";

            }

            ?>

                              </span>

                    </ul>

          </nav>

<section id="intro">

<header>

                      <h2>About the ERMS </h2>

  </header>

                    <p> <strong>The Enterprise Resource Management System</strong> is a sophisticated web-based database solution which integrates different software models for the core activities of the University (among others). These modules include, but not limited to: Personnel Information System, Library Automation System, Resources Archival System et al. <strong>We do hope that this little solution perfectly serve the purpose for it's development. Thanks.</strong></p>

                    <p> </p>

                    <p>

                      <?php

  // first check for admin Login

  //connect to database

   session_start();

if ($_SESSION[login] != ""){

 

 

//verify user

$get_login = "SELECT * FROM logintable where username = '$_SESSION[login]' and password = '$_SESSION[password]'";

$get_login_res = mysql_query($get_login) or die (mysql_error());

     if (mysql_num_rows($get_login_res) == 1){

                     session_start();

                     while ($this_staff = mysql_fetch_array($get_login_res)) {

              $staff_id = $this_staff[staff_id];

                                }

                    // $_SESSION[login] = $_POST[name];$_SESSION[password] = $_POST[password]; $_SESSION[role] = "User";

                    $_SESSION[staff_id] = $staff_id;

 

                     echo "<header><h3> Your Personal Details: </h3></header>";

 

 

          $count_cart = "select * from personnel_info where staff_id = '$_SESSION[staff_id]'";

          $count2 =  mysql_query($count_cart) or die(mysql_error());

          $count = mysql_num_rows($count2);

          $_SESSION['totalrows'] = $count;

 

     if ($count > 0) {

 

           $thisstaff = mysql_query($count_cart) or die(mysql_error());

          // $gtprice = 0.0;

          // $totalqtty = 0.0;

 

            while ($this_staff = mysql_fetch_array($thisstaff)) {

              $surname[] = $this_staff[surname];

                                $othernames[] = $this_staff[othernames];

                                $gender[] = $this_staff[gender];

                                $department[] = $this_staff[department];

                                $mobile[] = $this_staff[mobile];

                                $email[] = $this_staff[email];

                                $thisID[] = $this_staff[staff_id];

                                }

                    $_SESSION['name'] = $firstname." ".$lastname;

 

                      $cart_table = "<form  name=\"form1\" id=\"form1\"><table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"5\" cellspacing=\"4\">

            <tr>

 

              <td bgcolor=\"\"><div align=\"left\"><span class=\"style1\">Last Name </span></div></td>

              <td bgcolor=\"\"><div align=\"left\"><span class=\"style1\">Othernames </span></div></td>

                                <td bgcolor=\"\"><div align=\"left\"><span class=\"style1\">Staff ID </span> </div></td>

              <td bgcolor=\"\"><div align=\"left\"><span class=\"style1\">Gender </span></div></td>

                                <td bgcolor=\"\"><div align=\"left\"><span class=\"style1\">department </span></div></td>

              <td bgcolor=\"\"><div align=\"left\"><span class=\"style1\">Mobile </span> </div></td>

                                <td bgcolor=\"\"><div align=\"left\"><span class=\"style1\">Email </span></div></td>

 

            </tr>";

 

                              for ( $count_row=0; $count_row <= $count-1; $count_row++ ) {

                              $cart_table .= "<tr>

                                <td><span class=\"style2\">$surname[$count_row]</span></td>

              <td><span class=\"style2\">$othernames[$count_row]</span></td>

                                <td><span class=\"style2\">$thisID[$count_row]</span></td>

                                <td><span class=\"style2\">$gender[$count_row]</span></td>

              <td><span class=\"style2\">$department[$count_row]</span></td>

              <td><span class=\"style2\">$mobile[$count_row]</span></td>

                                <td><span class=\"style2\">$email[$count_row]</span></td>

 

 

            </tr>";

                              }

 

 

           $cart_table .= "<tr>

              <td colspan=\"7\" align=\"left\"><span class=\"style2\"><br />Should you find any error in the details displayed above, kindly contact the Administrator for prompt corrections. Thanks!<br>Please choose any of the platforms below for personalized operations.</p></td>

            </tr>

          </table></form>";

 

                      echo $cart_table;

} else{

                      echo "<span class=\"style1\">Your personnel details is not found in the database. Please contact the administrator. <a href=\"support.php\">Send a mail here</a>.</span>";

                      }

}

}

?>

                    </p>

                    <p>                    </p>

        <ul class="column3">

          <img src="<?php echo "admin/passports/".$_SESSION[surname].".jpg" ?>" alt="2" width="113" height="99">

        </ul>

</section>

<section id="content">

                                        <ul class="column">

 

                                        <!--eqblock--><!--eqblock--><!--eqblock-->

                                            <li>

                                                <section class="block">

                                                                                           <a href="#"></a>

                                                                                                     <h2><a href="personnel.php">Personnel Information</a></h2>

                                                                                                     <p>Check updates of your personnel data and other administrative information, including leave details, training schedules and other official engagements. </p>

                                        </section>

                                            </li>

 

 

                                            <!--eqblock-->

                                            <li>

                                                <section class="block">

                                                                                           <a href="#"></a>

                                                                                                     <h2><a href="library.php">Library Automation</a></h2>

                                                                                                     <p>This provides you with up-to-date information about the Library. You can notify the Library personnel of borrows and check the status of your pending borrows from the library. </p>

                                        </section>

                                            </li>

 

 

                                            <!--eqblock-->

                                            <li>

                                                <section class="block">

                                                                                           <a href="#"></a>

                                                                                                     <h2><a href="#">Security Department</a></h2>

<p>The security information system provides you with the opportunity to perform individual overhead transaction like roster generation, shifts, retiements, reimbursements etc.

                                        </section>

                                            </li>

 

 

                                            <!--eqblock-->

                                            <li>

                                                <section class="block">

                                                                                           <a href="#"></a>

                                                                                                     <h2><a href="#">Resources Archival </a></h2>

                                                                                                     <p>The resources archival system enables the Planning and Documentation Department to archive important official documents for easy accessibility and retrieval. </p>

                                        </section>

                                            </li>

                                            <!--eqblock-->

                                            <li></li>

                                        </ul>

</section>

 

 

          <footer>

    <section>

    <h3>Quick Links</h3>

    <p><a href="about.php">About</a><br>

      <a href="support.php">Support</a> <br>

      <a href="support.php#mail">Send a mail </a><br>

      <a href="http://www.lautech.edu.ng" target="_blank">Visit LAUTECH's Main Site</a></p>

    <p> </p>

    </section>

 

    <section>

    <h3>Staff Operations</h3>

    <p><a href="personnel.php">Personnel Information</a><br>

      <a href="library.php">Library Information</a> <br>

      <a href="nominal_roll.php">Nominal Roll </a><br>

      <a href="search.php">Search for Staff Information </a></p>

    </section>

 

    <section>    </section>

    <section><h3>Library Operations</h3>

      <a href="library.php">Library Information System</a> <br>

      <a href="library_enquiries.php">Library Requests/Enquiries </a><br>

            <a href="admin/mail.php">Manage Materials</a><br>

    <p>&copy; 2012 <a href="#" title="LAUTECH ERMS">LAUTECH ERMS</a> All rights reserved.</p>

    <p> </p>

    </section>

          </footer>

 

 

</body>

</html>

 
Replies
  • Currently Being Moderated
    Jun 16, 2013 5:22 AM   in reply to magnate0137

    What is the problem?  You have pasted your code without telling anybody what the problem is.

     

    You also need to post a link to your test page so that people here can see it in action.  Code is generally not necessary if a link is provided here.

     

    Also, let us hope Nigeria can beat Tahiti in the confederation Cup in Brazil tomorrow.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 16, 2013 11:19 AM   in reply to mytaxsite.co.uk

    Code is generally not necessary if a link is provided here.

    It is if it contains PHP.

    This looks like a Joomla product.

     

     

    Nancy O.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points