热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

没有简历?new一个!-PHP源码

没有简历?new一个!
info();
	$vitae['Experience'] = $Programmer->Experience();
	$vitae['Introduction'] = $Programmer->Introduction();
	$vitae['Item'] = $Programmer->Item();
	new Img($vitae);
}
class Img{
	const imgWidth = '1700';	
	const imgHeight = '1600';	
	const font_file = "c:\\WINDOWS\\Fonts\\simhei.ttf";		//LINUX自己换字体
	
	function __construct($content){
		$img = imagecreate(Img::imgWidth, Img::imgHeight);	
		imagecolorallocate($img, 255, 255, 255);
		$color = imagecolorallocate($img,0,0,0);
		$this->table($img , $color);
		$this->photo($img , $color);
		$this->title($img , $color);
		$this->info($img , $content['Info'] , $color);
		$this->Introduction($img , $content['Introduction'] , $color);
		$this->Experience($img , $content['Experience'] , $color);
		$this->Item($img , $content['Item'] , $color);
		$this->wateryin($img , $color);
		imagepng($img);
	}
	
	public function table($img , $color){
		imageline($img , 300 , 50 , 300 , Img::imgHeight - 50 , $color);					//左边界
		imageline($img , Img::imgWidth - 300 , 50 , Img::imgWidth - 300 , Img::imgHeight - 50 , $color);	//右边界
		imageline($img , 300 , 50 , Img::imgWidth - 300 , 50 , $color);				//上边界
		imageline($img , 300 , Img::imgHeight - 50 , Img::imgWidth - 300 , Img::imgHeight - 50 , $color);				//下边界
		imageline($img , 300 , 130 , Img::imgWidth - 300 , 130 , $color);				//标题
		imageline($img , 300 , 190 , Img::imgWidth - 500 , 190 , $color);				//第一行
		imageline($img , 300 , 250 , Img::imgWidth - 500 , 250 , $color);				//第二行
		imageline($img , 300 , 310 , Img::imgWidth - 300 , 310 , $color);				//第三行
		imageline($img , 300 , 360 , Img::imgWidth - 300 , 360 , $color);				//第三行
		imageline($img , Img::imgWidth-500 , 130 , Img::imgWidth - 500 , 310 , $color);				//photo
		imageline($img , Img::imgWidth-1100 , 130 , Img::imgWidth - 1100 , 310 , $color);				//竖线
		imageline($img , Img::imgWidth-780 , 130 , Img::imgWidth - 780 , 310 , $color);				//竖线
		imageline($img , 300 , 710 , Img::imgWidth - 300 , 710 , $color);				//第四行(介绍)
		imageline($img , 300 , 760 , Img::imgWidth - 300 , 760 , $color);				//第四行(介绍)
		imageline($img , 300 , 1110 , Img::imgWidth - 300 , 1110 , $color);				//第五行(介绍)
		imageline($img , 300 , 1160 , Img::imgWidth - 300 , 1160 , $color);				//第四行(介绍)
	}
	
	public function photo($img , $color){
		imageellipse($img, 1260, 180, 60, 40,$color);				//左眼
		imageellipse($img, 1340, 180, 60, 40,$color);				//右眼
		imagearc($img, 1300, 180, 30, 20,30,150,$color);			//眼镜
		imagearc($img, 1350, 140, 80, 100,0,60,$color);
		imagearc($img, 1235, 130, 50, 110,100,160,$color);
		imagearc($img, 1300, 230, 100, 100, 20, 160,$color);		//以下是嘴巴
		imagearc($img, 1290, 240, 130, 20, 20, 125,$color);
		imagerectangle($img, 1290, 250, 1280, 260,$color);
		imagerectangle($img, 1305, 250, 1295, 260,$color);
		imagerectangle($img, 1310, 250, 1320, 260,$color);
	}
	
	public function title($img , $color){
		imagettftext($img, 20, 0, 780 ,100, $color, Img::font_file, '程序员简历');
		imagettftext($img, 20, 0, 790 ,345, $color, Img::font_file, '工作经历');
		imagettftext($img, 20, 0, 790 ,745, $color, Img::font_file, '项目经验');
		imagettftext($img, 20, 0, 790 ,1145, $color, Img::font_file, '个人简介');
	}
	
