mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-05-30 07:13:12 +00:00
Fixing that really annoying bug
This commit is contained in:
parent
48f2e1b365
commit
a2e4507b46
2 changed files with 3 additions and 3 deletions
|
@ -62,7 +62,7 @@ class Account {
|
||||||
*/
|
*/
|
||||||
function get_user_info($conn, $id) {
|
function get_user_info($conn, $id) {
|
||||||
// Setting SQL query
|
// Setting SQL query
|
||||||
$sql = "SELECT * FROM users WHERE id = ".$id;
|
$sql = "SELECT id, username FROM users WHERE id = ".$id;
|
||||||
// Getting results
|
// Getting results
|
||||||
$query = mysqli_query($conn, $sql);
|
$query = mysqli_query($conn, $sql);
|
||||||
// Fetching associated info
|
// Fetching associated info
|
||||||
|
@ -79,7 +79,7 @@ class Account {
|
||||||
function is_admin($conn, $id) {
|
function is_admin($conn, $id) {
|
||||||
if (isset($id) || !empty($id)) {
|
if (isset($id) || !empty($id)) {
|
||||||
// Setting SQL query
|
// Setting SQL query
|
||||||
$sql = "SELECT * FROM users WHERE id = ".$id;
|
$sql = "SELECT admin FROM users WHERE id = ".$id;
|
||||||
// Getting results
|
// Getting results
|
||||||
$query = mysqli_query($conn, $sql);
|
$query = mysqli_query($conn, $sql);
|
||||||
// Fetching associated info
|
// Fetching associated info
|
||||||
|
|
|
@ -332,7 +332,7 @@
|
||||||
</form>";
|
</form>";
|
||||||
flyoutShow(header, description, actionBox);
|
flyoutShow(header, description, actionBox);
|
||||||
|
|
||||||
$('#descriptionInput').val("<?php echo str_replace('"', '\"', $image_alt); ?>");
|
$('#descriptionInput').val("<?php if ($image_alt != "No description avalible") echo str_replace('"', '\"', $image_alt); ?>");
|
||||||
|
|
||||||
$("#descriptionConfirm").submit(function(event) {
|
$("#descriptionConfirm").submit(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue