Location: PHPKode > projects > Slashster > slashster/html/addfriendrequest.php

# Slashster: Open Source Friend of a Friend Software
# Copyright 2004 Mark El-Wakil
# Contact: hide@address.com
# http://seventhcycle.net
# This file is part of Slashster.
# Slashster is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# Slashster is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with Slashster; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA



    $mpage = new PageClass("authonly");  

    $sql = "select * from UserTable where Id = \"$id\" ";
    $r = $mpage->DoQuery($sql,1);
    if (!sizeof($r))
        echo "No such user";

    $r = $r[0];

    $sql = "select * from FriendRequest where Start = $mpage->IdNum
            AND End = \"$id\" ";
    $t = $mpage->DoQuery($sql);

    if ($submit && !sizeof($t))
        $mpage->FriendRequest($mpage->IdNum, $id);

    if (sizeof($t) || $submit)
          $mpage->Initialize("authremainder"); ?>

<P>Thank You</p>

<P>Your request to be this person's friend has been sent and is now pending.

          <? $mpage->ClosePage();



<table width=700 border=0>
<tr><td width=700 valign=top>

<form method=post>

<b>Add Friend</b>
<table border=1 cellspacing=0>
<tr><td width=100 valign=middle align=center>
<img src="userpics/<?= $mpage->PicPr($r[PicDefault], $r[Id]) ?>-b.jpg" width=80 height=60>

You are about to add <B><?= $r[Fname] ?> <?= substr($r[Lname], 0, 1) ?>.</b> as a friend.

<P><B><?= $r[Fname] ?></b> will be notified, and will have to confirm that you are friends. Your full 
name and email address will be sent to <B><?= $r[Fname] ?></b> for identification purposes if you 

<P style="color:red;"><B>Continue only if you really are friends with <?= $r[Fname] ?></b>.</p>



<table width=100%>
<tr><td width=200>

<table class="submit"><tr><td>
 <a href="user.php?id=<?= $r[Id] ?>">Cancel</a>

 <input type="submit" class="submit" name="submit" value="Add <?= $r[Fname] ?> as your Friend">


<? $mpage->ClosePage(); ?>

Return current item: Slashster