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
zuker #61

ok change ya plans!! ok use this make a file [ 1.php ] !! right

include("1.php"); anywhere you like it to show!!

place this in it!!

<?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&sid=$sid&who=$pop[2]\">RELPY</a>";
echo "
---";  }}?>

============================done==================================== now make popups.php

place this code in it

<?php
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
echo("<?xml version=\"1.0\"?>");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<?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)
{
    echo "<card id=\"main\" title=\"$sitename\">";
      echo "<p align=\"center\">";
      echo "You are not logged in
";
      echo "Or Your session has been expired

";
      echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
      echo "</card>";
      echo "</wml>";
      exit();
}
$uid = getuid_sid($sid);
if(isbanned($uid))
    {
        echo "<card id=\"main\" title=\"$sitename\">";
      echo "<p align=\"center\">";
      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 "</p>";
      echo "</card>";
      echo "</wml>";
      exit();
    }
else if($action=="send")
{
addonline(getuid_sid($sid),"Sending pop-up MSG","");
echo "<card id=\"main\" title=\"sent!!\">";
echo "<p align=\"center\">";
$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 "<img src=\"images/sent.gif\" alt=\"O\"/>
";
    echo "Popup Message Sent to $whonick!
";

    
echo "
---
<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();

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

$who = $_get['who'];

addonline(getuid_sid($sid),"Sending pop-up MSG","");
echo "<card id=\"main\" title=\"popups\">";
echo "<p align=\"center\">";
echo "$getbuttons 
";

$who = $_get['who'];
$whonick = getnick_uid($who);
$byuid = getuid_sid($sid);

echo "<input name=\"msg\" maxlength=\"150\"/>
";
echo "<anchor>SEND<go href=\"popus.php?action=send&who=$who&sid=$sid\" method=\"post\">";
echo "<postfield name=\"msg\" value=\"$(msg)\"/>";
echo "</go></anchor>
";
echo "

-

<a href=\"index.php?action=main&sid=$sid\">Home</a>
";
}
echo "</p>";
echo "</card>";
?>
</wml>

====================done============== try that now get the code for lists in list code ok

ok i did all that bot how i sent a pop up ? External image (may be gone)

hypetype Developer · 128 posts #63
<?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]\">reply</a>"; echo " ---"; } } ?>

================================================= HOW CAN I GET A REPLY BOX ON THIS PAGE WITHOUT CAUSIN AN ERROR?

  • i tried to make 1 but i get errors wit my mobile, but not on pc *
Guest #64

Maybe it wsnt meant to ever workout

Guest #65

Maybe it wsnt meant to ever workout

<?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]."'"); } $alerta = mysql_fetch_array(mysql_query("SELECT text, byuid, timesent,touid, reported FROM fun_pops WHERE id='".$id."'")); $dtop = date("d/m/y - H:i:s",$pop[5]); $by = getnick_uid($pop[2]); $msg = parsepm($pop[1]); if(isspam($msg)) { if(($alerta[4]=="0") && ($alerta[1]!=1)) { mysql_query("UPDATE fun_pops SET reported='1' WHERE id='".$id."'"); } } echo "$getbuttons "; $who = $_get['who']; echo "(!)alert"; echo " **$by:** $msg "; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); echo "<input name=\"msg\" maxlength=\"150\"/> "; echo "<anchor>SEND<go href=\"popus.php?action=send&amp;who=$who&amp;sid=$sid&amp;who=$pop[2]\" method=\"post\">"; echo "<postfield name=\"msg\" value=\"$(msg)\"/>"; echo "</go></anchor> "; echo "--- "; } } ?>

enjoy..with my code you have the replay text after the alert;)

Guest #66
<?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 = parsepm($pop[1]); echo "$getbuttons "; $who = $_get['who']; echo "(!)alerta"; echo " **$by:** $msg "; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); echo "<input name=\"msg\" maxlength=\"150\"/> "; echo "<anchor>SEND<go href=\"popus.php?action=send&amp;who=$who&amp;sid=$sid&amp;who=$pop[2]\" method=\"post\">"; echo "<postfield name=\"msg\" value=\"$(msg)\"/>"; echo "</go></anchor> "; echo "--- "; } } ?>

try this one, the other has some other codes External image (may be gone) is for wml version

Guest #71

sorry for this dumb question but now that pop-ups is set up, wat u do to recieve them?

subzero Super moderator Fellow · 3,954 posts #72

hello belthazar,

I had done this script from wizard xhtml site i edit to wml-php scripts.

To give you idea try to search before you post any topic

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

n2o #73

Read Properly!!!!!!! Belthazer And You Should No

Guest #74

some one plz help me with this popups i got all the files uploaded and also on list.php i added ////////////////////////////popups msg but after doin all this when i try to access popus.php page i get this error

Warning: Cannot modify header information - headers already sent by (output started at /home/pfaalo01/domains/cyberside.eu/public_html/re/popus.php:1) in /home/pfaalo01/domains/cyberside.eu/public_html/re/popus.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /home/pfaalo01/domains/cyberside.eu/public_html/re/popus.php:1) in /home/pfaalo01/domains/cyberside.eu/public_html/re/popus.php on line 3

and when i try to access popus.php i get this

Fatal error: Call to undefined function getuid_sid() in /home/pfaalo01/domains/cyberside.eu/public_html/re/popups.php on line 2

and after addin the include("popups.php"); on main page i see just this  help me put the popup sub brou or wizard bro i cnt figure out wots wrong

Guest #76

wht and where did i go wrong that it dnt work? guys help me out

Guest #77

brou im usin rw wml script

Guest #79

brou ill pm u the link ok?its not my site its someone elses site i only edit it for him coz he my mate

n2o #80

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 ,

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