using new html-class

This commit is contained in:
Ralf Becker 2001-06-04 18:26:46 +00:00
parent 2c0c0d2a40
commit fcb828bc8d
9 changed files with 533 additions and 528 deletions

View File

@ -21,35 +21,27 @@
); );
include('../header.inc.php'); include('../header.inc.php');
$phpgw->infolog = CreateObject('infolog.infolog');
$html = $phpgw->infolog->html;
$hidden_vars = array( 'sort' => $sort,'order' => $order,'query' => $query,'start' => $start,
'filter' => $filter,'cat_id' => $cat_id );
if (! $info_id) { if (! $info_id) {
Header('Location: ' . $phpgw->link('/infolog/index.php',"&sort=$sort&order=$order&query=$query&start=$start" Header('Location: ' . $html->link('/infolog/index.php',$hidden_vars));
. "&filter=$filter&cat_id=$cat_id"));
} }
$phpgw->infolog = createobject('infolog.infolog');
if (! $phpgw->infolog->check_access($info_id,PHPGW_ACL_DELETE)) { if (! $phpgw->infolog->check_access($info_id,PHPGW_ACL_DELETE)) {
Header('Location: ' . $phpgw->link('/infolog/index.php',"&sort=$sort&order=$order&query=$query&start=$start" Header('Location: ' . $html->link('/infolog/index.php',$hidden_vars));
. "&filter=$filter&cat_id$cat_id"));
} }
if ($confirm) { if ($confirm) {
$phpgw->infolog->delete($info_id); $phpgw->infolog->delete($info_id);
Header('Location: ' . $phpgw->link('/infolog/index.php',"cd=16&sort=$sort&order=$order&query=$query&start=" Header('Location: ' . $html->link('/infolog/index.php',$hidden_vars + array( 'cd' => 16 )));
. "$start&filter=$filter&cat_id=$cat_id"));
} else { } else {
$phpgw->common->phpgw_header(); $phpgw->common->phpgw_header();
echo parse_navbar(); echo parse_navbar();
$common_hidden_vars = $t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
"<input type=\"hidden\" name=\"sort\" value=\"$sort\">\n"
. "<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
. "<input type=\"hidden\" name=\"query\" value=\"$query\">\n"
. "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n";
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
$t->set_file(array( 'info_delete' => 'delete.tpl' )); $t->set_file(array( 'info_delete' => 'delete.tpl' ));
$t->set_var( $phpgw->infolog->setStyleSheet( )); $t->set_var( $phpgw->infolog->setStyleSheet( ));
$t->set_var( $phpgw->infolog->infoHeaders( )); $t->set_var( $phpgw->infolog->infoHeaders( ));
@ -57,23 +49,9 @@
$t->set_var('lang_info_action',lang('Info Log - Delete')); $t->set_var('lang_info_action',lang('Info Log - Delete'));
$t->set_var('deleteheader',lang('Are you sure you want to delete this entry')); $t->set_var('deleteheader',lang('Are you sure you want to delete this entry'));
$t->set_var('no_button',$html->form_1button('no_button','No - Cancel','','/infolog/index.php',$hidden_vars));
$nolinkf = $phpgw->link('/infolog/index.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter"); $t->set_var('yes_button',$html->form_1button('yes_button','Yes - Delete','','/infolog/delete.php',
$nolink = '<a href="' . $nolinkf . '">' . lang('No') .'</a>'; $hidden_vars + array('info_id' => $info_id,'confirm' => 'True')));
$t->set_var('nolink',$nolink);
$t->set_var('cancel_action',$nolinkf);
$t->set_var('lang_cancel',lang('No - Cancel'));
$yeslinkf = $phpgw->link('/infolog/delete.php',"info_id=$info_id&confirm=True&sort="
. "$sort&order=$order&query=$query&start=$start&filter=$filter");
$yeslink = '<a href="' . $yeslinkf . '">' . lang('Yes') . '</a>';
$t->set_var('yeslink',$yeslink);
$t->set_var('delete_action',$yeslinkf);
$t->set_var('lang_delete',lang('Yes - Delete'));
$t->pfp('out','info_delete'); $t->pfp('out','info_delete');
$phpgw->common->phpgw_footer(); $phpgw->common->phpgw_footer();

View File

@ -21,13 +21,16 @@
'enable_categories_class' => True 'enable_categories_class' => True
); );
include('../header.inc.php'); include('../header.inc.php');
$phpgw->infolog = CreateObject('infolog.infolog');
$html = $phpgw->infolog->html;
if ((!isset($info_id) || !$info_id) && !$action) { $hidden_vars = array( '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&". 'cat_id' => $cat_id );
"filter=$filter&cat_id=$cat_id"));
if ((!isset($info_id) || !$info_id) && !$action) {
Header('Location: ' . $html->link('/infolog/index.php',$hidden_vars));
} }
$phpgw->infolog = createobject('infolog.infolog');
if ($save || $add) { if ($save || $add) {
if (strlen($des) >= 8000) { if (strlen($des) >= 8000) {
@ -39,9 +42,9 @@
// check wether to write dates or not // check wether to write dates or not
if ($selfortoday) { if ($selfortoday) {
$startdate = time(); // startdate is today (checkbox is clicked) $startdate = time(); // startdate is today (checkbox is clicked)
} else { } else {
if ($smonth || $sday || $syear) { if ($sday) {
if ($sday && !$smonth) $smonth = date('m',time()); if ($sday && !$smonth) $smonth = date('m',time());
if ($sday && !$syear) $syear = date('Y',time()); if ($sday && !$syear) $syear = date('Y',time());
if (! checkdate($smonth,$sday,$syear)) { if (! checkdate($smonth,$sday,$syear)) {
@ -51,14 +54,14 @@
} }
} else { } else {
$startdate = 0; $startdate = 0;
} }
} }
// Check ending date // Check ending date
if ($dur_days > 0) { if ($dur_days > 0) {
$enddate = mktime(12,0,0,date('m',$startdate), date('d',$startdate)+$dur_days, date('Y',$startdate)); $enddate = mktime(12,0,0,date('m',$startdate), date('d',$startdate)+$dur_days, date('Y',$startdate));
} else } else
if ($emonth || $eday || $eyear) { if ($eday) {
if ($eday && !$emonth) $emonth = date('m',time()); if ($eday && !$emonth) $emonth = date('m',time());
if ($eday && !$eyear) $eyear = date('Y',time()); if ($eday && !$eyear) $eyear = date('Y',time());
if (!checkdate($emonth,$eday,$eyear)) { if (!checkdate($emonth,$eday,$eyear)) {
@ -82,16 +85,16 @@
if (! is_array($error)) { if (! is_array($error)) {
$phpgw->infolog->write(array( $phpgw->infolog->write(array(
'type' => $type, 'type' => $type,
'from' => $from, 'from' => $from,
'addr' => $addr, 'addr' => $addr,
'addr_id' => $id_addr, 'addr_id' => $id_addr,
'proj_id' => $id_project, 'proj_id' => $id_project,
'subject' => $subject, 'subject' => $subject,
'des' => $des, 'des' => $des,
'pri' => $pri, 'pri' => $pri,
'status' => $status, 'status' => $status,
'confirm' => $confirm, 'confirm' => $confirm,
'access' => $access, 'access' => $access,
'cat' => $info_cat, 'cat' => $info_cat,
'startdate' => $startdate, 'startdate' => $startdate,
@ -102,15 +105,14 @@
)); ));
if (!$query_addr && !$query_project) { if (!$query_addr && !$query_project) {
Header('Location: ' . $phpgw->link('/infolog/index.php', "cd=15&sort=$sort&order=$order&query=$query&". Header('Location: ' . $html->link('/infolog/index.php', $hidden_vars + array( 'cd' => 15 )));
"start=$start&filter=$filter&cat_id=$cat_id")); }
}
} }
} }
$phpgw->infolog->read( $info_id ); $phpgw->infolog->read( $info_id );
if ($info_id && $action == 'sp') { // new SubProject if ($info_id && $action == 'sp') { // new SubProject
if (!$phpgw->infolog->check_access($info_id,PHPGW_ACL_ADD)) { if (!$phpgw->infolog->check_access($info_id,PHPGW_ACL_ADD)) {
Header('Location: ' . $phpgw->link('/infolog/index.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter")); Header('Location: ' . $html->link('/infolog/index.php',$hidden_vars));
$phpgw->common->phpgw_exit(); $phpgw->common->phpgw_exit();
} }
$parent = $phpgw->infolog->data; $parent = $phpgw->infolog->data;
@ -119,7 +121,7 @@
$phpgw->infolog->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->infolog->data['info_type'] = 'confirm'; $phpgw->infolog->data['info_type'] = 'confirm';
$phpgw->infolog->data['info_responsible'] = $parent['info_owner']; // confirmation to parent $phpgw->infolog->data['info_responsible'] = $parent['info_owner']; // confirmation to parent
} }
$phpgw->infolog->data['info_status'] = 'ongoing'; $phpgw->infolog->data['info_status'] = 'ongoing';
$phpgw->infolog->data['info_confirm'] = 'not'; $phpgw->infolog->data['info_confirm'] = 'not';
@ -127,32 +129,23 @@
$phpgw->infolog->data['info_des'] = ''; $phpgw->infolog->data['info_des'] = '';
} else { } else {
if ($info_id && !$phpgw->infolog->check_access($info_id,PHPGW_ACL_EDIT)) { if ($info_id && !$phpgw->infolog->check_access($info_id,PHPGW_ACL_EDIT)) {
Header('Location: ' . $phpgw->link('/infolog/index.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter")); Header('Location: ' . $html->link('/infolog/index.php',$hidden_vars));
$phpgw->common->phpgw_exit(); $phpgw->common->phpgw_exit();
} }
} }
$common_hidden_vars = $id_parent = $phpgw->infolog->data['info_id_parent'];
'<input type="hidden" name="sort" value="' . $sort . '">' $common_hidden_vars = $html->input_hidden( $hidden_vars +
. '<input type="hidden" name="order" value="' . $order. '">' array('info_id' => $info_id,'action' => $action,'id_parent' => $id_parent ));
. '<input type="hidden" name="query" value="' . $query . '">'
. '<input type="hidden" name="start" value="' . $start . '">'
. '<input type="hidden" name="filter" value="' . $filter . '">'
. '<input type="hidden" name="info_id" value="' . $info_id. '">'
. '<input type="hidden" name="id_parent" value="' . ($id_parent = $phpgw->infolog->data['info_id_parent']). '">'
. '<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 phpgw_infolog where info_id='$info_id'");
$phpgw->db->next_record();
$pri_selected[$phpgw->infolog->data['info_pri']] = ' selected'; $pri_selected[$phpgw->infolog->data['info_pri']] = ' selected';
$status_selected[$phpgw->infolog->data['info_status']] = ' selected'; $status_selected[$phpgw->infolog->data['info_status']] = ' selected';
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); $t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
$t->set_file(array('info_edit' => 'form.tpl')); $t->set_file(array('info_edit' => 'form.tpl'));
// ==================================================================== // ====================================================================
// create two seperate blocks, addblock will be cut off from template // create two seperate blocks, addblock will be cut off from template
// editblock contains the buttons and forms for edit // editblock contains the buttons and forms for edit
@ -160,7 +153,7 @@
$t->set_block('info_edit', 'add', 'addhandle'); $t->set_block('info_edit', 'add', 'addhandle');
$t->set_block('info_edit', 'edit', 'edithandle'); $t->set_block('info_edit', 'edit', 'edithandle');
$t->set_block('info_edit', 'subpro', 'subprohandle'); $t->set_block('info_edit', 'subpro', 'subprohandle');
if (is_array($error)) { if (is_array($error)) {
$t->set_var('error_list',$phpgw->common->error_list($error)); $t->set_var('error_list',$phpgw->common->error_list($error));
} }
@ -168,7 +161,10 @@
case 'sp': case 'sp':
$info_action = 'Info Log - New Subproject'; break; $info_action = 'Info Log - New Subproject'; break;
case 'new': case 'new':
$info_action = 'Info Log - New'; break; $info_action = 'Info Log - New';
if ($info_type && isset($phpgw->infolog->enums['type'][$info_type]))
$phpgw->infolog->data['info_type'] = $info_type;
break;
default: default:
$info_action = 'Info Log - Edit'; break; $info_action = 'Info Log - Edit'; break;
} }
@ -181,86 +177,62 @@
$t->set_var('actionurl',$phpgw->link('/infolog/edit.php')); $t->set_var('actionurl',$phpgw->link('/infolog/edit.php'));
$t->set_var('common_hidden_vars',$common_hidden_vars); $t->set_var('common_hidden_vars',$common_hidden_vars);
$sb2 = CreateObject('phpgwapi.sbox2'); // get an instance of select box class
$sb = CreateObject('phpgwapi.sbox2');
$t->set_var('lang_owner',lang('Owner')); $t->set_var('lang_owner',lang('Owner'));
$t->set_var('owner_info',$sb2->accountInfo($phpgw->infolog->data['info_owner'])); $t->set_var('owner_info',$sb->accountInfo($phpgw->infolog->data['info_owner']));
$t->set_var('lang_type',lang('Type')); $t->set_var('lang_type',lang('Type'));
$t->set_var('type_list',$sb2->getArrayItem('type',$phpgw->infolog->data['info_type'],$phpgw->infolog->enums['type'])); $t->set_var('type_list',$sb->getArrayItem('type',$phpgw->infolog->data['info_type'],$phpgw->infolog->enums['type']));
$t->set_var('lang_prfrom', lang('From')); $t->set_var('lang_prfrom', lang('From'));
$t->set_var('fromval', $phpgw->strip_html($phpgw->infolog->data['info_from'])); $t->set_var('fromval', $phpgw->strip_html($phpgw->infolog->data['info_from']));
$t->set_var('lang_praddr', lang('Phone/Email')); $t->set_var('lang_praddr', lang('Phone/Email'));
$t->set_var('addrval', $phpgw->strip_html($phpgw->infolog->data['info_addr'])); $t->set_var('addrval', $phpgw->strip_html($phpgw->infolog->data['info_addr']));
$t->set_var($sb2->getProject('project',$phpgw->infolog->data['info_proj_id'],$query_project)); $t->set_var($sb->getProject('project',$phpgw->infolog->data['info_proj_id'],$query_project));
$t->set_var($sb2->getAddress('addr',$phpgw->infolog->data['info_addr_id'],$query_addr)); $t->set_var($sb->getAddress('addr',$phpgw->infolog->data['info_addr_id'],$query_addr));
$t->set_var('lang_prsubject', lang('Subject')); $t->set_var('lang_prsubject', lang('Subject'));
$t->set_var('subjectval', $phpgw->strip_html($phpgw->infolog->data['info_subject'])); $t->set_var('subjectval', $phpgw->strip_html($phpgw->infolog->data['info_subject']));
$t->set_var('lang_prdesc', lang('Description')); $t->set_var('lang_prdesc', lang('Description'));
$t->set_var('descval', $phpgw->strip_html($phpgw->infolog->data['info_des'])); $t->set_var('descval', $phpgw->strip_html($phpgw->infolog->data['info_des']));
// get month/day/year fields for startdate and enddate
if ($phpgw->infolog->data['info_startdate'] == 0) {
$sday = $smonth = $syear = 0;
} else {
$sday = date('d',$phpgw->infolog->data['info_startdate']);
$smonth = date('m',$phpgw->infolog->data['info_startdate']);
$syear = date('Y',$phpgw->infolog->data['info_startdate']);
}
if ($phpgw->infolog->data['info_enddate'] == 0) {
$eday = $emonth = $eyear = 0;
} else {
$eday = date('d',$phpgw->infolog->data['info_enddate']);
$emonth = date('m',$phpgw->infolog->data['info_enddate']);
$eyear = date('Y',$phpgw->infolog->data['info_enddate']);
}
// get an instance of select box class
$sm = CreateObject('phpgwapi.sbox');
$t->set_var('lang_start_date',lang('Start Date')); $t->set_var('lang_start_date',lang('Start Date'));
$t->set_var('start_select_date',$phpgw->common->dateformatorder($sm->getYears('syear',$syear,$syear<date('Y')?$syear:date('Y')-2), $t->set_var('start_select_date',$sb->getDate('syear','smonth','sday',$phpgw->infolog->data['info_startdate']));
$sm->getMonthText('smonth', $smonth),$sm->getDays('sday', $sday)));
$t->set_var('lang_end_date',lang('End Date')); $t->set_var('lang_end_date',lang('End Date'));
$t->set_var('end_select_date',$phpgw->common->dateformatorder($sm->getYears('eyear', $eyear,$eyear<date('Y')?$eyear:date('Y')-2), $t->set_var('end_select_date',$sb->getDate('eyear','emonth','eday',$phpgw->infolog->data['info_enddate']));
$sm->getMonthText('emonth', $emonth),$sm->getDays('eday', $eday)));
$t->set_var('lang_selfortoday',lang('Today')); $t->set_var('lang_selfortoday',lang('Today'));
$t->set_var('selfortoday','<input type="checkbox" name="selfortoday" value="True">&nbsp;'); $t->set_var('selfortoday',$html->checkbox('selfortoday',0));
$t->set_var('lang_dur_days',lang('Duration')); $t->set_var('lang_dur_days',lang('Duration'));
$t->set_var('days',lang('days')); $t->set_var('days',lang('days'));
$t->set_var('lang_status',lang('Status')); $t->set_var('lang_status',lang('Status'));
$t->set_var('status_list',$sb2->getArrayItem('status',$phpgw->infolog->data['info_status'],$phpgw->infolog->enums['status'])); $t->set_var('status_list',$sb->getArrayItem('status',$phpgw->infolog->data['info_status'],$phpgw->infolog->enums['status']));
$t->set_var('lang_priority',lang('Priority')); $t->set_var('lang_priority',lang('Priority'));
$t->set_var('priority_list',$sb2->getArrayItem('pri',$phpgw->infolog->data['info_pri'],$phpgw->infolog->enums['priority'])); $t->set_var('priority_list',$sb->getArrayItem('pri',$phpgw->infolog->data['info_pri'],$phpgw->infolog->enums['priority']));
$t->set_var('lang_confirm',lang('Confirm')); $t->set_var('lang_confirm',lang('Confirm'));
$t->set_var('confirm_list',$sb2->getArrayItem('confirm',$phpgw->infolog->data['info_confirm'],$phpgw->infolog->enums['confirm'])); $t->set_var('confirm_list',$sb->getArrayItem('confirm',$phpgw->infolog->data['info_confirm'],$phpgw->infolog->enums['confirm']));
$t->set_var('lang_responsible',lang('Responsible')); $t->set_var('lang_responsible',lang('Responsible'));
$t->set_var('responsible_list',$sb2->getAccount('responsible',$phpgw->infolog->data['info_responsible'])); $t->set_var('responsible_list',$sb->getAccount('responsible',$phpgw->infolog->data['info_responsible']));
$t->set_var('lang_access_type',lang('Private')); $t->set_var('lang_access_type',lang('Private'));
$t->set_var('access_list', '<input type="checkbox" name="access" value="True"' . ($phpgw->infolog->data['info_access'] == 'private'?' checked':'') . '>'); $t->set_var('access_list',$html->checkbox('access',$phpgw->infolog->data['info_access'] == 'private'));
$t->set_var('delete_action',$phpgw->link('/infolog/delete.php')); $t->set_var('edit_button',$html->submit_button('save','Save'));
$t->set_var('edit_button','<input type="submit" name="save" value="' . lang('Save') . '">');
if (!$action && $phpgw->infolog->check_access($info_id,PHPGW_ACL_DELETE)) { if (!$action && $phpgw->infolog->check_access($info_id,PHPGW_ACL_DELETE)) {
$t->set_var('delete_button','<input type="submit" name="delete" value="' . lang('Delete') . '">'); $t->set_var('delete_button',$html->form_1button('delete','Delete',$hidden_vars,'/infolog/delete.php'));
} }
$t->set_var('edithandle',''); $t->set_var('edithandle','');
$t->set_var('addhandle',''); $t->set_var('addhandle','');
$t->set_var('subprohandle',''); $t->set_var('subprohandle','');
$t->pfp('out','info_edit'); $t->pfp('out','info_edit');
$t->pfp('edithandle','edit'); $t->pfp('edithandle','edit');
// I would like to have it calculate the amount of days and drop it in days from now.
$phpgw->common->phpgw_footer(); $phpgw->common->phpgw_footer();
echo parse_navbar_end(); echo parse_navbar_end();

View File

@ -0,0 +1,70 @@
<?php
/**************************************************************************\
* phpGroupWare - InfoLog *
* 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 *
* 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. *
\**************************************************************************/
/* $Id$ */
class html
{
function input_hidden($vars,$value='')
{
if (!is_array($vars))
{
$vars = array( $vars => $value );
}
while (list($name,$value) = each($vars))
{
if ($value != '') // dont need to send all the empty vars
{
$html .= "<input type=hidden name=\"$name\" value=\"$value\">\n";
}
}
return $html;
}
function submit_button($name,$lang)
{
return "<input type=\"submit\" name=\"$name\" value=\"".lang($lang)."\">\n";
}
function link($url,$vars='')
{
global $phpgw;
if (is_array( $vars ))
{
$v = array( );
while(list($name,$value) = each($vars))
{
if ($value != '') // dont need to send all the empty vars
{
$v[] = "$name=$value";
}
}
$vars = implode('&',$v);
}
return $phpgw->link($url,$vars);
}
function checkbox($name,$value='')
{
return "<input type=\"checkbox\" name=\"$name\" value=\"True\"" .($value ? ' checked' : '') . ">\n";
}
function form_1button($name,$lang,$hidden_vars,$url,$url_vars='',$method='POST')
{
$html = "<form method=\"$method\" action=\"".$this->link($url,$url_vars)."\">\n";
$html .= $this->input_hidden($hidden_vars);
$html .= $this->submit_button($name,$lang);
$html .= "</form>\n";
return $html;
}
}

View File

@ -26,37 +26,39 @@
$this->db = $phpgw->db; $this->db = $phpgw->db;
$this->grants = $phpgw->acl->get_grants('infolog'); $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' ),
'confirm' => array( 'not' => 'not','accept' => 'accept','finish' => 'finish','both' => 'both' ), 'confirm' => array( 'not' => 'not','accept' => 'accept','finish' => 'finish','both' => 'both' ),
'type' => array( 'task' => 'task','phone' => 'phone','note' => 'note','confirm' => 'confirm', 'type' => array( 'task' => 'task','phone' => 'phone','note' => 'note','confirm' => 'confirm',
'reject' => 'reject','email' => 'email','fax' => 'fax' )); 'reject' => 'reject','email' => 'email','fax' => 'fax' ));
$this->icons = array( 'type' => array( 'task' => 'task.gif', 'task_alt' => 'Task', $this->icons = array( 'type' => array( 'task' => 'task.gif', 'task_alt' => 'Task',
'phone' => 'phone.gif', 'phone_alt' => 'Phonecall', 'phone' => 'phone.gif', 'phone_alt' => 'Phonecall',
'note' => 'note.gif', 'note_alt' => 'Note', 'note' => 'note.gif', 'note_alt' => 'Note',
'confirm' => 'confirm.gif','confirm_alt' => 'Confirmation', 'confirm' => 'confirm.gif','confirm_alt' => 'Confirmation',
'reject' => 'reject.gif', 'reject_alt' => 'Reject', 'reject' => 'reject.gif', 'reject_alt' => 'Reject',
'email' => 'email.gif', 'email_alt' => 'Email' ), 'email' => 'email.gif', 'email_alt' => 'Email' ),
'action' => array( 'new' => 'new.gif', 'new_alt' => 'Add Sub', 'action' => array( 'new' => 'new.gif', 'new_alt' => 'Add Sub',
'view' => 'view.gif', 'view_alt' => 'View Subs', 'view' => 'view.gif', 'view_alt' => 'View Subs',
'parent' => 'parent.gif', 'parent_alt' => 'View other Subs', 'parent' => 'parent.gif', 'parent_alt' => 'View other Subs',
'edit' => 'edit.gif', 'edit_alt' => 'Edit', 'edit' => 'edit.gif', 'edit_alt' => 'Edit',
'delete' => 'delete.gif', 'delete_alt' => 'Delete' ), 'delete' => 'delete.gif', 'delete_alt' => 'Delete' ),
'status' => array( 'billed' => 'billed.gif', 'billed_alt' => 'billed', 'status' => array( 'billed' => 'billed.gif', 'billed_alt' => 'billed',
'done' => 'done.gif', 'done_alt' => 'done', 'done' => 'done.gif', 'done_alt' => 'done',
'will-call' => 'will-call.gif', 'will-call_alt' => 'will-call', 'will-call' => 'will-call.gif', 'will-call_alt' => 'will-call',
'call' => 'call.gif', 'call_alt' => 'call', 'call' => 'call.gif', 'call_alt' => 'call',
'ongoing' => 'ongoing.gif','ongoing_alt' => 'ongoing', 'ongoing' => 'ongoing.gif','ongoing_alt' => 'ongoing',
'offer' => 'offer.gif', 'offer_alt' => 'offer' )); 'offer' => 'offer.gif', 'offer_alt' => 'offer' ));
$this->longnames = 0; // should go into preferences $this->longnames = 0; // should go into preferences
$this->listChilds = 1; $this->listChilds = 1;
$this->html = CreateObject('infolog.html');
$this->read( $info_id); $this->read( $info_id);
} }
function icon($cat,$id,$status='') { function icon($cat,$id,$status='') {
// echo "<br>icon('$cat','$id','$status')"; // echo "<br>icon('$cat','$id','$status')";
global $phpgw,$DOCUMENT_ROOT; global $phpgw,$DOCUMENT_ROOT;
$icons = &$this->icons[$cat]; $icons = &$this->icons[$cat];
@ -66,23 +68,23 @@
if ($icon) { if ($icon) {
$fname = $phpgw->common->get_image_dir() . '/' . $icon; $fname = $phpgw->common->get_image_dir() . '/' . $icon;
if (!is_readable($fname)) { if (!is_readable($fname)) {
$icon = False; // echo "<br>Can't read '$fname' !!!"; $icon = False; // echo "<br>Can't read '$fname' !!!";
} else { } else {
$icon = $phpgw->common->get_image_path() . '/' . $icon; $icon = $phpgw->common->get_image_path() . '/' . $icon;
} }
} }
if (!$status || !($alt = $icons[$id.'_'.$status.'_alt'])) if (!$status || !($alt = $icons[$id.'_'.$status.'_alt']))
if (!($alt = $icons[$id.'_alt'])) if (!($alt = $icons[$id.'_alt']))
$alt = $id; $alt = $id;
return ($icon ? "<img src='$icon' alt='" : '') . lang($alt) . ($icon ? '\' border=0>' : ''); return ($icon ? "<img src='$icon' alt='" : '') . lang($alt) . ($icon ? '\' border=0>' : '');
} }
function setStyleSheet( ) { function setStyleSheet( ) {
global $phpgw; global $phpgw;
return array ( 'info_css' => '<link rel="stylesheet" type="text/css" href="'. return array ( 'info_css' => '<link rel="stylesheet" type="text/css" href="'.
str_replace( '/images','',$phpgw->common->get_image_path()).'/info.css">' ); str_replace( '/images','',$phpgw->common->get_image_path()).'/info.css">' );
} }
function loadStyleSheet( ) { function loadStyleSheet( ) {
list( $style ) = $this->setStyleSheet(); echo $style; list( $style ) = $this->setStyleSheet(); echo $style;
@ -100,10 +102,10 @@
$account_data = $accounts->data; $account_data = $accounts->data;
} }
if ($longnames) if ($longnames)
return $account_data['firstname'].' '.$account_data['lastname']; return $account_data['firstname'].' '.$account_data['lastname'];
return $account_data['account_lid']; return $account_data['account_lid'];
} }
function addr2name( $addr ) { function addr2name( $addr ) {
global $phpgw; global $phpgw;
@ -115,49 +117,51 @@
$name .= ', '.$addr['n_prefix']; $name .= ', '.$addr['n_prefix'];
if ($addr['org_name']) if ($addr['org_name'])
$name = $addr['org_name'].': '.$name; $name = $addr['org_name'].': '.$name;
return $phpgw->strip_html($name); return $phpgw->strip_html($name);
} }
function readProj($proj_id) { function readProj($proj_id) {
if ($proj_id) { if ($proj_id) {
if (!is_object($this->projects)) { if (!is_object($this->projects)) {
$this->projects = createobject('projects.projects'); $this->projects = createobject('projects.projects');
} }
if (list( $proj ) = $this->projects->read_single_project( $proj_id )) if (list( $proj ) = $this->projects->read_single_project( $proj_id ))
return $proj; return $proj;
} }
return False; return False;
} }
function readAddr($addr_id) { function readAddr($addr_id) {
if ($addr_id) { if ($addr_id) {
if (!is_object($this->contacts)) { if (!is_object($this->contacts)) {
$this->contacts = createobject('phpgwapi.contacts'); $this->contacts = createobject('phpgwapi.contacts');
} }
if (list( $addr ) = $this->contacts->read_single_entry( $addr_id )) if (list( $addr ) = $this->contacts->read_single_entry( $addr_id ))
return $addr; return $addr;
} }
return False; return False;
} }
function formatInfo($info=0,$p_id=0,$a_id=0) { // $info: info_id or array with one row form info-db function formatInfo($info=0,$p_id=0,$a_id=0) { // $info: info_id or array with one row form info-db
global $phpgw,$phpgw_info; // no Proj.Info if proj_id == p_id / no Addr.Info if addr_id == a_id global $phpgw,$phpgw_info; // no Proj.Info if proj_id == p_id / no Addr.Info if addr_id == a_id
if (!is_array($info) && (!$info || !is_array($info = $this->read($info)))) if (!is_array($info) && (!$info || !is_array($info = $this->read($info))))
$info = $this->data; $info = $this->data;
$done = $info['info_status'] == 'done' || $info['info_status'] == 'billed'; $done = $info['info_status'] == 'done' || $info['info_status'] == 'billed';
$css_class = $info['info_pri'].($done ? '_done' : ''); $css_class = $info['info_pri'].($done ? '_done' : '');
$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('/infolog/index.php',"filter=$filter&action=proj&proj_id=$proj_id"). $subject .= '<b><a href="'.$this->html->link('/infolog/index.php',
array( '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('/infolog/index.php',"filter=$filter&action=addr&addr_id=$addr_id"). $subject .= '<b><a href="'.$this->html->link('/infolog/index.php',
array( '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))) {
@ -170,8 +174,10 @@
} }
if ($proj || $addr || $from || $info['info_addr']) { if ($proj || $addr || $from || $info['info_addr']) {
$subject .= '<br>'; $subject .= '<br>';
} }
$subject .= '<b>'.$info['info_subject'].'</b></span>'; $subject .= '<b>';
$subject .= $info['info_subject'] ? $info['info_subject'] : substr($info['info_des'],0,60).' ...';
$subject .= '</b></span>';
if (!$info['info_enddate']) { if (!$info['info_enddate']) {
$enddate = '&nbsp;'; $enddate = '&nbsp;';
@ -184,24 +190,24 @@
if (!($responsible = $info['info_responsible']) && $info['info_status'] == 'offer') { if (!($responsible = $info['info_responsible']) && $info['info_status'] == 'offer') {
$responsible = $this->icon('status','offer'); $responsible = $this->icon('status','offer');
} else { } else {
$responsible = $this->accountInfo($responsible); $responsible = $this->accountInfo($responsible);
} }
$owner = $this->accountInfo($info['info_owner']); $owner = $this->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' => $this->icon('type',$info['info_type']), 'type' => $this->icon('type',$info['info_type']),
'status' => $this->icon('status',$info['info_status']), 'status' => $this->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'],
'startdate' => $phpgw->common->show_date($info['info_startdate'],$phpgw_info['user']['preferences']['common']['dateformat']), 'startdate' => $phpgw->common->show_date($info['info_startdate'],$phpgw_info['user']['preferences']['common']['dateformat']),
'enddate' => $enddate, 'enddate' => $enddate,
'owner' => $owner, 'owner' => $owner,
'datecreated' => $phpgw->common->show_date($info['info_datecreated'],$phpgw_info['user']['preferences']['common']['dateformat']), 'datecreated' => $phpgw->common->show_date($info['info_datecreated'],$phpgw_info['user']['preferences']['common']['dateformat']),
'responsible' => $responsible ); 'responsible' => $responsible );
} }
function infoHeaders( $do_sort_header=0,$sort=0,$order=0) { function infoHeaders( $do_sort_header=0,$sort=0,$order=0) {
global $phpgw,$phpgw_info; global $phpgw,$phpgw_info;
@ -214,22 +220,22 @@
if ($do_sort_header) { if ($do_sort_header) {
$headers['sort_'.$f] = $phpgw->nextmatchs->show_sort_order($sort,'info_'.$f,$order,'/infolog/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;
} }
} }
return $headers; return $headers;
} }
function debug( $str ) { function debug( $str ) {
/* $stdout = fopen('/tmp/log','a'); /* $stdout = fopen('/tmp/log','a');
fwrite( $stdout,"\r\n".$str ); fwrite( $stdout,"\r\n".$str );
fclose( $stdout ); */ fclose( $stdout ); */
} }
function check_access( $info_id,$required_rights ) { function check_access( $info_id,$required_rights ) {
global $phpgw_info; global $phpgw_info;
if ($info_id != $this->data['info_id']) { // already loaded? if ($info_id != $this->data['info_id']) { // already loaded?
$private_info = $this; // dont change our own internal data, dont use new as it changes $phpgw->db $private_info = $this; // dont change our own internal data, dont use new as it changes $phpgw->db
$info = $private_info->read($info_id); $info = $private_info->read($info_id);
} else { } else {
$info = $this->data; $info = $this->data;
@ -239,20 +245,20 @@
$owner = $info['info_owner']; $owner = $info['info_owner'];
$user = $phpgw_info['user']['account_id']; $user = $phpgw_info['user']['account_id'];
$access_ok = $owner == $user || // user has all rights $access_ok = $owner == $user || // user has all rights
!!($this->grants[$owner] & $required_rights) && // ACL only on public entrys || $owner granted _PRIVATE !!($this->grants[$owner] & $required_rights) && // ACL only on public entrys || $owner granted _PRIVATE
($info['info_access'] == 'public' || !!($this->grants[$owner] & PHPGW_ACL_PRIVATE)); ($info['info_access'] == 'public' || !!($this->grants[$owner] & PHPGW_ACL_PRIVATE));
// $this->debug("check_access(info_id=$info_id (owner=$owner, user=$user),required_rights=$required_rights): access".($access_ok?"Ok":"Denied")); // $this->debug("check_access(info_id=$info_id (owner=$owner, user=$user),required_rights=$required_rights): access".($access_ok?"Ok":"Denied"));
return $access_ok; return $access_ok;
} }
function aclFilter($filter = 'none') { // sql to be AND into a query to ensure ACL is respected (incl. _PRIVATE) function aclFilter($filter = 'none') { // sql to be AND into a query to ensure ACL is respected (incl. _PRIVATE)
global $phpgw_info; // filter: none - list all entrys user have rights to see global $phpgw_info; // filter: none - list all entrys user have rights to see
// private - list only his personal entrys (incl. those he is responsible for !!!) // private - list only his personal entrys (incl. those he is responsible for !!!)
if (isset($this->acl_filter[$filter])) if (isset($this->acl_filter[$filter]))
return $this->acl_filter[$filter]; // used cached filter if found return $this->acl_filter[$filter]; // used cached filter if found
if (is_array($this->grants)) { if (is_array($this->grants)) {
while (list($user,$grant) = each($this->grants)) { while (list($user,$grant) = each($this->grants)) {
@ -262,21 +268,21 @@
if ($grant & PHPGW_ACL_PRIVATE) if ($grant & PHPGW_ACL_PRIVATE)
$private_user_list[] = $user; $private_user_list[] = $user;
} }
if (count($private_user_list)) { if (count($private_user_list)) {
$has_private_access = 'info_owner IN ('.implode(',',$private_user_list).')'; $has_private_access = 'info_owner IN ('.implode(',',$private_user_list).')';
} }
} }
$user = $phpgw_info['user']['account_id']; $user = $phpgw_info['user']['account_id'];
$filtermethod = " (info_owner=$user"; // user has all rights $filtermethod = " (info_owner=$user"; // user has all rights
if ($filter == 'private') { // private means own entrys plus the one user is responsible for (and has rights to see) if ($filter == 'private') { // private means own entrys plus the one user is responsible for (and has rights to see)
$filtermethod .= " OR info_responsible=$user AND (info_access='public'".($has_private_access?" OR $has_private_access":'').')'; $filtermethod .= " OR info_responsible=$user AND (info_access='public'".($has_private_access?" OR $has_private_access":'').')';
} else { // none --> all entrys user has rights to see } else { // none --> all entrys user has rights to see
if ($has_private_access) { if ($has_private_access) {
$filtermethod .= " OR $has_private_access"; $filtermethod .= " OR $has_private_access";
} }
if (count($public_user_list)) { if (count($public_user_list)) {
$filtermethod .= " OR (info_access='public' AND info_owner IN(" . implode(',',$public_user_list) . '))'; $filtermethod .= " OR (info_access='public' AND info_owner IN(" . implode(',',$public_user_list) . '))';
} }
} }
@ -284,17 +290,17 @@
// echo "<p>aclFilter('$filter')(user='$user') = '$filtermethod'</p>"; // echo "<p>aclFilter('$filter')(user='$user') = '$filtermethod'</p>";
return $this->acl_filter[$filter] = $filtermethod; // cache the filter return $this->acl_filter[$filter] = $filtermethod; // cache the filter
} }
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 phpgw_infolog where info_id='$info_id'") || !$this->db->next_record())) (!$this->db->query("select * FROM phpgw_infolog where info_id='$info_id'") || !$this->db->next_record()))
{ {
$this->init( ); $this->init( );
return False; return False;
} }
if ($info_id != $this->data['info_id']) { // data yet read in if ($info_id != $this->data['info_id']) { // data yet read in
$this->data = $this->db->Record; $this->data = $this->db->Record;
if ($this->data['info_subject'] == (substr($this->data['info_des'],0,60).' ...')) { if ($this->data['info_subject'] == (substr($this->data['info_des'],0,60).' ...')) {
@ -302,19 +308,19 @@
} }
if ($this->data['info_addr_id'] && $this->data['info_from'] == $this->addr2name( $this->readAddr( $this->data['info_addr_id'] ))) { if ($this->data['info_addr_id'] && $this->data['info_from'] == $this->addr2name( $this->readAddr( $this->data['info_addr_id'] ))) {
$this->data['info_from'] = ''; $this->data['info_from'] = '';
} }
} }
return $this->data; return $this->data;
} }
function init() { function init() {
global $phpgw_info; global $phpgw_info;
$this->data = array( 'info_owner' => $phpgw_info['user']['account_id'], $this->data = array( 'info_owner' => $phpgw_info['user']['account_id'],
'info_pri' => 'normal' ); 'info_pri' => 'normal' );
} }
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 phpgw_infolog where info_id='$info_id' or info_id_parent='" $this->db->query("delete FROM phpgw_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 != '"
@ -322,20 +328,20 @@
. $phpgw_info['user']['account_id'] . "'))" ,__LINE__,__FILE__); . $phpgw_info['user']['account_id'] . "'))" ,__LINE__,__FILE__);
if ($this->data['info_id'] == $info_id) if ($this->data['info_id'] == $info_id)
$this->init( ); $this->init( );
} }
function write($values) { // did _not_ ensure ACL, has to be done by the calling code function write($values) { // did _not_ ensure ACL, has to be done by the calling code
global $phpgw_info; global $phpgw_info;
if ($values['responsible'] && $values['status'] == 'offer') { if ($values['responsible'] && $values['status'] == 'offer') {
$values['status'] = 'ongoing'; // have to match if not finished $values['status'] = 'ongoing'; // have to match if not finished
} }
if (!$values['info_id'] && !$values['owner']) { if (!$values['info_id'] && !$values['owner']) {
// $this->debug( "write(value[info_id]==0,values[owner]==0) --> owner set to user" ); // $this->debug( "write(value[info_id]==0,values[owner]==0) --> owner set to user" );
$values['owner'] = $phpgw_info['user']['account_id']; // user gets owner $values['owner'] = $phpgw_info['user']['account_id']; // user gets owner
} }
if (!$values['info_id'] && !$values['datecreated']) if (!$values['info_id'] && !$values['datecreated'])
$values['datecreated'] = time(); // set creation time $values['datecreated'] = time(); // set creation time
if (!$values['subject']) $values['subject'] = substr($values['des'],0,60).' ...'; if (!$values['subject']) $values['subject'] = substr($values['des'],0,60).' ...';
@ -343,10 +349,10 @@
$values['from'] = $this->addr2name( $this->readAddr( $values['addr_id'] )); $values['from'] = $this->addr2name( $this->readAddr( $values['addr_id'] ));
while (list($key,$val) = each($values)) { while (list($key,$val) = each($values)) {
$this->data['info_'.$key] = $val; // update internal data $this->data['info_'.$key] = $val; // update internal data
switch ($key) { switch ($key) {
case 'info_id': case 'info_id':
break; // later in where clause break; // later in where clause
case 'des': case 'subject': case 'from': case 'addr': case 'des': case 'subject': case 'from': case 'addr':
$val = addslashes($val); $val = addslashes($val);
default: default:
@ -361,10 +367,10 @@
/* /*
* need to set $this->data['info_id'] with assigned autoincrement id * need to set $this->data['info_id'] with assigned autoincrement id
*/ */
} }
//echo '<br>edit(): query: '.$query; //echo '<br>edit(): query: '.$query;
$this->db->query($query,__LINE__,__FILE__); $this->db->query($query,__LINE__,__FILE__);
} }
} }

