Mercurial > hg > fapweb
diff admajax.php @ 846:e0c9bf182bb7
More work, another database change :S
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 25 Nov 2014 23:54:38 +0200 |
parents | 4fcab270a3f9 |
children | d0b6daedd21c |
line wrap: on
line diff
--- a/admajax.php Tue Nov 25 23:49:41 2014 +0200 +++ b/admajax.php Tue Nov 25 23:54:38 2014 +0200 @@ -181,6 +181,24 @@ function stGetFileUploadAndSelector($mode, $entry, $type, $file_id, $title) { + if ($mode == 2) + return ""; + + $eid = $entry["id"]; + $str = "<div class=\"editControl\"><span class=\"editControlTitle\">".chentities($title)."</span>\n"; + + if (($efile = stFetchSQL("SELECT * FROM files WHERE id=".$entry[$file_id])) !== false) + { + $str .= + "<div>File: <b>".chentities($efile["filename"])."</b></div>\n". + "<div>Orig: <b>".chentities($efile["origname"])."</b></div>\n"; + } + + if ($mode == 1) + { + } + + return $str."</div>\n"; } @@ -721,7 +739,8 @@ // // File upload // - stHandleGenericFileUpload(0); + if (stHandleGenericFileUpload(0)) + stSetStatus(200, "File successfully uploaded."); break; case "randomize":