	public function info($img , $info , $color){
		foreach($info as $key=>$value){
			switch ($key){
				case "Name":
					imagettftext($img, 15, 0, 350 ,170, $color, Img::font_file, "{$key}:{$value}");		//姓名
					break;
				case "Age":
					imagettftext($img, 15, 0, 630 ,170, $color, Img::font_file, "{$key}:{$value}");		//年龄
					break;
				case "Gender":
					imagettftext($img, 15, 0, 950 ,170, $color, Img::font_file, "{$key}:{$value}");		//性别
					break;
				case "EnglisNname":
					imagettftext($img, 15, 0, 350 ,230, $color, Img::font_file, "{$key}:{$value}");		//English Name
					break;
				case "University":
					imagettftext($img, 15, 0, 630 ,230, $color, Img::font_file, "{$key}:{$value}");		//毕业院校
					break;
				case "Major":
					imagettftext($img, 15, 0, 950 ,230, $color, Img::font_file, "{$key}:{$value}");		//专业
					break;
				case "LivingPlace":
					imagettftext($img, 15, 0, 350 ,290, $color, Img::font_file, "{$key}:{$value}");		//现居地
					break;
				case "Phone":
					imagettftext($img, 15, 0, 630 ,290, $color, Img::font_file, "{$key}:{$value}");		//电话
					break;
				case "Email":
					imagettftext($img, 15, 0, 950 ,290, $color, Img::font_file, "{$key}:{$value}");		//Email
					break;
			}
		}
	}
	
	public function Introduction($img , $Introduction , $color){
		$str = explode('' , $Introduction);
		foreach($str as $key=>$value){
			imagettftext($img, 14, 0, 350 ,1200+$a*35, $color, Img::font_file, $value);
			$a++;
		}
	}
	
	public function Experience($img , $Experience , $color){
		foreach($Experience as $key=>$value){
			imagettftext($img, 14, 0, 350 ,400+$a*35, $color, Img::font_file, $key);
			imagettftext($img, 14, 0, 750 ,400+$a*35, $color, Img::font_file, $value);
			$a++;
		}
	}
	
	public function Item($img , $Item , $color){
		$str = explode('' , $Item);
		foreach($str as $key=>$value){
			imagettftext($img, 14, 0, 350 ,800+$a*35, $color, Img::font_file, $value);
			$a++;
		}
	}
	
	public function wateryin($img , $color){
		$str = 'by:hackpar';
		imagettftext($img, 14, 0, 1450 ,1550, $color, Img::font_file, $str);
	}
	
	
}


class Programmer{
	const Name = 'ZJD';
	const Gender = 'Male';
	const Age = '21';
	const Englishname = 'Hackpar';
	const University = "";
	const Major = 'Software';
	const LivingPlace = "Xi'an";
	const PhOne= '';
	const Email = 'hackpar@gmail.com';
	
	public function info(){
		$info = array(
			'Name'			=>  Programmer::Name,
			'Gender'		=>  Programmer::Gender,
			'Age'			=>  Programmer::Age,
			'EnglisNname'	=>  Programmer::Englishname,
			'University'	=>  Programmer::University,
			'Major'			=>  Programmer::Major,
			'LivingPlace'	=>  Programmer::LivingPlace,
			'Phone'			=>  Programmer::Phone,
			'Email'			=>  Programmer::Email,
		);
		return $info;
	}
	
	public function Experience(){
		$exp = array();
		$exp['2011-04 to 2011-10'] = '';
		$exp['2012-02 to 2012-12'] = '';
		$exp['2013-03 to 2013-06'] = '';
		$exp['2013-07 to now'] = '';
		return $exp;
	}
	
	public function Introduction(){
		$int = '一个苦逼的PHP码农,没有Geek的技术,但是有一颗Geek的心.';
		return $int;
	}
	
	public function Item(){
		$item = '项目介绍';
		return $item;
	}
	
}


?>

