本文整理汇总了PHP中Staff::makeTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Staff::makeTitle方法的具体用法?PHP Staff::makeTitle怎么用?PHP Staff::makeTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Staff
的用法示例。
在下文中一共展示了Staff::makeTitle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preg_replace
}
$FIO = preg_replace("/^([ёA-zА-я-]+)[\\s]{1}([ёA-zА-я-]+[\\s]{1}[ёA-zА-я-]+)\$/u", "<div class=\"surname_head\">\$1</div><div class=\"name\">\$2</div>", $Name);
$FIO = preg_replace("/^([ёA-zА-я-]+[\\s]{1}[ёA-zА-я-]{1}.)[\\s]{1}([ёA-zА-я-]+)\$/u", "<div class=\"surname_head\">\$2</div><div class=\"name\">\$1</div>", $FIO);
echo $FIO;
if ($SHOW_EVALUATION_PERIOD_MESSAGE && $LDAP_CREATED_DATE_FIELD) {
$Created = $ldap->getValue($dn, $LDAP_CREATED_DATE_FIELD);
$CreatedUnixTime = Time::getTimeOfDMYHI($Created, $LDAP_CREATED_DATE_FORMAT);
$NumWorkDays = round((Time::getOnlyDatePartFromTime(time()) - Time::getOnlyDatePartFromTime($CreatedUnixTime)) / (24 * 60 * 60));
if ($NumWorkDays <= $EVALUATION_PERIOD) {
echo "<h6 class=\"alarm\">Новый сотрудник</h6> — <small>работает в компании <big>" . $L->ending($NumWorkDays, 'день', 'дня', 'дней') . "</big></small>";
}
}
$Department = $ldap->getValue($dn, $LDAP_DEPARTMENT_FIELD);
$Title = $ldap->getValue($dn, $LDAP_TITLE_FIELD);
if ($Department) {
echo "<div class=\"position\"><nobr class=\"department\">" . Staff::makeDepartment($Department) . "</nobr> <br/><span class=\"position\">" . Staff::makeTitle($Title) . "</span></div>";
}
if ($VACATION) {
$e[0] = $ldap->getValue($dn, $LDAP_ST_DATE_VACATION_FIELD);
$e[1] = $ldap->getValue($dn, $LDAP_END_DATE_VACATION_FIELD);
if ($e[0] && $e[1]) {
$VacationState = Staff::getVacationState($e[0], $e[1]);
if ($VacationState == 0) {
$tag = "del";
} else {
if ($VacationState < 0) {
$tag = "span";
} else {
$tag = "span";
}
}
示例2: mb_substr
}
if (preg_match("/[ІЇЄЁA-ZА-Я]{1}[іїєёa-zа-я-]+[\\s]{1}[ІЇЄЁA-ZА-Я]{1}[.]{1}[\\s]{1}[ІЇЄЁA-ZА-Я]{1}[іїєёa-zа-я-]+/u", $Staff[$DisplayName][$i])) {
$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");
示例3: mPDF
$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');
}