View File

@ -1,229 +1,234 @@
<?php <?php
/**************************************************************************\ /**************************************************************************\
* 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> *
* originaly 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 *
* Free Software Foundation; either version 2 of the License, or (at your * * Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. * * option) any later version. *
\**************************************************************************/ \**************************************************************************/
/* $Id$ */ /* $Id$ */
$phpgw_info['flags'] = array( $phpgw_info['flags'] = array(
'currentapp' => 'infolog', '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->infolog = createobject('infolog.infolog'); $phpgw->infolog = CreateObject('infolog.infolog');
$db = $phpgw->db; $html = $phpgw->infolog->html;
$db2 = $phpgw->db; $db = $phpgw->db;
$db2 = $phpgw->db;
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); $t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
$t->set_file(array( 'info_list_t' => 'list.tpl' )); $t->set_file(array( 'info_list_t' => 'list.tpl' ));
$t->set_block('info_list_t','info_list','list'); $t->set_block('info_list_t','info_list','list');
$common_hidden_vars = if ($cat_filter) $cat_id = $cat_filter;
'<input type="hidden" name="sort" value="' . $sort . '">'
. '<input type="hidden" name="order" value="' . $order . '">'
. '<input type="hidden" name="query" value="' . $query . '">'
. '<input type="hidden" name="start" value="' . $start . '">'
. '<input type="hidden" name="filter" value="' . $filter . '">'
. '<input type="hidden" name="cat_id" value="' . $cat_id . '">';
if ($action)
$common_hidden_vars .= '<input type="hidden" name="action" value="'.$action.'">';
switch ($action) {
case 'sp': // Sub-List
$common_hidden_vars .= '<input type="hidden" name="info_id" value="' . $info_id . '">';
$t->set_var(lang_info_action,lang('Info Log - Subprojects from'));
break;
case 'proj':
$common_hidden_vars .= '<input type="hidden" name="proj_id" value="' . $proj_id . '">';
$proj = $phpgw->infolog->readProj($proj_id);
$t->set_var(lang_info_action,lang('Info Log').' - '.$proj['title']);
break;
case 'addr':
$common_hidden_vars .= '<input type="hidden" name="addr_id" value="' . $addr_id . '">';
$addr = $phpgw->infolog->readAddr($addr_id);
$t->set_var(lang_info_action,lang('Info Log').' - '.$phpgw->infolog->addr2name($addr));
break;
default:
$t->set_var(lang_info_action,lang('Info Log'));
break;
}
$t->set_var($phpgw->infolog->setStyleSheet( ));
$t->set_var(actionurl,$phpgw->link('/infolog/edit.php','action=new'));
$t->set_var('cat_form',$phpgw->link('/infolog/index.php'));
$t->set_var('lang_category',lang('Category'));
$t->set_var('lang_all',lang('All'));
$t->set_var('lang_select',lang('Select'));
$t->set_var('categories',$phpgw->categories->formated_list('select','all',$cat_id,'True'));
$t->set_var(common_hidden_vars,$common_hidden_vars);
// =========================================== $hidden_vars = array( 'sort' => $sort,'order' => $order,'query' => $query,'start' => $start,
// list header variable template-declarations 'filter' => $filter,'cat_id' => $cat_id );
// =========================================== $common_hidden_vars = $html->input_hidden($hidden_vars);
$t->set_var( $phpgw->infolog->infoHeaders( 1,$sort,$order ));
$t->set_var(h_lang_sub,lang('Sub'));
$t->set_var(h_lang_action,lang('Action'));
// -------------- end header declaration -----------------
if (! $start) { if ($action)
$start = 0; $common_hidden_vars .= $html->input_hidden('action',$action);
}
switch ($action) {
case 'sp': // Sub-List
$common_hidden_vars .= $html->input_hidden('info_id',$info_id);
$t->set_var(lang_info_action,lang('Info Log - Subprojects from'));
break;
case 'proj':
$common_hidden_vars .= $html->input_hidden('proj_id',$proj_id);
$proj = $phpgw->infolog->readProj($proj_id);
$t->set_var(lang_info_action,lang('Info Log').' - '.$proj['title']);
break;
case 'addr':
$common_hidden_vars .= $html->input_hidden('addr_id',$addr_id);
$addr = $phpgw->infolog->readAddr($addr_id);
$t->set_var(lang_info_action,lang('Info Log').' - '.$phpgw->infolog->addr2name($addr));
break;
default:
$t->set_var(lang_info_action,lang('Info Log'));
break;
}
$t->set_var($phpgw->infolog->setStyleSheet( ));
$t->set_var(actionurl,$phpgw->link('/infolog/edit.php','action=new'));
$t->set_var('cat_form',$phpgw->link('/infolog/index.php'));
$t->set_var('lang_category',lang('Category'));
$t->set_var('lang_all',lang('All'));
$t->set_var('lang_select',lang('Select'));
$t->set_var('categories',$phpgw->categories->formated_list('select','all',$cat_id,'True'));
$t->set_var(common_hidden_vars,$common_hidden_vars);
if ($order) { // ===========================================
$ordermethod = 'order by ' . $order . ' ' . $sort; // list header variable template-declarations
} else { // ===========================================
$ordermethod = 'order by info_datecreated desc'; // newest first $t->set_var( $phpgw->infolog->infoHeaders( 1,$sort,$order ));
} $t->set_var(h_lang_sub,lang('Sub'));
if (!$filter) { $t->set_var(h_lang_action,lang('Action'));
$filter = 'none'; // -------------- end header declaration -----------------
}
$filtermethod = $phpgw->infolog->aclFilter($filter);
if ($cat_id) {
$filtermethod .= " AND info_cat='$cat_id' ";
}
if ($action == 'addr') $filtermethod .= " AND info_addr_id=$addr_id ";
if ($action == 'proj') $filtermethod .= " AND info_proj_id=$proj_id ";
// we search in _from, _subject and _des for $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); if (! $start) {
if ($phpgw->infolog->listChilds && $action != 'sp') $start = 0;
$pid = ''; }
$db->query("SELECT COUNT(*) FROM phpgw_infolog WHERE $filtermethod $pid $sql_query",__LINE__,__FILE__);
$db->next_record();
$total = $db->f(0);
if ($total <= $start) $start = 0; if ($order) {
$ordermethod = 'order by ' . $order . ' ' . $sort;
if ($total > $phpgw_info['user']['preferences']['common']['maxmatchs']) { } else {
$to = $start + $phpgw_info['user']['preferences']['common']['maxmatchs']; if ($to > $total) $to = $total; $ordermethod = 'order by info_datecreated desc'; // newest first
$total_matchs = lang('showing x - x of x',($start + 1),$to,$total); }
} else { if (!$filter) {
$total_matchs = lang('showing x',$total); $filter = 'none';
} }
$t->set_var('total_matchs',$total_matchs); $filtermethod = $phpgw->infolog->aclFilter($filter);
if ($cat_id) {
$filtermethod .= " AND info_cat='$cat_id' ";
}
if ($action == 'addr') $filtermethod .= " AND info_addr_id=$addr_id ";
if ($action == 'proj') $filtermethod .= " AND info_proj_id=$proj_id ";
// we search in _from, _subject and _des for $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);
// project description if subprojectlist if ($phpgw->infolog->listChilds && $action != 'sp')
// ========================================== $pid = '';
$db->query("SELECT COUNT(*) FROM phpgw_infolog WHERE $filtermethod $pid $sql_query",__LINE__,__FILE__);
$db->next_record();
$total = $db->f(0);
if ($total <= $start) $start = 0;
if ($total > ($maxmatchs = $phpgw_info['user']['preferences']['common']['maxmatchs'])) {
$to = $start + $maxmatchs;
if ($to > $total) $to = $total;
$total_matchs = lang('showing x - x of x',($start + 1),$to,$total);
} else {
$total_matchs = lang('showing x',$total);
}
$t->set_var('total_matchs',$total_matchs);
// ==========================================
// project description if subprojectlist
// ==========================================
$t->set_block('info_list_t','projdetails','projdetailshandle'); $t->set_block('info_list_t','projdetails','projdetailshandle');
switch ($action) { switch ($action) {
case 'sp': // details of parent case 'sp': // details of parent
$t->set_var( $phpgw->infolog->infoHeaders( )); $t->set_var( $phpgw->infolog->infoHeaders( ));
$t->set_var( $phpgw->infolog->formatInfo( $info_id )); $t->set_var( $phpgw->infolog->formatInfo( $info_id ));
$t->parse('projdetailshandle','projdetails',True); $t->parse('projdetailshandle','projdetails',True);
break; break;
case 'addr': case 'addr':
break; break;
case 'proj': case 'proj':
break; break;
} }
// =========================================== // ===========================================
// nextmatch variable template-declarations // nextmatch variable template-declarations
// =========================================== // ===========================================
$next_matchs = $phpgw->nextmatchs->show_tpl('/infolog/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']);
$t->set_var(next_matchs,$next_matchs); $t->set_var('next_matchs',$next_matchs);
// ---------- end nextmatch template -------------------- if ($total > $maxmatchs)
$t->set_var('next_matchs_end',$next_matchs);
$limit = $db->limit($start); // ---------- end nextmatch template --------------------
$db->query($q="SELECT * FROM phpgw_infolog WHERE $filtermethod $pid $sql_query $ordermethod $limit",__LINE__,__FILE__); $limit = $db->limit($start);
while ($db->next_record()) {
// ========================================
// check if actual project has subprojects
// ========================================
$db2->query("select count(*) as cnt FROM phpgw_infolog where info_id_parent=" .$db->f('info_id'),__LINE__,__FILE__);
$db2->next_record();
if ($db2->f('cnt') > 0) {
$subproact = 1;
} else {
$subproact = 0;
}
// -----------------------------------------
$phpgw->nextmatchs->template_alternate_row_color(&$t); $db->query($q="SELECT * FROM phpgw_infolog WHERE $filtermethod $pid $sql_query $ordermethod $limit",__LINE__,__FILE__);
while ($db->next_record()) {
// ========================================
// check if actual project has subprojects
// ========================================
$db2->query("select count(*) as cnt FROM phpgw_infolog where info_id_parent=" .$db->f('info_id'),__LINE__,__FILE__);
$db2->next_record();
if ($db2->f('cnt') > 0) {
$subproact = 1;
} else {
$subproact = 0;
}
// -----------------------------------------
$t->set_var( $phpgw->infolog->formatInfo( $db->Record,$proj_id,$addr_id )); $phpgw->nextmatchs->template_alternate_row_color(&$t);
if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_EDIT)) { $t->set_var( $phpgw->infolog->formatInfo( $db->Record,$proj_id,$addr_id ));
$t->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)
. '">' . $phpgw->infolog->icon('action','edit') . '</a>');
} else {
$t->set_var('edit','');
}
if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_DELETE)) { if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_EDIT)) {
$t->set_var('delete','<a href="' . $phpgw->link('/infolog/delete.php','info_id=' . $db->f('info_id') $t->set_var('edit','<a href="' .
. '&sort=' . $sort . '&order=' . $order . '&query=' . $query . '&start=' . $start . '&filter=' . $filter) $html->link('/infolog/edit.php',$hidden_vars+array( 'info_id' => $db->f('info_id'))).'">' .
. '">' . $phpgw->infolog->icon('action','delete') . '</a>'); $phpgw->infolog->icon('action','edit') . '</a>');
} else { } else {
$t->set_var('delete',''); $t->set_var('edit','');
} }
$t->set_var('subadd', ''); // defaults no icons
$t->set_var('viewsub', '');
$t->set_var('viewparent', '');
if ($subproact > 0) { // if subprojects exist, display VIEW SUB icon if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_DELETE)) {
$t->set_var('viewsub', '<a href="' . $phpgw->link('/infolog/index.php','info_id=' . $db->f('info_id') $t->set_var('delete','<a href="' . $phpgw->link('/infolog/delete.php','info_id=' . $db->f('info_id')
. "&filter=$filter&action=sp") . '">' . $phpgw->infolog->icon('action','view') . '</a>'); . '&sort=' . $sort . '&order=' . $order . '&query=' . $query . '&start=' . $start . '&filter=' . $filter)
} else { // else display ADD SUB-Icon . '">' . $phpgw->infolog->icon('action','delete') . '</a>');
if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_ADD)) { } else {
$t->set_var('subadd', '<a href="' . $phpgw->link('/infolog/edit.php','info_id=' . $db->f('info_id') . $t->set_var('delete','');
'&filter=' . $filter . '&action=sp') . '">' . $phpgw->infolog->icon('action','new') . '</a>'); }
} $t->set_var('subadd', ''); // defaults no icons
} // if parent --> display VIEW SUBS of Parent $t->set_var('viewsub', '');
if ($db->f('info_id_parent') && $action != 'sp') { $t->set_var('viewparent', '');
$t->set_var('viewparent', '<a href="' . $phpgw->link('/infolog/index.php','info_id=' . $db->f('info_id_parent') .
"&filter=$filter&action=sp") . '">' . $phpgw->infolog->icon('action','parent') . '</a>'); if ($subproact > 0) { // if subprojects exist, display VIEW SUB icon
} $t->set_var('viewsub', '<a href="' . $html->link('/infolog/index.php',
array( 'info_id' => $db->f('info_id'),'filter' => $filter,'action' => 'sp')) . '">' .
$phpgw->infolog->icon('action','view') . '</a>');
} else { // else display ADD SUB-Icon
if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_ADD)) {
$t->set_var('subadd', '<a href="' . $html->link('/infolog/edit.php',
array( 'info_id' => $db->f('info_id'),'filter' => $filter,'action' => 'sp')) . '">' .
$phpgw->infolog->icon('action','new') . '</a>');
}
} // if parent --> display VIEW SUBS of Parent
if ($db->f('info_id_parent') && $action != 'sp') {
$t->set_var('viewparent', '<a href="' . $html->link('/infolog/index.php',
array( 'info_id' => $db->f('info_id_parent'),'filter' => $filter,'action' => 'sp')) . '">' .
$phpgw->infolog->icon('action','parent') . '</a>');
}
$t->parse('list','info_list',True);
// -------------- end record declaration ------------------------
}
// =========================================================
// back2project list href declaration for subproject list
// =========================================================
$t->parse('list','info_list',True); if ($action) {
// -------------- end record declaration ------------------------ $t->set_var('lang_back2projects', '<br><a href="' . $html->link('/infolog/index.php',array( 'filter' => $filter)).
} '">'.lang('Back to Projectlist').'</a>');
}
// ========================================================= // get actual date and year for matrixview arguments
// back2project list href declaration for subproject list /* $year = date('Y');
// ========================================================= $month = date('m');
$t->set_var('lang_matrixviewhref', '<br><a href="' . $phpgw->link('/infolog/graphview.php',"month=$month&year=$year&filter=$filter").
if ($action) { '">'.lang('View Matrix of actual Month').'</a>'); */
$t->set_var('lang_back2projects', '<br><a href="' . // ============================================
$phpgw->link('/infolog/index.php',"filter=$filter"). // template declaration for Add Form
'">'.lang('Back to Projectlist').'</a>'); // ============================================
}
// get actual date and year for matrixview arguments $t->set_var(lang_add,lang('Add'));
/* $year = date('Y'); $t->pfp('out','info_list_t',true);
$month = date('m');
$t->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>'); */
// ============================================
// template declaration for Add Form
// ============================================
$t->set_var(lang_add,lang('Add')); // -------------- end Add form declaration ------------------------
$t->pfp('out','info_list_t',true);
// -------------- end Add form declaration ------------------------ $phpgw->common->phpgw_footer();
$phpgw->common->phpgw_footer();
?> ?>

