PHP
  Home arrow PHP arrow Page 3 - HTML for a Project Management Application
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
PHP

HTML for a Project Management Application
By: David Web
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 5
    2008-06-09


    Table of Contents:
  • HTML for a Project Management Application
  • Code Explained
  • Source Code for the Page
  • PHP explained

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    HTML for a Project Management Application - Source Code for the Page
    ( Page 3 of 4 )


    And here's the code for the entire page, including the PHP portion of it:


    viewproject

    <?php

    include "dbcon.php";

    include "functions.php";

    //initialise variables

    $alert =false;

    // retrieve information based on the user id, that we set in the login page:


    if(isset($_GET['pid'])){

    //clean pid

    if(!is_numeric($_GET['pid'])){

    //the value received is not numeric. redirect the user to login

    header("location:login.php");

    }


    //otherwise clean the received value for query use

    //get projects

    $projectID = mysql_escape_string($_GET['pid']);

    $getproject= "SELECT * FROM projects WHERE pid = '".$projectID."'";

    $results = mysql_query($getproject);

    $projectdetails = mysql_fetch_assoc($results);


    //get project files

    $getfiles = "SELECT * FROM files WHERE p_id = '".$projectID."'";

    $file_res = mysql_query($getfiles);

    if(!$file_res){

    echo mysql_error();

    }else{

    $num_files = mysql_num_rows($file_res);

    }

     

    //get project members

    $getmembers = "SELECT name FROM staff WHERE p_id = '".$projectID."'";

    $staff_res = mysql_query($getmembers);

    if(!$staff_res){

    echo mysql_error();

    }else{

    $num_staff = mysql_num_rows($staff_res);

    }



    }

    ?>


    <!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"><!-- InstanceBegin template="/Templates/PM_Main.dwt.php" codeOutsideHTMLIsLocked="false" -->

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    <!-- InstanceBeginEditable name="doctitle" -->

    <title>Project Management::View Project</title>

    <!-- InstanceEndEditable -->

    <!-- InstanceBeginEditable name="head" -->

    <!-- InstanceEndEditable -->

    <link href="Templates/main.css" rel="stylesheet" type="text/css" />

    </head>


    <body>

    <table width="100%" border="0">

    <tr>

    <td width="33%">&nbsp;</td>

    <td width="28%">&nbsp;</td>

    <td width="39%">Logged in: <!-- InstanceBeginEditable name="login" --><? echo $_SESSION['name'];?> | <a href="logout.php">Logout</a><!-- InstanceEndEditable --></td>

    </tr>

    <tr>

    <td colspan="3" bgcolor="#6699CC" class="headertxt">Project Management Software </td>

    </tr>

    <tr>

    <td colspan="3"><!-- InstanceBeginEditable name="main" -->

    <table width="100%" border="0">

    <tr>

    <td colspan="2" class="loginheader"><div align="left">Project Name: <?php echo $projectdetails['title'];?> </div></td>

    </tr>

    <tr>

    <td width="44%">&nbsp;</td>

    <td width="56%" ></td>

    </tr>

    <tr>

    <td valign="top"><table width="100%" border="0">

    <tr>

    <td colspan="2"><b>Project Details</b> </td>

    </tr>

     

    <tr>

    <td>Owner</td>

    <td><?php echo $_SESSION['name'];?> </td>

    </tr>

    <tr>

    <td>Due Date </td>

    <td><?php

    if($projectdetails['due_dt'] > $td){

    $alert = true;

    }

    echo $projectdetails['due_dt'];?> </td>

    </tr>

    <tr>

    <td>Status</td>

    <td><?php echo $projectdetails['status'];?></td>

    </tr>

    <tr>

    <td>Project Description</td>

    <td><?php echo $projectdetails['project_description'];?></td>

    </tr>

    </table></td>

    <td rowspan="2" valign="top"><table width="83%" border="0" align="right">

     

    <tr>

    <td><b>Project Files:</b> </td>

    </tr>

    <?php if($num_files > 0){

    while($row = mysql_fetch_assoc($file_res)){

    ?>

    <tr>

    <td><?php echo $row['filename'];?></td>

    </tr>

    <?php }

    }else{

     

    ?>

    <tr>

    <td><p>There are no files stored for this project</p></td>

    </tr>

    <?php

    }

    ?>

    </table></td>

    </tr>

    <tr>

    <td><table width="100%" border="0">

    <tr>

    <td><b>Project Staff</b> </td>

    </tr>

    <?php

    if($num_staff > 0){

    while($rowstaff = mysql_fetch_assoc($staff_res)){

    ?>

     

    <tr>

    <td><?php echo $rowstaff['name'] ?> </td>

    </tr>

    <?php

    }

    }else{

    ?>

    <tr>

    <td><p>There are no other staff members registered for this project</p></td>

    </tr>

    <?php

    }

    ?>

    </table></td>

    </tr>

    </table>

    <!-- InstanceEndEditable --></td>

    </tr>

    <tr>

    <td colspan="3"><!-- InstanceBeginEditable name="nav" --> <table width="100%" border="0">

    <tr>

    <td><a href="edit_project.php?pid=<?php echo $projectdetails['pid'];?>">Edit Project</a> |<a href="add_project.php">Add Project</a> | <a href="add_file.php?pid=<?php echo $projectdetails['pid'];?>">Add Files to this Project </a> |<a href="view_tasks.php?pid=<?php echo $projectdetails['pid'];?
    >">View Tasks for this Project</a> | <a href="add_task.php?pid=<?php echo $projectdetails['pid'];?>">Add a Task to this Project</a> | <a href="add_staff.php?pid=<?php echo $projectdetails['pid'];?>">Add Staff to the Project</a> | <a href="admin/login.php">Administrators Corner</a>|<a href="main.php">View Project List</a></td>

    </tr>

    </table><!-- InstanceEndEditable --></td>

    </tr>

    <tr>

    <td align="right" class="cright" colspan="3">copyright &copy; 2007 PM </td>

    </tr>

    </table>

    </body>

    <!-- InstanceEnd --></html>



     
     
    >>> More PHP Articles          >>> More By David Web
     

       

    PHP ARTICLES

    - Implementing Factory Methods in PHP 5
    - Merging a File Split for FTP Upload using PHP
    - Getting Data from Yahoo Site Explorer Inboun...
    - Method Chaining: Adding More Selecting Metho...
    - How to Split a File During an FTP Upload Usi...
    - Expanding a Custom CodeIgniter Library with ...
    - Using the Yahoo Site Explorer Inbound Links ...
    - Building a CodeIgniter Custom Library with M...
    - Building an E-mini Trading System Using PHP ...
    - Completing the MySQL Class with Method Chain...
    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek