home - projects - login - links

Project: CodeBase

Location: root /

File: project_detail.php

expand uitklappen
  1. <?php
  2. require_once ("includes/database.php");
  3. require_once ("includes/project.php");
  4.  
  5. $id = (int) $_GET['view'];
  6. $Project = new Project($id);
  7. $Project->openProject();
  8.  
  9. if (!empty($_GET['sub'])) {
  10. $sub = addslashes($_GET['sub']);
  11. if (empty($sub))
  12. $sub = "/";
  13. $Project->readDirectory($sub);
  14. }
  15. ?>
  16.  
  17.  
  18. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  19. <html xmlns="http://www.w3.org/1999/xhtml">
  20. <head>
  21. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  22. <title>CodeBase - Project Browsing</title>
  23. <base href="http://www.mattiasgeniar.be">
  24. <link href="css/style.css" rel="stylesheet" type="text/css" />
  25. <style type="text/css">
  26. <!--
  27. .style2 {color: #CC0000}
  28. -->
  29. </style>
  30. </head>
  31.  
  32. <body class="oneColFixCtrHdr">
  33.  
  34. <div id="container">
  35. <div id="header">
  36. <h1><span class="style2">C</span>ode<span class="style2">B</span>ase - Project Browsing</h1>
  37. <!-- end #header --></div>
  38. <div id="mainContent">
  39. <h3><a href="/">home</a> - <a href="allprojects/">projects</a> - <a href="login/">login</a></h3>
  40. <h3>Project: <a href="project/<?=$Project->getId(); ?>/"><?=$Project->getName(); ?></a></h3>
  41. <p><b>Description:</b><br /><i><?=$Project->getDescription(); ?></i></p>
  42. <b>Content of: <?=$Project->makeNiceUrls($Project->getDirectory()); ?></b><br /><br />
  43. <table width="100%" border="0" cellpadding="0" cellspacing="0">
  44. <?php
  45. // Show the ".." folder
  46. echo "<tr><td width=\"5%\"><img src=\"./images/filetypes/folder.png\" border=\"0\" alt=\"folder\" /></td><td class=\"sourceDir\"> <a href=\"browse/". $Project->getId() ."/". $Project->getDirectoryUp() ."\" title=\"Go up a directory\">..</a></td><td width=\"25%\"></td></tr>\n";
  47. // Let's run over the files
  48. while ($Project->hasDirectories()) {
  49. echo "<tr><td class=\"sourceImg\"><img src=\"./images/filetypes/folder.png\" border=\"0\" height=\"16\" width=\"16\" alt=\"type\" /> </td><td class=\"sourceDir\"><a href=\"browse/". $Project->getId() ."/". $Project->getDirectory() . $Project->directoryName() . "/\">". $Project->directoryName() ."</a></td><td class=\"sourceSize\"></td></tr>\n";
  50. }
  51.  
  52. while ($Project->hasFiles()) {
  53. $extension = $Project->getFileExtension();
  54. if (is_file("./images/filetypes/file-". $Project->getFileExtension() .".png")) {
  55. $img_url = "./images/filetypes/file-". $Project->getFileExtension() .".png";
  56. } else {
  57. $img_url = "./images/filetypes/file-unknown.png";
  58. }
  59. echo "<tr onmouseover=\"this.className='sourceMouseOver';\" onmouseout=\"this.className='sourceMouseOut';\"><td class=\"sourceImg\"><img src=\"". $img_url ."\" border=\"0\" height=\"16\" width=\"16\" alt=\"type\" /> </td><td class=\"sourceDir\"> <a href=\"source/". $Project->getId() ."/". $Project->getDirectory() . $Project->getFile() ."\">". $Project->getFile() ."</a> </td><td class=\"sourceSize\">". $Project->getFileSize() ."Kb</td></tr>\n \n";
  60. }
  61. ?>
  62. </table>
  63.  
  64.  
  65. <!-- end #mainContent --></div>
  66. <?php
  67. require_once ("footer.php");
  68. ?>
  69. <!-- end #container --></div>
  70. <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
  71. </script>
  72. <script type="text/javascript">
  73. _uacct = "UA-2065823-1";
  74. urchinTracker();
  75. </script>
  76. </body>
  77. </html>
  78.