File:  [mozdev] / check4change / www / feedback.html
Revision 1.51: download - view: text, annotated - select for diffs - revision graph
Thu Feb 24 12:54:34 2011 UTC (6 years, 9 months ago) by ronen
Branches: MAIN
CVS tags: HEAD
*** empty log message ***

<?php
//error_reporting(E_ALL); ini_set('display_errors', True);

  $email = $_REQUEST['email'] ;
  $message = $_REQUEST['message'] ;
  $type = $_REQUEST['type'];
  $stats = $_REQUEST['stats'];

  if ($stats) {
	$stats = base64_decode($stats);
	
  	$statsO = json_decode($stats); 
	$statsA = array();
	foreach ($statsO as $key=>$value) {
		  if ($key == "zzz_EXTENSIONS") {
		    $res = "\n";
			foreach ($value as $ext) {
			   $res .= $ext->name . " ". $ext->version . " " . $ext->id ."\n";
			}
			$value = $res;
		  }
		  
  		  if ($key == "stats.installDate") {
			$value2 = date("d/m/Y", floatval($value)/1000);
			$key2 = "zz_Install Date";
			$statsA[$key2] = $value2;
		  }	
		  
          $statsA[$key] = $value;

	}
	ksort($statsA);
	
	$res = "";
	foreach ($statsA as $key=>$value) {
		$res .= $key . " : " . $value . "\n";
	}
    $stats = $res;
/*	
	$stats = substr($stats,1,-1); //remove {}
	$a = explode(",", $stats);
	sort($a);
	$stats = implode("\n", $a);
*/	
  }	

  

  if (!isset($_REQUEST['email'])) {
   ?>

  <br>
   <h1>Feedback Form</h1>
  <br>
  Any questions, comments, bug reports, feature requests, and general words of praise or ridicule are most welcome.
  <br>
  <br>

    <form method="post" action="feedback.html">


    <strong>Feedback Type: </strong>
    <select name="type">
    <option>please select</option>
    <option>--------------------</option>
    <option>Bug Report</option>
    <option>Feature Request</option>
    <option>Tailor-Made Development</option>
    <option>Thank You</option>
    <option>Question</option>
    <option>Comment</option>
    <option>Praise</option>
    <option>Ridicule</option>
    <option>Marriage Proposal</option>
    <option>Million Dollar Donation</option>
    <option>Other</option>




    </select>
    <br>
        <br>


    <strong>Your Email:  </strong><input type="text" name="email" />
    <small>
    <br>
    This is optional. Please provide if you want a reply. It won't appear anywhere...
    </small>
    <br><br>
    <strong>Message:</strong>
    <br>
    <textarea name="message" rows="15" cols="40"></textarea><br>
    <br>
    <input type="submit" value="Send Feedback" />

	<input name="stats" type="hidden" id="__c4cstats"/>


    </form>


    <?php
  } else {

$ip = $_SERVER['REMOTE_ADDR'];
/*
error_reporting(E_ALL); ini_set('display_errors', True);
include("geoip.inc");
$gi = geoip_open("GeoIP.dat",GEOIP_STANDARD);
$country = geoip_country_name_by_addr($gi, $_SERVER['REMOTE_ADDR']);
geoip_close($gi);

	mail("ronen.zilberman@gmail.com", "check4change feedback: $type",
	  "From $country | IP ".$_SERVER['REMOTE_ADDR']." referer = ".$_SERVER['HTTP_REFERER'], "From: $email");
*/

    mail( "ronen.zilberman@gmail.com", "check4change feedback: $type",
      "$message\n --- \n\n\n IP $ip \n\n$stats", "From: $email" );

    ?>

   <br> <br> <br>
   <h1>Thank you for your feedback!</h1>
   <br/>
   <br/>
   <p>
<b>If you use Check4Change often and find it useful, consider supporting its future development with a donation.</b><br/>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="3MYXHQ8GGYVBY">
<input type="image" src="http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<br/>
As a supporting user, your requested features receive high priority in the projects's to-do list, so please provide them.<br/>
If these features seem too task-specific, I might be able to provide you with a customized version.

    </p>
    <?php
  }
?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>