<?php if (empty($_GET['id'])) { die("No data."); } require '../../../../config.php'; $hn = new Hypernote($_GET['id'], $_GET['login'], $_GET['time']); $notes = $hn->getData(); // when login and time are both passed, there's only one hypernote if ($notes) { echo utf8_decode($notes[0]['txt']); // page has no encoding } else { echo "It seems that " . $_GET['login'] . " did not leave a hypernote for this movie at that time."; } ?> <hr/> <a href="#" onclick="history.go(-1);return false">Back</a>
<?php require '../../../../config.php'; // allow only the markup from SimpleTextEditor $allow_tags = '<h1><h2><h3><p><pre><b><i><u><div><ul><ol><a><img>'; $data = strip_tags($_POST['data'], $allow_tags); $hn = new Hypernote($_POST['id'], $_POST['login'], $_POST['time']); if ($_POST['action'] == "reedit") { if ($hn->update($data)) { $msg = '<p>'; $msg .= 'The hypernote was edited successfully.<br/>'; //$msg .= 'You can close this window.'; $msg .= '</p>'; } else { $msg = "Cannot edit hypernote."; } } else { if ($_POST['action'] == "create") { if ($hn->insert($data)) { $msg = '<p>'; //$msg .= $_POST['login'] . ',<br/>'; $msg .= 'The hypernote was created successfully, and it should be attached to the timeline.<br/>'; //$msg .= 'You can close this window.'; $msg .= '</p>'; $msg .= '<hr/>'; $msg .= utf8_decode($data); // page has no encoding } else { $msg = "Cannot create hypernote."; } } else {
$viewportHeight[] = $vph; $cX = array_map('intval', explode(",", $log['coords_x'])); $cY = array_map('intval', explode(",", $log['coords_y'])); $cl = array_map('intval', explode(",", $log['clicks'])); $weights[] = count($cX); $coordsX[] = $cX; // we'll need'em later $coordsY[] = $cY; // $clicks[] = $cl; // $fps[] = (int) $log['fps']; $hovered .= $log['hovered']; $clicked .= $log['clicked']; $timestamp = mask_client($log['client_id']) . '\\n' . date("h:i A", strtotime($log['sess_date'])); $hn = new Hypernote($_GET['pid'], $_SESSION['login']); $hypernotes = $hn->getData(false); // build JavaScript object $JSON[] = '{' . '"id": ' . $log['id'] . ', ' . '"xcoords": [' . $log['coords_x'] . '], ' . '"ycoords": [' . $log['coords_y'] . '], ' . '"clicks": [' . $log['clicks'] . '], ' . '"timestamp": "' . $timestamp . '", ' . '"hypernotes": ' . json_encode($hypernotes) . ', ' . '"wprev": ' . $vpw . ', ' . '"hprev": ' . $vph . ', ' . '"time": ' . $log['sess_time'] . '' . '}'; } // set a common frame rate for all tracks $fps = ceil(array_avg($fps)); $viewportWidth = ceil(array_avg($viewportWidth)); $viewportHeight = ceil(array_avg($viewportHeight)); // compute the average user path, if need be --------------------------------- if (db_option(TBL_PREFIX . TBL_CMS, "displayAvgTrack")) { // preprocess: pad all mouse vectors $maxWeight = max($weights); foreach ($weights as $i => $w) { $items = count($coordsX[$i]); $diff = $maxWeight - $items;
<?php if (empty($_GET['id'])) { die("No data."); } require '../../../../config.php'; $hn = new Hypernote($_GET['id'], $_GET['login'], $_GET['time']); $notes = $hn->getData(); // when login and time are both passed, there's only one hypernote if ($notes && $hn->delete()) { echo "Hypernote deleted successfully."; } else { echo "It seems that " . $_GET['login'] . " did not leave a hypernote for this movie at that time."; } ?> <hr/> <a href="#" onclick="history.go(-1);return false">Back</a>