@file: @license: BSD @description: This file is great. */ require "./login_is.php"; require "../includes/db.inc.php"; $db_dir = DB_DIR; if (!preg_match("/[0-9]{6}-site-freetale.sqlite/", $_GET['db'])) { echo "BAD DATABSE"; exit; } $db = new DBx(DB_DIR . $_GET['db']); $sql = "\nSELECT * FROM tics \n WHERE\n id=:id and url=:url \n LIMIT 1\n"; $db->p($sql); $db->exec(array(":id" => $_GET['id'], ":url" => $_GET['url'])); $init = $db->f(); $_SESSION['id'] = $_GET['id']; $_SESSION['url'] = $_GET['url']; $_SESSION['db'] = $_GET['db']; $_SESSION['replay_motion'] = 1; $_SESSION['replay_summary'] = 0; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>FreeTale Replay</title> <meta http-equiv="content-type" content="text/html; charset=utf-8">
return "none"; } $url = filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED); $url_string = htmlentities($url); $url_link = "\n<a href=\"{$url}\" target=\"_blank\">{$url_string}</a>\n"; return $url_link; } if (!preg_match("/freetaleform.sqlite/", $_GET['db'])) { echo "BAD DATABSE"; exit; } $db = new DBx(DB_DIR . $_GET['db']); $prepare_vars = array(':url' => $_GET['url']); $sql = "\nSELECT \n *\nFROM \n actions\nWHERE\n url = :url \n AND\n input_type != 'landing'\nGROUP BY\n input_name\nORDER BY\n unixtime\n"; $db->p($sql . " LIMIT 1"); $db->exec($prepare_vars); $meta_row = $db->f(); $url_link = anchor_link($meta_row['url']); $referer_link = anchor_link($meta_row['referer']); $db->p($sql); $db->exec($prepare_vars); $input_names = array(); while ($row = $db->f()) { $input_names[] = $row['input_name']; } $sql = "\nSELECT\n input_type,\n input_name,\n key_ups,\n form_id,\n COUNT(*) AS count,\n SUM(time_elapsed) AS total_time\nFROM \n actions\nWHERE\n input_name = :input_name\n"; $db->p($sql); $form_time = 0; $time_stats = array(); foreach ($input_names as $input_name) { $db->exec(array(":input_name" => $input_name));
return "none"; } $url = filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED); $url_string = htmlentities($url); $url_link = "\n<a href=\"{$url}\" target=\"_blank\">{$url_string}</a>\n"; return $url_link; } if (!preg_match("/freetaleform.sqlite/", $_GET['db'])) { echo "BAD DATABSE"; exit; } $db = new DBx(DB_DIR . $_GET['db']); $prepare_vars = array(':id' => $_GET['id'], ':url' => $_GET['url']); $sql = "\nSELECT * FROM \n actions \nWHERE\n id = :id\n AND\n url = :url\nORDER BY\n unixtime\n"; $db->p($sql . " LIMIT 1"); $db->exec($prepare_vars); $meta_row = $db->f(); $url_link = anchor_link($meta_row['url']); $referer_link = anchor_link($meta_row['referer']); $db->p($sql); $db->exec($prepare_vars); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Form Analytics</title> <link rel="stylesheet" href="style.css" > <meta http-equiv="content-type" content="text/html; charset=utf-8">
<?php echo ' var freeTale_replay=0; '; require './includes/db.inc.php'; if (!isset($_SESSION['db']) or !file_exists("./db/{$_SESSION['db']}")) { exit; } $db = new DBx("./db/{$_SESSION['db']}", 'sqlite'); $sql = "\nSELECT * FROM tics \n WHERE\n id=:id and url=:url \n"; $db->p($sql); $db->exec(array(":id" => $_SESSION['id'], ":url" => $_SESSION['url'])); function quote_extend(&$vals, $extend) { foreach ($extend as $e) { $vals[] = "'{$e}'"; } } function quote_dimensions($dim) { $bits = explode("x", $dim); return "Array('{$bits[0]}','{$bits[1]}')"; } function quote_dim($dim) { return "'{$dim}'"; } function print_js_array($array_name, $vals) { echo " var {$array_name} = Array(";