PHP
3
Вклад в тег
function GetChildren($m_id){
global $db, $tbl_main;
$SQL="SELECT m_id, m_name, m_parent_id
FROM $tbl_main
WHERE m_parent_id=$m_id
ORDER BY m_sort";
$query=$db->Execute($SQL);
while ($array = $query->FetchRow()) {
$children[] = array('id' => $array['m_id'], 'name' => $array['m_name']);
}
if ($children){
foreach ($children as $value){
$aux[] = GetChildren($value['id']);
}
}
return $aux[];
}
print '<pre>';
// print_r(GetChildren($root_id));
print '</pre>';
require_once('rfc822_addresses.php');
require_once('mime_parser.php');
require_once('simple_html_dom.php');
$mime = new mime_parser_class;
/* get information specific to this email */
$overview = imap_fetch_overview($inbox,$email_number,0);
$message = imap_fetchbody($inbox,$email_number,1);
/* output the email header information */
$output.= '<div class="toggler '.quoted_printable_decode(($overview[0]->seen ? 'read' : 'unread')).'">';
if ($mime->Decode(Array('Data' => 'Subject: '.$overview[0]->subject), $decoded)) {
if ($mime->Analyze($decoded[0], $results)) {
$msg_subject = $results['Subject'];
}
}
$sub = mb_convert_encoding($msg_subject, 'UTF-8', 'KOI8-R');
$from = quoted_printable_decode($overview[0]->from);
$date = quoted_printable_decode($overview[0]->date);
$Sourse_des = $sub;
/* output the email body */
$message = quoted_printable_decode($message);
$html = str_get_html($message);
$token = $Response['response']['token'];