本文整理汇总了PHP中html_link函数的典型用法代码示例。如果您正苦于以下问题:PHP html_link函数的具体用法?PHP html_link怎么用?PHP html_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了html_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _checkFor_browse_list
function _checkFor_browse_list($func_name, $list_type, $list_title, &$ary, $captured_length, $query = false)
{
global $bx, $t;
// setup the database objects
$cnt = count($ary);
$q = $query ? $query : "SELECT COUNT(*) FROM tech_content " . "WHERE {$list_type}='%s' AND status='A'";
$db_config = new mock_db_configure($cnt);
$row = $this->_generate_records(array("COUNT(*)"), $cnt);
for ($idx = 0; $idx < $cnt; $idx++) {
$db_config->add_query(sprintf($q, $ary[$idx]), $idx);
$row[$idx]['COUNT(*)'] = $idx;
$db_config->add_record($row[$idx], $idx);
}
// create a box and call the function
$bx = $this->_create_default_box();
$this->capture_call($func_name, $captured_length);
// check the contents of the output
$this->_checkFor_a_box($list_title);
$this->_checkFor_common_column_titles($list_title);
$colors = array(0 => 'gold', 1 => '#FFFFFF');
for ($idx = 0; $idx < $cnt; $idx++) {
$bgc = $colors[$idx % 2];
$num = sprintf('[%03d]', $row[$idx]['COUNT(*)']);
$this->_testFor_box_column('right', '', $bgc, $idx + 1);
if ($num != "[000]") {
$this->_testFor_box_column('center', '', $bgc, html_link('browse.php3', array('through' => $list_type, $list_type => $ary[$idx]), $num));
} else {
$this->_testFor_box_column('center', '', $bgc, $num);
}
$this->_testFor_box_column('left', '', $bgc, $ary[$idx]);
}
$this->_check_db($db_config);
}
示例2: postIndex
/**
* @param Request $request
* @return \Illuminate\Http\JsonResponse
*/
public function postIndex(Request $request)
{
$status = [0 => trans('backend::common.non_active'), 1 => trans('backend::common.active')];
$query = UserModel::query();
$recordsTotal = $query->count();
$filters = $request->input('filter', []);
if (!empty($filters['id'])) {
$query->where('id', '=', $filters['id']);
}
if (array_key_exists('active', $filters) && $filters['active'] !== '') {
$query->where('active', '=', $filters['active']);
}
if (!empty($filters['email'])) {
strpos($filters['email'], '%') !== false ? $query->where('email', 'like', $filters['email']) : $query->where('email', '=', strtolower($filters['email']));
}
$recordsFiltered = $query->count();
$query->limit($request->input('length', 25))->offset($request->input('start', 0));
$query->orderBy('id', 'desc');
$collection = $query->get();
$result = [];
foreach ($collection as $item) {
$edit_link = relative_route('backend.backend.users.edit', ['id' => $item->id]);
$edit_link_html = html_link($edit_link, '<i class="fa fa-pencil"></i>', ['rel' => 'ajax-portlet', 'class' => 'btn btn-sm green', 'title' => trans('backend::common.buttons.edit')]);
$destroy_link = relative_route('backend.backend.users.destroy', ['id' => $item->id]);
$destroy_link_html = html_link($destroy_link, '<i class="fa fa-trash-o"></i>', ['rel' => 'destroy', 'class' => 'btn btn-sm red', 'title' => trans('backend::common.buttons.destroy')]);
$result[] = [$item->id, $item->name, $item->email, array_key_exists($item->active, $status) ? $status[$item->active] : $item->active, $edit_link_html . $destroy_link_html];
}
$data = ['data' => $result, 'recordsTotal' => $recordsTotal, 'recordsFiltered' => $recordsFiltered, 'draw' => $request->input('draw')];
return \Response::json($data, 200, [], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
}
示例3: load_gateway_tabs
/**
* Loads the gateway form fields into tabs
* @param string $gateway Gateway identifier
* @return array Array for the checkbox to enable the gateway
*/
function load_gateway_tabs($gateway)
{
$form_values = $gateway->form();
$nicename = $gateway->identifier();
if (array_key_exists('fields', $form_values)) {
// Wrap values
foreach ($form_values['fields'] as $key => $block) {
$value = $block['name'];
$form_values['fields'][$key]['name'] = array('gateways', $nicename, $value);
}
$this->tab_sections[$nicename]['general_settings'] = $form_values;
} else {
// Wrap values
foreach ($form_values as $s_key => $section) {
foreach ($section['fields'] as $key => $block) {
$value = $block['name'];
$form_values[$s_key]['fields'][$key]['name'] = array('gateways', $nicename, $value);
}
}
$this->tab_sections[$nicename] = $form_values;
}
// Only add a tab for gateways with a form
$title = $gateway->display_name('admin');
if ($form_values) {
$this->tabs->add($nicename, $title);
$title = html_link(add_query_arg(array('page' => $this->args['page_slug'], 'tab' => $nicename), 'admin.php'), $title);
}
return array('title' => $title, 'type' => 'checkbox', 'desc' => __('Enable', APP_TD), 'name' => array('gateways', 'enabled', $nicename));
}
示例4: linked_names
static function linked_names($name, $user)
{
if (!$user->user_id) {
return $name;
}
return html_link(get_author_posts_url($user->user_id), $name);
}
示例5: row
protected function row($item)
{
if (!APP_Item_Registry::is_registered($item['type'])) {
return html('tr', array(), html('td', array('colspan' => '3', 'style' => 'font-style: italic;'), __('This item could not be recognized. It might be from another theme or an uninstalled plugin.', APP_TD)));
}
$ptype_obj = get_post_type_object($item['post']->post_type);
$item_link = $ptype_obj->public ? html_link(get_permalink($item['post_id']), $item['post']->post_title) : '';
$cells = array(APP_Item_Registry::get_title($item['type']), appthemes_get_price($item['price'], $this->currency), $item_link);
return html('tr', array(), $this->cells($cells));
}
示例6: module_top_referer
function module_top_referer($arguments)
{
global $gDb, $gData;
global $lvc_nb_top_referer;
global $lvc_display_cache_delay;
global $lvc_table_visitors;
global $lvm_top_referer, $lvm_referer, $lvm_number;
$is_archived = $arguments['archive'];
if ($is_archived) {
$values = explode("+", $gData['topRef']);
$limit = sizeof($values) / 2;
for ($cnt = 0; $cnt < $limit; $cnt++) {
$row[$cnt]['referer'] = strip_tags($values[2 * $cnt]);
$row[$cnt]['nb'] = $values[2 * $cnt + 1];
}
} else {
$month = $arguments['month'];
$year = $arguments['year'];
$query = "SELECT REF_HOST, COUNT(*) AS C ";
$query .= "FROM " . $lvc_table_visitors . " ";
$query .= "WHERE REF_HOST <> '' AND REF_HOST <> '[unknown origin]' AND REF_HOST <> 'bookmarks' ";
$query .= "AND DATE LIKE '" . $year . "/" . sprintf("%02d", $month) . "/%' ";
$query .= "GROUP BY REF_HOST ";
$query .= "ORDER BY C DESC, REF_HOST ";
if ($gDb->DbQuery($query, 0, $lvc_nb_top_referer) && $gDb->DbNumRows() != 0) {
$cnt = 0;
while ($gDb->DbNextRow()) {
$record = $gDb->Row;
$row[$cnt]['referer'] = strip_tags($record['REF_HOST']);
$row[$cnt]['nb'] = $record['C'];
$cnt++;
}
}
}
$buffer = "<BR><CENTER><TABLE CELLSPACING=1 BORDER=0>\n";
$buffer .= "<TR><TD COLSPAN=2><A CLASS='array'>";
$buffer .= str_replace("{NB_TOP_REFERER}", $lvc_nb_top_referer, $lvm_top_referer) . "</A></TD></TR>\n";
$buffer .= "<TR>";
$buffer .= "<TH CLASS='vis'>" . $lvm_referer . "</TH>";
$buffer .= "<TH CLASS='vis'> " . $lvm_number . " </TH></TR>\n";
for ($cnt = 0; $cnt < $lvc_nb_top_referer; $cnt++) {
$buffer .= "<TR>";
$buffer .= "<TD CLASS='vis'> <A CLASS='host'>" . html_link($row[$cnt]['referer'], $row[$cnt]['referer'], '_blank') . "</A> </TD>";
$buffer .= "<TD CLASS='vis' ALIGN='right'> " . ($row[$cnt]['nb'] != 0 ? number_format($row[$cnt]['nb'], 0, '', ' ') : '') . " </TD>";
$buffer .= "</TR>\n";
}
// cache delay
if ($lvc_display_cache_delay) {
$buffer .= "<TR><TD ALIGN='center' COLSPAN='2'>";
$buffer .= "<A CLASS='delay'>" . cache_delay($arguments['cache']) . "</A>";
}
$buffer .= "</TABLE></CENTER><BR>\n";
return $buffer;
}
示例7: html_horizontalnavigation
function html_horizontalnavigation($nav = '')
{
debug_msg("FUNCTION: " . __FUNCTION__, 3);
if ($nav !== '') {
// Start the table
echo '<table class="hnav"><tr>';
foreach ($nav as $item) {
echo '<td class="hnav">';
html_link($item[0], $item[1], $item[2], $item[3]);
echo '</td>';
}
// Finish off the table
echo '</tr></table>';
}
}
示例8: display_column
function display_column($column, $post_id)
{
if ($this->ctype->name != $column) {
return;
}
$opposite_direction = array('from' => 'to', 'to' => 'from', 'any' => 'any');
echo '<ul>';
foreach ($this->connected[$post_id] as $post) {
$direction = $opposite_direction[$this->ctype->get_direction()];
$args = array('post_type' => get_post_type($post_id), 'connected_type' => $this->ctype->name, 'connected_items' => $post->ID, 'connected_direction' => $direction);
$url = add_query_arg($args, admin_url('edit.php'));
echo html('li', html_link($url, $post->post_title));
}
echo '</ul>';
}
示例9: render_column
protected function render_column($column, $item_id)
{
if ($this->column_id != $column) {
return;
}
if (!isset($this->connected[$item_id])) {
return;
}
$out = '<ul>';
foreach ($this->connected[$item_id] as $item) {
$out .= html('li', html_link($this->get_admin_link($item), $item->get_title()));
}
$out .= '</ul>';
return $out;
}
示例10: page_content
function page_content()
{
if (isset($_GET['step']) && 1 == $_GET['step']) {
$this->import();
}
if (defined('WP_DEBUG') && isset($_GET['step']) && 'export' == $_GET['step']) {
$wud = wp_upload_dir();
$name = '/export-' . substr(md5(rand()), 0, 8) . '.csv';
$this->export($wud['basedir'] . $name);
echo scb_admin_notice('CSV Generated: ' . html_link($wud['baseurl'] . $name));
}
echo '<div class="narrow">';
echo '<p>' . __("Howdy! Upload a CSV file containing your data and we'll import it into this site. The file must be in the correct format for the import to work.", APP_TD) . '</p>';
$this->import_upload_form(add_query_arg(array('step' => '1')));
echo '</div>';
}
示例11: account_header
function account_header($title)
{
global $PHP_SELF, $LOGIN_USER, $LOGIN_LEVEL;
html_header("{$title}");
html_start_links(1);
html_link("{$LOGIN_USER}", "{$PHP_SELF}");
html_link("Change Password", "{$PHP_SELF}?P");
if ($LOGIN_LEVEL == AUTH_ADMIN) {
html_link("Manage Accounts", "{$PHP_SELF}?A");
}
if ($LOGIN_LEVEL > AUTH_USER) {
html_link("New/Pending", "{$PHP_SELF}?L");
}
html_link("Logout", "{$PHP_SELF}?X");
html_end_links();
}
示例12: appthemes_bank_transfer_pending_email
function appthemes_bank_transfer_pending_email($post)
{
$content = '';
$content .= html('p', __('A new order is waiting to be processed. Once you recieve payment, you should mark the order as completed.', APP_TD));
$order_link = html_link(get_edit_post_link($post), __('Review this order', APP_TD));
$all_orders = html_link(admin_url('edit.php?post_status=tr_pending&post_type=transaction'), __('review all pending orders', APP_TD));
// translators: <Single Order Link> or <Link to All Orders>
$content .= html('p', sprintf(__('%1$s or %2$s', APP_TD), $order_link, $all_orders));
$subject = sprintf(__('[%1$s] Pending Order #%2$d', APP_TD), get_bloginfo('name'), $post->ID);
if (!function_exists('appthemes_send_email')) {
return false;
}
$email = array('to' => get_option('admin_email'), 'subject' => $subject, 'message' => $content);
$email = apply_filters('appthemes_email_admin_bt_pending', $email, $post);
appthemes_send_email($email['to'], $email['subject'], $email['message']);
}
示例13: page_content
function page_content()
{
if (isset($_GET['step']) && 1 == $_GET['step']) {
$this->import();
}
if (defined('WP_DEBUG') && isset($_GET['step']) && 'export' == $_GET['step']) {
$wud = wp_upload_dir();
$name = '/export-' . substr(md5(rand()), 0, 8) . '.csv';
$this->export($wud['basedir'] . $name);
echo scb_admin_notice('CSV Generated: ' . html_link($wud['baseurl'] . $name));
}
echo '<div class="narrow">';
echo '<p>' . __('Below you will find a tool which allows you to import content from other systems via a CSV (comma-separated values) file, which can be edited using a program like Excel. Note that the file must be in the correct format for the import tool to work. You will find an example .csv file in the "examples" theme folder.', 'appthemes') . '</p>';
echo '<p>' . __('Choose a CSV file to upload, then click "Upload file and import".', 'appthemes') . '</p>';
wp_import_upload_form('admin.php?page=app-importer&step=1');
echo '</div>';
}
示例14: module_last_months
function module_last_months($arguments)
{
global $lvc_nb_last_months;
global $lvc_site_opening_month;
global $lvc_site_opening_year;
global $lvm_month, $lvm_archived, $lvm_arr_months;
$buffer = '';
$month = date('n');
$year = date('Y');
$finished = false;
$buffer .= "<TABLE CELLSPACING=0 BORDER=0>\n";
for ($count = 1; $count <= $lvc_nb_last_months; $count++) {
$buffer .= "<TR><TD> ";
if ($finished) {
$archive = '';
} else {
$data = archive_month($month, $year, 'code');
if ($data[0] == NO_ARCHIVE) {
$archive = '';
} elseif ($data[0] == DB_ERROR) {
$archive = '<A CLASS="archived">[?]</A>';
} else {
$archive = '<A CLASS="archived">[' . $lvm_archived . ']</A>';
}
}
if (!$finished) {
$finished = $month == $lvc_site_opening_month && $year == $lvc_site_opening_year;
$the_month = $month < 10 ? "0" . $month : $month;
$link = "./?view=month&year=" . $year . "&month=" . $the_month;
$buffer .= ' ' . html_link($link, html_image('images/' . ICON_PUCE)) . ' ';
$buffer .= "<A HREF='" . $link . "'>";
$buffer .= $lvm_arr_months[$month];
$buffer .= " " . $year;
$buffer .= "</A>";
$month = $month == 1 ? 12 : $month - 1;
$year = $month == 12 ? $year - 1 : $year;
}
$buffer .= " </TD><TD ALIGN='center'> ";
$buffer .= $archive;
$buffer .= " </TD></TR>";
}
$buffer .= "</TABLE>";
return $buffer;
}
示例15: module_top_day_referer
function module_top_day_referer($arguments)
{
global $gDb, $gData;
global $lvc_nb_top_referer;
global $lvc_display_cache_delay;
global $lvc_table_visitors;
global $lvm_top_referer, $lvm_referer, $lvm_number, $lvm_today;
$date = !isset($arguments['date']) ? date('Y/m/d') : str_replace('-', '/', $arguments['date']);
$query = "SELECT REF_HOST, COUNT(*) AS C ";
$query .= "FROM " . $lvc_table_visitors . " ";
$query .= "WHERE REF_HOST <> '' AND REF_HOST <> '[unknown origin]' AND REF_HOST <> 'bookmarks' ";
$query .= "AND DATE LIKE '" . $date . "%' ";
$query .= "GROUP BY REF_HOST ";
$query .= "ORDER BY C DESC, REF_HOST ";
if ($gDb->DbQuery($query, 0, $lvc_nb_top_referer) && $gDb->DbNumRows() != 0) {
$cnt = 0;
while ($gDb->DbNextRow()) {
$record = $gDb->Row;
$row[$cnt]['referer'] = strip_tags($record['REF_HOST']);
$row[$cnt]['nb'] = $record['C'];
$cnt++;
}
}
$buffer = "<BR><CENTER><TABLE CELLSPACING=1 BORDER=0>\n";
$buffer .= "<TR><TD COLSPAN=2><A CLASS='array'>";
$buffer .= str_replace("{NB_TOP_REFERER}", $lvc_nb_top_referer, $lvm_top_referer) . " - " . $lvm_today . "</A></TD></TR>\n";
$buffer .= "<TR>";
$buffer .= "<TH CLASS='vis'>" . $lvm_referer . "</TH>";
$buffer .= "<TH CLASS='vis'> " . $lvm_number . " </TH></TR>\n";
for ($cnt = 0; $cnt < $lvc_nb_top_referer; $cnt++) {
$buffer .= "<TR>";
$buffer .= "<TD CLASS='vis'> <A CLASS='host'>" . html_link($row[$cnt]['referer'], $row[$cnt]['referer'], '_blank') . "</A> </TD>";
$buffer .= "<TD CLASS='vis' ALIGN='right'> " . ($row[$cnt]['nb'] != 0 ? number_format($row[$cnt]['nb'], 0, '', ' ') : '') . " </TD>";
$buffer .= "</TR>\n";
}
// cache delay
if ($lvc_display_cache_delay) {
$buffer .= "<TR><TD ALIGN='center' COLSPAN='2'>";
$buffer .= "<A CLASS='delay'>" . cache_delay($arguments['cache']) . "</A>";
}
$buffer .= "</TABLE></CENTER><BR>\n";
return $buffer;
}