Server side support for screenshots, utf-8 support. Some minor code cleanup also rolled in.

This commit is contained in:
robert%accettura.com 2006-01-26 03:14:01 +00:00
Родитель f35c6c1ef2
Коммит 7e768b2726
11 изменённых файлов: 462 добавлений и 210 удалений

Просмотреть файл

@ -47,6 +47,13 @@ $config['debug'] = false;
// Service Active
$config['service_active'] = true; // true=on | false=off
// Screenshot Formats
$config['screenshot_imageTypes'] = array('png' => 'image/png',
'jpg' => 'image/jpeg');
// Turn on WSDL??
$config['use_wsdl'] = false;
// Paths
$config['base_url'] = 'http://reporter.server.tld'; // no trailing slash
$config['base_path'] = '/path/to/reporter'; // no trailing slash

Просмотреть файл

@ -2,6 +2,7 @@
RewriteEngine On
RewriteRule ^app/query(/)?(.*)$ query.php$1 [QSA,L]
RewriteRule ^app/report/screenshot(/)?(.*)$ screenshot.php$1 [QSA,L]
RewriteRule ^app/report(/)?(.*)$ report.php$1 [QSA,L]
RewriteRule ^app/stats(/)?(.*)$ stats.php$1 [QSA,L]
RewriteRule ^app/login(/)?(.*)$ login.php$1 [QSA,L]

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 5.0 KiB

После

Ширина:  |  Высота:  |  Размер: 3.5 KiB

Просмотреть файл

