Skip to content

Commit

Permalink
cleaned up code
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Ramirez committed Sep 5, 2014
1 parent 3217a32 commit 1542a08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
12 changes: 6 additions & 6 deletions jserrorreporter.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
session_start();
if (!(isset($_SESSION['login']) && $_SESSION['login'] != '')) {
header("Location: /dashboard/login");
}
else
{
session_start();
if (!(isset($_SESSION['login']) && $_SESSION['login'] != '')) {
header("Location: /dashboard/login");
}
else
{
?>

<!DOCTYPE html>
Expand Down
13 changes: 2 additions & 11 deletions seterrors.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

//$con = mysqli_connect('localhost','root','Tw0sof+9Ly','scalabrinedb');
require("database.php");

/* pull the error information from the query string */
Expand Down Expand Up @@ -30,16 +29,7 @@
date_default_timezone_set('America/Los_Angeles');
$currentTime = date("Y-m-d H:i:s");


/* add error to database */
/*if ($SQL = $con->prepare("INSERT INTO jserrors (userAgent, url, line, message, userIP, time, orgid) VALUES (?,?,?,?,?,?,?)"))
{
$SQL->bind_param('sssssss', $userAgent, $url, $line, $message, $userIP, $currentTime, $orgid);
$SQL->execute();
$SQL->close();
}
*/

$sql = "INSERT INTO jserrors (userAgent, url, line, message, userIP, time, orgid) VALUES (?,?,?,?,?,?,?)";
$param = array(&$userAgent, &$url, &$line, &$message, &$userIP, &$currentTime, &$orgid);
my_update('sssssss', $param, $sql);
Expand All @@ -48,5 +38,6 @@
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("HTTP/1.1 204 No Content\n\n");
exit();
exit();

?>

0 comments on commit 1542a08

Please sign in to comment.