发表时间:2015-05-27来源:网络
/* * _survey 得到一个投票的圆饼图* @access public 表示函数对外公开* @param $_agree 同意票数* @param $_disagree 反对票数* return 一张统计圆饼图* */function _vote($_agree,$_disagree){ //处理参数 if($_agree==0&&$_disagree==0){ $_vote = 270; } if($_agree==0&&$_disagree!=0){ $_vote = 91; } if($_agree!=0&&$_disagree==0){ $_vote = 89; } if($_agree!=0&&$_disagree!=0){ $_vote = intval(360*($_agree/($_agree+$_disagree))+90); } //创建画布 $_img=imagecreatetruecolor(150,100); //填充透明背景 imagealphablending($_img, false); imagesavealpha($_img, true); $white = imagecolorallocatealpha($_img,255,255,255,127); imagefill($_img,0,0,$white); //创建颜色 $_green=imagecolorallocate($_img,180,210,52); $_blue=imagecolorallocate($_img,83,201,237); $_gary=imagecolorallocate($_img,192,192,192); $_green1=imagecolorallocate($_img,149,178,36); $_blue1=imagecolorallocate($_img,41,160,193); $_gary1=imagecolorallocate($_img,144,144,144); for($i=60;$i>=50;$i--){ imagefilledarc($_img,100,$i,100,50,90,$_vote,$_blue1,IMG_ARC_PIE); imagefilledarc($_img,100,$i,100,50,$_vote,90,$_green1,IMG_ARC_PIE); } imagefilledarc($_img,100,$i,100,50,90,$_vote,$_blue,IMG_ARC_PIE); imagefilledarc($_img,100,$i,100,50,$_vote,90,$_green,IMG_ARC_PIE); header("content-type: image/png"); imagepng($_img); imagedestroy($_img);}
CI框架连接数据库配置操作以及多数据库操作
asp 简单读取数据表并列出来 ASP如何快速从数据库读取大量数据
C语言关键字及其解释介绍 C语言32个关键字详解
C语言中sizeof是什么意思 c语言里sizeof怎样用法详解
PHP中的魔术方法 :__construct, __destruct , __call, __callStatic,__get, __set, __isset, __unset , __sleep,
将视频设置为Android手机开机动画的教程
PHP中的(++i)前缀自增 和 (i++)后缀自增
常用dos命令及语法
最简单的asp登陆界面代码 asp登陆界面源代码详细介绍
PHP中include和require区别之我见
皓盘云建最新版下载v9.0 安卓版
53.38MB |商务办公
ris云客移动销售系统最新版下载v1.1.25 安卓手机版
42.71M |商务办公
粤语翻译帮app下载v1.1.1 安卓版
60.01MB |生活服务
人生笔记app官方版下载v1.19.4 安卓版
125.88MB |系统工具
萝卜笔记app下载v1.1.6 安卓版
46.29MB |生活服务
贯联商户端app下载v6.1.8 安卓版
12.54MB |商务办公
jotmo笔记app下载v2.30.0 安卓版
50.06MB |系统工具
鑫钜出行共享汽车app下载v1.5.2
44.7M |生活服务
2022-03-21
2022-03-20
2014-09-05
2014-09-05
2022-03-24
2015-07-05
2014-09-05
2014-09-05
2014-09-05
2022-03-21