home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 April
/
CMCD0404.ISO
/
Software
/
Freeware
/
Programare
/
groupoffice-com-2.01
/
modules
/
addressbook
/
add_employees.php
next >
Wrap
PHP Script
|
2004-03-08
|
1KB
|
48 lines
<?php
/*
Copyright Intermesh 2003
Author: Merijn Schering <mschering@intermesh.nl>
Version: 1.0 Release date: 08 July 2003
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.
*/
require("../../Group-Office.php");
$GO_SECURITY->authenticate();
$GO_MODULES->authenticate('addressbook');
require($GO_CONFIG->class_path."addressbook.class.inc");
$ab = new addressbook();
if (isset($_REQUEST['company_id']) && $_REQUEST['company_id'] > 0)
{
if (isset($_REQUEST['clicked_contact']) && $_REQUEST['clicked_contact'] != '')
{
$contacts[] = $_REQUEST['clicked_contact'];
}else
{
$contacts = isset($_REQUEST['contacts']) ? $_REQUEST['contacts'] : array();
}
if (isset($contacts))
{
for($i=0;$i<sizeof($contacts);$i++)
{
$ab->add_contact_to_company($contacts[$i], $_REQUEST['company_id']);
}
}
}
?>
<html>
<body>
<script language="javascript" type="text/javascript">
opener.document.company_form.submit();
window.close();
</script>
</body>
</html>