"; $textTpl .= ""; $textTpl .= ""; $textTpl .= "" . time() . ""; $textTpl .= ""; switch ($data['MsgType']) { case "text": $textTpl .= ""; break; case "image": $textTpl .= ""; break; case "voice": $textTpl .= ""; break; case "video": $textTpl .= ""; break; case "music": $textTpl .= ""; if (!empty($data['Title'])) $textTpl .= "<![CDATA[" . $data['Title'] . "]]>"; if (!empty($data['Description'])) $textTpl .= ""; if (!empty($data['MusicURL'])) $textTpl .= ""; if (!empty($data['HQMusicUrl'])) $textTpl .= ""; $textTpl .= ""; $textTpl .= ""; break; case "news": $textTpl .= ""; $textTpl .= ""; for ($i = 0; $i < $data['ArticleCount']; $i++) { $textTpl .= ""; $textTpl .= "<![CDATA[" . $data['item'][$i]['Title'] . "]]>"; $textTpl .= ""; $textTpl .= ""; $textTpl .= ""; $textTpl .= ""; } $textTpl .= ""; break; default: break; } $textTpl .= ""; return $textTpl; } }