echo $aUser->output->full_name; ?> "><img src="<?php echo $aUser->output->photo_50px_square; ?> " width="50" height="50" /></a> </div> <div id="guestbook_content"> <form method="post" action="./index.php" id="guestbook_form"> <textarea cols="60" rows="4" name="comment" id="guestbook_textarea"></textarea> <div id="guestbook_submit"> <div id="guestbook_user"> Logged in as <?php echo $aUser->output->full_name; ?> </div> <input type="submit" value="Submit" class="button" /> </div> </form> </div> <div id="guestbook_comments"> <?php echo getLatestMessages(); ?> </div> </div> </body> </html>
case '/chat': echo "\nEnter the name of the contact > "; $nickname = trim(fgets(STDIN)); do { echo "\nIs it right yes/no > "; $check = trim(fgets(STDIN)); if ($check != 'yes') { echo "\nEnter the number you want to add > "; $nickname = trim(fgets(STDIN)); } } while ($check != 'yes'); echo "\n\n"; echo "You are chatting with {$nickname}\n"; echo "=================================\n\n"; $contact = findPhoneByNickname($nickname); $latestMsgs = getLatestMessages($contact); $GLOBALS['current_contact'] = $contact; foreach ($latestMsgs as $msg) { echo "\n- " . $nickname . ': ' . $msg['message'] . ' ' . date('t/m/Y h:i:s A', $msg['t']) . "\n"; } $pn = new ProcessNode($w, $contact); $w->setNewMessageBind($pn); $chatting = true; $compose = true; $lastSeen = true; while ($chatting) { $w->pollMessage(); $msgs = $w->getMessages(); foreach ($msgs as $m) { // process inbound messages //print($m->NodeString("") . "\n");
}); </script> </head> <body> <h1>Sign our Guestbook</h1> <div class="message"> Please note this is a test application for developers and not a feature that will be part of our product. </div> <div id="guestbook_holder"> <div id="guesbook_user_image"> <a href="<?php echo $aUser->output->profile_url; ?>" title="<?php echo $aUser->output->full_name; ?>"><img src="<?php echo $aUser->output->photo_50px_square; ?>" width="50" height="50" /></a> </div> <div id="guestbook_content"> <form method="post" action="./index.php" id="guestbook_form"> <textarea cols="60" rows="4" name="comment" id="guestbook_textarea"></textarea> <div id="guestbook_submit"> <div id="guestbook_user"> Logged in as <?php echo $aUser->output->full_name; ?> </div> <input type="submit" value="Submit" class="button" /> </div> </form> </div> <div id="guestbook_comments"> <?php echo getLatestMessages(); ?> </div> </div> </body> </html>