Put amp; after & thats popup.php?action=sendto&who=$who&sid=$sid\ "method
Lavalair Pop Ups
Collapse
X
-
Code:<?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']; $who = $_GET['who']; $msg = $_POST["msg"]; 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 [b]Banned[/b] "; $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(); } if($action=="send"){ addonline(getuid_sid($sid),"Sending pop-up MSG",""); echo "<card id=\"main\" title=\"Popup-PM\">"; echo "<p align=\"center\">"; echo "$getbuttons "; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); echo "Sending Popup-PM to ".$whonick." "; echo "<input type=\"text\" name=\"msg\" maxlength=\"150\"/> "; echo "[size="1"]<anchor>Send<go href=\"popup.php?action=sendto&who=$who&sid=$sid\"method=\"post\">"; echo "<postfield name=\"msg\" value=\"$(msg)\"/>"; echo "</go></anchor>[/size]"; echo " <a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo "</card>"; } else if($action=="sendto") { addonline(getuid_sid($sid),"Sending pop-up MSG",""); echo "<card id=\"main\" title=\"Send Pop-up\">"; echo "<p align=\"center\">"; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $tm = time(); $res = mysql_query("INSERT INTO popup SET text='".$msg."',byuid='".$byuid."', touid='".$who."', timesent='".$tm."'"); echo "Popup Message Sent to $whonick! "; echo " <a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo "</card>"; } ?> </wml>
if ($who!=$uid) {
echo "<a href=\"popup.php?action=send&who=$who&sid= $sid\">Send Popup PM</a>
";
} this is the line added to viewuser
Comment
-
popup.phpCode:<?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']; $who = $_GET['who']; $msg = $_POST['msg']; 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 [b]Banned[/b] "; $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(); } if($action=="send"){ addonline(getuid_sid($sid),"Sending pop-up MSG",""); echo "<card id=\"main\" title=\"Popup-PM\">"; echo "<p align=\"center\">"; echo "$getbuttons "; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); echo "Sending Popup-PM to ".$whonick." "; echo "<input type=\"text\" name=\"msg\" maxlength=\"150\"/> "; echo "[size="1"]<anchor>Send<go href=\"popup.php?action=sendto&who=$who&sid=$sid\" method=\"post\">"; echo "<postfield name=\"msg\" value=\"$(msg)\"/>"; echo "</go></anchor>[/size]"; echo " <a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo "</card>"; } else if($action=="sendto") { addonline(getuid_sid($sid),"Sending pop-up MSG",""); echo "<card id=\"main\" title=\"Send Pop-up\">"; echo "<p align=\"center\">"; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $tm = time(); $res = mysql_query("INSERT INTO popup SET text='".$msg."',byuid='".$byuid."', touid='".$who."', timesent='".$tm."'"); echo "Popup Message Sent to $whonick! "; echo " <a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo "</card>"; } ?> </wml>
demo url http://bdfun.co.cc/wap
Comment
-
i got one more little problem wen i send popup the person that get the popup get error
XML Parsing Error: not well-formed
Location: http://sitenameinfo/index.php?action=main&...2c0d29d898cb98f
Line Number 12, Column 56:Location: http://sitename/index.php?action=main&...2c0d29d898cb98f
-------------------------------------------------------^
Comment
-
use this pop.phpCode:<?php $uid = getuid_sid($sid); $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM popup WHERE touid='".$uid."' AND unread='1'")); if($nopop[0]>0) { $sql ="SELECT * FROM popup 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 popup WHERE touid='".$uid."'")); if($uid==$id[0]) { $chread = mysql_query("UPDATE popup SET unread='0' WHERE id='".$pop[0]."'"); } $dtop = date("d/m/y - H:i:s a",$pop[5]); $by = getnick_uid($pop[2]); $msg = parsepm($pop[1], $sid); echo " [b]Popup-PM by $by: $dtop $msg [/b] "; echo "<a href=\"popup.php?action=send&who=$pop[2]&sid=$sid\">RELPY</a>"; echo " ======="; } } echo " "; ?>
Comment
-
Let me make everything very easy for you guys, ill share my xhtml popups and archive
after im done with my new script ill share my old lava edit.
Ok now...
popus.php
Code:<? echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <?php include("config.php"); include("core.php"); //session_start(); echo "<head>\n"; echo "<title>jerrele</title>\n"; echo '<style type="text/css"> body { background-color: #000000; font-family : Verdana, Arial, Helvetica, sans-serif; font-size: small; margin: 0px; padding: 2px; color: #FFFFFF; } input { color: #000000; background-color: #f6f6f6; font-size: [img]http://www.2wap.org/forums/style_emoticons/<#EMO_DIR#>/tease.gif[/img]t; border-bottom:#0099FF1px solid; border-left:#0099FF1 1px solid; border-right:#0099FF1 1px solid; border-top:#0099FF1 1px solid } p {padding:0px;margin: 0px 0px 0px 0px;} input,select { color: #3A3A3A; } a, a:active { color: #B36B00; } a:visited { color: #805600; } a:hover { color: #C4C400; } head { font-family : Verdana, Arial, Helvetica, sans-serif; font-size: small; } img { border: 0; } div.ahblock2 { margin: 2px 0px 2px 0px; padding: 0px 0px 0px 0px; color: #F00; background-color: #1F1F1F; border: 1px solid #3A3A3A; text-align: center; } a.nav, a.nav:active {color: #993300;} a.nav:visited {color: #993333;} a.nav:hover {color: #CC0000;} hr { background-color: #993333; color: #993333; border: none; height: 1px; } </style>'; echo "<meta name=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n"; echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />\n"; echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n"; echo "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n"; echo "<meta name=\"title\" content=\"jerrele\" />\n"; echo "<meta name=\"robots\" content=\"index, follow\" />\n"; echo "<meta name=\"revisit-after\" content=\"7\" />\n"; echo "</head>\n <body>\n"; connectdb(); $action = $_GET['action']; $sid = $_GET['sid']; $page = $_GET['page']; $who = $_GET['who']; $pmid = $_GET['pmid']; if(islogged($sid)==false) { echo "<div class=\"ahblock2\">"; getAd(); echo "</div>"; 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 "</body>"; echo "</html>"; exit(); } $uid = getuid_sid($sid); if(isbanned($uid)) { echo "<div class=\"ahblock2\">"; getAd(); echo "</div>"; echo "<p align=\"center\">"; echo "<img src=\"images/notok.gif\" alt=\"x\"/> "; echo "You are [b]Banned[/b] "; $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 "</body>"; echo "</html>"; exit(); } else if($action=="send") { addonline(getuid_sid($sid),"Sending pop-up MSG",""); echo "<div class=\"ahblock2\">"; getAd(); echo "</div>"; 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/ok.gif\" alt=\"O\"/> "; echo "Popup Message Sent to $whonick! "; echo " --- <a href=\"index.php?action=main&sid=$sid\">Home</a>"; echo "</p>"; echo "<div class=\"ahblock2\">"; getAd(); echo "</div>"; echo "</body>"; echo "</html>"; exit(); } else if($action=="sendto"){ $who = $_get['who']; addonline(getuid_sid($sid),"Sending pop-up MSG",""); echo "<div class=\"ahblock2\">"; getAd(); echo "</div>"; echo "<p align=\"center\">"; echo "$getbuttons "; $who = $_get['who']; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); echo "<form action=\"popus.php?action=send&who=$who&sid=$sid\" method=\"post\">"; echo "<input name=\"msg\" maxlength=\"150\"/> "; echo "<input type=\"submit\" value=\"Send\"></form>"; echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>"; } echo "</p>"; echo "<div class=\"ahblock2\">"; getAd(); echo "</div>"; echo "</body></html>"; ?>
Code:<?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 "(!)Popup"; echo " [b]$by:[/b] $msg "; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); echo "<form action=\"popus.php?action=send&who=$who&sid=$sid&who=$pop[2]\" method=\"post\">"; echo "<input name=\"msg\" maxlength=\"150\"/> "; echo "<input type=\"submit\" value=\"Send Popup\"></form>"; echo "--- "; } } ?>
Code:else if($action=="archive") { $who = $_GET["who"]; addonline(getuid_sid($sid),"Pop Up History",""); if (mypro(getuid_sid($sid), $who)) { echo "<div class=\"ahblock2\">"; getAd(); echo "</div>"; $uid = getuid_sid($sid); if($page=="" || $page<=0)$page=1; $myid = getuid_sid($sid); $pms = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_pops WHERE touid=$uid ORDER BY timesent")); echo mysql_error(); $num_items = $pms[0]; //changable $items_per_page= 10; $num_pages = ceil($num_items/$items_per_page); if($page>$num_pages)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; if($num_items>0) { echo " "; $pms = mysql_query("SELECT byuid, touid, text, timesent FROM fun_pops WHERE touid=$uid ORDER BY timesent DESC LIMIT $limit_start, $items_per_page"); while($pm=mysql_fetch_array($pms)) { if(isonline($pm[0])) { $onlby = "<img src=\"images/onl.gif\" alt=\"+\"/>"; }else{ $onlby = "<img src=\"images/ofl.gif\" alt=\"-\"/>"; } if(isonline($pm[1])) { $onlto = "<img src=\"images/onl.gif\" alt=\"+\"/>"; }else{ $onlto = "<img src=\"images/ofl.gif\" alt=\"-\"/>"; } $bylnk = "<a href=\"index.php?action=viewuser&who=$pm[0]&sid=$sid\">".getnick_uid($pm[0])."</a>"; //$tolnk = "<a href=\"index.php?action=viewuser&who=$pm[1]&sid=$sid\">$onlto".getnick_uid($pm[1])."</a>"; echo "$bylnk "; $tmopm = date("D d M y - h:i:s",$pm[3]); echo " $tmopm "; echo parsepm($pm[2], $sid); echo " [size="1"]---[/size] "; } echo "</p><p align=\"center\">"; if($page>1) { $ppage = $page-1; echo "<a href=\"lists.php?action=archive&page=$ppage&sid=$sid&who=$who\">«Prev</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"lists.php?action=archive&page=$npage&sid=$sid&who=$who\">Next»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { $rets = "<form action=\"lists.php\" method=\"get\">"; $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>"; $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>"; $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"; $rets .= "<input type=\"submit\" value=\"Go To Page\"/>"; $rets .= "</form>"; echo $rets; } }else{ echo "<p align=\"center\">"; echo "NO DATA"; } echo "</p>"; echo "<p align=\"center\">"; $unick = getnick_uid($who); echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo "<div class=\"ahblock2\">"; getAd(); echo "</div>"; echo "</body>"; }else{ echo "<div class=\"ahblock2\">"; getAd(); echo "</div>"; echo "<p align=\"center\">"; echo "This is NOT your pop up archive! "; echo " "; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/> Home</a>"; echo "</p>"; echo "<div class=\"ahblock2\">"; getAd(); echo "</div>"; echo "</body>"; } }
Code:function mypro($uid, $tid) { if($uid==$tid) { return true; } }
Might need some editing...
Enjoy.
Comment
Comment