Add class attribute to template
[squirrelmail.git] / plugins / abook_take / take.php
CommitLineData
e8b140ab 1<?php
4b4abf93 2
b755a6b1 3/**
4 * take.php
5 *
b755a6b1 6 * Address Take -- steals addresses from incoming email messages. Searches
7 * the To, Cc, From and Reply-To headers.
8 *
47ccfad4 9 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
4b4abf93 10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
4f51df66 11 * @version $Id$
ea5f4b8e 12 * @package plugins
13 * @subpackage abook_take
b755a6b1 14 */
1bf86d6f 15
ea5f4b8e 16/**
202bcbcc 17 * Include the SquirrelMail initialization file.
18 */
19require('../../include/init.php');
e8b140ab 20
08185f2a 21/* SquirrelMail required files. */
202bcbcc 22require(SM_PATH . 'functions/forms.php');
23require(SM_PATH . 'functions/addressbook.php');
1bf86d6f 24
08185f2a 25displayPageHeader($color, 'None');
b755a6b1 26
27/* input form data */
28sqgetGlobalVar('email', $email, SQ_POST);
29
08185f2a 30$abook_take_verify = getPref($data_dir, $username, 'abook_take_verify');
4cf43843 31
32$abook = addressbook_init(false, true);
b755a6b1 33
1bf86d6f 34$addrs = array();
35foreach ($email as $Val) {
36 if (valid_email($Val, $abook_take_verify)) {
37 $addrs[$Val] = $Val;
38 } else {
39 $addrs[$Val] = 'FAIL - ' . $Val;
40 }
41}
42
831c3204 43$formdata=array('email'=>$addrs);
b755a6b1 44
831c3204 45abook_create_form(SM_PATH . 'src/addressbook.php','addaddr',_("Add to address book"),_("Add address"),$formdata);
46echo '</form>';
e8b140ab 47?>
91e0dccc 48</body></html>