View File

@ -2,49 +2,36 @@
<p class=action>{lang_info_action}<br> <p class=action>{lang_info_action}<br>
<hr noshade width="98%" align="center" size="1"> <hr noshade width="98%" align="center" size="1">
<center> <center>
<table width=95% border=0 cellspacing=1 cellpadding=3> <table width=95% border=0 cellspacing=1 cellpadding=3>
<tr bgcolor="{th_bg}"> <tr bgcolor="{th_bg}">
<td width="5%" class=list>{lang_type}</td> <td width="5%" class=list>{lang_type}</td>
<td width="5%" class=list>{lang_status}</td> <td width="5%" class=list>{lang_status}</td>
<td class=list>{lang_subject}</td> <td class=list>{lang_subject}</td>
<td width="10%" class=list>{lang_startdate}</td> <td width="10%" class=list>{lang_startdate}</td>
<td width="10%" class=list>{lang_enddate}</td> <td width="10%" class=list>{lang_enddate}</td>
<td width="10%" class=list>{lang_owner}</td> <td width="10%" class=list>{lang_owner}</td>
<td width="10%" class=list>{lang_responsible}</td> <td width="10%" class=list>{lang_responsible}</td>
</tr> </tr>
<tr bgcolor="{th_bg}" valign="top"> <tr bgcolor="{th_bg}" valign="top">
<td class=list>{type}</td> <td class=list>{type}</td>
<td class=list>{status}</td> <td class=list>{status}</td>
<td class=list>{subject}</td> <td class=list>{subject}<br>{des}</td>
<td class=list>{startdate}</td> <td class=list>{startdate}</td>
<td class=list>{enddate}</td> <td class=list>{enddate}</td>
<td class=list>{owner}<br>{datecreated}</td> <td class=list>{owner}<br>{datecreated}</td>
<td class=list">{responsible}</td> <td class=list">{responsible}</td>
</tr> </tr>
</table><p> </table><p>
<table border=0 with=65%> <table border=0 with=65%>
<tr> <tr>
<td align=center colspan=2> <td align=center colspan=2>
<b>{deleteheader}</b> <b>{deleteheader}</b>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>{no_button}</td>
<!-- {nolink} --> <td>{yes_button}</td>
<form action="{cancel_action}" method="POST">
{common_hidden_vars}
<INPUT type="submit" value="{lang_cancel}">
</form>
</td>
<td>
<!-- {yeslink} -->
<form action="{delete_action}" method="POST">
{common_hidden_vars}
<INPUT type="submit" value="{lang_delete}">
</form>
</td>
</tr> </tr>
</table> </table>
</center> </center>

