Browse Source

ajax updated

musheabdulhakim 3 years ago
parent
commit
7623219b1d
3 changed files with 6 additions and 6 deletions
  1. 2 2
      ajax/setBroken.php
  2. 2 2
      ajax/updateImageCount.php
  3. 2 2
      ajax/updateLinkCount.php

+ 2 - 2
ajax/setBroken.php

@@ -1,8 +1,8 @@
 <?php
-include("../config.php");
+include("../includes/config.php");
 
 if(isset($_POST["src"])) {
-	$query = $con->prepare("UPDATE images SET broken = 1 WHERE imageUrl=:src");
+	$query = $db->prepare("UPDATE images SET broken = 1 WHERE imageUrl=:src");
 	$query->bindParam(":src", $_POST["src"]);
 
 	$query->execute();

+ 2 - 2
ajax/updateImageCount.php

@@ -1,8 +1,8 @@
 <?php
-include("../config.php");
+include("../includes/config.php");
 
 if(isset($_POST["imageUrl"])) {
-	$query = $con->prepare("UPDATE images SET clicks = clicks + 1 WHERE imageUrl=:imageUrl");
+	$query = $db->prepare("UPDATE images SET clicks = clicks + 1 WHERE imageUrl=:imageUrl");
 	$query->bindParam(":imageUrl", $_POST["imageUrl"]);
 
 	$query->execute();

+ 2 - 2
ajax/updateLinkCount.php

@@ -1,8 +1,8 @@
 <?php
-include("../config.php");
+include("../includes/config.php");
 
 if(isset($_POST["linkId"])) {
-	$query = $con->prepare("UPDATE sites SET clicks = clicks + 1 WHERE id=:id");
+	$query = $db->prepare("UPDATE sites SET clicks = clicks + 1 WHERE id=:id");
 	$query->bindParam(":id", $_POST["linkId"]);
 
 	$query->execute();