</h2> <?php if (isset($_SESSION["nextpage"])) { ?> <p><strong>You need to be logged in to view the page you requested</strong></p> <?php } ?> <p>Use the form below to log in. If you don't yet have an account you can <a href="<?php echo SITEROOT_WEB; ?> ?page=register">register</a>.</p> <?php if (!empty($errors)) { showmessages($errors, "Error", "error"); } ?> <form action="<?php echo isset($_SESSION["nextpage"]) ? $_SESSION["nextpage"] : SITEROOT_WEB . "?page=login"; ?> " method="post"> <dl> <dt><label for="username">Username</label></dt> <dd><input type="text" size="32" name="username" id="username"<?php if (isset($_POST["username"])) { ?> value="<?php echo htmlspecialchars($_POST["username"]); ?>
<div class="row"> <div class="col-md-8 col-md-offset-2 aboutus"> <?php echo "<h2><b>Ratings (" . $n_requests . " new)</b></h2>"; ?> <form action="index.php?page=notifications" role="form" method="post"> <?php require_once "utilities/userfunctions.php"; showrateRequests($login); ?> </form> <?php echo "<h2><b>Messages (" . $n_messages . " new)</b></h2>"; showmessages($login); ?> </div> </div><br> <?php //Show comments if admin if (checkadmin($login)) { ?> <div class="row"> <div class="jumbotron"> <div class="container"> <?php $n_comments = countnewcomments(); echo "<h1 style=\"text-align:center\">Comments (" . $n_comments . " new)</h1>";
<?php } ?> </TD> <?php if (agent_ingroup("A")) { ?> <TD VALIGN=TOP BGCOLOR=#906060> <?php mysql_connect('192.168.1.209', $username, $password); @mysql_select_db("system") or die("Unable to select database"); showmessages(); mysql_connect('192.168.1.106', 'liveaccess', 'GreyFlatBox'); @mysql_select_db("system") or die("Unable to select database"); showmessages(); mysql_close(); ?> </TD> <?php } ?> <!--<TD VALIGN=TOP WIDTH=1> <IMG SRC="deadtree.gif"> </TD>--> </TR> </TABLE> <?php
public function showMessages() { foreach (array("error" => $this->errors, "warning" => $this->warnings, "message" => $this->messages) as $type => $messages) { showmessages($messages, ucfirst($type) . plural($messages), $type); } }
private function getLogin() { $GLOBALS["title"] = "Deposit item in Edshare – login details required"; include "htmlheader.php"; ?> <h2>Deposit item "<?php echo htmlspecialchars($this->ai->data("title")); ?> " in Edshare</h2> <?php if (!empty($this->errors)) { showmessages($this->errors, "Error" . plural($this->errors), "error"); } ?> <p>Before the item can be deposited you need to provide your username and password for the repository. This information is stored only for this session.</p> <form action="<?php echo $this->actionURL($this->ai); ?> " method="post"> <dl> <dt><label for="diea_username">Username</label></dt> <dd><input type="text" size="64" name="diea_username" id="diea_username"<?php if (isset($_POST["diea_username"])) { ?> value="<?php echo htmlspecialchars($_POST["diea_username"]); ?> "<?php } ?> ></dd> <dt><label for="diea_password">Password</label></dt> <dd><input type="password" size="64" name="diea_password" id="diea_password"></dd> <dt></dt> <dd><input type="submit" name="edsharelogin" value="Log in"></dd> </dl> </form> <?php echo $this->repoInfo(); include "htmlfooter.php"; }
} print " <img id=\"imageformac\" name=\"imageformac\" src=\"images/blank.gif\" width=10 heith=10 border=\"0\">"; ?> <body bgcolor=<?php echo $color_background; ?> > <DIV ID="UserIsTypingDiv" STYLE="position: absolute; z-index: 20; visibility: hidden; top: 0px; left: 0px;"></DIV> <br> <?php $abort_counter = 1; $abort_counter_end = 2; $abort_counter = 0; $timeof_new = 0; $timeofDHTML = $timeof; if (!empty($see)) { $timeof = showmessages($operator_id, "", $timeof, $see); $timeofDHTML = showmessages($operator_id, "writediv", $timeofDHTML, $see); $timeofDHTML = $timeof = date("YmdHis") - 1; } print showmessages($operator_id, "", $timeof, ""); $timeof = $timeof_new; $offset = ""; ?> <SCRIPT type="text/javascript">up(); setTimeout('up()',9);</SCRIPT> <?php $abort_counter++; if (!$serversession) { $mydatabase->close_connect(); } exit;
function update_typing(){ // do nothing.. } function up(){ scroll(1,10000000); } function openwindow(mypage,myname) { window.open(mypage,myname,'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes'); } </SCRIPT> <?php // check for forced messages.. print "<center><table width=450><tr><td>"; $zero = 0; $textmessages = showmessages($myid, "", $zero, $channel); if (empty($textmessages)) { print $department_a['opening']; } print $textmessages; if (!empty($errors)) { print "<ul><font color=990000>{$errors}</font></ul>"; } // change status to invited.. $sqlquery = "UPDATE livehelp_users SET status='invited' WHERE user_id='{$myid}'"; $mydatabase->query($sqlquery); ?> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $lang['charset']; ?> " >
?> <h2><?php echo $GLOBALS["title"]; ?> </h2> <p>This form allows you to upload an existing assessment item directly to <?php echo htmlspecialchars(SITE_TITLE); ?> . The file uploaded must be either an assessment item in QTI XML format or an IMS content package containing a single assessment item.</p> <?php foreach (array("error" => $errors, "warning" => $warnings, "message" => $messages) as $type => $messages) { showmessages($messages, ucfirst($type), $type); } ?> <form id="uploaditem" action="?page=uploadItem" method="post" enctype="multipart/form-data"> <dl> <dt><label for="file">File</label></dt> <dd><input id="file" type="file" name="file"></dd> </dl> <div> <input type="hidden" name="MAX_FILE_SIZE" value="262144"> <input id="submit" type="submit" name="uploaditem" value="Submit"> </div> </form> <?php
// load the buffer sendbuffer(); } $abort_counter = 0; $timeof_new = 0; $timeofDHTML = $timeof; $timeof = 0; $DHTMLtimeof = 0; if (!empty($see)) { print showmessages($operator_id, "", $timeof, $see); print showmessages($operator_id, "writediv", $timeofDHTML, $see); $timeofDHTML = $timeof = date("YmdHis") - 1; } while ($abort_counter != $abort_counter_end) { $buffer_html = showmessages($operator_id, "", $timeof, ""); $buffer_layer = showmessages($operator_id, "writediv", $timeofDHTML, ""); sleep(1); $offset = ""; // load the buffer if ($buffer_html != "" || $buffer_layer != "") { print $buffer_html; if ($buffer_html != "") { ?> <SCRIPT type="text/javascript"> whatissaid[<?php echo $jsrn; ?> ]='nullstring'; </SCRIPT> <?php
echo $colorscheme; ?> /mid_bk.gif> <?php // delete auto-invited messages: $query = "DELETE FROM livehelp_messages WHERE saidfrom=0 AND saidto=" . intval($myid); $mydatabase->query($query); $abort_counter = 0; sendbuffer(); $timeof = 0; $DHTMLtimeof = 0; while ($abort_counter != $abort_counter_end) { $abort_counter++; $buffer_html = showmessages($myid, "", $timeof, $channel); $buffer_layer = showmessages($myid, "writediv", $timeofDHTML, $channel); sleep(1); $offset = ""; // load the buffer if ($buffer_html != "" || $buffer_layer != "") { print $buffer_html; if ($buffer_html != "") { ?> <SCRIPT type="text/javascript"> whatissaid[<?php echo $jsrn; ?> ]='nullstring'; </SCRIPT> <?php }
</pre> <?php } // delete auto-invited messages: $query = "DELETE FROM livehelp_messages WHERE saidfrom='0' AND saidto='{$myid}'"; $mydatabase->query($query); $abort_counter = 0; $abort_counter_end = 2; $timeofDHTML = $timeof; $timeof_new = $timeof; $abort_counter++; print showmessages($myid, "", $timeof, $channel); ?> <SCRIPT type="text/javascript">up(); setTimeout('up()',9);</SCRIPT><?php $query = "SELECT * FROM livehelp_users WHERE user_id='{$myid}' AND status='chat'"; $alive = $mydatabase->query($query); if ($alive->numrows() == 0) { ?> <b><font color=990000>Session CLOSED!!</font></b><SCRIPT type="text/javascript">up()</SCRIPT><?php $abort_counter = 99999; ?> <SCRIPT type="text/javascript"> function redirectme(){ window.parent.location.replace("wentaway.php?department=<?php echo $UNTRUSTED['department']; ?> ");
print "CONNECTED"; } else { print "LIGHTS-ARE-ON-BUT-NOBODY-IS-HOME"; } exit; } if ($UNTRUSTED['whattodo'] == "messages") { // if noone is talking to this user then send exit layer: if (empty($UNTRUSTED['op'])) { $sqlquery = "SELECT user_id FROM livehelp_users WHERE user_id=" . intval($myid) . " AND status='chat'"; $alive = $mydatabase->query($sqlquery); if ($alive->numrows() == 0) { $aftertime = date("YmdHis"); $string = "messages[0] = new Array(); messages[0][0]={$aftertime}; messages[0][1]={$jsrn}; messages[0][2]=\"EXIT\"; messages[0][3]=\"\"; messages[0][4]=\"\";"; print $string; exit; } } // for Google Chrome $nowtime = date("YmdHis"); $sqlquery = "UPDATE livehelp_users SET chataction='{$nowtime}' WHERE user_id=" . intval($myid) . " AND status='chat'"; $mydatabase->query($sqlquery); $omitself = true; if (!empty($UNTRUSTED['includeself'])) { $omitself = false; } print showmessages($myid, "", $UNTRUSTED['HTML'], $see, $hide, true, $omitself); print showmessages($myid, "writediv", $UNTRUSTED['LAYER'], $see, $hide, true, $omitself); } ?>
</td></tr></table> <table width=100% bgcolor=#FFFFFF><tr><td> 10 this is a testthis is a testthis is a testthis is a testthis is a testthis is a test </td></tr></table> <table width=100% bgcolor=#FFFF99><tr><td> 11 this is a testthis is a testthis is a testthis is a testthis is a testthis is a test </td></tr></table> <table width=100% bgcolor=#FFFFFF><tr><td> 12 this is a testthis is a testthis is a testthis is a testthis is a testthis is a test </td></tr></table> <table width=100% bgcolor=#000000><tr><td> 13 this is a testthis is a testthis is a testthis is a testthis is a testthis is a test </td></tr></table> <?php print "sho messages for {$operator_id} {$timeof} {$see} "; print str_replace("width=100%", "width=200", showmessages($operator_id, "", $timeof, $see)); } ?> </div> </div> <?php if (count($chatarray) != 0) { ?> <script type="text/javascript"> selectedid = <?php echo $chatarray[0][2]; ?> ; // onmouseovers