View File

@ -9,32 +9,32 @@
<form method="POST" name="EditorForm" action="{actionurl}"> <form method="POST" name="EditorForm" action="{actionurl}">
{common_hidden_vars} {common_hidden_vars}
<table width="90%" border="0" cellspacing="0" cellpadding="2"> <table width="90%" border="0" cellspacing="0" cellpadding="2">
<!-- BEGIN subpro --> <!-- BEGIN subpro -->
<tr> <tr>
<td colspan="2">{lang_project}:</td> <td colspan="2">{lang_project}:</td>
<td colspan="2">{lang_projdesc}</td> <td colspan="2">{lang_projdesc}</td>
</tr> </tr>
<tr> <tr>
<td colspan="4">&nbsp;</td> <td colspan="4">&nbsp;</td>
</tr> </tr>
<!-- END subpro --> <!-- END subpro -->
<tr> <tr>
<td>{lang_type}:</td> <td>{lang_type}:</td>
<td>{type_list}</td> <td>{type_list}</td>
<td>{lang_owner}:</td> <td>{lang_owner}:</td>
<td>{owner_info}</td> <td>{owner_info}</td>
</tr> </tr>
<tr> <tr>
<td>{project_title}</td> <td>{project_title}</td>
<td colspan="2">{project}</td> <td colspan="2">{project}</td>
<td>{project_nojs}</td> <td>{project_nojs}</td>
</tr> </tr>
<tr> <tr>
<td>{addr_title}</td> <td>{addr_title}</td>
<td colspan="2">{addr}</td> <td colspan="2">{addr}</td>
<td>{addr_nojs}</td> <td>{addr_nojs}</td>
</tr> </tr>
<tr> <tr>
<td colspan="4"><hr size="1"></td> <td colspan="4"><hr size="1"></td>
@ -64,7 +64,7 @@
<tr> <tr>
<td width="15%">{lang_start_date}:</td> <td width="15%">{lang_start_date}:</td>
<td width="40%">{start_select_date}</td> <td width="40%">{start_select_date}</td>
<td width="15%">{lang_selfortoday}</td> <td width="15%">{lang_selfortoday}</td>
<td>{selfortoday}</td> <td>{selfortoday}</td>
</tr> </tr>
@ -72,7 +72,7 @@
<tr> <tr>
<td>{lang_end_date}:</td> <td>{lang_end_date}:</td>
<td>{end_select_date}</td> <td>{end_select_date}</td>
<td>{lang_dur_days}</td> <td>{lang_dur_days}</td>
<td><input name="dur_days" size="3" maxlength="2" value="">&nbsp;{dur_days}</td> <td><input name="dur_days" size="3" maxlength="2" value="">&nbsp;{dur_days}</td>
</tr> </tr>
@ -82,22 +82,22 @@
<tr> <tr>
<td>{lang_status}:</td> <td>{lang_status}:</td>
<td>{status_list}</td> <td>{status_list}</td>
<td>{lang_category}</td> <td>{lang_category}</td>
<td><select name="info_cat"><option value="0">{lang_none}</option>{cat_list}</select></td> <td><select name="info_cat"><option value="0">{lang_none}</option>{cat_list}</select></td>
</tr> </tr>
<tr> <tr>
<td>{lang_priority}:</td> <td>{lang_priority}:</td>
<td>{priority_list}</td> <td>{priority_list}</td>
<td>{lang_confirm}</td> <td>{lang_confirm}</td>
<td>{confirm_list}</td> <td>{confirm_list}</td>
</tr> </tr>
<tr> <tr>
<td>{lang_responsible}:</td> <td>{lang_responsible}:</td>
<td>{responsible_list}</td> <td>{responsible_list}</td>
<td>{lang_access_type}:</td> <td>{lang_access_type}:</td>
<td>{access_list}</td> <td>{access_list}</td>
</tr> </tr>
@ -110,12 +110,12 @@
<tr valign="bottom"> <tr valign="bottom">
<td height="35" width="50%"> <td height="35" width="50%">
<div align="center"> <div align="center">
<input type="submit" name="add" value="{lang_addsubmitb}"> <input type="submit" name="add" value="{lang_addsubmitb}">
</div> </div>
</td> </td>
<td height="35" width="50%"> <td height="35" width="50%">
<div align="center"> <div align="center">
<input type="reset" name="reset" value="{lang_addresetb}"> <input type="reset" name="reset" value="{lang_addresetb}">
</div> </div>
</td> </td>
</tr> </tr>
@ -130,19 +130,10 @@
<table width="75%" border="0" cellspacing="0" cellpadding="0"> <table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr valign="bottom"> <tr valign="bottom">
<td height="62"> <td height="62">{edit_button} &nbsp; </form></td>
{edit_button} <td height="62">{delete_button}</td>
&nbsp;
</form>
</td>
<td height="62">
<form action="{delete_action}" method="POST">
{common_hidden_vars}
{delete_button}
</form>
</td>
</tr> </tr>
</table> </table>
</center> </center>
</html> </html>
<!-- END edit --> <!-- END edit -->

