Fatal error: Call to undefined function usermenulist() in D:\xampp\xampp\htdocs\general\membersList.php on line 163

this is membersList.php

<?php
//-------------------------class MemberListHandler-------------------->>>
/*
 *
 * @category
 * @package		Members
 * @author 		vijayanand39ag05
 * @copyright	
 * @license		
 * @version		Release: @package_version@
 * @since 		2006-05-01
 */
class MemberListHandler extends MediaHandler
	{
		private $showPageNavigationLinks = false;
		private $browseTitle = '';
		public $relatedTags  = array();
		public $currentPageUrl = '';
		
		public function makeGlobalize($cfg=array(), $lang=array())
			{
				parent::makeGlobalize($cfg, $lang);
				$url = getUrl($this->CFG['admin']['profile_urls']['members_list']['normal'], $this->CFG['admin']['profile_urls']['members_list']['htaccess']);
				$this->tagListUrl = $url;
				$this->setPageUrl($url);
			}
		
		public function setPageUrl($url)
			{
				$this->currentPageUrl = $url;
			}
		
		public function getPageUrl()
			{
				return $this->currentPageUrl;
			}	
			
		public function getUserProfileTagSet($tags = '', $query_tag='')
			{
				$url = $this->tagListUrl;
				if(empty($tags))
					{
?>

&nbsp;
<?php					
						return false;
					}
				if ($tags = $this->_parse_tags($tags)) 
				    {
				        foreach($tags as $key=>$value)
							{
							$value = strtolower($value);
							if (!in_array($value, $query_tag) AND !in_array($value, $this->relatedTags)) 
							    {
									$this->relatedTags[] = $value;									        
							    }
				?>
<a href="<?php echo $url;?>?tags=<?php echo $value;?>" ><?php echo $value;?></a>
<?php	
							}
				    }
			}
		
		public function getCurrentUserOnlineStatus($privacy='', $status_msg_id='')
			{
				$currentStatus = $this->LANG['members_list_online_status_default'];
				$Online = $Offline = $Custom = false;
				if ($privacy) 
				    {
				        $$privacy = true;
				    }
				if ($Online) 
				    {
						$currentStatus = $this->LANG['members_list_online_status_online'];				     	   
				    }
				elseif($Offline)	
					{
						$currentStatus = $this->LANG['members_list_online_status_offline'];
					}
				elseif($Custom AND $status_msg_id)
					{
						$sql = 'SELECT message FROM '.$this->CFG['db']['tbl']['users_status_messages'].' WHERE status_msg_id='.$this->dbObj->Param($status_msg_id);
						// prepare sql
						$stmt = $this->dbObj->Prepare($sql);
						// execute sql
						$rs = $this->dbObj->Execute($stmt, array($status_msg_id));
						//raise user error... fatal
						if (!$rs)
						trigger_error($this->dbObj->ErrorNo().' '.$this->dbObj->ErrorMsg(), E_USER_ERROR);
						if ($rs->PO_RecordCount())
							{
								$row = $rs->FetchRow();
								$currentStatus = $row['message'];
								$rs->Free();
						    }
					}
				return $currentStatus;	
			}
		
        /**
        * Displays all members with their profile icon
        * 
        * @return void
		* @access public
        **/
		public function displayMembers()
			{
				$usersPerRow = $this->CFG['admin']['members_list']['cols'];
				$count = 0;
				$found = false;
				$rayzz = new RayzzHandler($this->dbObj, $this->CFG);
				$browse = $this->getFormField('browse');
				$tagSearch = $this->getFormField('tags');
				$tagSearch = (!empty($tagSearch));
				$listDetails =  ((strcmp($browse, 'viewAllMembers')==0) OR $tagSearch);
				$friendsCount = (strcmp($browse, 'maleMostFriends')==0 OR strcmp($browse, 'femaleMostFriends')==0);
				$profileHits  = (strcmp($browse, 'maleMostViewed')==0 OR strcmp($browse, 'femaleMostViewed')==0);
				
				$photoCount = chkAllowedModule(array('photo'));
				$videoCount = chkAllowedModule(array('video'));
				$musicCount = chkAllowedModule(array('music'));
				$showVideoIcon = $this->CFG['admin']['members_listing']['video_icon'];
				$query_tag = $this->_parse_tags(strtolower($this->fields_arr['tags']));
				$showOnlineIcon = $this->CFG['admin']['members_listing']['online_icon'];
				$showOnlineStatus = $this->CFG['admin']['members_listing']['online_status'];
				$rank = $this->fields_arr['start']+1;
				while($row = $this->fetchResultRecord())
				    {
					$found = true;
					$memberProfileUrl = getMemberProfileUrl($row['user_id'], $row['user_name']);
					$joined = 0;
					$profileIcon = $rayzz->getProfileIconDetails($row['icon_id'], $row['icon_type'], $row['sex']);
					$online = $this->CFG['admin']['members']['offline_anchor_attributes'];
					$currentStatus = $this->LANG['members_list_offline_status_default'];
					$onlineStatusClass = 'memListUserStatusOffline';
					if ($showOnlineIcon AND $row['logged_in_currently']) 
					    {
					        $currentStatus = $this->getCurrentUserOnlineStatus($row['privacy'], $row['status_msg_id']);
							$onlineAnchorAttr = $this->CFG['admin']['members']['online_anchor_attributes'];
							$online = str_replace('{online_status}', $currentStatus, $onlineAnchorAttr);
							$onlineStatusClass = 'memListUserStatusOnline';
					    }
					if ($count%$usersPerRow==0) 
					    {
				?>
<tr>
  <?php						        
					    }
					$videoLink = '';	
					if ($showVideoIcon AND $videoCount AND ($row['total_videos']>0)) 
					    {
							$title = sprintf($this->CFG['admin']['members']['video_icon_title'], $row['total_videos']);
							$videoListUrl = getUrl('videoList.php?pg=uservideolist&user_id='.$row['user_id'], 'videolist/uservideolist/?user_id='.$row['user_id']);							
					     	$videoLink = '&nbsp;<a class="videoIcon" href="'.$videoListUrl.'" title="'.$title.'"><img src="'.$this->CFG['admin']['members']['video_icon'].'" /></a>';   
					    }	
						
				?>
  <td id="selPhotoGallery"><p id="selMemberName"><a href="<?php echo $memberProfileUrl;?>" <?php echo $online;?>><?php echo $row['user_name'];?></a><?php echo $videoLink;?></p>
    <p id="selImageBorder">
	<p class="clsUserMenuContainer" id="selMemberName">
	<a href="<?php echo $memberProfileUrl;?>"><img src="<?php echo $profileIcon['t_url'];?>" alt="<?php echo $row['user_name'];?>" title="<?php echo $row['user_name'];?>" <?php echo $profileIcon['t_attribute'];?> /></a>
	<?php userMenuList($row); ?>
	</p>
	</p>
    <?php
if ($showOnlineStatus) 
    {
?>
    <p><span class="<?php echo $onlineStatusClass;?>"><?php echo $currentStatus;?></span></p>
    <?php        
    }
?>
    <?php
		if ($listDetails) 
		    {
?>
    <p><?php echo $this->LANG['profile_list_joined'];?>&nbsp;:&nbsp;<?php echo $row['doj'];?></p>
    <?php
if ($videoCount) 
    {
?>
    <p><?php echo $this->LANG['profile_list_videos'];?>&nbsp;:&nbsp;<?php echo $row['total_videos'];?></p>
    <?php        
    }
?>
<?php
if ($musicCount) 
    {
?>
    <p><?php echo $this->LANG['profile_list_musics'];?>&nbsp;:&nbsp;<?php echo $row['total_musics'];?></p>
    <?php        
    }
?>

    <?php
if ($photoCount) 
    {
?>
    <p><?php echo $this->LANG['profile_list_photos'];?>&nbsp;:&nbsp;<?php echo $row['total_photos'];?></p>
    <?php        
    }
?>
    <?php
		    }
		if ($profileHits) 
		    {
?>
    <p><?php echo $this->LANG['profile_list_profile_hits'];?>&nbsp;:&nbsp;<?php echo $row['profile_hits'];?></p>
    <?php		        
		    }
$mailComposeUrl = getUrl($this->CFG['admin']['mail_urls']['compose']['normal'], $this->CFG['admin']['mail_urls']['compose']['htaccess'], false);
$friendAddUrl = getUrl($this->CFG['admin']['profile_urls']['add_as_friend']['normal'], $this->CFG['admin']['profile_urls']['add_as_friend']['htaccess'], false);
?>
    <ul id="selMemDetails">
      <li id="selSendMsg"><a href="<?php echo $this->CFG['site']['url'];?>members/<?php echo $mailComposeUrl;?>?mcomp=<?php echo $row['user_name'];?>"><?php echo $this->LANG['member_list_send_message'];?></a></li>
      <li id="selAddFriend"><a href="<?php echo $this->CFG['site']['url'];?>members/<?php echo $friendAddUrl;?>?friend=<?php echo $row['user_id'];?>"><?php echo $this->LANG['member_list_add_friend'];?></a></li>
      <?php	if ($friendsCount) 
		    {
?>
      <li id="selFriendCount"><?php echo $this->LANG['profile_list_friends'];?>&nbsp;:&nbsp;<?php echo $row['total_friends'];?></li>
      <?php		        
		    }
?>
	</ul>
<?php
		if($this->fields_arr['browse']=='mostActiveUsers' and chkAllowedModule(array('video')))
			{
?>
     <p><?php echo $this->LANG['profile_list_rank'];?>&nbsp;:&nbsp;<?php echo $rank;?></p>
	 <p><?php echo $this->LANG['profile_list_videos'];?>&nbsp;:&nbsp;<?php echo $row['total_videos'];?></p>
	 <p><?php echo $this->LANG['profile_list_total_views'];?>&nbsp;:&nbsp;<?php echo $row['total_view'];?></p>
	 <p><?php echo $this->LANG['profile_list_percentage'];?>&nbsp;:&nbsp;<?php echo round($row['percentage'], 2);?>%</p>
<?php
				$rank++;
			}
		if($this->fields_arr['browse']=='viewedusers')
			{
			$total_viewed_str=str_replace('{total_views}', $row['total_views'], $this->LANG['members_profile_hits_msg']);
?>			
	<p><?php echo $total_viewed_str;?></p>			
<?php
			}			
?>
    <p>
      <?php 	  
$this->getUserProfileTagSet($row['profile_tags'], $query_tag);
?>
    </p></td>
  <?php
					$count++;
					if ($count%$usersPerRow==0) 
					    {
						$count = 0;
					?>
</tr>
<?php        
					    }
					?>
<?php	    
				    } // while	
					if ($found and $count and $count<$usersPerRow) 
					    {
					?>
<td colspan="<?php echo ($usersPerRow-$count);?>">&nbsp;</td>
</tr>
<?php							
					    }
			}
		public function buildSortQuery()
			{
				//$this->sql_sort .= ',doj DESC ';
			}
		
		public function getMostViewedExtraQuery()
			{
				/*action*/
				//1 = today
				//2 = yesterday
				//3 = this week
				//4 = this month
				//5 = this year
				$extra_query = '';
				switch($this->fields_arr['action'])
					{
						case 1:
							$extra_query = ' AND DATE_FORMAT(vv.view_date,\'%d-%m-%y\')=DATE_FORMAT(NOW(),\'%d-%m-%y\')';
							break;
							
						case 2:
							$extra_query = ' AND DATE_FORMAT(vv.view_date,\'%d-%m-%y\')=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 DAY),\'%d-%m-%y\')';
							break;
						
						case 3:
							$extra_query = ' AND DATE_FORMAT(vv.view_date,\'%u-%y\')=DATE_FORMAT(NOW(),\'%u-%y\')';
							break;
						
						case 4:
							$extra_query = ' AND DATE_FORMAT(vv.view_date,\'%m-%y\')=DATE_FORMAT(NOW(),\'%m-%y\')';
							break;
						
						case 5:
							$extra_query = ' AND DATE_FORMAT(vv.view_date,\'%y\')=DATE_FORMAT(NOW(),\'%y\')';
							break;
					}
				return $extra_query;
			}
		
		public function getTotalViews()
			{
				//return 1000;
				$sql = 'SELECT COUNT(*) AS total_views FROM '.$this->CFG['db']['tbl']['video_viewed'].' AS vv WHERE 1'.$this->getMostViewedExtraQuery();
				
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt);
				    if (!$rs)
					    trigger_error($this->dbObj->ErrorNo().' '.$this->dbObj->ErrorMsg(), E_USER_ERROR);
				
				if($row = $rs->FetchRow())				
					return $row['total_views'];
					
				return 0;
			}

		public function getTotalGuestViews()
			{
				//return 1000;
				$sql = 'SELECT total_views FROM '.$this->CFG['db']['tbl']['users_views'].' AS vv WHERE user_id=\''.$this->fields_arr['user_id'].'\' AND viewed_user_id=\'0\' ';
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt);
				    if (!$rs)
					    trigger_error($this->dbObj->ErrorNo().' '.$this->dbObj->ErrorMsg(), E_USER_ERROR);
				if($row = $rs->FetchRow())				
					return $row['total_views'];

				return 0;
			}			
		
		public function buildConditionQuery()
			{
				/*$myFriends = $this->getMyFriends();
				array_push($myFriends, $this->CFG['user']['user_id']);
				sort($myFriends);
				$avoid = implode(',', $myFriends);
				$this->sql_condition = 'usr_status=\'Ok\' AND user_id NOT IN ('.$avoid.') ';*/
				$this->sql_condition = 'usr_status=\'Ok\' ';
				$this->sql_sort = '';
				$browse  = $this->getFormField('browse');
				$browseOptions = array('maleMostFriends', 'femaleMostFriends', 'maleMostViewed', 'femaleMostViewed');				
				
				if (strcmp($browse, 'maleMostFriends') == 0 ) 
				    {
				        $this->sql_condition .= ' AND sex=\'male\' AND total_friends > 0';
						$this->sql_sort = '  total_friends DESC, doj DESC ';
						$this->browseTitle = $this->LANG['members_title_nav_male_most_friends'];
				    }
				else if (strcmp($browse, 'femaleMostFriends') == 0 ) 
				         {
					        $this->sql_condition .= ' AND sex=\'female\' AND total_friends > 0';
							$this->sql_sort .= ' total_friends DESC ';
							$this->browseTitle = $this->LANG['members_title_nav_female_most_friends'];							
				         }
				else if (strcmp($browse, 'maleMostViewed') == 0 ) 
				         {
					        $this->sql_condition .= ' AND sex=\'male\' AND profile_hits > 0  ';
							$this->sql_sort = ' profile_hits DESC, doj DESC ';
							$this->browseTitle = $this->LANG['members_title_nav_male_most_viewed'];
				         }
				else if( strcmp($browse, 'femaleMostViewed') == 0 ) 
				         {
					        $this->sql_condition .= ' AND sex=\'female\' AND profile_hits > 0 ';
							$this->sql_sort = ' profile_hits DESC, doj DESC ';
							$this->browseTitle = $this->LANG['members_title_nav_female_most_viewed'];
				         }
				else if( strcmp($browse, 'recentMembers') == 0 ) 
				         {
//					        $this->sql_condition .= ' AND DATE_FORMAT(doj, \'%Y-%m-%d\') >= DATE_SUB(\''.gmdate("Y-m-d").'\', INTERVAL 7 DAY) ';
							$this->sql_condition .= '';
							$this->sql_sort = ' user_id DESC ';
							$this->browseTitle = $this->LANG['members_title_nav_recent_members'];
				         }
				else if( strcmp($browse, 'onlineMembers') == 0 ) 
				         {
					        $this->sql_condition .= ' AND (logged_in=\'1\'  AND DATE_SUB(NOW(), INTERVAL 20 SECOND) < last_active) ';
							$this->sql_sort = ' user_id DESC ';
							$this->browseTitle = $this->LANG['members_title_nav_online_members'];
							$this->showPageNavigationLinks = true;
				         }
				else if( strcmp($browse, 'mostActiveUsers') == 0 )
						{
							$total_views = $this->getTotalViews();
							$this->setTableNames(array($this->CFG['db']['tbl']['video_viewed'].' AS vv LEFT JOIN '.$this->CFG['db']['tbl']['users'].' AS u ON u.user_id=vv.video_owner_id'));
							$this->setReturnColumns(array('u.user_id', 'u.user_name', 'total_videos', 'total_musics', 'total_photos', 'icon_id', 'icon_type','doj', 'profile_hits', 'total_friends', 'logged_in', 'logged_in_currently', 'privacy', 'status_msg_id','sex', 'tag_match', 'profile_tags', 'COUNT(*) AS total_view', 'video_owner_id', 'COUNT(*)/'.$total_views.'*100 AS percentage'));
							$this->sql_condition = 'usr_status=\'Ok\''.$this->getMostViewedExtraQuery().' GROUP BY video_owner_id';
							$this->sql_sort = 'percentage DESC';
							$this->browseTitle = $this->LANG['members_title_most_active_users'];
							$this->showPageNavigationLinks = true;
						}
				else if( strcmp($browse, 'viewedusers') == 0 and $this->fields_arr['user_id'])
						{
							$total_views = $this->getTotalViews();
							$this->setTableNames(array($this->CFG['db']['tbl']['users_views'].' AS vv LEFT JOIN '.$this->CFG['db']['tbl']['users'].' AS u ON u.user_id=vv.viewed_user_id'));
							$this->setReturnColumns(array('u.user_id', 'u.user_name', 'u.total_videos', 'vv.total_views', 'vv.user_id curr_user_id', 'last_viewed_date', 'total_musics', 'total_photos', 'icon_id', 'icon_type','doj', 'profile_hits', 'total_friends', 'logged_in', 'logged_in_currently', 'privacy', 'status_msg_id','sex', 'tag_match', 'profile_tags', 'COUNT(*) AS total_view', 'COUNT(*)/'.$total_views.'*100 AS percentage'));
							$this->sql_condition = 'usr_status=\'Ok\' AND vv.user_id=\''.$this->fields_arr['user_id'].'\' '.$this->getMostViewedExtraQuery().' GROUP BY vv.user_id ';
							$this->sql_sort = ' total_views DESC ';
							$this->browseTitle = str_replace('{user_name}',$this->user_name,$this->LANG['members_profile_hits_list_members']);
							if($this->fields_arr['user_id']==$this->CFG['user']['user_id'])
								$this->browseTitle = str_replace('{user_name}',$this->LANG['members_profile_hits_list_members_your_msg'],$this->LANG['members_profile_hits_list_members']);															
							if($total_guest_views=$this->getTotalGuestViews())
								$this->browseTitle .= '<p>'.$total_guest_views.' '.$this->LANG['members_profile_hits_list_nt_logged_users'].'</p>';	
							$this->showPageNavigationLinks = true;
						}
						
				else if( strcmp($browse, 'referrals') == 0  and $this->isMember())
						{
							$this->sql_condition .= ' AND referrer_id=\''.$this->CFG['user']['user_id'].'\'';
							$this->sql_sort = ' user_id DESC ';
							$this->browseTitle = $this->LANG['members_title_nav_referrals'];							
						}
				else
						{
							$this->sql_condition .= '';
							//$this->sql_sort .= ' doj DESC ';
							$this->browseTitle = $this->LANG['members_nav_list_members'];
							$this->showPageNavigationLinks = true;
							$this->setIndirectFormField('browse', 'viewAllMembers');
	//						Redirect2URL('membersList.php');
						}
			}	
			
		public function getDurationSelectionOption()
			{
  				$doj = '%s';
				$durOption = array('YEAR', 'MONTH', 'WEEK', 'DAY', 'HOUR', 'MINUTE', 'SECOND');
  				for ($i=0; $i<sizeof($durOption); $i++)
  					{
  						$option  = 'IF (TIMESTAMPDIFF('.$durOption[$i].',doj, NOW())>0,CONCAT( TIMESTAMPDIFF('.$durOption[$i].',doj, NOW())," '.$durOption[$i].'"),%s)';
  						$doj = sprintf($doj, $option);
  					}
  				$doj = sprintf($doj, 0);
			die($doj);				//Check it out..
			}
		
		public function getMyFriends()
			{
				$currentUserId = $this->CFG['user']['user_id'];
				$friends = array();
				if ($currentUserId) 
				    {
						$sql = 'SELECT IF (owner_id='.$this->dbObj->Param($currentUserId).', friend_id, owner_id) as myFriend FROM '.$this->CFG['db']['tbl']['friends_list'].' WHERE (owner_id='.$this->dbObj->Param($currentUserId).' OR friend_id='.$this->dbObj->Param($currentUserId).')';
						// prepare sql
						$stmt = $this->dbObj->Prepare($sql);
						// execute sql
						$rs = $this->dbObj->Execute($stmt, array($currentUserId, $currentUserId, $currentUserId));
						//raise user error... fatal
						if (!$rs)
							trigger_error($this->dbObj->ErrorNo().' '.$this->dbObj->ErrorMsg(), E_USER_ERROR);
						
							if ($rs->PO_RecordCount())
								{
						//          $row = $rs->FetchRow();
						    		while($row = $rs->FetchRow())
									    {
											$friends[] = $row['myFriend'];
									    } // while
								}
				    }
				return $friends;
			}	
			
		public function buildTagSearchQuery()
			{
				/*$myFriends = $this->getMyFriends();
				array_push($myFriends, $this->CFG['user']['user_id']);
				sort($myFriends);
				$avoid = implode(',', $myFriends);
				$this->sql_condition = 'user_id NOT IN ('.$avoid.') ';*/
				$this->sql_condition = 'usr_status=\'Ok\'';
				$this->sql_sort = '';

				if (!$this->isEmpty($this->fields_arr['tags'])) 
				    {
						$this->sql_condition .= ' AND ('.getSearchRegularExpressionQuery($this->fields_arr['tags'], 'profile_tags', '').') OR (user_name LIKE \'%'.addslashes($this->fields_arr['tags']).'%\')';						
						$this->linkFieldsArray[] = 'tags';
				    }
				$this->browseTitle = $this->LANG['members_title_tag_search'];
			}
			
		public function getPageTitle()
			{
				return $this->browseTitle;
			}
			
		public function isAllowNavigationLinks()
			{
				return ($this->showPageNavigationLinks);
			}
			
		public function isEmpty($value)
			{
				$is_not_empty = is_string($value)?trim($value)=='':empty($value);
				return $is_not_empty;
			}
			
		public function _parse_tags($tag_string) {
				$newwords = array();
				$tag_string = trim($tag_string);
				
				if ($tag_string == '') {
					// If the tag string is empty, return the empty set.
					return $newwords;
				}
				# Perform tag parsing
				if(get_magic_quotes_gpc()) {
					$query = stripslashes(trim($tag_string));
				} else {
					$query = trim($tag_string);
				}
				$words = preg_split('/(")/', $query,-1,PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE);

				$delim = 0;
				foreach ($words as $key => $word)
				{
					if ($word == '"') {
						$delim++;
						continue;
					}
					
					if (($delim % 2 == 1) && $words[$key - 1] == '"') {
						if((strlen($word)<$this->CFG['admin']['tag_minimum_size']) or (strlen($word)>$this->CFG['admin']['tag_maximum_size']))						
						    {
						        continue;
						    }
						$newwords[] = $word;
					} else {
						if((strlen($word)<$this->CFG['admin']['tag_minimum_size']) or (strlen($word)>$this->CFG['admin']['tag_maximum_size']))
						    {
						        continue;
						    }
						$newwords = array_merge($newwords, preg_split('/\s+/', $word, -1, PREG_SPLIT_NO_EMPTY));
					}
				}
				if ($newwords) 
				    {
						$temp = array();
				        foreach($newwords as $key=>$value)
							{	
								if (strlen($value)>3) 
								    {
										$temp[] = $value;								        
								    }

							}
						$newwords = $temp;
				    }
				return $newwords;
			}
			
		
		public function showRelatedTags()
			{
			$relatedTags = $this->relatedTags;
			$url = $this->tagListUrl;
				if (is_array($relatedTags) and $relatedTags ) 
				    {
?>
<div id="selRelatedTags"> <span><?php echo $this->LANG['members_list_related_tags'];?>&nbsp;&nbsp;:&nbsp;&nbsp;</span>
  <?php					
				        foreach($relatedTags as $key=>$value)
							{
							if((strlen($value)<$this->CFG['admin']['tag_minimum_size']) or (strlen($value)>$this->CFG['admin']['tag_maximum_size']))
							    {
							        continue;
							    }
?>
  <span><a href="<?php echo $url;?>?tags=<?php echo $value;?>" ><?php echo $value;?></a></span>
  <?php							
							}
?>
</div>
<?php							
				    }
			}
		
		public function chkIsValidUser($user_id='')
			{
				$sql = 'SELECT user_name FROM '.$this->CFG['db']['tbl']['users'].' WHERE user_id='.$this->dbObj->Param($user_id).' AND usr_status=\'Ok\' ';
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($user_id));
				if (!$rs)
					trigger_error($this->dbObj->ErrorNo().' '.$this->dbObj->ErrorMsg(), E_USER_ERROR);
				$row = array();
				$this->isValidUser = ($rs->PO_RecordCount() > 0);
	    		if($row = $rs->FetchRow())	
					$this->user_name=$row['user_name'];
				return $this->isValidUser;
			}					
			
	}
