| | |
| | | } |
| | | |
| | | function iil_ExplodeQuotedString($delimiter, $string) { |
| | | $quotes=explode('"', $string); |
| | | $quotes = explode('"', $string); |
| | | while ( list($key, $val) = each($quotes)) { |
| | | if (($key % 2) == 1) { |
| | | $quotes[$key] = str_replace($delimiter, "_!@!_", $quotes[$key]); |
| | | } |
| | | } |
| | | $string=implode('"', $quotes); |
| | | $string = implode('"', $quotes); |
| | | |
| | | $result=explode($delimiter, $string); |
| | | $result = explode($delimiter, $string); |
| | | while ( list($key, $val) = each($result) ) { |
| | | $result[$key] = str_replace('_!@!_', $delimiter, $result[$key]); |
| | | } |
| | |
| | | function iil_C_CountUnseen(&$conn, $folder) { |
| | | $index = iil_C_Search($conn, $folder, 'ALL UNSEEN'); |
| | | if (is_array($index)) { |
| | | $str = implode(',', $index); |
| | | if (empty($str)) { |
| | | return false; |
| | | } |
| | | return count($index); |
| | | if (($cnt = count($index)) && $index[0] != '') { |
| | | return $cnt; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | |
| | | function iil_C_UID2ID(&$conn, $folder, $uid) { |
| | | if ($uid > 0) { |
| | | $id_a = iil_C_Search($conn, $folder, "UID $uid"); |
| | | if (is_array($id_a)) { |
| | | $count = count($id_a); |
| | | if ($count > 1) { |
| | | return false; |
| | | } |
| | | if (is_array($id_a) && count($id_a) == 1) { |
| | | return $id_a[0]; |
| | | } |
| | | } |