Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ((!isset($_GET['sort'])) || ($_GET['sort'] == 'date_new')) {
- $sort = "user_registered DESC";
- } elseif ($_GET['sort'] == 'name') {
- $sort = "user_firstname ASC, user_lastname ASC";
- } elseif ($_GET['sort'] == 'date_old') {
- $sort = "user_registered ASC";
- } elseif ($_GET['sort'] == 'ort') {
- $sort = "location ASC, user_firstname ASC, user_lastname ASC";
- } elseif ($_GET['sort'] == 'land') {
- $sort = "country ASC, user_firstname ASC, user_lastname ASC";
- } elseif ($_GET['sort'] == 'comment') {
- $sort = "user_firstname ASC, user_lastname ASC";
- $ifcom = "AND your_thoughts_about_dubbing != ''";
- } else {
- $sort = "user_registered DESC";
- }
- $list_number = "50";
- if (!isset($_GET['p'])) {
- $p = 1;
- $_GET['p'] = 1;
- } else {
- $p = $_GET['p'];
- }
- $from = (($p * $list_number) - $list_number);
- echo 'Sortieren nach
- <a href="/de/liste?p='.$_GET['p'].'&sort=name">Name</a>,
- <a href="/de/liste?p='.$_GET['p'].'&sort=date_new">Datum</a>,
- <a href="/de/liste?p='.$_GET['p'].'&sort=ort">Ort</a>,
- oder
- <a href="/de/liste?p='.$_GET['p'].'&sort=land">Land</a>.
- ';
- $listed_count = mysql_num_rows(mysql_query("SELECT ID FROM wp_users"));
- echo $listed_count." Unterschriften.";
- echo '<br /><br /><ul class="liste">';
- $listed_sql = "SELECT ID, user_nicename from $wpdb->users WHERE display_name <> 'admin' ORDER BY ".$sort."
- LIMIT ".$from.", ".$list_number;
- $authors = $wpdb->get_results($listed_sql);
- foreach ($authors as $author) {
- $user_url = get_the_author_meta('user_url', $author->ID);
- $user_firstname = get_the_author_meta('user_firstname', $author->ID);
- $user_lastname = get_the_author_meta('user_lastname', $author->ID);
- $user_lastname = substr($user_lastname,0,1);
- $user_lastname = $user_lastname.".";
- $country = get_the_author_meta('country', $author->ID);
- $location = get_the_author_meta('location', $author->ID);
- $your_thoughts_about_dubbing = get_the_author_meta('your_thoughts_about_dubbing', $author->ID);
- echo "<li>
- <div class='user'>";
- #echo get_avatar($author->ID);
- if (!empty($user_url)) {
- echo '<a href="'.$user_url.'" target="_blank">';
- }
- echo $user_firstname.' '.$user_lastname;
- if (!empty($user_url)) {
- echo "</a>";
- }
- echo '</div>';
- echo '<div class="from"><img src="/wp-content/themes/against-dubbing/img/flags/'.$country.'.gif" class="flag" title="'.$country.'" alt="'.$country.'" /> '.$location.'</div>';
- echo '<div class="clear"></div>';
- if (!empty($your_thoughts_about_dubbing)) {
- echo "<div class='usercomment'>";
- echo $your_thoughts_about_dubbing;
- echo "</div>";
- }
- echo "</li>";
- }
- echo '</ul>';
- echo '<br />';
- if ($p > 1) {
- $prev = ($p - 1);
- echo "<div class='newer'><a href='/de/liste/".$prev."/".$_GET['sort']."'>« Zurück | </a></div>";
- }
- echo "Seiten ";
- for($i = 1; $i <= $pagecount; $i++){
- if(($p) == $i){
- echo " <strong>".$i."</strong> ";
- } else {
- echo " <a href='/de/liste/".$i."/".$_GET['sort']."'>".$i."</a> ";
- }
- }
- if ($p < $pagecount) {
- $next = ($p + 1);
- echo "<div class='older'><a href='/de/liste/".$next."/".$_GET['sort']."'> | Vor »</a></div>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement