Ejemplo n.º 1
0
            if ($VacationState < 0) {
                $tag = "span";
            } else {
                $tag = "span";
            }
        }
    } else {
        $tag = "span";
    }
} else {
    $tag = "span";
}
if (!$HIDE_CITY_PHONE_FIELD) {
    echo "<div class=\"phone\"><h6>" . $L->l('city_phone') . ":</h6> <" . $tag . ">" . Staff::makeCityPhone($ldap->getValue($dn, $LDAP_CITY_PHONE_FIELD)) . "</" . $tag . "></div>";
}
echo "<div class=\"otherphone\"><h6>" . $L->l('intrenal_phone') . "</h6> <" . $tag . ">" . Staff::makeInternalPhone($ldap->getValue($dn, $LDAP_INTERNAL_PHONE_FIELD)) . "</" . $tag . "></div>";
if (!$HIDE_CELL_PHONE_FIELD) {
    echo "<div class=\"otherphone\"><h6>" . $L->l('cell_phone') . ":</h6> " . Staff::makeCellPhone($ldap->getValue($dn, $LDAP_CELL_PHONE_FIELD)) . "</div>";
}
if ($HomePhone = $ldap->getValue($dn, $LDAP_HOMEPHONE_FIELD)) {
    echo "<div class=\"otherphone\"><h6>" . $L->l('home_phone') . ":</h6> " . Staff::makeHomePhone($HomePhone) . "</div>";
}
echo "<div class=\"email\"><h6>E-mail:</h6> " . Staff::makeMailUrl($ldap->getValue($dn, $LDAP_MAIL_FIELD)) . "</div>";
$StDate = $ldap->getValue($dn, $LDAP_ST_DATE_VACATION_FIELD);
$EndDate = $ldap->getValue($dn, $LDAP_END_DATE_VACATION_FIELD);
Staff::printVacOnCurrentPage($StDate, $EndDate);
$DeputyDN = $ldap->getValue($dn, $LDAP_DEPUTY_FIELD);
if ($DeputyDN && $SHOW_DEPUTY && (Staff::checkInVacation($StDate, $EndDate) && $BIND_DEPUTY_AND_VACATION) || !$BIND_DEPUTY_AND_VACATION) {
    echo "<div class=\"employee birthday\">\n\t\t<h6>" . $L->l('deputy_for_vacation_period') . ":</h6><br/>";
    echo Staff::makeDeputy($DeputyDN, $ldap->getValue($DeputyDN, $DISPLAY_NAME_FIELD));
    echo "</div>";
Ejemplo n.º 2
0
                 $Surname = $FIO[2];
                 $Name = $FIO[0];
                 $Patronymic = $FIO[1];
             }
             $FirstLetter = mb_substr($Surname, 0, 1, 'UTF-8');
             $colspan = Staff::getNumStaffTableColls();
             if ($PrevFirstLetter != $FirstLetter) {
                 $html .= "<tr><td colspan=\"" . $colspan . "\" class=\"department\"><div>" . $FirstLetter . "</div><img src=\"../skins/" . $CURRENT_SKIN . "/images/pdf/pixel_black.png\" vspace=\"1\" width=\"100%\" height=\"1px\"></td></tr>";
                 $PrevFirstLetter = $FirstLetter;
             } else {
                 $html .= "<tr><td colspan=\"" . $colspan . "\"><img src=\"../skins/" . $CURRENT_SKIN . "/images/pdf/divider.gif\" vspace=\"0\" width=\"100%\" height=\"1\"></td></tr>";
             }
             $html .= "<tr>\n\t\t\t\t<td class=\"name\"><span class=\"surname\">" . $Surname . "</span><br><span class=\"patronymic\">" . $Name . " " . $Patronymic . "</span></td>";
             $html .= "<td class=\"position\">" . Staff::makeTitle($Staff[$LDAP_TITLE_FIELD][$i]) . "</td> </tr>";
             $html .= "<td class=\"birth\">" . Staff::makeBirth($Staff[$LDAP_BIRTH_FIELD][$i]) . "</td> </tr>";
             $html .= "<td class=\"internal_phone\">" . Staff::makeInternalPhone($Staff[$LDAP_INTERNAL_PHONE_FIELD][$i], false) . "</td> </tr>";
             if (!$HIDE_CITY_PHONE_FIELD) {
                 $html .= "<td class=\"city_phone\">" . Staff::makeCityPhone($Staff[$LDAP_CITY_PHONE_FIELD][$i], false) . "</td>";
             }
             if (!$HIDE_CELL_PHONE_FIELD) {
                 $html .= "<td class=\"cell_phone\">" . Staff::makeCellPhone($Staff[$LDAP_CELL_PHONE_FIELD][$i], false) . "</td>";
             }
             $html .= "\n\t\t\t\t<td class=\"mail\">" . $Staff[$LDAP_MAIL_FIELD][$i] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t";
         }
     }
 }
 $html .= "</table>";
 $mpdf = new mPDF(false, $PDF_LANDSCAPE ? "A4-L" : "A4", false, 'Arial', $PDF_MARGIN_LEFT, $PDF_MARGIN_RIGHT, $PDF_MARGIN_TOP, $PDF_MARGIN_BOTTOM);
 $stylesheet = file_get_contents("../skins/" . $CURRENT_SKIN . "/css/pdf.css");
 $mpdf->WriteHTML($stylesheet, 1);
 $mpdf->WriteHTML($html, 2);
