1 | <?php |
---|
2 | class adapter |
---|
3 | { |
---|
4 | function import_new_calendar($params) |
---|
5 | { |
---|
6 | include_once( $_SESSION['rootPath'].'/expressoMail1_2/inc/class.imap_functions.inc.php'); |
---|
7 | $objImap = new imap_functions(); |
---|
8 | $msg_number = $params['msg_number']; |
---|
9 | $idx_file = $params['idx_file']; |
---|
10 | $msg_part = $params['msg_part']; |
---|
11 | $msg_folder = $params['msg_folder']; |
---|
12 | $from_ajax = $params['from_ajax']; |
---|
13 | $encoding = strtolower($params['encoding']); |
---|
14 | $fileContent = ""; |
---|
15 | $cirus_delimiter = $params['cirus_delimiter']; |
---|
16 | $expFolder = explode($cirus_delimiter, $msg_folder); |
---|
17 | |
---|
18 | |
---|
19 | require_once $_SESSION['rootPath'].'/expressoMail1_2/inc/class.attachment.inc.php'; |
---|
20 | $attachmentObj = new attachment(); |
---|
21 | $attachmentObj->setStructureFromMail($msg_folder,$msg_number); |
---|
22 | $fileContent = $attachmentObj->getAttachment($msg_part); |
---|
23 | $info = $attachmentObj->getAttachmentInfo($msg_part); |
---|
24 | |
---|
25 | } |
---|
26 | |
---|
27 | function get_signatures($params) |
---|
28 | { |
---|
29 | require_once $_SESSION['rootPath'].'/prototype/app/controller.php'; |
---|
30 | |
---|
31 | //$sig = Controller::find(array('concept' => 'calendarSignature'), array('user','calendar'), array('filter' => array( '=' , 'user' , $_SESSION['phpgw_session']['account_id']))); |
---|
32 | |
---|
33 | $sig = Controller::find(array('concept' => 'calendarSignature'), array('user','calendar'), array('filter' => array( '=' , 'user' , '1005'))); |
---|
34 | |
---|
35 | ob_start(); |
---|
36 | print "\n"; |
---|
37 | print $name . ": "; |
---|
38 | var_dump( $sig ); |
---|
39 | $output = ob_get_clean(); |
---|
40 | file_put_contents( "/tmp/prototype.log", $output , FILE_APPEND ); |
---|
41 | |
---|
42 | foreach ($sig as $i => $v) |
---|
43 | { |
---|
44 | $cal = Controller::read(array('concept' => 'calendar' , 'id' => $v['calendar'] ), array('name')); |
---|
45 | $sig[$i]['cal_name'] = $cal['name']; |
---|
46 | } |
---|
47 | |
---|
48 | return $sig; |
---|
49 | } |
---|
50 | |
---|
51 | } |
---|
52 | ?> |
---|