Which page would you like to view the highlighted source code of?
login.php | project.php | header.php | gpl | none

project.php:

<?php
  
/*
  ----------------------------------------------------------------
  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of
  the License, or (at your option) any later version.
  ----------------------------------------------------------------
  */
  
session_start();
  include 
"./admin/dbc.php";
  
  if (
$_SESSION['oba_auth']) {
    
mysql_connect($dbhname, $dbuname, $dbpword);
    
mysql_select_db($dbname);
  
    
$blogs = mysql_fetch_array(mysql_query("SELECT * FROM blogs WHERE name = '".$_SESSION['oba_un']."'"));
    
$page_title = "project manager";
  
    
$filename = "users/".$_SESSION['oba_un']."/index.html";
    
$fp = fopen($filename, "r");
    
$contents = fread($fp, filesize($filename));
    
fclose($fp);
    include (
"header.php");
    echo 
"    <form action=\"project.php\" method=\"post\">\n";
    echo 
"      <fieldset id=\"id_html\">\n";
    echo 
"        <legend>your blog html</legend>\n";
    echo 
"        <a href=\"project.php\" onclick=\"return hidetoggle('id_1');\">quicktags html</a><br />\n";
    echo 
"        <span id=\"id_1\" style=\"display: none;\">\n";
    echo 
"          <br /><script type=\"text/javascript\">edToolbar();</script><br />\n";
    echo 
"        </span>\n";
    echo 
"        <textarea id=\"canvas\" name=\"canvas_n\" rows=\"20\" cols=\"100\">".$contents."</textarea>\n";
    echo 
"        <script type=\"text/javascript\">var edCanvas = document.getElementById('canvas');</script>\n";
    echo 
"        <br />\n";
    
//echo "        <input type=\"submit\" name=\"submit\" value=\"save changes\" />\n";
    
echo "      </fieldset>\n";
    echo 
"      &nbsp;<a href=\"project.php\" onclick=\"return hidetoggle('id_css');return hidehtml('id_html');\">i want css</a><br />\n";
    echo 
"      <fieldset id=\"id_css\" style=\"display: none;\">\n";
    echo 
"        <legend>your blog css</legend>\n";
    echo 
"        <!--<a href=\"project.php\" onclick=\"return hidetoggle('id_1');\">quicktags css</a><br />\n";
    echo 
"        <span id=\"css_id_1\" style=\"display: none;\">\n";
    echo 
"          <br /><script type=\"text/javascript\">edToolbar();</script><br />\n";
    echo 
"        </span>-->\n";
    echo 
"        <textarea id=\"css_canvas\" name=\"css_canvas_n\" rows=\"20\" cols=\"100\">".$css."</textarea>\n";
    echo 
"        <!--<script type=\"text/javascript\">var edCanvas = document.getElementById('css_canvas');</script>-->\n";
    echo 
"        <br />\n";
    echo 
"      </fieldset><br />\n";
    echo 
"      &nbsp;<input type=\"submit\" name=\"submit\" value=\"save changes\" />\n";
    echo 
"    </form>\n";
    if (
$_POST['submit']) {
      if (
trim($_REQUEST['canvas_n']) != "") {
        
//echo "    <br /><hr /><br />\n";
        //echo $_REQUEST['canvas_n'];
        
$fp2 = fopen($filename, "a");
        
rewind($fp2);
        
$write = fputs($fp2, $_REQUEST['canvas_n']);
        
fclose($fp2);
      }
      else {
        echo 
"    <b class=\"errormsg\" style=\"padding: 0 0 0 4px;\">you didn't enter any text.</b>\n";
      }
    }
    
//echo "    <p>\n";
    //echo "    </p>";
    
echo "  </body>\n";
    echo 
"</html>\n";
  }
  else {
    
header("Location: ./login.php");
  }
?>