本文整理匯總了PHP中Conversation::ConversationToHTML方法的典型用法代碼示例。如果您正苦於以下問題:PHP Conversation::ConversationToHTML方法的具體用法?PHP Conversation::ConversationToHTML怎麽用?PHP Conversation::ConversationToHTML使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Conversation
的用法示例。
在下文中一共展示了Conversation::ConversationToHTML方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ConversationsToHTML
public function ConversationsToHTML()
{
global $conversationsInfos;
$myDBConnector = new DBConnector();
$dbARY = $myDBConnector->infos();
$connection = new mysqli($dbARY[0], $dbARY[1], $dbARY[2], $dbARY[3]);
if ($connection->connect_error) {
echo "Database bağlantı hatası";
} else {
$query = "SELECT * FROM conversations WHERE (user1=\"" . $conversationsInfos["Pour Qui"] . "\" OR user2=\"" . $conversationsInfos["Pour Qui"] . "\") ORDER BY lastDate DESC ";
$results = $connection->query($query);
if ($results->num_rows == 0) {
echo "<div style=\"margin:2%;background-color:#e6e6e6;color:#6e6e6e;font-size:18px;font-family: Verdana,Geneva,sans-serif;\">";
echo "Henüz mesajlaşmamışsınz.";
echo "</div>";
} else {
while ($curResult = $results->fetch_assoc()) {
if ($curResult["user1"] == $conversationsInfos["Pour Qui"]) {
$other = $curResult["user2"];
} else {
$other = $curResult["user1"];
}
$ary = array($other, $conversationsInfos["Pour Qui"], $conversationsInfos["Pour Qui"]);
$myConversation = new Conversation($ary);
$myConversation->ConversationToHTML();
}
}
$connection->close();
}
}