[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: qmailldap/inc class.boqmailldap.inc.php,1.13,1.
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: qmailldap/inc class.boqmailldap.inc.php,1.13,1.13.4.1 class.soqmailldap.inc.php,1.13.2.2,1.13.2.2.2.1 class.uiqmailldap.inc.php,1.11.2.1,1.11.2.1.2.1 class.uiuserdata.inc.php,1.6,1.6.4.1 |
Date: |
Tue, 22 Apr 2003 11:22:29 -0400 |
Update of /cvsroot/phpgroupware/qmailldap/inc
In directory subversions:/tmp/cvs-serv31782/inc
Modified Files:
Tag: Version-0_9_16-branch
class.boqmailldap.inc.php class.soqmailldap.inc.php
class.uiqmailldap.inc.php class.uiuserdata.inc.php
Log Message:
update reg_globals off and app_header
Index: class.boqmailldap.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/qmailldap/inc/class.boqmailldap.inc.php,v
retrieving revision 1.13
retrieving revision 1.13.4.1
diff -C2 -r1.13 -r1.13.4.1
*** class.boqmailldap.inc.php 26 Oct 2001 14:28:55 -0000 1.13
--- class.boqmailldap.inc.php 22 Apr 2003 15:22:27 -0000 1.13.4.1
***************
*** 20,38 ****
var $public_functions = array
(
! 'getServerList' => True,
! 'getLocals' => True,
! 'getRcptHosts' => True,
'getLDAPStorageData' => True,
! 'abcdefgh' => True
);
function boqmailldap()
{
- #global $phpgw;
-
$this->soqmailldap =
CreateObject('qmailldap.soqmailldap');
-
$this->restoreSessionData();
-
}
--- 20,34 ----
var $public_functions = array
(
! 'getServerList' => True,
! 'getLocals' => True,
! 'getRcptHosts' => True,
'getLDAPStorageData' => True,
! 'abcdefgh' => True
);
function boqmailldap()
{
$this->soqmailldap =
CreateObject('qmailldap.soqmailldap');
$this->restoreSessionData();
}
***************
*** 44,49 ****
function getLDAPData($_serverid, $_nocache=0)
{
! global $phpgw, $HTTP_GET_VARS;
!
if ($HTTP_GET_VARS['nocache'] == '1' || $_nocache ==
'1')
{
--- 40,45 ----
function getLDAPData($_serverid, $_nocache=0)
{
! $HTTP_GET_VARS = get_var('HTTP_GET_VARS',array('GET'));
!
if ($HTTP_GET_VARS['nocache'] == '1' || $_nocache ==
'1')
{
***************
*** 102,109 ****
function restoreSessionData()
{
! global $phpgw;
!
! $this->sessionData =
$phpgw->session->appsession('session_data');
! $this->userSessionData =
$phpgw->session->appsession('user_session_data');
#while(list($key, $value) = each($this->sessionData))
--- 98,103 ----
function restoreSessionData()
{
! $this->sessionData =
$GLOBALS['phpgw']->session->appsession('session_data');
! $this->userSessionData =
$GLOBALS['phpgw']->session->appsession('user_session_data');
#while(list($key, $value) = each($this->sessionData))
***************
*** 118,193 ****
$serverid = $_getVars['serverid'];
! if (isset($_postVars["bo_action"]))
{
! $bo_action = $_postVars["bo_action"];
}
! elseif (isset($_getVars["bo_action"]))
{
! $bo_action = $_getVars["bo_action"];
}
else
{
! return false;
}
!
#print "bo_action: $bo_action<br>";
switch ($bo_action)
{
! case "add_locals":
$count =
count($this->sessionData[$serverid]['locals']);
!
!
$this->sessionData[$serverid]['locals'][$count] =
! $_postVars["new_local"];
!
$this->sessionData[$serverid]['needActivation'] = 1;
-
$this->saveSessionData();
-
break;
!
! case "add_rcpthosts":
$count =
count($this->sessionData[$serverid]['rcpthosts']);
!
!
$this->sessionData[$serverid]['rcpthosts'][$count] =
! $_postVars["new_rcpthost"];
!
! if ($_postVars["add_to_local"] == "on")
{
$count =
count($this->sessionData[$serverid]['locals']);
!
!
$this->sessionData[$serverid]['locals'][$count] =
!
$_postVars["new_rcpthost"];
}
-
$this->sessionData[$serverid]['needActivation'] = 1;
-
$this->saveSessionData();
-
break;
!
! case "add_smtproute":
$count =
count($this->sessionData[$serverid]['smtproutes']);
!
$this->sessionData[$serverid]['smtproutes'][$count] =
sprintf("%s:%s:%s",
!
$_postVars["domain_name"],
!
$_postVars["remote_server"],
!
$_postVars["remote_port"]
);
-
$this->sessionData[$serverid]['needActivation'] = 1;
-
$this->saveSessionData();
-
break;
!
! case "remove_locals":
$i=0;
!
while(list($key, $value) =
each($this->sessionData[$serverid]['locals']))
{
#print ".. $key: $value<br>";
! if ($key !=
$_postVars["locals"])
{
$newLocals[$i]=$value;
--- 112,169 ----
$serverid = $_getVars['serverid'];
! if (isset($_postVars['bo_action']))
{
! $bo_action = $_postVars['bo_action'];
}
! elseif (isset($_getVars['bo_action']))
{
! $bo_action = $_getVars['bo_action'];
}
else
{
! return False;
}
!
#print "bo_action: $bo_action<br>";
switch ($bo_action)
{
! case 'add_locals':
$count =
count($this->sessionData[$serverid]['locals']);
!
$this->sessionData[$serverid]['locals'][$count] = $_postVars['new_local'];
$this->sessionData[$serverid]['needActivation'] = 1;
$this->saveSessionData();
break;
! case 'add_rcpthosts':
$count =
count($this->sessionData[$serverid]['rcpthosts']);
!
$this->sessionData[$serverid]['rcpthosts'][$count] = $_postVars['new_rcpthost'];
! if ($_postVars['add_to_local'] == 'on')
{
$count =
count($this->sessionData[$serverid]['locals']);
!
!
$this->sessionData[$serverid]['locals'][$count] = $_postVars['new_rcpthost'];
}
$this->sessionData[$serverid]['needActivation'] = 1;
$this->saveSessionData();
break;
! case 'add_smtproute':
$count =
count($this->sessionData[$serverid]['smtproutes']);
!
$this->sessionData[$serverid]['smtproutes'][$count] =
sprintf("%s:%s:%s",
!
$_postVars['domain_name'],
!
$_postVars['remote_server'],
!
$_postVars['remote_port']
);
$this->sessionData[$serverid]['needActivation'] = 1;
$this->saveSessionData();
break;
! case 'remove_locals':
$i=0;
!
while(list($key, $value) =
each($this->sessionData[$serverid]['locals']))
{
#print ".. $key: $value<br>";
! if ($key !=
$_postVars['locals'])
{
$newLocals[$i]=$value;
***************
*** 197,214 ****
}
$this->sessionData[$serverid]['locals']
= $newLocals;
-
$this->sessionData[$serverid]['needActivation'] = 1;
-
$this->saveSessionData();
-
break;
!
! case "remove_rcpthosts":
$i=0;
!
while(list($key, $value) =
each($this->sessionData[$serverid]['rcpthosts']))
{
#print ".. $key: $value<br>";
! if ($key !=
$_postVars["rcpthosts"])
{
$newRcpthosts[$i]=$value;
--- 173,186 ----
}
$this->sessionData[$serverid]['locals']
= $newLocals;
$this->sessionData[$serverid]['needActivation'] = 1;
$this->saveSessionData();
break;
! case 'remove_rcpthosts':
$i=0;
!
while(list($key, $value) =
each($this->sessionData[$serverid]['rcpthosts']))
{
#print ".. $key: $value<br>";
! if ($key !=
$_postVars['rcpthosts'])
{
$newRcpthosts[$i]=$value;
***************
*** 218,235 ****
}
$this->sessionData[$serverid]['rcpthosts'] = $newRcpthosts;
-
$this->sessionData[$serverid]['needActivation'] = 1;
-
$this->saveSessionData();
-
break;
!
! case "remove_smtproute":
$i=0;
!
while(list($key, $value) =
each($this->sessionData[$serverid]['smtproutes']))
{
#print ".. $key: $value :
".$_getVars["smtproute_id"]."<br>";
! if ($key !=
$_getVars["smtproute_id"])
{
$newSmtproutes[$i]=$value;
--- 190,203 ----
}
$this->sessionData[$serverid]['rcpthosts'] = $newRcpthosts;
$this->sessionData[$serverid]['needActivation'] = 1;
$this->saveSessionData();
break;
! case 'remove_smtproute':
$i=0;
!
while(list($key, $value) =
each($this->sessionData[$serverid]['smtproutes']))
{
#print ".. $key: $value :
".$_getVars["smtproute_id"]."<br>";
! if ($key !=
$_getVars['smtproute_id'])
{
$newSmtproutes[$i]=$value;
***************
*** 239,297 ****
}
$this->sessionData[$serverid]['smtproutes'] = $newSmtproutes;
-
$this->sessionData[$serverid]['needActivation'] = 1;
-
$this->saveSessionData();
-
break;
! case "save_ldap":
#print "hallo".$_getVars["serverid"]."
".$_postVars["servername"]."<br>";
$data = array
(
! "qmail_servername" =>
$_postVars["qmail_servername"],
! "description" =>
$_postVars["description"],
! "ldap_basedn" =>
$_postVars["ldap_basedn"],
! "id" =>
$_getVars["serverid"]
);
! if (!isset($_getVars["serverid"]))
{
!
$this->soqmailldap->update("add_server",$data);
}
else
{
!
$this->soqmailldap->update("update_server",$data);
}
!
!
$this->getLDAPData($_getVars["serverid"], '1');
!
break;
!
! case "write_to_ldap":
!
$this->soqmailldap->writeConfigData($this->sessionData[$serverid], $serverid);
-
$this->sessionData[$serverid]['needActivation'] = 0;
-
$this->saveSessionData();
-
break;
}
}
!
function saveSessionData()
{
! global $phpgw;
!
!
$phpgw->session->appsession('session_data','',$this->sessionData);
!
$phpgw->session->appsession('user_session_data','',$this->userSessionData);
}
!
function saveUserData($_accountID, $_formData, $_boAction)
{
! $this->userSessionData[$_accountID]['mailLocalAddress']
= $_formData["mailLocalAddress"];
! $this->userSessionData[$_accountID]['accountStatus']
= $_formData["accountStatus"];
!
$this->userSessionData[$_accountID]['mailRoutingAddress'] =
$_formData["mailRoutingAddress"];
! $this->userSessionData[$_accountID]['qmailDotMode']
= $_formData["qmailDotMode"];
!
$this->userSessionData[$_accountID]['deliveryProgramPath'] =
$_formData["deliveryProgramPath"];
switch ($_boAction)
--- 207,253 ----
}
$this->sessionData[$serverid]['smtproutes'] = $newSmtproutes;
$this->sessionData[$serverid]['needActivation'] = 1;
$this->saveSessionData();
break;
! case 'save_ldap':
#print "hallo".$_getVars["serverid"]."
".$_postVars["servername"]."<br>";
$data = array
(
! 'qmail_servername' =>
$_postVars['qmail_servername'],
! 'description' =>
$_postVars['description'],
! 'ldap_basedn' =>
$_postVars['ldap_basedn'],
! 'id'
=> $_getVars['serverid']
);
! if (!isset($_getVars['serverid']))
{
!
$this->soqmailldap->update('add_server',$data);
}
else
{
!
$this->soqmailldap->update('update_server',$data);
}
!
$this->getLDAPData($_getVars['serverid'],'1');
break;
! case 'write_to_ldap':
$this->soqmailldap->writeConfigData($this->sessionData[$serverid], $serverid);
$this->sessionData[$serverid]['needActivation'] = 0;
$this->saveSessionData();
break;
}
}
!
function saveSessionData()
{
!
$GLOBALS['phpgw']->session->appsession('session_data','',$this->sessionData);
!
$GLOBALS['phpgw']->session->appsession('user_session_data','',$this->userSessionData);
}
!
function saveUserData($_accountID, $_formData, $_boAction)
{
! $this->userSessionData[$_accountID]['mailLocalAddress']
= $_formData['mailLocalAddress'];
! $this->userSessionData[$_accountID]['accountStatus']
= $_formData['accountStatus'];
!
$this->userSessionData[$_accountID]['mailRoutingAddress'] =
$_formData['mailRoutingAddress'];
! $this->userSessionData[$_accountID]['qmailDotMode']
= $_formData['qmailDotMode'];
!
$this->userSessionData[$_accountID]['deliveryProgramPath'] =
$_formData['deliveryProgramPath'];
switch ($_boAction)
***************
*** 307,318 ****
$this->userSessionData[$_accountID]['mailAlternateAddress'] = array();
}
!
!
$this->userSessionData[$_accountID]['mailAlternateAddress'][$count] =
!
$_formData['add_mailAlternateAddress'];
!
$this->saveSessionData();
-
break;
-
case 'remove_mailAlternateAddress':
$i=0;
--- 263,269 ----
$this->userSessionData[$_accountID]['mailAlternateAddress'] = array();
}
!
$this->userSessionData[$_accountID]['mailAlternateAddress'][$count] =
$_formData['add_mailAlternateAddress'];
$this->saveSessionData();
break;
case 'remove_mailAlternateAddress':
$i=0;
***************
*** 329,340 ****
}
$this->userSessionData[$_accountID]['mailAlternateAddress'] =
$newMailAlternateAddress;
-
$this->saveSessionData();
-
break;
-
case 'save':
$this->soqmailldap->saveUserData($_accountID,
$this->userSessionData[$_accountID]);
-
break;
}
--- 280,287 ----
Index: class.soqmailldap.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/qmailldap/inc/class.soqmailldap.inc.php,v
retrieving revision 1.13.2.2
retrieving revision 1.13.2.2.2.1
diff -C2 -r1.13.2.2 -r1.13.2.2.2.1
*** class.soqmailldap.inc.php 11 Dec 2002 13:57:03 -0000 1.13.2.2
--- class.soqmailldap.inc.php 22 Apr 2003 15:22:27 -0000 1.13.2.2.2.1
***************
*** 1,7 ****
<?php
/***************************************************************************\
! * phpGroupWare - Notes
*
* http://www.phpgroupware.org
*
! * Written by : Bettina Gille address@hidden *
* -------------------------------------------------
*
* This program is free software; you can redistribute it and/or modify
it *
--- 1,8 ----
<?php
/***************************************************************************\
! * phpGroupWare - QMailLDAP
*
* http://www.phpgroupware.org
*
! * http://www.linux-at-work.de
*
! * Written by : Lars Kneschke address@hidden *
* -------------------------------------------------
*
* This program is free software; you can redistribute it and/or modify
it *
Index: class.uiqmailldap.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/qmailldap/inc/class.uiqmailldap.inc.php,v
retrieving revision 1.11.2.1
retrieving revision 1.11.2.1.2.1
diff -C2 -r1.11.2.1 -r1.11.2.1.2.1
*** class.uiqmailldap.inc.php 11 Dec 2002 14:40:46 -0000 1.11.2.1
--- class.uiqmailldap.inc.php 22 Apr 2003 15:22:27 -0000 1.11.2.1.2.1
***************
*** 3,8 ****
* phpGroupWare - Notes
*
* http://www.phpgroupware.org
*
! * Written by : Lars Kneschke address@hidden *
! * -------------------------------------------------
*
* 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
*
--- 3,8 ----
* phpGroupWare - Notes
*
* http://www.phpgroupware.org
*
! * Written by: Lars Kneschke address@hidden *
! * ----------------------------------------------
*
* 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
*
***************
*** 14,52 ****
class uiqmailldap
{
- #var $grants;
- #var $cat_id;
- #var $start;
- #var $search;
- #var $filter;
-
var $public_functions = array
(
'listServers' => True,
! 'addServer' => True,
'deleteServer' => True,
'editServer' => True,
'editSettings' => True,
'addSmtpRoute' => True,
! 'save' => True
);
function uiqmailldap()
{
! global $phpgw, $phpgw_info;
!
! $this->cats =
CreateObject('phpgwapi.categories');
$this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
- #$this->account =
$phpgw_info['user']['account_id'];
- $this->t =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
- #$this->grants =
$phpgw->acl->get_grants('notes');
- #$this->grants[$this->account] = PHPGW_ACL_READ +
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
$this->boqmailldap =
CreateObject('qmailldap.boqmailldap');
! $this->rowColor[0] = $phpgw_info["theme"]["row_on"];
! $this->rowColor[1] = $phpgw_info["theme"]["row_off"];
! $this->dataRowColor[0] = $phpgw_info["theme"]["bg01"];
! $this->dataRowColor[1] = $phpgw_info["theme"]["bg02"];
!
}
--- 14,39 ----
class uiqmailldap
{
var $public_functions = array
(
'listServers' => True,
! 'addServer' => True,
'deleteServer' => True,
'editServer' => True,
'editSettings' => True,
'addSmtpRoute' => True,
! 'save' => True
);
function uiqmailldap()
{
! $this->cats =
CreateObject('phpgwapi.categories');
$this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
$this->boqmailldap =
CreateObject('qmailldap.boqmailldap');
! $this->rowColor[0] =
$GLOBALS['phpgw_info']['theme']['row_on'];
! $this->rowColor[1] =
$GLOBALS['phpgw_info']['theme']['row_off'];
! $this->dataRowColor[0] =
$GLOBALS['phpgw_info']['theme']['bg01'];
! $this->dataRowColor[1] =
$GLOBALS['phpgw_info']['theme']['bg02'];
}
***************
*** 55,88 ****
$this->display_app_header();
! $this->t->set_file(array("body" => 'ldapsettings.tpl'));
! $this->t->set_block('body','main');
! $this->t->set_block('body','menu_row');
! $this->t->set_block('body','menu_row_bold');
! $this->t->set_block('body','activation_row');
!
$this->translate();
!
$this->t->set_var('done_row_color',$this->rowColor[($i)%2]);
$linkData = array
(
'menuaction' =>
'qmailldap.uiqmailldap.listServers'
);
!
$this->t->set_var('done_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
!
$this->t->set_var('th_bg',$GLOBALS['phpgw_info']["theme"]["th_bg"]);
!
$this->t->set_var('bg_01',$GLOBALS['phpgw_info']["theme"]["bg01"]);
!
$this->t->set_var('bg_02',$GLOBALS['phpgw_info']["theme"]["bg02"]);
$linkData = array
(
! 'menuaction' => 'qmailldap.uiqmailldap.save'
);
!
$this->t->set_var('form_action',$GLOBALS['phpgw']->link('/index.php',$linkData));
! $this->t->parse("out","main");
! print $this->t->get('out','main');
!
$GLOBALS['phpgw']->common->phpgw_footer();
}
!
function addSmtpRoute()
{
--- 42,71 ----
$this->display_app_header();
! $GLOBALS['phpgw']->template->set_file(array('body' =>
'ldapsettings.tpl'));
! $GLOBALS['phpgw']->template->set_block('body','main');
!
$GLOBALS['phpgw']->template->set_block('body','menu_row');
!
$GLOBALS['phpgw']->template->set_block('body','menu_row_bold');
!
$GLOBALS['phpgw']->template->set_block('body','activation_row');
!
$this->translate();
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('qmailldap') . ': ' . lang('add server');
!
$GLOBALS['phpgw']->template->set_var('done_row_color',$this->rowColor[($i)%2]);
$linkData = array
(
'menuaction' =>
'qmailldap.uiqmailldap.listServers'
);
!
$GLOBALS['phpgw']->template->set_var('done_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
$linkData = array
(
! 'menuaction' => 'qmailldap.uiqmailldap.save'
);
!
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php',$linkData));
! $GLOBALS['phpgw']->template->pfp('out','main');
$GLOBALS['phpgw']->common->phpgw_footer();
}
!
function addSmtpRoute()
{
***************
*** 120,127 ****
);
! $this->t->set_file(array("body" =>
$menu[$_pagenumber]['template']));
! $this->t->set_block('body','menu_row');
! $this->t->set_block('body','menu_row_bold');
! $this->t->set_block('body','activation_row');
reset($menu);
--- 103,110 ----
);
! $GLOBALS['phpgw']->template->set_file(array('body' =>
$menu[$_pagenumber]['template']));
!
$GLOBALS['phpgw']->template->set_block('body','menu_row');
!
$GLOBALS['phpgw']->template->set_block('body','menu_row_bold');
!
$GLOBALS['phpgw']->template->set_block('body','activation_row');
reset($menu);
***************
*** 129,148 ****
while (list($key,$value) = each($menu))
{
!
$this->t->set_var('menu_description',$value['name']);
$linkData = array
(
'menuaction' =>
'qmailldap.uiqmailldap.editServer',
'pagenumber' => $key,
! 'serverid' => $_serverid
);
!
$this->t->set_var('menu_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
!
$this->t->set_var('menu_row_color',$this->rowColor[$i%2]);
if ($_pagenumber == $key)
{
!
$this->t->parse('menu_rows','menu_row_bold',True);
}
else
{
!
$this->t->parse('menu_rows','menu_row',True);
}
$i++;
--- 112,131 ----
while (list($key,$value) = each($menu))
{
!
$GLOBALS['phpgw']->template->set_var('menu_description',$value['name']);
$linkData = array
(
'menuaction' =>
'qmailldap.uiqmailldap.editServer',
'pagenumber' => $key,
! 'serverid' => $_serverid
);
!
$GLOBALS['phpgw']->template->set_var('menu_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
!
$GLOBALS['phpgw']->template->set_var('menu_row_color',$this->rowColor[$i%2]);
if ($_pagenumber == $key)
{
!
$GLOBALS['phpgw']->template->parse('menu_rows','menu_row_bold',True);
}
else
{
!
$GLOBALS['phpgw']->template->parse('menu_rows','menu_row',True);
}
$i++;
***************
*** 155,171 ****
'menuaction' =>
'qmailldap.uiqmailldap.save',
'pagenumber' => $_pagenumber,
! 'serverid' => $_serverid,
! 'bo_action' => 'write_to_ldap'
);
!
$this->t->set_var('activation_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
!
$this->t->parse('activation_rows','activation_row');
}
!
$this->t->set_var('done_row_color',$this->rowColor[($i)%2]);
$linkData = array
(
! 'menuaction' =>
'qmailldap.uiqmailldap.listServers',
);
!
$this->t->set_var('done_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
}
--- 138,154 ----
'menuaction' =>
'qmailldap.uiqmailldap.save',
'pagenumber' => $_pagenumber,
! 'serverid' => $_serverid,
! 'bo_action' =>
'write_to_ldap'
);
!
$GLOBALS['phpgw']->template->set_var('activation_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
!
$GLOBALS['phpgw']->template->parse('activation_rows','activation_row');
}
!
$GLOBALS['phpgw']->template->set_var('done_row_color',$this->rowColor[($i)%2]);
$linkData = array
(
! 'menuaction' =>
'qmailldap.uiqmailldap.listServers',
);
!
$GLOBALS['phpgw']->template->set_var('done_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
}
***************
*** 179,196 ****
function display_app_header()
{
! global $phpgw, $phpgw_info;
!
! $phpgw->common->phpgw_header();
echo parse_navbar();
-
}
function editServer($_serverid='', $_pagenumber='')
{
! global $phpgw, $phpgw_info, $serverid, $pagenumber,
$HTTP_GET_VARS;
!
! if(!empty($_serverid)) $serverid=$_serverid;
! if(!empty($_pagenumber)) $pagenumber=$_pagenumber;
!
$ldapData = $this->boqmailldap->getLDAPData($serverid);
--- 162,185 ----
function display_app_header()
{
! $GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
}
function editServer($_serverid='', $_pagenumber='')
{
! $serverid =
get_var('serverid',array('POST','GET'));
! $HTTP_GET_VARS = get_var('HTTP_GET_VARS',array('GET'));
! $pagenumber =
get_var('pagenumber',array('POST','GET'));
!
! if(!empty($_serverid))
! {
! $serverid = $_serverid;
! }
!
! if(!empty($_pagenumber))
! {
! $pagenumber = $_pagenumber;
! }
!
$ldapData = $this->boqmailldap->getLDAPData($serverid);
***************
*** 199,206 ****
$this->createMenu($serverid, $pagenumber, $ldapData);
! $this->t->set_block('body','main');
!
$this->translate();
!
$linkData = array
(
--- 188,195 ----
$this->createMenu($serverid, $pagenumber, $ldapData);
! $GLOBALS['phpgw']->template->set_block('body','main');
$this->translate();
! $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('qmailldap') . ': ' . lang('edit server');
!
$linkData = array
(
***************
*** 209,217 ****
'serverid' => $serverid
);
!
$this->t->set_var('form_action',$phpgw->link('/index.php',$linkData));
switch($pagenumber)
{
! case "0":
if (count($ldapData['rcpthosts']) > 0)
{
--- 198,206 ----
'serverid' => $serverid
);
!
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php',$linkData));
switch($pagenumber)
{
! case '0':
if (count($ldapData['rcpthosts']) > 0)
{
***************
*** 224,233 ****
}
$selectBox .= "</select>\n";
!
$this->t->set_var('rcpt_selectbox',$selectBox);
}
else
{
!
$this->t->set_var('rcpt_selectbox',
! "<b>".lang("We don't
accept any email!")."</b>");
}
--- 213,222 ----
}
$selectBox .= "</select>\n";
!
$GLOBALS['phpgw']->template->set_var('rcpt_selectbox',$selectBox);
}
else
{
!
$GLOBALS['phpgw']->template->set_var('rcpt_selectbox',
! "<b>".lang('We don't
accept any email!')."</b>");
}
***************
*** 243,259 ****
}
$selectBox .= "</select>\n";
!
$this->t->set_var('locals_selectbox',$selectBox);
}
else
{
!
$this->t->set_var('locals_selectbox',
! "<b>".lang("We don't
deliver any email local!")."</b>");
}
-
-
break;
!
! case "15":
!
$this->t->set_block('body','smtproute_row');
if (count($ldapData['smtproutes']) > 0)
--- 232,245 ----
}
$selectBox .= "</select>\n";
!
$GLOBALS['phpgw']->template->set_var('locals_selectbox',$selectBox);
}
else
{
!
$GLOBALS['phpgw']->template->set_var('locals_selectbox',
! "<b>".lang('We do not
deliver any email locally !')."</b>");
}
break;
! case '15':
!
$GLOBALS['phpgw']->template->set_block('body','smtproute_row');
if (count($ldapData['smtproutes']) > 0)
***************
*** 261,279 ****
for ($i=0;$i <
count($ldapData['smtproutes']); $i++)
{
! $smtproute =
explode(":",$ldapData['smtproutes'][$i]);
!
$this->t->set_var('domain_name',$smtproute[0]);
!
$this->t->set_var('remote_server',$smtproute[1]);
!
$this->t->set_var('remote_port',$smtproute[2]);
!
$this->t->set_var('row_color',$this->dataRowColor[($i)%2]);
$linkData = array
(
'menuaction'
=> 'qmailldap.uiqmailldap.save',
! 'bo_action'
=> 'remove_smtproute',
'smtproute_id'
=> $i,
'pagenumber'
=> 15,
! 'serverid'
=> $serverid
);
!
$this->t->set_var('delete_route_link',$phpgw->link('/index.php',$linkData));
!
$this->t->parse('smtproute_rows','smtproute_row',True);
}
}
--- 247,265 ----
for ($i=0;$i <
count($ldapData['smtproutes']); $i++)
{
! $smtproute =
explode(':',$ldapData['smtproutes'][$i]);
!
$GLOBALS['phpgw']->template->set_var('domain_name',$smtproute[0]);
!
$GLOBALS['phpgw']->template->set_var('remote_server',$smtproute[1]);
!
$GLOBALS['phpgw']->template->set_var('remote_port',$smtproute[2]);
!
$GLOBALS['phpgw']->template->set_var('row_color',$this->dataRowColor[($i)%2]);
$linkData = array
(
'menuaction'
=> 'qmailldap.uiqmailldap.save',
! 'bo_action'
=> 'remove_smtproute',
'smtproute_id'
=> $i,
'pagenumber'
=> 15,
! 'serverid'
=> $serverid
);
!
$GLOBALS['phpgw']->template->set_var('delete_route_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
!
$GLOBALS['phpgw']->template->parse('smtproute_rows','smtproute_row',True);
}
}
***************
*** 283,350 ****
'menuaction' =>
'qmailldap.uiqmailldap.addSmtpRoute',
'pagenumber' => 15,
! 'serverid' => $serverid
);
!
$this->t->set_var('last_row_color',$this->dataRowColor[($i)%2]);
!
$this->t->set_var('add_route_link',$phpgw->link('/index.php',$linkData));
!
break;
!
! case "20":
!
$this->t->set_var("ldaplocaldelivery_".$ldapData['ldaplocaldelivery'],'selected');
!
$this->t->set_var("ldapdefaultdotmode_".$ldapData['ldapdefaultdotmode'],'selected');
!
$this->t->set_var("ldapbasedn",$ldapData['ldapbasedn']);
!
break;
!
! case "99":
if ($storageData =
$this->boqmailldap->getLDAPStorageData($serverid))
{
!
$this->t->set_var('qmail_servername',$storageData['qmail_servername']);
!
$this->t->set_var('description',$storageData['description']);
!
$this->t->set_var('ldap_basedn',$storageData['ldap_basedn']);
}
break;
}
!
! $this->t->parse("out","main");
! print $this->t->get('out','main');
!
! $phpgw->common->phpgw_footer();
}
function editSettings($_serverid='')
{
! global $phpgw, $phpgw_info, $serverid, $HTTP_GET_VARS;
!
! if(!empty($_serverid)) $serverid=$_serverid;
!
$ldapData = $this->boqmailldap->getLDAPData($serverid);
$this->display_app_header();
! $this->t->set_file(array("body" => 'ldapsettings.tpl'));
! $this->t->set_block('body','main');
! $this->t->set_block('body','menu_row');
! $this->t->set_block('body','menu_row_bold');
! $this->t->set_block('body','activation_row');
!
$this->translate();
if ($storageData =
$this->boqmailldap->getLDAPStorageData($serverid))
{
!
$this->t->set_var('qmail_servername',$storageData['qmail_servername']);
!
$this->t->set_var('description',$storageData['description']);
!
$this->t->set_var('ldap_basedn',$storageData['ldap_basedn']);
}
!
$this->t->set_var('done_row_color',$this->rowColor[($i)%2]);
$linkData = array
(
! 'menuaction' =>
'qmailldap.uiqmailldap.listServers'
);
!
$this->t->set_var('done_link',$phpgw->link('/index.php',$linkData));
!
$this->t->set_var('th_bg',$phpgw_info["theme"]["th_bg"]);
! $this->t->set_var('bg_01',$phpgw_info["theme"]["bg01"]);
! $this->t->set_var('bg_02',$phpgw_info["theme"]["bg02"]);
$linkData = array
--- 269,331 ----
'menuaction' =>
'qmailldap.uiqmailldap.addSmtpRoute',
'pagenumber' => 15,
! 'serverid' =>
$serverid
);
!
$GLOBALS['phpgw']->template->set_var('last_row_color',$this->dataRowColor[($i)%2]);
!
$GLOBALS['phpgw']->template->set_var('add_route_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
break;
! case '20':
!
$GLOBALS['phpgw']->template->set_var('ldaplocaldelivery_'.$ldapData['ldaplocaldelivery'],'selected');
!
$GLOBALS['phpgw']->template->set_var('ldapdefaultdotmode_'.$ldapData['ldapdefaultdotmode'],'selected');
!
$GLOBALS['phpgw']->template->set_var('ldapbasedn',$ldapData['ldapbasedn']);
break;
! case '99':
if ($storageData =
$this->boqmailldap->getLDAPStorageData($serverid))
{
!
$GLOBALS['phpgw']->template->set_var('qmail_servername',$storageData['qmail_servername']);
!
$GLOBALS['phpgw']->template->set_var('description',$storageData['description']);
!
$GLOBALS['phpgw']->template->set_var('ldap_basedn',$storageData['ldap_basedn']);
}
break;
}
! $GLOBALS['phpgw']->template->pfp('out','main');
! $GLOBALS['phpgw']->common->phpgw_footer();
}
function editSettings($_serverid='')
{
! $serverid =
get_var('serverid',array('POST','GET'));
! $HTTP_GET_VARS = get_var('HTTP_GET_VARS',array('GET'));
!
! if(!empty($_serverid))
! {
! $serverid = $_serverid;
! }
!
$ldapData = $this->boqmailldap->getLDAPData($serverid);
$this->display_app_header();
! $GLOBALS['phpgw']->template->set_file(array('body' =>
'ldapsettings.tpl'));
! $GLOBALS['phpgw']->template->set_block('body','main');
!
$GLOBALS['phpgw']->template->set_block('body','menu_row');
!
$GLOBALS['phpgw']->template->set_block('body','menu_row_bold');
!
$GLOBALS['phpgw']->template->set_block('body','activation_row');
!
$this->translate();
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('qmailldap') . ': ' . lang('edit settings');
if ($storageData =
$this->boqmailldap->getLDAPStorageData($serverid))
{
!
$GLOBALS['phpgw']->template->set_var('qmail_servername',$storageData['qmail_servername']);
!
$GLOBALS['phpgw']->template->set_var('description',$storageData['description']);
!
$GLOBALS['phpgw']->template->set_var('ldap_basedn',$storageData['ldap_basedn']);
}
!
$GLOBALS['phpgw']->template->set_var('done_row_color',$this->rowColor[($i)%2]);
$linkData = array
(
! 'menuaction' =>
'qmailldap.uiqmailldap.listServers'
);
!
$GLOBALS['phpgw']->template->set_var('done_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
$linkData = array
***************
*** 354,376 ****
'serverid' => $serverid
);
!
$this->t->set_var('form_action',$phpgw->link('/index.php',$linkData));
! $this->t->parse("out","main");
! print $this->t->get('out','main');
!
! $phpgw->common->phpgw_footer();
}
function listServers()
{
- global $phpgw, $phpgw_info;
-
$this->display_app_header();
! $this->t->set_file(array("body" => "listservers.tpl"));
! $this->t->set_block('body','main','main');
! $this->t->set_block('body','row','row');
!
$this->translate();
$serverList = $this->boqmailldap->getServerList();
--- 335,354 ----
'serverid' => $serverid
);
!
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php',$linkData));
! $GLOBALS['phpgw']->template->pfp('out','main');
! $GLOBALS['phpgw']->common->phpgw_footer();
}
function listServers()
{
$this->display_app_header();
! $GLOBALS['phpgw']->template->set_file(array('body' =>
'listservers.tpl'));
!
$GLOBALS['phpgw']->template->set_block('body','main','main');
!
$GLOBALS['phpgw']->template->set_block('body','row','row');
!
$this->translate();
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('qmailldap') . ': ' . lang('list servers');
$serverList = $this->boqmailldap->getServerList();
***************
*** 380,408 ****
for ($i=0; $i < count($serverList); $i++)
{
!
$this->t->set_var('server_name',$serverList[$i]['qmail_servername']);
!
$this->t->set_var('server_description',$serverList[$i]['description']);
$linkData = array
(
'menuaction' =>
'qmailldap.uiqmailldap.editServer',
! 'nocache' => '1',
'pagenumber' => '0',
! 'serverid' =>
$serverList[$i]['id']
);
!
$this->t->set_var('edit_link',$phpgw->link('/index.php',$linkData));
$linkData = array
(
'menuaction' =>
'qmailldap.uiqmailldap.editSettings',
! 'nocache' => '1',
! 'serverid' =>
$serverList[$i]['id']
);
!
$this->t->set_var('settings_link',$phpgw->link('/index.php',$linkData));
$linkData = array
(
'menuaction' =>
'qmailldap.uiqmailldap.deleteServer',
! 'serverid' =>
$serverList[$i]['id']
);
!
$this->t->set_var('delete_link',$phpgw->link('/index.php',$linkData));
!
$this->t->set_var('row_color',$this->rowColor[$i%2]);
! $this->t->parse('rows','row',True);
}
}
--- 358,386 ----
for ($i=0; $i < count($serverList); $i++)
{
!
$GLOBALS['phpgw']->template->set_var('server_name',$serverList[$i]['qmail_servername']);
!
$GLOBALS['phpgw']->template->set_var('server_description',$serverList[$i]['description']);
$linkData = array
(
'menuaction' =>
'qmailldap.uiqmailldap.editServer',
! 'nocache' => '1',
'pagenumber' => '0',
! 'serverid' =>
$serverList[$i]['id']
);
!
$GLOBALS['phpgw']->template->set_var('edit_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
$linkData = array
(
'menuaction' =>
'qmailldap.uiqmailldap.editSettings',
! 'nocache' => '1',
! 'serverid' =>
$serverList[$i]['id']
);
!
$GLOBALS['phpgw']->template->set_var('settings_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
$linkData = array
(
'menuaction' =>
'qmailldap.uiqmailldap.deleteServer',
! 'serverid' =>
$serverList[$i]['id']
);
!
$GLOBALS['phpgw']->template->set_var('delete_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
!
$GLOBALS['phpgw']->template->set_var('row_color',$this->rowColor[$i%2]);
!
$GLOBALS['phpgw']->template->parse('rows','row',True);
}
}
***************
*** 412,422 ****
'menuaction' =>
'qmailldap.uiqmailldap.addServer'
);
!
$this->t->set_var('add_link',$phpgw->link('/index.php',$linkData));
! $this->t->parse("out","main");
!
! print $this->t->get('out','main');
!
! $phpgw->common->phpgw_footer();
}
--- 390,397 ----
'menuaction' =>
'qmailldap.uiqmailldap.addServer'
);
!
$GLOBALS['phpgw']->template->set_var('add_link',$GLOBALS['phpgw']->link('/index.php',$linkData));
! $GLOBALS['phpgw']->template->parse('out','main');
! $GLOBALS['phpgw']->common->phpgw_footer();
}
***************
*** 424,428 ****
function save()
{
! global $HTTP_POST_VARS, $HTTP_GET_VARS;
$this->boqmailldap->save($HTTP_POST_VARS,
$HTTP_GET_VARS);
--- 399,404 ----
function save()
{
! $HTTP_POST_VARS =
get_var('HTTP_POST_VARS',array('POST'));
! $HTTP_GET_VARS = get_var('HTTP_GET_VARS',array('GET'));
$this->boqmailldap->save($HTTP_POST_VARS,
$HTTP_GET_VARS);
***************
*** 433,474 ****
else
{
!
$this->editServer($HTTP_GET_VARS["serverid"],$HTTP_GET_VARS["pagenumber"]);
}
}
!
function translate()
{
! global $phpgw_info;
!
!
$this->t->set_var('th_bg',$phpgw_info["theme"]["th_bg"]);
! $this->t->set_var('bg_01',$phpgw_info["theme"]["bg01"]);
! $this->t->set_var('bg_02',$phpgw_info["theme"]["bg02"]);
!
! $this->t->set_var('lang_server_list',lang('server
list'));
! $this->t->set_var('lang_server_name',lang('server
name'));
!
$this->t->set_var('lang_server_description',lang('description'));
! $this->t->set_var('lang_activate',lang('Activate'));
! $this->t->set_var('lang_edit',lang('edit'));
! $this->t->set_var('lang_save',lang('save'));
! $this->t->set_var('lang_delete',lang('delete'));
! $this->t->set_var('lang_disabled',lang('disabled'));
! $this->t->set_var('lang_enabled',lang('enabled'));
! $this->t->set_var('lang_add',lang('add'));
! $this->t->set_var('lang_done',lang('Done'));
! $this->t->set_var('lang_back',lang('back'));
! $this->t->set_var('lang_remove',lang('remove'));
! $this->t->set_var('lang_add_to_local',lang('add also to
local domains'));
! $this->t->set_var('lang_ldap_server',lang('LDAP
server'));
! $this->t->set_var('lang_qmail_dn',lang('qmail dn'));
! $this->t->set_var('lang_ldap_server_admin',lang('admin
dn'));
!
$this->t->set_var('lang_ldap_server_password',lang('admin password'));
! $this->t->set_var('lang_add_server',lang('add server'));
!
$this->t->set_var('lang_domain_name',lang('domainname'));
! $this->t->set_var('lang_remote_server',lang('remote
server'));
! $this->t->set_var('lang_remote_port',lang('remote
port'));
!
! $this->t->set_var('desc_ldaplocaldelivery',lang('To
lookup the local passwd file if the LDAP lookup finds no match. This affects
qmail-lspawn and auth_* if the LDAP lookup returns nothing.'));
! $this->t->set_var('desc_ldapdefaultdotmode',lang('The
default interpretation of .qmail files.<br><b>Note:</b> Works only for
deliveries based on LDAP lookups. Local mails use dotonly like in normal
qmail.'));
! $this->t->set_var('desc_ldapbasedn',lang('The base DN
from where the search in the LDAP tree begins.'));
}
}
--- 409,448 ----
else
{
!
$this->editServer($HTTP_GET_VARS['serverid'],$HTTP_GET_VARS['pagenumber']);
}
}
!
function translate()
{
!
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
!
$GLOBALS['phpgw']->template->set_var('bg_01',$GLOBALS['phpgw_info']['theme']['bg01']);
!
$GLOBALS['phpgw']->template->set_var('bg_02',$GLOBALS['phpgw_info']['theme']['bg02']);
!
!
$GLOBALS['phpgw']->template->set_var('lang_server_list',lang('server list'));
!
$GLOBALS['phpgw']->template->set_var('lang_server_name',lang('server name'));
!
$GLOBALS['phpgw']->template->set_var('lang_server_description',lang('description'));
!
$GLOBALS['phpgw']->template->set_var('lang_activate',lang('Activate'));
!
$GLOBALS['phpgw']->template->set_var('lang_edit',lang('edit'));
!
$GLOBALS['phpgw']->template->set_var('lang_save',lang('save'));
!
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('delete'));
!
$GLOBALS['phpgw']->template->set_var('lang_disabled',lang('disabled'));
!
$GLOBALS['phpgw']->template->set_var('lang_enabled',lang('enabled'));
!
$GLOBALS['phpgw']->template->set_var('lang_add',lang('add'));
!
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Done'));
!
$GLOBALS['phpgw']->template->set_var('lang_back',lang('back'));
!
$GLOBALS['phpgw']->template->set_var('lang_remove',lang('remove'));
!
$GLOBALS['phpgw']->template->set_var('lang_add_to_local',lang('add also to
local domains'));
!
$GLOBALS['phpgw']->template->set_var('lang_ldap_server',lang('LDAP server'));
!
$GLOBALS['phpgw']->template->set_var('lang_qmail_dn',lang('qmail dn'));
!
$GLOBALS['phpgw']->template->set_var('lang_ldap_server_admin',lang('admin dn'));
!
$GLOBALS['phpgw']->template->set_var('lang_ldap_server_password',lang('admin
password'));
!
$GLOBALS['phpgw']->template->set_var('lang_add_server',lang('add server'));
!
$GLOBALS['phpgw']->template->set_var('lang_domain_name',lang('domainname'));
!
$GLOBALS['phpgw']->template->set_var('lang_remote_server',lang('remote
server'));
!
$GLOBALS['phpgw']->template->set_var('lang_remote_port',lang('remote port'));
!
!
$GLOBALS['phpgw']->template->set_var('desc_ldaplocaldelivery',lang('To lookup
the local passwd file if the LDAP lookup finds no match. This affects
qmail-lspawn and auth_* if the LDAP lookup returns nothing.'));
!
$GLOBALS['phpgw']->template->set_var('desc_ldapdefaultdotmode',lang('The
default interpretation of .qmail files.<br><b>Note:</b> Works only for
deliveries based on LDAP lookups. Local mails use dotonly like in normal
qmail.'));
!
$GLOBALS['phpgw']->template->set_var('desc_ldapbasedn',lang('The base DN from
where the search in the LDAP tree begins.'));
}
}
Index: class.uiuserdata.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/qmailldap/inc/class.uiuserdata.inc.php,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -C2 -r1.6 -r1.6.4.1
*** class.uiuserdata.inc.php 4 Oct 2001 00:48:55 -0000 1.6
--- class.uiuserdata.inc.php 22 Apr 2003 15:22:27 -0000 1.6.4.1
***************
*** 5,9 ****
* http://www.linux-at-work.de
*
* Written by : Lars Kneschke address@hidden *
! * -------------------------------------------------
*
* 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
*
--- 5,9 ----
* http://www.linux-at-work.de
*
* Written by : Lars Kneschke address@hidden *
! * -------------------------------------------------------
*
* 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
*
***************
*** 15,19 ****
class uiuserdata
{
-
var $public_functions = array
(
--- 15,18 ----
***************
*** 24,34 ****
function uiuserdata()
{
! global $phpgw, $phpgw_info;
! $this->t =
CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('qmailldap'));
! $this->boqmailldap =
CreateObject('qmailldap.boqmailldap');
!
! $this->rowColor[0] = $phpgw_info["theme"]["bg01"];
! $this->rowColor[1] = $phpgw_info["theme"]["bg02"];
}
--- 23,30 ----
function uiuserdata()
{
! $this->boqmailldap =
CreateObject('qmailldap.boqmailldap');
! $this->rowColor[0] =
$GLOBALS['phpgw_info']["theme"]["bg01"];
! $this->rowColor[1] =
$GLOBALS['phpgw_info']["theme"]["bg02"];
}
***************
*** 36,49 ****
function display_app_header()
{
! global $phpgw, $phpgw_info;
!
! $phpgw->common->phpgw_header();
echo parse_navbar();
-
}
function editUserData($_useCache='0')
{
! global $phpgw, $phpgw_info, $HTTP_GET_VARS;
$accountID = $HTTP_GET_VARS['account_id'];
--- 32,42 ----
function display_app_header()
{
! $GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
}
function editUserData($_useCache='0')
{
! $HTTP_GET_VARS = get_var('HTTP_GET_VARS',array('GET'));
$accountID = $HTTP_GET_VARS['account_id'];
***************
*** 52,76 ****
$this->translate();
- $this->t->set_file(array("editUserData" =>
"edituserdata.tpl"));
- $this->t->set_block('editUserData','form','form');
-
$this->t->set_block('editUserData','link_row','link_row');
-
$this->t->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
-
$this->t->set_var("tr_color1",$phpgw_info["theme"]["row_on"]);
-
$this->t->set_var("tr_color2",$phpgw_info["theme"]["row_off"]);
-
- $this->t->set_var("lang_email_config",lang("edit email
settings"));
- $this->t->set_var("lang_emailAddress",lang("email
address"));
-
$this->t->set_var("lang_emailaccount_active",lang("email account active"));
-
$this->t->set_var("lang_mailAlternateAddress",lang("alternate email address"));
-
$this->t->set_var("lang_mailRoutingAddress",lang("forward email's to"));
- $this->t->set_var("lang_forward_also_to",lang("forward
also to"));
- $this->t->set_var("lang_button",lang("save"));
- $this->t->set_var("lang_deliver_extern",lang("deliver
extern"));
- $this->t->set_var("lang_deliver_extern",lang("deliver
extern"));
- $this->t->set_var("lang_edit_email_settings",lang("edit
email settings"));
- $this->t->set_var("lang_ready",lang("Done"));
-
$this->t->set_var("link_back",$phpgw->link('/admin/accounts.php'));
-
$linkData = array
(
--- 45,67 ----
$this->translate();
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('qmailldap') . ': ' . lang('edit user data');
+
+
+
$GLOBALS['phpgw']->template->set_file(array('editUserData' =>
'edituserdata.tpl'));
+
$GLOBALS['phpgw']->template->set_block('editUserData','form','form');
+
$GLOBALS['phpgw']->template->set_block('editUserData','link_row','link_row');
+
+
$GLOBALS['phpgw']->template->set_var('lang_email_config',lang('edit email
settings'));
+
$GLOBALS['phpgw']->template->set_var('lang_emailAddress',lang('email address'));
+
$GLOBALS['phpgw']->template->set_var('lang_emailaccount_active',lang('email
account active'));
+
$GLOBALS['phpgw']->template->set_var('lang_mailAlternateAddress',lang('alternate
email address'));
+
$GLOBALS['phpgw']->template->set_var('lang_mailRoutingAddress',lang('forward
emails to'));
+
$GLOBALS['phpgw']->template->set_var('lang_forward_also_to',lang('forward also
to'));
+
$GLOBALS['phpgw']->template->set_var('lang_button',lang('save'));
+
$GLOBALS['phpgw']->template->set_var('lang_deliver_extern',lang('deliver
extern'));
+
$GLOBALS['phpgw']->template->set_var('lang_edit_email_settings',lang('edit
email settings'));
+
$GLOBALS['phpgw']->template->set_var('lang_ready',lang('Done'));
+
$GLOBALS['phpgw']->template->set_var('link_back',$GLOBALS['phpgw']->link('/admin/accounts.php'));
$linkData = array
(
***************
*** 78,82 ****
'account_id' => $accountID
);
! $this->t->set_var("form_action",
$phpgw->link('/index.php',$linkData));
// only when we show a existing user
--- 69,73 ----
'account_id' => $accountID
);
!
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php',$linkData));
// only when we show a existing user
***************
*** 99,129 ****
}
!
$this->t->set_var("mailLocalAddress",$userData["mailLocalAddress"]);
! $this->t->set_var("mailAlternateAddress",'');
!
$this->t->set_var("options_mailAlternateAddress",$options_mailAlternateAddress);
!
$this->t->set_var("mailRoutingAddress",$userData["mailRoutingAddress"]);
!
$this->t->set_var("selected_".$userData["qmailDotMode"],'selected');
!
$this->t->set_var("deliveryProgramPath",$userData["deliveryProgramPath"]);
!
$this->t->set_var("uid",rawurlencode($_accountData["dn"]));
! if ($userData["accountStatus"] == "active")
!
$this->t->set_var("account_checked","checked");
! if ($_accountData["deliverExtern"] == "active")
!
$this->t->set_var("deliver_checked","checked");
}
else
{
! $this->t->set_var("mailLocalAddress",'');
! $this->t->set_var("mailAlternateAddress",'');
! $this->t->set_var("mailRoutingAddress",'');
!
$this->t->set_var("options_mailAlternateAddress",lang('no alternate email
address'));
! $this->t->set_var("account_checked",'');
}
// create the menu on the left, if needed
$menuClass = CreateObject('admin.uimenuclass');
!
$this->t->set_var('rows',$menuClass->createHTMLCode('edit_user'));
! $this->t->pparse("out","form");
}
--- 90,120 ----
}
!
$GLOBALS['phpgw']->template->set_var('mailLocalAddress',$userData['mailLocalAddress']);
!
$GLOBALS['phpgw']->template->set_var('mailAlternateAddress','');
!
$GLOBALS['phpgw']->template->set_var('options_mailAlternateAddress',$options_mailAlternateAddress);
!
$GLOBALS['phpgw']->template->set_var('mailRoutingAddress',$userData['mailRoutingAddress']);
!
$GLOBALS['phpgw']->template->set_var('selected_'.$userData['qmailDotMode'],'selected');
!
$GLOBALS['phpgw']->template->set_var('deliveryProgramPath',$userData["deliveryProgramPath"]);
!
$GLOBALS['phpgw']->template->set_var('uid',rawurlencode($_accountData['dn']));
! if ($userData['accountStatus'] == 'active')
!
$GLOBALS['phpgw']->template->set_var('account_checked','checked');
! if ($_accountData['deliverExtern'] == 'active')
!
$GLOBALS['phpgw']->template->set_var('deliver_checked','checked');
}
else
{
!
$GLOBALS['phpgw']->template->set_var('mailLocalAddress','');
!
$GLOBALS['phpgw']->template->set_var('mailAlternateAddress','');
!
$GLOBALS['phpgw']->template->set_var('mailRoutingAddress','');
!
$GLOBALS['phpgw']->template->set_var('options_mailAlternateAddress',lang('no
alternate email address'));
!
$GLOBALS['phpgw']->template->set_var('account_checked','');
}
// create the menu on the left, if needed
$menuClass = CreateObject('admin.uimenuclass');
!
$GLOBALS['phpgw']->template->set_var('rows',$menuClass->createHTMLCode('edit_user'));
! $GLOBALS['phpgw']->template->pfp('out','form');
}
***************
*** 131,156 ****
function saveUserData()
{
! global $HTTP_POST_VARS, $HTTP_GET_VARS;
! if($HTTP_POST_VARS["accountStatus"] == "on")
{
! $accountStatus = "active";
}
$formData = array
(
! 'mailLocalAddress' =>
$HTTP_POST_VARS["mailLocalAddress"],
! 'mailRoutingAddress' =>
$HTTP_POST_VARS["mailRoutingAddress"],
! 'add_mailAlternateAddress' =>
$HTTP_POST_VARS["mailAlternateAddressInput"],
! 'remove_mailAlternateAddress' =>
$HTTP_POST_VARS["mailAlternateAddress"],
! 'qmailDotMode' =>
$HTTP_POST_VARS["qmailDotMode"],
! 'deliveryProgramPath' =>
$HTTP_POST_VARS["deliveryProgramPath"],
! 'accountStatus' =>
$accountStatus
);
! if($HTTP_POST_VARS["add_mailAlternateAddress"])
$bo_action='add_mailAlternateAddress';
! if($HTTP_POST_VARS["remove_mailAlternateAddress"])
$bo_action='remove_mailAlternateAddress';
! if($HTTP_POST_VARS["save"]) $bo_action='save';
!
$this->boqmailldap->saveUserData($HTTP_GET_VARS['account_id'], $formData,
$bo_action);
--- 122,148 ----
function saveUserData()
{
! $HTTP_POST_VARS =
get_var('HTTP_POST_VARS',array('POST'));
! $HTTP_GET_VARS = get_var('HTTP_GET_VARS',array('GET'));
! if($HTTP_POST_VARS['accountStatus'] == 'on')
{
! $accountStatus = 'active';
}
$formData = array
(
! 'mailLocalAddress'
=> $HTTP_POST_VARS['mailLocalAddress'],
! 'mailRoutingAddress' =>
$HTTP_POST_VARS['mailRoutingAddress'],
! 'add_mailAlternateAddress' =>
$HTTP_POST_VARS['mailAlternateAddressInput'],
! 'remove_mailAlternateAddress' =>
$HTTP_POST_VARS['mailAlternateAddress'],
! 'qmailDotMode'
=> $HTTP_POST_VARS['qmailDotMode'],
! 'deliveryProgramPath' =>
$HTTP_POST_VARS['deliveryProgramPath'],
! 'accountStatus'
=> $accountStatus
);
! if($HTTP_POST_VARS['add_mailAlternateAddress'])
$bo_action='add_mailAlternateAddress';
! if($HTTP_POST_VARS['remove_mailAlternateAddress'])
$bo_action='remove_mailAlternateAddress';
! if($HTTP_POST_VARS['save']) $bo_action='save';
!
$this->boqmailldap->saveUserData($HTTP_GET_VARS['account_id'], $formData,
$bo_action);
***************
*** 169,184 ****
function translate()
{
! global $phpgw_info;
!
!
$this->t->set_var('th_bg',$phpgw_info['theme']['th_bg']);
!
! $this->t->set_var('lang_add',lang('add'));
! $this->t->set_var('lang_done',lang('Done'));
! $this->t->set_var('lang_remove',lang('remove'));
! $this->t->set_var('lang_remove',lang('remove'));
!
$this->t->set_var('lang_advanced_options',lang('advanced options'));
!
$this->t->set_var('lang_qmaildotmode',lang('qmaildotmode'));
! $this->t->set_var('lang_default',lang('default'));
!
$this->t->set_var('lang_deliveryProgramPath',lang('deliveryProgramPath'));
}
}
--- 161,175 ----
function translate()
{
!
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
!
$GLOBALS['phpgw']->template->set_var('tr_color1',$GLOBALS['phpgw_info']['theme']['row_on']);
!
$GLOBALS['phpgw']->template->set_var('tr_color2',$GLOBALS['phpgw_info']['theme']['row_off']);
!
$GLOBALS['phpgw']->template->set_var('lang_add',lang('add'));
!
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Done'));
!
$GLOBALS['phpgw']->template->set_var('lang_remove',lang('remove'));
!
$GLOBALS['phpgw']->template->set_var('lang_remove',lang('remove'));
!
$GLOBALS['phpgw']->template->set_var('lang_advanced_options',lang('advanced
options'));
!
$GLOBALS['phpgw']->template->set_var('lang_qmaildotmode',lang('qmaildotmode'));
!
$GLOBALS['phpgw']->template->set_var('lang_default',lang('default'));
!
$GLOBALS['phpgw']->template->set_var('lang_deliveryProgramPath',lang('deliveryProgramPath'));
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: qmailldap/inc class.boqmailldap.inc.php,1.13,1.13.4.1 class.soqmailldap.inc.php,1.13.2.2,1.13.2.2.2.1 class.uiqmailldap.inc.php,1.11.2.1,1.11.2.1.2.1 class.uiuserdata.inc.php,1.6,1.6.4.1,
Bettina Gille <address@hidden> <=