//<<<<<---------------class MemberListHandler------///
//--------------------Code begins-------------->>>>>//
$memberList = new MemberListHandler();
$browseOptions = array('maleMostFriends', 'femaleMostFriends', 'maleMostViewed', 'femaleMostViewed', 'recentMembers', 'onlineMembers');
$memberList->setPageBlockNames(array('msg_form_info', 'form_list_members'));
$memberList->setCSSFormFieldErrorTipClass('clsFormFieldErrTip');
$memberList->setCSSFormLabelCellDefaultClass('clsFormLabelCellDefault');
$memberList->setCSSFormFieldCellDefaultClass('clsFormFieldCellDefault');
$memberList->setCSSFormLabelCellErrorClass('clsFormLabelCellError');
$memberList->setCSSFormFieldCellErrorClass('clsFormFieldCellError');
// To set the DB object
$memberList->setDBObject($db);
$memberList->makeGlobalize($CFG, $LANG);
$memberList->setFormField('user_id', $CFG['user']['user_id']);

$memberList->setFormField('numpg', $CFG['data_tbl']['numpg']);
//$memberList->setFormField('numpg', 2);
$memberList->setFormField('start', '0');

$memberList->setCSSColumnHeaderCellAscSortClasses(array('clsColumnHeaderCellAscSort1', 
																		'clsColumnHeaderCellAscSort2',
																		'clsColumnHeaderCellAscSort3',
																		'clsColumnHeaderCellAscSort4',
																		'clsColumnHeaderCellAscSort5')
																);
