װ



=============================================================================
1. ִSQL䣬ratings
CREATE TABLE `ratings` (
  `id` varchar(11) NOT NULL,
  `total_votes` int(11) NOT NULL default 0,
  `total_value` int(11) NOT NULL default 0,
  `used_ips` longtext,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM AUTO_INCREMENT=3;


=============================================================================
2. ޸ _config-rating.php
=============================================================================
	$dbhost        = 'localhost';
	$dbuser        = '###';
	$dbpass        = '###';
	$dbname        = '###';
	$tableName     = 'ratings';
	$rating_unitwidth     = 30;


=============================================================================
3. Ҫʾҳ涥
=============================================================================
<!--code.start-->?php require('_drawrating.php'); ?<!--code.end-->


=============================================================================
4. ӵҪʾҳ
=============================================================================
<script type="text/javascript" language="javascript" src="js/behavior.js"></script>
<script type="text/javascript" language="javascript" src="js/rating.js"></script>
<link rel="stylesheet" type="text/css" href="css/rating.css" />

PS:޸·


=============================================================================
5. ´ʾ
=============================================================================

<!--code.start-->?php echo rating_bar('[!--id--]'); ?<!--code.end--> - Ĭʾ10
ֻʾ5ļֻҪ·ʽã
<!--code.start-->?php echo rating_bar('[!--id--]''5'); ?<!--code.end--> 

enjoy it:)









1. ִSQL䣬ratings
CREATE TABLE `ratings` (
  `id` varchar(11) NOT NULL,
  `total_votes` int(11) NOT NULL default 0,
  `total_value` int(11) NOT NULL default 0,
  `used_ips` longtext,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM AUTO_INCREMENT=3;


=======================================================
2. ޸ _config-rating.php
=======================================================
        $dbhost        = 'localhost';
        $dbuser        = '###';
        $dbpass        = '###';
        $dbname        = '###';
        $tableName     = 'ratings';
        $rating_unitwidth     = 30;


=======================================================
3. Ҫʾҳ涥
=======================================================
<!--code.start-->?php require('_drawrating.php'); ?<!--code.end-->


=======================================================
4. ӵҪʾҳ
=======================================================
<script type="text/javascript" language="javascript" src="js/behavior.js"></script>
<script type="text/javascript" language="javascript" src="js/rating.js"></script>
<link rel="stylesheet" type="text/css" href="css/rating.css" />

PS:޸·


=======================================================
5. ´ʾ
=======================================================

<!--code.start-->?php echo rating_bar('[!--id--]'); ?<!--code.end--> - Ĭʾ10
ֻʾ5ļֻҪ·ʽã
<!--code.start-->?php echo rating_bar('[!--id--]''5'); ?<!--code.end--> 

enjoy it:)



ʾhttp://www.she.vc/ajaxrating.php
