| Code: |
| // make sure the user is logged in
if (pnUserloggedin()){ // pre .750 connection // list($dbconn) = pnDBGetConn(); //////////////////////////////////////// // 750+ connection $dbconn =& pnDBGetConn(true); $pntable =& pnDBGetTables(); //////////////////////////////////////// $pntable = pnDBGetTables(); $column = &$pntable['priv_msgs_column']; $result = $dbconn->Execute("SELECT count(*) FROM $pntable[priv_msgs] WHERE $column[read_msg] ='0' and $column[to_userid]='".pnUserGetVar('uid')."'"); list($unread) = $result->fields; if($unread >=1){ echo '<img src="path/to/flashing/image.gif" />'; } } |
| Code: |
|
// make sure the user is logged in if (pnUserloggedin()) { // if code must look in a 3rd party, make sure the module tables are loaded // pnModDBInfoLoad('pmBOX'); $dbconn =& pnDBGetConn(true); $pntable =& pnDBGetTables(); $tbl = $pntable['priv_msgs']; $column = &$pntable['priv_msgs_column']; $result = $dbconn->Execute("SELECT count(*) FROM $tbl WHERE $column[read_msg] = '0' AND $column[to_userid] = '".pnUserGetVar('uid')."'"); list($unread) = $result->fields; if($unread >=1){ echo '<img src="path/to/flashing/image.gif" />'; } } |
| Code: |
|
$tbl = $pntable['priv_msgs']; |
| Code: |
| // make sure the user is logged in
if (pnUserloggedin()) { // if code must look in a 3rd party, make sure the module tables are loaded pnModDBInfoLoad('pmBOX'); $dbconn =& pnDBGetConn(true); $pntable =& pnDBGetTables(); $tbl = $pntable['pn_messenger']; $column = &$pntable['pn_read_msg']; $result = $dbconn->Execute("SELECT count(*) FROM $tbl WHERE $column[read_msg] = '0' AND $column[to_userid] = '".pnUserGetVar('uid')."'"); list($unread) = $result->fields; if($unread >=1){ echo '<img src="path/to/flashing/image.gif" />'; echo 'Unread Messages:'+'$unread'; } } |
| Code: |
|
if($unread >=1){ echo '<img src="path/to/flashing/image.gif" />'; } echo 'Unread Messages: '.$unread; |
| Code: |
|
$result = $dbconn->Execute("SELECT count(*) FROM $tbl WHERE $column[read_msg] = '0' AND $column[to_userid] = '".pnUserGetVar('uid')."'"); if ($dbconn->ErrorNo() != 0) { echo $dbconn->ErrorMsg(); } |
| Code: |
|
$tbl = $pntable['pn_messenger']; $column = &$pntable['pn_read_msg']; |
| Code: |
|
$tbl = &$pntable['messenger']; $column = &$pntable['messenger_column']; |
| Code: |
|
// make sure the user is logged in if (pnUserloggedin()) { // if code must look in a 3rd party, make sure the module tables are loaded pnModDBInfoLoad('Messenger'); $dbconn =& pnDBGetConn(true); $pntable =& pnDBGetTables(); $tbl = $pntable['messenger']; $column = &$pntable['messenger_column']; $result = $dbconn->Execute("SELECT count(*) FROM $tbl WHERE $column[read_msg] = '0' AND $column[to_userid] = '".pnUserGetVar('uid')."'"); // if ($dbconn->ErrorNo() != 0) { // echo $dbconn->ErrorMsg(); // } list($unread) = $result->fields; if($unread >=1){ echo '<img src="path/to/flashing/image.gif" />'; } echo 'Unread Messages: '.$unread; } |