[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property edit_documentation.php,1.1.2.1,1.1.2.2
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property edit_documentation.php,1.1.2.1,1.1.2.2 add_documentation.php,1.1,1.1.2.1 delete_documentation.php,1.1,1.1.2.1 documentation_detail.php,1.1,1.1.2.1 list_documentation.php,1.1,1.1.2.1 |
Date: |
Mon, 18 Nov 2002 14:12:40 -0500 |
Update of /cvsroot/phpgroupware/property
In directory subversions:/tmp/cvs-serv1781
Modified Files:
Tag: Version-0_9_14-branch
edit_documentation.php add_documentation.php
delete_documentation.php documentation_detail.php
list_documentation.php
Log Message:
no message
Index: edit_documentation.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/edit_documentation.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** edit_documentation.php 16 Nov 2002 22:37:12 -0000 1.1.2.1
--- edit_documentation.php 18 Nov 2002 19:12:38 -0000 1.1.2.2
***************
*** 25,28 ****
--- 25,33 ----
$config->read_repository();
+ if(!$referer)
+ {
+ $referer = $GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] ?
$GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] : $GLOBALS['HTTP_REFERER'];
+ }
+
if ($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
{
***************
*** 53,58 ****
}
- $id = next_id(fm_documentation);
-
$errorcount = 0;
--- 58,61 ----
***************
*** 126,129 ****
--- 129,143 ----
}
+ if ($link_orig && !$link)
+ {
+ $link=stripslashes($link_orig);
+ }
+
+ if($delete_link)
+ {
+ $link='';
+ $link_name='';
+ }
+
if (! $error)
{
***************
*** 177,180 ****
--- 191,205 ----
}
+ if ($link)
+ {
+ $t->set_var('delete_link','<input type="checkbox"
name="delete_link" value="true" >');
+ $t->set_var('lang_delete_link',lang('Delete link:'));
+ }
+ else
+ {
+ $t->set_var('delete_link','');
+ $t->set_var('lang_delete_link','');
+ }
+
$t->set_var('actionurl',$GLOBALS['phpgw']->link('/property/edit_documentation.php'));
$t->set_var('addressbook_link',$GLOBALS['phpgw']->link('/property/addressbook.php','query='));
***************
*** 194,198 ****
--- 219,225 ----
. '<input type="hidden" name="sub" value="' .
$sub . '">' . "\n"
. '<input type="hidden" name="start" value="' .
$start . '">' . "\n"
+ . '<input type="hidden" name="referer" value="'
. $referer . '">' . "\n"
. '<input type="hidden" name="filter" value="'
. $filter . '">' . "\n"
+ . '<input type="hidden" name="link_orig"
value="' . $link . '">' . "\n"
. '<input type="hidden" name="cat_id" value="'
. $cat_id . '">' . "\n";
***************
*** 263,267 ****
$t->set_var('lang_reset',lang('Clear Form'));
$t->set_var('lang_done',lang('Done'));
!
$t->set_var('done_url',$GLOBALS['phpgw']->link('/property/list_documentation.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter&cat_id=$cat_id"));
$t->set_var('delete','<form method="POST" action="' .
$GLOBALS['phpgw']->link('/property/delete_documentation.php',"id=$id&cat_id=$cat_id&start=$start&sort=$sort&order=$order&query=$query&filter=$filter&location_code=$location_code&equipment_id=$equipment_id")
. '"><input type="submit" value="' . lang('Delete') .'"></form>');
--- 290,295 ----
$t->set_var('lang_reset',lang('Clear Form'));
$t->set_var('lang_done',lang('Done'));
! $t->set_var('done_url',$referer);
! //
$t->set_var('done_url',$GLOBALS['phpgw']->link('/property/list_documentation.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter&cat_id=$cat_id"));
$t->set_var('delete','<form method="POST" action="' .
$GLOBALS['phpgw']->link('/property/delete_documentation.php',"id=$id&cat_id=$cat_id&start=$start&sort=$sort&order=$order&query=$query&filter=$filter&location_code=$location_code&equipment_id=$equipment_id")
. '"><input type="submit" value="' . lang('Delete') .'"></form>');
Index: add_documentation.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_documentation.php,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -r1.1 -r1.1.2.1
*** add_documentation.php 15 Nov 2002 21:27:28 -0000 1.1
--- add_documentation.php 18 Nov 2002 19:12:38 -0000 1.1.2.1
***************
*** 25,28 ****
--- 25,33 ----
$config->read_repository();
+ if(!$referer)
+ {
+ $referer = $GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] ?
$GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] : $GLOBALS['HTTP_REFERER'];
+ }
+
if ($GLOBALS['phpgw_info']['server']['db_type']=='pgsql')
{
***************
*** 133,138 ****
$title = addslashes($title);
-
-
$GLOBALS['phpgw']->db->query("insert into
fm_documentation
(id,entry_date,cat_id,owner,location_code,equipment_id,objekt_id,bygg_id,seksjons_id,etasje_id,leie_id,"
. " title,link_name,link,descr)"
--- 138,141 ----
***************
*** 195,198 ****
--- 198,202 ----
. '<input type="hidden" name="sub" value="' .
$sub . '">' . "\n"
. '<input type="hidden" name="start" value="' .
$start . '">' . "\n"
+ . '<input type="hidden" name="referer" value="'
. $referer . '">' . "\n"
. '<input type="hidden" name="filter" value="'
. $filter . '">' . "\n"
. '<input type="hidden" name="cat_id" value="'
. $cat_id . '">' . "\n";
***************
*** 204,207 ****
--- 208,213 ----
$t->set_var('lang_charge_tenant',lang('Charge tenant'));
+ $t->set_var('delete_link','');
+ $t->set_var('lang_delete_link','');
$t->set_var('lang_title',lang('Title'));
$t->set_var('title',$title);
***************
*** 264,268 ****
$t->set_var('lang_reset',lang('Clear Form'));
$t->set_var('lang_done',lang('Done'));
!
$t->set_var('done_url',$GLOBALS['phpgw']->link('/property/list_documentation.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter&cat_id=$cat_id"));
$t->set_var('edithandle','');
--- 270,275 ----
$t->set_var('lang_reset',lang('Clear Form'));
$t->set_var('lang_done',lang('Done'));
! $t->set_var('done_url',$referer);
! //
$t->set_var('done_url',$GLOBALS['phpgw']->link('/property/list_documentation.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter&cat_id=$cat_id"));
$t->set_var('edithandle','');
Index: delete_documentation.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/delete_documentation.php,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -r1.1 -r1.1.2.1
*** delete_documentation.php 15 Nov 2002 21:27:28 -0000 1.1
--- delete_documentation.php 18 Nov 2002 19:12:38 -0000 1.1.2.1
***************
*** 14,17 ****
--- 14,23 ----
}
+ if(!$referer)
+ {
+ $referer = $GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] ?
$GLOBALS['HTTP_SERVER_VARS']['HTTP_REFERER'] : $GLOBALS['HTTP_REFERER'];
+ }
+
+
if ($confirm)
{
***************
*** 28,32 ****
Header('Location: ' .
$GLOBALS['phpgw']->link('/property/documentation_detail.php','sort=' . $sort .
'&order=' . $order . '&query=' . $query . '&start=' . $start
!
. '&filter=' . $filter.'&location_code=' .
$location_code.'&equipment_id=' . $equipment_id));
}
else
--- 34,38 ----
Header('Location: ' .
$GLOBALS['phpgw']->link('/property/documentation_detail.php','sort=' . $sort .
'&order=' . $order . '&query=' . $query . '&start=' . $start
!
. '&filter=' . $filter.'&location_code=' .
$location_code.'&equipment_id=' . $equipment_id . '&referer=' . $referer));
}
else
***************
*** 39,42 ****
--- 45,49 ----
. '<input type="hidden" name="id"
value="' . $id . '">' . "\n"
. '<input type="hidden"
name="location_code" value="' . $location_code . '">' . "\n"
+ . '<input type="hidden" name="referer"
value="' . $referer . '">' . "\n"
. '<input type="hidden"
name="equipment_id" value="' . $equipment_id . '">' . "\n"
. '<input type="hidden" name="filter"
value="' . $filter . '">' . "\n";
***************
*** 48,55 ****
$t->set_var('hidden_vars',$hidden_vars);
$t->set_var('nolink',$GLOBALS['phpgw']->link('/property/documentation_detail.php','sort='
. $sort . '&order=' . $order . '&query=' . $query
!
. '&start=' . $start . '&filter=' . $filter.'&location_code=' .
$location_code.'&equipment_id=' . $equipment_id));
$t->set_var('lang_no',lang('No'));
!
$t->set_var('action_url',$GLOBALS['phpgw']->link('/property/delete_documentation.php','id='
. $id.'&location_code=' . $location_code.'&equipment_id=' . $equipment_id));
$t->set_var('lang_yes',lang('Yes'));
$t->set_var('id',$id);
--- 55,62 ----
$t->set_var('hidden_vars',$hidden_vars);
$t->set_var('nolink',$GLOBALS['phpgw']->link('/property/documentation_detail.php','sort='
. $sort . '&order=' . $order . '&query=' . $query
!
. '&start=' . $start . '&filter=' . $filter.'&location_code=' .
$location_code.'&equipment_id=' . $equipment_id . '&referer=' . $referer));
$t->set_var('lang_no',lang('No'));
!
$t->set_var('action_url',$GLOBALS['phpgw']->link('/property/delete_documentation.php','id='
. $id.'&location_code=' . $location_code.'&equipment_id=' . $equipment_id .
'&referer=' . $referer));
$t->set_var('lang_yes',lang('Yes'));
$t->set_var('id',$id);
Index: documentation_detail.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/documentation_detail.php,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -r1.1 -r1.1.2.1
*** documentation_detail.php 15 Nov 2002 21:27:28 -0000 1.1
--- documentation_detail.php 18 Nov 2002 19:12:38 -0000 1.1.2.1
***************
*** 44,47 ****
--- 44,48 ----
. '<input type="hidden" name="query" value="' .
$query . '">' . "\n"
. '<input type="hidden" name="location_code"
value="' . $location_code . '">' . "\n"
+ . '<input type="hidden" name="referer" value="'
. $referer . '">' . "\n"
. '<input type="hidden" name="cat_id" value="'
. $cat_id . '">' . "\n"
. '<input type="hidden" name="equipment_id"
value="' . $equipment_id . '">' . "\n";
***************
*** 203,206 ****
--- 204,208 ----
$link_name =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('link_name'));
+
if (! $link_name)
{
***************
*** 212,219 ****
}
-
$link =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('link'));
if (! $link) $link = ' ';
$descr =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('descr'));
if (! $descr) $descr = ' ';
--- 214,232 ----
}
$link =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('link'));
if (! $link) $link = ' ';
+
+ if (strtolower(substr($link,-4))=='.jpg' ||
strtolower(substr($link,-4))=='.gif')
+ {
+ $show_picture= '<p><img border="1" src="' . $link
.'"></p>';
+ $link_name = '';
+ $link = '';
+ }
+ else
+ {
+ $show_picture = '';
+ }
+
$descr =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('descr'));
if (! $descr) $descr = ' ';
***************
*** 231,235 ****
'link_name' =>
$link_name,
'link' =>
$link,
! 'descr' =>
$descr)
);
--- 244,249 ----
'link_name' =>
$link_name,
'link' =>
$link,
! 'descr' =>
$descr,
! 'show_picture' =>
$show_picture)
);
Index: list_documentation.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_documentation.php,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -r1.1 -r1.1.2.1
*** list_documentation.php 15 Nov 2002 21:27:28 -0000 1.1
--- list_documentation.php 18 Nov 2002 19:12:38 -0000 1.1.2.1
***************
*** 21,24 ****
--- 21,25 ----
$c = CreateObject('phpgwapi.categories');
$c->app_name = 'p_documentation';
+
$t->set_var('cats_list',$c->formated_list('select','all',$cat_id,'True'));
$config = CreateObject('phpgwapi.config','property');
***************
*** 27,40 ****
$GLOBALS['phpgw']->session->appsession('sub','property','p_property');
- if
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['currency']))
- {
- $currency =
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'];
- $t->set_var('error','');
- }
- else
- {
- $t->set_var('error',lang('Please select your currency in
preferences !'));
- }
-
$hidden_vars = '<input type="hidden" name="sort" value="' . $sort .
'">' . "\n"
. '<input type="hidden" name="order" value="' .
$order . '">' . "\n"
--- 28,31 ----
***************
*** 160,164 ****
$t->set_var('lang_select',lang('Select'));
$t->set_var('cats_action',$GLOBALS['phpgw']->link('/property/list_documentation.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id&objekt_id=$objekt_id&bygg_id=$bygg_id"));
-
$t->set_var('cats_list',$c->formated_list('select','all',$cat_id,'True'));
$t->set_var('lang_attribute',lang('Attribute'));
$t->set_var('lang_equipment',lang('Equipment'));
--- 151,154 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property edit_documentation.php,1.1.2.1,1.1.2.2 add_documentation.php,1.1,1.1.2.1 delete_documentation.php,1.1,1.1.2.1 documentation_detail.php,1.1,1.1.2.1 list_documentation.php,1.1,1.1.2.1,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/templates/default documentation_detail.tpl,1.1,1.1.2.1 form_documentation.tpl,1.1,1.1.2.1
- Next by Date:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.183,1.184
- Previous by thread:
[Phpgroupware-cvs] CVS: property/templates/default documentation_detail.tpl,1.1,1.1.2.1 form_documentation.tpl,1.1,1.1.2.1
- Next by thread:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.183,1.184
- Index(es):