Esempio n. 1
0
function chat($name)
{
    global $data, $nicks, $timelimit, $maxinput, $install, $update, $_SESSION, $genurl;
    $name = strtolower($name);
    $chat = file($data . $name);
    $nick = $nicks[mt_rand(0, count($nicks) - 1)];
    while (in_array($nick, getpeople($chat))) {
        $nick = $nicks[mt_rand(0, count($nicks) - 1)];
    }
    print '<div id="main">
			<div id="front">
				<div id="changenick">
					<div id="keygen">
						<img src="img/keygen.gif" alt="" /><br />
						<span id="keytext">Gathering entropy</span>
					</div>
					<div id="nickentry">
						<p>Enter nickname</p>
						<form name="nickform" id="nickform" method="post" action="' . $install . '">
							<div>
								<input type="text" name="nickinput" id="nickinput" value="' . $nick . '" maxlength="12" autocomplete="off" />
								<input type="submit" class="nicksubmit" value="chat" />
							</div>
						</form>
					</div>
				</div>
				<div id="fingerprints"></div>
			</div>
			<a href="' . $install . '" onclick="logout();"><img src="img/cryptocat.png" class="chat" alt="cryptocat" /></a>
			<img src="img/maximize.png" alt="maximize" id="maximize" title="expand" />
			<img src="img/nosound.png" alt="sound" id="sound" title="message sounds off" />
			<div id="inchat"><div id="chat"></div></div>
			<div id="info">chatting as <span id="nick">' . $nick . '</span> on 
			<strong class="blue">' . $install . '?c=</strong><strong id="name">' . $name . '</strong> - <span id="fingerlink">fingerprints</span>
			<strong id="flood">wait</strong>
			</div>
			<form name="chatform" id="chatform" method="post" action="' . $install . '">
				<div>
					<div id="chatters"></div>
					<input type="text" name="input" id="input" maxlength="' . $maxinput . '" autocomplete="off" />
					<input type="submit" name="talk" id="talk" value="' . $maxinput . '" />
				</div>
			</form>
			</div>
			<script type="text/javascript">var install="' . $install . '";var update="' . $update . '";var maxinput="' . $maxinput . '";var genurl=' . $genurl . ';</script>
			<script type="text/javascript" src="js/cat.js"></script>';
}
Esempio n. 2
0
function chat($name)
{
    global $data, $nicks, $timelimit, $maxinput, $install, $_SESSION, $genurl, $filesize;
    $name = strtolower($name);
    $chat = file($data . $name);
    $nick = $nicks[mt_rand(0, count($nicks) - 1)];
    while (in_array($nick, getpeople($chat))) {
        $nick = $nicks[mt_rand(0, count($nicks) - 1)];
    }
    print '<div id="main">
			<div id="front">
				<div id="changenick">
					<div id="keygen" class="invisible">
						<img src="img/keygen.gif" alt="" /><br />
						<span id="keytext"></span>
					</div>
					<div id="nickentry" class="invisible">
						<p>Enter nickname</p>
						<form name="nickform" id="nickform" method="post" action="' . $install . '">
							<div>
								<input type="text" name="nickinput" id="nickinput" value="' . $nick . '" maxlength="12" autocomplete="off" />
								<input type="submit" class="nicksubmit" value="chat" />
							</div>
						</form>
					</div>
				</div>
				<div id="fadebox" class="invisible"></div>
			</div>
			<a href="' . $install . '"><img src="img/cryptocat.png" class="chat" alt="cryptocat" /></a>
			<img src="img/maximize.png" alt="maximize" id="maximize" title="Expand" />
			<img src="img/invite.png" alt="invite" id="invite" title="Invite friend" />
			<img src="img/nonotifications.png" alt="notifications" id="notifications" title="Desktop notifications off" />
			<img src="img/nosound.png" alt="sound" id="sound" title="Message sounds off" />
			<img src="img/filer.png" alt="file" id="file" title="Send encrypted file" />
			<div id="inchat"><div id="chat"></div></div>
			<div id="info">chatting as <span id="nick">' . $nick . '</span> on 
			<strong class="blue">' . $install . '?c=</strong><strong id="name">' . $name . '</strong>
			</div>
			<form name="chatform" id="chatform" method="post" action="' . $install . '">
				<div>
					<div id="users"></div>
					<input type="text" name="input" id="input" maxlength="' . $maxinput . '" autocomplete="off" />
					<input type="submit" name="talk" id="talk" value="' . $maxinput . '" />
				</div>
			</form>
			</div>
			<script type="text/javascript" src="js/cat.js"></script>';
}