renaming info in infolog

This commit is contained in:
Ralf Becker 2001-05-24 13:40:40 +00:00
parent 2cd598fb29
commit 03a7ff211e
13 changed files with 227 additions and 218 deletions

View File

@ -12,14 +12,14 @@
/* $Id$ */ /* $Id$ */
$phpgw_info["flags"]["currentapp"] = "info"; $phpgw_info['flags']['currentapp'] = 'infolog';
$phpgw_info["flags"]["enable_contacts_class"] = True; $phpgw_info['flags']['enable_contacts_class'] = True;
include("../header.inc.php"); include("../header.inc.php");
$phpgw->info = createobject('info.info'); $phpgw->infolog = createobject('infolog.infolog');
$t = new Template($phpgw_info["server"]["app_tpl"]); // $t->unknows = 'keep'; $t->debug = 1; $t = new Template($phpgw_info['server']['app_tpl']); // $t->unknows = 'keep'; $t->debug = 1;
$t->set_file(array("import" => "csv_import.tpl")); $t->set_file(array('import' => 'csv_import.tpl'));
$t->set_block('import','filename','filenamehandle'); $t->set_block('import','filename','filenamehandle');
$t->set_block('import','fheader','fheaderhandle'); $t->set_block('import','fheader','fheaderhandle');
$t->set_block('import','fields','fieldshandle'); $t->set_block('import','fields','fieldshandle');
@ -32,8 +32,8 @@
if ($action == 'download' && (!$fieldsep || !$csvfile || !($fp=fopen($csvfile,"r")))) { if ($action == 'download' && (!$fieldsep || !$csvfile || !($fp=fopen($csvfile,"r")))) {
$action = ''; $action = '';
} }
$t->set_var("action_url",$phpgw->link("/info/csv_import.php")); $t->set_var("action_url",$phpgw->link("/infolog/csv_import.php"));
$t->set_var( $phpgw->info->setStyleSheet( )); $t->set_var( $phpgw->infolog->setStyleSheet( ));
$t->set_var("lang_info_action",lang("Import CSV-File into Info Log")); $t->set_var("lang_info_action",lang("Import CSV-File into Info Log"));
$PSep = '||'; // Pattern-Separator, separats the pattern-replacement-pairs in trans $PSep = '||'; // Pattern-Separator, separats the pattern-replacement-pairs in trans
@ -307,7 +307,7 @@ function cat_id( $cats )
if (!isset($values['datecreated'])) $values['datecreated'] = $values['startdate']; if (!isset($values['datecreated'])) $values['datecreated'] = $values['startdate'];
if (!$debug) { if (!$debug) {
$phpgw->info->write($values); $phpgw->infolog->write($values);
} }
} }
$log .= "\t</tr>\n</table>\n"; $log .= "\t</tr>\n</table>\n";

View File

