|
@@ 195-202 (lines=8) @@
|
| 192 |
|
* saveImage function |
| 193 |
|
* @param $values |
| 194 |
|
*/ |
| 195 |
|
public function saveImage($values) |
| 196 |
|
{ |
| 197 |
|
$myts = \MyTextSanitizer::getInstance(); |
| 198 |
|
$sql = 'INSERT INTO ' . $GLOBALS['xoopsDB']->prefix('smallworld_images') . ' VALUES (' . $values . ')'; |
| 199 |
|
$result = $GLOBALS['xoopsDB']->queryF($sql); |
| 200 |
|
|
| 201 |
|
return $result; |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
/** |
| 205 |
|
* DeleteImage function |
|
@@ 209-216 (lines=8) @@
|
| 206 |
|
* @param int $userid |
| 207 |
|
* @param string $imagename |
| 208 |
|
*/ |
| 209 |
|
public function deleteImage($userid, $imagename) |
| 210 |
|
{ |
| 211 |
|
$myts = \MyTextSanitizer::getInstance(); |
| 212 |
|
$sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('smallworld_images') . " WHERE imgname = '" . stripslashes($imagename) . "' AND userid='" . (int)$userid . "'"; |
| 213 |
|
$result = $GLOBALS['xoopsDB']->queryF($sql); |
| 214 |
|
|
| 215 |
|
return $result; |
| 216 |
|
} |
| 217 |
|
|
| 218 |
|
/** |
| 219 |
|
* handlePosts function |