skills.php 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <section>
  2. <h3><?=text($con, "PROFILE_CV", $lang);?></h3>
  3. <ul class='cv_download'>
  4. <li>
  5. <a target='_blank' href='TODO' title='<?=text($con, "USER_NAME", $lang);?> - <?=text($con, "PROFILE_CV", $lang);?>'><?=text($con, "PROFILE_DOWNLOAD_CURRENT", $lang);?></a>
  6. </li>
  7. <li>
  8. <a href='TODO' title='<?=text($con, "PROFILE_CV_DOWNLOAD_LANG", $lang);?>'><?=text($con, "PROFILE_DOWNLOAD_OTHER", $lang);?></a>
  9. </li>
  10. </ul>
  11. <?php
  12. $q_section = mysqli_query($con, "SELECT * FROM cv_category WHERE visible = 1 ORDER BY priority;");
  13. while ($r_section = mysqli_fetch_array($q_section)){
  14. ?>
  15. <article id='cv' class='cv_entry'>
  16. <h4 class='cv_entry_title'><?=text($con, $r_section["title"], $lang)?></h4>
  17. <?php
  18. if (strlen($r_section["summary"]) > 0){
  19. ?>
  20. <h5><?=text($con, $r_section["summary"], $lang)?></h5>
  21. <?php
  22. }
  23. $q_item = mysqli_query($con, "SELECT id, role, company, summary, city, start, end, year(start) AS start_y, DATE_FORMAT(start, '%m') AS start_m, year(end) AS end_y, DATE_FORMAT(end, '%m') AS end_m, date_precission FROM cv_entry WHERE category = $r_section[id] AND visible = 1 ORDER BY start DESC");
  24. while ($r_item = mysqli_fetch_array($q_item)){
  25. switch ($r_item["date_precission"]){
  26. case "Y":
  27. if (strlen($r_item["end"]) <= 0){ // Since 2016
  28. $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_YEAR", $lang));
  29. }
  30. else{
  31. if ($r_item["start_y"] == $r_item["end_y"]){ // 2016
  32. $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_DURING_YEAR", $lang));
  33. }
  34. else{ // From 2015 until 2017
  35. $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_YEAR", $lang));
  36. $str_date = str_replace("#YEAR_END#", $r_item["end_y"], $str_date);
  37. }
  38. }
  39. break;
  40. case "M":
  41. if (strlen($r_item["end"]) <= 0){ // Since March 2016
  42. $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_MONTH", $lang));
  43. $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
  44. }
  45. else{
  46. if ($r_item["start_y"] == $r_item["end_y"]){
  47. if ($r_item["start_m"] == $r_item["end_m"]){ // March 2016
  48. $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_DURING_MONTH", $lang));
  49. $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
  50. }
  51. else{ // From February until March 2016
  52. $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_MONTH_YEAR", $lang));
  53. $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
  54. $str_date = str_replace("#MONTH_END#", text($con, "MONTH_" . $r_item["end_m"], $lang), $str_date);
  55. }
  56. }
  57. else{
  58. // From February 2015 until March 2016
  59. $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_MONTH", $lang));
  60. $str_date = str_replace("#YEAR_END#", $r_item["end_y"], $str_date);
  61. $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
  62. $str_date = str_replace("#MONTH_END#", text($con, "MONTH_" . $r_item["end_m"], $lang), $str_date);
  63. }
  64. }
  65. break;
  66. } // switch ($r_item["date_precission"])
  67. ?>
  68. <div class='role'>
  69. <h4><?=text($con, $r_item["role"], $lang)?></h4>
  70. <h5><?=$str_date?>. <?=$r_item["company"]?> (<?=text($con, $r_item["city"], $lang)?>)</h5>
  71. <p><?=text($con, $r_item["summary"], $lang)?></p>
  72. </div>
  73. <?php
  74. } // while ($r_item = mysqli_fetch_array($q_item))
  75. ?>
  76. </article>
  77. <?php
  78. }
  79. ?>
  80. </section> <!-- .section -->