Alerts/popup

Started on the old forum in February 2007 · view the original in the archive · old links redirect here

119 replies · 14,350 views · started 19 years ago · 1 min read

TL;DR · summary of 119 replies
  • - The fix for the popup script was not fully resolved as some users still had issues with their popups not appearing.
  • - Users were advised to change $(msg) to $msg in the code, and place the include statement where they wanted the popup message to show up on their site.
  • - Subzero suggested creating a separate file (like 1.php) for the include statement, which could be placed anywhere on the page where the popup should appear.
  • - The thread concluded with users trying different configurations of popups.php and lists.php, but some still had issues getting the popups to work.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

6 participants
Guest #101

waitin for help here aswell;)

i dnt that u hv converted the viewbud action for index.php into xhtml or nt

linkrx7 #103

post ur xhtml code then

learner Lead · 587 posts #104

here it is linkx7 brother the error is when i click on send pop up button it says buddy not in list

pops.php

<?php $uid = getuid_sid($sid); $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_pops WHERE touid='".$uid."' AND unread='1'")); if($nopop[0]>0) { $sql ="SELECT * FROM ibwf_pops where touid='".$uid."' AND unread = '1' ORDER BY id LIMIT 0, 1"; $pd = mysql_query($sql); while ($pop = mysql_fetch_array($pd)) { $id = mysql_fetch_array(mysql_query("SELECT touid FROM ibwf_pops WHERE touid='".$uid."'")); if($uid==$id[0]) { $chread = mysql_query("UPDATE ibwf_pops SET unread='0' WHERE id='".$pop[0]."'"); } $dtop = date("d/m/y - H:i:s",$pop[5]); $by = getnick_uid($pop[2]); $msg = parsepm($pop[1], $sid); echo "**$by:** $msg - $dtop "; echo "<form action=\"popup.php?action=send&amp;sid=$sid\" method=\"post\">"; echo "<input type=\"text\" name=\"msg\" maxlength=\"150\"/>"; echo "<input type=\"submit\" value=\"send pop up\"/>"; echo "<postfield name=\"who\" value=\"$pop[2]\"/>"; echo "<postfield name=\"msg\" value=\"$(msg)\"/>"; echo "</go></form>"; echo " --- "; } } -------------- popup.php <?php include("config.php"); include("core.php"); header("Content-type: text/html; charset=ISO-8859-1"); echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";

echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">"; echo "<html xmlns="http://www.w3.org/1999/xhtml">";

echo "<head>";

echo "<title>$stitle</title>"; echo "<body bgcolor="#00FF00" link="#FFFF00" vlink="#FFFF00" alink="#FFFF00">"; echo "</head>";

