how to make automessage for book in lavalair? How can I make every time someone signs the book user the owner of that book arrives an automated message warning .Thanks to anyone who helps me
how to make automessage for book in lavalair?
Collapse
X
-
Add it to ur site easy.
$pm = who("who[0]","$by");
sql = mysql_query("INCLUDE NOOB_BASE where id,user ORDER BY id='$id'");
thats not how it is but you got a idea..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...
_______
Info & Tips
php.net
w3schools.com
-
subzero in which file? I had tried to do that long ago for the blog comments and made me ghost message
PHP Code:$byuid = getuid_sid($sid);
$pmtext = "<b>".$did."</b></u><br/><b>".$uid." Comment on your blog [br/][br/][small] This is an automated message, and do not respond to it [/small]";
$tm = time();
$res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$did."', touid='".$who."', timesent='".$tm."'");
Comment
-
Originally posted by LadyEnigma View Postsubzero in which file? I had tried to do that long ago for the blog comments and made me ghost message
PHP Code:$byuid = getuid_sid($sid);
$pmtext = "<b>".$did."</b></u><br/><b>".$uid." Comment on your blog [br/][br/][small] This is an automated message, and do not respond to it [/small]";
$tm = time();
$res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$did."', touid='".$who."', timesent='".$tm."'");
Comment
-
Originally posted by thanatos View Postppl will never learn if they always depend on others. try learning php and mysql and see for urslf wat u cn accomplish with it
Comment
-
Originally posted by wap_king View Postpost the the guestbook coding and the genproc coding has wellPHP Code:else if($action=="gbook")
{
$who = $_GET["who"];
$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
addonline(getuid_sid($sid),"sta guardando il Guestbook ($mmsg)","");
echo "<head>";
echo "<title>guestbook</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_gbook WHERE gbowner='".$who."'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT gbowner, gbsigner, gbmsg, dtime, id FROM ibwf_gbook WHERE gbowner='".$who."' ORDER BY dtime DESC LIMIT $limit_start, $items_per_page";
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isonline($item[1]))
{
$iml = "<img src=\"../images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"../images/ofl.gif\" alt=\"-\"/>";
}
$snick = getnick_uid($item[1]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[1]&sid=$sid\">$iml$snick</a>";
$bs = date("d m y-H:i:s",$item[3]);
echo "$lnk<br/><small>";
if(candelgb($uid, $item[4]))
{
$delnk = "<a href=\"genproc.php?action=delfgb&sid=$sid&mid=$item[4]\">[x]</a>";
}else{
$delnk = "";
}
$text = parsepm($item[2], $sid);
echo "$text<br/>$bs $delnk<br/>";
echo "</small>";
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">«Indietro</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">Avanti»</a>";
}
echo "<br/>$page/$num_pages<br/>";
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=\"hidden\" name=\"who\" value=\"$who\"/>";
$rets .= "<input type=\"submit\" value=\"vai a pagina\"/>";
$rets .= "</form>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
if(cansigngb($uid, $who))
{
echo "<a href=\"index.php?action=signgb&sid=$sid&who=$who\">Aggiungi tuo Messaggio</a><br/>";
}
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
PHP Code:else if($action=="signgb")
{
$who = $_POST["who"];
if(!cansigngb(getuid_sid($sid), $who))
{
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "You cant Sign this user guestbook<br/><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
$msgtxt = $_POST["msgtxt"];
//$qut = $_POST["qut"];
addonline(getuid_sid($sid),"Signing a guestbook","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$crdate = time();
//$uid = getuid_sid($sid);
$res = false;
if(trim($msgtxt)!="")
{
$res = mysql_query("INSERT INTO ibwf_gbook SET gbowner='".$who."', gbsigner='".$uid."', dtime='".$crdate."', gbmsg='".$msgtxt."'");
}
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Message Posted Successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Posting Message";
}
echo "<br/><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
PHP Code://////////////////////////////////////////Guestbook
else if($action=="signgb")
{
$who=$_GET["who"];
addonline(getuid_sid($sid),"Signing Users guestbook","");
if(!cansigngb(getuid_sid($sid), $who))
{
echo "<head>";
echo "<title>Firma Guestbook</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "Puoi firmare questo guestbook<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
echo "<head>";
echo "<title>Firma Guestbook</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<form action=\"genproc.php?action=signgb&sid=$sid\" method=\"post\">";
echo "<input type=\"hidden\" name=\"who\" Value=\"$who\">";
echo "Testo:<input name=\"msgtxt\" maxlength=\"500\"/><br/>";
echo "<input type=\"Submit\" name=\"Add\" Value=\"Add\"></form>";
echo "<br/><br/><b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
Comment
-
no problem just replace ur genproc with this one
PHP Code:else if($action=="signgb")
{
$who = $_POST["who"];
if(!cansigngb(getuid_sid($sid), $who))
{
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "You cant Sign this user guestbook<br/><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
$msgtxt = $_POST["msgtxt"];
//$qut = $_POST["qut"];
addonline(getuid_sid($sid),"Signing a guestbook","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$crdate = time();
//$uid = getuid_sid($sid);
$res = false;
if(trim($msgtxt)!="")
{
$res = mysql_query("INSERT INTO ibwf_gbook SET gbowner='".$who."', gbsigner='".$uid."', dtime='".$crdate."', gbmsg='".$msgtxt."'");
}
if($res)
{
$user = getnick_sid($sid);
$msg = " $user signed your guestbook: $msgtxt";
mysql_query("INSERT INTO ibwf_private SET text='".$msg."', byuid='$uid', touid='".$who."', unread='1', timesent='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Message Posted Successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Posting Message";
}
echo "<br/><br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
Last edited by metulj; 03.07.10, 06:21.
Comment
Comment