get('id'); $where = 'WHERE a.state <> -2'; // User Filter switch ($params->get( 'user_id' )) { case 'by_me': $where .= ' AND (created_by = ' . (int) $userId . ' OR modified_by = ' . (int) $userId . ')'; break; case 'not_me': $where .= ' AND (created_by <> ' . (int) $userId . ' AND modified_by <> ' . (int) $userId . ')'; break; } // Ordering switch ($params->get( 'ordering' )) { case 'm_dsc': $ordering = 'modified DESC, created DESC'; $dateProperty = 'modified'; break; case 'c_dsc': default: $ordering = 'created DESC'; $dateProperty = 'created'; break; } $query = 'SELECT a.id, a.sectionid, a.title, a.created, a.modified, u.name, a.created_by_alias, a.created_by' . ' FROM #__content AS a' . ' LEFT JOIN #__users AS u ON u.id = a.created_by' . ' '. $where . ' ORDER BY '. $ordering ; $db->setQuery( $query, 0, 10 ); $rows = $db->loadObjectList(); ?> id; if ( $user->authorize( 'administration', 'manage', 'components', 'com_users' ) ) { if ( $row->created_by_alias ) { $author = $row->created_by_alias; } else { $linkA = 'index.php?option=com_users&task=edit&cid[]='. $row->created_by; $author = ''. htmlspecialchars( $row->name, ENT_QUOTES, 'UTF-8' ) .''; } } else { if ( $row->created_by_alias ) { $author = $row->created_by_alias; } else { $author = htmlspecialchars( $row->name, ENT_QUOTES, 'UTF-8' ); } } ?>
title, ENT_QUOTES, 'UTF-8');?> $dateProperty, '%Y-%m-%d %H:%M:%S'); ?>