Login   Register  
PHP Classes
elePHPant
Icontem

File: example.add.rank

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Botnari Constantin  >  Page Rating Class  >  example.add.rank  >  Download  
File: example.add.rank
Role: Example script
Content type: text/plain
Description: Example of adding ranking to a page
Class: Page Rating Class
Collect ratings given to pages by site users
Author: By
Last change:
Date: 2007-06-16 05:34
Size: 725 bytes
 

Contents

Class file image Download
<?
include 'rating.class.php';
include 
'database.class.php';

extract($_GET);
extract($_POST);

   
$db = new myDB('root','q1w2e3r4','temp','localhost');
   
$db->connect();
   
$rate = new Rating($id$_SERVER['HTTP_REFERER'], $vot);

//Contorizeaza de cite ori a fost vizualizat acest document
$rate->newhint();

//Adauga votul nou efectuat
$rate->addVot();

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?=$rate->ratingForm()?>
</body>
</html>