diff --git a/admin/index.php b/admin/index.php
index ee66465..b8b8ceb 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -39,15 +39,15 @@ if (isset($_POST["txt"]) && isset($_POST["tim"])) {
include "../connect.php";
$mysql_table = MYSQL_TABLE;
-$qry = "INSERT INTO `$mysql_table` (`id`, `txt`, `tim`) VALUES (NULL, '".mysql_escape_string(nl2br($txt.$extrl))."', '".mysql_escape_string($tim)."')";
-$result = mysql_query($qry);
+$qry = "INSERT INTO `$mysql_table` (`id`, `txt`, `tim`) VALUES (NULL, '".mysqli_escape_string(nl2br($txt.$extrl))."', '".mysqli_escape_string($tim)."')";
+$result = mysqli_query($qry);
if (!$result) {
- die("Error! ".mysql_error());
+ die("Error! ".mysqli_error());
} else {
$allok = 1;
}
-mysql_close($link);
+mysqli_close($link);
}
?>
diff --git a/connect.php b/connect.php
index 88f7405..1153ac5 100644
--- a/connect.php
+++ b/connect.php
@@ -1,10 +1,6 @@
\ No newline at end of file
+?>
diff --git a/detail.php b/detail.php
index 3580956..20e3c6b 100644
--- a/detail.php
+++ b/detail.php
@@ -5,11 +5,11 @@ include 'checklogin.php';
include "connect.php";
$mysql_table = MYSQL_TABLE;
-$qry="SELECT * FROM `$mysql_table` WHERE `id`='".mysql_escape_string($_GET["id"])."'";
-$result=mysql_query($qry);
+$qry="SELECT * FROM `$mysql_table` WHERE `id`='".mysqli_escape_string($_GET["id"])."'";
+$result=mysqli_query($qry);
if($result) {
- if(mysql_num_rows($result) == 1) {
- $row = mysql_fetch_array($result);
+ if(mysqli_num_rows($result) == 1) {
+ $row = mysqli_fetch_array($result);
?>
\ No newline at end of file
+mysqli_close($link);
+?>
diff --git a/get.php b/get.php
index 5c873d3..26ca092 100644
--- a/get.php
+++ b/get.php
@@ -5,15 +5,15 @@ include 'checklogin.php';
include "connect.php";
$mysql_table = MYSQL_TABLE;
-$qry="SELECT * FROM `$mysql_table` ORDER BY `$mysql_table`.`id` ASC LIMIT ".mysql_escape_string($_GET["lastid"])." , 1000";
-$result=mysql_query($qry);
+$qry="SELECT * FROM `$mysql_table` ORDER BY `$mysql_table`.`id` ASC LIMIT ".mysqli_escape_string($_GET["lastid"])." , 1000";
+$result=mysqli_query($qry);
$newlastid=$_GET["lastid"];
$jspo=array();
-while ($row = mysql_fetch_array($result)) {
+while ($row = mysqli_fetch_array($result)) {
$newlastid=$newlastid+1;
array_push($jspo, array("txt"=>stripslashes($row["txt"]), "tim"=>$row["tim"], "id"=>$row["id"]));
}
echo json_encode(array("posts"=>$jspo, "lastid"=>$newlastid));
-mysql_close($link);
-?>
\ No newline at end of file
+mysqli_close($link);
+?>
diff --git a/index.php b/index.php
index 9de7163..0eeb95f 100644
--- a/index.php
+++ b/index.php
@@ -43,9 +43,9 @@ include 'checklogin.php';
include "connect.php";
$mysql_table = MYSQL_TABLE;
$qry="SELECT * FROM `$mysql_table` ORDER BY `$mysql_table`.`id` DESC LIMIT 0, 30 ";
- $result=mysql_query($qry);
+ $result=mysqli_query($qry);
$iffirst=0;
- while ($row = mysql_fetch_array($result)) {
+ while ($row = mysqli_fetch_array($result)) {
$postlinked = stripslashes($row["txt"]);
echo '
'.$postlinked.'
'.$row["tim"].'
';
if ($iffirst==0) {
@@ -53,7 +53,7 @@ include 'checklogin.php';
$iffirst=1;
}
}
- mysql_close($link);
+ mysqli_close($link);
?>
@@ -221,4 +221,4 @@ animationIn: 'bubble'