echo "<body>"; connectdb(); $action = $_GET['action']; $sid = $_GET['sid']; $page = $_GET['page']; $who = $_GET['who']; $pmid = $_GET['pmid']; if(islogged($sid)==false) {

echo " "; echo "You are not logged in "; echo "Or Your session has been expired

"; echo "<a href="index.php">Login</a>"; echo " "; exit(); } $uid = getuid_sid($sid); if(isbanned($uid)) {

echo " "; echo "<img src="images/notok.gif" alt="x"/> "; echo "You are Banned "; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "Time to finish your penalty: $rmsg

"; //echo "<a href="index.php">Login</a>"; echo " "; exit(); }

if($action=="send") { $who=$_POST["who"]; $msg=$_POST["msg"];

addonline(getuid_sid($sid),"Sending pop-up MSG",""); echo "<card id="main" title="Pop-Up Sent">";

echo " "; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $tm = time(); if(arebuds($byuid, $who)==true) { $res = mysql_query("INSERT INTO ibwf_pops SET text='".$msg."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'"); if($res) { include("pops.php"); echo "<img src="images/ok.gif" alt="O"/> "; echo "Popup Message Sent to $whonick! "; }else{ echo "<img src="images/notok.gif" alt="X"/> "; echo "Can't Send Message to $whonick

"; } }else{ echo "Name is not in buddylist!"; } echo "

<a href="index.php?action=main&sid=$sid"><img src="images/home.gif" alt="*"/>"; echo "Home</a>"; echo " "; echo "</body>"; } else if($action=="archive") { echo "<card id="main" title="xxx">";

echo "</body>"; }

else{ /////////////////////////Main Page Here echo "<card id="main" title="xxx">"; echo " ";

echo " "; echo "</body>"; }

?>

</html>

in

index.php

else if($action=="viewbud") { addonline(getuid_sid($sid),"Viewing buddy","index.php?action=viewbud&who=$who"); echo "<card id="main" title="buddylist">";

echo "

";

$sql = "SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt FROM ibwf_users a INNER JOIN ibwf_buddies b ON (a.id = b.uid) OR (a.id=b.tid) WHERE (b.uid='".$uid."' OR b.tid='".$uid."') AND b.agreed='1' AND a.id!='".$uid."'";

$items = mysql_query($sql);

while ($item = mysql_fetch_array($items)) {

if(isonline($item[2])) { $iml = "<img src="images/onl.gif" alt="+"/>";

$plc = mysql_fetch_array(mysql_query("SELECT place FROM ibwf_online WHERE userid='".$item[2]."'")); $uact .= $plc[0]; }else{ $iml = "<img src="images/ofl.gif" alt="-"/>"; $uact = "Last Active: "; $ladt = date("d m y-H:i:s", $item[0]); $uact .= $ladt; } }

$whonick = getnick_uid($who); if(arebuds($uid, $who)==true) { echo "<a href="index.php?action=viewuser&sid=$sid&who=$who">$whonick</a> "; echo "($uact) "; echo "pop-up message: "; echo "<form action="popup.php?action=send&sid=$sid" method="post">"; echo "<input type="text" name="msg" maxlength="150"/>"; echo "<input type="submit" value="SEND"/>";

echo "<postfield name="who" value="$who"/>"; echo "<postfield name="msg" value="$(msg)"/>";

echo "</go></form>";

//echo " <a href="index.php?action=sendpm&who=$who&sid=$sid">+ send message</a>"; echo " <a href="inbox.php?action=sendpm&who=$who&sid=$sid">+ send message</a>"; echo " <a href="genproc.php?action=bud&who=$who&sid=$sid&todo=del">- remove from buddylist</a>"; }else{ echo "$whonick is not a buddy";

}

echo " <a href="index.php?action=main&sid=$sid">Home</a>"; echo " "; echo "</body>";

}

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

learner Lead · 587 posts #105

ok this is for XHTML

make popups.php

<?php $uid = getuid_sid($sid); $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_pops WHERE touid='".$uid."' AND unread='1'")); if($nopop[0]>0) { $sql ="SELECT * FROM fun_pops where touid='".$uid."' AND unread = '1' ORDER BY id LIMIT 1"; $pd = mysql_query($sql); while ($pop = mysql_fetch_array($pd)) { $id = mysql_fetch_array(mysql_query("SELECT touid FROM fun_pops WHERE touid='".$uid."'")); if($uid==$id[0]) { $chread = mysql_query("UPDATE fun_pops SET unread='0' WHERE id='".$pop[0]."'"); } $dtop = date("d/m/y - H:i:s",$pop[5]); $by = getnick_uid($pop[2]); $msg = htmlspecialchars($pop[1]); echo " **$by:** $msg - $dtop "; echo "<a href=\"lists.php ?action=sendto&amp;sid=$sid&amp;who=$pop[2]\">RELPY</a>"; echo " --- "; } } ?>

Then Make popus.php

<?php include("xhtmlfunctions.php"); header("Content-type: text/html; charset=ISO-8859-1"); echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";

echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"; ?>

<?php include("config.php"); include("core.php"); connectdb(); $action = $_GET['action']; $sid = $_GET['sid']; $page = $_GET['page']; $who = $_GET['who']; $pmid = $_GET['pmid']; if(islogged($sid)==false) { $pstyle = gettheme1("1"); echo xhtmlhead("FlareZone",$pstyle); echo " "; echo "You are not logged in "; echo "Or Your session has been expired "; echo "<a href=\"index.php\">Login</a>"; echo " "; echo xhtmlfoot(); exit(); } $uid = getuid_sid($sid); if(isbanned($uid)) { $pstyle = gettheme1("1"); echo xhtmlhead("FlareZone",$pstyle); echo " "; echo "<img src=\"images/notok.gif\" alt=\"x\"/> "; echo "You are **Banned** "; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "Time to finish your penalty: $rmsg "; //echo "<a href=\"index.php\">Login</a>"; echo " "; echo xhtmlfoot(); exit(); } else if($action=="send") { addonline(getuid_sid($sid),"Sending pop-up MSG",""); $pstyle = gettheme($sid); echo xhtmlhead("FlareZone Pop ups",$pstyle); echo " "; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $tm = time(); $res = mysql_query("INSERT INTO fun_pops SET text='".$msg."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'"); echo "Popup Message Sent to $whonick! "; echo " --- <a href=\"index.php?action=main&amp;sid=$sid\">Home</a>"; echo " "; echo xhtmlfoot(); exit(); } else if($action=="sendto"){ $who = $_get['who']; addonline(getuid_sid($sid),"Sending pop-up MSG",""); $pstyle = gettheme($sid); echo xhtmlhead("FlareZone Pop ups",$pstyle); echo " "; echo "$getbuttons "; $who = $_get['who']; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); echo "<input name=\"msg\" maxlength=\"150\"/> "; echo "SEND<go href=\"popus.php?action=send&amp;who=$who&amp;sid=$sid\" method=\"post\">"; echo "<postfield name=\"msg\" value=\"$(msg)\"/>"; echo "</go> "; echo " - <a href=\"index.php?action=main&amp;sid=$sid\">Home</a> "; } echo " "; echo xhtmlfoot(); ?>

Add This To List.php

///////////////////////////////////////////POP UPS

else if($action=="sendto"){

addonline(getuid_sid($sid),"Sending pop-up MSG",""); $pstyle = gettheme($sid); echo xhtmlhead("Pop Up MSG",$pstyle); echo " "; echo "$getbuttons

"; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); echo "Sending to ".$whonick." "; echo "<form action="popus.php?action=send&who=$who&sid=$sid" method="post">"; echo "<input name="msg" maxlength="150"/> ";

echo "<postfield name="msg" value="$(msg)"/>"; echo "<postfield name="who" value="$(who)"/>"; echo "<input type='submit' value='Send'/></form> "; echo "

<a href="index.php?action=main&sid=$sid">Home</a> "; echo " "; echo xhtmlfoot();

} And Use The SQL That Was Posted By Subzero ,

will this code work on funmobile script?please instruct how for both wml and xhtml

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

Guest #110

in funmobile wml and xhtml pls

Guest #112

Hey still pending.Funmobile POPup ScripT????????????

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close