0

Hello,
I am trying out to construct a performance monitoring system (par tof my project at college), I am now trying to create the pages for reports and wish to refine even further with a reporting tool that can display for me performance of staff in a newsroom. I am using their stories as a basis. Below is a a file I called finreport.php. It is supposed to show a general page with totals of staff performance and I wanted to arrange them according to the staff with the highest count of articles. In case this interests you, please help me complete this project. I can supply the other files as well, just to give you a whole picture.

<?php
session_start();
?> 
<!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" xml:lang="en"><!-- InstanceBegin template="/Templates/index.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="description" content=" System for Monitoring Performance of Journalists or media house staff" />
	<meta name="keywords" content="Newsroom Performance Monitoring System" />
	<meta name="author" content="Davis Joseph Weddi (O6/BIT/KC/070)" />
	<link rel="stylesheet" type="text/css" href="styles/nptsv1.css" />
<!-- InstanceBeginEditable name="doctitle" -->
	<title>NEWSROOM Performance Tracking System</title>
<!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>

<body>
<div id="top">
	<p class="hide">Skip to: <a href="#sitemenu" accesskey="2">Site menu</a> | <a href="#maincontent" accesskey="3">Main content</a></p>
</div>

<div id="container">
	<div id="main">
		
		<div id="logo">
			<h1>[<a href="login.php" accesskey="4">NPMS</a>]</h1>
		<span id="tagline">Newsroom Performance<br /> 
	  Monitoring System</span></div>

		<div id="intro">
			<h2 id="maincontent">Welcome <?php echo $_SESSION['name']  ; ?> <a href="admin/logout.php"> Logout</a></h2>
		  <p>&nbsp;</p>
	  </div>

    <!-- InstanceBeginEditable name="EditRegion1" --> 
      <p>&nbsp;</p>
      <p>
      </p>
    <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="EditRegion2" -->
		<h2 class="headerstyle">General Report </h2>
		
		<p><fieldset>
		<legend></legend>
    <form method="post" action="<?php echo $PHP_SELF;?>">
          <tr><td align="right">Username</td><td><select name="uname2">
<option value="">Choose</option>
<?php

require("admin/connections.php");
$q = "select uname from users order by uname";
$result = mysql_query($q) or die("Error");
while($rw = mysql_fetch_row($result))
{
	echo"<option value='$rw[0]'>$rw[0]</option>";
}
?></select></td><td><input type="submit" name="viewuser" value="Search" /></td></tr>
</form></p>
		
		<p><?php
		
		require("admin/connections.php");
				     
		$use =$_POST['uname2'];
		
		
					 
					   
					 
			if($_SESSION['role']=='reporter' || $_SESSION['role']=='editor')
			{		
			// select and display the stories for the editor and allow them to add points
			
			$user =$_SESSION['uid'];
			
		
		
			$sq ="SELECT * from stories where journalist ='$user' ";
			$sq_im = mysql_query($sq);
			
			echo "<table>
			<tr><th>Story ID</th><th>Title</th><th>Date</th><th>Page</th><th>Category</th><th>Journalist</th><th>Section</th><th>Amount</th><th>Rating</th><th>Status</th></tr>
			";
			while($row =mysql_fetch_row($sq_im))
			{
			$id =$row[0];
			$title =$row[1];
			$dte =$row[2];
			$page =$row[3];
			$category =$row[4];
			$journalist =$row[5];
			$section =$row[6];
			$rat =$row[7];
			$amount =$row[8];
			$status =$row[9];
			
			
			echo "<tr><td>$id</td><td>$title</td><td>$dte</td><td>$page</td><td>$category</td><td>$journalist</td><td>$section</td><td>$rat</td><td>$amount</td><td>$status</td></tr>";
			}
			
			echo "</table>";
			
}		


					  
					 
			if($_SESSION['role']=='accounts')
			{		
			
			$user =$_SESSION['uid'];
			
			if(empty($use))
			{
			$sq ="SELECT * from stories";

			}
			else
			{
			
			$sq ="SELECT * from stories where journalist ='$use' ";
			}
			
			$sq_im = mysql_query($sq);
			
			echo "<table>
			<tr><th>Title</th><th>Date</th><th>Page</th><th>Category</th><th>Journalist</th><th>Section</th><th>Rating</th><th>Amount</th><th>Status</th></tr>
			";
			while($row =mysql_fetch_row($sq_im))
			{
			$id =$row[0];
			$title =$row[1];
			$dte =$row[2];
			$page =$row[3];
			$category =$row[4];
			$journalist =$row[5];
			$section =$row[6];
			$rat =$row[7];
			$amount =$row[8];
			$status =$row[9];
			
			
			echo "<tr><td>$title</td><td>$dte</td><td>$page</td><td>$category</td><td>$journalist</td><td>$section</td><td>$amount</td><td>$rat</td><td>$status</td></tr>";
			}
			
			echo "</table>";
			
}		


else {

echo "You are not authorised to view this page";
}
					 
					 
					 
		?>
		</p>
		<p class="internallink">&nbsp;</p>
		<!-- InstanceEndEditable --></div>

	<div id="sidebar">
		<h2 id="sitemenu" class="sidelink menuheader">Menu:</h2>
	  <a class="sidelink" href="home.php"> Home</a><span class="hide"> | </span><span class="hide"> | </span>
	  <a class="sidelink" href="summary.php"> Reports</a><span class="hide"> | </span><span class="hide"> | </span>
		<a class="hide" href="#top" accesskey="1">Top of page</a>

		<h3>Important note</h3>
		<p>This platform has been developed for use in Ugandan Newsrooms.</p>

  </div>
	<div class="clear">&nbsp;</div>
</div>

<div id="footer">
	
</div>

</body>
<!-- InstanceEnd --></html>
3
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by dweddi
0

You can't expect people to jump in and help you complete your project. Try posting specific problems you come across, and making it as concise as possible. It is hard to read a whole page of code, but much easier to see whats wrong with a small block.

0

You can't expect people to jump in and help you complete your project. Try posting specific problems you come across, and making it as concise as possible. It is hard to read a whole page of code, but much easier to see whats wrong with a small block.

Hi, u sound too tough/harsh for me to handle. Sorry but I think let me struggle on my own, I think am now determined enough.

0

Hi, u sound too tough/harsh for me to handle. Sorry but I think let me struggle on my own, I think am now determined enough.

I'm sorry if my post sounded harsh.

It is in no way intended to be. If you post a question, instead of a request for help, you'll get more help. I'm just saying this from experience.

It is quite hard for people to give you help when what you want is so general. If you post a specific issue, such as how to design your database, how to query it, or a specific error, it is easier for others to lend help.

I'll be the first to help you out if there is something I could help out with.

0

digital-ether is right. its very hard to study all of your so long code and provide help for your complete project, make questions of the issues you are facing in your code so its easy to answer and less time taking

0

Hello good people,
thanks a lot. I think am making some headway with my project. This forum has given me some lessons. I have a problem in that I find it hard to explain long code in just a few words. I am still sorry.
Thanks a lot once again.

Davis

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.