PHP Classes
elePHPant
Icontem

File: awfDialog/lib/image2.php

Recommend this page to a friend!
  Classes of AW Ford  >  awfDialog Wizard  >  awfDialog/lib/image2.php  >  Download  
File: awfDialog/lib/image2.php
Role: Auxiliary script
Content type: text/plain
Description: class dependency
Class: awfDialog Wizard
Generate wizard-like Web user interface using AJAX
Author: By
Last change:
Date: 12 years ago
Size: 1,037 bytes
 

 

Contents

Class file image Download
<?php
   
if($_GET['from']==""){
       
//missing hex value;
       
exit;
    }
    if(
$_GET['to']==""){
       
//missing hex value;
       
exit;
    }
    if(
$_GET['w']==""){
       
//missing width value;
       
exit;
      }
    if(
$_GET['h']==""){
       
//missing width value;
       
exit;
      }

   
    require
"class.gradient_image.php";

   
$fade_from=$_GET['from'];
   
$fade_to=$_GET['to'];
        
   
$width= $_GET['w'];
   
   
$height= $_GET['h'];
   
   
$direction= $_GET['d'];
    if (
$direction=='true') {
       
$direction=true;
    } else {
       
$direction=false;
    }

    function
Is_OddNum($num){
        if (
$num % 2) {
            return
true;
        } else {
            return
false;
        }
    }
   
   
$mod = $height;
    if (
Is_OddNum($mod)) $mod--;
      
   
$steps=$mod / 2;
   
   
$gradient = new gradient_image($fade_from, $fade_to, $steps, $width, $height);
   
$im = $gradient->createImage($direction);
   
$gradient->createPNG($im, true);

?>