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"]);
|
$desc = mysqli_real_escape_string($dbconn, $artwork_details["desc"]);
|
||||||
$uid = md5_file($thumb_filename); // valami random...
|
$uid = md5_file($thumb_filename); // valami random...
|
||||||
$aspect_ratio = $img_sizes[0] / $img_sizes[1];
|
$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);
|
$res = mysqli_query($dbconn, $query);
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ function get_general_info()
|
|||||||
$info = [];
|
$info = [];
|
||||||
|
|
||||||
// összes kép számának lekérdezése
|
// ö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)"];
|
$ret = (int)mysqli_query($dbconn, $query)->fetch_assoc()["COUNT(No)"];
|
||||||
$info["total_artwork_count"] = $ret;
|
$info["total_artwork_count"] = $ret;
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ function get_batch($offset, $n)
|
|||||||
$batch = [];
|
$batch = [];
|
||||||
|
|
||||||
// kívánt mennyiségű képinformáció lekérdezése
|
// 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);
|
$ret = mysqli_query($dbconn, $query);
|
||||||
while (($row = $ret->fetch_assoc()) != NULL) {
|
while (($row = $ret->fetch_assoc()) != NULL) {
|
||||||
$batch[] = $row;
|
$batch[] = $row;
|
||||||
@ -237,7 +237,7 @@ function get_update_batch($last_uid)
|
|||||||
$batch = [];
|
$batch = [];
|
||||||
|
|
||||||
// az utolsó UID óta érkezett sorok kiválogatása
|
// 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);
|
$ret = mysqli_query($dbconn, $query);
|
||||||
while (($row = $ret->fetch_assoc()) != NULL) {
|
while (($row = $ret->fetch_assoc()) != NULL) {
|
||||||
$batch[] = $row;
|
$batch[] = $row;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user