本文整理汇总了PHP中Staff::getNumStaffTableColls方法的典型用法代码示例。如果您正苦于以下问题:PHP Staff::getNumStaffTableColls方法的具体用法?PHP Staff::getNumStaffTableColls怎么用?PHP Staff::getNumStaffTableColls使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Staff
的用法示例。
在下文中一共展示了Staff::getNumStaffTableColls方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explode
$FIO = explode(" ", $Staff[$DisplayName][$i]);
$Surname = $Staff[$DisplayName][$i];
$Name = "";
$Patronymic = "";
if (preg_match("/[ІЇЄЁA-ZА-Я]{1}[іїєёa-zа-я-]+[\\s]{1}[ІЇЄЁA-ZА-Я]{1}[іїєёa-zа-я-]+[\\s]{1}[ІЇЄЁA-ZА-Я]{1}[іїєёa-zа-я-]+/u", $Staff[$DisplayName][$i])) {
$Surname = $FIO[0];
$Name = $FIO[1];
$Patronymic = $FIO[2];
}
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>";
示例2: foreach
$Vars['row_css'] = $row % 2 ? "even favourite" : "odd favourite";
$Vars['current_login'] = $Login;
$Vars['display_name'] = $DisplayName;
$Vars['ldap_conection'] = $ldap;
$Vars['favourite_dns'] = $FavouriteDNs;
$Vars['data_parent_id'] = true;
$Vars['id'] = false;
Staff::printUserTableRow($Favourites, $key, $Vars);
$row++;
}
}
}
$row = 0;
// переменная, используемая для нумерации строк таблицы
//Перебираем всех выбраных пользователей
foreach ($Staff[$LDAP_DISTINGUISHEDNAME_FIELD] as $key => $value) {
$Surname = Staff::getSurname($Staff[$DisplayName][$key]);
if (mb_substr($Surname, 0, 1, 'UTF-8') != @$FiLe) {
$FiLe = mb_substr($Surname, 0, 1, 'UTF-8');
//Сохраняем первую букву ФИО для дальнейше проверки
echo "\r\t\t\t<tr>\r\t\t\t\t<td colspan=\"" . Staff::getNumStaffTableColls() . "\">\r\t\t\t\t\t<a href=\"#move_to_letter\" class=\"in_link uarr\" >↑</a>\r\t\t\t\t\t<span class=\"sep_letter\" id=\"s_l_" . $row . "\">" . $FiLe . "</span>\r\t\t\t\t</td>\r\t\t\t</tr>\r\t\t\t";
// и печатаем разделитель
}
$Vars['row_css'] = $row % 2 ? "even" : "odd";
$Vars['current_login'] = $Login;
$Vars['display_name'] = $DisplayName;
$Vars['ldap_conection'] = $ldap;
$Vars['favourite_dns'] = $FavouriteDNs;
$Vars['data_parent_id'] = false;
$Vars['id'] = true;
Staff::printUserTableRow($Staff, $key, $Vars);
示例3: foreach
$Vars['display_name'] = $DisplayName;
$Vars['ldap_conection'] = $ldap;
$Vars['favourite_dns'] = $FavouriteDNs;
$Vars['data_parent_id'] = true;
$Vars['id'] = false;
Staff::printUserTableRow($Favourites, $key, $Vars);
$row++;
}
}
}
$row = 0;
// переменная, используемая для нумерации строк таблицы
foreach ($Staff[$LDAP_DISTINGUISHEDNAME_FIELD] as $key => $value) {
if ($Staff[$LDAP_DEPARTMENT_FIELD][$key] != @$prevDEP) {
if (strpos($Staff[$LDAP_DEPARTMENT_FIELD][$key], @$inclusionDEP) === 0) {
$depCSS = "department";
} else {
$depCSS = "division";
$inclusionDEP = $Staff[$LDAP_DEPARTMENT_FIELD][$key] ? $Staff[$LDAP_DEPARTMENT_FIELD][$key] : ' ';
}
$prevDEP = $Staff[$LDAP_DEPARTMENT_FIELD][$key];
echo "\r\t\t\t<tr>\r\t\t\t\t<td colspan=\"" . Staff::getNumStaffTableColls() . "\">\r\t\t\t\t\t<div class=\"department_title " . $depCSS . "\">\r\t\t\t\t\t\t<a href=\"#move_to_dep\" class=\"in_link uarr\" >↑</a>\r\t\t\t\t\t\t<span id=\"dep_" . $row . "\">" . Staff::makeDepartment($Staff[$LDAP_DEPARTMENT_FIELD][$key], true) . "</span>\r\t\t\t\t\t</div>\r\t\t\t\t</td>\r\t\t\t</tr>\r\t\t\t";
}
$Vars['row_css'] = $row % 2 ? "even" : "odd";
$Vars['current_login'] = $Login;
$Vars['display_name'] = $DisplayName;
$Vars['ldap_conection'] = $ldap;
$Vars['favourite_dns'] = $FavouriteDNs;
$Vars['data_parent_id'] = false;
$Vars['id'] = true;
Staff::printUserTableRow($Staff, $key, $Vars);
示例4: LDAP
<form class="heads" method="POST" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<?php
//Получаем переменные для сортировки
@$_GET['sortcolumn']=($_GET['sortcolumn'])?$_GET['sortcolumn']:"ФИО";
@$_GET['sorttype']=($_GET['sorttype'])?$_GET['sorttype']:"ASC";
?>
<div class="heads">
<?php
if($BLOCK_VIS[$menu_marker]['birthdays'])
include("./libs/birth.php");
if($BLOCK_VIS[$menu_marker]['search'])
include("./libs/search.php");
if($BLOCK_VIS[$menu_marker]['profile'])
include("./libs/profile.php");
if($BLOCK_VIS[$menu_marker]['fast_move'])
{
echo"<br/>";
Alphabet::printGeneralLetters(); //Печатаем буквы алфавита, для быстрого перехода на сотрудников
}
?>
</div>
</form>
<?php
$ldap=new LDAP($LDAPServer, $LDAPUser, $LDAPPassword); //Соединяемся с сервером
// Делаем фильтр для выборки сотрудников нужных компаний
//-------------------------------------------------------------------------------------------------------------
$CompanyNameLdapFilter=Application::getCompanyNameLdapFilter();
//-------------------------------------------------------------------------------------------------------------
示例5:
<form class="heads" method="POST" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<?php
@$_GET['sortcolumn']=($_GET['sortcolumn'])?$_GET['sortcolumn']:"ФИО";
@$_GET['sorttype']=($_GET['sorttype'])?$_GET['sorttype']:"ASC";
?>
<div class="heads">
<?php
if($BLOCK_VIS[$menu_marker]['birthdays'])
include("./libs/birth.php");
if($BLOCK_VIS[$menu_marker]['search'])
include("./libs/search.php");
if($BLOCK_VIS[$menu_marker]['profile'])
include("./libs/profile.php");
?>
</div>
<?php
//Печатаем контейнер в который JS будет класть ссылки для быстрого перехода на отделы
if($BLOCK_VIS[$menu_marker]['fast_move'])
{
echo "<br/>
<span id=\"ALPH_ITEM_IN_LINE\" class=\"h\">".$DEP_ITEM_IN_COL."</span>
<fieldset id=\"move_to_dep\">
<legend>".$L->l('fast_move_to_department')."</legend>
</fieldset>
";
}
?>
</form>
<?php
//=================================================================================================================