Not Reviewed
Show More
Add another comment
| @@ -41,7 +41,8 if( $_POST ) { | |||||
|
|
41 | // get image type and target extension |
|
41 | // get image type and target extension |
|
|
42 | $imagedata = getimagesize($_FILES['comicFile']['tmp_name']); |
|
42 | $imagedata = getimagesize($_FILES['comicFile']['tmp_name']); |
|
|
43 | $strip->media = $imagedata[2]; |
|
43 | $strip->media = $imagedata[2]; |
|
|
44 | $fileext = $dbConnection->fetchColumn('SELECT extension FROM media_t WHERE id = ?', array($strip->media), array(PDO::PARAM_INT)); |
|
44 | $fileext = $dbConnection->fetchColumn('SELECT extension FROM media_t WHERE id = ?', array($strip->media), 0, array(PDO::PARAM_INT)); |
|
|
|
45 | var_dump($fileext); | ||
|
|
45 |
|
46 | ||
|
|
46 | if(strlen($fileext) < 3) |
|
47 | if(strlen($fileext) < 3) |
|
|
47 | { |
|
48 | { |
| @@ -22,8 +22,8 class Strip | |||||
|
|
22 | function insertstrip(&$strip) { |
|
22 | function insertstrip(&$strip) { |
|
|
23 | global $dbConnection; |
|
23 | global $dbConnection; |
|
|
24 |
|
24 | ||
|
|
25 |
$strip->book = ($strip->book == '') ? |
|
25 | $strip->book = ($strip->book == '') ? NULL : (int)$strip->book; |
|
|
26 |
$strip->page = ($strip->page == '') ? |
|
26 | $strip->page = ($strip->page == '') ? NULL : (int)$strip->page; |
|
|
27 |
|
27 | ||
|
|
28 | $dbConnection->beginTransaction(); |
|
28 | $dbConnection->beginTransaction(); |
|
|
29 | $newid = $dbConnection->fetchColumn('SELECT MAX(id) FROM strip') + 1; |
|
29 | $newid = $dbConnection->fetchColumn('SELECT MAX(id) FROM strip') + 1; |
Comments 0
You need to be logged in to leave comments.
Login now
