It's as simple as this:
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<?php defined( 'COT_CODE' ) or die ( 'Wrong URL.' );
if ( $usr [ 'id' ] > 0 && COT_AJAX)
{
require_once cot_incfile( 'pm' , 'module' );
if ( $usr [ 'newpm' ])
{
echo json_encode( $db ->query( "SELECT * FROM $db_pm WHERE pm_touserid=? AND pm_tostate=0" , $usr [ 'id' ])->fetchAll());
}
}
|
May the Source be with you!