How can I insert:
// Limit notification summary to how many characters?
$jQNlimit = 100;
$jQNMemberID = (int)$_COOKIE['memberID'];
$jQN_recipient_result = mysql_query("SELECT * FROM Messages WHERE New='1' AND Recipient='$jQNMemberID'");
while($jQN_recipient_row = mysql_fetch_array($jQN_recipient_result)){
$jQN_sender_result = mysql_query("SELECT * FROM Profiles WHERE ID='$jQN_recipient_row[Sender]'");
while($jQN_sender_row = mysql_fetch_array($jQN_sender_result)){
//////////////////////////////////
/////// Notification Parts ///////
//////////////////////////////////
$jQNmessageid = $jQN_recipient_row['ID'];
$jQNsubject = $jQN_recipient_row['Subject'];
$jQNsummary = $jQN_recipient_row['Text'];
$jQNsender = $jQN_sender_row['NickName'];
$jQNsenderPic = $jQN_sender_row['Picture'];
}
if (strlen($jQNsummary) > $jQNlimit)
$jQNsummary = substr($jQNsummary, 0, strrpos(substr($jQNsummary, 0, $jQNlimit), ' ')) . '...';
echo '
<script type="text/javascript">
$(\'document\').ready(function(){
// You can have it return a unique id, this can be used to manually remove it later using
/*
$.gritter.remove(unique_id, {
fade: true,
speed: \'fast\'
}
);
*/
var unique_id = $.gritter.add({
// (string | mandatory) the heading of the notification
title: \'' . $jQNsender . ': <a href="http://cms.aofgc.org/messages_inbox.php?message=' . $jQNmessageid . '">' . $jQNsubject . '</a>\',
// (string | mandatory) the text inside the notification
text: \'' . $jQNsummary . '\',
// (string | optional) the image to display on the left
image: \'http://cms.aofgc.org/templates/tmpl_uni/images/icons/man_small.gif\',
// (bool | optional) if you want it to fade out on its own or just sit there
sticky: true,
// (int | optional) the time you want it to be alive for before fading out
time: \'\'
});
return false;
});
</script>
';
}
in to a MYSQL with PHP? I've got:
mysql_query("INSERT INTO PageCompose (ID, Page, PageWidth, Desc, Caption, Column, Order, Func, Content, DesignBox, ColWidth, Visible, MinWidth)
VALUES ('98', 'member', '960px', 'jQuery Notify', 'jQuery Mail Notifier', '1', '0', 'PHP', 'BLANK', '0', '50', 'memb', '0')");
but if i insert the above code in place of BLANK it won't write to the database properly will it?
// Limit notification summary to how many characters?
$jQNlimit = 100;
$jQNMemberID = (int)$_COOKIE['memberID'];
$jQN_recipient_result = mysql_query("SELECT * FROM Messages WHERE New='1' AND Recipient='$jQNMemberID'");
while($jQN_recipient_row = mysql_fetch_array($jQN_recipient_result)){
$jQN_sender_result = mysql_query("SELECT * FROM Profiles WHERE ID='$jQN_recipient_row[Sender]'");
while($jQN_sender_row = mysql_fetch_array($jQN_sender_result)){
//////////////////////////////////
/////// Notification Parts ///////
//////////////////////////////////
$jQNmessageid = $jQN_recipient_row['ID'];
$jQNsubject = $jQN_recipient_row['Subject'];
$jQNsummary = $jQN_recipient_row['Text'];
$jQNsender = $jQN_sender_row['NickName'];
$jQNsenderPic = $jQN_sender_row['Picture'];
}
if (strlen($jQNsummary) > $jQNlimit)
$jQNsummary = substr($jQNsummary, 0, strrpos(substr($jQNsummary, 0, $jQNlimit), ' ')) . '...';
echo '
<script type="text/javascript">
$(\'document\').ready(function(){
// You can have it return a unique id, this can be used to manually remove it later using
/*
$.gritter.remove(unique_id, {
fade: true,
speed: \'fast\'
}
);
*/
var unique_id = $.gritter.add({
// (string | mandatory) the heading of the notification
title: \'' . $jQNsender . ': <a href="http://cms.aofgc.org/messages_inbox.php?message=' . $jQNmessageid . '">' . $jQNsubject . '</a>\',
// (string | mandatory) the text inside the notification
text: \'' . $jQNsummary . '\',
// (string | optional) the image to display on the left
image: \'http://cms.aofgc.org/templates/tmpl_uni/images/icons/man_small.gif\',
// (bool | optional) if you want it to fade out on its own or just sit there
sticky: true,
// (int | optional) the time you want it to be alive for before fading out
time: \'\'
});
return false;
});
</script>
';
}
in to a MYSQL with PHP? I've got:
mysql_query("INSERT INTO PageCompose (ID, Page, PageWidth, Desc, Caption, Column, Order, Func, Content, DesignBox, ColWidth, Visible, MinWidth)
VALUES ('98', 'member', '960px', 'jQuery Notify', 'jQuery Mail Notifier', '1', '0', 'PHP', 'BLANK', '0', '50', 'memb', '0')");
but if i insert the above code in place of BLANK it won't write to the database properly will it?