i-man-devel Mailing List for Information and Contact Manager
Brought to you by:
yglodt
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
(15) |
Apr
(63) |
May
(38) |
Jun
(4) |
Jul
(7) |
Aug
|
Sep
|
Oct
(11) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
From: Yves G. <yg...@us...> - 2008-10-12 13:12:39
|
Update of /cvsroot/i-man/i-man In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32264 Modified Files: base.css bottom.php category_form.php changelog.txt config.php include.php index.php javascript.php login.php news.php todo.txt top.php user_form.php Added Files: attachment.php Log Message: commit what was lurking around here, hope it does not break anything... :-) Index: login.php =================================================================== RCS file: /cvsroot/i-man/i-man/login.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- login.php 5 May 2005 21:19:29 -0000 1.12 +++ login.php 12 Oct 2008 13:12:28 -0000 1.13 @@ -16,7 +16,7 @@ */ require_once('include.php'); -if ($_GET['logout'] == '1') { +if ((!empty($_GET['logout'])) && ($_GET['logout'] == '1') ) { $_SESSION = array(); session_destroy(); header("Location: index.php"); @@ -45,6 +45,7 @@ exit; } } else { +$user = (isset($_GET['user'])) ? $_GET['user'] : ''; echo<<<EOT <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> @@ -72,7 +73,7 @@ <fieldset><legend>$t2603</legend> <form name="login" method="post" action="{$_SERVER['PHP_SELF']}"> <table border="0" cellspacing="1" cellpadding="2"> -<tr><td><label for="user">$t2601</label></td><td><input name="user" id="user" type="text" size="24" maxlength="32" value="{$_GET['user']}" /></td></tr> +<tr><td><label for="user">$t2601</label></td><td><input name="user" id="user" type="text" size="24" maxlength="32" value="$user" /></td></tr> <tr><td><label for="pass">$t2602</label></td><td><input name="pass" id="pass" type="password" size="24" maxlength="32" /></td></tr> <tr><td></td><td><input name="submit" type="submit" value="$t2603" /></td></tr> </table> Index: user_form.php =================================================================== RCS file: /cvsroot/i-man/i-man/user_form.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- user_form.php 14 Oct 2005 18:57:10 -0000 1.13 +++ user_form.php 12 Oct 2008 13:12:28 -0000 1.14 @@ -21,7 +21,8 @@ exit(); } -if (($_POST['dbaction'] == 'insert') || ($_POST['dbaction'] == 'update')) { +if ( (!empty($_POST['dbaction'])) && (($_POST['dbaction'] == 'insert') || ($_POST['dbaction'] == 'update')) ) { +// if (($_POST['dbaction'] == 'insert') || ($_POST['dbaction'] == 'update')) { $selected_user = new User; $selected_user->username = $_POST['username']; $selected_user->realname = $_POST['realname']; Index: todo.txt =================================================================== RCS file: /cvsroot/i-man/i-man/todo.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- todo.txt 26 Jul 2005 22:08:51 -0000 1.15 +++ todo.txt 12 Oct 2008 13:12:28 -0000 1.16 @@ -25,13 +25,5 @@ Add a button "Show history of this record" that gives a special page that shows all the revisions. - write some javascript to prevent invalid users to be created - If an attachment is an image, create and show a thumbnail of it (see drupal code) - - - - - -Fixes to make: - -settings.php: label missing for "show hidden" button - -29 rue de la Fontaine +- put a reply-to header into the mail that is sent so you can directly + reply to the person that edited the record Index: base.css =================================================================== RCS file: /cvsroot/i-man/i-man/base.css,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- base.css 7 May 2005 15:26:36 -0000 1.15 +++ base.css 12 Oct 2008 13:12:28 -0000 1.16 @@ -24,7 +24,7 @@ vertical-align:middle; } -body.top { +body { padding:5px; margin:0; background-color:#def; @@ -32,7 +32,7 @@ body.bottom { background-color:#fff; - padding:10px; +/* padding:10px; */ margin:0 10px 0 0; /* T R B L */ } @@ -109,7 +109,7 @@ img#logo { float:left; - position:fixed; +/* position:fixed; */ top:6px; left:7px; } @@ -197,7 +197,7 @@ } div.login form { - margin:40px; +/* margin:40px; */ } div.actionbox { @@ -212,11 +212,11 @@ div.top_infobox { float:right; - position:absolute; +/* position:absolute; */ border:0; padding:0; top:3px; - right:3px; +/* right:3px; */ text-align:right; } @@ -225,3 +225,36 @@ margin:0; /* font-size:80%;*/ } + +div#header { + background-color:#cde; + padding:10px; + height:100px; + border:1px solid green; + width:90%; + margin-top:10px; + margin-left:auto; + margin-right:auto; +} + +div#bottomframe { + margin-left:auto; + margin-right:auto; + text-align:left; + width:98%; + padding:5px; + border:0; +/* background-color:#fff; */ +/* overflow:scroll; */ + margin-top:140px; +} + +div#enclosing { + text-align:center; + position:fixed; + width:100%; + background-color:#def; + height:140px; + margin:-10px; + border-bottom: 1px solid #000; +} Index: index.php =================================================================== RCS file: /cvsroot/i-man/i-man/index.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- index.php 5 May 2005 19:25:25 -0000 1.7 +++ index.php 12 Oct 2008 13:12:28 -0000 1.8 @@ -14,6 +14,7 @@ GNU General Public License which is available in the file copying.txt or under http://www.gnu.org/licenses/ for more details. */ + require_once('include.php'); if (!isset($_COOKIE['category'])) { @@ -21,39 +22,137 @@ // 31536000 = one year } -echo <<<EOT -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> +echo <<< EOT +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="expires" content="0" /> <meta http-equiv="cache-control" content="no-cache" /> <link rel="shortcut icon" href="images/favicon.png" /> - <title>$t001</title> + <title>$t101</title> <link href="$stylesheet" rel="stylesheet" type="text/css" /> - <script type="text/javascript"> - if (top != self) top.location = self.location; - </script> + <script type="text/javascript" src='lib/prototype-1.5.0.js'></script> + <script language="javascript" src="javascript.php" type="text/javascript"></script> + <base target="bottom" /> </head> +<body onload="init();"> -<frameset rows="94px,*"> -<frame src="top.php" name="top" scrolling="auto" noresize="noresize" />\n +<div id='enclosing'> +<div id='header'> +<img id="logo" src="images/logo_blue.png" alt="" /> EOT; -if (isset($_COOKIE['singlemode'])) { - print "<frame src=\"bottom.php?id={$_SESSION['iman_record']}\" name=\"bottom\" scrolling=\"auto\" noresize=\"noresize\" />\n"; -} else { - print "<frame src=\"bottom.php#{$_SESSION['iman_record']}\" name=\"bottom\" scrolling=\"auto\" noresize=\"noresize\" />\n"; +IMAN_print_infobox(); + +echo <<< EOT +<div align="center" id='topdiv'> +<table cellspacing="1" cellpadding="2" border="0" id="toptable"> +<tr> +<td class="top" colspan="3" nowrap="nowrap"> +EOT; +IMAN_write_links(); +echo<<<EOT +</td> +</tr> +<tr> +<td class="top" nowrap="nowrap" colspan="2"> +<form id='recordsform' name='recordsform' action="#"><label> +$t110<select name='id' id='records' onchange="new Ajax.Updater('bottomframe', 'bottom.php', {method:'get', asynchronous:true, parameters:Form.serialize($('recordsform')), onSuccess:updateBottom, onFailure:errorHandler, onComplete:changeCatComplete}); return false;"> + + +EOT; + +$iman = new IMan; +$records = $iman->get_recordlist(); +$total_number_of_records = $iman->count_records(); +// $numberofrecords = 0; + +if ($records) foreach($records as $row) { + $add = ''; + if ($row[0] == $_SESSION['iman_record']) { + $add = " selected='selected'"; + } + print "<option value='$row[0]'$add>$row[1]</option>\n"; +// $numberofrecords++; } +print "</select>\n"; +//print ' '.$numberofrecords.'/'.$total_number_of_records; +print "</label></form>\n"; +print "</td>\n"; + +print "<td class='top' nowrap='nowrap'>\n"; +print "<form method='get' id='categoriesform' action='jumpto.php' target='_top' style='display:inline;'><label>\n"; +print "<input type='hidden' name='action' value='get_recordlist' />\n"; +print "$t104<select name='cat' id='categories' onchange=\"new Ajax.Updater('records', 'ajax.php', {method:'get', asynchronous:true, parameters:Form.serialize($('categoriesform')), onSuccess:updateBottom, onFailure:errorHandler, onComplete:changeCatComplete}); return false;\">\n"; + + +$records = $iman->get_categories(); +if ($records) foreach($records as $row) { + if ($display_number_of_records_per_category) { + if ($row[0] == 0) { + $label = "$row[1] ($total_number_of_records)"; + } else { + $label = "$row[1] ($row[3])"; + } + } else { + $label = "$row[1]"; + } + + if (($row[4] != '') && ($row[4] != '/')) { + $title = " title='$row[4]'"; + } else { + $title = ''; + } + + if ($row[0] != $_COOKIE['category']) { + print "<option value='$row[0]'$title>$label</option>\n"; + } else { + print "<option value='$row[0]' selected='selected'$title>$label</option>\n"; + } + unset($title); +} + +print "</select><input type='submit' name='change_category' value='Change' /></label></form>\n</td>\n"; + +$checked1 = NULL; +$checked2 = NULL; + +?> +</tr> +<tr> +<td class="top" nowrap="nowrap"> +<form action="set_cookie.php" method="post" name="HIDEFORM" target="_top"> +<input type="hidden" name="cookiename" value="showhidden" /><label> +<?php +if (isset($_COOKIE['showhidden'])) $checked1 = 'checked="checked"'; +print "$t108<input type=\"checkbox\" name=\"cookievalue\" value=\"1\" onclick=\"this.form.submit();\" $checked1 /></label>"; +?> +</form> +</td> +<td class="top" nowrap="nowrap"> +<form action="set_cookie.php" method="post" name="SINGLEFORM" target="_top"> +<input type="hidden" name="cookiename" value="singlemode" /><label> +<?php +if (isset($_COOKIE['singlemode'])) $checked2 = 'checked="checked"'; +print "$t111<input type=\"checkbox\" name=\"cookievalue\" value=\"1\" onclick=\"this.form.submit();\" $checked2 /></label>"; +?> +</form> +</td> +<td class="top" nowrap="nowrap"> +<form method="get" name="search" action="search.php"> +<label><?php print $t109; ?><input type="text" name="q" size="20" maxlength="50" /></label> +</form> +</td> +</tr> +</table> +</div> +</div> +</div> + +<div style='text-align:center;'> +<div id='bottomframe'></div> +</div> -echo <<<EOT -\n<noframes> -<body> -<p><a href="bottom.php">$t003</a>$t004</p> </body> -</noframes>\n -</frameset> </html> -EOT; - -?> \ No newline at end of file Index: changelog.txt =================================================================== RCS file: /cvsroot/i-man/i-man/changelog.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- changelog.txt 14 Oct 2005 23:18:25 -0000 1.12 +++ changelog.txt 12 Oct 2008 13:12:28 -0000 1.13 @@ -2,14 +2,15 @@ ----------- -1.1 (xx.xx.2005) +1.1 (xx.xx.2006) ------------------- -Added a missing label in news.php -Fixed default user account in SQLite (password was not "admin" and thus you could never log in...) -Made it run without short tags (<?=) -Added mysqli support -Wrap content before saving as text, the same way as we do on displaying it in bottom.php -Show number of records a category holds in the category selector (x) (top.php) +Added a missing label in news.php. +Fixed default user account in SQLite. (password was apparently not "admin" and thus you could never log in...). +Made it run without short tags. (<?=) +Added php-mysqli extension support. (db/mysqli.php) +Wrap content before saving as text, the same way as we do on displaying it in bottom.php. +Show number of records a category holds in the category selector. "Categoryname (x)" (top.php) +Some effort to make I-Man run with out php "Notice" errormessages. 1.0 (31.05.2005) Index: category_form.php =================================================================== RCS file: /cvsroot/i-man/i-man/category_form.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- category_form.php 26 Jul 2005 22:08:51 -0000 1.7 +++ category_form.php 12 Oct 2008 13:12:28 -0000 1.8 @@ -21,7 +21,7 @@ exit(); } -if (($_POST['dbaction'] == 'insert') || ($_POST['dbaction'] == 'update')) { +if ( (!empty($_POST['dbaction'])) && (($_POST['dbaction'] == 'insert') || ($_POST['dbaction'] == 'update')) ) { $category = new Category; $category->name = $_POST['name']; $category->description = $_POST['description']; @@ -49,7 +49,7 @@ } // get a record for editing -if ($_GET['id'] != '') { +if (!empty($_GET['id'])) { // we edit a record if (!$logged_user->is_category_editor()) { header("Location: categories.php"); --- NEW FILE: attachment.php --- <?php /* This file is part of "I-Man - Information and Contact Manager". Project website: http://i-man.sourceforge.net I-Man 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. I-Man 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 which is available in the file copying.txt or under http://www.gnu.org/licenses/ for more details. */ require_once('include.php'); // echo "hello"; $filename = $attachments_savepath.$_GET['record'].'/'.$_GET['filename']; // echo $filename; // print "<br>Content-Disposition: attachment; filename=\"$_GET['filename']\""; // exit; header("Content-Type: application/octet-stream"); header('Content-Length: '.filesize($filename)); header("Content-Disposition: attachment; filename={$_GET['filename']}"); readfile($filename); ?> Index: include.php =================================================================== RCS file: /cvsroot/i-man/i-man/include.php,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- include.php 14 Oct 2005 23:15:50 -0000 1.30 +++ include.php 12 Oct 2008 13:12:28 -0000 1.31 @@ -66,13 +66,13 @@ // set the cookies for style and language if they have not yet been set -if ( ($_COOKIE['language'] != '') && (file_exists($installdir.'i18n'.$separator.$_COOKIE['language'])) ) { +if ( (!empty($_COOKIE['language'])) && (file_exists($installdir.'i18n'.$separator.$_COOKIE['language'])) ) { require_once($installdir.'i18n'.$separator.$_COOKIE['language']); } else { require_once($installdir.'i18n'.$separator.$default_language); setcookie('language',$default_language,1500000000); } -if ( ($_COOKIE['style'] != '') && (file_exists($installdir.'styles'.$separator.$_COOKIE['style'])) ) { +if ( (!empty($_COOKIE['style'])) && (file_exists($installdir.'styles'.$separator.$_COOKIE['style'])) ) { $stylesheet = 'styles/'.$_COOKIE['style']; } else { $stylesheet = 'styles/'.$default_style; @@ -83,7 +83,7 @@ function IMAN_write_links() { global $logged_user,$t801,$t802,$t803,$t804,$t805,$t806,$t808,$t809,$t810,$t811; print "<a href=\"index.php\" target=\"_top\">$t802</a> | "; - if ($logged_user->is_record_creator()) print "<a href=\"record.php\">$t801</a> | "; + if ($logged_user->is_record_creator()) print "<a href=\"record.php\" onclick=\"new Ajax.Updater('bottomframe', 'record.php', {method:'get', asynchronous:true, onSuccess:updateBottom, onFailure:errorHandler, onComplete:changeCatComplete}); return false;\">$t801</a> | "; if (($logged_user->is_category_creator()) || ($logged_user->is_category_editor()) || ($logged_user->is_category_remover())) print "<a href=\"categories.php\" target=\"_top\">$t808</a> | "; print "<a href=\"news.php\" target=\"_top\">$t811</a> | "; print "<a href=\"settings.php\" target=\"_top\">$t810</a>"; @@ -552,13 +552,18 @@ return $db->get_resultset($query); } - function get_recordlist() { + function get_recordlist($category=-1) { global $db; if ($_COOKIE['category'] != 0) { $query = "select id,title,upper(title) from iman_content $db->where1 (category = 0 or category = {$_COOKIE['category']}) order by 3"; } else { $query = "select id,title,upper(title) from iman_content $db->where2 order by 3"; } + if ($category != -1) { + $query = "select id,title,upper(title) from iman_content where category = $category order by 3"; + } elseif ($category == 0) { + $query = "select id,title,upper(title) from iman_content order by 3"; + } return $db->get_resultset($query); } Index: config.php =================================================================== RCS file: /cvsroot/i-man/i-man/config.php,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- config.php 14 Oct 2005 23:13:36 -0000 1.17 +++ config.php 12 Oct 2008 13:12:28 -0000 1.18 @@ -17,10 +17,10 @@ // choose database backend, currently 'interbase.php', 'mysql.php', 'sqlite.php' or 'postgresql.php' // the database options are defined in the respective file in the db/ subdir -//require_once('db/interbase.php'); -//require_once('db/mysql.php'); -require_once('db/mysqli.php'); -//require_once('db/sqlite.php'); +require_once('db/interbase.php'); +// require_once('db/mysql.php'); +// require_once('db/mysqli.php'); +// require_once('db/sqlite.php'); //require_once('db/postgresql.php'); //require_once('db/pdo_sqlite3.php'); Index: news.php =================================================================== RCS file: /cvsroot/i-man/i-man/news.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- news.php 19 Jun 2005 19:15:34 -0000 1.8 +++ news.php 12 Oct 2008 13:12:28 -0000 1.9 @@ -39,7 +39,7 @@ print "<form action=\"set_cookie.php\" method=\"post\" name=\"HIDEFORM\" target=\"_top\">\n"; print "<input type=\"hidden\" name=\"cookiename\" value=\"showhidden\" />\n"; print "<input type=\"hidden\" name=\"BACK\" value=\"".$_SERVER['PHP_SELF']."\" />\n"; -if (isset($_COOKIE['showhidden'])) $checked1 = 'checked="checked"'; +$checked1 = (isset($_COOKIE['showhidden'])) ? 'checked="checked"' : ''; print "<label for=\"cookievalue\">\n"; print "<input type=\"checkbox\" name=\"cookievalue\" id=\"cookievalue\" value=\"1\" onclick=\"this.form.submit();\" $checked1 /> $t1406"; print "</label>\n"; Index: top.php =================================================================== RCS file: /cvsroot/i-man/i-man/top.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- top.php 14 Oct 2005 23:14:20 -0000 1.13 +++ top.php 12 Oct 2008 13:12:28 -0000 1.14 @@ -26,10 +26,11 @@ <link rel="shortcut icon" href="images/favicon.png" /> <title>$t101</title> <link href="$stylesheet" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src='lib/prototype-1.4.0.js'></script> <script language="javascript" src="javascript.php" type="text/javascript"></script> <base target="bottom" /> </head> -<body class="top" onload="document.search.q.focus();"> +<body class="top" onload="document.search.q.focus();" id='topframe'> <img id="logo" src="images/logo_blue.png" alt="" /> @@ -50,7 +51,12 @@ <tr> <td class="top" nowrap="nowrap" colspan="2"> <form action="#"><label> -$t110<select name="combo" onchange="Go(this.form.combo.options[this.form.combo.options.selectedIndex].value);">\n +<input type='hidden' name='action' value='jumpto_record' /> +<!--$t110<select name="combo" id='records' onchange="alert(this.form.combo.options[this.form.combo.options.selectedIndex].value);">--> +<!--$t110<select name="combo" id='records' onchange="Go(this.form.combo.options[this.form.combo.options.selectedIndex].value);">\n--> +$t110<select name='combo' id='records' onchange="new Ajax.Updater('bottomframe', 'bottom.php', {method:'get', asynchronous:true, parameters:Form.serialize($('categoriesform')), onSuccess:updateBottom, onFailure:errorHandler, onComplete:changeCatComplete}); return false;"> + + EOT; $iman = new IMan; @@ -80,8 +86,10 @@ print "</td>\n"; print "<td class='top' nowrap='nowrap'>\n"; -print "<form method='get' action='jumpto.php' target='_top'><label>\n"; -print "$t104<select name='cat' onchange='this.form.submit();'>\n"; +print "<form method='get' id='categoriesform' action='jumpto.php' target='_top' style='display:inline;'><label>\n"; +print "<input type='hidden' name='action' value='get_recordlist' />\n"; +print "$t104<select name='cat' id='categories' onchange=\"new Ajax.Updater('records', 'ajax.php', {method:'get', asynchronous:true, parameters:Form.serialize($('categoriesform')), onSuccess:updateBottom, onFailure:errorHandler, onComplete:changeCatComplete}); return false;\">\n"; + $records = $iman->get_categories(); if ($records) foreach($records as $row) { @@ -97,6 +105,8 @@ if (($row[4] != '') && ($row[4] != '/')) { $title = " title='$row[4]'"; + } else { + $title = ''; } if ($row[0] != $_COOKIE['category']) { @@ -107,7 +117,7 @@ unset($title); } -print "</select></label>\n</form>\n</td>\n"; +print "</select><input type='submit' name='change_category' value='Change' /></label></form>\n</td>\n"; $checked1 = NULL; $checked2 = NULL; Index: javascript.php =================================================================== RCS file: /cvsroot/i-man/i-man/javascript.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- javascript.php 14 Oct 2005 23:16:19 -0000 1.9 +++ javascript.php 12 Oct 2008 13:12:28 -0000 1.10 @@ -48,3 +48,20 @@ parent.frames[1].location.href = x; document.forms[0].elements[0].blur(); } + +function updateBottom() { + return true; +} + +function errorHandler() { + return true; +} + +function changeCatComplete() { + return true; +} + +function init() { + new Ajax.Updater('bottomframe', 'bottom.php', {method:'get', asynchronous:true, onFailure:errorHandler}); + document.search.q.focus(); +} Index: bottom.php =================================================================== RCS file: /cvsroot/i-man/i-man/bottom.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- bottom.php 26 Jul 2005 22:08:50 -0000 1.13 +++ bottom.php 12 Oct 2008 13:12:28 -0000 1.14 @@ -26,16 +26,16 @@ <link rel="shortcut icon" href="images/favicon.png" /> <title>$t201</title> <link href="$stylesheet" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src='lib/prototype-1.4.0.js'></script> <script language="javascript" src="javascript.php" type="text/javascript"></script> </head> -<body class="bottom"> - +<body class="bottom" id='bottomframe'> EOT; if (isset($_COOKIE['singlemode'])) { $record = new Record; - $record->id = $_GET['id']; - if ( (!$record->id == NULL) || (isset($_COOKIE['singlemode'])) ) { + if (!empty($_GET['id'])) { + $record->id = $_GET['id']; $record->category = $_COOKIE['category']; $record->get(); $_SESSION['iman_record'] = $record->id; @@ -109,7 +109,7 @@ $record->content </pre></div>\n EOT; - + $result = Null; if (!$record->id == NULL) $result = $record->get_attachments(); if ($result) { // FILENAME,DESCRIPTION,MIMETYPE,FILESIZE,DATE_SAVED @@ -128,7 +128,10 @@ } else { $attachment_desc = ''; } - print "<li> <a href=\"$attachments_webpath$attachment->attached_record/$attachment->filename\">$attachment->filename</a>$attachment_desc</li>\n"; +// print "<li> <a href=\"$attachments_webpath$attachment->attached_record/$attachment->filename\">$attachment->filename</a>$attachment_desc</li>\n"; +// print "<li> <a href=\"$attachments_webpath$attachment->attached_record/$attachment->filename\">$attachment->filename</a>$attachment_desc <input type='button' value='Show (or display thumbnail...)' /></li>\n"; + print "<li> <a href=\"attachment.php?record=$attachment->attached_record&filename=$attachment->filename\">$attachment->filename</a>$attachment_desc</li>\n"; + } print "</ul>\n"; print "</div>\n"; @@ -148,11 +151,11 @@ print "<input type=\"hidden\" name=\"id\" value=\"$record->id\" /><label>\n"; if ($record->hidden == '1') { $Showall = 1; - print "$t206:<input type=\"checkbox\" name=\"hide\" value=\"1\" onclick=\"this.form.submit();\" checked=\"checked\" $flag /><label>\n"; + print "$t206:<input type=\"checkbox\" name=\"hide\" value=\"1\" onclick=\"this.form.submit();\" checked=\"checked\" $flag /></label>\n"; print "<input type=\"hidden\" name=\"dbaction\" value=\"unhide\" />\n"; } else { $Showall = 0; - print "$t206:<input type=\"checkbox\" name=\"hide\" value=\"1\" onclick=\"this.form.submit();\" $flag /><label>\n"; + print "$t206:<input type=\"checkbox\" name=\"hide\" value=\"1\" onclick=\"this.form.submit();\" $flag /></label>\n"; print "<input type=\"hidden\" name=\"dbaction\" value=\"hide\" />\n"; } @@ -170,5 +173,6 @@ ?> </div> + </body> </html> |
From: Yves G. <yg...@us...> - 2008-10-12 13:12:39
|
Update of /cvsroot/i-man/i-man/db In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32264/db Modified Files: interbase.php mysql.php pdo.php postgresql.php sqlite.php Log Message: commit what was lurking around here, hope it does not break anything... :-) Index: mysql.php =================================================================== RCS file: /cvsroot/i-man/i-man/db/mysql.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mysql.php 27 Mar 2005 20:33:17 -0000 1.2 +++ mysql.php 12 Oct 2008 13:12:28 -0000 1.3 @@ -1,6 +1,7 @@ <?php /* This file is part of "I-Man - Information and Contact Manager". +Project website: http://i-man.sourceforge.net I-Man is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Index: postgresql.php =================================================================== RCS file: /cvsroot/i-man/i-man/db/postgresql.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- postgresql.php 27 Mar 2005 20:33:17 -0000 1.2 +++ postgresql.php 12 Oct 2008 13:12:28 -0000 1.3 @@ -1,6 +1,7 @@ <?php /* This file is part of "I-Man - Information and Contact Manager". +Project website: http://i-man.sourceforge.net I-Man is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Index: sqlite.php =================================================================== RCS file: /cvsroot/i-man/i-man/db/sqlite.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sqlite.php 27 Mar 2005 20:33:17 -0000 1.2 +++ sqlite.php 12 Oct 2008 13:12:28 -0000 1.3 @@ -1,6 +1,7 @@ <?php /* This file is part of "I-Man - Information and Contact Manager". +Project website: http://i-man.sourceforge.net I-Man is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Index: pdo.php =================================================================== RCS file: /cvsroot/i-man/i-man/db/pdo.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- pdo.php 26 Jul 2005 22:08:51 -0000 1.3 +++ pdo.php 12 Oct 2008 13:12:28 -0000 1.4 @@ -1,6 +1,7 @@ <?php /* This file is part of "I-Man - Information and Contact Manager". +Project website: http://i-man.sourceforge.net I-Man is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Index: interbase.php =================================================================== RCS file: /cvsroot/i-man/i-man/db/interbase.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- interbase.php 22 Jul 2005 18:19:13 -0000 1.7 +++ interbase.php 12 Oct 2008 13:12:28 -0000 1.8 @@ -1,6 +1,7 @@ <?php /* This file is part of "I-Man - Information and Contact Manager". +Project website: http://i-man.sourceforge.net I-Man is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,9 +18,9 @@ // setup the database connection here $db = new Db; -$db->database='localhost:/var/lib/firebird/data/i-man.gdb'; -$db->dbuser = 'iman'; -$db->dbpass = 'iman'; +$db->database='localhost:/home/firebird/i-man.fdb'; +$db->dbuser = 'sysdba'; +$db->dbpass = 'masterke'; $db->dbh = ibase_pconnect($db->database,$db->dbuser,$db->dbpass,'ISO8859_1',0,1) or die("<br>Could not connect to database '$db->database'"); @@ -60,22 +61,23 @@ } function get_resultset($query) { + $result = Null; $i=0; $sth = ibase_query($query); $num_fields = ibase_num_fields($sth); - while ($row = ibase_fetch_row($sth)) { + while ($row = ibase_fetch_row($sth, IBASE_TEXT)) { for ($j = 0; $j < $num_fields; $j++) { - $col_info = ibase_field_info($sth,$j); - if ($col_info['type'] == 'BLOB') { +// $col_info = ibase_field_info($sth,$j); +/* if ($col_info['type'] == 'BLOB') { $blob_id = ibase_blob_open($row[$j]); while($string = ibase_blob_get($blob_id,1024)) { $result[$i][$j] .= $string; } $result[$i][$j] = rtrim($result[$i][$j]); ibase_blob_close($blob_id); - } else { - $result[$i][$j] = rtrim($row[$j]); - } + } else {*/ + $result[$i][$j] = rtrim($row[$j]); +// } } $i++; } @@ -118,7 +120,7 @@ if (substr(phpversion(),0,1) >= '5') { // better, but php5-only - $last_id = ibase_gen_id('gen_iman_address_id',0,$db->dbh); + $last_id = ibase_gen_id('gen_iman_content_id',0,$db->dbh); } else { $sth = $db->db_query("select max(id) from iman_content"); while ($row = $db->db_fetch_row($sth)) { |
From: Yves G. <yg...@us...> - 2008-10-12 13:12:39
|
Update of /cvsroot/i-man/i-man/exampledb In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32264/exampledb Modified Files: i-man.sqlite interbase_create_db.sql Log Message: commit what was lurking around here, hope it does not break anything... :-) Index: interbase_create_db.sql =================================================================== RCS file: /cvsroot/i-man/i-man/exampledb/interbase_create_db.sql,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- interbase_create_db.sql 11 Apr 2005 21:42:48 -0000 1.6 +++ interbase_create_db.sql 12 Oct 2008 13:12:28 -0000 1.7 @@ -29,7 +29,7 @@ set sql dialect 3; -create database 'i-man.gdb' +create database 'localhost:/var/lib/firebird2/data/i-man.fdb' page_size=8192 default character set iso8859_1; Index: i-man.sqlite =================================================================== RCS file: /cvsroot/i-man/i-man/exampledb/i-man.sqlite,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 Binary files /tmp/cvsGxGzIO and /tmp/cvsVevHZQ differ |
From: Yves G. <yg...@us...> - 2008-10-12 13:09:39
|
Update of /cvsroot/i-man/i-man/i18n In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32174 Added Files: Italiano.php Log Message: add Italian translation, contributed by "Andrea" --- NEW FILE: Italiano.php --- <?php /* This file is part of "I-Man - Information and Contact Manager". Project website: http://i-man.sourceforge.net I-Man 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. I-Man 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 which is available in the file copying.txt or under http://www.gnu.org/licenses/ for more details. */ // index.php $t001 = 'I-Man - Information and Contact Manager 1.0'; $t002 = 'I-Man 1.0'; $t003 = 'Clicca qui'; $t004 = ' per visualizzare la pagina senza frames.'; // top.php $t101 = 'I-Man Top Frame'; $t104 = 'Categoria: '; $t107 = 'I-Man - Information and Contact Manager 1.0'; $t108 = 'Nascondi: '; $t109 = 'Cerca: '; $t110 = 'Record: '; $t111 = 'Modalità singola: '; // bottom.php $t201 = 'I-Man Bottom Frame'; $t202 = 'Modifica'; $t203 = 'Elimina'; $t204 = 'Stampa'; $t205 = 'Salva Come'; $t206 = 'Nascondi'; // record.php $t301 = 'I-Man - Aggiungi record'; $t302 = 'Aggiungi record'; $t303 = 'Titolo:'; $t304 = 'Contenuto:'; $t305 = 'Categoria:'; $t306 = 'Salva'; $t307 = 'Annulla'; $t308 = '[I-Man] Record aggiunto'; $t309 = 'Allegato:'; $t310 = 'Descrizione allegato:'; $t311 = 'Allegati:'; $t312 = 'Nome file:'; $t313 = 'Descrizione:'; $t401 = 'I-Man - Aggiorna'; $t402 = 'Modifica'; $t406 = 'Aggiorna'; $t407 = 'Elimina'; $t408 = '[I-Man] Un record verrà aggiornato'; $t409 = '[I-Man] Un record è stato aggiornato'; $t1701 = '[I-Man] Un record è stato eliminato'; $t1801 = '[I-Man] Un record è stato nascosto'; $t1802 = '[I-Man] Un record è stato reso visibile'; // single.php $t701 = 'I-Man - '; $t702 = 'Category:'; $t703 = 'Changed:'; // include.php $t801 = 'Aggiungi Record'; $t802 = 'Principale'; $t803 = 'Gestione utenti'; $t804 = 'Login'; $t805 = 'Logout'; $t806 = 'Utente:'; $t808 = 'Modifica Categorie'; $t809 = 'Informazioni su I-Man'; $t810 = 'Impostazioni'; $t811 = 'Cronologia'; $t906 = 'Informazioni su I-Man'; $t907 = 'Impostazioni'; $t908 = 'Cronologia'; $t1601 = 'Titolo: '; $t1602 = 'Categoria: '; $t1603 = 'Ultima Modifica: '; $t1604 = 'Host Modificato: '; $t1605 = 'Utente Modificato: '; $t1606 = 'Nascosto: '; $t1607 = 'Allegati: '; // categories.php $t1001 = 'I-Man - Edit Categories'; $t1002 = 'Modifica Categorie'; $t1004 = 'Nome:'; $t1005 = 'Descrizione:'; $t1006 = 'Records:'; $t1007 = ' '; $t1008 = 'Modifica Categoria'; $t1009 = 'Elimina Categoria'; $t1010 = ' records in '; $t1011 = ' categorie'; $t1012 = 'Ultimo Record Modificato:'; $t1013 = 'Aggiungi Categoria'; // category_form.php $t1201 = 'I-Man - Modifica Categoria'; $t1202 = 'Modifica Categoria'; $t1204 = 'Nome:'; $t1205 = 'Descrizione:'; $t1206 = ' '; $t1207 = 'Salva'; $t1208 = 'Annulla'; $t1209 = 'Aggiungi categoria'; // settings.php $t1301 = 'I-Man - Impostazioni'; $t1302 = 'Seleziona Lingua'; $t1303 = 'Seleziona Stile'; $t1304 = 'Salva'; $t1305 = 'Annulla'; $t1306 = 'Impostazioni'; $t1307 = 'Anteprima Stile'; $t1308 = 'Cambia Password'; // news.php $t1401 = 'I-Man - Cronologia'; $t1402 = 'Cronologia'; $t1403 = 'Titolo:'; $t1404 = 'Categoria:'; $t1405 = 'Ultima Modifica:'; $t1406 = 'Nascondi'; $t1407 = 'Nascosto:'; $t1408 = 'Si'; $t1409 = 'No'; $t1410 = 'Bytes'; $t1411 = 'KB'; $t1412 = 'Dimensione'; // javascript.php $t1501 = 'Elimina record '; $t1502 = 'Elimina category '; $t1503 = ' (inclusi tutti i records!)'; $t1504 = 'Elimina allegato '; $t1505 = 'Elimina utente '; // search.php $t2101 = 'I-Man - Cerca'; $t2102 = 'Titolo:'; $t2103 = 'Categoria:'; $t2104 = 'Ultima Modifica:'; $t2105 = 'Cerca risultati per '; $t2106 = 'Nascosto:'; $t2107 = 'Si'; $t2108 = 'No'; $t2109 = 'Indietro'; // users.php $t2201 = 'I-Man - Gestione Utenti'; $t2202 = 'Gestione Utenti'; $t2203 = 'Aggiungi Utente'; $t2204 = 'Username:'; $t2205 = 'Nome Reale:'; $t2206 = 'Email:'; $t2207 = 'Ultima Modifica Password:'; $t2208 = 'Account Attivo:'; $t2209 = 'Utenti Registrati'; $t2210 = 'Elimina utente'; $t2211 = 'Modifica utente'; // user_form.php $t2301 = 'I-Man - User editor'; $t2302 = 'Aggiungi Utente'; $t2303 = 'Aggiorna Utente'; $t2304 = 'Salva'; $t2305 = 'Annulla'; $t2306 = 'Username:'; $t2307 = 'Nome Reale:'; $t2308 = 'Email:'; $t2309 = 'Genera Password Casuale E Invia A Utente:'; $t2311 = 'Password:'; $t2312 = 'Conferma Password:'; $t2313 = 'Attiva Utente:'; $t2314 = 'Può Aggiungere Records:'; $t2315 = 'Può Modificare Records:'; $t2316 = 'Può Nascondere/Visualizzare Records:'; $t2317 = 'Può Eliminare Records:'; $t2318 = 'Può Aggiungere Categorie:'; $t2319 = 'Può Modificare Categorie:'; $t2320 = 'Può Eliminare Categorie'; $t2321 = 'Può Gestire Utenti:'; $t2322 = 'Account information for "I-Man - Information and Contact Manager"'; $t2323 = 'Un account per I-Man è stato creato per te:'; $t2324 = 'Username:'; $t2325 = 'Password:'; $t2326 = 'Puoi accedere a '.$app_url; $t2327 = 'Dopo esserti autenticato, puoi modificare la tua password cliccando su "'.$t810.'" e quindi "'.$t1308.'".'; $t2328 = 'Buon Proseguimento!'; // user_update_pw.php $t2401 = 'I-Man - Cambio Password'; $t2402 = 'Cambia Password'; $t2403 = 'Vecchia Password:'; $t2404 = 'Nuova Password:'; $t2405 = 'Riscrivi Nuova Password:'; $t2406 = 'Salva'; $t2407 = 'annulla'; // $user_update_pw_feedback.php $t2501 = 'I-Man - Cambio password'; $t2502 = 'La tua vecchia password non era corretta, '; $t2503 = 'La tua nuova password non può esser nulla, '; $t2504 = 'La tua nuova password non può esser identica al tuo username, '; $t2505 = 'La tua nuova password è identica alla tua vecchia password, '; $t2506 = 'La tua password di conferma non coincide, '; $t2507 = 'La tua password è stata reimpostata con successo, '; $t2508 = 'prego ricomincia'; $t2509 = 'torna al menù principale'; // login.php $t2601 = 'Username:'; $t2602 = 'Password:'; $t2603 = 'Login'; ?> |
From: Yves G. <yg...@us...> - 2006-09-25 01:54:12
|
Update of /cvsroot/i-man/i-man/lib In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv20199/lib Added Files: prototype-1.4.0.js Log Message: Welcome prototype, this is the road to "ajax" (as many people call it) --- NEW FILE: prototype-1.4.0.js --- /* Prototype JavaScript framework, version 1.4.0 * (c) 2005 Sam Stephenson <sa...@co...> * * Prototype is freely distributable under the terms of an MIT-style license. * For details, see the Prototype web site: http://prototype.conio.net/ * /*--------------------------------------------------------------------------*/ var Prototype = { Version: '1.4.0', ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)', emptyFunction: function() {}, K: function(x) {return x} } var Class = { create: function() { return function() { [...1742 lines suppressed...] } // Safari returns margins on body which is incorrect if the child is absolutely // positioned. For performance reasons, redefine Position.cumulativeOffset for // KHTML/WebKit only. if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { Position.cumulativeOffset = function(element) { var valueT = 0, valueL = 0; do { valueT += element.offsetTop || 0; valueL += element.offsetLeft || 0; if (element.offsetParent == document.body) if (Element.getStyle(element, 'position') == 'absolute') break; element = element.offsetParent; } while (element); return [valueL, valueT]; } } |
From: Yves G. <yg...@us...> - 2006-09-25 01:52:35
|
Update of /cvsroot/i-man/i-man/lib In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv19833/lib Log Message: Directory /cvsroot/i-man/i-man/lib added to the repository |
From: Yves G. <yg...@us...> - 2005-10-14 23:18:33
|
Update of /cvsroot/i-man/i-man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15185 Modified Files: changelog.txt Log Message: update for 1.1 Index: changelog.txt =================================================================== RCS file: /cvsroot/i-man/i-man/changelog.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- changelog.txt 14 Oct 2005 18:57:10 -0000 1.11 +++ changelog.txt 14 Oct 2005 23:18:25 -0000 1.12 @@ -2,12 +2,14 @@ ----------- -1.0.1 (xx.xx.2005) +1.1 (xx.xx.2005) ------------------- Added a missing label in news.php Fixed default user account in SQLite (password was not "admin" and thus you could never log in...) Made it run without short tags (<?=) Added mysqli support +Wrap content before saving as text, the same way as we do on displaying it in bottom.php +Show number of records a category holds in the category selector (x) (top.php) 1.0 (31.05.2005) |
From: Yves G. <yg...@us...> - 2005-10-14 23:16:26
|
Update of /cvsroot/i-man/i-man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14529 Modified Files: javascript.php Log Message: add function removed from top.php Index: javascript.php =================================================================== RCS file: /cvsroot/i-man/i-man/javascript.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- javascript.php 14 Oct 2005 18:57:10 -0000 1.8 +++ javascript.php 14 Oct 2005 23:16:19 -0000 1.9 @@ -43,3 +43,8 @@ } return true; } + +function Go(x) { + parent.frames[1].location.href = x; + document.forms[0].elements[0].blur(); +} |
From: Yves G. <yg...@us...> - 2005-10-14 23:16:01
|
Update of /cvsroot/i-man/i-man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14346 Modified Files: include.php Log Message: modify sql to make it show the number of records in a category as well Index: include.php =================================================================== RCS file: /cvsroot/i-man/i-man/include.php,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- include.php 26 Jul 2005 22:08:51 -0000 1.29 +++ include.php 14 Oct 2005 23:15:50 -0000 1.30 @@ -524,7 +524,8 @@ class IMan_base { function get_categories() { global $db; - $query = 'select id,name,upper(name) from iman_categories order by 3'; + //$query = 'select id,name,upper(name) from iman_categories order by 3'; + $query = 'select iman_categories.id,iman_categories.name,upper(iman_categories.name),count(iman_content.id) as howmanyin,iman_categories.description from iman_content right join iman_categories on category = iman_categories.id group by iman_categories.id,iman_categories.name,iman_categories.description order by 3'; return $db->get_resultset($query); } |
From: Yves G. <yg...@us...> - 2005-10-14 23:15:01
|
Update of /cvsroot/i-man/i-man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14074 Modified Files: record.php Log Message: show number of records a category holds in the <select> Index: record.php =================================================================== RCS file: /cvsroot/i-man/i-man/record.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- record.php 14 Oct 2005 21:50:06 -0000 1.16 +++ record.php 14 Oct 2005 23:14:54 -0000 1.17 @@ -248,7 +248,12 @@ $selected = ($record->category) ? $record->category : $_COOKIE['category']; if ($records) foreach($records as $row) { - print ($row[0] != $selected) ? '<option value="'.$row[0].'">'.$row[1]."</option>\n" : '<option value="'.$row[0].'" selected="selected">'.$row[1]."</option>\n"; + if (($row[4] != '') && ($row[4] != '/')) { + $title = " title='$row[4]'"; + } + + print ($row[0] != $selected) ? "<option value='$row[0]'$title>$row[1]</option>\n" : "<option value='$row[0]' selected='selected'$title>$row[1]</option>\n"; + unset($title); } echo <<<EOT |
From: Yves G. <yg...@us...> - 2005-10-14 23:14:28
|
Update of /cvsroot/i-man/i-man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13795 Modified Files: top.php Log Message: show number of records that a category holds in the <select> Index: top.php =================================================================== RCS file: /cvsroot/i-man/i-man/top.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- top.php 14 Oct 2005 18:57:10 -0000 1.12 +++ top.php 14 Oct 2005 23:14:20 -0000 1.13 @@ -26,14 +26,7 @@ <link rel="shortcut icon" href="images/favicon.png" /> <title>$t101</title> <link href="$stylesheet" rel="stylesheet" type="text/css" /> - <script language="JavaScript" type="text/javascript"> - <!-- - function Go(x) { - parent.frames[1].location.href = x; - document.forms[0].elements[0].blur(); - } - --> - </script> + <script language="javascript" src="javascript.php" type="text/javascript"></script> <base target="bottom" /> </head> <body class="top" onload="document.search.q.focus();"> @@ -81,22 +74,37 @@ } $numberofrecords++; } -print "</select>\n"; -print ' '.$numberofrecords.'/'.$total_number_of_records; +print "</select> \n"; +//print ' '.$numberofrecords.'/'.$total_number_of_records; print "</label></form>\n"; print "</td>\n"; -print "<td class=\"top\" nowrap=\"nowrap\">\n"; -print '<form method="get" action="jumpto.php" target="_top"><label>'."\n"; -print "$t104<select name=\"cat\" onchange=\"this.form.submit()\">\n"; +print "<td class='top' nowrap='nowrap'>\n"; +print "<form method='get' action='jumpto.php' target='_top'><label>\n"; +print "$t104<select name='cat' onchange='this.form.submit();'>\n"; $records = $iman->get_categories(); if ($records) foreach($records as $row) { + if ($display_number_of_records_per_category) { + if ($row[0] == 0) { + $label = "$row[1] ($total_number_of_records)"; + } else { + $label = "$row[1] ($row[3])"; + } + } else { + $label = "$row[1]"; + } + + if (($row[4] != '') && ($row[4] != '/')) { + $title = " title='$row[4]'"; + } + if ($row[0] != $_COOKIE['category']) { - print '<option value="'.$row[0].'">'.$row[1]."</option>\n"; + print "<option value='$row[0]'$title>$label</option>\n"; } else { - print '<option value="'.$row[0].'" selected="selected">'.$row[1]."</option>\n"; + print "<option value='$row[0]' selected='selected'$title>$label</option>\n"; } + unset($title); } print "</select></label>\n</form>\n</td>\n"; |
From: Yves G. <yg...@us...> - 2005-10-14 23:13:44
|
Update of /cvsroot/i-man/i-man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13645 Modified Files: config.php Log Message: add flag for showing recordcount in category <select> Index: config.php =================================================================== RCS file: /cvsroot/i-man/i-man/config.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- config.php 14 Oct 2005 18:57:10 -0000 1.16 +++ config.php 14 Oct 2005 23:13:36 -0000 1.17 @@ -92,4 +92,7 @@ // default permissions for newly created users. They still can be changed in the form, these values are just a preset. $default_new_user_permissions = '111011100000000000000000'; +// whether to display the number of records a category holds inside the <select> +$display_number_of_records_per_category = 1; + ?> \ No newline at end of file |
From: Yves G. <yg...@us...> - 2005-10-14 21:50:14
|
Update of /cvsroot/i-man/i-man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26268 Modified Files: record.php Log Message: wrap content (the same way than we do on displaying) before saving it in a textfile Index: record.php =================================================================== RCS file: /cvsroot/i-man/i-man/record.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- record.php 14 Oct 2005 21:49:13 -0000 1.15 +++ record.php 14 Oct 2005 21:50:06 -0000 1.16 @@ -141,6 +141,7 @@ header("Content-type: application/octet-stream"); // add content-length header here header("Content-Disposition: attachment; filename=$filename"); + $record->content = wordwrap($record->content,$wordwrap); echo $record->content; exit(); } |
From: Yves G. <yg...@us...> - 2005-10-14 21:49:21
|
Update of /cvsroot/i-man/i-man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26143 Modified Files: record.php Log Message: some more fixes for GET actions (same as previous commit) Index: record.php =================================================================== RCS file: /cvsroot/i-man/i-man/record.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- record.php 14 Oct 2005 19:06:37 -0000 1.14 +++ record.php 14 Oct 2005 21:49:13 -0000 1.15 @@ -133,7 +133,7 @@ } // save a record as text -if ( (!empty($_POST['dbaction'])) && ($_GET['dbaction'] == 'saveas') ) { +if ( (!empty($_GET['dbaction'])) && ($_GET['dbaction'] == 'saveas') ) { $record = new Record; $record->id = $_GET['id']; $record->get(); @@ -146,7 +146,7 @@ } // hide a record -if ( (!empty($_POST['dbaction'])) && ($_GET['dbaction'] == 'hide') ) { +if ( (!empty($_GET['dbaction'])) && ($_GET['dbaction'] == 'hide') ) { if (!$logged_user->is_record_hider()) { header("Location: index.php"); exit(); @@ -161,7 +161,7 @@ } // unhide a record -if ( (!empty($_POST['dbaction'])) && ($_GET['dbaction'] == 'unhide') ) { +if ( (!empty($_GET['dbaction'])) && ($_GET['dbaction'] == 'unhide') ) { if (!$logged_user->is_record_hider()) { header("Location: index.php"); exit(); |
From: Yves G. <yg...@us...> - 2005-10-14 19:06:45
|
Update of /cvsroot/i-man/i-man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24026 Modified Files: record.php Log Message: Fixed a bug that prevented you from deleting a record (Was introduced by the changes that aimed at reducing the php-notices) Index: record.php =================================================================== RCS file: /cvsroot/i-man/i-man/record.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- record.php 26 Jul 2005 22:08:51 -0000 1.13 +++ record.php 14 Oct 2005 19:06:37 -0000 1.14 @@ -99,7 +99,7 @@ } // delete a record -if ( (!empty($_POST['dbaction'])) && ($_GET['dbaction'] == 'delete') ) { +if ( (!empty($_GET['dbaction'])) && ($_GET['dbaction'] == 'delete') ) { if (!$logged_user->is_record_remover()) { header("Location: index.php"); exit(); @@ -118,7 +118,7 @@ } // delete thet attachment of a record -if ( (!empty($_POST['dbaction'])) && ($_GET['dbaction'] == 'deleteattachment') ) { +if ( (!empty($_GET['dbaction'])) && ($_GET['dbaction'] == 'deleteattachment') ) { if (!$logged_user->is_record_remover()) { header("Location: index.php"); exit(); |
From: Yves G. <yg...@us...> - 2005-10-14 19:02:04
|
Update of /cvsroot/i-man/i-man/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23031 Added Files: mysqli.php Log Message: Initial php-mysqli support (available since php5 and mysql 4.1) --- NEW FILE: mysqli.php --- <?php /* This file is part of "I-Man - Information and Contact Manager". Project website: http://i-man.sourceforge.net I-Man 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. I-Man 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 which is available in the file copying.txt or under http://www.gnu.org/licenses/ for more details. */ // setup the database connection here $db = new Db; $db->server = 'localhost'; $db->database = 'i-man'; $db->dbuser = 'iman'; $db->dbpass = 'iman'; $db->dbh = mysqli_connect($db->server,$db->dbuser,$db->dbpass,$db->database) or die("<br>Could not connect to server '$db->server'"); $db->dbtype = 'mysqli'; class Db extends Db_base { function db_query($query) { $sth = mysqli_query($this->dbh,$query); //print mysqli_error(); return $sth; } function db_num_fields($sth) { return mysqli_num_fields($sth); } function db_escape_string($string) { return mysqli_escape_string($this->dbh,$string); } function db_fetch_row($sth) { return mysqli_fetch_row($sth); } function db_last_insert_rowid() { return mysqli_insert_id($this->dbh); } function db_free_result($sth) { return mysqli_free_result($sth); } function db_error() { return mysqli_error($this->dbh); } } class Record extends Record_base { } class Category extends Category_base { } class Attachment extends Attachment_base { } class IMan extends IMan_base { } class User extends User_base { } ?> |
From: Yves G. <yg...@us...> - 2005-10-14 18:57:18
|
Update of /cvsroot/i-man/i-man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21983 Modified Files: config.php top.php settings.php user_form.php users.php javascript.php changelog.txt Log Message: - make it run even when short_tags are disabled - update changelog Index: user_form.php =================================================================== RCS file: /cvsroot/i-man/i-man/user_form.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- user_form.php 26 Jul 2005 22:08:51 -0000 1.12 +++ user_form.php 14 Oct 2005 18:57:10 -0000 1.13 @@ -170,69 +170,69 @@ ?> <tr> -<th><label for="username"><?=$t2306?></label></th> -<td colspan="2"><input name="username" id="username" type="text" size="50" maxlength="50" value="<?=$selected_user->username?>" /></td> +<th><label for="username"><?php print $t2306; ?></label></th> +<td colspan="2"><input name="username" id="username" type="text" size="50" maxlength="50" value="<?php print $selected_user->username; ?>" /></td> </tr> <tr> -<th><label for="realname"><?=$t2307?></label></th> -<td colspan="2"><input name="realname" id="realname" type="text" size="50" maxlength="50" value="<?=$selected_user->realname?>" /></td> +<th><label for="realname"><?php print $t2307; ?></label></th> +<td colspan="2"><input name="realname" id="realname" type="text" size="50" maxlength="50" value="<?php print $selected_user->realname; ?>" /></td> </tr> <tr> -<th><label for="email"><?=$t2308?></label></th> -<td colspan="2"><input name="email" id="email" type="text" size="50" maxlength="50" value="<?=$selected_user->email?>" /></td> +<th><label for="email"><?php print $t2308; ?></label></th> +<td colspan="2"><input name="email" id="email" type="text" size="50" maxlength="50" value="<?php print $selected_user->email; ?>" /></td> </tr> <tr id="gen_pw_checkbox"> -<th><label for="gen_pw2"><?=$t2309?></label></th> -<td colspan="2"><input name="gen_pw" id="gen_pw2" type="checkbox" <?=$flag_for_password?> onclick="toggle_random_pw();" /></td> +<th><label for="gen_pw2"><?php print $t2309; ?></label></th> +<td colspan="2"><input name="gen_pw" id="gen_pw2" type="checkbox" <?php print $flag_for_password; ?> onclick="toggle_random_pw();" /></td> </tr> -<tr id="pw1" style="<?=$style_for_password?>"> -<th><label for="password"><?=$t2311?></label></th> +<tr id="pw1" style="<?php print $style_for_password; ?>"> +<th><label for="password"><?php print $t2311; ?></label></th> <td colspan="2"><input name="password" id="password" type="password" size="50" maxlength="50" /></td> </tr> -<tr id="pw2" style="<?=$style_for_password?>"> -<th><label for="password_again"><?=$t2312?></label></th> +<tr id="pw2" style="<?php print $style_for_password; ?>"> +<th><label for="password_again"><?php print $t2312; ?></label></th> <td colspan="2"><input name="password_again" id="password_again" type="password" size="50" maxlength="50" /></td> </tr> <tr> -<th><label for="bit1"><?=$t2313?></label></th> -<td colspan="2"><input name="bit1" id="bit1" type="checkbox" <?php print ($selected_user->is_active()) ? "checked=\"checked\" " : ""?> /></td> +<th><label for="bit1"><?php print $t2313; ?></label></th> +<td colspan="2"><input name="bit1" id="bit1" type="checkbox" <?php print ($selected_user->is_active()) ? "checked=\"checked\" " : ""; ?> /></td> </tr> <tr> -<th><label for="bit2"><?=$t2314?></label></th> -<td colspan="2"><input name="bit2" id="bit2" type="checkbox" <?php print ($selected_user->is_record_creator()) ? "checked=\"checked\" " : ""?> /></td> +<th><label for="bit2"><?php print $t2314; ?></label></th> +<td colspan="2"><input name="bit2" id="bit2" type="checkbox" <?php print ($selected_user->is_record_creator()) ? "checked=\"checked\" " : ""; ?> /></td> </tr> <tr> -<th><label for="bit3"><?=$t2315?></label></th> -<td colspan="2"><input name="bit3" id="bit3" type="checkbox" <?php print ($selected_user->is_record_editor()) ? "checked=\"checked\" " : ""?> /></td> +<th><label for="bit3"><?php print $t2315; ?></label></th> +<td colspan="2"><input name="bit3" id="bit3" type="checkbox" <?php print ($selected_user->is_record_editor()) ? "checked=\"checked\" " : ""; ?> /></td> </tr> <tr> -<th><label for="bit4"><?=$t2316?></label></th> -<td colspan="2"><input name="bit4" id="bit4" type="checkbox" <?php print ($selected_user->is_record_hider()) ? "checked=\"checked\" " : ""?> /></td> +<th><label for="bit4"><?php print $t2316; ?></label></th> +<td colspan="2"><input name="bit4" id="bit4" type="checkbox" <?php print ($selected_user->is_record_hider()) ? "checked=\"checked\" " : ""; ?> /></td> </tr> <tr> -<th><label for="bit5"><?=$t2317?></label></th> -<td colspan="2"><input name="bit5" id="bit5" type="checkbox" <?php print ($selected_user->is_record_remover()) ? "checked=\"checked\" " : ""?> /></td> +<th><label for="bit5"><?php print $t2317; ?></label></th> +<td colspan="2"><input name="bit5" id="bit5" type="checkbox" <?php print ($selected_user->is_record_remover()) ? "checked=\"checked\" " : ""; ?> /></td> </tr> <tr> -<th><label for="bit6"><?=$t2318?></label></th> -<td colspan="2"><input name="bit6" id="bit6" type="checkbox" <?php print ($selected_user->is_category_creator()) ? "checked=\"checked\" " : ""?> /></td> +<th><label for="bit6"><?php print $t2318; ?></label></th> +<td colspan="2"><input name="bit6" id="bit6" type="checkbox" <?php print ($selected_user->is_category_creator()) ? "checked=\"checked\" " : ""; ?> /></td> </tr> <tr> -<th><label for="bit7"><?=$t2319?></label></th> -<td colspan="2"><input name="bit7" id="bit7" type="checkbox" <?php print ($selected_user->is_category_editor()) ? "checked=\"checked\" " : ""?> /></td> +<th><label for="bit7"><?php print $t2319; ?></label></th> +<td colspan="2"><input name="bit7" id="bit7" type="checkbox" <?php print ($selected_user->is_category_editor()) ? "checked=\"checked\" " : ""; ?> /></td> </tr> <tr> -<th><label for="bit8"><?=$t2320?></label></th> -<td colspan="2"><input name="bit8" id="bit8" type="checkbox" <?php print ($selected_user->is_category_remover()) ? "checked=\"checked\" " : ""?> /></td> +<th><label for="bit8"><?php print $t2320; ?></label></th> +<td colspan="2"><input name="bit8" id="bit8" type="checkbox" <?php print ($selected_user->is_category_remover()) ? "checked=\"checked\" " : ""; ?> /></td> </tr> <tr> -<th><label for="bit9"><?=$t2321?></label></th> -<td colspan="2"><input name="bit9" id="bit9" type="checkbox" <?php print ($selected_user->is_admin()) ? "checked=\"checked\" " : ""?> /></td> +<th><label for="bit9"><?php print $t2321; ?></label></th> +<td colspan="2"><input name="bit9" id="bit9" type="checkbox" <?php print ($selected_user->is_admin()) ? "checked=\"checked\" " : ""; ?> /></td> </tr> <tr> <th> </th> -<td><input type="submit" value="<?=$t2304?>" name="submit" onclick="return Confirm_Save_User();" /></td> -<td><input type="button" value="<?=$t2305?>" onclick="history.back();" /></td> +<td><input type="submit" value="<?php print $t2304; ?>" name="submit" onclick="return Confirm_Save_User();" /></td> +<td><input type="button" value="<?php print $t2305; ?>" onclick="history.back();" /></td> </tr> </table> </form> Index: changelog.txt =================================================================== RCS file: /cvsroot/i-man/i-man/changelog.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- changelog.txt 26 Jul 2005 22:08:51 -0000 1.10 +++ changelog.txt 14 Oct 2005 18:57:10 -0000 1.11 @@ -2,10 +2,12 @@ ----------- -1.0.1 (xx.06.2005) +1.0.1 (xx.xx.2005) ------------------- Added a missing label in news.php Fixed default user account in SQLite (password was not "admin" and thus you could never log in...) +Made it run without short tags (<?=) +Added mysqli support 1.0 (31.05.2005) @@ -16,7 +18,7 @@ Added Portuguese_BR translation (Thank you Henrique Meira). Added Portuguese_PT translation (Thank you Paulo Costa). Changed the way links look in the content area, they now use the same font as the content and integrate better. -Really prevent category 0 to be deleted. +Really prevent category 0 from being deleted. Fixed a bug in search.php: The timestamp of the shown results was not decoded but shown as timestamp Fixed a bug in interbase.php: Hide/unhide did not seem to work. (no other db affected) Fixed a bug that, in singlemode only, after inserting a record to a different than the current category, it was displayed but Index: users.php =================================================================== RCS file: /cvsroot/i-man/i-man/users.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- users.php 26 Jul 2005 22:08:51 -0000 1.11 +++ users.php 14 Oct 2005 18:57:10 -0000 1.12 @@ -115,7 +115,6 @@ print "</table>\n"; print "<br /><br />\n"; -EOT; IMAN_write_links_short(); ?> Index: config.php =================================================================== RCS file: /cvsroot/i-man/i-man/config.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- config.php 26 Jul 2005 22:08:51 -0000 1.15 +++ config.php 14 Oct 2005 18:57:10 -0000 1.16 @@ -19,7 +19,8 @@ // the database options are defined in the respective file in the db/ subdir //require_once('db/interbase.php'); //require_once('db/mysql.php'); -require_once('db/sqlite.php'); +require_once('db/mysqli.php'); +//require_once('db/sqlite.php'); //require_once('db/postgresql.php'); //require_once('db/pdo_sqlite3.php'); Index: settings.php =================================================================== RCS file: /cvsroot/i-man/i-man/settings.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- settings.php 5 May 2005 21:19:29 -0000 1.9 +++ settings.php 14 Oct 2005 18:57:10 -0000 1.10 @@ -100,11 +100,11 @@ print "</table>\n</form>\n"; ?> -<h1><?=$t1307?></h1> -<div class="saveas"><img src="images/filesave.gif" border="0" alt="<?=$t205?>" title="<?=$t205?>" /></div> -<div class="print"><img src="images/fileprint.gif" border="0" alt="<?=$t204?>" title="<?=$t204?>" /></div> -<div class="delete"><img src="images/editdelete.gif" border="0" alt="<?=$t203?>" title="<?=$t203?>" /></div> -<div class="edit"><img src="images/edit.gif" border="0" alt="<?=$t202?>" title="<?=$t202?>" /></div> +<h1><?php print $t1307; ?></h1> +<div class="saveas"><img src="images/filesave.gif" border="0" alt="<?php print $t205; ?>" title="<?php print $t205; ?>" /></div> +<div class="print"><img src="images/fileprint.gif" border="0" alt="<?php print $t204; ?>" title="<?php print $t204; ?>" /></div> +<div class="delete"><img src="images/editdelete.gif" border="0" alt="<?php print $t203; ?>" title="<?php print $t203; ?>" /></div> +<div class="edit"><img src="images/edit.gif" border="0" alt="<?php print $t202; ?>" title="<?php print $t202; ?>" /></div> <a name="none"></a> <div class="title">abcdefghijklmnopqrstuvwxyz</div> <div class="content"><pre> @@ -122,7 +122,7 @@ <span class="catcomment">abcdefghijklmnopqrstuvwxyz</span> <form action="record.php" method="get" target="_top"> <input type="hidden" name="id" value="$record->id" /> -<?=$t206?>:<input type="checkbox" name="hide" value="1" checked="checked" disabled="disabled" /> +<?php print $t206; ?>:<input type="checkbox" name="hide" value="1" checked="checked" disabled="disabled" /> </form> </div> Index: top.php =================================================================== RCS file: /cvsroot/i-man/i-man/top.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- top.php 26 Jul 2005 22:08:51 -0000 1.11 +++ top.php 14 Oct 2005 18:57:10 -0000 1.12 @@ -127,7 +127,7 @@ </td> <td class="top" nowrap="nowrap"> <form method="get" name="search" action="search.php"> -<label><?=$t109?><input type="text" name="q" size="20" maxlength="50" /></label> +<label><?php print $t109; ?><input type="text" name="q" size="20" maxlength="50" /></label> </form> </td> </tr> Index: javascript.php =================================================================== RCS file: /cvsroot/i-man/i-man/javascript.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- javascript.php 11 Apr 2005 21:42:46 -0000 1.7 +++ javascript.php 14 Oct 2005 18:57:10 -0000 1.8 @@ -18,22 +18,22 @@ ?> function Confirm_Record(what) { - var Check = confirm("<?=$t1501?>'"+what+"' ?"); + var Check = confirm("<?php print $t1501; ?>'"+what+"' ?"); return Check; } function Confirm_Category(what) { - var Check = confirm("<?=$t1502?>'"+what+"' ? <?=$t1503?>"); + var Check = confirm("<?php print $t1502; ?>'"+what+"' ? <?php print $t1503; ?>"); return Check; } function Confirm_Attachment(what) { - var Check = confirm("<?=$t1504?>'"+what+"' ?"); + var Check = confirm("<?php print $t1504; ?>'"+what+"' ?"); return Check; } function Confirm_User(what) { - var Check = confirm("<?=$t1505?>'"+what+"' ?"); + var Check = confirm("<?php print $t1505; ?>'"+what+"' ?"); return Check; } |
From: Yves G. <yg...@us...> - 2005-07-26 22:09:17
|
Update of /cvsroot/i-man/i-man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25478 Modified Files: bottom.php categories.php category_form.php changelog.txt config.php include.php record.php todo.txt top.php user_form.php user_update_pw.php users.php Log Message: some efforts to make I-Man run *without* notices about undefined variables. Set error_reporting(E_ALL) in include.php to test, or set it by php.ini Index: user_form.php =================================================================== RCS file: /cvsroot/i-man/i-man/user_form.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- user_form.php 31 May 2005 15:55:12 -0000 1.11 +++ user_form.php 26 Jul 2005 22:08:51 -0000 1.12 @@ -38,7 +38,7 @@ if ($_POST['bit9'] != NULL) $selected_user->permissions .= '1'; else $selected_user->permissions .= '0'; // can administer users $selected_user->permissions .= '000000000000000'; // fill up to have 24 characters, with the unused from 10-24 set to 0 - if ( ($_POST['password'] != $_POST['password_again']) && ($_POST['gen_pw'] == NULL) ) { + if ( ($_POST['password'] != $_POST['password_again']) && (empty($_POST['gen_pw'])) ) { $_SESSION['user'] = $selected_user; $_SESSION['gen_pw'] = 0; @@ -51,7 +51,7 @@ } } -if ($_POST['dbaction'] == 'insert') { +if ( (!empty($_POST['dbaction'])) && ($_POST['dbaction'] == 'insert') ) { if ($_POST['gen_pw'] != NULL) { $selected_userpw = $selected_user->gen_random_pw(); $selected_user->password = md5($selected_userpw); @@ -66,7 +66,7 @@ } // update a record -if ($_POST['dbaction'] == 'update') { +if ( (!empty($_POST['dbaction'])) && ($_POST['dbaction'] == 'update') ) { if (!$logged_user->is_admin()) { header("Location: index.php"); exit(); @@ -88,7 +88,7 @@ } // get a record for editing -if ($_GET['id'] != '') { +if (!empty($_GET['id'])) { // we edit a record if (!$logged_user->is_admin()) { header("Location: index.php"); @@ -121,7 +121,7 @@ $text = $t2302; } -if ($_SESSION['gen_pw'] === 0) { +if (empty($_SESSION['gen_pw'])) { $flag_for_password = ''; $style_for_password = ''; } @@ -238,7 +238,8 @@ </form> <?php -if ($_GET['msg'] != NULL) { + +if (!empty($_GET['msg'])) { print "<br />".$update_pw_messages[$_GET['msg']]; } Index: todo.txt =================================================================== RCS file: /cvsroot/i-man/i-man/todo.txt,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- todo.txt 31 May 2005 15:54:28 -0000 1.14 +++ todo.txt 26 Jul 2005 22:08:51 -0000 1.15 @@ -24,3 +24,14 @@ To do that, add a column to iman_content that indicates the record's version number (simple integer) Add a button "Show history of this record" that gives a special page that shows all the revisions. - write some javascript to prevent invalid users to be created +- If an attachment is an image, create and show a thumbnail of it (see drupal code) + + + + + +Fixes to make: + +settings.php: label missing for "show hidden" button + +29 rue de la Fontaine Index: users.php =================================================================== RCS file: /cvsroot/i-man/i-man/users.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- users.php 5 May 2005 19:25:25 -0000 1.10 +++ users.php 26 Jul 2005 22:08:51 -0000 1.11 @@ -21,7 +21,7 @@ exit(); } -if ($_GET['dbaction'] == 'delete') { +if ( (!empty($_GET['dbaction'])) && ($_GET['dbaction'] == 'delete') ) { $logged_user = new User; $logged_user->id = $_GET['id']; if ($logged_user->id != '1') $logged_user->delete(); Index: changelog.txt =================================================================== RCS file: /cvsroot/i-man/i-man/changelog.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- changelog.txt 13 Jun 2005 08:18:07 -0000 1.9 +++ changelog.txt 26 Jul 2005 22:08:51 -0000 1.10 @@ -2,6 +2,12 @@ ----------- +1.0.1 (xx.06.2005) +------------------- +Added a missing label in news.php +Fixed default user account in SQLite (password was not "admin" and thus you could never log in...) + + 1.0 (31.05.2005) ----------------- Implemented a login-system. You need to be logged now to modify records and categories. Index: category_form.php =================================================================== RCS file: /cvsroot/i-man/i-man/category_form.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- category_form.php 5 May 2005 21:19:29 -0000 1.6 +++ category_form.php 26 Jul 2005 22:08:51 -0000 1.7 @@ -27,7 +27,7 @@ $category->description = $_POST['description']; } -if ($_POST['dbaction'] == 'insert') { +if ( (!empty($_POST['dbaction'])) && ($_POST['dbaction'] == 'insert') ) { if (!$logged_user->is_category_creator()) { header("Location: categories.php"); exit(); @@ -37,7 +37,7 @@ exit(); } -if ($_POST['dbaction'] == 'update') { +if ( (!empty($_POST['dbaction'])) && ($_POST['dbaction'] == 'update') ) { if (!$logged_user->is_category_editor()) { header("Location: categories.php"); exit(); Index: record.php =================================================================== RCS file: /cvsroot/i-man/i-man/record.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- record.php 31 May 2005 15:55:12 -0000 1.12 +++ record.php 26 Jul 2005 22:08:51 -0000 1.13 @@ -18,7 +18,7 @@ // insert a record -if ($_POST['dbaction'] == 'insert') { +if ( (!empty($_POST['dbaction'])) && ($_POST['dbaction'] == 'insert') ) { if (!$logged_user->is_record_creator()) { header("Location: index.php"); exit(); @@ -58,7 +58,7 @@ } // update a record -if ($_POST['dbaction'] == 'update') { +if ( (!empty($_POST['dbaction'])) && ($_POST['dbaction'] == 'update') ) { if (!$logged_user->is_record_editor()) { header("Location: index.php"); exit(); @@ -99,7 +99,7 @@ } // delete a record -if ($_GET['dbaction'] == 'delete') { +if ( (!empty($_POST['dbaction'])) && ($_GET['dbaction'] == 'delete') ) { if (!$logged_user->is_record_remover()) { header("Location: index.php"); exit(); @@ -118,7 +118,7 @@ } // delete thet attachment of a record -if ($_GET['dbaction'] == 'deleteattachment') { +if ( (!empty($_POST['dbaction'])) && ($_GET['dbaction'] == 'deleteattachment') ) { if (!$logged_user->is_record_remover()) { header("Location: index.php"); exit(); @@ -133,7 +133,7 @@ } // save a record as text -if ($_GET['dbaction'] == 'saveas') { +if ( (!empty($_POST['dbaction'])) && ($_GET['dbaction'] == 'saveas') ) { $record = new Record; $record->id = $_GET['id']; $record->get(); @@ -146,7 +146,7 @@ } // hide a record -if ($_GET['dbaction'] == 'hide') { +if ( (!empty($_POST['dbaction'])) && ($_GET['dbaction'] == 'hide') ) { if (!$logged_user->is_record_hider()) { header("Location: index.php"); exit(); @@ -161,7 +161,7 @@ } // unhide a record -if ($_GET['dbaction'] == 'unhide') { +if ( (!empty($_POST['dbaction'])) && ($_GET['dbaction'] == 'unhide') ) { if (!$logged_user->is_record_hider()) { header("Location: index.php"); exit(); @@ -176,7 +176,7 @@ } // get a record for editing -if ($_GET['formaction'] == 'edit') { +if ( (!empty($_GET['formaction'])) && ($_GET['formaction'] == 'edit') ) { // we edit a record if (!$logged_user->is_record_editor()) { header("Location: index.php"); @@ -205,6 +205,7 @@ $onload = ' onload="document.edit.title.focus();"'; } +$id = (empty($_GET['id'])) ? NULL : $_GET['id']; echo <<<EOT <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> @@ -222,7 +223,7 @@ <h1 style="margin-top:0;">${'t'.$tp.'02'}</h1> <form name="edit" enctype="multipart/form-data" method="post" action="{$_SERVER['PHP_SELF']}" target="_top"> -<input type="hidden" name="id" value="{$_GET['id']}" /> +<input type="hidden" name="id" value="$id" /> <input type="hidden" name="dbaction" value="$dbaction" /> <input type="hidden" name="MAX_FILE_SIZE" value="$max_attach_size" /> <table border="0" cellspacing="1" cellpadding="1"> Index: include.php =================================================================== RCS file: /cvsroot/i-man/i-man/include.php,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- include.php 19 Jun 2005 19:05:32 -0000 1.28 +++ include.php 26 Jul 2005 22:08:51 -0000 1.29 @@ -15,6 +15,7 @@ or under http://www.gnu.org/licenses/ for more details. */ +error_reporting(E_ALL); // Edit config.php to set up I-Man! No more settings are done in this file! define("IMAN_VERSION","1.0.0"); @@ -228,6 +229,7 @@ function get_resultset($query) { global $encoding; + $result = NULL; $sth = $this->db_query($query); $num_fields = $this->db_num_fields($sth); $i = 0; Index: categories.php =================================================================== RCS file: /cvsroot/i-man/i-man/categories.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- categories.php 5 May 2005 19:25:25 -0000 1.10 +++ categories.php 26 Jul 2005 22:08:50 -0000 1.11 @@ -21,7 +21,7 @@ exit(); } -if ($_POST['action'] == 'insert') { +if ( (!empty($_POST['action'])) && ($_POST['action'] == 'insert') ) { if (!$logged_user->is_category_creator()) { header("Location: index.php"); exit(); @@ -34,7 +34,7 @@ exit(); } -if ($_GET['dbaction'] == 'delete') { +if ( (!empty($_GET['dbaction'])) && ($_GET['dbaction'] == 'delete') ) { if (!$logged_user->is_category_remover()) { header("Location: index.php"); exit(); Index: config.php =================================================================== RCS file: /cvsroot/i-man/i-man/config.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- config.php 31 May 2005 20:22:05 -0000 1.14 +++ config.php 26 Jul 2005 22:08:51 -0000 1.15 @@ -18,9 +18,10 @@ // choose database backend, currently 'interbase.php', 'mysql.php', 'sqlite.php' or 'postgresql.php' // the database options are defined in the respective file in the db/ subdir //require_once('db/interbase.php'); -require_once('db/mysql.php'); -//require_once('db/sqlite.php'); +//require_once('db/mysql.php'); +require_once('db/sqlite.php'); //require_once('db/postgresql.php'); +//require_once('db/pdo_sqlite3.php'); // notify somebody using the specified email-address when a record gets added, modified or deleted. $notify = 0; Index: top.php =================================================================== RCS file: /cvsroot/i-man/i-man/top.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- top.php 5 May 2005 21:28:47 -0000 1.10 +++ top.php 26 Jul 2005 22:08:51 -0000 1.11 @@ -100,6 +100,10 @@ } print "</select></label>\n</form>\n</td>\n"; + +$checked1 = NULL; +$checked2 = NULL; + ?> </tr> <tr> Index: user_update_pw.php =================================================================== RCS file: /cvsroot/i-man/i-man/user_update_pw.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- user_update_pw.php 31 May 2005 10:04:24 -0000 1.13 +++ user_update_pw.php 26 Jul 2005 22:08:51 -0000 1.14 @@ -49,7 +49,9 @@ IMAN_print_infobox(); IMAN_write_links_short(); -if ($_GET['msg'] == 6) { +$style = NULL; + +if ( (!empty($_GET['msg'])) && ($_GET['msg'] == 6) ) { $style = ' disabled="disabled"'; } @@ -79,7 +81,7 @@ EOT; -if ($_GET['msg'] != NULL) { +if (!empty($_GET['msg'])) { print "<br />".$update_pw_messages[$_GET['msg']]; } Index: bottom.php =================================================================== RCS file: /cvsroot/i-man/i-man/bottom.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- bottom.php 5 May 2005 21:34:34 -0000 1.12 +++ bottom.php 26 Jul 2005 22:08:50 -0000 1.13 @@ -59,7 +59,7 @@ } -if ($records) foreach($records as $record) { +if (!empty($records)) foreach($records as $record) { // don't remove this, it's needed for the JS function Confirm_Record(title); $escaped = str_replace("\"","'",$record->title); $escaped = str_replace("'","\'",$escaped); @@ -140,6 +140,8 @@ print "<span class=\"catcomment\">".$record->get_categoryname()."</span>\n"; } + $flag = NULL; + if (!$logged_user->is_record_hider()) $flag = "disabled=\"disabled\""; print "<form action=\"record.php\" method=\"get\" target=\"_top\">\n"; |
From: Yves G. <yg...@us...> - 2005-07-26 22:09:15
|
Update of /cvsroot/i-man/i-man/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25478/db Modified Files: pdo.php Log Message: some efforts to make I-Man run *without* notices about undefined variables. Set error_reporting(E_ALL) in include.php to test, or set it by php.ini Index: pdo.php =================================================================== RCS file: /cvsroot/i-man/i-man/db/pdo.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- pdo.php 20 Jul 2005 18:23:25 -0000 1.2 +++ pdo.php 26 Jul 2005 22:08:51 -0000 1.3 @@ -21,6 +21,10 @@ $db->dbuser = 'iman'; $db->dbpass = 'iman'; $db->dbh = new PDO("firebird:dbname=$db->database",$db->dbuser,$db->dbpass) or die("<br>Could not connect to database '$db->database'"); +//$db->dbh = new PDO("mysql:host=localhost;dbname=i-man",'iman','iman'); +//$db->dbh = new PDO("sqlite:/home/yves/projects/php/I-Man/i-man/exampledb/i-man.sqlite"); +//print_r($db->dbh->errorInfo()); + class Db extends Db_base { @@ -59,6 +63,45 @@ } class Record extends Record_base { + function get() { + global $db; + if ($this->id == '') { + // in case we must get the 1st record for the current category, happens only in singlemode + if ($_COOKIE['category'] != 0) { + $query = "select first 1 id,category,title,content,date_modified,host_modified,hidden,upper(title) from iman_content $db->where1 (category = 0 or category = $this->category) order by 8"; + } else { + $query = "select first 1 id,category,title,content,date_modified,host_modified,hidden,upper(title) from iman_content $db->where2 order by 8"; + } + } else { + $query = "select id,category,title,content,date_modified,host_modified,hidden from iman_content where id = $this->id"; + } + + $result = $db->get_resultset($query); + if ($result) foreach($result as $row) { + $this->id = $row[0]; + $this->category = $row[1]; + $this->title = $row[2]; + $this->content = $row[3]; + $this->date_modified = $row[4]; + $this->host_modified = $row[5]; + $this->hidden = $row[6]; + } + } + + function insert() { + global $db; + $this->title = $db->db_escape_string($this->title); + $this->content = $db->db_escape_string($this->content); + $db->db_query("insert into iman_content (title,content,date_modified,host_modified,category,hidden) values ('$this->title','$this->content','$this->date_modified','$this->host_modified',$this->category,0)"); + +// $last_id = $db->dbh->lastInsertId(); // does not work (yet) with firebird + $sth = $db->db_query("select max(id) from iman_content"); + while ($row = $db->db_fetch_row($sth)) { + $last_id = $row[0]; + } + $db->db_free_result($sth); + return $last_id; + } } class Category extends Category_base { |
From: Yves G. <yg...@us...> - 2005-07-26 22:09:09
|
Update of /cvsroot/i-man/i-man/exampledb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25478/exampledb Modified Files: i-man.sqlite Log Message: some efforts to make I-Man run *without* notices about undefined variables. Set error_reporting(E_ALL) in include.php to test, or set it by php.ini Index: i-man.sqlite =================================================================== RCS file: /cvsroot/i-man/i-man/exampledb/i-man.sqlite,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 Binary files /tmp/cvsOaQ7Ga and /tmp/cvsoKVxtC differ |
From: Yves G. <yg...@us...> - 2005-07-22 18:19:39
|
Update of /cvsroot/i-man/i-man/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv519 Modified Files: interbase.php Log Message: php5 and better have the ibase_gen_id function, not only php5 Index: interbase.php =================================================================== RCS file: /cvsroot/i-man/i-man/db/interbase.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- interbase.php 19 Jul 2005 20:52:00 -0000 1.6 +++ interbase.php 22 Jul 2005 18:19:13 -0000 1.7 @@ -116,7 +116,7 @@ $this->content = $db->db_escape_string($this->content); $db->db_query("insert into iman_content (title,content,date_modified,host_modified,category,hidden) values ('$this->title','$this->content','$this->date_modified','$this->host_modified',$this->category,0)"); - if (substr(phpversion(),0,1) == '5') { + if (substr(phpversion(),0,1) >= '5') { // better, but php5-only $last_id = ibase_gen_id('gen_iman_address_id',0,$db->dbh); } else { |
From: Yves G. <yg...@us...> - 2005-07-20 18:23:37
|
Update of /cvsroot/i-man/i-man/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2343 Modified Files: pdo.php Log Message: slight cleanups. :'-( firebird over pdo does not support sql "limit" clause Index: pdo.php =================================================================== RCS file: /cvsroot/i-man/i-man/db/pdo.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- pdo.php 19 Jul 2005 21:59:56 -0000 1.1 +++ pdo.php 20 Jul 2005 18:23:25 -0000 1.2 @@ -17,28 +17,16 @@ // setup the database connection here $db = new Db; -$db->server = 'localhost'; -$db->database = 'i-man'; +$db->database='localhost:/var/lib/firebird/data/i-man.gdb'; $db->dbuser = 'iman'; $db->dbpass = 'iman'; - - - -//$db->dbh = new PDO("mysql:host=$db->server;dbname=$db->database", $db->dbuser, $db->dbpass); -//$db = new PDO("mysql:host=$db->server;dbname=$db->database", $db->dbuser, $db->dbpass); -//$db->dbtype = 'pdo.mysql'; - -$user = "SYSDBA"; -$password = "masterke"; -$test_base = "localhost:/var/lib/firebird2/data/i-man_es.gdb"; - -$db->dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die('Connection failed'); +$db->dbh = new PDO("firebird:dbname=$db->database",$db->dbuser,$db->dbpass) or die("<br>Could not connect to database '$db->database'"); class Db extends Db_base { function db_query($query) { $sth = $this->dbh->prepare($query); - //print $query; exit(); + //print $query; $sth->execute(); return $sth; } @@ -66,7 +54,7 @@ function db_error() { // return mysql_error($this->dbh); - return $this->dbh->errorCode(); + return print_r($this->dbh->errorInfo()); } } |
From: Yves G. <yg...@us...> - 2005-07-19 22:00:06
|
Update of /cvsroot/i-man/i-man/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1414 Added Files: pdo.php Log Message: First try to write a db-module for the upcoming PDO functions in php5.1 Tried with FB1.5.1 behind. Things that don't work right now: - Strings are misquoted with \ instead of ' - Listing of records in the main window fails sometimes in single mode... maybe due to the "limit" sql clause - Searching - Adding attachments --- NEW FILE: pdo.php --- <?php /* This file is part of "I-Man - Information and Contact Manager". I-Man 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. I-Man 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 which is available in the file copying.txt or under http://www.gnu.org/licenses/ for more details. */ // setup the database connection here $db = new Db; $db->server = 'localhost'; $db->database = 'i-man'; $db->dbuser = 'iman'; $db->dbpass = 'iman'; //$db->dbh = new PDO("mysql:host=$db->server;dbname=$db->database", $db->dbuser, $db->dbpass); //$db = new PDO("mysql:host=$db->server;dbname=$db->database", $db->dbuser, $db->dbpass); //$db->dbtype = 'pdo.mysql'; $user = "SYSDBA"; $password = "masterke"; $test_base = "localhost:/var/lib/firebird2/data/i-man_es.gdb"; $db->dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die('Connection failed'); class Db extends Db_base { function db_query($query) { $sth = $this->dbh->prepare($query); //print $query; exit(); $sth->execute(); return $sth; } function db_num_fields($sth) { return $sth->columnCount(); } function db_escape_string($string) { // return $this->dbh->quote($string); return str_replace("'","''",$string); // not ideal } function db_fetch_row($sth) { return $sth->fetch(PDO_FETCH_NUM); } function db_last_insert_rowid() { // return $this->dbh->lastInsertId(); } function db_free_result($sth) { // return mysql_free_result($sth); } function db_error() { // return mysql_error($this->dbh); return $this->dbh->errorCode(); } } class Record extends Record_base { } class Category extends Category_base { } class Attachment extends Attachment_base { } class IMan extends IMan_base { } class User extends User_base { } ?> |
From: Yves G. <yg...@us...> - 2005-07-19 20:52:14
|
Update of /cvsroot/i-man/i-man/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17635 Modified Files: interbase.php Log Message: Modify the way we get the last inserted ID, but only when we run under php version > 5 Index: interbase.php =================================================================== RCS file: /cvsroot/i-man/i-man/db/interbase.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- interbase.php 26 Apr 2005 21:24:50 -0000 1.5 +++ interbase.php 19 Jul 2005 20:52:00 -0000 1.6 @@ -116,15 +116,16 @@ $this->content = $db->db_escape_string($this->content); $db->db_query("insert into iman_content (title,content,date_modified,host_modified,category,hidden) values ('$this->title','$this->content','$this->date_modified','$this->host_modified',$this->category,0)"); - $sth = $db->db_query("select max(id) from iman_content"); - while ($row = $db->db_fetch_row($sth)) { - $last_id = $row[0]; + if (substr(phpversion(),0,1) == '5') { + // better, but php5-only + $last_id = ibase_gen_id('gen_iman_address_id',0,$db->dbh); + } else { + $sth = $db->db_query("select max(id) from iman_content"); + while ($row = $db->db_fetch_row($sth)) { + $last_id = $row[0]; + } + $db->db_free_result($sth); } - $db->db_free_result($sth); - - // better, but php5-only - // ibase_gen_id('gen_iman_address_id',0,$db->dbh); - return $last_id; } } |
From: Yves G. <yg...@us...> - 2005-06-19 19:15:43
|
Update of /cvsroot/i-man/i-man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10488 Modified Files: news.php Log Message: Remove what was not intended for now Index: news.php =================================================================== RCS file: /cvsroot/i-man/i-man/news.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- news.php 19 Jun 2005 19:03:32 -0000 1.7 +++ news.php 19 Jun 2005 19:15:34 -0000 1.8 @@ -69,7 +69,7 @@ print '<td><a href="jumpto.php?cat='.$row[3].'">'.$row[2]."</a></td>\n"; if ($row[5] == 1) print "<td>$t1408</td>\n"; if ( ($row[5] == 0) || ($row[5] == '') ) print "<td>$t1409</td>\n"; - print '<td>'.date($datefmt,$row[4])." by $row[7]</td>\n"; + print '<td>'.date($datefmt,$row[4])."</td>\n"; $size = strlen($row[6]); if ($size < 1024) { print '<td>'.$size." $t1410</td>\n"; |