本文整理汇总了PHP中timeago函数的典型用法代码示例。如果您正苦于以下问题:PHP timeago函数的具体用法?PHP timeago怎么用?PHP timeago使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了timeago函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: my_events
function my_events()
{
$query = mysql_query("SELECT DISTINCT * FROM events, users WHERE events.uid = users.uid AND events.event_time > UNIX_TIMESTAMP(NOW()) AND events.uid != '" . $_SESSION['uid'] . "' ORDER BY events.loc_zip ASC LIMIT 100 ");
$counter = 0;
while ($row = mysql_fetch_array($query)) {
$tags = "";
foreach (explode(',', $row['event_tags']) as $Characteristics) {
$tags .= '<span class="label">' . $Characteristics . '</span> ';
}
echo '<table width="100%">
<tr>
<th>
<b>' . $row['event_name'] . '</b>
<table width="100%" style="border: solid 0px #dddddd">
<tr>
<th width="50px"><i class="fa fa-' . $row['event_category'] . ' fa-5x"></i></th>
<th>' . $row['event_info'] . '<br> By: ' . $row['fname'] . ' ' . substr($row['lname'], 0, 1) . '.<br>' . $tags . '</th>
</tr>
</table>
</th>
<th width="50px"><center><h5><b>' . $row['loc_zip'] . ' miles</b></h5><a href="#JoinEvent&id=' . $row['id'] . '" class="radius small button">Join Event</a>' . timeago($row[event_time]) . '</h5></center></th>
</tr>
</table>';
$counter++;
}
if ($counter == 0) {
echo "</ul></div><hr><center><font color='red'>We found no results.</font><hr>";
} elseif ($counter == 100) {
echo "</ul></div><hr><center><font color='red'>Limited to 100 results....</font><center><hr>";
}
}
开发者ID:pmagent2013,项目名称:LonelyDadMeetup,代码行数:31,代码来源:BrowseEvents.php
示例2: widget
/**
* 小工具的渲染方法,这里就是输出评论
*/
function widget($args, $instance)
{
global $wpdb, $comments, $comment;
$cache = wp_cache_get('f_comment', 'widget');
if (!is_array($cache)) {
$cache = array();
}
if (!isset($args['widget_id'])) {
$args['widget_id'] = $this->id;
}
if (isset($cache[$args['widget_id']])) {
echo $cache[$args['widget_id']];
return;
}
extract($args, EXTR_SKIP);
$output = '';
$title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Comments') : $instance['title'], $instance, $this->id_base);
if (empty($instance['number']) || !($number = absint($instance['number']))) {
$number = 5;
}
//获取评论,过滤掉管理员自己
$comments = $wpdb->get_results("SELECT * FROM {$wpdb->comments} WHERE user_id !=1 and comment_approved = '1' and comment_type not in ('pingback','trackback') ORDER BY comment_date_gmt DESC LIMIT {$number}");
$output .= $before_widget;
if ($title) {
$output .= $before_title . $title . $after_title;
}
$output .= '<div class="all-comments">';
if ($comments) {
// Prime cache for associated posts. (Prime post term cache if we need it for permalinks.)
$post_ids = array_unique(wp_list_pluck($comments, 'comment_post_ID'));
_prime_post_caches($post_ids, strpos(get_option('permalink_structure'), '%category%'), false);
foreach ((array) $comments as $comment) {
if ($comment->comment_author_email != $my_email) {
//头像
$avatar = get_avatar($comment, 36);
//作者名称
$author = get_comment_author();
//评论内容
$content = apply_filters('get_comment_text', $comment->comment_content);
$content = mb_strimwidth(strip_tags($content), 0, '65', '...', 'UTF-8');
$content = convert_smilies($content);
//评论的文章
$post = '<a href="' . esc_url(get_comment_link($comment->comment_ID)) . '">' . $avatar . $author . '<span class="muted">' . timeago($comment->comment_date_gmt) . ':<br>' . $content . '</span></a>';
//这里就是输出的html,可以根据需要自行修改
$output .= $post;
}
}
}
$output .= '</div>';
$output .= $after_widget;
echo $output;
$cache[$args['widget_id']] = $output;
wp_cache_set('my_widget_recent_comments', $cache, 'widget');
}
开发者ID:YocoZhang,项目名称:my-blog-site,代码行数:57,代码来源:wid-comment.php
示例3: terakhir_tunup
function terakhir_tunup($kendaraan_id)
{
$this->db->where('servis.kendaraan', $kendaraan_id);
$this->db->where('servis_detail.komponen', 'KOM-28');
$this->db->join('servis_detail', 'servis.nomor=servis_detail.servis', 'left');
$this->db->order_by('servis.tanggal', 'desc');
$this->db->limit(1);
$result = $this->db->get('servis');
if ($result->num_rows() > 0) {
return timeago(strtotime($result->row()->tanggal));
} else {
return "Belum Pernah Tuneup";
}
}
开发者ID:adamprasetia,项目名称:ksk,代码行数:14,代码来源:reminder_mdl.php
示例4: widget
function widget($args, $instance)
{
extract($args);
$title = apply_filters('widget_name', $instance['title']);
$limit = $instance['limit'];
$outer = $instance['outer'];
if (!$outer) {
$outer = -1;
}
echo $before_widget;
echo $before_title . $title . $after_title;
echo '<ul>';
global $wpdb;
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved,comment_author_email, comment_type,comment_author_url, SUBSTRING(comment_content,1,60) AS com_excerpt FROM {$wpdb->comments} LEFT OUTER JOIN {$wpdb->posts} ON ({$wpdb->comments}.comment_post_ID = {$wpdb->posts}.ID) WHERE user_id!='" . $outer . "' AND comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT {$limit}";
$comments = $wpdb->get_results($sql);
foreach ($comments as $comment) {
$output .= $comment->user_id . '<li><a' . hui_target_blank() . ' href="' . get_permalink($comment->ID) . '#comment-' . $comment->comment_ID . '" title="' . $comment->post_title . __('上的评论', 'haoui') . '">' . hui_get_avatar($user_id = $comment->user_id, $user_email = $comment->comment_author_email) . strip_tags($comment->comment_author) . ' <span class="text-muted">' . timeago($comment->comment_date_gmt) . __('说:', 'haoui') . '<br>' . str_replace(' src=', ' data-original=', convert_smilies(strip_tags($comment->com_excerpt))) . '</span></a></li>';
}
echo $output;
echo '</ul>';
echo $after_widget;
}
开发者ID:yszar,项目名称:linuxwp,代码行数:22,代码来源:widget-comments.php
示例5: userdata
<a href="#" class="activity-user-name"><?php
echo userdata(usuario_nombre, $muro[id_autor]);
?>
</a>
<?php
if ($muro[tipo] == 5) {
echo $var;
}
?>
<span>
</span>
<span class="activity-time-ago"><?php
echo timeago(strtotime($muro['fecha']));
?>
</span>
</div>
<div class="activity-content-desc">
<!-- Contenido de la actividad (descripcion) -->
<?php
if ($muro[tipo] != 5 and $muro[tipo] != 6) {
echo $muro["contenido"];
}
?>
</div>
<!-- Descripcion de la actividad -->
开发者ID:PabloValor,项目名称:voxed,代码行数:29,代码来源:muro.php
示例6: xss
$rtimes[$b] = $mid;
$mid = $rnames[$b - 1];
$rnames[$b - 1] = $rnames[$b];
$rnames[$b] = $mid;
$b--;
}
}
function xss($val)
{
$val = str_replace("&", "&", $val);
$val = str_replace("<", "<", $val);
$val = str_replace(">", ">", $val);
$val = str_replace('"', """, $val);
$val = str_replace("'", "'", $val);
$val = str_replace("/", "/", $val);
return $val;
}
for ($j = count($rtimes) - 1; $j >= 0; $j--) {
$cmp = json_decode(file_get_contents("./data/comps/" . $rnames[$j]));
echo "<tr>";
echo "<td><a href='./comp/?" . substr($rnames[$j], 0, -5) . "'>" . xss($cmp->name) . "</a></td>";
echo "<td>" . count($cmp->rows) . "</td>";
echo "<td>" . timeago($rtimes[$j]) . "</td>";
echo "<td>" . xss($cmp->date) . "</td>";
if (isset($cmp->region)) {
echo "<td><a href='./region/?" . str_replace(" ", "", strtolower($cmp->region)) . "'>" . xss($cmp->region) . "</a></td>";
} else {
echo "<td></td>";
}
echo "</tr>";
}
开发者ID:Bambusa6226,项目名称:ftclist,代码行数:31,代码来源:recent.php
示例7: mod_newcomments
function mod_newcomments($limit, $outpost, $outer)
{
global $wpdb;
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved,comment_author_email, comment_type,comment_author_url, SUBSTRING(comment_content,1,40) AS com_excerpt FROM {$wpdb->comments} LEFT OUTER JOIN {$wpdb->posts} ON ({$wpdb->comments}.comment_post_ID = {$wpdb->posts}.ID) WHERE comment_post_ID!='" . $outpost . "' AND user_id!='" . $outer . "' AND comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT {$limit}";
$comments = $wpdb->get_results($sql);
foreach ($comments as $comment) {
$output .= '<li><a href="' . get_permalink($comment->ID) . '#comment-' . $comment->comment_ID . '" title="' . $comment->post_title . '上的评论">' . str_replace(' src=', ' data-original=', get_avatar($comment->comment_author_email, $size = '36', deel_avatar_default())) . ' <div class="muted"><i>' . strip_tags($comment->comment_author) . '</i>' . timeago($comment->comment_date_gmt) . '说:' . str_replace(' src=', ' data-original=', convert_smilies(strip_tags($comment->com_excerpt))) . '</div></a></li>';
}
echo $output;
}
开发者ID:QQ920924960,项目名称:FKWordPress,代码行数:10,代码来源:wid-comment.php
示例8: getName
?>
<img height="50px" width="50px" src="<?php
echo $photo_unread_msg;
?>
" alt="">
</div>
<div class="thread-content">
<span class="author"><?php
echo getName($m->sender_id);
?>
</span>
<span class="preview"><?php
echo word_limiter($m->message, 30);
?>
</span>
<span class="time"> <?php
echo timeago($m->sent_on);
?>
</span>
</div>
</div>
</a>
</li>
<?php
}
} else {
echo "<span>Tidak ada pesan baru</span>";
}
?>
</ul>
</div>
开发者ID:abdulghanni,项目名称:gsm,代码行数:31,代码来源:header.php
示例9: mysql_query
<ul id="mn-ls-messages" class="gadget-ct mn-ls-messages">
<?php
$result = mysql_query("SELECT * FROM mensajes WHERE (usuario_recibe = " . userinfo(usuario_id) . " and usuario_envia = " . $id . ") or (usuario_envia = " . userinfo(usuario_id) . " and usuario_recibe = " . $id . ") ORDER BY fecha ASC") or die(mysql_error());
while ($msg = mysql_fetch_array($result)) {
?>
<li>
<a class="circle-picture mn-ls-user-profile" href="#"><img src="<?php
echo userdata(avatar, $msg["usuario_envia"]);
?>
" alt=""></a>
<a class="mn-ls-content" href="#">
<h5><?php
echo userdata(usuario_nombre, $msg["usuario_envia"]);
?>
<span><?php
echo timeago(strtotime($msg["fecha"]));
?>
</span></h5>
<p><?php
echo $msg["contenido"];
?>
</p>
</a>
</li>
<?php
}
?>
</ul>
</div>
开发者ID:PabloValor,项目名称:voxed,代码行数:31,代码来源:chat.php
示例10: timeago
" title="<?php
echo $value['log_title'];
?>
" target=_blank><?php
echo $value['log_title'];
?>
</a><?php
if ($value['top'] == 'y' || $value['sortop'] == 'y') {
echo ' <i class="fa fa-arrow-up"></i>';
}
?>
</h2>
</header>
<p class="article_exp_meta">
<time class="article_exp_time"><i class="fa fa-clock-o"></i> <?php
echo timeago($value['date'], true);
?>
</time>
<span class="article_exp_pv"><i class="fa fa-eye"></i> 阅读(<?php
echo $value['views'];
?>
)</span>
<a href="<?php
echo $value['log_url'];
?>
#comments" class="article_exp_cmt"><i class="fa fa-comments-o"></i> 评论(<?php
echo $value['comnum'];
?>
)</a>
<?php
editflg($value['logid'], $value['author']);
开发者ID:jjonline,项目名称:J4,代码行数:31,代码来源:log_list.php
示例11: fun_comment
function fun_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
?>
<li <?php
comment_class();
?>
id="comment-<?php
comment_ID();
?>
">
<div id="div-comment-<?php
comment_ID();
?>
" class="comment-body">
<?php
echo fun_get_avatar($comment->user_id, '54', fun_get_avatar_type($comment->user_id));
?>
<?php
$add_below = 'div-comment';
?>
<div class="comment-main">
<?php
if ($comment->comment_approved == '0') {
?>
<span style="color:#C00; font-style:inherit; margin-top:5px; line-height:25px;"><?php
$cpid = $comment->comment_parent;
if ($cpid != 0) {
echo '@';
}
comment_author_link($cpid);
_e('您的评论正在等待审核中...', 'tinection');
?>
</span>
<br />
<?php
}
?>
<?php
if ($comment->comment_approved == '1') {
?>
<?php
comment_text();
?>
<?php
}
?>
<div class="comment-author">
<div class="comment-info">
<span class="comment_author_link"><?php
if ($comment->user_id != 0) {
echo '<a href="' . get_author_posts_url($comment->user_id) . '" class="name">' . $comment->comment_author . '</a>';
} else {
comment_author_link();
}
?>
</span>
<?php
if (ot_get_option('comment_vip') == 'on') {
get_author_class($comment->comment_author_email, $comment->user_id);
}
?>
<?php
if (ot_get_option('comment_ua') == 'on') {
echo outputbrowser($comment->comment_agent);
}
?>
<?php
if (ot_get_option('comment_ip') == 'on') {
?>
<span class="comment_author_ip tooltip-trigger" title="<?php
echo sprintf(__('来自%1$s', 'tinection'), convertip(get_comment_author_ip()));
?>
"><img class="ip_img" src="<?php
echo THEME_URI . '/images/ua/ip.png';
?>
"></span><?php
}
?>
<span class="datetime">
<?php
echo timeago(get_gmt_from_date(get_comment_date('Y-m-d G:i:s')));
?>
</span>
<span class="reply">
<?php
if (is_user_logged_in()) {
comment_reply_link(array_merge($args, array('reply_text' => __('回复', 'tinection'), 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'])));
} else {
echo '<a rel="nofollow" class="comment-reply-login user-login" href="javascript:">' . __('登录以回复', 'tinection') . '</a>';
}
?>
</span>
<span class="cmt-vote">
<?php
$c_name = 'fun_comment_vote_' . $comment->comment_ID;
$cookie = isset($_COOKIE[$c_name]) ? $_COOKIE[$c_name] : '';
?>
<i class="fa fa-thumbs-o-up <?php
if ($cookie == 1) {
//.........这里部分代码省略.........
开发者ID:xiapistudio,项目名称:tinection-xps,代码行数:101,代码来源:comment.php
示例12: blog_comments_children
function blog_comments_children($comments, $children)
{
$isGravatar = Option::get('isgravatar');
foreach ($children as $child) {
$comment = $comments[$child];
$isNofollow = $comment['url'] && $comment['url'] != BLOG_URL ? 'rel="nofollow"' : '';
$comment['poster'] = $comment['url'] ? '<a href="' . $comment['url'] . '" target="_blank" ' . $isNofollow . '>' . $comment['poster'] . '</a>' : $comment['poster'];
?>
<div class="comment comment-children" id="comment-<?php
echo $comment['cid'];
?>
">
<a name="<?php
echo $comment['cid'];
?>
"></a>
<?php
if ($isGravatar == 'y') {
echo '<div class="avatar"><img src="' . TEMPLATE_URL . 'images/0.gif" data-src="' . J_getGravatar($comment['mail']) . '" /></div>';
} else {
echo '<div class="avatar"><img src="' . TEMPLATE_URL . 'images/noAvator.jpg" /></div>';
}
?>
<div class="comment-info">
<div class="comment-content"><?php
echo comment2emoji($comment['content']);
?>
</div>
<div class="comment-meata">
<span class="comment-poster"><?php
echo $comment['poster'];
?>
</span>
<span class="comment-time"><?php
if (strtotime($comment['date'])) {
echo timeago(strtotime($comment['date']));
} else {
echo str_replace(' ', '', $comment['date']);
}
?>
</span>
<?php
if ($comment['level'] < 3) {
echo '<a href="#comment-' . $comment['cid'] . '" onclick="commentReply(' . $comment['cid'] . ',this)" class="comment-reply-btn">回复</a>';
}
?>
</div>
</div>
<?php
blog_comments_children($comments, $comment['children']);
?>
</div>
<?php
}
}
开发者ID:jnan77,项目名称:J2,代码行数:55,代码来源:module.php
示例13: detail
public function detail($id)
{
$xdata['breadcrumb'] = 'kendaraan' . $this->_filter();
$xdata['kendaraan'] = $this->kendaraan_mdl->get_from_field('kendaraan.id', $id, 1)->row();
//servis detail
$this->table->set_template(tbl_tmp_servis());
$this->table->set_heading('No', 'Tanggal', 'Lama', 'Komponen Mesin', 'Jenis Perlakuan');
$servis_history = $this->general_mdl->get_servis_history($xdata['kendaraan']->kode)->result();
$i = 1;
foreach ($servis_history as $r) {
$this->table->add_row($i++, format_dmy($r->tanggal), timeago(strtotime($r->tanggal)), $r->komponen_lain != '' ? $r->komponen_lain : $r->komponen_nama, $r->servis_aksi_nama);
}
$xdata['servis_history'] = $this->table->generate();
$data['content'] = $this->load->view('kendaraan_detail', $xdata, true);
$this->load->view('template', $data);
}
开发者ID:adamprasetia,项目名称:ksk,代码行数:16,代码来源:kendaraan.php
示例14: hui_comment_list
function hui_comment_list($comment, $args, $depth)
{
echo '<li ';
comment_class();
echo ' id="comment-' . get_comment_ID() . '">';
echo '<div class="c-avatar">' . hui_get_avatar($comment->user_id, $comment->comment_author_email) . '</div>';
echo '<div class="c-main" id="div-comment-' . get_comment_ID() . '">';
echo '<span class="c-author">' . get_comment_author_link() . '</span>';
echo str_replace(' src=', ' data-original=', convert_smilies(get_comment_text()));
if ($comment->comment_approved == '0') {
echo '<span class="c-approved">' . __('待审核', 'haoui') . '</span>';
}
echo '<time class="c-time">' . timeago($comment->comment_date) . '</time>';
if ($comment->comment_approved !== '0') {
echo comment_reply_link(array_merge($args, array('add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'])));
}
echo '</div>';
}
开发者ID:songsanren,项目名称:My-blog,代码行数:18,代码来源:functions.xiu.php
示例15: sizeof
<section>
<h3>Latest changes to this page:</h3>
<p>Tweets take 15-30 seconds to appear.</p>
<ul><?php
$i = 0;
$count = sizeof($results->statuses);
$style_array = [];
if ($count == 0) {
echo "Nobody has tweeted to @css_tweet recently, but you still can!";
}
foreach ($results->statuses as $result) {
$text = formattweet($result->text);
$username = $result->user->name;
$handle = $result->user->screen_name;
$time = timeago($result->created_at);
$handle = $result->user->screen_name;
$image = $result->user->profile_image_url;
$link = $result->id_str;
$style = '<style style="display:none;" id="tweet-' . $link . '">' . $text . '</style>';
echo '<li>';
echo '<div style="display: block;">' . $text . '</div>';
echo '<a href="http://twitter.com/' . $handle . '">' . $username . '</a> ';
echo '<time><a href="http://twitter.com/' . $handle . '/status/' . $link . '">' . $time . '</a></time> ';
echo '<button onclick="this.parentNode.remove();document.getElementById(\'tweet-' . $link . '\').remove();">Hide</button>';
echo '</li>';
array_unshift($style_array, $style);
$i++;
if ($i == $count) {
foreach ($style_array as $style) {
echo $style;
开发者ID:bennettfeely,项目名称:Cascading-Style-Tweets,代码行数:30,代码来源:index.php
示例16: redirect
if (!isset($touserid)) {
redirect("/");
}
if ($touserid == $userinfo["user_id"]) {
redirect("/");
}
$selmes = dbquery("SELECT * FROM bg_messages WHERE (mes_userid='" . $userinfo["user_id"] . "' AND mes_touserid='" . $touserid . "') OR (mes_userid='" . $touserid . "' AND mes_touserid='" . $userinfo["user_id"] . "') ORDER BY mes_id ASC");
$pocet = dbrows($selmes);
if ($pocet >= 1) {
while ($data = dbarray($selmes)) {
if ($data["mes_userid"] == $userinfo["user_id"]) {
$changepull = "pull-left";
} else {
$changepull = "pull-left";
}
echo '
<div class="media komentar">
<a class="' . $changepull . '">
<img class="media-object img-circle" src="' . (useravatar($data["mes_userid"]) != "/file/avatars/avatar.png" ? useravatar($data["mes_userid"]) : useravatar($data["mes_userid"])) . '" alt="avatar">
</a>
<div class="media-body">
<h4 class="media-heading"><a class="profillink" data-target="65">' . username($data["mes_userid"]) . '</a> <span class="time pull-right">' . timeago($data["mes_time"]) . '</span></h4>
' . bbcode(badwords(smiley($data["mes_text"]))) . '
</div>
</div>
';
}
} else {
echo "<div style='padding:15px'>Žiadne správy s užívateľom <b>" . username($touserid, 0) . "</b></div>";
}
dbquery("UPDATE bg_messages SET mes_read='1' WHERE mes_touserid='" . $userinfo["user_id"] . "' AND mes_userid='" . $touserid . "'");
开发者ID:Samuell1,项目名称:desart,代码行数:31,代码来源:messagesbox.php
示例17: IN
`rtime`,
`path_source`,
`context`
FROM `botnet_reports_{=:yymmdd}`
WHERE `bot_id` IN({s,:botId}) AND `type`={i:type}
ORDER BY `rtime` DESC
', array('yymmdd' => $yymmdd, 'botId' => $blist, 'type' => BLT_COOKIES)));
$n = mysql_num_rows($R);
if (!$n) {
continue;
}
$found_n += $n;
echo '<table class="lined"><caption>', '20', implode('.', str_split($yymmdd, 2)), '</caption>';
echo '<TBODY>';
while (!is_bool($r = mysql_fetch_assoc($R))) {
echo '<tr>', '<th>', timeago(time() - $r['path_source']), '</th>', '<td>', htmlspecialchars($r['path_source']), '</td>', '<td><pre>', htmlspecialchars($r['context']), '</td>', '</tr>';
}
echo '</BODY></table>';
}
if (!$found_n) {
echo 'No results';
}
die;
} else {
if (strcmp($ba, 'remove') === 0 || strcmp($ba, 'removeex') === 0) {
if (isset($_GET['yes']) || isset($_GET['no'])) {
$data = str_replace('{WIDTH}', 'auto', THEME_LIST_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_BA_REMOVE_TITLE), THEME_LIST_TITLE);
if (isset($_GET['yes'])) {
//Удаление из botnet_list.
if (mysqlQueryEx('botnet_list', 'DELETE FROM `botnet_list` WHERE ' . $sqlBlist)) {
$t = str_replace('{TEXT}', sprintf(LNG_BA_REMOVE_REMOVED, @mysql_affected_rows()), THEME_STRING_SUCCESS);
开发者ID:CCrashBandicot,项目名称:Citadel_1.3.5.1,代码行数:31,代码来源:cp.php
示例18: htmlentities
echo '<li id="aside-report-favorite">', '<button>', LNG_REPORTS_ASIDE_FAVORITE1, '</button>', '<form action="?m=/reports_fav/ajaxAdd" method="POST">', '<input type="hidden" name="table" value="', $_GET['t'], '" />', '<input type="hidden" name="report_id" value="', $_GET['id'], '" />', '<textarea name="comment" rows="20" placeholder="comment">', htmlentities($report->favorite_comment), '</textarea>', '<input type="submit" value="', LNG_REPORTS_ASIDE_SAVE, '" />', '</form>', '</li>';
}
if (file_exists('system/botnet_vnc.php')) {
echo '<li id="aside-vnc"><dl><dt class="collapsible collapsed" id="aside-vnc">VNC</dt>', '<dd>' . vncplugin_draw_connect_options($report->bot_id) . '</dd>';
}
if (file_exists('system/reports_hatkeeper.php')) {
$rule_domain = parse_url($report->path_source, PHP_URL_HOST);
if (strncasecmp($rule_domain, 'www.', 4) === 0) {
$rule_domain = substr($rule_domain, 4);
}
$rule_urls = array('url' => "^{$report->path_source}", 'domain' => "^.+://(.+\\.|){$rule_domain}/.*", 'any' => '^.*');
echo '<li id="aside-hatkeeper"><dl><dt class="collapsible collapsed">', LNG_REPORTS_ASIDE_HK, '</dt>', '<dd>', '<form ', ' action="?m=reports_hatkeeper/AjaxInsert&botId=', rawurlencode($report->bot_id), '&report=', rawurlencode($_GET['t'] . ':' . $report->id), '" ', ' method="POST"><ul>', '<li><dl>', '<dt>', LNG_REPORTS_ASIDE_HK_RULE_URL, '</dt>', '<dd>', '<input type="text" name="rule_url" value="', htmlentities($rule_urls['domain']), '" />', '<ul class="url-rule-presets">', '<li>', '<a href="#" data-url="', htmlentities($rule_urls['url']), '">URL</a>', '</li>', '<li>', '<a href="#" data-url="', htmlentities($rule_urls['domain']), '">Domain</a>', '</li>', '<li>', '<a href="#" data-url="', htmlentities($rule_urls['any']), '">Any</a>', '</li>', '</ul>', '</dd>', '<dt>', LNG_REPORTS_ASIDE_HK_RULE_POST, '</dt>', '<dd>', '<textarea name="rule_post" placeholder="a=b" rows=10></textarea>', '</dd>', '</dl>', '<li><label><input type="checkbox" name="mkenvironment" value="1" /> ' . LNG_REPORTS_ASIDE_HK_MKENVIRONMENT . '</label>', file_exists('system/botnet_vnc.php') ? '<li><label><input type="checkbox" name="bsocks" value="1" /> ' . LNG_REPORTS_ASIDE_HK_BSOCKS . '</label>' : '', '<li><input type="submit" value="', LNG_REPORTS_ASIDE_HK_CREATE, '" />', '<li id="hatkeeper-config-link">', '<a href="' . authTokenURL('reports_hatkeeper/xml') . '&botId=', rawurlencode($report->bot_id), '" target="_blank">', LNG_REPORTS_ASIDE_HK_CONFIGLINK, '</a>', '</ul></form>', '</dd>';
}
echo '</ul>', '</aside>';
# Display
echo '<table id="full-bot-report" class="bot-report zebra lined" ', 'data-table="', $_GET['t'], '" data-report="', $report->id, '" ', 'data-botid="', htmlentities($report->bot_id), '" data-ipv4="', htmlentities($report->ipv4), '"', '>', '<caption>', sprintf(LNG_REPORTS_VIEW_TITLE2, bltToLng($report->type), numberFormatAsInt(strlen($report->context))), ' ', gmdate(LNG_FORMAT_DT, $report->rtime), '</caption>', '<TBODY>', '<tr>', '<th>', LNG_REPORTS_VIEW_BOTID, '</th>', '<td>', '<img src="theme/images/icons/' . ($report->bot_online && $report->bot_online <= $GLOBALS['config']['botnet_timeout'] ? 'online' : 'offline') . '.png" /> ', botPopupMenu($report->bot_id, 'botmenu', $report->bot_comment), ' (', htmlentities($report->ip_c), ' — ', $report->ip_country, ')', ' ', htmlentities($report->botnet), '</td>', '</tr>', '<tr class="field-bot-comment">', '<th>', LNG_REPORTS_VIEW_COMMENT, '</th>', '<td>', '<form action="?', mkuri(1, 'm'), '&ajax=bot-comment&botId=', rawurlencode($report->bot_id), '" method="POST" class="ajax_form_update" data-title="Bot comment">', '<input type="text" name="comment" value="', htmlentities($report->bot_comment), '" />', '<input type="submit" value="', LNG_REPORTS_VIEW_COMMENT_SAVE, '" />', '</form>', '</td>', '</tr>', '<tr>', '<th>', LNG_REPORTS_BOT_RTIME_LAST, '</th>', '<td>', timeago(time() - $report->bot_rtime_last), '</td>', '</tr>', '<tr>', '<th>', LNG_REPORTS_VIEW_VERSION, '</th>', '<td>', intToVersion($report->bot_version), '</td>', '</tr>', '<tr>', '<th>', LNG_REPORTS_VIEW_OS, '</th>', '<td>', osDataToString($report->os_version), ' (', htmlentities($report->language_id), ')', '</td>', '</tr>', '<tr class="field-ipv4">', '<th>', LNG_REPORTS_VIEW_IPV4, '</th>', '<td>', htmlentities($report->ipv4), '</td>', '</tr>', '<tr>', '<th>', LNG_REPORTS_VIEW_TIME, '</th>', '<td>', gmdate(LNG_FORMAT_DT, $report->time_system + $report->time_localbias), ' (GMT', timeBiasToText($report->time_localbias), ')', '</td>', '</tr>', '<tr>', '<th>', LNG_REPORTS_VIEW_TICK, '</th>', '<td>', tickCountToText($report->time_tick / 1000), '</td>', '</tr>', '</TBODY>', '<TBODY>', '<tr>', '<th>', LNG_REPORTS_VIEW_PROCUSER, '</th>', '<td>', htmlspecialchars($report->process_user), '</td>', '</tr>', '<tr>', '<th>', LNG_REPORTS_VIEW_PROCNAME, '</th>', '<td>', htmlspecialchars($report->process_name), '</td>', '</tr>', '<tr>', '<th>', LNG_REPORTS_VIEW_PROCINFO, '</th>', '<td>', htmlentities($report->process_info), '</td>', '</tr>', '<tr>', '<th>', LNG_REPORTS_VIEW_SOURCE, file_exists('system/reports_neurostat.php') && ($report->type == BLT_HTTP_REQUEST || $report->type == BLT_HTTPS_REQUEST) ? ' <a href="?m=reports_neurostat/stat' . '&botId=' . rawurlencode($report->bot_id) . '&url=' . rawurlencode($report->path_source) . '" ' . ' target="_blank"> <img src="theme/images/icons/brain.png" /> </a> ' : '', '</th>', '<td>', htmlentities($report->path_source), '</td>', '</tr>', '<tr class="context">', '<td colspan="2">', '<a href="#" id="decode-context">[ Decode ]</a>', '<div class="context">', htmlentities($report->context), '</div>', '</td>', '</tr>', '</TBODY>', '</table>';
echo <<<HTML
<script src="theme/js/page-reports_db-report.js"></script>
HTML;
die;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
// Определяем данные для фильтра.
///////////////////////////////////////////////////////////////////////////////////////////////////
//При добавлении новых параметров нужно уничтожать не нужные для js:datelist.
$filter['date1'] = isset($_GET['date1']) ? intval($_GET['date1']) : 0;
$filter['date2'] = isset($_GET['date2']) ? intval($_GET['date2']) : 0;
if ($filter['date1'] > $filter['date2']) {
$t = $filter['date1'];
$filter['date1'] = $filter['date2'];
$filter['date2'] = $t;
开发者ID:CCrashBandicot,项目名称:Citadel_1.3.5.1,代码行数:31,代码来源:reports_db.php
示例19: store_avatar
<div class="table">
<div class="left">
<img src="' . store_avatar($item->store_img) . '" alt="">
<span class="rating"><span style="width:' . $item->stars * 16 . 'px;"></span></span>
<a href="' . $item->store_reviews_link . '">' . $item->reviews . ' reviews</a>';
echo !empty($item->cashback) ? '<span class="cashback-points" data-ttip="Great! Use it and you\'ll receive ' . $item->cashback . ' points.">' . $item->cashback . '</span> ' : '';
echo '</div>
<div class="right">
<a href="' . $item->link . '" class="title">' . $item->title . '</a>
More coupons for <a href="' . $item->store_link . '">' . $item->store_name . '</a>
<div class="description">' . (!empty($item->description) ? nl2br($item->description) : 'no description') . '</div>
<ul class="details">
<li>Coupon Added: <b>' . timeago(strtotime($item->date), 'seconds') . ' ago</b></li>';
if ($item->is_expired) {
echo '<li>Expired on: <span class="expired">' . date('m/d/y', strtotime($item->expiration_date)) . '</span></li>';
} else {
if (!$item->is_started) {
echo '<li>Starts on: <span class="notstarted">' . date('m/d/y', strtotime($item->expiration_date)) . '</span></li>';
} else {
echo '<li>Expiration: <span class="active">' . date('m/d/y', strtotime($item->expiration_date)) . '</span></li>';
}
}
echo '</ul>
<div class="links">
<a href="' . $item->link . '" class="btn">View Code</a>
<a href="#" class="more_details">More details</a>
<a href="#" class="share">Share</a>
开发者ID:hzhou9,项目名称:coupon_deal,代码行数:31,代码来源:wall.php
-
librespeed/speedtest: Self-hosted Speedtest for HTML5 and more. Easy setup, exam
阅读:1218|2022-08-30
-
1 wxml文件某一段 2amp;#160;js文件 3.接受参数的页面JS
阅读:603|2022-07-18
-
avehtari/BDA_m_demos: Bayesian Data Analysis demos for Matlab/Octave
阅读:1130|2022-08-17
-
女人怀孕后,为了有一个健康聪明的宝宝,经历各种体检、筛查。其实这些体检和筛查中的
阅读:938|2022-11-06
-
Use after free in Browser UI in Google Chrome on Chrome OS prior to 99.0.4844.74
阅读:713|2022-07-29
-
medfreeman/markdown-it-toc-and-anchor: markdown-it plugin to add a toc and ancho
阅读:1334|2022-08-18
-
北京是我国著名的六朝古都。春秋时期燕国始建古蓟城,后经三千多年不断兴建、完善,逐
阅读:483|2022-07-30
-
touchlab/Kermit: Kermit by Touchlab is a Kotlin Multiplatform centralized loggin
阅读:981|2022-08-13
-
sydney0zq/covid-19-detection: The implementation of A Weakly-supervised Framewor
阅读:484|2022-08-16
-
离中国最远的国家是阿根廷。从太平洋直线计算,即往东线走,北京到阿根廷的布宜诺斯艾
阅读:637|2022-11-06
|
请发表评论