Example #1
0
<?php

require_once "framework2/CredentialStore.php";
$cs = new CredentialStore();
$schoolTextId = $cs->cookieCheck("sPref");
if ($cs->getSchoolName($schoolTextId) == null) {
    header('Location: selector');
}
if (!($loggedIn = $cs->getLoginStatus())) {
    header('Location: ./');
}
?>
<!DOCTYPE html>
<html>
<head>
	<title>Walkntrade</title>
	<link type="text/css" rel="stylesheet" href="css/style.css">
	<link type="text/css" rel="stylesheet" href="/css/spritesheet.css">
	<link type="text/css" rel="stylesheet" href="css/login_window.css">
	<link type="text/css" rel="stylesheet" href="css/addlisting.css">
	<link rel="shortcut icon" href="http://www.walkntrade.com/favicon.ico?v=2" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="Content-Language" content="en" />
	<script>
	  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
	  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
	  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
	  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

	  ga('create', 'UA-42896980-1', 'auto');
	  ga('send', 'pageview');
Example #2
0
<?php

require_once "framework2/CredentialStore.php";
$cs = new CredentialStore();
$loggedIn = $cs->getLoginStatus();
?>
<!DOCTYPE html>
<html>
<head>
	<title>Walkntrade | Terms of Service</title>
	<link type="text/css" rel="stylesheet" href="css/style.css">
	<link type="text/css" rel="stylesheet" href="/css/spritesheet.css">
	<link type="text/css" rel="stylesheet" href="css/login_window.css">
	<link rel="shortcut icon" href="http://www.walkntrade.com/favicon.ico?v=2" />
	<meta name="description" content="Terms of Service" >
	<meta name="robots" content="NOINDEX, NOFOLLOW" />
	<meta http-equiv="Content-Language" content="en">
	<script>
	  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
	  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
	  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
	  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

	  ga('create', 'UA-42896980-1', 'auto');
	  ga('send', 'pageview');

	</script>
</head>
<body>
	<div id="throbber"><img src="colorful/loader.gif"></div>
		<div class="headerBar"></div>
Example #3
0
 case "resetPassword":
     require_once "../framework2/Walkntrade.php";
     $wt = new Walkntrade();
     $wt->resetPassword(filter_var($_POST["email"], FILTER_SANITIZE_EMAIL));
     break;
 case "sendFeedback":
     require_once "../framework2/Walkntrade.php";
     $wt = new Walkntrade();
     if (isset($_POST["message"])) {
         $email = isset($_POST["email"]) ? $_POST["email"] : "";
         $wt->sendFeedback($email, $_POST["message"]);
     }
     break;
 case "getPhoneNum":
     require_once "../framework/CredentialStore.php";
     $cs = new CredentialStore();
     echo $cs->getPhoneNum();
     break;
 case "getCategories":
     require_once "../framework2/Walkntrade.php";
     $wt = new Walkntrade();
     $wt->getCategories();
     break;
 case "createMessageThread":
     require_once "../framework2/UserMgmt.php";
     $um = new UserMgmt();
     $message_content = isset($_POST["message"]) ? filter_var($_POST["message"], FILTER_SANITIZE_STRING) : null;
     $post_id = isset($_POST["post_id"]) ? filter_var($_POST["post_id"], FILTER_SANITIZE_STRING) : null;
     $um->createMessageThread($message_content, $post_id);
     break;
 case "getMessageThreadsCurrentUser":
Example #4
0
 public function __construct()
 {
     parent::__construct();
 }
Example #5
0
<?php

require_once "framework2/CredentialStore.php";
$cs = new CredentialStore();
$serverName = basename($_SERVER["SERVER_NAME"]);
$serverURI = $_SERVER['REQUEST_URI'];
if (!in_array($serverName, $cs->getValidDomains())) {
    header('Location: https://walkntrade.com' . $serverURI, true, 301);
}
$schoolTextId = $cs->cookieCheck("sPref");
if ($cs->getSchoolName($schoolTextId) === null) {
    include "selector.php";
} else {
    $query = isset($_GET["query"]) ? $_GET["query"] : "";
    header('Location: /schools/' . $schoolTextId . '?query=' . $query);
}
Example #6
0
<?php

require_once "framework2/CredentialStore.php";
$cs = new CredentialStore();
$loggedIn = $cs->getLoginStatus();
//get page args
$args = array_keys($_GET);
$args = split(":", $args[0]);
$identifier = htmlspecialchars($args[1]);
$schoolTextId = htmlspecialchars($args[0]);
$myPost = false;
$serverName = basename($_SERVER["SERVER_NAME"]);
$serverURI = $_SERVER['REQUEST_URI'];
$redirect = true;
foreach ($cs->getValidDomains() as $domain) {
    if ($serverName === $domain) {
        $redirect = false;
    }
}
if ($redirect) {
    header('Location: https://walkntrade.com' . $serverURI, true, 301);
}
if ($cs->getSchoolName($schoolTextId) == null) {
    header('Location: ./');
    return;
}
if ($identifier != null) {
    //get details of the post
    if ($stmt = $cs->getlistingConnection()->prepare("SELECT id, identifier, category, title, details, price, location, username, userid, date, views, price, isbn, author FROM `" . $schoolTextId . "` WHERE `identifier` = ? LIMIT 1")) {
        //prepare query
        $stmt->bind_param('s', $identifier);
Example #7
0
<?php

require_once "framework2/CredentialStore.php";
$cs = new CredentialStore();
$loggedIn = $cs->getLoginStatus();
//get page args
$args = array_keys($_GET);
$args = split(":", $args[0]);
$identifier = $args[1];
$schoolTextId = $args[0];
if ($cs->getSchoolName($schoolTextId) == null || !$loggedIn) {
    return;
}
if ($identifier != null) {
    if ($editSTMT = $cs->getListingConnection()->prepare("SELECT id, title, details, price, tags FROM " . $schoolTextId . " WHERE identifier = ? LIMIT 1")) {
        $editSTMT->bind_param("s", $identifier);
        $editSTMT->execute();
        // Execute the prepared query.
        $editSTMT->store_result();
        $editSTMT->bind_result($id, $title, $details, $price, $tags);
        $editSTMT->fetch();
        if ($editSTMT->num_rows < 1) {
            header('Location: ./');
        }
        $title = htmlspecialchars($title);
        $price = $price != 0 ? "\$" . round($price, 2) : "(no price)";
        $details = htmlspecialchars($details);
    }
}
?>
<!DOCTYPE html>