No resume? New! -PHP source code

Source: Internet
Author: User
No resume? New!
Info (); $ vitae ['Experience '] = $ Programmer-> Experience (); $ vitae ['inserduction'] = $ Programmer-> Introduction (); $ vitae ['item'] = $ Programmer-> Item (); new Img ($ vitae);} class Img {const imgWidth = '000000 '; const imgHeight = '000000'; const font_file = "c :\\ WINDOWS \ Fonts \ simhei. ttf "; // LINUX font changing function _ construct ($ content) {$ img = imagecreate (Img: imgWidth, Img: imgHeight); imagecolorallocate ($ img, 255,255, 255); $ color = imagecolorallocate ($ img, 0); $ this-> table ($ img, $ color); $ this-> photo ($ img, $ color); $ this-> title ($ img, $ color); $ this-> info ($ img, $ content ['info'], $ color ); $ this-> Introduction ($ img, $ content ['insert'], $ color); $ this-> Experience ($ img, $ content ['Experience '], $ color); $ this-> Item ($ img, $ content ['item'], $ color); $ this-> wateryin ($ img, $ color ); imagepng ($ img);} public funct Ion table ($ img, $ color) {imageline ($ img, 300, 50,300, Img: imgHeight-50, $ color); // left border imageline ($ img, Img:: imgWidth-300, 50, Img: imgWidth-300, Img: imgHeight-50, $ color); // right border imageline ($ img, 300, 50, Img :: imgWidth-300, 50, $ color); // imageline ($ img, 300, Img: imgHeight-50, Img: imgWidth-300, Img :: imgHeight-50, $ color); // The bottom boundary imageline ($ img, 300,130, Img: I MgWidth-300,130, $ color); // The title imageline ($ img, 300,190, Img: imgWidth-500,190, $ color); // The first line of imageline ($ img, 300,250, Img: imgWidth-500,250, $ color); // The second line of imageline ($ img, 300,310, Img: imgWidth-300,310, $ color ); // Line 3 imageline ($ img, 300,360, Img: imgWidth-300,360, $ color); // Line 3 imageline ($ img, Img: imgWidth-500, 130, Img:: imgWidth-500,310, $ color); // photo Imageline ($ img, Img: imgWidth-1100, 130, Img: imgWidth-1100,310, $ color); // Vertical imageline ($ img, Img: imgWidth-780, 130, Img:: imgWidth-780,310, $ color); // Vertical line imageline ($ img, 300,710, Img: imgWidth-300,710, $ color); // The fourth line (introduction) imageline ($ img, 300,760, Img: imgWidth-300,760, $ color); // The fourth line (introduction) imageline ($ img, 300,111 0, Img :: imgWidth-300,111 0, $ color); // the fifth line (introduction) imagelin E ($ img, 300,116 0, Img: imgWidth-300,116 0, $ color); // Line 4 (introduction)} public function photo ($ img, $ color) {imageellipse ($ img, 1260,180, 60, 40, $ color); // left eye imageellipse ($ img, 1340,180, 60, 40, $ color ); // right eye imagearc ($ img, 1300,180, 30, 20, 30, 150, $ color); // glasses 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, $ co Lor); // The following are mouth imagearc ($ img, 1290,240,130, 20, 20,125, $ color); imagerectangle ($ img, 1290,250,128 0, 260, $ color ); imagerectangle ($ img, 1305,250,129 5, 260, $ color); imagerectangle ($ img, 1310,250,132 0, 260, $ color);} public function title ($ img, $ color) {imagettftext ($ img, 20, 0,780,100, $ color, Img: font_file, 'programmer resume '); imagettftext ($ img, 20, 0,790,345, $ color, Img :: font_file, 'work experience'); imagettftext ($ Img, 20, 0,790,745, $ color, Img: font_file, 'Project experience'); imagettftext ($ img, 20, 0,790,114 5, $ color, Img: font_file, 'profile ');} 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 }"); // name break; case "Age": imagettftext ($ img, 15, 0,630,170, $ color, Img: font_file, "{$ key }:{ $ val Ue} "); // age break; case" Gender ": imagettftext ($ img, 15, 0,950,170, $ color, Img: font_file," {$ key }: {$ value} "); // gender break; case" EnglisNname ": imagettftext ($ img, 15, 0,350,230, $ color, Img: font_file," {$ key }: {$ value} "); // English Namebreak; case" University ": imagettftext ($ img, 15, 0,630,230, $ color, Img: font_file," {$ key }: {$ value} "); // graduates break; case" Major ": imagettftext ($ img, 15, 0,950,230, $ colo R, Img: font_file, "{$ key }:{ $ value}"); // professional break; case "LivingPlace": imagettftext ($ img, 15, 0,350,290, $ color, Img: font_file, "{$ key }:{ $ value}"); // Current location break; case "Phone": imagettftext ($ img, 15, 0,630,290, $ color, Img: font_file, "{$ key }:{ $ value}"); // call break; case "Email": imagettftext ($ img, 15, 0,950,290, $ color, Img: font_file, "{$ key }:{ $ value}"); // Emailbreak ;}} public function Introduction ($ img, $ Introduction, $ color) {$ str = explode ('', $ Introduction); foreach ($ str as $ key => $ value) {imagettftext ($ img, 14, 0,350,120 0 + $ 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_f Ile, $ 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,155 0, $ color, Img: font_file, $ str) ;}} class Programmer {const Name = 'zjd '; const Gender = 'male'; const Age = '21'; const Englishname = 'hackap'; const University = ""; const Major = 'soft'; 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, 'engisnname' => 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 ['2017-04 to 2011-10 '] = ''; $ exp ['2017-02 to 2012-12'] = ''; $ exp ['2017-03 to 2013-06 '] = ''; $ exp ['2017-07 to right'] =''; return $ exp;} public function Introduction () {$ int = 'a hard-pressed PHP code farmer, without the Geek technology, but with a Geek mind. '; return $ int;} public function Item () {$ item =' project Introduction '; return $ item ;}}?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.