@ -54,40 +54,64 @@ printheaders();
$db = NewDBConnection($config['db_dsn']);
$db->SetFetchMode(ADODB_FETCH_ASSOC);
$query =& $db->Execute("SELECT *
FROM report, host
WHERE report.report_id = ".$db->quote($_GET['report_id'])."
AND host.host_id = report_host_id");
$reportQuery =& $db->Execute("SELECT *
FROM report, host
WHERE report.report_id = ".$db->quote($_GET['report_id'])."
AND host.host_id = report_host_id");
if(!$reportQuery){
die("DB Error");
}
// Init to false
$screenshot = false;
// Only check for a screenshot if the user is an admin, and if we have a valid report
if($reportQuery->RecordCount() == 1 && $securitylib->isLoggedIn()){
$screenshotQuery =& $db->Execute("SELECT screenshot.screenshot_report_id
FROM screenshot
WHERE screenshot.screenshot_report_id = ".$db->quote($_GET['report_id'])
);
if(!$screenshotQuery){
die("DB Error");
}
if($screenshotQuery->RecordCount() == 1){
$screenshot = true;
}
}
// disconnect database
$db->Close();
$content = initializeTemplate();
if (!$query->fields){
if (!$reportQuery->fields){
$content->assign('error', 'No Report Found');
displayPage($content, 'report', 'report.tpl', 'Mozilla Reporter - Error');
exit;
}
$title = "Report for ".$query->fields['host_hostname']." - ".$query->fields['report_id'];
$content->assign('report_id', $query->fields['report_id']);
$content->assign('report_url', $query->fields['report_url']);
$content->assign('host_url', $config['base_url'].'/app/query/?host_hostname='.$query->fields['host_hostname'].'&submit_query=Query');
$content->assign('host_hostname', $query->fields['host_hostname']);
$content->assign('report_problem_type', resolveProblemTypes($query->fields['report_problem_type']));
$content->assign('report_behind_login', resolveBehindLogin($query->fields['report_behind_login']));
$content->assign('report_product', $query->fields['report_product']);
$content->assign('report_gecko', $query->fields['report_gecko']);
$content->assign('report_useragent', $query->fields['report_useragent']);
$content->assign('report_buildconfig', $query->fields['report_buildconfig']);
$content->assign('report_platform', $query->fields['report_platform']);
$content->assign('report_oscpu', $query->fields['report_oscpu']);
$content->assign('report_language', $query->fields['report_language']);
$content->assign('report_file_date', $query->fields['report_file_date']);
$content->assign('report_email', $query->fields['report_email']);
$content->assign('report_ip', $query->fields['report_ip']);
$content->assign('report_description', $query->fields['report_description']);
$title = "Report for ".$reportQuery->fields['host_hostname']." - ".$reportQuery->fields['report_id'];
$content->assign('report_id', $reportQuery->fields['report_id']);
$content->assign('report_url', $reportQuery->fields['report_url']);
$content->assign('host_url', $config['base_url'].'/app/query/?host_hostname='.$reportQuery->fields['host_hostname'].'&submit_query=Query');
$content->assign('host_hostname', $reportQuery->fields['host_hostname']);
$content->assign('report_problem_type', resolveProblemTypes($reportQuery->fields['report_problem_type']));
$content->assign('report_behind_login', resolveBehindLogin($reportQuery->fields['report_behind_login']));
$content->assign('report_product', $reportQuery->fields['report_product']);
$content->assign('report_gecko', $reportQuery->fields['report_gecko']);
$content->assign('report_useragent', $reportQuery->fields['report_useragent']);
$content->assign('report_buildconfig', $reportQuery->fields['report_buildconfig']);
$content->assign('report_platform', $reportQuery->fields['report_platform']);
$content->assign('report_oscpu', $reportQuery->fields['report_oscpu']);
$content->assign('report_language', $reportQuery->fields['report_language']);
$content->assign('report_file_date', $reportQuery->fields['report_file_date']);
$content->assign('report_email', $reportQuery->fields['report_email']);
$content->assign('report_ip', $reportQuery->fields['report_ip']);
$content->assign('report_description', $reportQuery->fields['report_description']);
if($screenshot){
$content->assign('screenshot', $screenshot);
}
// Last/Next Functionality
if(isset($_SESSION['reportList'])){

Просмотреть файл

@ -0,0 +1,49 @@
<?php
require_once('../config.inc.php');
require_once($config['base_path'].'/includes/iolib.inc.php');
require_once($config['base_path'].'/includes/db.inc.php');
require_once($config['base_path'].'/includes/security.inc.php');
// Turn off Error Reporting
error_reporting(0);
// Headers
// Start Session
session_name('reportSessID');
session_start();
header("Cache-control: private"); //IE 6 Fix
printheaders();
if($securitylib->isLoggedIn() === true){
$db = NewDBConnection($config['db_dsn']);
$db->SetFetchMode(ADODB_FETCH_ASSOC);
$query = $db->Execute("SELECT screenshot_data, screenshot.screenshot_format
FROM screenshot
WHERE screenshot_report_id = ".$db->quote($_GET['report_id']));
if(!$query){
exit;
}
// Output the MIME header
$imageExtension = array_search($query->fields['screenshot_format'], $config['screenshot_imageTypes']);
// This should never happen, but we test for it regardless
if($imageExtension === false){
// XXX -> we should redirect to an error image or someting to that effect as
// in most cases, nobody would even see this error.
print "Invalid Image";
}
// Headers
header("Content-Type: ".$query->fields['screenshot_format']);
header("Content-disposition: inline; filename=".$_GET['report_id'].".".$imageExtension);
// Output the image
echo $query->fields['screenshot_data'];
} else {
// XXX -> we should redirect to an error image or someting to that effect as
// in most cases, nobody would even see this error.
print "You are not authorized to view this";
}
?>

Просмотреть файл

@ -38,15 +38,28 @@
require_once('../config.inc.php');
require_once($config['base_path'].'/includes/iolib.inc.php');
require_once($config['base_path'].'/includes/contrib/adodb/adodb.inc.php');
require_once($config['base_path'].'/includes/db.inc.php');
require_once($config['base_path'].'/includes/contrib/nusoap/lib/nusoap.php');
// Turn off Error Reporting because it breaks xml formatting and causes errors
error_reporting(0);
if($config['debug']){
$debug = 1;
}
// Create the server instance
$server = new soap_server;
// UTF-8 support is good
$server->soap_defencoding = "UTF-8";
$server->decode_utf8 = false;
// WSDL Support
if($config['use_wsdl']){
$server->configureWSDL('reporterwsdl', 'urn:reporterwsdl');
}
// Register the method to expose
// Note: with NuSOAP 0.6.3, only method name is used w/o WSDL
$server->register(
@ -74,20 +87,28 @@ $server->register(
'buildconfig' => 'xsd:string',
'language' => 'xsd:string',
'email' => 'xsd:string',
'sysid' => 'xsd:string'), // input parameters
array('return' => 'xsd:string'), // output parameters
'uri:MozillaReporter', // namespace
'uri:MozillaReporter/submitReport', // SOAPAction
'rpc', // style
'encoded' // use
'sysid' => 'xsd:string',
'screenshot' => 'xsd:base64Binary',
'screenshot_format' => 'xsd:string'), // input parameters
array('return' => 'xsd:string'), // output parameters
'uri:MozillaReporter', // namespace
'uri:MozillaReporter/submitReport', // SOAPAction
'rpc', // style
'encoded' // use
);
function submitReport($rmoVers, $url, $problem_type, $description, $behind_login, $platform, $oscpu, $gecko, $product, $useragent, $buildconfig, $language, $email, $sysid) {
global $config;
function submitReport($rmoVers, $url, $problem_type, $description, $behind_login,
$platform, $oscpu, $gecko, $product, $useragent, $buildconfig,
$language, $email, $sysid, $screenshot, $screenshot_format) {
global $config;
if ($config['service_active'] == false){
return new soap_fault('SERVER', '', 'The service is currently unavailable. Please try again in a few minutes.');
}
/**********
* Sanitize and Validate
**********/
// Remove any HTML tags and whitespace
$rmoVers = trim(strip_all_tags($rmoVers));
$url = trim(strip_all_tags($url));
@ -103,14 +124,17 @@ function submitReport($rmoVers, $url, $problem_type, $description, $behind_login
$language = trim(strip_all_tags($language));
$email = trim(strip_all_tags($email));
$sysid = trim(strip_all_tags($sysid));
$screenshot_format = trim(strip_all_tags($screenshot_format));
$screenshot_width = trim(strip_all_tags($screenshot_width));
$screenshot_height = trim(strip_all_tags($screenshot_height));
// check verison
if ($rmoVers < $config['min_vers']){
return new soap_fault('Client', '', 'Your product is out of date, please upgrade. See http://reporter.mozilla.org/install for details.', $rmoVers);
}
$parsedURL = parse_url($url);
if (!$url || !$parsedURL['host']){
$parsedUrl = parse_url($url);
if (!$url || !$parsedUrl['host']){
return new soap_fault('Client', '', 'url must use a valid URL syntax http://mozilla.com/page', $url);
}
if (!$problem_type || $problem_type == -1 || $problem_type == "0") {
@ -127,10 +151,11 @@ function submitReport($rmoVers, $url, $problem_type, $description, $behind_login
if (!$language) {
return new soap_fault('Client', '', 'Invalid Localization', $language);
}
/* not used until we have a way to gather this info
/* We don't explicity require this since some older clients may not return this.
if (!$gecko) {
return new soap_fault('Client', '', 'Invalid Gecko ID', $gecko);
}*/
}
*/
if (!$oscpu) {
return new soap_fault('Client', '', 'Invalid OS CPU', $oscpu);
}
@ -140,73 +165,108 @@ function submitReport($rmoVers, $url, $problem_type, $description, $behind_login
if (!$buildconfig) {
return new soap_fault('Client', '', 'Invalid Build Config', $buildconfig);
}
if (!$sysid) {
return new soap_fault('Client', '', 'No SysID Entered', $sysid);
}
/* we don't require email... it's optional
/* We don't require email... it's optional
if (!$email) {
return new soap_fault('Client', '', 'Invalid Email', $email);
}*/
}
*/
// Image Validation
if($screenshot != null) {
// If no format specified, it's invalid
if($screenshot_format == null) {
return new soap_fault('Client', '', 'Invalid Screenshot', $screenshot_format);
}
// Must be in our list of approved formats.
if(!in_array($screenshot_format, $config['screenshot_imageTypes'])){
return new soap_fault('Client', '', 'Invalid Screenshot Format', $screenshot_format);
}
}
// create report_id. We just MD5 it, becase we don't need people counting reports, since it's inaccurate.
// we can have dup's, so it's not a good thing for people to be saying 'mozilla.org reports 500,000 incompatable sites'
$report_id = 'RMO'.str_replace(".", "", array_sum(explode(' ', microtime())));
// Open DB
$db = NewADOConnection($config['db_dsn']);
if (!$db) die("Connection failed");
/**********
* Open DB
**********/
$db = NewDBConnection($config['db_dsn']);
$db->SetFetchMode(ADODB_FETCH_ASSOC);
$sysIDQuery = $db->Execute("SELECT `sysid_id` FROM `sysid` WHERE `sysid_id` = ".$db->quote($sysid));
$sysidCount = $sysIDQuery->RecordCount();
if ($sysidCount != 1){
return new soap_fault('Client', '', 'Invalid SysID', $sysid);
/**********
* Check for valid sysid
**********/
$sysIdQuery = $db->Execute("SELECT sysid.sysid_id
FROM sysid
WHERE sysid.sysid_id = ".$db->quote($sysid));
if(!$sysIdQuery){
return new soap_fault('SERVER', '', 'Database Error SR1');
}
$queryURL = $db->Execute("SELECT `host_id` FROM `host` WHERE `host_hostname` = ".$db->quote($parsedURL['host']));
$resultURL = $queryURL->RecordCount();
if ($resultURL <= 0) {
if ($sysIdQuery->RecordCount() != 1){
return new soap_fault('Client', '', 'Invalid SysID', $sysid);
}
/**********
* Check Hostname
**********/
$hostnameQuery = $db->Execute("SELECT host.host_id
FROM host
WHERE host.host_hostname = ".$db->quote($parsedUrl['host']));
if(!$hostnameQuery){
return new soap_fault('SERVER', '', 'Database Error SR2');
}
/**********
* Add Host
**********/
if ($hostnameQuery->RecordCount() <= 0) {
// generate hash
$host_id = md5($parsedURL['host'].microtime());
$host_id = md5($parsedUrl['host'].microtime());
// We add the URL
$addURL = $db->Execute("INSERT INTO `host` (`host_id`, `host_hostname`, `host_date_added`)
VALUES (
".$db->quote($host_id).",
".$db->quote($parsedURL['host']).",
now()
)
");
if (!$addURL) {
return new soap_fault('SERVER', '', 'Database Error');
$addUrlQuery = $db->Execute("INSERT INTO host (host.host_id, host.host_hostname, host.host_date_added)
VALUES (
".$db->quote($host_id).",
".$db->quote($parsedUrl['host']).",
now()
)");
if (!$addUrlQuery) {
return new soap_fault('SERVER', '', 'Database Error SR3');
}
}
else if ($resultURL == 1) {
else if ($hostnameQuery->RecordCount() == 1) {
// pull the hash from DB
$host_id = $queryURL->fields['host_id'];
$host_id = $hostnameQuery->fields['host_id'];
} else{
return new soap_fault('SERVER', '', 'Host Exception Error');
return new soap_fault('SERVER', '', 'Host Exception Error');
}
$addReport = $db->Execute("INSERT INTO `report` (
`report_id`,
`report_url`,
`report_host_id`,
`report_problem_type`,
`report_description`,
`report_behind_login`,
`report_useragent`,
`report_platform`,
`report_oscpu`,
`report_language`,
`report_gecko`,
`report_buildconfig`,
`report_product`,
`report_email`,
`report_ip`,
`report_file_date`,
`report_sysid`
)
VALUES (
/**********
* Add Report
**********/
$addReportQuery = $db->Execute("INSERT INTO report (
report.report_id,
report.report_url,
report.report_host_id,
report.report_problem_type,
report.report_description,
report.report_behind_login,
report.report_useragent,
report.report_platform,
report.report_oscpu,
report.report_language,
report.report_gecko,
report.report_buildconfig,
report.report_product,
report.report_email,
report.report_ip,
report.report_file_date,
report.report_sysid
)
VALUES (
".$db->quote($report_id).",
".$db->quote($url).",
".$db->quote($host_id).",
@ -224,25 +284,57 @@ function submitReport($rmoVers, $url, $problem_type, $description, $behind_login
".$db->quote($_SERVER['REMOTE_ADDR']).",
now(),
".$db->quote($sysid)."
)
");
if (!$addReport) {
return new soap_fault('SERVER', '', 'Database Error');
} else {
return $report_id;
);");
if (!$addReportQuery) {
return new soap_fault('SERVER', '', 'Database Error SR4');
}
/**********
* Process Screenshot
**********/
if($screenshot != null){
// Screenshots come in base64 encoded, so we need to decode.
$screenshot = base64_decode($screenshot);
// Note we addslashes() not quote() the image, because quote() is not
// binary compatible and has ugly consequences.
$insertSsQuery = $db->Execute("INSERT screenshot(
screenshot.screenshot_report_id,
screenshot.screenshot_data,
screenshot.screenshot_format
)
VALUES (".$db->quote($report_id).",
'".addslashes($screenshot)."',
".$db->quote($screenshot_format)."
);
");
if(!$insertSsQuery){
return new soap_fault('SERVER', '', 'Database Error SR5');
}
// If we got this far, the screenshot was successfully added!
}
/**********
* Disconnect (optional really)
**********/
$db->disconnect();
return $report_id;
}
function register($language){
global $config;
// Open DB
$db = NewADOConnection($config['db_dsn']);
if (!$db) die("Connection failed");
/**********
* Open DB
**********/
$db = NewDBConnection($config['db_dsn']);
$db->SetFetchMode(ADODB_FETCH_ASSOC);
// generate an ID
/**********
* Generate an ID
**********/
$unique = false;
// in theory a collision could happen, though unlikely. So just to make sure, we do this
@ -250,41 +342,49 @@ function register($language){
while (!$unique) {
$id = date("ymd").rand(1000,9999);
$query =& $db->Execute("SELECT sysid.sysid_id
$uniqueQuery =& $db->Execute("SELECT sysid.sysid_id
FROM sysid
WHERE sysid.sysid_id = '$newid'
WHERE sysid.sysid_id = '$id'
");
$numRows = $query->RecordCount();
if(!$uniqueQuery){
return new soap_fault('SERVER', '', 'Database Error R1');
}
$numRows = $uniqueQuery->RecordCount();
if ($numRows == 0) {
// It's unique, stop the loop.
$unique = true;
}
}
$addsysid = $db->Execute("INSERT INTO `sysid` (
`sysid_id`,
`sysid_created`,
`sysid_created_ip`,
`sysid_language`
)
VALUES (
'".$id."',
now(),
'".$_SERVER['REMOTE_ADDR']."',
".$db->quote($language)."
)
");
// Disconnect Database
/**********
* Register ID
**********/
$addSysIdQuery = $db->Execute("INSERT INTO sysid (
sysid.sysid_id,
sysid.sysid_created,
sysid.sysid_created_ip,
sysid.sysid_language
)
VALUES (
'".$id."',
now(),
'".$_SERVER['REMOTE_ADDR']."',
".$db->quote($language)."
)");
if (!$addSysIdQuery) {
return new soap_fault('SERVER', '', 'Database Error R2');
}
/**********
* Disconnect
**********/
$db->disconnect();
if (!$addsysid) {
return new soap_fault('SERVER', '', 'Database Error');
} else {
return $id;
}
return $id;
}
// Use the request to (try to) invoke the service
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>

Просмотреть файл

@ -136,3 +136,18 @@ body {
width: 45%;
padding: 2px 9px 5px 9px;
}
#report_tabs li {
list-style-type: none;
border: 1px solid red;
}
#report_data, #report_screenshot{
/* float: right; */
margin-left: 110px;
}
#report_screenshot {
text-align: center;
}

Просмотреть файл

@ -1,14 +1,20 @@
--
-- phpMyAdmin SQL Dump
-- version 2.7.0-pl1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 25, 2006 at 10:07 PM
-- Server version: 4.1.15
-- PHP Version: 4.4.1
--
-- Database: `reporter`
--
CREATE DATABASE `reporter`;
USE reporter;
--
-- --------------------------------------------------------
--
--
-- Table structure for table `host`
--
--
CREATE TABLE `host` (
`host_id` varchar(32) NOT NULL default '',
@ -21,17 +27,6 @@ CREATE TABLE `host` (
-- --------------------------------------------------------
--
-- Table structure for table `product`
--
CREATE TABLE `product` (
`product_id` varchar(150) NOT NULL default '',
`product_description` varchar(150) NOT NULL default ''
) TYPE=MyISAM;
-- --------------------------------------------------------
--
-- Table structure for table `report`
--
@ -41,7 +36,7 @@ CREATE TABLE `report` (
`report_url` varchar(255) NOT NULL default '',
`report_host_id` varchar(32) NOT NULL default '',
`report_problem_type` varchar(5) NOT NULL default '0',
`report_description` tinytext NOT NULL,
`report_description` text NOT NULL,
`report_behind_login` int(11) NOT NULL default '0',
`report_useragent` varchar(255) NOT NULL default '',
`report_platform` varchar(20) NOT NULL default '',
@ -60,15 +55,28 @@ CREATE TABLE `report` (
-- --------------------------------------------------------
--
-- Table structure for table `screenshot`
--
CREATE TABLE `screenshot` (
`screenshot_report_id` varchar(17) NOT NULL default '',
`screenshot_data` longblob NOT NULL,
`screenshot_format` varchar(14) NOT NULL default 'png',
PRIMARY KEY (`screenshot_report_id`)
) TYPE=MyISAM;
-- --------------------------------------------------------
--
-- Table structure for table `sysid`
--
--
CREATE TABLE `sysid` (
`sysid_id` varchar(10) binary NOT NULL default '',
`sysid_id` varchar(10) NOT NULL default '',
`sysid_created` datetime NOT NULL default '0000-00-00 00:00:00',
`sysid_created_ip` varchar(15) binary NOT NULL default '',
`sysid_language` varchar(7) binary NOT NULL default '',
`sysid_created_ip` varchar(15) NOT NULL default '',
`sysid_language` varchar(7) NOT NULL default '',
PRIMARY KEY (`sysid_id`)
) TYPE=MyISAM;
@ -79,10 +87,10 @@ CREATE TABLE `sysid` (
--
CREATE TABLE `user` (
`user_id` int(11) NOT NULL default '0',
`user_id` int(11) NOT NULL,
`user_username` varchar(50) NOT NULL default '',
`user_password` varchar(40) NOT NULL default '',
`user_realname` varchar(25) NOT NULL default '',
`user_password` varchar(16) NOT NULL default '',
`user_realname` varchar(40) NOT NULL default '',
`user_email` varchar(255) NOT NULL default '',
`user_added_by` tinytext NOT NULL,
`user_added_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
@ -90,6 +98,5 @@ CREATE TABLE `user` (
`user_last_ip_address` varchar(16) NOT NULL default '',
`user_status` int(11) NOT NULL default '0',
PRIMARY KEY (`user_id`),
KEY `user_password` (`user_password`),
KEY `user_id` (`user_id`)
KEY `user_username` (`user_username`)
) TYPE=MyISAM;

Просмотреть файл

@ -91,7 +91,7 @@
<tr>
<td class="label"><label for="report_problem_type">Problem Type:</label></td>
<td>
<input type="radio" name="report_problem_type" id="0" value="0" {if $report_problem_type == '0' || $report_problem_type == null}checked="checked"{/if}><label for="0">All types</label><br>
<input type="radio" name="report_problem_type" id="null" value="-1" {if $report_problem_type == '-1' || $report_problem_type == null}checked="checked"{/if}><label for="null">All types</label><br>
{html_radios name="report_problem_type" options=$problem_types selected=$report_problem_type separator="<br />"}
</td>
</tr>
@ -99,8 +99,8 @@
<td class="label">Site requires login:</td>
<td>
<input type="radio" name="report_behind_login" id="behind_login_null" value="-1" {if $report_behind_login == '-1' || $report_behind_login == ''}checked="checked"{/if}><label for="behind_login_null">Any</label>
<input type="radio" name="report_behind_login" id="behind_login_yes" value="0" {if $report_behind_login == '0'}checked="checked"{/if}><label for="behind_login_yes">Yes</label>
<input type="radio" name="report_behind_login" id="behind_login_no" value="1" {if $report_behind_login == '1'}checked="checked"{/if}><label for="behind_login_no">No</label>
<input type="radio" name="report_behind_login" id="behind_login_yes" value="1" {if $report_behind_login == '1'}checked="checked"{/if}><label for="behind_login_yes">Yes</label>
<input type="radio" name="report_behind_login" id="behind_login_no" value="0" {if $report_behind_login == '0'}checked="checked"{/if}><label for="behind_login_no">No</label>
</td>
</tr>
<tr>

Просмотреть файл

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="top" title="Home" href="http://www.mozilla.org/">
<link rel="stylesheet" type="text/css" href="{$base_url}/styles/theme/mozilla/print.css" media="print">
<link rel="stylesheet" type="text/css" href="{$base_url}/styles/theme/mozilla/base/content.css" media="all">

Просмотреть файл

@ -1,68 +1,117 @@
{if $screenshot == true}
{literal}
<script type="text/javascript">
function show(aItem){
if(aItem == 'data'){
document.getElementById('report_screenshot').style.display = 'none';
document.getElementById('report_data').style.display = '';
} else {
document.getElementById('report_screenshot').innerHTML="<img src=\"screenshot/?report_id={/literal}{$report_id}{literal}\" alt=\"Screenshot for {/literal}{$report_id}{literal}\" id=\"screenshot\" />";
document.getElementById('report_screenshot').style.display = '';
document.getElementById('report_data').style.display = 'none';
}
}
</script>
{/literal}
{/if}
{literal}
<style type="text/css">
#report_tabs ul li {
display: inline;
border: 1px solid #ccc;
background: 1px solid #eee;
padding: 0.5em; 2em;
margin: 0.5em; 4em;
}
#report_screenshot {
margin: 0 auto 0 auto;
text-align: center;
}
</style>
{/literal}
{if $error != ''}
<div class="error">
<h3>Error</h3>
<p>{$error}. <a href="javascript:history.go(-1);">Back</a></p>
</div>
<div class="error">
<h3>Error</h3>
<p>{$error}. <a href="javascript:history.go(-1);">Back</a></p>
</div>
{else}
<div id="reporterReport">
<div class="header">Report RMO11301752363661</div>
<div>
<div class="title">URL:</div>
<div class="data"><a href="{$report_url}" rel="nofollow external" title="Visit Page">{$report_url|truncate:60}</a></div>
</div>
<div>
<div class="title">Host:</div>
<div class="data"><a href="{$host_url}" title="see all reports for {$host_hostname}">Reports for {$host_hostname}</a></div>
</div>
<div>
<div class="title">Problem Type:</div>
<div class="data">{$report_problem_type}</div>
</div>
<div>
<div class="title">Behind Login:</div>
<div class="data">{$report_behind_login}</div>
</div>
<div>
<div class="title">Product:</div>
<div class="data">{$report_product}</div>
</div>
<div>
<div class="title">Gecko Version:</div>
<div class="data">{$report_gecko}</div>
</div>
<div>
<div class="title">Platform:</div>
<div class="data">{$report_platform}</div>
</div>
<div>
<div class="title">OS/CPU:</div>
<div class="data">{$report_oscpu}</div>
</div>
<div>
<div class="title">Language:</div>
<div class="data">{$report_language}</div>
</div>
<div>
<div class="title">User Agent:</div>
<div class="data">{$report_useragent}</div>
</div>
<div>
<div class="title">Build Config:</div>
<div class="data">{$report_buildconfig}</div>
</div>
{if $is_admin == true}
<div>
<div class="title">Email:</div>
<div class="data">{$report_email}&nbsp; {*this space at the end fixes some formatting issues with no text in this optional field *}</div>
</div>
<div>
<div class="title">IP Address:</div>
<div class="data"><a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput={$report_ip}" rel="external" target="_blank" title="Lookup IP: {$report_ip}">{$report_ip}</a>&nbsp; {*this space at the end fixes some formatting issues with no text in this optional field *}</div>
</div>
{/if}
<div>
<div class="title">Description:</div>
<div class="data">{$report_description}&nbsp; {*this space at the end fixes some formatting issues with no text in this optional field *}</div>
<div class="header">Report RMO11301752363661</div>
<!-- {$screenshot} -->
<div id="report_data">
<div>
<div class="title">URL:</div>
<div class="data"><a href="{$report_url}" rel="nofollow external" title="Visit Page">{$report_url|truncate:60}</a></div>
</div>
<div>
<div class="title">Host:</div>
<div class="data"><a href="{$host_url}" title="see all reports for {$host_hostname}">Reports for {$host_hostname}</a></div>
</div>
<div>
<div class="title">Problem Type:</div>
<div class="data">{$report_problem_type}</div>
</div>
<div>
<div class="title">Behind Login:</div>
<div class="data">{$report_behind_login}</div>
</div>
<div>
<div class="title">Product:</div>
<div class="data">{$report_product}</div>
</div>
<div>
<div class="title">Gecko Version:</div>
<div class="data">{$report_gecko}</div>
</div>
<div>
<div class="title">Platform:</div>
<div class="data">{$report_platform}</div>
</div>
<div>
<div class="title">OS/CPU:</div>
<div class="data">{$report_oscpu}</div>
</div>
<div>
<div class="title">Language:</div>
<div class="data">{$report_language}</div>
</div>
<div>
<div class="title">User Agent:</div>
<div class="data">{$report_useragent}</div>
</div>
<div>
<div class="title">Build Config:</div>
<div class="data">{$report_buildconfig}</div>
</div>
{if $is_admin == true}
<div>
<div class="title">Email:</div>
<div class="data">{$report_email}&nbsp; {*this space at the end fixes some formatting issues with no text in this optional field *}</div>
</div>
<div>
<div class="title">IP Address:</div>
<div class="data"><a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput={$report_ip}" rel="external" target="_blank" title="Lookup IP: {$report_ip}">{$report_ip}</a>&nbsp; {*this space at the end fixes some formatting issues with no text in this optional field *}</div>
</div>
{/if}
<div>
<div class="title">Description:</div>
<div class="data">{$report_description}&nbsp; {*this space at the end fixes some formatting issues with no text in this optional field *}</div>
</div>
</div>
{if $screenshot == true}
<div id="report_screenshot" style="display:none;"></div>
{/if}
<div id="report_tabs">
<ul>
<li><a href="javascript:show('data');">Report Data</a></li>
{if $screenshot == true}
<li><a href="javascript:show('screenshot');">Screenshot</a></li>
{/if}
</ul>
</div>
</div>
<div id="reportNavigation">
<p>
@ -113,9 +162,10 @@
</a>
{/if}
{/strip}
{/if}
|
{/if}
<a href="{$base_url}/app/query/?{$continuity_params}" accesskey="b" title="Back to the Query List (Access Key 'B')">Back To List</a>
|
@ -123,4 +173,3 @@
</p>
</div>
{/if}