@ -3,7 +3,7 @@
* phpGroupWare - Info Log * * phpGroupWare - Info Log *
* http://www.phpgroupware.org * * http://www.phpgroupware.org *
* Written by Ralf Becker <RalfBecker@outdoor-training.de> * * Written by Ralf Becker <RalfBecker@outdoor-training.de> *
* based on todo written by Joseph Engo <jengo@phpgroupware.org> * * originaly based on todo written by Joseph Engo <jengo@phpgroupware.org> *
* -------------------------------------------- * * -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it * * 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 * * under the terms of the GNU General Public License as published by the *
@ -17,26 +17,26 @@
'noheader' => True, 'noheader' => True,
'nonavbar' => True, 'nonavbar' => True,
'nofooter' => True, 'nofooter' => True,
'currentapp' => 'info' 'currentapp' => 'infolog'
); );
include('../header.inc.php'); include('../header.inc.php');
if (! $info_id) { if (! $info_id) {
Header('Location: ' . $phpgw->link('/info/index.php',"&sort=$sort&order=$order&query=$query&start=$start" Header('Location: ' . $phpgw->link('/infolog/index.php',"&sort=$sort&order=$order&query=$query&start=$start"
. "&filter=$filter&cat_id=$cat_id")); . "&filter=$filter&cat_id=$cat_id"));
} }
$phpgw->info = createobject('info.info'); $phpgw->infolog = createobject('infolog.infolog');
if (! $phpgw->info->check_access($info_id,PHPGW_ACL_DELETE)) { if (! $phpgw->infolog->check_access($info_id,PHPGW_ACL_DELETE)) {
Header('Location: ' . $phpgw->link('/info/index.php',"&sort=$sort&order=$order&query=$query&start=$start" Header('Location: ' . $phpgw->link('/infolog/index.php',"&sort=$sort&order=$order&query=$query&start=$start"
. "&filter=$filter&cat_id$cat_id")); . "&filter=$filter&cat_id$cat_id"));
} }
if ($confirm) { if ($confirm) {
$phpgw->info->delete($info_id); $phpgw->infolog->delete($info_id);
Header('Location: ' . $phpgw->link('/info/index.php',"cd=16&sort=$sort&order=$order&query=$query&start=" Header('Location: ' . $phpgw->link('/infolog/index.php',"cd=16&sort=$sort&order=$order&query=$query&start="
. "$start&filter=$filter&cat_id=$cat_id")); . "$start&filter=$filter&cat_id=$cat_id"));
} else { } else {
$phpgw->common->phpgw_header(); $phpgw->common->phpgw_header();
@ -51,21 +51,21 @@
$phpgw->template = new Template($phpgw->common->get_tpl_dir('info')); $phpgw->template = new Template($phpgw->common->get_tpl_dir('info'));
$phpgw->template->set_file(array( 'info_delete' => 'delete.tpl' )); $phpgw->template->set_file(array( 'info_delete' => 'delete.tpl' ));
$phpgw->template->set_var( $phpgw->info->setStyleSheet( )); $phpgw->template->set_var( $phpgw->infolog->setStyleSheet( ));
$phpgw->template->set_var( $phpgw->info->infoHeaders( )); $phpgw->template->set_var( $phpgw->infolog->infoHeaders( ));
$phpgw->template->set_var( $phpgw->info->formatInfo( $info_id )); $phpgw->template->set_var( $phpgw->infolog->formatInfo( $info_id ));
$phpgw->template->set_var('lang_info_action',lang('Info Log - Delete')); $phpgw->template->set_var('lang_info_action',lang('Info Log - Delete'));
$phpgw->template->set_var('deleteheader',lang('Are you sure you want to delete this entry')); $phpgw->template->set_var('deleteheader',lang('Are you sure you want to delete this entry'));
$nolinkf = $phpgw->link('/info/index.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter"); $nolinkf = $phpgw->link('/infolog/index.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter");
$nolink = '<a href="' . $nolinkf . '">' . lang('No') .'</a>'; $nolink = '<a href="' . $nolinkf . '">' . lang('No') .'</a>';
$phpgw->template->set_var('nolink',$nolink); $phpgw->template->set_var('nolink',$nolink);
$phpgw->template->set_var('cancel_action',$nolinkf); $phpgw->template->set_var('cancel_action',$nolinkf);
$phpgw->template->set_var('lang_cancel',lang('No - Cancel')); $phpgw->template->set_var('lang_cancel',lang('No - Cancel'));
$yeslinkf = $phpgw->link('/info/delete.php',"info_id=$info_id&confirm=True&sort=" $yeslinkf = $phpgw->link('/infolog/delete.php',"info_id=$info_id&confirm=True&sort="
. "$sort&order=$order&query=$query&start=$start&filter=$filter"); . "$sort&order=$order&query=$query&start=$start&filter=$filter");
$yeslink = '<a href="' . $yeslinkf . '">' . lang('Yes') . '</a>'; $yeslink = '<a href="' . $yeslinkf . '">' . lang('Yes') . '</a>';

View File

@ -1,8 +1,8 @@
# $Id$ # $Id$
#DROP TABLE info; #DROP TABLE infolog;
CREATE TABLE info ( CREATE TABLE infolog (
info_id int(11) unsigned PRIMARY KEY NOT NULL auto_increment, info_id int(11) unsigned PRIMARY KEY NOT NULL auto_increment,
info_type enum('task','phone','note','confirm','reject','email','fax') NOT NULL, # type of entry info_type enum('task','phone','note','confirm','reject','email','fax') NOT NULL, # type of entry
info_addr_id int(11) DEFAULT '0' NOT NULL, # concerning address: e.g. call from or to (if applicable or 0) info_addr_id int(11) DEFAULT '0' NOT NULL, # concerning address: e.g. call from or to (if applicable or 0)
@ -28,26 +28,26 @@ CREATE TABLE info (
# some test data: # some test data:
# phone-calls # phone-calls
INSERT INTO info (info_type,info_addr_id,info_from,info_addr,info_subject,info_des,info_owner,info_responsible,info_access,info_pri,info_status) VALUES INSERT INTO infolog (info_type,info_addr_id,info_from,info_addr,info_subject,info_des,info_owner,info_responsible,info_access,info_pri,info_status) VALUES
('phone',0,'Hugo X.','+49 (631) 12345','Was steht an','...',599440,599441,'public','urgent','call'), ('phone',0,'Hugo X.','+49 (631) 12345','Was steht an','...',599440,599441,'public','urgent','call'),
('phone',1,'','','Besprechungstermin','Wann treffen wir uns wegen',599441,599440,'public','normal','call'); ('phone',1,'','','Besprechungstermin','Wann treffen wir uns wegen',599441,599440,'public','normal','call');
# notes # notes
INSERT INTO info (info_type,info_addr_id,info_from,info_subject,info_des,info_owner) VALUES INSERT INTO infolog (info_type,info_addr_id,info_from,info_subject,info_des,info_owner) VALUES
('note',0,'Hugo X.','Wie geht das','so und so',599440), ('note',0,'Hugo X.','Wie geht das','so und so',599440),
('note',1,'','zusätzliche Daten','1. + 2. + 3.',599441); ('note',1,'','zusätzliche Daten','1. + 2. + 3.',599441);
# tasks # tasks
INSERT INTO info (info_type,info_addr_id,info_from,info_subject,info_des,info_owner,info_responsible,info_access,info_pri,info_status,info_confirm) VALUES INSERT INTO infolog (info_type,info_addr_id,info_from,info_subject,info_des,info_owner,info_responsible,info_access,info_pri,info_status,info_confirm) VALUES
('task',0,'','Bauauftrag','wir brauche 10 Mohawks',599440,0,'public','low','offer','both'), ('task',0,'','Bauauftrag','wir brauche 10 Mohawks',599440,0,'public','low','offer','both'),
('task',2,'Ralf','Konzept vorlegen','Wann treffen wir uns wegen',599440,599441,'privat','high','ongoing','done'); ('task',2,'Ralf','Konzept vorlegen','Wann treffen wir uns wegen',599440,599441,'privat','high','ongoing','done');
# confirmation # confirmation
INSERT INTO info (info_type,info_id_parent,info_subject,info_des,info_owner,info_status,info_time) VALUES INSERT INTO infolog (info_type,info_id_parent,info_subject,info_des,info_owner,info_status,info_time) VALUES
('confirm',6,'war ne harte Nuß','blah blah blah',599441,'done',10); ('confirm',6,'war ne harte Nuß','blah blah blah',599441,'done',10);
# email # email
INSERT INTO info (info_type,info_addr_id,info_from,info_addr,info_subject,info_des,info_owner,info_responsible,info_access,info_pri) VALUES INSERT INTO infolog (info_type,info_addr_id,info_from,info_addr,info_subject,info_des,info_owner,info_responsible,info_access,info_pri) VALUES
('email',0,'Ralf Becker','RalfBecker@outdoor-training.de','Was steht an','...',599440,0,'public','normal'), ('email',0,'Ralf Becker','RalfBecker@outdoor-training.de','Was steht an','...',599440,0,'public','normal'),
('email',1,'Birgit Becker','BirgitBecker@outdoor-training.de','Besprechungstermin','Wann treffen wir uns wegen',599441,599440,'public','urgent'); ('email',1,'Birgit Becker','BirgitBecker@outdoor-training.de','Besprechungstermin','Wann treffen wir uns wegen',599441,599440,'public','urgent');

View File

@ -1,71 +1,71 @@
INSERT INTO lang VALUES ('info','common','de','InfoLog'); INSERT INTO lang VALUES ('infolog','common','de','InfoLog');
INSERT INTO lang VALUES ('urgency','info','de','Priorität'); INSERT INTO lang VALUES ('urgency','infolog','de','Priorität');
INSERT INTO lang VALUES ('sub','info','de','Teil-<br>projekte'); INSERT INTO lang VALUES ('sub','infolog','de','Teil-<br>projekte');
INSERT INTO lang VALUES ('add sub','info','de','neues Teilprojekt anlegen'); INSERT INTO lang VALUES ('add sub','infolog','de','neues Teilprojekt anlegen');
INSERT INTO lang VALUES ('view subs','info','de','Teilprojekte anzeigen'); INSERT INTO lang VALUES ('view subs','infolog','de','Teilprojekte anzeigen');
INSERT INTO lang VALUES ('type','info','de','Typ'); INSERT INTO lang VALUES ('type','infolog','de','Typ');
INSERT INTO lang VALUES ('urgent','info','de','Dringend'); INSERT INTO lang VALUES ('urgent','infolog','de','Dringend');
INSERT INTO lang VALUES ('confirm','info','de','Bestätigung'); INSERT INTO lang VALUES ('confirm','infolog','de','Bestätigung');
INSERT INTO lang VALUES ('not','info','de','keine'); INSERT INTO lang VALUES ('not','infolog','de','keine');
INSERT INTO lang VALUES ('done','info','de','erledigt'); INSERT INTO lang VALUES ('done','infolog','de','erledigt');
INSERT INTO lang VALUES ('accept','info','de','bei Annahme'); INSERT INTO lang VALUES ('accept','infolog','de','bei Annahme');
INSERT INTO lang VALUES ('both','info','de','Annahme+erledigt'); INSERT INTO lang VALUES ('both','infolog','de','Annahme+erledigt');
INSERT INTO lang VALUES ('offer','info','de','Angebot'); INSERT INTO lang VALUES ('offer','infolog','de','Angebot');
INSERT INTO lang VALUES ('ongoing','info','de','in Arbeit'); INSERT INTO lang VALUES ('ongoing','infolog','de','in Arbeit');
INSERT INTO lang VALUES ('call','info','de','anrufen'); INSERT INTO lang VALUES ('call','infolog','de','anrufen');
INSERT INTO lang VALUES ('will-call','info','de','ruft zurück'); INSERT INTO lang VALUES ('will-call','infolog','de','ruft zurück');
INSERT INTO lang VALUES ('billed','info','de','abgerechnet'); INSERT INTO lang VALUES ('billed','infolog','de','abgerechnet');
INSERT INTO lang VALUES ('finish','info','de','wenn erledigt'); INSERT INTO lang VALUES ('finish','infolog','de','wenn erledigt');
INSERT INTO lang VALUES ('from','info','de','Von'); INSERT INTO lang VALUES ('from','infolog','de','Von');
INSERT INTO lang VALUES ('phone/email','info','de','Telefon/Email'); INSERT INTO lang VALUES ('phone/email','infolog','de','Telefon/Email');
INSERT INTO lang VALUES ('note','info','de','Notiz'); INSERT INTO lang VALUES ('note','infolog','de','Notiz');
INSERT INTO lang VALUES ('fax','info','de','Fax'); INSERT INTO lang VALUES ('fax','infolog','de','Fax');
INSERT INTO lang VALUES ('task','info','de','Auftrag'); INSERT INTO lang VALUES ('task','infolog','de','Auftrag');
INSERT INTO lang VALUES ('phone','info','de','Anruf'); INSERT INTO lang VALUES ('phone','infolog','de','Anruf');
INSERT INTO lang VALUES ('reject','info','de','Absage'); INSERT INTO lang VALUES ('reject','infolog','de','Absage');
INSERT INTO lang VALUES ('not assigned','info','de','nicht zugewiesen'); INSERT INTO lang VALUES ('not assigned','infolog','de','nicht zugewiesen');
INSERT INTO lang VALUES ('responsible','info','de','Auftrag an'); INSERT INTO lang VALUES ('responsible','infolog','de','Auftrag an');
INSERT INTO lang VALUES ('duration','info','de','Dauer'); INSERT INTO lang VALUES ('duration','infolog','de','Dauer');
INSERT INTO lang VALUES ('days','info','de','Tage'); INSERT INTO lang VALUES ('days','infolog','de','Tage');
INSERT INTO lang VALUES ('today','info','de','Heute'); INSERT INTO lang VALUES ('today','infolog','de','Heute');
INSERT INTO lang VALUES ('startdate','info','de','Startdatum'); INSERT INTO lang VALUES ('startdate','infolog','de','Startdatum');
INSERT INTO lang VALUES ('enddate','info','de','Enddatum'); INSERT INTO lang VALUES ('enddate','infolog','de','Enddatum');
INSERT INTO lang VALUES ('info log - edit','info','de','Info Log - Bearbeiten'); INSERT INTO lang VALUES ('info log - edit','infolog','de','Info Log - Bearbeiten');
INSERT INTO lang VALUES ('info log','info','de','Info Log'); INSERT INTO lang VALUES ('info log','infolog','de','Info Log');
INSERT INTO lang VALUES ('info log - delete','info','de','Info Log - Löschen'); INSERT INTO lang VALUES ('info log - delete','infolog','de','Info Log - Löschen');
INSERT INTO lang VALUES ('are you sure you want to delete this entry','info','de','Sind Sie sicher, dass Sie diesen Eintrag löschen wollen?'); INSERT INTO lang VALUES ('are you sure you want to delete this entry','infolog','de','Sind Sie sicher, dass Sie diesen Eintrag löschen wollen?');
INSERT INTO lang VALUES ('phonecall','info','de','Telefonanruf'); INSERT INTO lang VALUES ('phonecall','infolog','de','Telefonanruf');
INSERT INTO lang VALUES ('no - cancel','info','de','Nein - Abbruch'); INSERT INTO lang VALUES ('no - cancel','infolog','de','Nein - Abbruch');
INSERT INTO lang VALUES ('yes - delete','info','de','Ja - Löschen'); INSERT INTO lang VALUES ('yes - delete','infolog','de','Ja - Löschen');
INSERT INTO lang VALUES ('info log - new','info','de','Info Log - Anlegen'); INSERT INTO lang VALUES ('info log - new','infolog','de','Info Log - Anlegen');
INSERT INTO lang VALUES ('info log - new subproject','info','de','Info Log - Anlegen Teilprojekt'); INSERT INTO lang VALUES ('info log - new subproject','infolog','de','Info Log - Anlegen Teilprojekt');
INSERT INTO lang VALUES ('re:','info','de','Re: '); INSERT INTO lang VALUES ('re:','infolog','de','Re: ');
INSERT INTO lang VALUES ('info log - subprojects from','info','de','Info Log - Teilprojekte von'); INSERT INTO lang VALUES ('info log - subprojects from','infolog','de','Info Log - Teilprojekte von');
INSERT INTO lang VALUES ('back to projectlist','info','de','Zurück zur Gesamtliste'); INSERT INTO lang VALUES ('back to projectlist','infolog','de','Zurück zur Gesamtliste');
INSERT INTO lang VALUES ('view other subs','info','de','andere Teileprojekte anzeigen'); INSERT INTO lang VALUES ('view other subs','infolog','de','andere Teileprojekte anzeigen');
INSERT INTO lang VALUES ('action','info','de','Befehle'); INSERT INTO lang VALUES ('action','infolog','de','Befehle');
INSERT INTO lang VALUES ('showing x - x of x','info','de','Einträge %1 - %2 von %3'); INSERT INTO lang VALUES ('showing x - x of x','infolog','de','Einträge %1 - %2 von %3');
INSERT INTO lang VALUES ('datecreated','info','de','Erstellt am'); INSERT INTO lang VALUES ('datecreated','infolog','de','Erstellt am');
INSERT INTO lang VALUES ('you have entered an invalid ending date','info','de','Sie haben ein ungültiges Enddatum angegeben'); INSERT INTO lang VALUES ('you have entered an invalid ending date','infolog','de','Sie haben ein ungültiges Enddatum angegeben');
INSERT INTO lang VALUES ('you have entered an invalid starting date','info','de','Sie haben ein ungültiges Startdatum eingegeben'); INSERT INTO lang VALUES ('you have entered an invalid starting date','infolog','de','Sie haben ein ungültiges Startdatum eingegeben');
INSERT INTO lang VALUES ('owner','info','de','Erstellt von'); INSERT INTO lang VALUES ('owner','infolog','de','Erstellt von');
INSERT INTO lang VALUES ('no entrys found for %1, try again ...','info','de','Keine Einträge für %1 gefunden, nochmal versuchen ...'); INSERT INTO lang VALUES ('no entrys found for %1, try again ...','infolog','de','Keine Einträge für %1 gefunden, nochmal versuchen ...');
INSERT INTO lang VALUES ('search for:','info','de','Suchen nach:'); INSERT INTO lang VALUES ('search for:','infolog','de','Suchen nach:');
INSERT INTO lang VALUES ('project','info','de','Projekt'); INSERT INTO lang VALUES ('project','infolog','de','Projekt');
INSERT INTO lang VALUES ('pattern for search in addressbook','info','de','Muster für Suche im Adressbuch'); INSERT INTO lang VALUES ('pattern for search in addressbook','infolog','de','Muster für Suche im Adressbuch');
INSERT INTO lang VALUES ('pattern for search in projects','info','de','Muster für Suche des Projekts'); INSERT INTO lang VALUES ('pattern for search in projects','infolog','de','Muster für Suche des Projekts');
INSERT INTO lang VALUES ('not set, use button to search for','info','de','nicht gesetzt, Button zum Suchen verwenden'); INSERT INTO lang VALUES ('not set, use button to search for','infolog','de','nicht gesetzt, Button zum Suchen verwenden');
INSERT INTO lang VALUES ('import csv-file into info log','info','de','Import CSV-Datei ins Info Log'); INSERT INTO lang VALUES ('import csv-file into info log','infolog','de','Import CSV-Datei ins Info Log');
INSERT INTO lang VALUES ('csv-fieldname','info','de','CSV-Feldname'); INSERT INTO lang VALUES ('csv-fieldname','infolog','de','CSV-Feldname');
INSERT INTO lang VALUES ('info log-fieldname','info','de','Info Log-Feldname'); INSERT INTO lang VALUES ('info log-fieldname','infolog','de','Info Log-Feldname');
INSERT INTO lang VALUES ('translation','info','de','Translation'); INSERT INTO lang VALUES ('translation','infolog','de','Translation');
INSERT INTO lang VALUES ('import','info','de','Import'); INSERT INTO lang VALUES ('import','infolog','de','Import');
INSERT INTO lang VALUES ('startrecord','info','de','Startdatensatz'); INSERT INTO lang VALUES ('startrecord','infolog','de','Startdatensatz');
INSERT INTO lang VALUES ('number of records to read (<=200)','info','de','Anzahl Datensätze lesen (<=200)'); INSERT INTO lang VALUES ('number of records to read (<=200)','infolog','de','Anzahl Datensätze lesen (<=200)');
INSERT INTO lang VALUES ('test import (show importable records <u>only</u> in browser)','info','de','Test Import (zeige importierbare Datensätze <u>nur</u> im Browser)'); INSERT INTO lang VALUES ('test import (show importable records <u>only</u> in browser)','infolog','de','Test Import (zeige importierbare Datensätze <u>nur</u> im Browser)');
INSERT INTO lang VALUES ('csv-filename','info','de','CSV-Dateiname'); INSERT INTO lang VALUES ('csv-filename','infolog','de','CSV-Dateiname');
INSERT INTO lang VALUES ('fieldseparator','info','de','Feldbegrenzer'); INSERT INTO lang VALUES ('fieldseparator','infolog','de','Feldbegrenzer');
INSERT INTO lang VALUES ('download','info','de','Datei laden'); INSERT INTO lang VALUES ('download','infolog','de','Datei laden');
INSERT INTO lang VALUES ('%1 records imported','info','de','%1 Datensätze importiert'); INSERT INTO lang VALUES ('%1 records imported','infolog','de','%1 Datensätze importiert');
INSERT INTO lang VALUES ('%1 records read (not yet imported, you may go back and uncheck test import)','info','de','%1 Datensätze gelesen (noch nicht importiert, sie können %2zurück%3 gehen und Test Import ausschalten)'); INSERT INTO lang VALUES ('%1 records read (not yet imported, you may go back and uncheck test import)','infolog','de','%1 Datensätze gelesen (noch nicht importiert, sie können %2zurück%3 gehen und Test Import ausschalten)');
INSERT INTO lang VALUES ('%1 records read (not yet imported, you may go back and uncheck test import)','info','en','%1 records read (not yet imported, you may go %2back%3 and uncheck Test Import)'); INSERT INTO lang VALUES ('%1 records read (not yet imported, you may go back and uncheck test import)','infolog','en','%1 records read (not yet imported, you may go %2back%3 and uncheck Test Import)');

View File

@ -3,7 +3,7 @@
* phpGroupWare - Info Log * * phpGroupWare - Info Log *
* http://www.phpgroupware.org * * http://www.phpgroupware.org *
* Written by Ralf Becker <RalfBecker@outdoor-training.de> * * Written by Ralf Becker <RalfBecker@outdoor-training.de> *
* based on info written by Joseph Engo <jengo@phpgroupware.org> * * originaly based on todo written by Joseph Engo <jengo@phpgroupware.org> *
* -------------------------------------------- * * -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it * * 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 * * under the terms of the GNU General Public License as published by the *
@ -14,7 +14,7 @@
/* $Id$ */ /* $Id$ */
$phpgw_info['flags'] = array( $phpgw_info['flags'] = array(
'currentapp' => 'info', 'currentapp' => 'infolog',
'noheader' => True, 'noheader' => True,
'nofooter' => True, 'nofooter' => True,
'nonavbar' => True, 'nonavbar' => True,
@ -23,11 +23,11 @@
include('../header.inc.php'); include('../header.inc.php');
if ((!isset($info_id) || !$info_id) && !$action) { if ((!isset($info_id) || !$info_id) && !$action) {
Header('Location: ' . $phpgw->link('/info/index.php',sprintf('sort=%s&order=%s&query=%s&start=%s' Header('Location: ' . $phpgw->link('/infolog/index.php',"sort=$sort&order=$order&query=$query&start=$start&".
. '&filter=%s&cat_id=%s',$sort,$order,$query,$start,$filter,$cat_id))); "filter=$filter&cat_id=$cat_id"));
} }
$phpgw->info = createobject('info.info'); $phpgw->infolog = createobject('infolog.infolog');
if ($submit) { if ($submit) {
if (strlen($des) >= 8000) { if (strlen($des) >= 8000) {
@ -81,7 +81,7 @@
} }
if (! is_array($error)) { if (! is_array($error)) {
$phpgw->info->write(array( $phpgw->infolog->write(array(
'type' => $type, 'type' => $type,
'from' => $from, 'from' => $from,
'addr' => $addr, 'addr' => $addr,
@ -102,32 +102,32 @@
)); ));
if (!$addrsearch && !$projectsearch) { if (!$addrsearch && !$projectsearch) {
Header('Location: ' . $phpgw->link('/info/index.php', "cd=15&sort=$sort&order=$order&query=$query&". Header('Location: ' . $phpgw->link('/infolog/index.php', "cd=15&sort=$sort&order=$order&query=$query&".
"start=$start&filter=$filter&cat_id=$cat_id")); "start=$start&filter=$filter&cat_id=$cat_id"));
} }
} }
} }
$phpgw->info->read( $info_id ); $phpgw->infolog->read( $info_id );
if ($info_id && $action == 'sp') { // new SubProject if ($info_id && $action == 'sp') { // new SubProject
if (!$phpgw->info->check_access($info_id,PHPGW_ACL_ADD)) { if (!$phpgw->infolog->check_access($info_id,PHPGW_ACL_ADD)) {
Header('Location: ' . $phpgw->link('/info/index.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter")); Header('Location: ' . $phpgw->link('/infolog/index.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter"));
$phpgw->common->phpgw_exit(); $phpgw->common->phpgw_exit();
} }
$parent = $phpgw->info->data; $parent = $phpgw->infolog->data;
$phpgw->info->data['info_id'] = $info_id = 0; $phpgw->infolog->data['info_id'] = $info_id = 0;
$phpgw->info->owner = $phpgw_info['user']['account_id']; $phpgw->infolog->owner = $phpgw_info['user']['account_id'];
$phpgw->info->data['info_id_parent'] = $parent['info_id']; $phpgw->infolog->data['info_id_parent'] = $parent['info_id'];
if ($parent['info_type'] == 'task' && $parent['info_status'] == 'offer') { if ($parent['info_type'] == 'task' && $parent['info_status'] == 'offer') {
$phpgw->info->data['info_type'] = 'confirm'; $phpgw->infolog->data['info_type'] = 'confirm';
$phpgw->info->data['info_responsible'] = $parent['info_owner']; // confirmation to parent $phpgw->infolog->data['info_responsible'] = $parent['info_owner']; // confirmation to parent
} }
$phpgw->info->data['info_status'] = 'ongoing'; $phpgw->infolog->data['info_status'] = 'ongoing';
$phpgw->info->data['info_confirm'] = 'not'; $phpgw->infolog->data['info_confirm'] = 'not';
$phpgw->info->data['info_subject'] = lang('Re:').' '.$parent['info_subject']; $phpgw->infolog->data['info_subject'] = lang('Re:').' '.$parent['info_subject'];
$phpgw->info->data['info_des'] = ''; $phpgw->infolog->data['info_des'] = '';
} else { } else {
if ($info_id && !$phpgw->info->check_access($info_id,PHPGW_ACL_EDIT)) { if ($info_id && !$phpgw->infolog->check_access($info_id,PHPGW_ACL_EDIT)) {
Header('Location: ' . $phpgw->link('/info/index.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter")); Header('Location: ' . $phpgw->link('/infolog/index.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter"));
$phpgw->common->phpgw_exit(); $phpgw->common->phpgw_exit();
} }
} }
@ -138,17 +138,17 @@
. '<input type="hidden" name="start" value="' . $start . '">' . '<input type="hidden" name="start" value="' . $start . '">'
. '<input type="hidden" name="filter" value="' . $filter . '">' . '<input type="hidden" name="filter" value="' . $filter . '">'
. '<input type="hidden" name="info_id" value="' . $info_id. '">' . '<input type="hidden" name="info_id" value="' . $info_id. '">'
. '<input type="hidden" name="id_parent" value="' . ($id_parent = $phpgw->info->data['info_id_parent']). '">' . '<input type="hidden" name="id_parent" value="' . ($id_parent = $phpgw->infolog->data['info_id_parent']). '">'
. '<input type="hidden" name="action" value="' . $action. '">'; . '<input type="hidden" name="action" value="' . $action. '">';
$phpgw->common->phpgw_header(); $phpgw->common->phpgw_header();
echo parse_navbar(); echo parse_navbar();
$phpgw->db->query("select * from info where info_id='$info_id'"); $phpgw->db->query("select * FROM infolog where info_id='$info_id'");
$phpgw->db->next_record(); $phpgw->db->next_record();
$pri_selected[$phpgw->info->data['info_pri']] = ' selected'; $pri_selected[$phpgw->infolog->data['info_pri']] = ' selected';
$status_selected[$phpgw->info->data['info_status']] = ' selected'; $status_selected[$phpgw->infolog->data['info_status']] = ' selected';
$phpgw->template->set_file(array('info_edit' => 'form.tpl')); $phpgw->template->set_file(array('info_edit' => 'form.tpl'));
@ -172,29 +172,29 @@
$info_action = 'Info Log - Edit'; break; $info_action = 'Info Log - Edit'; break;
} }
$phpgw->template->set_var('lang_info_action',lang($info_action).($addrsearch?' - '.lang('Search for:')." '$addrsearch'":'')); $phpgw->template->set_var('lang_info_action',lang($info_action).($addrsearch?' - '.lang('Search for:')." '$addrsearch'":''));
$phpgw->template->set_var($phpgw->info->setStyleSheet( )); $phpgw->template->set_var($phpgw->infolog->setStyleSheet( ));
$phpgw->template->set_var('lang_category',lang('Category')); $phpgw->template->set_var('lang_category',lang('Category'));
$phpgw->template->set_var('lang_none',lang('None')); $phpgw->template->set_var('lang_none',lang('None'));
$phpgw->template->set_var('cat_list',$phpgw->categories->formated_list('select','all',$phpgw->info->data['info_cat'],'True')); $phpgw->template->set_var('cat_list',$phpgw->categories->formated_list('select','all',$phpgw->infolog->data['info_cat'],'True'));
$phpgw->template->set_var('actionurl',$phpgw->link('/info/edit.php')); $phpgw->template->set_var('actionurl',$phpgw->link('/infolog/edit.php'));
$phpgw->template->set_var('common_hidden_vars',$common_hidden_vars); $phpgw->template->set_var('common_hidden_vars',$common_hidden_vars);
$phpgw->template->set_var('lang_owner',lang('Owner')); $phpgw->template->set_var('lang_owner',lang('Owner'));
$phpgw->template->set_var('owner_info',$phpgw->info->accountInfo($phpgw->info->data['info_owner'])); $phpgw->template->set_var('owner_info',$phpgw->infolog->accountInfo($phpgw->infolog->data['info_owner']));
$phpgw->template->set_var('lang_type',lang('Type')); $phpgw->template->set_var('lang_type',lang('Type'));
$phpgw->template->set_var('type_list',$phpgw->info->getEnum('type',$phpgw->info->data['info_type'],$phpgw->info->enums['type'])); $phpgw->template->set_var('type_list',$phpgw->infolog->getEnum('type',$phpgw->infolog->data['info_type'],$phpgw->infolog->enums['type']));
$phpgw->template->set_var('lang_prfrom', lang('From')); $phpgw->template->set_var('lang_prfrom', lang('From'));
$phpgw->template->set_var('fromval', $phpgw->strip_html($phpgw->info->data['info_from'])); $phpgw->template->set_var('fromval', $phpgw->strip_html($phpgw->infolog->data['info_from']));
$phpgw->template->set_var('lang_praddr', lang('Phone/Email')); $phpgw->template->set_var('lang_praddr', lang('Phone/Email'));
$phpgw->template->set_var('addrval', $phpgw->strip_html($phpgw->info->data['info_addr'])); $phpgw->template->set_var('addrval', $phpgw->strip_html($phpgw->infolog->data['info_addr']));
$phpgw->template->set_var('lang_search', lang('Search')); $phpgw->template->set_var('lang_search', lang('Search'));
$phpgw->template->set_var('lang_prproject', lang('Project')); $phpgw->template->set_var('lang_prproject', lang('Project'));
$phpgw->template->set_var('lang_proj_prompt', lang('Pattern for Search in Projects')); $phpgw->template->set_var('lang_proj_prompt', lang('Pattern for Search in Projects'));
if (($proj_id = $phpgw->info->data['info_proj_id']) || $projectsearch) { if (($proj_id = $phpgw->infolog->data['info_proj_id']) || $projectsearch) {
$projects = createobject('projects.projects'); $projects = createobject('projects.projects');
if ($projectsearch) { if ($projectsearch) {
@ -224,7 +224,7 @@
$phpgw->template->set_var('lang_praddrbook', lang('Addressbook')); $phpgw->template->set_var('lang_praddrbook', lang('Addressbook'));
$phpgw->template->set_var('lang_addr_prompt', lang('Pattern for Search in Addressbook')); $phpgw->template->set_var('lang_addr_prompt', lang('Pattern for Search in Addressbook'));
if (($addr_id = $phpgw->info->data['info_addr_id']) || $addrsearch) { if (($addr_id = $phpgw->infolog->data['info_addr_id']) || $addrsearch) {
$contacts = createobject('phpgwapi.contacts'); $contacts = createobject('phpgwapi.contacts');
if ($addrsearch) { if ($addrsearch) {
@ -232,7 +232,7 @@
if (count($addrs)) { if (count($addrs)) {
$addrbook = '<select name="addr_id">'; $addrbook = '<select name="addr_id">';
while (list( $key,$addr ) = each( $addrs )) { while (list( $key,$addr ) = each( $addrs )) {
$addrbook .= '<option value="'.$addr['id'].'">'.$phpgw->info->addr2name( $addr )."\n"; $addrbook .= '<option value="'.$addr['id'].'">'.$phpgw->infolog->addr2name( $addr )."\n";
} }
$addrbook .= '<option value="0">'.lang('none')."\n"; $addrbook .= '<option value="0">'.lang('none')."\n";
$addrbook .= '</select>'; $addrbook .= '</select>';
@ -242,7 +242,7 @@
} else { // read name/company from addressbook entry info_addr_id } else { // read name/company from addressbook entry info_addr_id
list( $addr ) = $contacts->read_single_entry( $addr_id ); list( $addr ) = $contacts->read_single_entry( $addr_id );
if (count($addr)) { if (count($addr)) {
$addrbook = $phpgw->info->addr2name( $addr ).'<input type="hidden" name="addr_id" value="' . $addr_id . '">'; $addrbook = $phpgw->infolog->addr2name( $addr ).'<input type="hidden" name="addr_id" value="' . $addr_id . '">';
} }
} }
} }
@ -252,25 +252,25 @@
$phpgw->template->set_var('addrbook', $addrbook); $phpgw->template->set_var('addrbook', $addrbook);
$phpgw->template->set_var('lang_prsubject', lang('Subject')); $phpgw->template->set_var('lang_prsubject', lang('Subject'));
$phpgw->template->set_var('subjectval', $phpgw->strip_html($phpgw->info->data['info_subject'])); $phpgw->template->set_var('subjectval', $phpgw->strip_html($phpgw->infolog->data['info_subject']));
$phpgw->template->set_var('lang_prdesc', lang('Description')); $phpgw->template->set_var('lang_prdesc', lang('Description'));
$phpgw->template->set_var('descval', $phpgw->strip_html($phpgw->info->data['info_des'])); $phpgw->template->set_var('descval', $phpgw->strip_html($phpgw->infolog->data['info_des']));
// get month/day/year fields for startdate and enddate // get month/day/year fields for startdate and enddate
if ($phpgw->info->data['info_startdate'] == 0) { if ($phpgw->infolog->data['info_startdate'] == 0) {
$sday = $smonth = $syear = 0; $sday = $smonth = $syear = 0;
} else { } else {
$sday = date('d',$phpgw->info->data['info_startdate']); $sday = date('d',$phpgw->infolog->data['info_startdate']);
$smonth = date('m',$phpgw->info->data['info_startdate']); $smonth = date('m',$phpgw->infolog->data['info_startdate']);
$syear = date('Y',$phpgw->info->data['info_startdate']); $syear = date('Y',$phpgw->infolog->data['info_startdate']);
} }
if ($phpgw->info->data['info_enddate'] == 0) { if ($phpgw->infolog->data['info_enddate'] == 0) {
$eday = $emonth = $eyear = 0; $eday = $emonth = $eyear = 0;
} else { } else {
$eday = date('d',$phpgw->info->data['info_enddate']); $eday = date('d',$phpgw->infolog->data['info_enddate']);
$emonth = date('m',$phpgw->info->data['info_enddate']); $emonth = date('m',$phpgw->infolog->data['info_enddate']);
$eyear = date('Y',$phpgw->info->data['info_enddate']); $eyear = date('Y',$phpgw->infolog->data['info_enddate']);
} }
// get an instance of select box class // get an instance of select box class
@ -288,25 +288,25 @@
$phpgw->template->set_var('days',lang('days')); $phpgw->template->set_var('days',lang('days'));
$phpgw->template->set_var('lang_status',lang('Status')); $phpgw->template->set_var('lang_status',lang('Status'));
$phpgw->template->set_var('status_list',$phpgw->info->getEnum('status',$phpgw->info->data['info_status'],$phpgw->info->enums['status'])); $phpgw->template->set_var('status_list',$phpgw->infolog->getEnum('status',$phpgw->infolog->data['info_status'],$phpgw->infolog->enums['status']));
$phpgw->template->set_var('lang_priority',lang('Priority')); $phpgw->template->set_var('lang_priority',lang('Priority'));
$phpgw->template->set_var('priority_list',$phpgw->info->getEnum('pri',$phpgw->info->data['info_pri'],$phpgw->info->enums['priority'])); $phpgw->template->set_var('priority_list',$phpgw->infolog->getEnum('pri',$phpgw->infolog->data['info_pri'],$phpgw->infolog->enums['priority']));
$phpgw->template->set_var('lang_confirm',lang('Confirm')); $phpgw->template->set_var('lang_confirm',lang('Confirm'));
$phpgw->template->set_var('confirm_list',$phpgw->info->getEnum('confirm',$phpgw->info->data['info_confirm'],$phpgw->info->enums['confirm'])); $phpgw->template->set_var('confirm_list',$phpgw->infolog->getEnum('confirm',$phpgw->infolog->data['info_confirm'],$phpgw->infolog->enums['confirm']));
$phpgw->template->set_var('lang_responsible',lang('Responsible')); $phpgw->template->set_var('lang_responsible',lang('Responsible'));
$phpgw->template->set_var('responsible_list',$phpgw->info->getAccount('responsible',$phpgw->info->data['info_responsible'])); $phpgw->template->set_var('responsible_list',$phpgw->infolog->getAccount('responsible',$phpgw->infolog->data['info_responsible']));
$phpgw->template->set_var('lang_access_type',lang('Private')); $phpgw->template->set_var('lang_access_type',lang('Private'));
$phpgw->template->set_var('access_list', '<input type="checkbox" name="access" value="True"' . ($phpgw->info->data['info_access'] == 'private'?' checked':'') . '>'); $phpgw->template->set_var('access_list', '<input type="checkbox" name="access" value="True"' . ($phpgw->infolog->data['info_access'] == 'private'?' checked':'') . '>');
$phpgw->template->set_var('delete_action',$phpgw->link('/info/delete.php')); $phpgw->template->set_var('delete_action',$phpgw->link('/infolog/delete.php'));
$phpgw->template->set_var('edit_button','<input type="submit" name="submit" value="' . lang('Save') . '">'); $phpgw->template->set_var('edit_button','<input type="submit" name="submit" value="' . lang('Save') . '">');
if (!$action && $phpgw->info->check_access($info_id,PHPGW_ACL_DELETE)) { if (!$action && $phpgw->infolog->check_access($info_id,PHPGW_ACL_DELETE)) {
$phpgw->template->set_var('delete_button','<input type="submit" name="delete" value="' . lang('Delete') . '">'); $phpgw->template->set_var('delete_button','<input type="submit" name="delete" value="' . lang('Delete') . '">');
} }
$phpgw->template->set_var('edithandle',''); $phpgw->template->set_var('edithandle','');

View File

@ -1,7 +1,9 @@
<?php <?php
/**************************************************************************\ /**************************************************************************\
* phpGroupWare - Info * * phpGroupWare - InfoLog *
* http://www.phpgroupware.org * * http://www.phpgroupware.org *
* Written by Ralf Becker <RalfBecker@outdoor-training.de> *
* originaly based on todo written by Joseph Engo <jengo@phpgroupware.org> *
* -------------------------------------------- * * -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it * * 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 * * under the terms of the GNU General Public License as published by the *
@ -11,7 +13,7 @@
/* $Id$ */ /* $Id$ */
class info class infolog
{ {
var $db,$db2; var $db,$db2;
var $grants; var $grants;
@ -19,11 +21,11 @@
var $enums; var $enums;
var $data = array( ); var $data = array( );
function info( $info_id = 0) { function infolog( $info_id = 0) {
global $phpgw; global $phpgw;
$this->db = $phpgw->db; $this->db = $phpgw->db;
$this->db2 = $phpgw->db; // for getAccounts and accountInfo $this->db2 = $phpgw->db; // for getAccounts and accountInfo
$this->grants = $phpgw->acl->get_grants('info'); $this->grants = $phpgw->acl->get_grants('infolog');
$this->enums = array( 'priority' => array( 'urgent' => 'urgent','high' => 'high','normal' => 'normal','low' => 'low' ), $this->enums = array( 'priority' => array( 'urgent' => 'urgent','high' => 'high','normal' => 'normal','low' => 'low' ),
'status' => array( 'offer' => 'offer','ongoing' => 'ongoing','call' => 'call', 'status' => array( 'offer' => 'offer','ongoing' => 'ongoing','call' => 'call',
'will-call' => 'will-call','done' => 'done','billed' => 'billed' ), 'will-call' => 'will-call','done' => 'done','billed' => 'billed' ),
@ -183,13 +185,13 @@
$subject = "<span class=$css_class>"; $subject = "<span class=$css_class>";
if ($p_id != ($proj_id = $info['info_proj_id']) && $proj = $this->readProj($proj_id)) { if ($p_id != ($proj_id = $info['info_proj_id']) && $proj = $this->readProj($proj_id)) {
$subject .= '<b><a href="'.$phpgw->link('/info/index.php',"filter=$filter&action=proj&proj_id=$proj_id"). $subject .= '<b><a href="'.$phpgw->link('/infolog/index.php',"filter=$filter&action=proj&proj_id=$proj_id").
'">'.$proj['title'].'</a></b>'; '">'.$proj['title'].'</a></b>';
} }
if ($a_id != ($addr_id = $info['info_addr_id']) && $addr = $this->readAddr($addr_id)) { if ($a_id != ($addr_id = $info['info_addr_id']) && $addr = $this->readAddr($addr_id)) {
if ($proj) $subject .= '<br>'; if ($proj) $subject .= '<br>';
$addr = $this->addr2name( $addr ); $addr = $this->addr2name( $addr );
$subject .= '<b><a href="'.$phpgw->link('/info/index.php',"filter=$filter&action=addr&addr_id=$addr_id"). $subject .= '<b><a href="'.$phpgw->link('/infolog/index.php',"filter=$filter&action=addr&addr_id=$addr_id").
"\">$addr</a></b>"; "\">$addr</a></b>";
} }
if (($from = $info['info_from']) && (!$addr || !strstr($addr,$from))) { if (($from = $info['info_from']) && (!$addr || !strstr($addr,$from))) {
@ -214,17 +216,17 @@
$enddate = "<span class=overdue>$enddate</span>"; $enddate = "<span class=overdue>$enddate</span>";
} }
if (!($responsible = $info['info_responsible']) && $info['info_status'] == 'offer') { if (!($responsible = $info['info_responsible']) && $info['info_status'] == 'offer') {
$responsible = $phpgw->info->icon('status','offer'); $responsible = $phpgw->infolog->icon('status','offer');
} else { } else {
$responsible = $phpgw->info->accountInfo($responsible); $responsible = $phpgw->infolog->accountInfo($responsible);
} }
$owner = $phpgw->info->accountInfo($info['info_owner']); $owner = $phpgw->infolog->accountInfo($info['info_owner']);
if ($info['info_access'] == 'private') if ($info['info_access'] == 'private')
$owner = "<span class=private>$owner</span>"; $owner = "<span class=private>$owner</span>";
return array( return array(
'type' => $phpgw->info->icon('type',$info['info_type']), 'type' => $phpgw->infolog->icon('type',$info['info_type']),
'status' => $phpgw->info->icon('status',$info['info_status']), 'status' => $phpgw->infolog->icon('status',$info['info_status']),
'pri' => lang($info['info_pri']), 'pri' => lang($info['info_pri']),
'subject' => $subject, 'subject' => $subject,
'des' => $info['info_des'], 'des' => $info['info_des'],
@ -244,7 +246,7 @@
for ( ;$f = $h = current($fields); $f = next($fields)) { for ( ;$f = $h = current($fields); $f = next($fields)) {
$lang = lang(ucfirst( $f )); $lang = lang(ucfirst( $f ));
if ($do_sort_header) { if ($do_sort_header) {
$headers['sort_'.$f] = $phpgw->nextmatchs->show_sort_order($sort,'info_'.$f,$order,'/info/index.php',$lang); $headers['sort_'.$f] = $phpgw->nextmatchs->show_sort_order($sort,'info_'.$f,$order,'/infolog/index.php',$lang);
} else { } else {
$headers['lang_'.$f] = $lang; $headers['lang_'.$f] = $lang;
} }
@ -321,7 +323,7 @@
function read($info_id) { // did _not_ ensure ACL, has to be done by the calling code function read($info_id) { // did _not_ ensure ACL, has to be done by the calling code
if ($info_id <= 0 || $info_id != $this->data['info_id'] && if ($info_id <= 0 || $info_id != $this->data['info_id'] &&
(!$this->db->query("select * from info where info_id='$info_id'") || !$this->db->next_record())) (!$this->db->query("select * FROM infolog where info_id='$info_id'") || !$this->db->next_record()))
{ {
$this->init( ); $this->init( );
return False; return False;
@ -348,7 +350,7 @@
function delete($info_id) { // did _not_ ensure ACL, has to be done by the calling code function delete($info_id) { // did _not_ ensure ACL, has to be done by the calling code
global $phpgw_info; global $phpgw_info;
$this->db->query("delete from info where info_id='$info_id' or info_id_parent='" $this->db->query("delete FROM infolog where info_id='$info_id' or info_id_parent='"
. "$info_id' AND ((info_access='public' and info_owner != '" . "$info_id' AND ((info_access='public' and info_owner != '"
. $phpgw_info['user']['account_id'] . "') or (info_owner='" . $phpgw_info['user']['account_id'] . "') or (info_owner='"
. $phpgw_info['user']['account_id'] . "'))" ,__LINE__,__FILE__); . $phpgw_info['user']['account_id'] . "'))" ,__LINE__,__FILE__);
@ -389,7 +391,7 @@
if ($values['info_id']) { if ($values['info_id']) {
$query = 'update info set '.$query.' where info_id=\'' . $values['info_id'] .'\''; $query = 'update info set '.$query.' where info_id=\'' . $values['info_id'] .'\'';
} else { } else {
$query = 'insert into info set '.$query; $query = 'insert INTO infolog set '.$query;
/* /*
* need to set $this->data['info_id'] with assigned autoincrement id * need to set $this->data['info_id'] with assigned autoincrement id
*/ */

View File

@ -14,7 +14,7 @@
$imgpath = $phpgw->common->image($appname,'navbar.gif'); $imgpath = $phpgw->common->image($appname,'navbar.gif');
section_start($appname,$imgpath); section_start($appname,$imgpath);
section_item($phpgw->link('/info/csv_import.php'),lang('CSV-Import')); section_item($phpgw->link('/infolog/csv_import.php'),lang('CSV-Import'));
section_end(); section_end();
?> ?>

View File

@ -1,8 +0,0 @@
<?php
function about_app($tpl,$handle)
{
$s = "<b>Info Log</b><p>written by <a href='mailto:RalfBecker@outdoor-training.de'>Ralf Becker</a><br>adopted from todo written by Joseph Engo";
return $s;
}

View File

@ -0,0 +1,15 @@
<?php
function about_app($tpl,$handle)
{
$s = "<b>Info Log</b><p>written by <a href='mailto:RalfBecker@outdoor-training.de'>Ralf Becker</a><br>adopted from todo written by Joseph Engo<p>".
"InfoLog sumarizes the 3 core-programms ToDo, Notes and PhoneLog. InfoLog is based on phpGroupWare's ToDo-List and already has the features ".
"of all 3 mentioned applications plus fully working ACL (including Add+Private attributes, add for to addreplys/subtasks), responsibility ".
"for a task (ToDo) or a phonecall could be delegated to an other user, all entry could be linked to an addressbook entry and a projekt. ".
"This allows you to log all activity of a projekt or address (this should include archiving of emails, faxes and other documents in the ".
"future).<br>".
"Their is a CSV import filter (under admin) to import existing data which allows to interactivly assign fields and customize the values ".
"with regular expressions and direkt calls to php-functions (e.g. link the phone calls (again) to the addressbook entrys).";
return $s;
}

View File

@ -29,10 +29,10 @@
section_start(ucfirst($appname),$imgpath); section_start(ucfirst($appname),$imgpath);
section_item($phpgw->link('/preferences/acl_preferences.php','acl_app=info'), section_item($phpgw->link('/preferences/acl_preferences.php','acl_app=infolog'),
lang('Grant InfoLog Access')); lang('Grant InfoLog Access'));
section_item($phpgw->link('/preferences/categories.php','cats_app=info'), section_item($phpgw->link('/preferences/categories.php','cats_app=infolog'),
lang('InfoLog categories')); lang('InfoLog categories'));
section_end(); section_end();

View File

@ -3,7 +3,7 @@
* phpGroupWare - Info Log * * phpGroupWare - Info Log *
* http://www.phpgroupware.org * * http://www.phpgroupware.org *
* Written by Ralf Becker <RalfBecker@outdoor-training.de> * * Written by Ralf Becker <RalfBecker@outdoor-training.de> *
* based on todo written by Joseph Engo <jengo@phpgroupware.org> * * originaly based on todo written by Joseph Engo <jengo@phpgroupware.org> *
* -------------------------------------------- * * -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it * * 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 * * under the terms of the GNU General Public License as published by the *
@ -14,21 +14,21 @@
/* $Id$ */ /* $Id$ */
$phpgw_info['flags'] = array( $phpgw_info['flags'] = array(
'currentapp' => 'info', 'currentapp' => 'infolog',
'enable_nextmatchs_class' => True, 'enable_nextmatchs_class' => True,
'enable_categories_class' => True 'enable_categories_class' => True
); );
include('../header.inc.php'); include('../header.inc.php');
$phpgw->info = createobject('info.info'); $phpgw->infolog = createobject('infolog.infolog');
$db = $phpgw->db; $db = $phpgw->db;
$db2 = $phpgw->db; $db2 = $phpgw->db;
$phpgw->template = new Template($phpgw->common->get_tpl_dir('info')); $phpgw->template = new Template($phpgw->common->get_tpl_dir('infolog'));
$phpgw->template->set_file(array( 'info_list_t' => 'list.tpl' )); $phpgw->template->set_file(array( 'info_list_t' => 'list.tpl' ));
$phpgw->template->set_block('info_list_t','info_list','list'); $phpgw->template->set_block('info_list_t','info_list','list');
$grants = $phpgw->acl->get_grants('info'); $grants = $phpgw->acl->get_grants('infolog');
$common_hidden_vars = $common_hidden_vars =
'<input type="hidden" name="sort" value="' . $sort . '">' '<input type="hidden" name="sort" value="' . $sort . '">'
@ -48,21 +48,21 @@
break; break;
case 'proj': case 'proj':
$common_hidden_vars .= '<input type="hidden" name="proj_id" value="' . $proj_id . '">'; $common_hidden_vars .= '<input type="hidden" name="proj_id" value="' . $proj_id . '">';
$proj = $phpgw->info->readProj($proj_id); $proj = $phpgw->infolog->readProj($proj_id);
$phpgw->template->set_var(lang_info_action,lang('Info Log').' - '.$proj['title']); $phpgw->template->set_var(lang_info_action,lang('Info Log').' - '.$proj['title']);
break; break;
case 'addr': case 'addr':
$common_hidden_vars .= '<input type="hidden" name="addr_id" value="' . $addr_id . '">'; $common_hidden_vars .= '<input type="hidden" name="addr_id" value="' . $addr_id . '">';
$addr = $phpgw->info->readAddr($addr_id); $addr = $phpgw->infolog->readAddr($addr_id);
$phpgw->template->set_var(lang_info_action,lang('Info Log').' - '.$phpgw->info->addr2name($addr)); $phpgw->template->set_var(lang_info_action,lang('Info Log').' - '.$phpgw->infolog->addr2name($addr));
break; break;
default: default:
$phpgw->template->set_var(lang_info_action,lang('Info Log')); $phpgw->template->set_var(lang_info_action,lang('Info Log'));
break; break;
} }
$phpgw->template->set_var($phpgw->info->setStyleSheet( )); $phpgw->template->set_var($phpgw->infolog->setStyleSheet( ));
$phpgw->template->set_var(actionurl,$phpgw->link('/info/edit.php?action=new')); $phpgw->template->set_var(actionurl,$phpgw->link('/infolog/edit.php?action=new'));
$phpgw->template->set_var('cat_form',$phpgw->link('/info/index.php')); $phpgw->template->set_var('cat_form',$phpgw->link('/infolog/index.php'));
$phpgw->template->set_var('lang_category',lang('Category')); $phpgw->template->set_var('lang_category',lang('Category'));
$phpgw->template->set_var('lang_all',lang('All')); $phpgw->template->set_var('lang_all',lang('All'));
$phpgw->template->set_var('lang_select',lang('Select')); $phpgw->template->set_var('lang_select',lang('Select'));
@ -72,7 +72,7 @@
// =========================================== // ===========================================
// list header variable template-declarations // list header variable template-declarations
// =========================================== // ===========================================
$phpgw->template->set_var( $phpgw->info->infoHeaders( 1,$sort,$order )); $phpgw->template->set_var( $phpgw->infolog->infoHeaders( 1,$sort,$order ));
$phpgw->template->set_var(h_lang_sub,lang('Sub')); $phpgw->template->set_var(h_lang_sub,lang('Sub'));
$phpgw->template->set_var(h_lang_action,lang('Action')); $phpgw->template->set_var(h_lang_action,lang('Action'));
// -------------- end header declaration ----------------- // -------------- end header declaration -----------------
@ -89,7 +89,7 @@
if (!$filter) { if (!$filter) {
$filter = 'none'; $filter = 'none';
} }
$filtermethod = $phpgw->info->aclFilter($filter); $filtermethod = $phpgw->infolog->aclFilter($filter);
if ($cat_id) { if ($cat_id) {
$filtermethod .= " AND info_cat='$cat_id' "; $filtermethod .= " AND info_cat='$cat_id' ";
@ -100,10 +100,10 @@
if ($query) $sql_query = "AND (info_from like '%$query%' OR info_subject like '%$query%' OR info_des like '%$query%') "; if ($query) $sql_query = "AND (info_from like '%$query%' OR info_subject like '%$query%' OR info_des like '%$query%') ";
$pid = 'AND info_id_parent='.($action == 'sp' ? $info_id : 0); $pid = 'AND info_id_parent='.($action == 'sp' ? $info_id : 0);
if ($phpgw->info->listChilds && $action != 'sp') if ($phpgw->infolog->listChilds && $action != 'sp')
$pid = ''; $pid = '';
$db->query("SELECT COUNT(*) FROM info WHERE $filtermethod $pid $sql_query",__LINE__,__FILE__); $db->query("SELECT COUNT(*) FROM infolog WHERE $filtermethod $pid $sql_query",__LINE__,__FILE__);
$db->next_record(); $db->next_record();
$total = $db->f(0); $total = $db->f(0);
@ -126,8 +126,8 @@
switch ($action) { switch ($action) {
case 'sp': // details of parent case 'sp': // details of parent
$phpgw->template->set_var( $phpgw->info->infoHeaders( )); $phpgw->template->set_var( $phpgw->infolog->infoHeaders( ));
$phpgw->template->set_var( $phpgw->info->formatInfo( $info_id )); $phpgw->template->set_var( $phpgw->infolog->formatInfo( $info_id ));
$phpgw->template->parse('projdetailshandle','projdetails',True); $phpgw->template->parse('projdetailshandle','projdetails',True);
break; break;
case 'addr': case 'addr':
@ -139,7 +139,7 @@
// =========================================== // ===========================================
// nextmatch variable template-declarations // nextmatch variable template-declarations
// =========================================== // ===========================================
$next_matchs = $phpgw->nextmatchs->show_tpl('/info/index.php',$start,$total, $next_matchs = $phpgw->nextmatchs->show_tpl('/infolog/index.php',$start,$total,
"&order=$order&filter=$filter&sort=$sort&query=$query&action=$action&info_id=$info_id&cat_id=$cat_id", "&order=$order&filter=$filter&sort=$sort&query=$query&action=$action&info_id=$info_id&cat_id=$cat_id",
'95%',$phpgw_info['theme']['th_bg']); '95%',$phpgw_info['theme']['th_bg']);
$phpgw->template->set_var(next_matchs,$next_matchs); $phpgw->template->set_var(next_matchs,$next_matchs);
@ -147,13 +147,13 @@
$limit = $db->limit($start); $limit = $db->limit($start);
$db->query($q="SELECT * FROM info WHERE $filtermethod $pid $sql_query $ordermethod $limit",__LINE__,__FILE__); $db->query($q="SELECT * FROM infolog WHERE $filtermethod $pid $sql_query $ordermethod $limit",__LINE__,__FILE__);
while ($db->next_record()) { while ($db->next_record()) {
// ======================================== // ========================================
// check if actual project has subprojects // check if actual project has subprojects
// ======================================== // ========================================
$db2->query("select count(*) as cnt from info where info_id_parent=" .$db->f('info_id'),__LINE__,__FILE__); $db2->query("select count(*) as cnt FROM infolog where info_id_parent=" .$db->f('info_id'),__LINE__,__FILE__);
$db2->next_record(); $db2->next_record();
if ($db2->f('cnt') > 0) { if ($db2->f('cnt') > 0) {
$subproact = 1; $subproact = 1;
@ -164,20 +164,20 @@
$phpgw->nextmatchs->template_alternate_row_color(&$phpgw->template); $phpgw->nextmatchs->template_alternate_row_color(&$phpgw->template);
$phpgw->template->set_var( $phpgw->info->formatInfo( $db->Record,$proj_id,$addr_id )); $phpgw->template->set_var( $phpgw->infolog->formatInfo( $db->Record,$proj_id,$addr_id ));
if ($phpgw->info->check_access($db->f('info_id'),PHPGW_ACL_EDIT)) { if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_EDIT)) {
$phpgw->template->set_var('edit','<a href="' . $phpgw->link('/info/edit.php','info_id=' . $db->f('info_id') $phpgw->template->set_var('edit','<a href="' . $phpgw->link('/infolog/edit.php','info_id=' . $db->f('info_id')
. '&sort=' . $sort . '&order=' . $order . '&query=' . $query . '&start=' . $start . '&filter=' . $filter) . '&sort=' . $sort . '&order=' . $order . '&query=' . $query . '&start=' . $start . '&filter=' . $filter)
. '">' . $phpgw->info->icon('action','edit') . '</a>'); . '">' . $phpgw->infolog->icon('action','edit') . '</a>');
} else { } else {
$phpgw->template->set_var('edit',''); $phpgw->template->set_var('edit','');
} }
if ($phpgw->info->check_access($db->f('info_id'),PHPGW_ACL_DELETE)) { if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_DELETE)) {
$phpgw->template->set_var('delete','<a href="' . $phpgw->link('/info/delete.php','info_id=' . $db->f('info_id') $phpgw->template->set_var('delete','<a href="' . $phpgw->link('/infolog/delete.php','info_id=' . $db->f('info_id')
. '&sort=' . $sort . '&order=' . $order . '&query=' . $query . '&start=' . $start . '&filter=' . $filter) . '&sort=' . $sort . '&order=' . $order . '&query=' . $query . '&start=' . $start . '&filter=' . $filter)
. '">' . $phpgw->info->icon('action','delete') . '</a>'); . '">' . $phpgw->infolog->icon('action','delete') . '</a>');
} else { } else {
$phpgw->template->set_var('delete',''); $phpgw->template->set_var('delete','');
} }
@ -186,17 +186,17 @@
$phpgw->template->set_var('viewparent', ''); $phpgw->template->set_var('viewparent', '');
if ($subproact > 0) { // if subprojects exist, display VIEW SUB icon if ($subproact > 0) { // if subprojects exist, display VIEW SUB icon
$phpgw->template->set_var('viewsub', '<a href="' . $phpgw->link('/info/index.php','info_id=' . $db->f('info_id') $phpgw->template->set_var('viewsub', '<a href="' . $phpgw->link('/infolog/index.php','info_id=' . $db->f('info_id')
. "&filter=$filter&action=sp") . '">' . $phpgw->info->icon('action','view') . '</a>'); . "&filter=$filter&action=sp") . '">' . $phpgw->infolog->icon('action','view') . '</a>');
} else { // else display ADD SUB-Icon } else { // else display ADD SUB-Icon
if ($phpgw->info->check_access($db->f('info_id'),PHPGW_ACL_ADD)) { if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_ADD)) {
$phpgw->template->set_var('subadd', '<a href="' . $phpgw->link('/info/edit.php','info_id=' . $db->f('info_id') . $phpgw->template->set_var('subadd', '<a href="' . $phpgw->link('/infolog/edit.php','info_id=' . $db->f('info_id') .
'&filter=' . $filter . '&action=sp') . '">' . $phpgw->info->icon('action','new') . '</a>'); '&filter=' . $filter . '&action=sp') . '">' . $phpgw->infolog->icon('action','new') . '</a>');
} }
} // if parent --> display VIEW SUBS of Parent } // if parent --> display VIEW SUBS of Parent
if ($db->f('info_id_parent') && $action != 'sp') { if ($db->f('info_id_parent') && $action != 'sp') {
$phpgw->template->set_var('viewparent', '<a href="' . $phpgw->link('/info/index.php','info_id=' . $db->f('info_id_parent') . $phpgw->template->set_var('viewparent', '<a href="' . $phpgw->link('/infolog/index.php','info_id=' . $db->f('info_id_parent') .
"&filter=$filter&action=sp") . '">' . $phpgw->info->icon('action','parent') . '</a>'); "&filter=$filter&action=sp") . '">' . $phpgw->infolog->icon('action','parent') . '</a>');
} }
$phpgw->template->parse('list','info_list',True); $phpgw->template->parse('list','info_list',True);
@ -209,14 +209,14 @@
if ($action) { if ($action) {
$phpgw->template->set_var('lang_back2projects', '<br><a href="' . $phpgw->template->set_var('lang_back2projects', '<br><a href="' .
$phpgw->link('/info/index.php',"filter=$filter"). $phpgw->link('/infolog/index.php',"filter=$filter").
'">'.lang('Back to Projectlist').'</a>'); '">'.lang('Back to Projectlist').'</a>');
} }
// get actual date and year for matrixview arguments // get actual date and year for matrixview arguments
/* $year = date('Y'); /* $year = date('Y');
$month = date('m'); $month = date('m');
$phpgw->template->set_var('lang_matrixviewhref', '<br><a href="' . $phpgw->link('/info/graphview.php',"month=$month&year=$year&filter=$filter"). $phpgw->template->set_var('lang_matrixviewhref', '<br><a href="' . $phpgw->link('/infolog/graphview.php',"month=$month&year=$year&filter=$filter").
'">'.lang('View Matrix of actual Month').'</a>'); */ '">'.lang('View Matrix of actual Month').'</a>'); */
// ============================================ // ============================================
// template declaration for Add Form // template declaration for Add Form

View File

@ -1,9 +1,9 @@
<?php <?php
// include('../version.inc.php'); // include('../version.inc.php');
$phpgw_info['setup']['info']['name'] = 'info'; $phpgw_info['setup']['info']['name'] = 'infolog';
$phpgw_info['setup']['info']['version'] = "0.1"; $phpgw_info['setup']['info']['version'] = "0.1";
$phpgw_info['setup']['info']['app_order'] = 1; $phpgw_info['setup']['info']['app_order'] = 1;
$phpgw_info['setup']['info']['tables'] = "info"; $phpgw_info['setup']['info']['tables'] = 'infolog';
$hooks = Array(); $hooks = Array();
$hooks_string = implode (',', $hooks); $hooks_string = implode (',', $hooks);
$phpgw_info['setup']['info']['hooks'] = $hooks_string; $phpgw_info['setup']['info']['hooks'] = $hooks_string;

View File

@ -1,3 +1,3 @@
<?php <?php
$setup_info["info"] = array("name" => "InfoLog", "app_order" => 1, "version" => "0.1"); $setup_info['infolog'] = array('name' => 'InfoLog', 'app_order' => 1, 'version' => '0.1');
?> ?>