本文整理汇总了PHP中gcms::checkempty方法的典型用法代码示例。如果您正苦于以下问题:PHP gcms::checkempty方法的具体用法?PHP gcms::checkempty怎么用?PHP gcms::checkempty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gcms
的用法示例。
在下文中一共展示了gcms::checkempty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$sql .= " {$where} ORDER BY " . $orders[$order][1];
$sql .= " LIMIT {$start}, {$list_per_page}";
foreach ($db->customQuery($sql) as $item) {
$id = $item['id'];
$tr = '<tr id=user_' . $id . '>';
$t = $item['ban_date'] > 0 ? " class=ban title=" . sprintf($lng['LNG_BAN_DETAIL'], $item['ban_count'], gcms::mktime2date($item['ban_date'], 'd M Y')) : '';
$c = array();
$c[] = "status{$item['status']}";
$c[] = $item['fb'] == 1 ? ' facebook' : '';
$tr .= '<th headers=c0 id=r' . $id . ' scope=row' . $t . '><a class="' . implode(' ', $c) . '" href="{URLQUERY?module=sendmail&src=member&spage=' . $page . '&to=' . $id . '}" title="{LNG_EMAIL_SEND} {LNG_TO} ' . $item['email'] . '">' . $item['email'] . '</a></th>';
$tr .= '<td headers="r' . $id . ' c1" ><span class="icon-valid ' . ($item['admin_access'] == 1 ? 'access' : 'disabled') . '" title="{LNG_ADMIN_ACCESS}"></span></td>';
$tr .= '<td headers="r' . $id . '" class=check-column><a id=check_' . $id . ' class=icon-uncheck></a></td>';
$tr .= '<td headers="r' . $id . ' c3">' . $item['phone1'] . '</td>';
$u = array();
gcms::checkempty($item['fname'], $u);
gcms::checkempty($item['lname'], $u);
if (sizeof($u) > 0) {
if ($item['displayname'] != '') {
$u[] = "({$item['displayname']})";
}
} elseif ($item['displayname'] != '') {
$u[] = $item['displayname'];
} else {
$u[] = '{LNG_UNNAME}';
}
$u = implode(' ', $u);
$tr .= '<td headers="r' . $id . ' c4" class=mobile>' . $u . '</td>';
$sex = in_array($item['sex'], array_keys($lng['SEX'])) ? $item['sex'] : 'u';
$tr .= '<td headers="r' . $id . ' c5" class="center tablet"><span class=icon-sex-' . $sex . '></span></td>';
$website = $item['website'] == '' ? ' ' : '<a href="http://' . $item['website'] . '" target=_blank>' . $item['website'] . '</a>';
$tr .= '<td headers="r' . $id . ' c6" class="website tablet">' . $website . '</td>';
示例2: array
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// แสดงผล
$patt = array('/{BREADCRUMS}/', '/{WEBURL}/', '/{WEBTITLE}/', '/{SKIN}/', '/{ID}/', '/{COLOR}/', '/{DISPLAYNAME}/', '/{EMAIL}/', '/{SEX}/', '/{DATE}/', '/{WEBSITE}/', '/{VISITED}/', '/{SOCIAL}/', '/{LASTVISITED}/', '/{POST}/', '/{REPLY}/', '/{STATUS}/', '/{POINT}/', '/{(LNG_[A-Z0-9_]+)}/e');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = WEB_URL;
$replace[] = $config['web_title'];
$replace[] = SKIN;
$replace[] = $result['id'];
$replace[] = $result['status'];
$u = array();
gcms::checkempty($result['pname'], $u);
gcms::checkempty($result['fname'], $u);
gcms::checkempty($result['lname'], $u);
if (sizeof($u) > 0) {
if ($result['displayname'] != '') {
$u[] = "({$result['displayname']})";
}
} elseif ($result['displayname'] != '') {
$u[] = $result['displayname'];
} else {
$u[] = $result['email'];
}
$replace[] = implode(' ', $u);
if (is_file(ROOT_PATH . 'modules/pm/send.php')) {
$replace[] = '<a class=icon-email-sent title="{LNG_PM_SEND_TITLE}" href="index.php?module=pm-send&to=' . $result['id'] . '"> </a>';
} else {
$replace[] = '<a class=icon-email-sent title="{LNG_MAIL_TO}" href="index.php?module=sendmail&to=' . $result['id'] . '"> </a>';
}