Parašė Mp3_Eivis· 2007 Gru. 9 15:12:27
#1
Sveiki,
turiu draugu moda sioki toki ir noriu pasidaryti, kad pakvietus zmogu i draugus, tam zmogui atsirastu icona prie jo profilio ir ant jos paspaudus ji nukeltu i patvitinimo skiriu, kur jis galetu patvirtinti drauga.
Cia noriu pasidaryti kaip kad su zinutem yra, pvz nusiunti zinute ir tam zmogui kuriam siuntei atsiranda laiskiukas. Tai as taip pat noriu padaryti.
Jei galit padekit.
Stai to draugu modo Pagrindinis Failas:
<?php
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
require_once "locale/German.php";
$gold_mitglied = "NEIN"; // Free Mitglied = NEIN | Gold Mitglied = JA
$gold_nickname = ""; // Bei JA gib hier deinen Club Mitgliedsnamen ein
// Wer ohne Erlaubnis (siehe redme_de.txt) das Copyright deaktiviert
// muss mit einer StrafgebĆ¼hr von 50 Euro rechnen! Durch googeln finden
// wir schnell alle schwarzen Schafe *lol* Alle Gold Mitglieder haben
// die Erlaubnis das Copyright zu deaktiviert
opentable($locale['mf01']);
if (iMEMBER) {
echo "<table align='center' cellpadding='2' cellspacing='4' border='0' width='100%'>
<tr>
<td>".$locale['mf02']."</td>
</tr>
</table>
<br>
<table border='0' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td class='tbl2' style='white-space:nowrap'>".$locale['mf10']."</td>
<td class='tbl2' style='white-space:nowrap'>".$locale['mf11']."</td>
<td class='tbl2' style='white-space:nowrap'>".$locale['mf12']."</td>
</tr>";
$result = dbquery("SELECT * FROM ".$db_prefix."buddys
WHERE buddy_from = ".$userdata['user_id']." OR buddy_to = ".$userdata['user_id']."");
while($data = dbarray($result)){
$result_to_from = dbquery("SELECT * FROM ".$db_prefix."buddys
WHERE buddy_to = ".$userdata['user_id']." AND buddy_from = ".$data['buddy_to']."");
$data_to_from = dbarray($result_to_from);
if ($data['buddy_to'] != $userdata['user_id'] AND $data_to_from['buddy_to'] == true) {
$result_user = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id = ".$data['buddy_to']."");
$data_user = dbarray($result_user);
$check = "1";
echo " <tr>
<td width='20%' class='tbl2'><b><a href='".BASEDIR."profile.php?lookup=".$data_user['user_id']."'>".$data_user['user_name']."</a></b></td>
<td width='27%' class='tbl1'>".$locale['mf24']."</td>
<td class='tbl1' width='43%'><a href='meine_freunde.php?buddy=b&buddy_from=".$userdata['user_id']."&buddy_to=".$data['buddy_to']."'>".$locale['mf25']."</a></td>
</tr>";
if ($buddy == b) {
mysql_query("DELETE FROM ".$db_prefix."buddys
WHERE buddy_from = $buddy_from AND buddy_to = $buddy_to");
mysql_query("UPDATE ".$db_prefix."buddys SET buddy_status=2
WHERE buddy_from = $buddy_to AND buddy_to = $buddy_from");
fallback("meine_freunde.php");
}
}}
$result = dbquery("SELECT * FROM ".$db_prefix."buddys
WHERE buddy_to = ".$userdata['user_id']."");
while($data = dbarray($result)){
$result_from = dbquery("SELECT * FROM ".$db_prefix."buddys
WHERE buddy_id = ".$data['buddy_id']."");
while($data_from = dbarray($result_from)){
$result_from_check = dbquery("SELECT * FROM ".$db_prefix."buddys
WHERE buddy_to = ".$data_from['buddy_from']." AND buddy_from = ".$data_from['buddy_to']."");
$data_from_check = dbarray($result_from_check);
if ($data_from_check != true) {
$result_user = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id = ".$data_from['buddy_from']."");
$data_user = dbarray($result_user);
if ($data_from['buddy_status'] == '1') {
$check = "1";
echo " <tr>
<td width='20%' class='tbl2'><b><a href='".BASEDIR."profile.php?lookup=".$data_user['user_id']."'>".$data_user['user_name']."</a></b></td>
<td width='27%' class='tbl1'>".$locale['mf20']."</td><td class='tbl1' width='43%'><a href='meine_freunde.php?buddy=a&buddy_from=".$userdata['user_id']."&buddy_to=".$data_from['buddy_from']."'>".$locale['mf31']."</a> | <a href='meine_freunde.php?buddy=u&buddy_from=".$userdata['user_id']."&buddy_to=".$data_from['buddy_from']."'>".$locale['mf32']."</a></td>
</tr>";
}elseif($data_from['buddy_status'] == '2') {
if ($buddy == g) {
mysql_query("DELETE FROM ".$db_prefix."buddys
WHERE buddy_from = $buddy_to AND buddy_to = $buddy_from");
fallback("meine_freunde.php");
}
}else{
}
if ($buddy == a) {
$datum = time();
dbquery("INSERT INTO ".$db_prefix."buddys (buddy_id, buddy_from, buddy_to, buddy_date, buddy_status) VALUES ('','$buddy_from', '$buddy_to', '$datum', '1')");
fallback("meine_freunde.php");
}
if ($buddy == u) {
mysql_query("UPDATE ".$db_prefix."buddys SET buddy_status=0 WHERE buddy_from = $buddy_to AND buddy_to = $buddy_from");
fallback("meine_freunde.php");
}
}}}
$result = dbquery("SELECT * FROM ".$db_prefix."buddys
WHERE buddy_from = ".$userdata['user_id']."");
while($data = dbarray($result)){
$result_to = dbquery("SELECT * FROM ".$db_prefix."buddys
WHERE buddy_id = ".$data['buddy_id']."");
while($data_to = dbarray($result_to)){
$result_to_check = dbquery("SELECT * FROM ".$db_prefix."buddys
WHERE buddy_to = ".$data_to['buddy_from']." AND buddy_from = ".$data_to['buddy_to']."");
$data_to_check = dbarray($result_to_check);
if ($data_to_check != true) {
$result_user = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id = ".$data_to['buddy_to']."");
$data_user = dbarray($result_user);
if ($data_to['buddy_status'] == '1') {
$check = "1";
echo " <tr>
<td width='20%' class='tbl2'><b><a href='".BASEDIR."profile.php?lookup=".$data_user['user_id']."'>".$data_user['user_name']."</a></b></td>
<td width='27%' class='tbl1'>".$locale['mf21']."</td><td width='43%' class='tbl1'><a href='meine_freunde.php?buddy=z&buddy_from=".$userdata['user_id']."&buddy_to=".$data_to['buddy_to']."'>".$locale['mf30']."</a></td></tr>";
if ($buddy == z) {
mysql_query("DELETE FROM ".$db_prefix."buddys
WHERE buddy_from = $buddy_from AND buddy_to = $buddy_to");
fallback("meine_freunde.php");
}
}elseif($data_to['buddy_status'] == '2') {
$check = "1";
echo "<tr><td width='20%' class='tbl2'><b><a href='".BASEDIR."profile.php?lookup=".$data_user['user_id']."'>".$data_user['user_name']."</a></b></td><td width='27%' class='tbl1'>".$locale['mf23']."</td><td class='tbl1' width='43%'><a href='meine_freunde.php?buddy=l&buddy_from=".$userdata['user_id']."&buddy_to=".$data_to['buddy_to']."'>".$locale['mf33']."</a></td></tr>";
if ($buddy == l) {
mysql_query("DELETE FROM ".$db_prefix."buddys
WHERE buddy_from = $buddy_from AND buddy_to = $buddy_to");
fallback("meine_freunde.php");
}
}else{
$check = "1";
echo " <tr>
<td width='20%' class='tbl2'><b>".$data_user['user_name']."</b></td>
<td width='27%' class='tbl1'>".$locale['mf22']."</td><td width='43%' class='tbl1'><a href='meine_freunde.php?buddy=l&buddy_from=".$userdata['user_id']."&buddy_to=".$data_to['buddy_to']."'>".$locale['mf33']."</a></td></tr>";
if ($buddy == l) {
mysql_query("DELETE FROM ".$db_prefix."buddys
WHERE buddy_from = $buddy_from AND buddy_to = $buddy_to");
fallback("meine_freunde.php");
}
}
}}}
echo "</table>";
$result = mysql_query("SELECT * FROM ".$db_prefix."buddys WHERE buddy_from = ".$userdata['user_id']." OR buddy_to = ".$userdata['user_id']."");
$anzahl = mysql_num_rows($result);
if ($check <> "1") {
echo "<center><br>".$locale['mf40']."<br><br></center>";
}
}
if ($gold_check != false) {
echo "<center>$gold_mitglied $gold_nickname</center>";
}
if ($gold_mitglied != 'JA') {
}
closetable();
tablebreak();
include INFUSIONS."freundschaftssystem_1.0_panel/freundschaftssystem_1.0_panel.php";
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>
Redagavo Mp3_Eivis· 2007 Gru. 9 15:12:55