Location: PHPKode > projects > Phpress > phpress/notes.php
<?
/*
    Copyright (C)2004-2007  Matthieu Perez - hide@address.com

    This file is part of PhPress.

    PhPress 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 3 of the License, or
    (at your option) any later version.

    PhPress is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with PhPress.  If not, see <http://www.gnu.org/licenses/>.
*/
// notes.php
// notes management
session_start();

include 'program/common/constantes.php' ;
require LANG_PATH . $lang ."/msg.php";
require PROG_COM_PATH .'functions_mysql.php';
require PROG_COM_PATH . 'functions_common.php';
require 'program/html/lightblue.css';

// tmp - default :
$left_col=75;
$right_col=25;

// new note :
if($new_note)
{
$request="INSERT INTO Notes (User, Title, LeftCol, RightCol) VALUES ('$user', '$new_note', '$left_col', '$right_col') ";
$query_result = sql_request($db, $request) ;

$request="SELECT Id FROM Notes WHERE Title='$new_note' AND User='$user' ";
$query_result = sql_request($db, $request) ;
while($result = mysql_fetch_array($query_result))
 {
 $id_note=$result[0];
 $display_note="?note=$id_note"; 
 }
}

print '
<TITLE>Notes</TITLE>
<frameset cols="150,*">
   <frame src = "notes_tools.php">
   <frame src = "notes_main.php'.$display_note.'" name="note_main">
<noframes>
You NEED a browser supporting frames, cookies and popups to use PhPress !!
</noframes>
</frameset>';

print 'notes de <red>'.$user.'</red>';
?>
Return current item: Phpress