View File

@ -1,6 +1,6 @@
p,td { font-face: "Arial, Helvetica, sans-serif"; } p,td { font-face: "Arial, Helvetica, sans-serif"; font-size:12pt; }
.list { font-size:11pt; } .list { font-size:9pt; }
.action { font-size:18pt; margin-bottom:0px; } .action { font-size:16pt; margin-bottom:0px; }
.low,.pri_low_done { color:#606060; } .low,.pri_low_done { color:#606060; }
.normal,.pri_normal_done { color:black } .normal,.pri_normal_done { color:black }
.high { color:#cc0000; } .high_done { color:#800000; } .high { color:#cc0000; } .high_done { color:#800000; }

View File

@ -1,84 +1,80 @@
{info_css} {info_css}
<p class=action>{lang_info_action}</p> <span class=action>{lang_info_action}</span><br>
<hr noshade width="98%" align="center" size="1"> <hr noshade width="98%" align="center" size="1">
<center> <center>
<!-- BEGIN projdetails --> <!-- BEGIN projdetails -->
<table width=95% border=0 cellspacing=1 cellpadding=3> <table width=95% border=0 cellspacing=1 cellpadding=3>
<tr bgcolor="{th_bg}"> <tr bgcolor="{th_bg}">
<td width="3%" class=list>{lang_type}</td> <td width="3%" class=list>{lang_type}</td>
<td width="5%" class=list>{lang_status}</td> <td width="5%" class=list>{lang_status}</td>
<td class=list>{lang_subject}</td> <td class=list>{lang_subject}</td>
<td width="10%" class=list>{lang_startdate}<br> <!-- </td> <td width="10%" class=list>{lang_startdate}<br> <!-- </td>
<td width="10%" class=list>-->{lang_enddate}</td> <td width="10%" class=list>-->{lang_enddate}</td>
<td width="10%" class=list>{lang_owner}<br>{lang_datecreated}</td> <td width="10%" class=list>{lang_owner}<br>{lang_datecreated}</td>
<td width="10%" class=list>{lang_responsible}</td> <td width="10%" class=list>{lang_responsible}</td>
</tr> </tr>
<tr bgcolor="{th_bg}" valign="top"> <tr bgcolor="{th_bg}" valign="top">
<td class=list>{type}</td> <td class=list>{type}</td>
<td class=list>{status}</td> <td class=list>{status}</td>
<td class=list>{subject}<br>{des}</td> <td class=list>{subject}<br>{des}</td>
<td class=list>{startdate}<br><!-- </td> <td class=list>{startdate}<br>{enddate}</td>
<td class=list>-->{enddate}</td> <td class=list>{owner}<br>{datecreated}</td>
<td class=list>{owner}<br>{datecreated}</td> <td class=list">{responsible}</td>
<td class=list">{responsible}</td> </tr>
</tr> </table><p>
</table><p>
<!-- END projdetails --> <!-- END projdetails -->
<TABLE><tr valign="middle"><td> <TABLE><tr valign="middle"><td>
<form method="POST" name="cat" action="{cat_form}"> <form method="POST" name="cat" action="{cat_form}">
{lang_category} {lang_category}
<select name="cat_filter" onChange="this.form.submit();"> <select name="cat_filter" onChange="this.form.submit();">
<option value="0">{lang_all}</option> <option value="0">{lang_all}</option>
{categories} {categories}
</select> </select>
<noscript><input type="submit" name="cats" value="{lang_select}"></noscript> <noscript><input type="submit" name="cats" value="{lang_select}"></noscript>
</form> </form>
</td><td> </td><td>
{total_matchs} {total_matchs}
</td></tr></table> </td></tr></table>
{next_matchs}
{next_matchs}
<table width=95% border=0 cellspacing=1 cellpadding=3> <table width=95% border=0 cellspacing=1 cellpadding=3>
<tr bgcolor="{th_bg}"> <tr bgcolor="{th_bg}">
<td width="2%" class=list>{sort_type}</td> <td width="2%" class=list>{sort_type}</td>
<td width="4%" class=list>{sort_status}</td> <td width="4%" class=list>{sort_status}</td>
<td class=list>{sort_subject}</td> <td class=list>{sort_subject}</td>
<td width="5%" class=list>{sort_startdate}<br> <!-- </td> <td width="5%" class=list>{sort_startdate}<br>{sort_enddate}</td>
<td width="5%" class=list>-->{sort_enddate}</td>
<td width="5%" class=list>{sort_owner}<br>{sort_datecreated}</td> <td width="5%" class=list>{sort_owner}<br>{sort_datecreated}</td>
<td width="7%" class=list>{sort_responsible}</td> <td width="7%" class=list>{sort_responsible}</td>
<td width="3%" class=list>{h_lang_sub}</td> <td width="3%" class=list>{h_lang_sub}</td>
<td width="3%" class=list>{h_lang_action}</td> <td width="3%" class=list>{h_lang_action}</td>
</tr> </tr>
</form> </form>
<!-- BEGIN info_list --> <!-- BEGIN info_list -->
<tr bgcolor="{tr_color}" valign="top"> <tr bgcolor="{tr_color}" valign="top">
<td class=list>{type}</td> <td class=list>{type}</td>
<td class=list>{status}</td> <td class=list>{status}</td>
<td class=list>{subject}<br> <td class=list>{subject}<br>{des}</td>
{des}</td> <td class=list>{startdate}<br>{enddate}</td>
<td class=list>{startdate}<br> <!--</td>
<td class=list>-->{enddate}</td>
<td class=list>{owner}<br>{datecreated}</td> <td class=list>{owner}<br>{datecreated}</td>
<td class=list>{responsible}</td> <td class=list>{responsible}</td>
<td class=list>{subadd} <td class=list>{subadd}
{viewsub} {viewsub}
{viewparent}</td> {viewparent}</td>
<td class=list>{edit}&nbsp;{delete}</td> <td class=list>{edit}&nbsp;{delete}</td>
</tr> </tr>
<!-- END info_list --> <!-- END info_list -->
</table> </table>
{next_matchs_end}
<form method="POST" action="{actionurl}"> <form method="POST" action="{actionurl}">
{common_hidden_vars} {common_hidden_vars}
<table width="95%" border="0" cellspacing="0" cellpadding="0"> <table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td width="4%"> <td width="4%" align="right">
<div align="right">
<input type="submit" name="Add" value="{lang_add}"> <input type="submit" name="Add" value="{lang_add}">
</div>
</td> </td>
<td width="72%">&nbsp;</td> <td width="72%">&nbsp;</td>
<td width="24%">&nbsp;</td> <td width="24%">&nbsp;</td>