Ejemplo n.º 1
0
 public function getURLInfo($shortUrl)
 {
     $sql = "select * from lu_urlcontainer where shortUrl=?";
     $data = [$shortUrl];
     $sqlResult = parent::fetch_rows($sql, $data);
     if (count($sqlResult) == 1) {
         $this->response = new LightResponse();
         $this->response->bulkUrl = $sqlResult[0]->bulkUrl;
         $this->response->shortUrl = $sqlResult[0]->shortUrl;
         $this->response->hashUrl = $sqlResult[0]->hashUrl;
         $this->response->insertDate = $sqlResult[0]->insertDate;
         return $this->response->LightResponse(true);
     }
 }
Ejemplo n.º 2
0
    header("location:login.php");
} else {
    require_once '../src/core/LightUrl.php';
    $sql = "select * from lu_users where username=?";
    $username = $_SESSION['username'];
    $data = [$username];
    $queryUserInfo = LightDB::fetch_rows($sql, $data);
    $sqlCountDAY = "SELECT count(id) DAY FROM lu_urlcontainer WHERE insertDate > DATE_SUB(NOW(), INTERVAL 1 DAY) ORDER BY id DESC";
    $sqlCountWEEK = "SELECT count(id) WEEK FROM lu_urlcontainer WHERE insertDate > DATE_SUB(NOW(), INTERVAL 1 WEEK) ORDER BY id DESC";
    $sqlCountMONTH = "SELECT count(id) MONTH FROM lu_urlcontainer WHERE insertDate > DATE_SUB(NOW(), INTERVAL 1 MONTH) ORDER BY id DESC";
    $sqlCountYEAR = "SELECT count(id) YEAR FROM lu_urlcontainer WHERE insertDate > DATE_SUB(NOW(), INTERVAL 1 YEAR) ORDER BY id DESC";
    $data = [];
    $queryCountDAY = LightDB::fetch_rows($sqlCountDAY, $data);
    $queryCountWEEK = LightDB::fetch_rows($sqlCountWEEK, $data);
    $queryCountMONTH = LightDB::fetch_rows($sqlCountMONTH, $data);
    $queryCountYEAR = LightDB::fetch_rows($sqlCountYEAR, $data);
    ?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>LightURL Dashboard</title>
    <!-- BOOTSTRAP STYLES-->
    <link href="assets/css/bootstrap.css" rel="stylesheet"/>
    <!-- FONTAWESOME STYLES-->
    <link href="assets/css/font-awesome.css" rel="stylesheet"/>
    <!-- MORRIS CHART STYLES-->
    <link href="assets/js/morris/morris-0.4.3.min.css" rel="stylesheet"/>
    <!-- CUSTOM STYLES-->
Ejemplo n.º 3
0
<?php

ob_start();
session_start();
if (!$_SESSION['login']) {
    header("location:login.php");
} else {
    require_once '../src/core/LightUrl.php';
    $sql = "select * from lu_users where username=?";
    $username = $_SESSION['username'];
    $data = [$username];
    $queryUserInfo = LightDB::fetch_rows($sql, $data);
    ?>

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <title>LightURL Dashboard</title>
        <!-- BOOTSTRAP STYLES-->
        <link href="assets/css/bootstrap.css" rel="stylesheet"/>
        <!-- FONTAWESOME STYLES-->
        <link href="assets/css/font-awesome.css" rel="stylesheet"/>
        <!-- MORRIS CHART STYLES-->
        <link href="assets/js/morris/morris-0.4.3.min.css" rel="stylesheet"/>
        <!-- CUSTOM STYLES-->
        <link href="assets/css/custom.css" rel="stylesheet"/>
        <!-- GOOGLE FONTS-->
        <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
    </head>
Ejemplo n.º 4
0
<?php

ob_start();
session_start();
if (!$_SESSION['login']) {
    header("location:login.php");
} else {
    require_once '../src/core/LightUrl.php';
    $sql = "select * from lu_users where username=?";
    $username = $_SESSION['username'];
    $data = [$username];
    $queryUserInfo = LightDB::fetch_rows($sql, $data);
    $sqlAllUrl = "SELECT *   FROM lu_urlcontainer ORDER BY id DESC";
    $data = [];
    $queryAllUrl = LightDB::fetch_rows($sqlAllUrl, $data);
    ?>

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <title>LightURL Dashboard</title>
        <!-- BOOTSTRAP STYLES-->
        <link href="assets/css/bootstrap.css" rel="stylesheet"/>
        <!-- FONTAWESOME STYLES-->
        <link href="assets/css/font-awesome.css" rel="stylesheet"/>
        <!-- MORRIS CHART STYLES-->
        <link href="assets/js/morris/morris-0.4.3.min.css" rel="stylesheet"/>
        <!-- CUSTOM STYLES-->
        <link href="assets/css/custom.css" rel="stylesheet"/>