本文整理汇总了PHP中Table::addTHeadCell方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::addTHeadCell方法的具体用法?PHP Table::addTHeadCell怎么用?PHP Table::addTHeadCell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table
的用法示例。
在下文中一共展示了Table::addTHeadCell方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
</div>
<?php
}
if ($this->accessAdminPage(8)) {
?>
<div class="col-sm-6">
<div class="row pane">
<div class="col-xs-12">
<h2 class="sub-header">Latest Blocked IPs</h2>
<?php
$ips = $page->getPlugin('table', array('ips'));
$ips->setIndent(' ')->addClass('table-striped');
$thead = array();
$thead['n'] = Table::addTHeadCell('#');
$thead['ip'] = Table::addTHeadCell('IP');
$thead['until'] = Table::addTHeadCell('Until');
$ips->addHeader($thead);
$ip_query = $mySQL_r->prepare("\nSELECT `id`, INET_NTOA(`IP`), DATE_ADD(`time`, INTERVAL `length` DAY)\nFROM `core_ip`\nORDER BY `time` DESC\n");
$ip_query->execute();
$ip_query->bind_result($ban_id, $ip, $until);
$ip_query->store_result();
while ($ip_query->fetch()) {
$row = array();
$row['ID'] = Table::addCell($ban_id);
$row['ip'] = Table::addCell($ip);
$row['until'] = Table::addCell(date(DATET_LONG, strtotime($until)));
$ips->addRow($row);
}
$ips->build();
print $ips->getTable();
?>
示例2: array
<?php
$table = $page->getPlugin('table', array('locations'));
$table->setIndent(6)->addClass('table-bordered')->addClass('table-hover')->addClass('table-striped')->sort(true);
$thead = array();
if ($this->accessAdminPage(2) || $this->inGroup(2, true)) {
$thead['selectAll'] = Table::addTHeadCell('<input type="checkbox" id="selectAll" />', false);
}
$thead[] = Table::addTHeadCell('ID');
$thead[] = Table::addTHeadCell('Name');
$thead[] = Table::addTHeadCell('City');
$thead[] = Table::addTHeadCell('County');
$thead[] = Table::addTHeadCell('Map');
if ($this->accessAdminPage(2)) {
$thead[] = Table::addTHeadCell('Edit', false);
}
$thead[] = Table::addTHeadCell('View', false);
$table->addHeader($thead);
$module_query = $mySQL_r->prepare("SELECT `id`, `name`, `city`, `county`, `map` FROM `location` ORDER BY `county` ASC, `city` ASC");
$module_query->execute();
$module_query->bind_result($id, $name, $city, $county, $map);
$module_query->store_result();
while ($module_query->fetch()) {
$row = array();
if ($this->accessAdminPage(2) || $this->inGroup(2, true)) {
$row['select'] = Table::addCell('<input class="locations_check" type="checkbox" value="' . $id . '" name="location[]" />');
}
$row[] = Table::addCell($id);
$row[] = Table::addCell($name, 'i_' . $id);
$row[] = Table::addCell($city);
$row[] = Table::addCell($county);
$row[] = Table::addCell(Form::toggleLink($this, $map, '', '', array('s' => array('i' => 'ok'), 'f' => array('i' => 'remove'))));
示例3: array
<div class="row">
<div class="col-xs-12">
<?php
$event_view = $page->getPlugin('table', array('events'));
$event_view->addClass('table-striped')->addClass('table-hover')->addClass('table-bordered')->setIndent(' ')->responsive(true)->sort(true)->sticky(true);
$thead = array();
if ($this->inGroup(1)) {
$thead['selectAll'] = Table::addTHeadCell('<input type="checkbox" id="selectAll" />', false);
}
$thead['ID'] = Table::addTHeadCell('ID');
$thead['Name'] = Table::addTHeadCell('Time');
$thead['Username'] = Table::addTHeadCell('User');
$thead['Email'] = Table::addTHeadCell('<abbr title="Client IP Address">IP</abbr>');
$thead['En'] = Table::addTHeadCell('<abbr title="Requested URI">URI</abbr>');
$thead['ns'] = Table::addTHeadCell('Namespace');
$thead['Act'] = Table::addTHeadCell('Event');
$event_view->addHeader($thead);
$event_query = $mySQL_r->prepare("SELECT `core_log`.`id`, `time`,`uri`,CONCAT(`f_name`, ' ', `s_name`),INET_NTOA(`user_ip`), `namespace`, `event` FROM `core_log`\nLEFT JOIN `core_users` ON `user_id`=`core_users`.`id`\nORDER BY `time` DESC LIMIT ?, ?");
if ($event_query !== false) {
$event_query->bind_param('ii', $start_record, $record_length);
$event_query->bind_result($event_id, $time, $uri, $username, $user_ip, $namespace, $event);
$event_query->execute();
$event_query->store_result();
while ($event_query->fetch()) {
if ($this->inGroup(1)) {
$row['select'] = Table::addCell('<input class="events_check" type="checkbox" value="' . $event_id . '" name="event[]" />');
}
$row['ID'] = Table::addCell(str_pad($event_id, 4, 0, STR_PAD_LEFT), 'i_' . $event_id, '', '', true);
$row['time'] = Table::addCell(date(DATET_SHORT, strtotime($time)), '', '', true);
$row['user_id'] = Table::addCell($username, '', '', true);
$row['user_ip'] = Table::addCell('<a href="ipblock_add?ip=' . $user_ip . '" target="_blank" class="bstooltip" data-title="Click to block IP">' . $user_ip . '</a>', '', '', true);
示例4: CONCAT
$thead['Group'] = Table::addTHeadCell('Group');
$thead['Username'] = Table::addTHeadCell('Username');
$thead['last'] = Table::addTHeadCell('Last Activity');
if ($page->inGroup(2020)) {
$thead['logout'] = Table::addTHeadCell('Logout');
}
$users->addHeader($thead);
$user_query = $mySQL_r->prepare("SELECT `user`, CONCAT(`f_name`, ' ', `s_name`), `core_groups`.`name`, `username`, MAX(`lpr`) FROM `core_sessions`\nINNER JOIN `core_users` ON `user`=`core_users`.`id`\nLEFT JOIN `core_groups` ON `p_group`=`GID`\nGROUP BY `user` ORDER BY `lpr`");
$user_query->execute();
$user_query->bind_result($user_id, $name, $group, $username, $lpr);
$user_query->store_result();
$n = 1;
while ($user_query->fetch()) {
$row = array();
$row['n'] = Table::addCell($n);
$row['name'] = Table::addCell($name);
$row['group'] = Table::addCell($group);
$row['user'] = Table::addCell($username);
$row['last'] = Table::addCell(date(DATET_SHORT, strtotime($lpr)));
if ($page->inGroup(2020)) {
$row['logout'] = Table::addTHeadCell('<a href="#" onclick="processData(\'/action/user/session_destroym/' . $user_id . '\')"><span class="' . B_ICON . ' ' . B_ICON . '-log-out"</a>');
}
$users->addRow($row);
$n++;
}
$users->build();
print $users->getTable();
?>
</div>
</div>
示例5: while
if ($this->accessAdminPage(3) || $this->accessAdminPage(4)) {
$thead['selectAll'] = Table::addTHeadCell('<input type="checkbox" id="selectAll" />', false);
}
$thead['id'] = Table::addTHeadCell('ID');
$thead['title'] = Table::addTHeadCell('Title');
$thead['pub'] = Table::addTHeadCell('<abbr title="Published">P</abbr>');
$thead['perms'] = Table::addTHeadCell('<abbr title="Permissions">Perm</abbr>');
$thead['user'] = Table::addTHeadCell('User');
$thead['group'] = Table::addTHeadCell('Group');
$thead['revs'] = Table::addTHeadCell('<abbr title="Revisions">R</abbr>');
$thead['hits'] = Table::addTHeadCell('<abbr title="Hits">H</abbr>');
if ($this->accessAdminPage(2)) {
$thead['Edit'] = Table::addTHeadCell('Edit', false);
}
if ($this->accessAdminPage(4)) {
$thead['Preview'] = Table::addTHeadCell('<abbr title="Preview">Prev</abbr>', false);
}
$articles->addHeader($thead);
$article_query = $this->mySQL_r->prepare("SELECT `news_articles`.`ID`, `title`, `aid`, `publish`, `rw`, `core_users`.`username`, `core_groups`.`name`, `revision`, `hits` FROM `news_articles`\nLEFT JOIN `core_users`\nON `user`=`core_users`.`ID`\nLEFT JOIN `core_groups`\nON `group`=`core_groups`.`GID`\nORDER BY `date_p` DESC");
if ($article_query !== false) {
$article_query->execute();
$article_query->store_result();
$article_query->bind_result($id, $title, $aid, $publish, $perm, $user, $group, $revs, $hits);
while ($article_query->fetch()) {
$perms = substr($perm, 0, 1) == 1 ? 'r' : '-';
$perms .= substr($perm, 1, 1) == 1 ? 'w' : '-';
$perms .= ':';
$perms .= substr($perm, 2, 1) == 1 ? 'r' : '-';
$perms .= substr($perm, 3, 1) == 1 ? 'w' : '-';
$perms .= ':';
$perms .= substr($perm, 4, 1) == 1 ? 'r' : '-';
示例6: array
$table = $page->getPlugin('table', array('modules'));
$table->setIndent(8)->addClass('table-bordered')->addClass('table-hover')->addClass('table-striped')->sort(true);
$thead = array();
$thead[] = Table::addTHeadCell('ID');
$thead[] = Table::addTHeadCell('Name');
$thead[] = Table::addTHeadCell('Namespace');
$thead[] = Table::addTHeadCell('Version', false);
$thead[] = Table::addTHeadCell('Installed On');
if ($this->accessAdminPage(3)) {
$thead[] = Table::addTHeadCell('<abbr title="Backup">B</abbr>', false);
}
if ($this->accessAdminPage(2)) {
$thead[] = Table::addTHeadCell('<abbr title="Uninstall">U</abbr>', false);
}
if ($this->accessAdminPage(4)) {
$thead[] = Table::addTHeadCell('<abbr title="Details">D</abbr>', false);
}
$table->addHeader($thead);
$module_query = $mySQL_r->prepare("SELECT `module_id`, `name`, `namespace`, `version`, `install_date`, `backup`, `uninstall` FROM `core_modules` ORDER BY `uninstall` ASC, `module_id` ASC");
$module_query->execute();
$module_query->bind_result($mod_id, $name, $namespace, $version, $installed, $backup, $uninstall);
$module_query->store_result();
while ($module_query->fetch()) {
$row = array();
$row[] = Table::addCell($mod_id);
$row[] = Table::addCell($name);
$row[] = Table::addCell($namespace);
$row[] = Table::addCell($version);
$row[] = Table::addCell(date(DATET_SHORT, strtotime($installed)));
if ($backup == 1 && $this->accessAdminPage(3)) {
$row[] = Table::addCell('<a href="#" onclick="processData(\'/action/modules/backup?m=' . $mod_id . '\')"><span class="' . B_ICON . ' ' . B_ICON . '-export"></span></a>');
示例7: array
<div class="row pane">
<div class="col-xs-12">
<h1 class="page-header">Backup Modules</h1>
<?php
$table = $page->getPlugin('table', array('modules'));
$table->setIndent(8)->addClass('table-bordered')->addClass('table-hover')->addClass('table-striped')->sort(true);
$table->addHeader(array(Table::addTHeadCell('ID'), Table::addTHeadCell('Name'), Table::addTHeadCell('Namespace'), Table::addTHeadCell('Installed On'), Table::addTHeadCell('', false)));
if ($this->inGroup(1)) {
$module_query = $mySQL_r->prepare("SELECT `module_id`, `name`, `namespace`, `install_date` FROM `core_modules` ORDER BY `install_date` DESC");
} else {
$module_query = $mySQL_r->prepare("SELECT `module_id`, `name`, `namespace`, `install_date` FROM `core_modules` WHERE `uninstall`='1' ORDER BY `install_date` DESC");
}
$module_query->execute();
$module_query->bind_result($mod_id, $name, $namespace, $installed);
$module_query->store_result();
while ($module_query->fetch()) {
$row = array();
$row[] = Table::addCell($mod_id);
$row[] = Table::addCell($name);
$row[] = Table::addCell($namespace);
$row[] = Table::addCell(date(DATET_SHORT, strtotime($installed)));
$row[] = Table::addCell('<a href="#" onclick="processData(\'/action/modules/backup?m=' . $mod_id . '\')">Backup</a>');
$table->addRow($row);
}
$table->build();
print $table->getTable();
?>
</div>
</div>
示例8: array
if ($comp = $meet->fetchCompetition($comp_id)) {
print $comp->format();
}
}
print $paginator->getPaginator();
} else {
print '<div class="row pane">' . PHP_EOL;
print ' <div class="col-xs-12">' . PHP_EOL;
print ' <h4>Failed to load competitions.</h4>' . PHP_EOL;
print ' </div>' . PHP_EOL;
print '</div>' . PHP_EOL;
}
} else {
$table = $page->getPlugin('table', array('competitions_table'));
$table->setIndent(4)->addClass('table-bordered')->addClass('table-hover')->addClass('table-striped')->sort(true)->pager(true);
$table->addHeader(array(Table::addTHeadCell('Title', true, '', '', true), Table::addTHeadCell('Date(s)'), Table::addTHeadCell('Location', true, '', '', true), Table::addTHeadCell('Entry Date'), Table::addTHeadCell('<abbr title="Number of Sessions"><b><span class="visible-xs visible-sm">S</span><span class="hidden-xs hidden-sm">Sessions</span></b></abbr>', false, '', '', true), Table::addTHeadCell('<abbr title="Number of Events"><b><span class="visible-xs visible-sm">E</span><span class="hidden-xs hidden-sm">Events</span></b></abbr>', false, '', '', true), Table::addTHeadCell('', false)));
if ($meet = $page->getResource('competitions')) {
while ($meet_query->fetch()) {
if ($comp = $meet->fetchCompetition($comp_id)) {
$table->addRow(array(Table::addCell($comp->title), Table::addCell('<span class="hidden">' . strtotime($comp->date['start']) . '</span>' . $comp->date['long']), Table::addCell('<a href="/location/' . $comp->getLocation('ID') . '">' . $comp->getLocation('city') . '</a>'), Table::addCell($comp->date['entry']), Table::addCell($comp->data['sessions']), Table::addCell($comp->data['events']), Table::addCell('<a href="/competitions/meet/' . $comp->ID . '">More...</a>')));
}
}
$table->build();
print '<div class="row pane">' . PHP_EOL;
print ' <div class="col-xs-12">' . PHP_EOL;
print $table->getTable();
print ' </div>' . PHP_EOL;
print '</div>' . PHP_EOL;
} else {
print '<div class="row pane">' . PHP_EOL;
print ' <div class="col-xs-12">' . PHP_EOL;
示例9: format
function format($type = 'all')
{
switch ($type) {
case 'all':
$variables['meetID'] = $this->ID;
$variables['meetTitle'] = $this->title;
$variables['meetDate'] = $this->date['long'];
$variables['meetEntryDate'] = $this->date['entry'];
// Parse Info template
$info = '';
$this->parent->parent->debug($this::name_space . ': Parsing info template...');
if ($this->location !== false) {
$variables['meetLocationID'] = $this->location->ID;
$variables['meetLocationName'] = $this->location->name;
$variables['meetLocationCity'] = $this->location->address['city'];
if ($text = $this->parseTemplate($variables, dirname(__FILE__) . '/templates/full_comp-info.htm')) {
$info = $text;
}
} else {
if ($text = $this->parseTemplate($variables, dirname(__FILE__) . '/templates/full_comp-info_noLoc.htm')) {
$info = $text;
}
}
// Parse Notes template
$notes = '';
if ($this->show['notes'] == true) {
$this->parent->parent->debug($this::name_space . ': Parsing notes template...');
foreach ($this->notes as $type => $content) {
if ($content != '') {
$variables['noteType'] = ucfirst($type);
$variables['noteContent'] = $content;
if ($text = $this->parseTemplate($variables, dirname(__FILE__) . '/templates/full_comp-note.htm')) {
$notes .= $text;
}
}
}
unset($variables['noteType'], $variables['noteContent']);
}
$docs = '';
// Parse results service template
$res = '';
if ($this->res['enable'] == true && $this->res['text'] != '') {
$this->parent->parent->debug($this::name_space . ': Parsing results service template...');
$variables['resServText'] = $this->res['text'];
$variables['resServMeet'] = $this->res['meet'];
$variables['resServSeries'] = $this->res['series'];
$variables['resServer'] = $this->parent->parent->config->getOption('comp_resServer');
if ($text = $this->parseTemplate($variables, dirname(__FILE__) . '/templates/full_comp-resServ.htm')) {
$res = $text;
}
}
// Parse schedule template
$schedule = $sessions = '';
if ($this->show['schedule'] == true) {
$defSessionTable = new Table($this->parent, 'schedule');
$defSessionTable->setIndent(16);
$defSessionTable->addClass('table-striped');
$defSessionTable->addClass('table-bordered');
$defSessionTable->addClass('table-condensed');
$defSessionTable->addClass('table-hover');
$defSessionTable->sort(true);
$defSessionTable->pager(false);
$defSessionTable->addHeader(array(Table::addTHeadCell('Event #'), Table::addTHeadCell('Gender'), Table::addTHeadCell('Age Group'), Table::addTHeadCell('Distance'), Table::addTHeadCell('Stroke'), Table::addTHeadCell('Round')));
$this->parent->parent->debug($this::name_space . ': Parsing event schedule...');
foreach ($this->data['S'] as $sNum => $session) {
$sessionTable = clone $defSessionTable;
$sessionTable->setID('m_' . $this->ID . '_sch_s_' . $sNum);
// Parse session times template
$sessionTimes = $this->parent->getPlugin('table', array('m_' . $this->ID . '_time_s_' . $sNum));
$sessionTimes->setIndent(16);
$sessionTimes->addClass('table-condensed');
$this->parent->parent->debug($this::name_space . ': Parsing session times...');
$cols = array();
foreach ($session['t'] as $type => $time) {
$type = $this->options['times'][$type];
$cols[] = Table::addCell('<b>' . $type . '</b>');
$cols[] = Table::addCell($time);
}
$sessionTimes->addRow($cols);
$sessionTimes->build();
$sessionTimes = $sessionTimes->getTable();
unset($variables['type'], $variables['time'], $text);
// Parse event template
$this->parent->parent->debug($this::name_space . ': Parsing events template...');
foreach ($session['E'] as $event) {
$eventNumber = $event['prefix'] == 1 ? $sNum . $event['num'] : $event['num'];
$event = $this->parseEvent($event, true);
$sessionTable->addRow(array(Table::addCell($eventNumber), Table::addCell($event['gender']), Table::addCell($event['age']), Table::addCell($event['distance']), Table::addCell($event['stroke']), Table::addCell($event['round'])));
}
$sessionTable->build();
// Parse session template
$variables['sessionNumber'] = $session['number'];
$variables['sessionDate'] = $session['date'];
$variables['sessionTimes'] = $sessionTimes;
$variables['events'] = $sessionTable->getTable();
if ($text = $this->parseTemplate($variables, dirname(__FILE__) . '/templates/full_comp-session.htm')) {
$sessions .= $text;
}
}
// End Session foreach
//.........这里部分代码省略.........
示例10: array
</div>
</div>
<?php
if ($this->accessAdminPage(11) || $this->accessAdminPage(12) || $this->accessAdminPage(13)) {
?>
<div class="col-sm-6">
<div class="row pane">
<div class="col-xs-12">
<h2 class="sub-header">Primary Groups</h2>
<?php
$groups = $page->getPlugin('table', array('groups'));
$groups->setIndent(' ')->addClass('table-striped');
$thead = array();
$thead['ID'] = Table::addTHeadCell('ID');
$thead['Name'] = Table::addTHeadCell('Name');
$thead['Pages'] = Table::addTHeadCell('Pages');
$groups->addHeader($thead);
$group_query = $mySQL_r->prepare("\nSELECT `core_groups`.`GID`, `name`, COUNT(`PID`)\nFROM `core_groups`\nLEFT JOIN `core_gpage` ON `core_gpage`.`GID`=`core_groups`.`GID`\nWHERE `type`='p' GROUP BY `core_groups`.`GID`\nORDER BY `name` ASC\n");
$group_query->execute();
$group_query->bind_result($group_id, $name, $pages);
$group_query->store_result();
while ($group_query->fetch()) {
$row['ID'] = Table::addCell($group_id);
$row['name'] = Table::addCell($name);
$row['pages'] = Table::addCell($pages);
$groups->addRow($row);
unset($row);
}
$groups->build();
print $groups->getTable();
?>
示例11: array
$jobs = $page->getPlugin('table', array('jobs'));
$jobs->addClass('table-striped')->addClass('table-hover')->addClass('table-bordered')->setIndent(' ')->sort(true);
$thead = array();
if ($this->accessAdminPage(52) || $this->inGroup(53, true)) {
$thead['selectAll'] = Table::addTHeadCell('<input type="checkbox" id="selectAll" />', false);
}
$thead['ID'] = Table::addTHeadCell('ID');
$thead['task'] = Table::addTHeadCell('Task');
$thead['enable'] = Table::addTHeadCell('<abbr title="Enabled">En</abbr>');
$thead['lastrun'] = Table::addTHeadCell('Last Run');
$thead['desc'] = Table::addTHeadCell('Description');
if ($this->accessAdminPage(52)) {
$thead['edit'] = Table::addTHeadCell('Edit', false);
}
if ($this->inGroup(54, true)) {
$thead['run'] = Table::addTHeadCell('Run', false);
}
$jobs->addHeader($thead);
$job_query = $mySQL_r->prepare("SELECT `core_cron`.`ID`, `enable`, `namespace`, `action`, `core_cron`.`description`, `last_run` FROM `core_cron`\nLEFT JOIN `core_modules`\nON `core_modules`.`module_id` = `core_cron`.`mod_id`\nORDER BY `last_run` DESC");
$job_query->bind_result($id, $enable, $module, $action, $desc, $last_run);
$job_query->execute();
$job_query->store_result();
while ($job_query->fetch()) {
if ($this->accessAdminPage(52) || $this->inGroup(53, true)) {
$row['select'] = Table::addCell('<input class="jobs_check" type="checkbox" value="' . $id . '" name="job[]" />');
}
$row['ID'] = Table::addCell($id);
$row['action'] = Table::addCell($module . '::' . $action . '()', 'i_' . $id, '', true);
$row['enable'] = Table::addCell(Form::toggleLink($this, $enable, '', '', array('s' => array('i' => 'ok'), 'f' => array('i' => 'remove'))));
if ($last_run === NULL) {
$last_run = 'Never';
示例12: array
$thead = array();
$thead['ID'] = Table::addTHeadCell('ID');
$thead['Created'] = Table::addTHeadCell('Created');
$thead['IP'] = Table::addTHeadCell('IP');
$thead['LPR'] = Table::addTHeadCell('Last Page Request');
if ($this->accessAdminPage(20)) {
$thead['destroy'] = Table::addTHeadCell('');
}
$table->addHeader($thead);
while ($session_query->fetch()) {
$row['ID'] = Table::addCell($sessID);
$row['Created'] = Table::addCell($sessCreate);
$row['IP'] = Table::addCell($sessIP);
$row['LPR'] = Table::addCell(date(DATET_SHORT, strtotime($sessLPR)));
if ($this->accessAdminPage(20)) {
$row['destroy'] = Table::addTHeadCell('<a href="#" onclick="processData(\'/action/user/session_destroy/' . $sessID . '\')">Destroy <span class="' . B_ICON . ' ' . B_ICON . '-remove-sign"</a>');
}
$table->addRow($row);
}
$table->build();
?>
<div class="row pane">
<div class="col-xs-12">
<h1 class="page-header">Edit User</h1>
<ul class="nav nav-tabs nav-justified" role="tablist">
<li class="active"><a href="#details" role="tab" data-toggle="tab">Details</a></li>
<li><a href="#sessions" role="tab" data-toggle="tab">Sessions</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="details">
示例13: array
$thead['pos'] = Table::addTHeadCell('Position');
$thead['ID'] = Table::addTHeadCell('ID');
$thead['Page'] = Table::addTHeadCell('PID');
$thead['title'] = Table::addTHeadCell('Title');
$thead['dropdown'] = Table::addTHeadCell('Dropdown');
if ($this->accessAdminPage(63)) {
$thead['up'] = Table::addTHeadCell('<abbr title="Move item up">U</abbr>');
}
if ($this->accessAdminPage(63)) {
$thead['down'] = Table::addTHeadCell('<abbr title="Move item down">D</abbr>');
}
if ($this->accessAdminPage(63)) {
$thead['edit'] = Table::addTHeadCell('Edit');
}
if ($this->accessAdminPage(63)) {
$thead['delete'] = Table::addTHeadCell('Delete');
}
$menu->addHeader($thead);
$menu_query = $mySQL_r->prepare("SELECT `MID`, `position`, `PID`, `title`, `dropdown`, `divider`\nFROM `core_menu`\nLEFT JOIN `core_pages`\nON `core_pages`.`id`=`PID`\nWHERE `parent`<=>NULL\nORDER BY `position` ASC");
$menu_query->bind_result($MID, $position, $PID, $title, $dropdown, $divider);
$menu_query->execute();
$menu_query->store_result();
$rown = 1;
while ($menu_query->fetch()) {
$row['pos'] = Table::addCell($position);
$row['ID'] = Table::addCell($MID);
$row['page'] = Table::addCell($PID);
$row['title'] = Table::addCell($title);
$row['dropdown'] = Table::addCell(Form::toggleLink($this, $dropdown, '', '', array('s' => array('i' => 'ok'), 'f' => array('i' => 'remove'))));
if ($this->accessAdminPage(42)) {
if ($rown == 1) {
示例14: array
<?php
$block = $page->getPlugin('table', array('blocks'));
$block->addClass('table-striped')->addClass('table-hover')->addClass('table-bordered')->setIndent(' ')->sort(true);
$thead = array();
if ($this->accessAdminPage(42) || $this->inGroup(43, true)) {
$thead['selectAll'] = Table::addTHeadCell('<input type="checkbox" id="selectAll" />', false);
}
$thead['ID'] = Table::addTHeadCell('ID');
$thead['on'] = Table::addTHeadCell('On');
$thead['by'] = Table::addTHeadCell('By');
$thead['ip'] = Table::addTHeadCell('IP');
$thead['expires'] = Table::addTHeadCell('Expires');
$thead['left'] = Table::addTHeadCell('<abbr title="Days left">Left</abbr>');
$thead['reason'] = Table::addTHeadCell('Reason');
if ($this->accessAdminPage(42)) {
$thead['edit'] = Table::addTHeadCell('Edit', false);
}
$block->addHeader($thead);
$block_query = $mySQL_r->prepare("SELECT `core_ip`.`id`, `time`, CONCAT(`f_name`, ' ', `s_name`, ' (', `username`, ')'), INET_NTOA(`ip`), DATE_ADD(`time`, INTERVAL `length` DAY) AS `expires`, DATEDIFF(DATE_ADD(`time`, INTERVAL `length` DAY), NOW()) AS `left`, `reason`\nFROM `core_ip`\nLEFT JOIN `core_users`\nON `core_users`.`id`=`user_id`\nHAVING `expires`>NOW()\nORDER BY `left` ASC");
$block_query->bind_result($block_id, $time, $by, $ip, $expires, $left, $reason);
$block_query->execute();
$block_query->store_result();
while ($block_query->fetch()) {
if ($this->accessAdminPage(42) || $this->inGroup(43, true)) {
$row['select'] = Table::addCell('<input class="blocks_check" type="checkbox" value="' . $block_id . '" name="block[]" />');
}
$row['ID'] = Table::addCell($block_id);
$row['on'] = Table::addCell(date(DATE_LONG, strtotime($time)));
$row['by'] = Table::addCell($by);
$row['ip'] = Table::addCell($ip, 'i_' . $block_id);
$row['expires'] = Table::addCell(date(DATET_LONG, strtotime($expires)));
示例15: array
</div><br />
<div class="row">
<div class="col-xs-12">
<?php
$session_view = $page->getPlugin('table', array('sessions'));
$session_view->setIndent(' ')->addClass('table-bordered')->addClass('table-hover')->addClass('table-striped')->sort(true)->sticky(true);
$thead = array();
$thead['selectAll'] = Table::addTHeadCell('<input type="checkbox" id="selectAll" />', '', false);
$thead['ID'] = Table::addTHeadCell('ID');
$thead['Name'] = Table::addTHeadCell('Name');
$thead['Username'] = Table::addTHeadCell('Username');
$thead['ip'] = Table::addTHeadCell('IP');
$thead['created'] = Table::addTHeadCell('Created');
$thead['lpr'] = Table::addTHeadCell('Last Page Request');
$thead['del'] = Table::addTHeadCell('Destroy', '', false);
$thead['lock'] = Table::addTHeadCell('Lock', '', false);
$session_view->addHeader($thead);
$session_query = $mySQL_r->prepare("SELECT `core_sessions`.`id`, CONCAT(`core_users`.`f_name`, ' ', `core_users`.`s_name`), `core_users`.`username`, INET_NTOA(`ip`), `created`, `lpr` FROM `core_sessions` INNER JOIN `core_users` ON `core_sessions`.`user`=`core_users`.`id` ORDER BY `core_users`.`id` ASC, `core_sessions`.`lpr` DESC");
$session_query->execute();
$session_query->bind_result($session_id, $name, $username, $ip, $created, $lpr);
$session_query->store_result();
while ($session_query->fetch()) {
$row['check'] = Table::addCell('<input class="sessions_check" type="checkbox" value="' . $session_id . '" name="session[]" />');
$row['ID'] = Table::addCell($session_id, 'i_' . $session_id);
$row['name'] = Table::addCell($name);
$row['username'] = Table::addCell($username);
$row['ip'] = Table::addCell($ip);
$row['created'] = Table::addCell(date(DATET_SHORT, strtotime($created)));
$row['lpr'] = Table::addCell(date(DATET_SHORT, strtotime($lpr)));
$row['del'] = Table::addCell('<a href="#" onclick="processData(\'/action/user/session_destroy/' . $session_id . '\')"><span class="' . B_ICON . ' ' . B_ICON . '-remove-sign"</a>');
$row['lock'] = Table::addCell('<a href="#" onclick="processData(\'/action/user/session_lock/' . $session_id . '\')"><span class="' . B_ICON . ' ' . B_ICON . '-lock"</a>');