Location: PHPKode > projects > Skills Evaluator - Free HR evaluation software > skills-evaluator_1.3/http/a_manage_content_.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"]))))
  {
?> 
     <form name="form1" method="post" action="<?php echo customfc('a_manage_content_comments_.php'); ?>">
	    <label>
	    </label>
            <label>
            <br>
            <?php echo $lang['yourPass'] ?>
            <input class="textbox" type="password" name="pass"> <input class="button" type="submit" name="submit" value="Manage Comments">
            </label>
    </form>
 
 <?php 
echo "<br><br>"; if ($config[22][1]=='simple' || $config[22][1]=='advanced'  || $config[22][1]=='full') echo"<a href='".customfc('content_edit.php')."?sw=content_add' class='q_link'>".$lang['Add_Content']."</a>"; else echo"<a href='javascript:ajaxpage(\"".customfc('content_edit.php')."?sw=content_add\", \"content_edit\");' class='q_link'>".$lang['Add_Content']."</a>";

 
 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_category_id')  $set_order1='Category';
  if ($set_order=='content_subcategory_id')  $set_order1='SubCategory';
  if ($set_order=='time_added')  $set_order1='Date Added';
  if ($set_order=='added_by_user_id')  $set_order1='Username';
  if ($set_order=='publish')  $set_order1='Published';
  if ($set_order=='show_in_home')  $set_order1='Show in Home';
  if ($set_order=='approved_by_admin_time')  $set_order1='Approved by Admin 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_category_id' >Category</option>
	<option value='content_subcategory_id' >SubCategory</option>
	<option value='time_added' >Date Added</option>
	<option value='added_by_user_id' >Username</option>
	<option value='publish' >Published</option>
	<option value='show_in_home' >Show in Home</option>
	<option value='approved_by_admin_time' >Approved by Admin Time</option>
	<option value='hits' >Hits</option>
</select>
 Your Password: <input class='textbox' type='password' name='pass'>
<input type='submit' name='Submit' value='Go'></form>";
  
 $query="SELECT * FROM content 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'>Title</td>
	<td nowrap='nowrap'>Category<br>Subcategory</td>
	<td nowrap='nowrap'>Added By</td>
	<td nowrap='nowrap'>Time Added</td>
    <td nowrap='nowrap'>Admin Approval</td>
	<td nowrap='nowrap'>Published</td>
	<td nowrap='nowrap'>Show in Home</td>
	<td nowrap='nowrap'>Hits</td>
  </tr>";
 for (; $row=mysql_fetch_row($result); $nr++) {
 
echo "<tr>
    <td nowrap='nowrap'>".$row[0]."</td>
    <td nowrap='nowrap'><a href='".customfc('content_view.php')."?sw=read_more&content_id=".$row[0]."' target='_blank'>".$row[3]."</a></td>
	<td nowrap='nowrap'>";
	if($row[1]!='') {$category=category($row[1]); echo $category[1]; }
	if($row[2]!='') {$sub_category=sub_category($row[2]); echo "<br>".$sub_category[2]; } echo"</td>
	<td nowrap='nowrap'><a href='".customfc('profile_view.php')."?id=".$row[8]." target='_blank''>"; $content_usr=user($row[8]); echo $content_usr[1]."</a></td>
	<td nowrap='nowrap'>".date("d/m/Y", $row[6])."</td>
	<td nowrap='nowrap'>"; if($row[12]>0) echo date("d/m/Y", $row[12]); echo"</td>
	<td nowrap='nowrap'>"; if($row[11]==1) echo "Yes"; else echo "No"; echo"</td>
	<td nowrap='nowrap'>"; if($row[15]==1) echo "Yes"; else echo "No"; echo"</td>
	<td nowrap='nowrap'>".$row[10]."</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