cari
Rumahphp教程PHP源码没有简历?new一个!

没有简历?new一个!

May 25, 2016 pm 05:03 PM
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;
	}
	
}


?>

Kenyataan
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn

Alat AI Hot

Undresser.AI Undress

Undresser.AI Undress

Apl berkuasa AI untuk mencipta foto bogel yang realistik

AI Clothes Remover

AI Clothes Remover

Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.

Undress AI Tool

Undress AI Tool

Gambar buka pakaian secara percuma

Clothoff.io

Clothoff.io

Penyingkiran pakaian AI

AI Hentai Generator

AI Hentai Generator

Menjana ai hentai secara percuma.

Artikel Panas

R.E.P.O. Kristal tenaga dijelaskan dan apa yang mereka lakukan (kristal kuning)
4 minggu yang laluBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Tetapan grafik terbaik
4 minggu yang laluBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Cara Memperbaiki Audio Jika anda tidak dapat mendengar sesiapa
4 minggu yang laluBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Arahan sembang dan cara menggunakannya
4 minggu yang laluBy尊渡假赌尊渡假赌尊渡假赌

Alat panas

VSCode Windows 64-bit Muat Turun

VSCode Windows 64-bit Muat Turun

Editor IDE percuma dan berkuasa yang dilancarkan oleh Microsoft

DVWA

DVWA

Damn Vulnerable Web App (DVWA) ialah aplikasi web PHP/MySQL yang sangat terdedah. Matlamat utamanya adalah untuk menjadi bantuan bagi profesional keselamatan untuk menguji kemahiran dan alatan mereka dalam persekitaran undang-undang, untuk membantu pembangun web lebih memahami proses mengamankan aplikasi web, dan untuk membantu guru/pelajar mengajar/belajar dalam persekitaran bilik darjah Aplikasi web keselamatan. Matlamat DVWA adalah untuk mempraktikkan beberapa kelemahan web yang paling biasa melalui antara muka yang mudah dan mudah, dengan pelbagai tahap kesukaran. Sila ambil perhatian bahawa perisian ini

SublimeText3 Linux versi baharu

SublimeText3 Linux versi baharu

SublimeText3 Linux versi terkini

Dreamweaver CS6

Dreamweaver CS6

Alat pembangunan web visual

MantisBT

MantisBT

Mantis ialah alat pengesan kecacatan berasaskan web yang mudah digunakan yang direka untuk membantu dalam pengesanan kecacatan produk. Ia memerlukan PHP, MySQL dan pelayan web. Lihat perkhidmatan demo dan pengehosan kami.