Guest User

Untitled

a guest
Dec 10th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 9.58 KB | None | 0 0
  1. <?php
  2. $_language->read_module('members');
  3.  
  4. eval("\$title_members = \"".gettemplate("title_members")."\";");
  5. echo $title_members;
  6.  
  7. if(isset($_GET['action'])) $action=$_GET['action'];
  8. else $action='';
  9.  
  10. if($action=="show") {
  11.     if(isset($_GET['squadID'])) {
  12.         $getsquad = 'WHERE squadID="'.$_GET['squadID'].'"';
  13.     }
  14.     else $getsquad = '';
  15.  
  16.     $ergebnis=safe_query("SELECT * FROM ".PREFIX."squads ".$getsquad." ORDER BY sort");
  17.     while($ds=mysql_fetch_array($ergebnis)) {
  18.  
  19.         $anzmembers=mysql_num_rows(safe_query("SELECT sqmID FROM ".PREFIX."squads_members WHERE squadID='".$ds['squadID']."'"));
  20.         $name='<b>'.$ds['name'].'</b>';
  21.         if($ds['icon']) $icon='<img src="images/squadicons/'.$ds['icon'].'" border="0" alt="'.htmlspecialchars($ds['name']).'" />';
  22.         else $icon='';
  23.         $info=htmloutput($ds['info']);
  24.         $squadID=$ds['squadID'];
  25.         $backlink=$_language->module['back_overview'];
  26.         $results='';
  27.         $awards='';
  28.         $challenge='';
  29.  
  30.         $border=BORDER;
  31.    
  32.     if($ds['gamesquad']) {
  33.                 $results='[ <a href="index.php?site=clanwars&action=showonly&id='.$squadID.'&sort=date&only=squad">'.$_language->module['results'].'</a>';
  34.                 $awards='| <a href="index.php?site=awards&action=showsquad&squadID='.$squadID.'&page=1">'.$_language->module['awards'].'</a>';
  35.                 $challenge='| <a href="index.php?site=challenge">'.$_language->module['challenge'].'</a> ]';
  36.             } else {
  37.                 $results='';
  38.                 $awards='';
  39.                 $challenge='';
  40.             }
  41.  
  42.         $member=safe_query("SELECT * FROM ".PREFIX."squads_members s, ".PREFIX."user u WHERE s.squadID='".$ds['squadID']."' AND s.userID = u.userID ORDER BY sort");
  43.        
  44.         if($anzmembers == 1) $anzmembers = $anzmembers.' '.$_language->module['member'];
  45.         else $anzmembers = $anzmembers.' '.$_language->module['members'];
  46.        
  47.         eval ("\$members_details_head = \"".gettemplate("members_details_head")."\";");
  48.         echo $members_details_head;
  49.  
  50.         $i=1;
  51.         while($dm=mysql_fetch_array($member)) {
  52.  
  53.             if($i%2) {
  54.                 $bg1=BG_1;
  55.                 $bg2=BG_2;
  56.             }
  57.             else {
  58.                 $bg1=BG_3;
  59.                 $bg2=BG_4;
  60.             }
  61.  
  62.             $country = '[flag]'.$dm['country'].'[/flag]';
  63.             $country = flags($country);
  64.             $nickname = '<a href="index.php?site=profile&id='.$dm['userID'].'"><b>'.strip_tags(stripslashes($dm['nickname'])).'</b></a>';
  65.             $nicknamee = strip_tags(stripslashes($dm['nickname']));
  66.             $profilid = $dm['userID'];
  67.  
  68.             if($dm['userdescription']) $userdescription=htmloutput($dm['userdescription']);
  69.             else $userdescription=$_language->module['no_description'];
  70.  
  71.             if (file_exists("images/userpics/".$profilid.".jpg"))
  72.             {
  73.                 $userpic = $profilid.".jpg";
  74.                 $pic_info = $dm['nickname']." userpicture";
  75.             }
  76.             elseif (file_exists("images/userpics/".$profilid.".gif"))
  77.             {
  78.                 $userpic = $profilid.".gif";
  79.                 $pic_info = $dm['nickname']." userpicture";
  80.             }
  81.             else
  82.             {
  83.                 $userpic = "nouserpic.gif";
  84.                 $pic_info = "no userpic available!";
  85.             }
  86.  
  87.             $icq = $dm['icq'];
  88.             if(getemailhide($dm['userID'])) $email = '';
  89.             else $email = '<a href="mailto:'.mail_protect($dm['email']).'"><img src="images/icons/email.gif" border="0" width="15" height="11" alt="email" /></a>';
  90.             $emaill = $dm['email'];
  91.  
  92.             $pm = '';
  93.             $buddy = '';
  94.             if ($loggedin && $dm['userID'] != $userID)
  95.             {
  96.                 $pm='<a href="index.php?site=messenger&action=touser&touser='.$dm['userID'].'"><img src="images/icons/pm.gif" border="0" width="12" height="13" alt="messenger" /></a>';
  97.  
  98.                 if (isignored($userID, $dm['userID'])) $buddy='<a href="buddys.php?action=readd&id='.$dm['userID'].'&userID='.$userID.'"><img src="images/icons/buddy_readd.gif" width="16" height="16" border="0" alt="back to buddy-list" /></a>';
  99.                 elseif(isbuddy($userID, $dm['userID'])) $buddy='<a href="buddys.php?action=ignore&id='.$dm['userID'].'&userID='.$userID.'"><img src="images/icons/buddy_ignore.gif" width="16" height="16" border="0" alt="ignore user" /></a>';
  100.                 elseif($userID==$dm['userID']) $buddy="";
  101.                 else $buddy='<a href="buddys.php?action=add&id='.$dm['userID'].'&userID='.$userID.'"><img src="images/icons/buddy_add.gif" width="16" height="16" border="0" alt="add to buddylist" /></a>';
  102.             }
  103.  
  104.             if (isonline($dm['userID'])=="offline") $statuspic='<img src="images/icons/offline.gif" width="7" height="7" alt="offline" />';
  105.             else $statuspic='<img src="images/icons/online.gif" width="7" height="7" alt="online" />';
  106.  
  107.             $position=$dm['position'];
  108.             $firstname=strip_tags($dm['firstname']);
  109.             $lastname=strip_tags($dm['lastname']);
  110.             $town=strip_tags($dm['town']);
  111.             if($dm['activity']) $activity='<font color="'.$wincolor.'">'.$_language->module['active'].'</font>';
  112.             else $activity='<font color="'.$loosecolor.'">'.$_language->module['inactive'].'</font>';
  113.  
  114.             eval ("\$members_details_content = \"".gettemplate("members_details_content")."\";");
  115.             echo $members_details_content;
  116.             $i++;
  117.         }
  118.         eval ("\$members_details_foot = \"".gettemplate("members_details_foot")."\";");
  119.         echo $members_details_foot;
  120.     }
  121. }
  122.  
  123. else {
  124.     if(isset($_POST['squadID'])) {
  125.         $onesquadonly = 'WHERE squadID="'.$_POST['squadID'].'"';
  126.         $visible="block";
  127.     } elseif(isset($_GET['squadID'])) {
  128.         $onesquadonly = 'WHERE squadID="'.$_GET['squadID'].'"';
  129.         $visible="block";
  130.     } else {
  131.         $visible="none";
  132.         $onesquadonly='';
  133.     }
  134.  
  135.     $ergebnis=safe_query("SELECT * FROM ".PREFIX."squads ".$onesquadonly." ORDER BY sort");
  136.     if(mysql_num_rows($ergebnis)) {
  137.         while($ds=mysql_fetch_array($ergebnis)) {
  138.             $anzmembers=mysql_num_rows(safe_query("SELECT sqmID FROM ".PREFIX."squads_members WHERE squadID='".$ds['squadID']."'"));
  139.             $name='<a href="index.php?site=members&action=show&squadID='.$ds['squadID'].'"><b>'.$ds['name'].'</b></a>';
  140.  
  141.             if($ds['icon']) $icon='<img src="images/squadicons/'.$ds['icon'].'" border="0" alt="'.htmlspecialchars($ds['name']).'" />';
  142.             else $icon='';
  143.  
  144.             $info=htmloutput($ds['info']);
  145.             $squadID=$ds['squadID'];
  146.             $details=str_replace('%squadID%', $squadID, $_language->module['show_details']);
  147.  
  148.             if($ds['gamesquad']) {
  149.                 $results='[ <a href="index.php?site=clanwars&action=showonly&id='.$squadID.'&sort=date&only=squad">'.$_language->module['results'].'</a>';
  150.                 $awards='| <a href="index.php?site=awards&action=showsquad&squadID='.$squadID.'&page=1">'.$_language->module['awards'].'</a>';
  151.                 $challenge='| <a href="index.php?site=challenge">'.$_language->module['challenge'].'</a> ]';
  152.             } else {
  153.                 $results='';
  154.                 $awards='';
  155.                 $challenge='';
  156.             }
  157.  
  158.             $bgcat=BGCAT;
  159.            
  160.             if($anzmembers == 1) $anzmembers = $anzmembers.' '.$_language->module['member'];
  161.             else $anzmembers = $anzmembers.' '.$_language->module['members'];
  162.            
  163.             eval ("\$members_head_head = \"".gettemplate("members_head_head")."\";");
  164.             echo $members_head_head;
  165.  
  166.  
  167.             $member=safe_query("SELECT * FROM ".PREFIX."squads_members s, ".PREFIX."user u WHERE s.squadID='".$ds['squadID']."' AND s.userID = u.userID ORDER BY sort");
  168.            
  169.       eval ("\$members_head = \"".gettemplate("members_head")."\";");
  170.             echo $members_head;
  171.  
  172.             $i=1;
  173.             while($dm=mysql_fetch_array($member)) {
  174.  
  175.                 if($i%2) {
  176.                     $bg1=BG_1;
  177.                     $bg2=BG_2;
  178.                 }
  179.                 else {
  180.                     $bg1=BG_3;
  181.                     $bg2=BG_4;
  182.                 }
  183.  
  184.                 $country = '[flag]'.$dm['country'].'[/flag]';
  185.                 $country = flags($country);
  186.                 $nickname = strip_tags(stripslashes($dm['nickname']));
  187.                 $profilid = $dm['userID'];
  188.  
  189.                 $icq = $dm['icq'];
  190.                 if(getemailhide($dm['userID'])) $email = '';
  191.                 else $email = '<a href="mailto:'.mail_protect($dm['email']).'"><img src="images/icons/email.gif" border="0" width="15" height="11" alt="email" /></a>';
  192.                 $emaill = $dm['email'];
  193.  
  194.                 $pm = '';
  195.                 $buddy = '';
  196.                 if ($loggedin && $dm['userID'] != $userID)
  197.                 {
  198.                     $pm='<a href="index.php?site=messenger&action=touser&touser='.$dm['userID'].'"><img src="images/icons/pm.gif" border="0" width="12" height="13" alt="messenger" /></a>';
  199.  
  200.                     if (isignored($userID, $dm['userID'])) $buddy='<a href="buddys.php?action=readd&id='.$dm['userID'].'&userID='.$userID.'"><img src="images/icons/buddy_readd.gif" width="16" height="16" border="0" alt="back to buddy-list" /></a>';
  201.                     elseif(isbuddy($userID, $dm['userID'])) $buddy='<a href="buddys.php?action=ignore&id='.$dm['userID'].'&userID='.$userID.'"><img src="images/icons/buddy_ignore.gif" width="16" height="16" border="0" alt="ignore user" /></a>';
  202.                     elseif($userID==$dm['userID']) $buddy="";
  203.                     else $buddy='<a href="buddys.php?action=add&id='.$dm['userID'].'&userID='.$userID.'"><img src="images/icons/buddy_add.gif" width="16" height="16" border="0" alt="add to buddylist" /></a>';
  204.                 }
  205.  
  206.                 if (isonline($dm['userID'])=="offline") $statuspic='<img src="images/icons/offline.gif" width="7" height="7" alt="offline" />';
  207.                 else $statuspic='<img src="images/icons/online.gif" width="7" height="7" alt="online" />';
  208.  
  209.                 $position=$dm['position'];
  210.                 $firstname=strip_tags($dm['firstname']);
  211.                 $lastname=strip_tags($dm['lastname']);
  212.                 $town=strip_tags($dm['town']);
  213.                 if($dm['activity']) $activity='<font color="'.$wincolor.'">'.$_language->module['active'].'</font>';
  214.                 else $activity='<font color="'.$loosecolor.'">'.$_language->module['inactive'].'</font>';
  215.  
  216.                 eval ("\$members_content = \"".gettemplate("members_content")."\";");
  217.                 echo $members_content;
  218.                 $i++;
  219.  
  220.             }
  221.       eval ("\$members_content_foot = \"".gettemplate("members_content_foot")."\";");
  222.       echo $members_content_foot;
  223.         }
  224.    
  225.         $ergebnis=safe_query("SELECT squadID, name FROM ".PREFIX."squads ORDER BY sort");
  226.         $squadlist = '';
  227.         while($ds=mysql_fetch_array($ergebnis)) {
  228.             $squadlist .= '<option value="'.$ds['squadID'].'">'.$ds['name'].'</option>';
  229.         }
  230.  
  231.         eval ("\$members_foot = \"".gettemplate("members_foot")."\";");
  232.         echo $members_foot;
  233.     }
  234.  
  235. }
  236. ?>
Add Comment
Please, Sign In to add comment