本文整理汇总了PHP中hierarchy::unserializeLangField方法的典型用法代码示例。如果您正苦于以下问题:PHP hierarchy::unserializeLangField方法的具体用法?PHP hierarchy::unserializeLangField怎么用?PHP hierarchy::unserializeLangField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hierarchy
的用法示例。
在下文中一共展示了hierarchy::unserializeLangField方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: list_ManyResult
/**
*
* @param type $sql
* @param type $fieldname
* @return type
*/
function list_ManyResult($sql, $fieldname) {
// require hierarchy
if ($fieldname == 'faculte') {
require_once 'include/lib/hierarchy.class.php';
}
$resu = array();
$res = Database::get()->queryArray($sql);
foreach ($res as $resA) {
if ($fieldname == 'faculte') {
$name = hierarchy::unserializeLangField($resA->faculte);
} else {
$name = $resA->$fieldname;
}
$resu[$name] = $resA->nb;
}
return $resu;
}
示例2: WHERE
break;
default:
break;
}
// end of switch
} else {
// show username as well (useful)
$sql = Database::get()->queryArray("SELECT id, givenname, surname, username, faculty_id, date_open, comment, password FROM user_request\n WHERE (state = 1 AND status = {$list_status} {$depqryadd})");
if (count($sql) > 0) {
$tool_content .= "<div class='table-responsive'><table id='requests_table' class='table-default'>";
$tool_content .= table_header();
$tool_content .= "<tbody>";
foreach ($sql as $req) {
$tool_content .= "<td>" . q($req->givenname) . " " . q($req->surname) . "</td>";
$tool_content .= "<td>" . q($req->username) . "</td>";
$tool_content .= "<td>" . hierarchy::unserializeLangField(find_faculty_by_id($req->faculty_id)) . "</td>";
$tool_content .= "<td align='center'>\n <small>" . nice_format(date('Y-m-d', strtotime($req->date_open))) . "</small></td>";
$tool_content .= "<td class='option_btn_cell'>";
switch ($req->password) {
case 'pop3':
$link = "../auth/ldapnewprofadmin.php?id={$req->id}&auth=2";
$authmethod = "({$langViaPop})";
break;
case 'imap':
$link = "../auth/ldapnewprofadmin.php?id={$req->id}&auth=3";
$authmethod = "({$langViaImap})";
break;
case 'ldap':
$link = "auth/ldapnewprofadmin.php?id={$req->id}&auth=4";
$authmethod = "({$langViaLdap})";
break;