$memberList->setCSSColumnHeaderCellDefaultClass('clsColumnHeaderCellDefault');
$memberList->setCSSColumnHeaderCellDescSortClasses(array('clsColumnHeaderCellDscSort1', 
													'clsColumnHeaderCellDscSort2',
													'clsColumnHeaderCellDscSort3',
													'clsColumnHeaderCellDscSort4',
													'clsColumnHeaderCellDscSort5')
											);
$memberList->setCSSAlternativeRowClasses($CFG['data_tbl']['css_alternative_row_classes']);
$memberList->setMinRecordSelectLimit(2);
$memberList->setMaxRecordSelectLimit($CFG['data_tbl']['max_record_select_limit']);
$memberList->setNumPerPageListArr($CFG['data_tbl']['numperpage_list_arr']);
$memberList->setTableNames(array($CFG['db']['tbl']['users']));
$memberList->setReturnColumns(array('user_id', 'user_name', 'total_videos', 'total_musics', 'total_photos', 'icon_id', 'icon_type','doj', 'profile_hits', 'total_friends', 'logged_in', 'logged_in_currently', 'privacy', 'status_msg_id','sex', 'tag_match', 'profile_tags'));
$memberList->setFormField('browse', '');
$memberList->setFormField('user_id', '');
$memberList->setFormField('tags', '');
$memberList->setFormField('action', '');
$showRelatedTags = false;
$validuser = true;