Ejemplo n.º 3
0
                $colspan = Staff::getNumStaffTableColls();
                if ($PrevDepartment != $Department) {
                    if (strpos($Department, $InclusionDep) === 0) {
                        $css = "department";
                    } else {
                        $css = "division";
                        $InclusionDep = $Department;
                    }
                    $html .= "<tr><td colspan=\"" . $colspan . "\" class=\"department\"><div class=\"" . $css . "\">" . Staff::makeDepartment($Department) . "</div><img src=\"../skins/" . $CURRENT_SKIN . "/images/pdf/pixel_black.png\" vspace=\"1\" width=\"100%\" height=\"1px\"></td></tr>";
                    $PrevDepartment = $Department;
                } else {
                    $html .= "<tr><td colspan=\"" . $colspan . "\"><img src=\"../skins/" . $CURRENT_SKIN . "/images/pdf/divider.gif\" vspace=\"0\" width=\"100%\" height=\"1\"></td></tr>";
                }
                $html .= "<tr>\n\t\t\t\t<td class=\"name\"><span class=\"surname\">" . $Surname . "</span><br><span class=\"patronymic\">" . $Name . " " . $Patronymic . "</span></td>";
                if (!$HIDE_CELL_PHONE_FIELD) {
                    $html .= "<td class=\"cell_phone\">" . Staff::makeCellPhone($Staff[$LDAP_CELL_PHONE_FIELD][$i], false) . "</td>";
                }
                if (!$HIDE_CITY_PHONE_FIELD) {
                    $html .= "<td class=\"city_phone\">" . Staff::makeCityPhone($Staff[$LDAP_CITY_PHONE_FIELD][$i], false) . "</td>";
                }
                $html .= "\n\t\t\t\t<td class=\"internal_phone\">" . Staff::makeInternalPhone($Staff[$LDAP_INTERNAL_PHONE_FIELD][$i], false) . "</td>\n\t\t\t\t<td class=\"mail\">" . $Staff[$LDAP_MAIL_FIELD][$i] . "</td>\n\t\t\t\t<td class=\"position\">" . Staff::makeTitle($Staff[$LDAP_TITLE_FIELD][$i]) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t";
            }
        }
    }
    $html .= "</table>";
    $mpdf = new mPDF(false, $PDF_LANDSCAPE ? "A4-L" : "A4", false, 'Arial', $PDF_MARGIN_LEFT, $PDF_MARGIN_RIGHT, $PDF_MARGIN_TOP, $PDF_MARGIN_BOTTOM);
    $stylesheet = file_get_contents("../skins/" . $CURRENT_SKIN . "/css/pdf.css");
    $mpdf->WriteHTML($stylesheet, 1);
    $mpdf->WriteHTML($html, 2);
    $mpdf->Output('pdf_departments.pdf', 'I');
}