PHP Classes
elePHPant
Icontem

File: getimgvote.php

Recommend this page to a friend!
  Classes of Nguyen Duy Quang  >  Vote Image  >  getimgvote.php  >  Download  
File: getimgvote.php
Role: Example script
Content type: text/plain
Description: Get the image vote from class
Class: Vote Image
Generate images to render the average of votes
Author: By
Last change:
Date: 8 years ago
Size: 841 bytes
 

Contents

Class file image Download
<?php
   
/*
    - Title: Draw heart vote system.
    - File name: imgvote.php.
    - Author: Nguyen Duy Quang.
    - Version: 1.0
    - Description: Get image vote from class.
    - Start date: 10-08-2007.
    - Change date: 10-08-2007.
    - Last change: [None]
    */
    /*
    Include this file any where by tag img and src="imgvote.php?noa=7&no=5" on html page
    */
   
include ("./cls.vote.php");
   
header("Content-type: image/png");
   
header("Content-Disposition: ; filename=stars$percent"."per.png;");
   
header("Expires: 0");
   
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
   
header("Pragma: public");
   
   
$numofall = $_GET[noa];
   
$numof = $_GET[no];
   
$objIVote = new image4vote();
   
$img = $objIVote->drawIVote($numofall, $numof, "heartblank.png", "heartfill.png");
   
imagepng($img);
   
   
// free memory
   
imagedestroy($img);
?>