if ($memberList->isPageGETed($_GET, 'browse') OR $memberList->isPageGETed($_GET, 'start') OR $memberList->isPageGETed($_GET, 'tags')) 
    {
    	$memberList->sanitizeFormInputs($_GET);
    }

if($memberList->getFormField('browse')=='viewedusers')
	 $validuser=$memberList->chkIsValidUser($memberList->getFormField('user_id'));
	 
if($validuser)
	{				   

$memberList->setReturnColumnsAliases(array(
			'logged_in_currently'		=> '(logged_in=\'1\'  AND DATE_SUB(NOW(), INTERVAL 20 SECOND) < last_active)',			
			'doj' => 'DATE_FORMAT(doj, \''.$CFG['format']['date'].'\')',
			'tag_match' => '1'
			)
		);
$tags = $memberList->getFormField('tags');
$tags = trim($tags);
if ($tags) 
    {
        $memberList->buildTagSearchQuery();
		$memberList->setReturnColumnsAliases(array(
				'logged_in_currently'		=> '(logged_in=\'1\'  AND DATE_SUB(NOW(), INTERVAL 20 SECOND) < last_active)',			
				'doj' => 'DATE_FORMAT(doj, \''.$CFG['format']['date'].'\')',
					'tag_match' => getSearchRegularExpressionQuery($memberList->getFormField('tags'), 'profile_tags', '')					
					)
				);
		$showRelatedTags = true;		
    }
else
	{
		$memberList->buildConditionQuery();
		$memberList->buildSortQuery();
	}


$memberList->buildSelectQuery();
$memberList->buildQuery();
$group_array = array('mostActiveUsers');
if(in_array($memberList->getFormField('browse'), $group_array))
	$memberList->homeExecuteQuery();
else
	$memberList->executeQuery();
$totalResults = $memberList->getResultsTotalNum();
if ($totalResults) 
    {
		$memberList->setPageBlockShow('form_list_members');        
    }
else
	{
		$memberList->setPageBlockShow('msg_form_info');
	}

$start = $memberList->getFormField('start');
$resultTotal = $memberList->getResultsTotalNum();
if (($start > $resultTotal) OR (!is_numeric($start))) 
        {
            $memberList->setIndirectFormField('start', intval($resultTotal / $CFG['data_tbl']['numpg'])*$CFG['data_tbl']['numpg']);
			$memberList->buildSelectQuery();
			$memberList->buildConditionQuery();
			$memberList->buildSortQuery();
			$memberList->buildQuery();
			$memberList->executeQuery();
        }
	}	