推荐阅读
  • Metasploit攻击渗透实践
    本文介绍了Metasploit攻击渗透实践的内容和要求,包括主动攻击、针对浏览器和客户端的攻击,以及成功应用辅助模块的实践过程。其中涉及使用Hydra在不知道密码的情况下攻击metsploit2靶机获取密码,以及攻击浏览器中的tomcat服务的具体步骤。同时还讲解了爆破密码的方法和设置攻击目标主机的相关参数。 ... [详细]
  • 本文介绍了OC学习笔记中的@property和@synthesize,包括属性的定义和合成的使用方法。通过示例代码详细讲解了@property和@synthesize的作用和用法。 ... [详细]
  • 本文详细介绍了Linux中进程控制块PCBtask_struct结构体的结构和作用,包括进程状态、进程号、待处理信号、进程地址空间、调度标志、锁深度、基本时间片、调度策略以及内存管理信息等方面的内容。阅读本文可以更加深入地了解Linux进程管理的原理和机制。 ... [详细]
  • Android源码深入理解JNI技术的概述和应用
    本文介绍了Android源码中的JNI技术,包括概述和应用。JNI是Java Native Interface的缩写,是一种技术,可以实现Java程序调用Native语言写的函数,以及Native程序调用Java层的函数。在Android平台上,JNI充当了连接Java世界和Native世界的桥梁。本文通过分析Android源码中的相关文件和位置,深入探讨了JNI技术在Android开发中的重要性和应用场景。 ... [详细]
  • 本文内容为asp.net微信公众平台开发的目录汇总,包括数据库设计、多层架构框架搭建和入口实现、微信消息封装及反射赋值、关注事件、用户记录、回复文本消息、图文消息、服务搭建(接入)、自定义菜单等。同时提供了示例代码和相关的后台管理功能。内容涵盖了多个方面,适合综合运用。 ... [详细]
  • 本文介绍了Python高级网络编程及TCP/IP协议簇的OSI七层模型。首先简单介绍了七层模型的各层及其封装解封装过程。然后讨论了程序开发中涉及到的网络通信内容,主要包括TCP协议、UDP协议和IPV4协议。最后还介绍了socket编程、聊天socket实现、远程执行命令、上传文件、socketserver及其源码分析等相关内容。 ... [详细]
  • Android中高级面试必知必会,积累总结
    本文介绍了Android中高级面试的必知必会内容,并总结了相关经验。文章指出,如今的Android市场对开发人员的要求更高,需要更专业的人才。同时,文章还给出了针对Android岗位的职责和要求,并提供了简历突出的建议。 ... [详细]
  • Mac OS 升级到11.2.2 Eclipse打不开了,报错Failed to create the Java Virtual Machine
    本文介绍了在Mac OS升级到11.2.2版本后,使用Eclipse打开时出现报错Failed to create the Java Virtual Machine的问题,并提供了解决方法。 ... [详细]
  • 在说Hibernate映射前,我们先来了解下对象关系映射ORM。ORM的实现思想就是将关系数据库中表的数据映射成对象,以对象的形式展现。这样开发人员就可以把对数据库的操作转化为对 ... [详细]
  • 本文介绍了Oracle数据库中tnsnames.ora文件的作用和配置方法。tnsnames.ora文件在数据库启动过程中会被读取,用于解析LOCAL_LISTENER,并且与侦听无关。文章还提供了配置LOCAL_LISTENER和1522端口的示例,并展示了listener.ora文件的内容。 ... [详细]
  • 本文介绍了在Mac上搭建php环境后无法使用localhost连接mysql的问题,并通过将localhost替换为127.0.0.1或本机IP解决了该问题。文章解释了localhost和127.0.0.1的区别,指出了使用socket方式连接导致连接失败的原因。此外,还提供了相关链接供读者深入了解。 ... [详细]
  • Webmin远程命令执行漏洞复现及防护方法
    本文介绍了Webmin远程命令执行漏洞CVE-2019-15107的漏洞详情和复现方法,同时提供了防护方法。漏洞存在于Webmin的找回密码页面中,攻击者无需权限即可注入命令并执行任意系统命令。文章还提供了相关参考链接和搭建靶场的步骤。此外,还指出了参考链接中的数据包不准确的问题,并解释了漏洞触发的条件。最后,给出了防护方法以避免受到该漏洞的攻击。 ... [详细]
  • 本文讨论了在数据库打开和关闭状态下,重新命名或移动数据文件和日志文件的情况。针对性能和维护原因,需要将数据库文件移动到不同的磁盘上或重新分配到新的磁盘上的情况,以及在操作系统级别移动或重命名数据文件但未在数据库层进行重命名导致报错的情况。通过三个方面进行讨论。 ... [详细]
  • 海马s5近光灯能否直接更换为H7?
    本文主要介绍了海马s5车型的近光灯是否可以直接更换为H7灯泡,并提供了完整的教程下载地址。此外,还详细讲解了DSP功能函数中的数据拷贝、数据填充和浮点数转换为定点数的相关内容。 ... [详细]
  • 如何提高PHP编程技能及推荐高级教程
    本文介绍了如何提高PHP编程技能的方法,推荐了一些高级教程。学习任何一种编程语言都需要长期的坚持和不懈的努力,本文提醒读者要有足够的耐心和时间投入。通过实践操作学习,可以更好地理解和掌握PHP语言的特异性,特别是单引号和双引号的用法。同时,本文也指出了只走马观花看整体而不深入学习的学习方式无法真正掌握这门语言,建议读者要从整体来考虑局部,培养大局观。最后,本文提醒读者完成一个像模像样的网站需要付出更多的努力和实践。 ... [详细]
author-avatar
cl云中皓
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有