Hola, tengo un problema, tengo una funcion que es getFriends esta imprime en otra pagina a tus amigos, los amigos tienen una foto y su nombre, si das clic en la foto sale : tupagina.com/urldelamigo
pero si das clic en el nombre sale: tupagina.com/account/urldelamigo
lo unico que quiero hacer es quitar /account del link pero no se como hacerlo, alguien me puede auxiliar? el codigo:
Código:
// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Friends
// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public function GetFriendsCount()
{
$stmt = $this->db->prepare("SELECT friend_id FROM friends_data WHERE friend_to_id=(:friend_to_id)");
$stmt->bindParam(":friend_to_id", $this->id, PDO::PARAM_INT);
$stmt->execute();
if ($stmt->rowCount() > 0)
{
return $stmt->rowCount();
}
else
{
return 0;
}
}
public function GetFriends($page=0, $TEXT)
{
$msg_per_page = 20;
$ask_cnt = 0;
$max_page = 0;
$stmt = $this->db->prepare("SELECT friend_id FROM friends_data WHERE friend_to_id=(:friend_to_id)");
$stmt->bindParam(":friend_to_id", $this->id, PDO::PARAM_INT);
$stmt->execute();
if ($stmt->rowCount() > 0)
{
$ask_cnt = $stmt->rowCount();
$max_page = intval($ask_cnt/$msg_per_page);
if (($ask_cnt%$msg_per_page)&&($max_page!=0)) $max_page++;
if (($page > $max_page)||($page < 0))
{
$page = 0;
}
else
{
$favorites = array();
$offset = $page*$msg_per_page;
$max = $offset+$msg_per_page;
/* $sth = $this->db->prepare("SELECT friend_id FROM friends_data WHERE friend_to_id=(:friend_to_id) LIMIT :offset,:max");
$sth->bindParam(':friend_to_id', $user->id, PDO::PARAM_INT);
$sth->bindParam(':offset', $offset, PDO::PARAM_INT);
$sth->bindParam(':max', $max, PDO::PARAM_INT);
$sth->execute();
*/
while ($row = $stmt->fetch())
{
$infouser = new infouser($this->db,$row['friend_id']);
$favorites[] = array("time" => $infouser->lasttime, "id" => $infouser->id);
unset($infouser);
}
arsort($favorites);
$current = 0;
foreach ($favorites as $key => $value)
{
$current++;
if (($current>$offset)&&($current<=$max))
{
$draw = new draw($this->db, $TEXT);
$draw->User($value['id']);
unset($draw);
}
}
$page++;
if (($max_page != 0)&&($page < $max_page))
{
?>
<div class="view-more-container">
<a id="favorites-in-more-btn" rel="<?php echo $page; ?>" class="uiButton uiButtonConfirm"><?php echo $TEXT['action-view-more']; ?></a>
<img id="view-more-spinner" class="hide" src="/img/spinner24.gif">
</div>
<?php
}
}
}
return false;
}
}