Confirmed mező
This commit is contained in:
parent
445a03e811
commit
c8dbc12b89
@ -165,7 +165,7 @@ function publish_image($artwork_details)
|
||||
$desc = mysqli_real_escape_string($dbconn, $artwork_details["desc"]);
|
||||
$uid = md5_file($thumb_filename); // valami random...
|
||||
$aspect_ratio = $img_sizes[0] / $img_sizes[1];
|
||||
$query = "INSERT INTO publish_table (Author,Title,Description,Image_FileName,AspectRatio,ColorMean,Approved,UID,TS) VALUES('$author', '$title', '$desc', '$final_filename', $aspect_ratio, '$color_mean', TRUE, '$uid', CURRENT_TIMESTAMP);";
|
||||
$query = "INSERT INTO publish_table (Author,Title,Description,Image_FileName,AspectRatio,ColorMean,Approved,Confirmed,UID,TS) VALUES('$author', '$title', '$desc', '$final_filename', $aspect_ratio, '$color_mean', 1, 0, '$uid', CURRENT_TIMESTAMP);";
|
||||
|
||||
$res = mysqli_query($dbconn, $query);
|
||||
|
||||
@ -195,7 +195,7 @@ function get_general_info()
|
||||
$info = [];
|
||||
|
||||
// összes kép számának lekérdezése
|
||||
$query = "SELECT COUNT(No) FROM publish_table WHERE Approved;";
|
||||
$query = "SELECT COUNT(No) FROM publish_table WHERE Approved=1;";
|
||||
$ret = (int)mysqli_query($dbconn, $query)->fetch_assoc()["COUNT(No)"];
|
||||
$info["total_artwork_count"] = $ret;
|
||||
|
||||
@ -217,7 +217,7 @@ function get_batch($offset, $n)
|
||||
$batch = [];
|
||||
|
||||
// kívánt mennyiségű képinformáció lekérdezése
|
||||
$query = "SELECT Image_FileName,AspectRatio,ColorMean,Author,Title,Description,UID FROM publish_table WHERE Approved ORDER BY No DESC Limit $n OFFSET $offset;";
|
||||
$query = "SELECT Image_FileName,AspectRatio,ColorMean,Author,Title,Description,UID FROM publish_table WHERE Approved=1 ORDER BY No DESC Limit $n OFFSET $offset;";
|
||||
$ret = mysqli_query($dbconn, $query);
|
||||
while (($row = $ret->fetch_assoc()) != NULL) {
|
||||
$batch[] = $row;
|
||||
@ -237,7 +237,7 @@ function get_update_batch($last_uid)
|
||||
$batch = [];
|
||||
|
||||
// az utolsó UID óta érkezett sorok kiválogatása
|
||||
$query = "SELECT Image_FileName,AspectRatio,ColorMean,Author,Description,Title,UID FROM publish_table WHERE No > (SELECT No FROM publish_table WHERE UID = '$last_uid') AND Approved";
|
||||
$query = "SELECT Image_FileName,AspectRatio,ColorMean,Author,Description,Title,UID FROM publish_table WHERE No > (SELECT No FROM publish_table WHERE UID = '$last_uid') AND Approved=1;";
|
||||
$ret = mysqli_query($dbconn, $query);
|
||||
while (($row = $ret->fetch_assoc()) != NULL) {
|
||||
$batch[] = $row;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user