// Get total num
if (isAdmin()) {
- // Load only active designs for user
- $num_themes = countSumTotalData('Y', 'themes', 'id', 'theme_active', true);
-} else {
// Load all themes for admin
$num_themes = countSumTotalData('', 'themes', 'id', '', true);
+} else {
+ // Load only active designs for user
+ $num_themes = countSumTotalData('Y', 'themes', 'id', 'theme_active', true);
}
$OUT = '';
function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatement = 'userid', $countRows = false, $add = '') {
$ret = 0;
//* DEBUG: */ outputHtml($search.'/'.$tableName.'/'.$lookFor.'/'.$whereStatement.'/'.$add.'<br />');
- if ((empty($search)) && ($search != 0)) {
+ if ((empty($search)) && ($search != '0')) {
// Count or sum whole table?
if ($countRows === true) {
// Count whole table