Location: PHPKode > projects > Skills Evaluator - Free HR evaluation software > skills-evaluator_1.3/http/a_manage_content_comments_.php
<?php include "config.php"; include "functions.php"; ?>

<!-- include core java - ajax functions file, here will be used to open in same page content edit and delete options -->
 <script src="functions.js" type="text/javascript"></script>


<!--div code to define area for ajax loading of content edit and delete pages -->
<div id="content_edit" style="position:absolute;

                           top:100;
                           left:60;
                           visibility:visible; 
						   background-color:#FF9933;
						   filter:alpha(opacity=100);
						   opacity: 1;
                           width:0; 
                           height:0px; 
                           layer-backgroundcolor:#FFFFCC; 
						   border:3px none #000000; 
                           z-index:2"></div>

<?php global $db_id;

include $template."/header.php";
echo "<link rel='stylesheet' type='text/css' href='".$template."/default.css'>"; 
 if (isset($_SESSION["user"][0]))
  if (($_SESSION["user"][5]>3)&&($_SESSION["user"][3]==md5(clean($_POST["pass"]))))
  {
 
  if(isset($_POST["set_order"])) $set_order=clean($_POST["set_order"]); else $set_order="id";
 
  if ($set_order=='id')  $set_order1='id';
  if ($set_order=='content_id')  $set_order1='Content';
  if ($set_order=='title')  $set_order1='Title';
  if ($set_order=='added_by')  $set_order1='Added By';
  if ($set_order=='approved_by_admin_time')  $set_order1='Approved by Admin Time';
  if ($set_order=='approved_by_user_time')  $set_order1='Approved by User Time';
         
echo "<br><br><form name='form1' method='post' action=''>Order By: <select name='set_order'>
  <option value='id'>id</option>
      <option value='".$set_order."' selected>".$set_order1."</option>
    <option value='content_id' >Content</option>
	<option value='title' >Title</option>
	<option value='added_by' >Added By</option>
	<option value='approved_by_admin_time' >Approved by Admin Time</option>
	<option value='approved_by_user_time' >Approved by User Time</option>

</select>
 Your Password: <input class='textbox' type='password' name='pass'>
<input type='submit' name='Submit' value='Go'></form>";
  
 $query="SELECT * FROM content_comments ORDER BY ".$set_order." DESC";
 $result=mysql_query($query, $db_id); $nr=0;
 
 echo "<font class='q_text_sm'><br>".$lang['Click_on_Title_to_Edit_Delete']."<br><br><table width='200' border='1'>";
 echo "<tr>
    <td nowrap='nowrap'>id</td>
    <td nowrap='nowrap'>Content Title</td>
	<td nowrap='nowrap'>Comment Title</td>
	<td nowrap='nowrap'>Added By</td>
	<td nowrap='nowrap'>Admin Approval</td>
    <td nowrap='nowrap'>User Approval</td>
  </tr>";
 for (; $row=mysql_fetch_row($result); $nr++) {
 $content = content($row[1]);
 
echo "<tr>
    <td nowrap='nowrap'>".$row[0]."</td>
    <td nowrap='nowrap'><a href='".customfc('content_view.php')."?sw=read_more&content_id=".$content[0]."' target='_blank'>".$content[3]."</a></td>
	<td > <a href='javascript:ajaxpage(\"".customfc('content_edit.php')."?sw=comment_edit&comment_id=".$row[0]."\", \"content_edit\");' class='q_link'>".$row[2]."</a>
	</td>
	<td nowrap='nowrap'><a href='".customfc('profile_view.php')."?id=".$row[5]." target='_blank''>"; $content_usr=user($row[5]); echo $content_usr[1]."</a></td>
	<td nowrap='nowrap'>"; if($row[6]>0) echo date("d/m/Y", $row[6]); echo"</td>
	<td nowrap='nowrap'>"; if($row[7]>0) echo date("d/m/Y", $row[7]); echo"</td>
  </tr>";
  }
  if ($nr==0) echo "No Content found";
  echo"</table>";
  }
  else echo "<meta http-equiv='refresh' content='0;url=".customfc('a_panel.php')."'>";
 else system_mesages($lang['accessDenied'],'',1,1); 
?>
	  <?php include $template."/footer.php";
 ?>
</body>

</html>
Return current item: Skills Evaluator - Free HR evaluation software