//--------------------Page block templates begins-------------------->>>>>//
?>
<div id="selMembersBrowse">
  <h2><span><?php echo $memberList->getPageTitle();?></span></h2>
  <div id="selLeftNavigation">
    <?php
if ($memberList->isShowPageBlock('msg_form_info'))
	{
?>
    <div id="selMsgAlert">
      <p><?php echo $LANG['msg_no_records'];?></p>
    </div>
    <?php
	}
if (isset($_SESSION['friend_request_message']) and !empty($_SESSION['friend_request_message'])) 
    {
?>
    <div id="selMsgSuccess">
      <p><?php echo $_SESSION['friend_request_message'];?></p>
    </div>
    <?php 
		unset($GLOBALS['_SESSION']['friend_request_message']);
    }

if ($memberList->isShowPageBlock('form_list_members'))
	{
		if($CFG['admin']['navigation']['top'])
			$memberList->populatePageLinks($memberList->getFormField('start'), array('browse','user_id', 'action'));
?>
    <div id="selViewAllMembers">
      <!--rounded corners-->
      <div class="lbdisplaytbl">
        <div class="rbdisplaytbl">
          <div class="bbdisplaytbl">
            <div class="blcdisplaytbl">
              <div class="brcdisplaytbl">
                <div class="tbdisplaytbl">
                  <div class="tlcdisplaytbl">
                    <div class="trcdisplaytbl">
                      <table summary="<?php echo $LANG['member_list_tbl_summary'];?>" class="clsMembersDisplayTbl clsContentsDisplayTbl" cellspacing="0">
<?php
			$memberList->displayMembers();
?>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!--end of rounded corners-->
	 </div>
<?php
		if($CFG['admin']['navigation']['bottom'])
			$memberList->populatePageLinks($memberList->getFormField('start'), array('browse', 'user_id', 'action'));
	
		if ($showRelatedTags) 
		    {
		        $memberList->showRelatedTags();
		    }	
	}
?>
  </div>
</div>
<?php
//<<<<<<--------------------Page block templates Ends--------------------//
require_once($CFG['site']['project_path'].'common/application_bottom.inc.php');
?>

function usermenulist() is undefined, you did not copy that file where you declare it.

what file?this from rayzz youtube script

Member Avatar for diafol

This ain't your script I take it.

Fatal error: Call to undefined function usermenulist() in D:\xampp\xampp\htdocs\general\membersList.php on line 163
....


<?php userMenuList($row); ?>

This is your problem. This function is probably in a class or include file that hasn't been included or required. The file may be included but the function may have a slightly different name. Check that the name is identical.

If you don't undestand the answer, get a book or browse some online tutorials about require/include files.

thx so much ,hehe i just delet this <?php userMenuList($row); ?> and all is ok :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.