當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DbManager::GetChatroom方法代碼示例

本文整理匯總了PHP中DbManager::GetChatroom方法的典型用法代碼示例。如果您正苦於以下問題:PHP DbManager::GetChatroom方法的具體用法?PHP DbManager::GetChatroom怎麽用?PHP DbManager::GetChatroom使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DbManager的用法示例。


在下文中一共展示了DbManager::GetChatroom方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: DbManager

<?php

require 'inc/conf.php';
require 'inc/constants.php';
require 'inc/init.php';
require 'inc/functions.php';
require 'inc/classes.php';
require 'inc/dbmanager.php';
$dbManager = new DbManager();
$chatRoom = $dbManager->GetChatroom($_POST['roomId']);
if (!$chatRoom->isRemovable) {
    echo 'error';
    exit;
} else {
    if ($chatRoom->removePassword != $_POST['removePassword']) {
        echo 'wrongPassword';
        exit;
    } else {
        $dbManager->DeleteChatroom($_POST['roomId']);
        echo 'removed';
        exit;
    }
}
開發者ID:kidburglar,項目名稱:mycryptochat,代碼行數:23,代碼來源:removeChatroom.php

示例2: DbManager

<?php

require 'inc/constants.php';
require 'inc/conf.php';
require 'inc/init.php';
require 'inc/functions.php';
require 'inc/classes.php';
require 'inc/dbmanager.php';
$dbManager = new DbManager();
$chatRoom = $dbManager->GetChatroom($_GET['id']);
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Private chat room - MyCryptoChat by HowTommy.net</title>
    <link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />
    <link href="styles/myCryptoChat.css" rel="stylesheet" />
    <script src="scripts/modernizr.js"></script>
</head>
<body>
    <header>
        <div class="content-wrapper">
            <div class="float-left">
                <p class="site-title"><a href="index.php">MyCryptoChat</a></p>
            </div>
            <div class="float-right">
                <section id="login">
                </section>
                <nav>
開發者ID:kidburglar,項目名稱:mycryptochat,代碼行數:31,代碼來源:chatroom.php


注:本文中的DbManager::GetChatroom方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。