File: /home/imensosw/public_html/imenso.co/demo/resume-maker/pdf.php
<?php
ob_start();
session_start();
require('include/initalizedb.php');
//header('Location: users-cv/pdf.php?user_id='.$_SESSION['session_id'].'&resume_id='.$_REQUEST['resume_id']);
//die;
error_reporting(0);
$resume_id=$_REQUEST['resume_id'];
if(isset($_REQUEST['user_id']))
$user_id = $_REQUEST['user_id'];
else
$user_id = $_SESSION['session_id'];
//echo $user_id;
if(!isset($_SESSION['session_id']))
{
//header("Location: http://dev.imenso.co/enhan_cv/");
exit;
}
$plan = $db->select("select * from billing where user_id = '".$user_id."' ORDER BY billing_id DESC LIMIT 1");
if(empty($plan))
{
//header("location:product.php?resum_id=$resume_id");
}
?>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CV</title>
<link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/flat-ui.css" >
<link rel="stylesheet" href="http://phptopdf.com/bootstrap.css">
<link rel="stylesheet" href="../css/bars-reversed.css" >
<link rel="stylesheet" href="https://use.fontawesome.com/ee55a9a675.css">
</head>
<style type="text/css" media="print">
@page {
margin-top: 0; /* this affects the margin in the printer settings */
margin-bottom: 0; /* this affects the margin in the printer settings */
}
</style>
<body onload="test()">
<input type="hidden" name="resume_id" id="resume_id" value="<?php echo $resume_id; ?>">
<div class="container pad_0">
<div class="main_editer pad_0 mar_0" data-wow-duration="1s" data-wow-delay="1s"
id="main_editer">
<form id="form" name="form">
<div id="printIt">
<?php $res = $db->select("select * from cv_user_resumes where id = '$resume_id' ORDER BY id DESC LIMIT 1");
$count=count($res);
if($count>0)
{
foreach($res as $row)
?>
<div class="row">
<div class="col-lg-12 welcome_profile_div mar_0">
<div class="edit_profile_div hover_wrp">
<div class="profile_discription col_9 col-lg-9 pad_0">
<div class="main_name">
<div class="form-group mar_0">
<h2 class="mar_0">
<div class="form-group mar_0">
<aside class=" big_font_placeholder mar_0"><?php echo $row['person_name'] ?></aside>
</div>
</h2>
</div>
</div>
<div class="sub_detailes margin_t1">
<div class="form-group mar_0">
<p class="sub_heading">
<span class="medium_font_placeholder mar_0" id="person_sub_detail"><?php echo $row['person_sub_detail'] ?></span>
</p>
</div>
<div class="col_6 pad_0">
<div class="icon_with_text">
<i class="fa fa-phone"></i>
<span>
<aside class="small_icon_font_placeholder mar_0" id="" name="email"/><?php echo $row['phone'] ?>
</aside>
</span>
</div>
<div class="icon_with_text">
<i class="fa fa-envelope-o"></i>
<span>
<aside class="small_icon_font_placeholder mar_0" id="" name="email"/><?php echo $row['email'] ?>
</aside>
</div>
</div>
<div class="col_6 pad_0">
<div class="icon_with_text">
<i class="fa fa-linkedin"></i>
<span>
<aside class="small_icon_font_placeholder mar_0" id="Phone" name="phone">
<?php echo $row['location'] ?>
</aside>
</span>
</div>
<div class="icon_with_text">
<i class="fa fa-facebook"></i>
<span>
<aside class=" small_icon_font_placeholder mar_0" placeholder="Email" id="Email" name="email">
<?php echo $row['link'] ?>
</aside>
</span>
</div>
</div>
</div>
</div>
<div class="col_3 col-lg-3 profile_user">
<a href="#" data-toggle="modal" data-target="#profile-modal">
<img src="<?php echo '../profile-image/'.$user_id.'/'.$resume_id.'/profile-pic.png' ?>" class="profile_image" alt="profile" />
</a>
</div>
</div>
</div>
</div>
</div>
<?php
}
?>
<div class="row">
<div class="col_6 col-lg-7 col-md-7 pad_0">
<?php
$resExp = $db->select("select * from cv_user_resumes_expirience where resume_id = $resume_id");
$countExp=count($resExp);
if($countExp>0)
{
?>
<div class="col-sm-12 hover_wrp experince-box">
<div class="edit_main_heading experince-block ">
<h3 class="mar_0">
<aside class="medium_big_font_placeholder mar_0" id="Expirience" name="Expirience">
<?php echo $resExp[0]['experience_head']; ?>
</aside>
</h3>
<?php
$countExp = count(json_decode($resExp[0]['title']));
// echo $countExp;
$titleExp = json_decode($resExp[0]['title']);
$companyExp = json_decode($resExp[0]['company']);
$exp_dateExp = json_decode($resExp[0]['exp_date']);
$exp_locationExp = json_decode($resExp[0]['exp_location']);
$company_headingExp = json_decode($resExp[0]['company_heading']);
$company_descExp = json_decode($resExp[0]['company_desc']);
for($i=0; $i<$countExp; $i++)
{
?>
<div class="exp_inr experince-block border_b_dash pdf_com_pad ">
<div class="sub_detailes margin_t1">
<p class="sub_heading">
<span class="medium_font_placeholder mar_0" id="Expirience_title" >
<?php echo $titleExp[$i]; ?>
</span>
</p>
<div class="col-sm-12 pad_0">
<p class="dual_Sub">
<span class="medium_font_placeholder mar_0 theme_color_placeholder" id="Company" ><?php echo $companyExp[$i]; ?>
</span>
</p>
</div>
<div class="row">
<div class="col_6 icon_with_text">
<?php if(!empty($exp_dateExp[$i])){ ?>
<i class="fa fa-calendar-check-o"></i>
<span>
<aside class="small_icon_font_placeholder mar_0" id="Exp_Date">
<?php echo $exp_dateExp[$i];?>
</aside>
</span>
<?php } ?>
</div>
<div class="col_6 icon_with_text">
<?php if(!empty($exp_locationExp[$i])){ ?>
<i class="fa fa-usd"></i>
<span>
<aside class="small_icon_font_placeholder mar_0" id="xpirience_location" >
<?php echo $exp_locationExp[$i]; ?>
</aside>
</span>
<?php } ?>
</div>
</div>
<div class="row">
<div class="col-sm-12 discription_box">
<span class="input-group">
<span class="input-option" id="l_phone">Landlord Phone: </span>
<span class="input-option small_icon_font_placeholder mar_0" aria-describedby="l_phone" id="company_discription_heading" name="company_discription_heading[]" >
<?php echo $company_headingExp[$i]; ?>
</span>
</span>
<div class=" mar_0">
<p class="vsmall_font_placeholder mar_0" id="company_discription" name="company_discription[]">
<strong>Reasion for leaving: </strong><?php echo $company_descExp[$i]; ?>
</p>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
<?php
}
$resEdu = $db->select("select * from cv_user_resumes_education where resume_id = $resume_id");
$countEdu=count($resEdu);
if($countEdu>0)
{
?>
<div class="col-sm-12 edit_pad hover_wrp education-box">
<div class="edit_main_heading ">
<h3 class="mar_0">
<aside class=" medium_big_font_placeholder mar_0" id="Eduaction" name="eduaction" >
<?php echo $resEdu[0]['eduaction']; ?>
</aside>
</h3>
<?php
$countEdu = count(json_decode($resEdu[0]['degree']));
// echo $countExp;
$degreeEdu = json_decode($resEdu[0]['degree']);
$schoolEdu = json_decode($resEdu[0]['school']);
$edu_dateEdu = json_decode($resEdu[0]['edu_date']);
$edu_location = json_decode($resEdu[0]['edu_location']);
$edu_heading = json_decode($resEdu[0]['edu_heading']);
$edu_detail = json_decode($resEdu[0]['edu_detail']);
for($i=0; $i<$countEdu; $i++)
{
?>
<div class="exp_inr education-block border_b_dash" >
<div class="sub_detailes margin_t1">
<p class="sub_heading">
<span class=" small_icon_font_placeholder mar_0" id="Study" >
<?php echo $degreeEdu[$i]; ?>
</span>
</p>
<div class="col-sm-12 pad_0">
<p class="dual_Sub">
<span class="medium_font_placeholder mar_0 theme_color_placeholder" id="School">
<?php echo $schoolEdu[$i]; ?>
</span>
</p>
</div>
<div class="row">
<div class="col_6 icon_with_text">
<?php if(!empty($edu_dateEdu[$i])){ ?>
<i class="fa fa-calendar-check-o"></i>
<span>
<aside class=" small_icon_font_placeholder mar_0" id="Date_2" >
<?php echo $edu_dateEdu[$i]; ?>
</aside>
</span>
<?php } ?>
</div>
<div class="col_6 icon_with_text">
<?php if(!empty($edu_location[$i])){ ?>
<i class="fa fa-usd"></i>
<span>
<aside class="small_icon_font_placeholder mar_0" id="Date_2" >
<?php echo $edu_location[$i]; ?>
</aside>
</span>
<?php } ?>
</div>
</div>
<p class="sub_heading">
<span class="input-group">
<span class="input-option" id="hr_phone">HR Phone: </span>
<span class="input-option small_icon_font_placeholder mar_0" aria-describedby="hr_phone" id="Study" ><?php echo $edu_heading[$i]; ?></span>
</span>
</p>
</div>
</div>
<?php } ?>
</div>
</div>
<?php } ?>
</div>
<?php
$resAch = $db->select("select * from cv_user_resumes_achievements where resume_id = $resume_id");
$countAch=count($resAch);
if($countAch>0)
{
?>
<div class="col_6 col-lg-5 col-md-5 hover_wrp achievement-box">
<div class="edit_main_heading achievement-block">
<h3 class="mar_0">
<aside class="medium_big_font_placeholder mar_0" id="Achievements">
<?php echo $resAch[0]['achievements']; ?>
</aside>
</h3>
<?php
$countAch = count(json_decode($resAch[0]['achievements_detailes']));
// echo $countExp;
$proudAch = json_decode($resAch[0]['proud']);
$achievements_detailesAch = json_decode($resAch[0]['achievements_detailes']);
for($i=0; $i<$countAch; $i++)
{
?>
<div class="exp_inr achievement-block border_b_dash ">
<div class=" sub_detailes margin_t1 clearfix">
<div class="col-sm-12 pad_0">
<p class="dual_Sub icon_with_text">
<?php if(!empty($proudAch[$i])){ ?>
<i class="fa fa-diamond"></i>
<span class="medium_font_placeholder mar_0 theme_color_placeholder" id="proud">
<?php echo $proudAch[$i]; ?>
</span>
<?php } ?>
</p>
</div>
<div class="row">
<div class="col-sm-12 discription_box">
<p class="small_font_placeholder margin_b1" id="Achievements_detailes">
<?php echo $achievements_detailesAch[$i]; ?>
</p>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
<?php
} ?>
<?php
// Finance Section
$finance = $db->select("select * from cv_user_resumes_finance where resume_id = $resume_id");
$countFin=count($finance);
if($countFin>0)
{
?>
<div class="col_6 col-lg-5 col-md-5 edit_pad hover_wrp achievement-box">
<div class="edit_main_heading achievement-block">
<h3 class="mar_0">
<aside class="medium_big_font_placeholder mar_0" id="Achievements">
<?php echo $finance[0]['finance_head']; ?>
</aside>
</h3>
<?php
$annual_salary = json_decode($finance[0]['annual_salary']);
$rental_range = json_decode($finance[0]['rental_range']);
$credit_score = json_decode($finance[0]['credit_score']);
$liquid_assets = json_decode($finance[0]['liquid_assets']);
$annual_salaryCnt = count(json_decode($finance[0]['annual_salary']));
$rental_rangeCnt = count(json_decode($finance[0]['rental_range']));
$credit_scoreCnt = count(json_decode($finance[0]['credit_score']));
$liquid_assetsCnt = count(json_decode($finance[0]['liquid_assets']));
?>
<div class="exp_inr achievement-block">
<div class=" sub_detailes margin_t1 clearfix">
<?php for($i=0; $i<$annual_salaryCnt; $i++) { ?>
<div class="col-sm-12 pad_0 margin_t1 pdf_com_pad">
<p class="dual_Sub icon_with_text">
<?php if(!empty($annual_salary[$i])){ ?>
<i class="fa fa-diamond"></i><strong>Annual Salary: $</strong>
<span class="medium_font_placeholder mar_0 theme_color_placeholder" id="proud">
<?php echo $annual_salary[$i]; ?>
</span>
<?php } ?>
</p>
</div>
<div class="col-sm-12 pad_0 border_b_dash pdf_com_pad">
<p class="mar_0 ">
<?php if(!empty($rental_range[$i])){ ?>
<span class="vsmall_font_placeholder mar_0 pdf_pad_lf" id="proud">
<?php echo $rental_range[$i]; ?>
</span>
<?php } ?>
</p>
</div>
<?php } ?>
<?php for($i=0; $i<$credit_scoreCnt; $i++) { ?>
<div class="col-sm-12 pad_0 border_b_dash margin_t1 pdf_com_pad">
<p class="dual_Sub icon_with_text">
<?php if(!empty($credit_score[$i])){ ?>
<i class="fa fa-diamond"></i><strong>Credit Score: $</strong>
<span class="medium_font_placeholder mar_0 theme_color_placeholder" id="proud">
<?php echo $credit_score[$i]; ?>
</span>
<?php } ?>
</p>
</div>
<?php } ?>
<?php for($i=0; $i<$liquid_assetsCnt; $i++) { ?>
<div class="col-sm-12 pad_0 border_b_dash margin_t1 pdf_com_pad">
<p class="dual_Sub icon_with_text">
<?php if(!empty($liquid_assets[$i])){ ?>
<i class="fa fa-heart"></i><strong>Liquid Assets: $</strong>
<span class="medium_font_placeholder mar_0 theme_color_placeholder" id="proud">
<?php echo $liquid_assets[$i]; ?>
</span>
<?php } ?>
</p>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<?php
}
?>
<?php
// Rental Section
$rental = $db->select("select * from cv_user_resumes_rental where resume_id = $resume_id");
$countRen=count($rental);
if($rental>0)
{
?>
<div class="col_6 col-lg-5 col-md-5 edit_pad hover_wrp achievement-box">
<div class="edit_main_heading achievement-block">
<h3 class="mar_0">
<aside class="medium_big_font_placeholder mar_0" id="Achievements">
<?php echo $rental[0]['rental_head']; ?>
</aside>
</h3>
<?php
$rental_rule1 = json_decode($rental[0]['rental_rule1']);
$rental_rule2 = json_decode($rental[0]['rental_rule2']);
$rental_rule3 = json_decode($rental[0]['rental_rule3']);
$rental_rule1Cnt = count(json_decode($rental[0]['rental_rule1']));
$rental_rule2Cnt = count(json_decode($rental[0]['rental_rule2']));
$rental_rule3Cnt = count(json_decode($rental[0]['rental_rule3']));
?>
<div class="exp_inr achievement-block">
<div class=" sub_detailes margin_t1 ">
<?php for($i=0; $i<$rental_rule1Cnt; $i++) { ?>
<div class="col-lg-12 pad_0 border_b_dash pdf_com_pad clearfix">
<div class="col-sm-6 pad_0">
<p class="dual_Sub icon_with_text">
<?php if(!empty($rental_rule1[$i])){ ?>
<i class="fa fa-diamond"></i>
<span class="medium_font_placeholder mar_0 theme_color_placeholder" id="proud">
<?php echo $rental_rule1[$i]; ?>
</span>
<?php } ?>
</p>
</div>
<div class="col-sm-6 pad_0">
<p class="dual_Sub icon_with_text">
<?php if(!empty($rental_rule2[$i])){ ?>
<i class="fa fa-diamond"></i>
<span class="medium_font_placeholder mar_0 theme_color_placeholder" id="proud">
<?php echo $rental_rule2[$i]; ?>
</span>
<?php } ?>
</p>
</div>
</div>
<?php } ?>
<?php for($i=0; $i<$rental_rule3Cnt; $i++) { ?>
<div class="col-sm-12 pad_0 border_b_dash pdf_com_pad">
<p class="dual_Sub icon_with_text">
<?php if(!empty($rental_rule3[$i])){ ?>
<i class="fa fa-check"></i>
<span class="medium_font_placeholder mar_0 theme_color_placeholder" id="proud">
<?php echo $rental_rule3[$i]; ?>
</span>
<?php } ?>
</p>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<?php
}
?>
<?php /*
$resLag = $db->select("select * from cv_user_resumes_languages where resume_id = $resume_id");
$countLag=count($resLag);
if($countLag>0)
{
?>
<div class="col_6 edit_pad margin_b1 hover_wrp language-box">
<div class="edit_main_heading language-block">
<h3 class="mar_0">
<aside class=" medium_big_font_placeholder mar_0"id="Languages" name="language_head">
<?php echo $resLag[0]['language_head']; ?>
</aside>
</h3>
<?php
$countLag = count(json_decode($resLag[0]['languages']));
// echo $countExp;
$languagesLag = json_decode($resLag[0]['languages']);
$levelLag = json_decode($resLag[0]['level']);
for($i=0; $i<$countLag; $i++)
{
?>
<div class="exp_inr language-block">
<section class="section section-examples">
<div class="examples">
<div class="sub_detailes">
<div class="box box-green box-large box-example-reversed">
<p class="dual_Sub ">
<span class="medium_font_placeholder mar_0 theme_color_placeholder">
<?php echo $languagesLag[$i]; $langrate = 1;?>
</span>
</p>
<div class="box-body ex_btn_caption">
<span>
<div class="br-wrapper br-theme-bars-reversed">
<select id="example-reversed" name="rating[]"style="display: none;">
<option value="Beginner" <?php if($levelLag[$i]=="Beginner"){echo "selected"; $langrate = 1;} ?> >Beginner</option>
<option value="Intermediate" <?php if($levelLag[$i]=="Intermediate"){echo "selected"; $langrate = 2;} ?> >Intermediate</option>
<option value="Advanced" <?php if($levelLag[$i]=="Advanced"){echo "selected"; $langrate = 3; } ?> >Advanced</option>
<option value="Proficient" <?php if($levelLag[$i]=="Proficient"){echo "selected"; $langrate = 4; } ?>>Proficient</option>
<option value="Native" <?php if($levelLag[$i]=="Native"){echo "selected"; $langrate = 5; } ?>>Native</option>
</select>
<div class="br-widget">
<div class="br-current-rating br-selected br-active pad_0 lang_text" style="width: 200px">
<?php echo $levelLag[$i]; ?>
</div>
<?php
?>
<?php for ($ii=1; $ii < 6; $ii++) { ?>
<a href="#" class="<?php if($langrate == $ii){ echo 'br-selected br-current ';}else if($langrate>$ii){ echo 'br-selected '; } ?> "></a>
<?php } ?>
</div>
</div>
</span>
</div>
</div>
</div>
</div>
</section>
</div>
<?php } ?>
</div>
</div>
<?php }
$resPro = $db->select("select * from cv_user_resumes_projects where resume_id = $resume_id");
$countPro=count($resPro);
if($countPro>0)
{
?>
<div class="col_6 pad_0 float_right_div">
<div class="col-sm-12 edit_pad margin_t1 margin_b3 hover_wrp project-box">
<div class="edit_main_heading project-block">
<h3 class="mar_0">
<aside class=" medium_big_font_placeholder mar_0" id="Project" name="project_head">
<?php echo $resPro[0]['project_head']; ?>
</aside>
</h3>
<?php
$countPro = count(json_decode($resPro[0]['project']));
// echo $countExp;
$projectPro = json_decode($resPro[0]['project']);
$project_datePro = json_decode($resPro[0]['project_date']);
$project_locationPro = json_decode($resPro[0]['project_location']);
$work_summaryPro = json_decode($resPro[0]['work_summary']);
$work_descriptionPro = json_decode($resPro[0]['work_description']);
for($i=0; $i<$countPro; $i++)
{
?>
<div class="exp_inr project-block">
<div class=" sub_detailes margin_t1">
<div class="col-sm-12 pad_0">
<p class="dual_Sub">
<span class=" medium_font_placeholder mar_0 theme_color_placeholder" id="Activity" name="projects[]">
<?php echo $projectPro[$i]; ?>
</span>
</p>
</div>
<div class="row">
<div class="col_6 icon_with_text">
<?php if(!empty($project_datePro[$i])){ ?>
<i class="fa fa-calendar-check-o"></i>
<span>
<aside class=" small_icon_font_placeholder mar_0" id="Date_project" name="project_date[]">
<?php echo $project_datePro[$i]; ?>
</aside>
</span>
<?php } ?>
</div>
<div class="col_6 icon_with_text">
<?php if(!empty($project_locationPro[$i])){ ?>
<i class="fa fa-map-marker"></i>
<span>
<aside class=" small_icon_font_placeholder mar_0" id="Location_project" name="project_location[]" >
<?php echo $project_locationPro[$i]; ?>
</aside>
</span>
<?php } ?>
</div>
</div>
<div class="row">
<div class="col-sm-12 discription_box">
<span class=" small_icon_font_placeholder mar_0" id="work_discription" name="work_summary[]">
<?php echo $work_summaryPro[$i]; ?>
</span>
<p class=" vsmall_font_placeholder mar_0" id="work_discription_la" name="work_discription[]">
<?php echo $work_descriptionPro[$i]; ?>
</p>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
<?php } */ ?>
</div>
</form>
</div>
<p></p><htr><p></p>
</div>
<script src="https://use.fontawesome.com/ee55a9a675.js"></script>
<script>
function test()
{
//window.print();
}
</script>
</body>
</html>
<?php
file_put_contents('users-cv/'.$user_id.'_'.$resume_id.'.html', ob_get_contents());
header('Location: download-cv.php?u='.$user_id.'&r='.$resume_id);
?>