Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: draugu sistema
Parašė suomis· 2008 Spa. 9 20:10:17
#1
sveiki turiu draugu sistema freundschaftssystem_1.0 :) cia paneles kodas:
<?php
openside("Draugai ONLINE");
echo "<br><center><a href='http://tavomuzika.net/infusions/freundschaftssystem_1.0/meine_freunde.php' >Mano draugai</a></center><center><a href='http://tavomuzika.net/infusions/freundschaftssystem_1.0/meine_freunde.php' >Pakvietimai draugaut</a></center><br>";
$lastseen=time()-120; // 120 sind 2 Minuten
echo"\n";
$result=dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit >=".$lastseen."");
while($data = dbarray($result)) {
$result_from=dbquery("SELECT * FROM ".$db_prefix."buddys WHERE
buddy_from = ".$userdata['user_id']." AND buddy_to = ".$data['user_id']."");
$data_from = dbarray($result_from);
$result_to=dbquery("SELECT * FROM ".$db_prefix."buddys WHERE
buddy_to = ".$userdata['user_id']." AND buddy_from = ".$data['user_id']."");
$data_to = dbarray($result_to);
if($data_to['buddy_id'] != "" AND $data_from['buddy_id'] != ""){
$bild = "<img src='".INFUSIONS."freundschaftssystem_1.0_panel/images/mail.gif' border='0'>";
$datum = strftime("Zuletzt aktiv: %H:%M:%S Uhr", $data['user_lastvisit']);
echo " \n";
if ($data['user_avatar'] != "") {
echo "<center><img src='".BASEDIR."images/avatars/".$data['user_avatar']."' width='75' height='75' style='border:1px solid #FFFFFF'></center><br>\n";
} else {
echo "<center><img src='http://www.tavomuzika.net/images/noimage.gif' width='75' height='75' ></center>\n";
}
echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' target='_parent' title='$datum'><center>".$data['user_name']."</center></a>\n";
}
}
echo"\n";
closeside();
?>
jai draugas prisijungia ji rodo online, o kaip padaryt kad jai nera prisijungusio draugo kad rasytu - Draugu neporisijunge.. ???
Parašė bauwbas· 2008 Spa. 9 20:10:06
#2
padaryk ta } else { jeigu ismanai
php kalba.
Parašė suomis· 2008 Spa. 9 20:10:52
#3
dariau nesigavo ?|
Parašė bauwbas· 2008 Spa. 9 20:10:19
#4
Jei niekas nepades tau per siandiena, ryt tau sukursiu, kadangi sergu turiu pailseti, tad dabar isjungsiu kompiuteri.
Parašė ramon· 2008 Spa. 9 21:10:25
#5
if (dbrows($result) > 0) print 'kazkas yra online..'; else {print 'visi miega...';
Parašė suomis· 2008 Spa. 9 21:10:45
#6
galima butu visa koda?
Parašė bad_user· 2008 Spa. 9 22:10:27
#7
<?php
openside("Draugai ONLINE");
echo "<br><center><a href='http://tavomuzika.net/infusions/freundschaftssystem_1.0/meine_freunde.php' >Mano draugai</a></center><center><a href='http://tavomuzika.net/infusions/freundschaftssystem_1.0/meine_freunde.php' >Pakvietimai draugaut</a></center><br>";
$lastseen=time()-120; // 120 sind 2 Minuten
echo"\n";
$result=dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit >=".$lastseen."");
if($result) {
while($data = dbarray($result)) {
$result_from=dbquery("SELECT * FROM ".$db_prefix."buddys WHERE
buddy_from = ".$userdata['user_id']." AND buddy_to = ".$data['user_id']."");
$data_from = dbarray($result_from);
$result_to=dbquery("SELECT * FROM ".$db_prefix."buddys WHERE
buddy_to = ".$userdata['user_id']." AND buddy_from = ".$data['user_id']."");
$data_to = dbarray($result_to);
if($data_to['buddy_id'] != "" AND $data_from['buddy_id'] != ""){
$bild = "<img src='".INFUSIONS."freundschaftssystem_1.0_panel/images/mail.gif' border='0'>";
$datum = strftime("Zuletzt aktiv: %H:%M:%S Uhr", $data['user_lastvisit']);
echo " \n";
if ($data['user_avatar'] != "") {
echo "<center><img src='".BASEDIR."images/avatars/".$data['user_avatar']."' width='75' height='75' style='border:1px solid #FFFFFF'></center><br>\n";
} else {
echo "<center><img src='http://www.tavomuzika.net/images/noimage.gif' width='75' height='75' ></center>\n";
}
echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' target='_parent' title='$datum'><center>".$data['user_name']."</center></a>\n";
}
}
} else {
echo "Draugų online nėra";
}
echo"\n";
closeside();
?>
Redagavo bad_user· 2008 Spa. 9 22:10:35
Parašė suomis· 2008 Spa. 9 22:10:59
#8
deja as ir taip meginau bet neveikia ?|
Parašė bad_user· 2008 Spa. 9 22:10:43
#9
O šitą kodą pabandei?
Parašė suomis· 2008 Spa. 9 22:10:31
#10
taip ?|
Parašė ramon· 2008 Spa. 10 00:10:56
#11
<?php
openside("Draugai ONLINE");
echo "<br><center><a href='http://tavomuzika.net/infusions/freundschaftssystem_1.0/meine_freunde.php' >Mano draugai</a></center><center><a href='http://tavomuzika.net/infusions/freundschaftssystem_1.0/meine_freunde.php' >Pakvietimai draugaut</a></center><br>";
$lastseen=time()-120; // 120 sind 2 Minuten
echo"\n";
$result=dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit >=".$lastseen."");
if($result) {
while($data = dbarray($result)) {
$result_from=dbquery("SELECT * FROM ".$db_prefix."buddys WHERE
buddy_from = ".$userdata['user_id']." AND buddy_to = ".$data['user_id']."");
$data_from = dbarray($result_from);
$result_to=dbquery("SELECT * FROM ".$db_prefix."buddys WHERE
buddy_to = ".$userdata['user_id']." AND buddy_from = ".$data['user_id']."");
$data_to = dbarray($result_to);
if($data_to['buddy_id'] != "" AND $data_from['buddy_id'] != ""){
$bild = "<img src='".INFUSIONS."freundschaftssystem_1.0_panel/images/mail.gif' border='0'>";
$datum = strftime("Zuletzt aktiv: %H:%M:%S Uhr", $data['user_lastvisit']);
echo " \n";
if ($data['user_avatar'] != "") {
echo "<center><img src='".BASEDIR."images/avatars/".$data['user_avatar']."' width='75' height='75' style='border:1px solid #FFFFFF'></center><br>\n";
} else {
echo "<center><img src='http://www.tavomuzika.net/images/noimage.gif' width='75' height='75' ></center>\n";
}
echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' target='_parent' title='$datum'><center>".$data['user_name']."</center></a>\n";
}
}
} else {
echo "Draugų online nėra";
}
echo"\n";
closeside();
?>
if($result) { pakeisk i
if (dbrows($result) > 0) {
Parašė suomis· 2008 Spa. 10 19:10:04
#12
neveikia :[