function sqimap_msgs_list_copy ($imap_stream, $id, $mailbox) {
global $uid_support;
$msgs_id = sqimap_message_list_squisher($id);
- echo $msgs_id;
$read = sqimap_run_command ($imap_stream, "COPY $msgs_id \"$mailbox\"", true, $response, $message, $uid_support);
$read = sqimap_run_command ($imap_stream, "STORE $msgs_id +FLAGS (\\Deleted)", true, $response, $message, $uid_support);
}
if (isset($thread_list)) {
$thread_temp = preg_split("//", $thread_list, -1, PREG_SPLIT_NO_EMPTY);
}
- $t = new thread();
- $t->parseThread($thread_list);
- print_r($t);
- echo $thread_list;
$char_count = count($thread_temp);
$counter = 0;
$thread_new = array();
return $thread_list;
}
-class thread {
- var $thread_cnt=0,
- $id='',
- $childs = array();
-
- function addChild($id) {
- $this->childs[] = new thread();
- }
-
- function parseThread($thread_list, $i=0, $thread_cnt=0) {
- $par = false;
- $thread_id = '';
- for ($cnt = strlen($thread_list);$i<$cnt;++$i) {
- $char = $thread_list{$i};
- switch ($char) {
- case '(':
- $par = new thread();
- ++$thread_cnt;
- $thread_id = '';
- break;
- case ' ':
- $par->id = $thread_id;
- ++$thread_cnt;
- $res_a = $this->parseThread($thread,$i, $thread_cnt);
- $par->childs[] = $res_a[0];
- $i = $res_a[1];
- $thread_id = '';
- break;
- case ')':
- if ($thread_id) {
- $par->id = $thread_id;
- $thread_id='';
- }
- $par->thread_cnt=$thread_cnt;
- if (count($this->childs)) {
- return array($par, $i);
- } else {
- $this->childs[] = $par;
- }
- default:
- $thread_id .= $char;
- break;
- }
- }
- print_r($this);
- }
-}
function elapsedTime($start) {
$stop = gettimeofday();