home - projects - login - links

Project: CodeBase

Location: root /

File: project_source.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.  
  8. if (!empty($_GET['file'])) {
  9. $file = addslashes($_GET['file']);
  10. $Project->readFileContent($file);
  11. } else {
  12. die ("Invalid url");
  13. }
  14. ?>
  15.  
  16.  
  17. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  18. <html xmlns="http://www.w3.org/1999/xhtml">
  19. <head>
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  21. <title>CodeBase - Project Browsing</title>
  22. <base href="http://www.mattiasgeniar.be">
  23. <link href="css/style.css" rel="stylesheet" type="text/css" />
  24. <script type="text/javascript" src="js/scripts.js"> </script>
  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: <?=$Project->getName(); ?></h3>
  41. <p><b>Location: <?=$Project->makeNiceUrls($file); ?></b></p>
  42. <p><b>File: </b><i><?=$file; ?></i></p>
  43. <div id="sourceCodeExpand"> <img id="sourceExpand" src="images/arrow_down.gif" onclick="expand()" onmouseover="this.className='cursor'" width='9' height='9' alt="expand" /> uitklappen</div>
  44. <div id="sourceCode">
  45. <?php
  46. echo $Project->readFileContent($file);
  47. ?>
  48. </div>
  49.  
  50. <!-- end #mainContent --></div>
  51. <?php
  52. require_once ("footer.php");
  53. ?>
  54. <!-- end #container --></div>
  55. <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
  56. </script>
  57. <script type="text/javascript">
  58. _uacct = "UA-2065823-1";
  59. urchinTracker();
  60. </script>
  61. </body>
  62. </html>
  63.