class/SwDatabase.php 1 location
|
@@ 445-451 (lines=7) @@
|
| 442 |
|
* @param int $userID |
| 443 |
|
* @return bool true on successful update |
| 444 |
|
*/ |
| 445 |
|
public function updateComplaint($userID) |
| 446 |
|
{ |
| 447 |
|
$sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('smallworld_admin') . ' SET complaint = complaint + 1 ' . "WHERE userid = '" . (int)$userID . "'"; |
| 448 |
|
$result = $GLOBALS['xoopsDB']->queryF($sql); |
| 449 |
|
|
| 450 |
|
return $result ? true : false; |
| 451 |
|
} |
| 452 |
|
|
| 453 |
|
/** |
| 454 |
|
* updateInspection function |
include/functions.php 1 location
|
@@ 666-672 (lines=7) @@
|
| 663 |
|
* |
| 664 |
|
* @return bool |
| 665 |
|
*/ |
| 666 |
|
function SmallworldDeleteOldInspects() |
| 667 |
|
{ |
| 668 |
|
$sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('smallworld_admin') . " SET inspect_start = '', inspect_stop = '' WHERE (inspect_start+inspect_stop) <= " . time() . ''; |
| 669 |
|
$result = $GLOBALS['xoopsDB']->queryF($sql); |
| 670 |
|
|
| 671 |
|
return ($result) ? true : false; |
| 672 |
|
} |
| 673 |
|
|
| 674 |
|
/** |
| 675 |
|
* Function to get sum of users in your following array |