PHP ¿Í JQuery ¸¦ ÀÌ¿ëÇÏ¿© ÂÊÁö Æ˾÷ ¾Ö´Ï¸ÞÀ̼ÇÀ» Ãâ·ÂÇÏ´Â ¼Ò½º ÀÔ´Ï´Ù.
ÀÌ ¼Ò½º´Â ¿¹Á¦¸¦ À§ÇØ 1°³ÀÇ ÆÄÀÏ·Î ±¸¼º µÇ¾î ÀÖÀ¸¸ç,
´Ù¸¥ ÆÄÀÏ¿¡ include ÇÏ¿© ÀÀ¿ëÀÌ °¡´ÉÇÕ´Ï´Ù.
ÆÄÀÏÀÇ ¼Ò½º Áß DB Á¢¼Ó ºÎºÐ ÁÖ¼®Ã³¸®¸¦ ÇØÁ¦ÇÏ°í DB Á¤º¸¸¦ ÀÔ·ÂÇÑ ´ÙÀ½
MySql Äõ¸®¹®À» ÀÛ¼ºÇÏ¿© »ç¿ëÇÏ¸é µË´Ï´Ù.
<?
/*
$db_host = 'localhost'; #DBÈ£½ºÆ®
$db_user = ''; #DB¾ÆÀ̵ð
$db_pass = ''; #DBÆнº¿öµå
$db_name = ''; #DB¸í
#DB Á¢¼Ó
$db = @mysql_connect($db_host, $db_user, $db_pass);
@mysql_select_db($db_name, $db);
$Sql = "SELECT * FROM message_tb WHERE read = 'n' ";
$Result = mysql_query($Sql);
$¸Þ½ÃÁö¼ö = mysql_num_rows($Result);
*/
$¸Þ¼¼Áö¼ö = 1;
if ( $¸Þ¼¼Áö¼ö > 0 )
{
?>
<script>
jQuery(document).ready(function(){
jQuery("body").animate({scrollTop:0},"slow",function(){ setTimeout(message_layer_open,200) } )
});
$('#message_close').click(function(){
$('.message_layer').css('display', 'none');
});
</script>
<?
}
?>
|