• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_timeago函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_timeago函数的典型用法代码示例。如果您正苦于以下问题:PHP get_timeago函数的具体用法?PHP get_timeago怎么用?PHP get_timeago使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_timeago函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: utf8_decode

            $blog_write_up = $row['writeup'];
            $blog_write_up = utf8_decode($blog_write_up);
            $blog_write_up = utf8_decode($blog_write_up);
            $blog_write_up = str_replace('???', "\"", $blog_write_up);
            $blog_write_up = substr(urldecode($blog_write_up), 0, 140) . '...';
            $blog_write_up_full = $blog_write_up;
        }
        $blogentry = $row['blogentry'];
        $current_likes = $row['rate'];
        if ($subscriber_view = true && isset($_COOKIE['user_name'])) {
            //$if_logged_in = '<a href="#'.$rand_id.'" onclick="likePost('.$blog_id.', '.$current_likes.' , \''.$user_name_session.'\')" class="btn btn-success btn-xs" role="button"><span class="glyphicon glyphicon-save"></span> - SAVE</a>';
        } else {
            $if_logged_in = '';
        }
        $submission_date = date('l, F d', strtotime($row['submission_date']));
        $submission_date = get_timeago(strtotime($submission_date));
        //$rand_id	=	rand(111111,999999);
        $rand_id = $blog_id;
        $blog_write_up_embedd = '';
        if ($row['writeup']) {
            $blog_write_up_embedd = '<p style="color:#fff;text-shadow:0px 0px 15px #000;" >' . $blog_write_up . '</p>
				        <hr>';
            $blog_write_up_full = '<p style="color:#fff;text-shadow:0px 0px 15px #000;" >' . $blog_write_up_full . '</p>
				        <hr>';
        }
        $blog_write_up_embedd = '';
        $blog_write_up_full = '';
        // TWEET SHARE MESSAGE
        $tweet_blog = urlencode("[#FLMAG] " . $twitter . "\n\n" . $blogtitle . " \n\n" . str_replace('http://', '', $blog_story_url) . "\n\n" . $twitpic);
        $link = 'http://freelabel.net/' . $twitter . '/' . $rand_id;
        echo '
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:stream.php


示例2: array

        if ($num_visits == 1) {
            $inputs = array();
            $inputs[] = " We have not visited this system before.";
            $inputs[] = " This is our first time visiting this system.";
            shuffle($inputs);
            $va_text .= $inputs[0];
        } elseif ($num_visits == 2) {
            $vis_res = mysqli_query($GLOBALS["___mysqli_ston"], "\tSELECT visit\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM user_visited_systems\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE system_name = '" . mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $curSys["name"]) . "'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY visit ASC\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__);
            $vis_arr = mysqli_fetch_assoc($vis_res);
            $first_vis = get_timeago(strtotime($vis_arr["visit"]));
            $va_text .= " We have visited this system once before. That was " . $first_vis . ".";
        } else {
            $vis_res = mysqli_query($GLOBALS["___mysqli_ston"], "\tSELECT visit\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM user_visited_systems\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE system_name = '" . mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $curSys["name"]) . "'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY visit ASC\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__);
            $vis_arr = mysqli_fetch_assoc($vis_res);
            $num_vis = $num_visits - 1;
            $first_vis = get_timeago(strtotime($vis_arr["visit"]));
            $va_text .= " We have visited this system " . $num_vis . " times before. Our first visit was " . $first_vis . ".";
        }
    }
    echo $va_text;
    is_null($___mysqli_res = mysqli_close($link)) ? false : $___mysqli_res;
    exit;
}
/*
*	Closest Station
*/
if (isset($_GET["cs"])) {
    if (valid_coordinates($curSys["x"], $curSys["y"], $curSys["z"])) {
        $usex = $curSys["x"];
        $usey = $curSys["y"];
        $usez = $curSys["z"];
开发者ID:padthaitofuhot,项目名称:EDTB,代码行数:31,代码来源:SystemData.php


示例3: urlencode

        echo '<a href="System.php?system_name=' . urlencode($system) . '" style="color:inherit">' . $system . '</a>' . $screenshots . '<br />No additional information';
    } else {
        $logres = mysqli_query($GLOBALS["___mysqli_ston"], "\tSELECT id, LEFT(log_entry , 100) AS text\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM user_log\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE system_name = '" . mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $system) . "'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY stardate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__);
        $logged = mysqli_num_rows($logres);
        if (isset($visit)) {
            $visit = date_create($visit);
            $visit_date = date_modify($visit, "+1286 years");
            $visit = date_format($visit_date, "d.m.Y, H:i");
        }
        if ($text != null) {
            echo "" . $text . "<br />";
        }
        if (!empty($visit)) {
            $visits = mysqli_num_rows(mysqli_query($GLOBALS["___mysqli_ston"], "\tSELECT id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM user_visited_systems\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE system_name = '" . mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $system) . "'"));
            $visit_unix = strtotime($visit_og);
            $visit_ago = get_timeago($visit_unix);
            echo "<a href=\"/System.php?system_name=" . urlencode($system) . "\" style=\"color:inherit;\">" . $system . "</a>" . $screenshots . "&nbsp;&nbsp;|&nbsp;\n\t\t\tTotal visits: " . $visits . "&nbsp;&nbsp;|&nbsp;&nbsp;First visit: " . $visit . " (" . $visit_ago . ")";
        } else {
            echo "<a href=\"/System.php?system_name=" . urlencode($system) . "\" style=\"color:inherit;\">" . $system . "</a>";
        }
        if ($logged > 0) {
            $logarr = mysqli_fetch_assoc($logres);
            $text = $logarr["text"];
            echo '<br />
					<a href="/log.php?system=' . urlencode($system) . '" style="color:inherit;font-weight:bold" title="View the log for this system">
						' . $text . ' ...
					</a>';
        }
    }
    exit;
}
开发者ID:Richterr,项目名称:EDTB,代码行数:31,代码来源:getMapData.php


示例4: foreach

<?php 
foreach ($posts as $post) {
    $post['embed'] = '<audio controls preload="metadata"><source src="' . $post['trackmp3'] . '"></audio>';
    if ($post['trackmp3'] == '') {
        $post['embed'] = '<br><br><button class="btn btn-primary" >View</button>';
        // = '<audio controls preload="metadata"><source src="'.$post['trackmp3'].'"></audio>';
    }
    echo '


<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 text-center post" style="background-image:url(\'' . $post['photo'] . '\');" data-img=\'' . $post['photo'] . '\'>
  <div class="background-tint">
   
    <a class="story-img" href="' . $post['blog_story_url'] . '"><h1>' . $post['blogtitle'] . '</h1></a>
    <a class="story-img" href="' . $post['blog_story_url'] . '"><h3 class="post-twitter">' . $post['twitter'] . '</h3></a>
    <a class="story-img" href="' . $post['blog_story_url'] . '"><h6 class="post-twitter">' . get_timeago(strtotime($post['submission_date'])) . '</h6></a>

     <a class="story-img" href="' . $post['blog_story_url'] . '"><img src="' . $post['photo'] . '" style="width:100%;" class=""></a>
    ' . $post['embed'] . '
  </div>
</div>
';
}
?>
<br><br>
<button class='col-md-12 load-more-button' ><a class='btn btn-primary' >Load Next (<?php 
echo $next_page_read;
?>
)</a></button>

开发者ID:mayoalexander,项目名称:fl-two,代码行数:29,代码来源:feed.php


示例5: file_get_contents

                $new_file = "-1";
                if (file_exists($newfile)) {
                    $new_file = file_get_contents($newfile);
                }
                if ($new_file != $old_file) {
                    mysqli_query($GLOBALS["___mysqli_ston"], "\tUPDATE edtb_common\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSET unixtime = UNIX_TIMESTAMP()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE name = 'last_galnet_new'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__);
                }
            }
            $in++;
        }
    }
    /*
     *	update last_update time
     */
    mysqli_query($GLOBALS["___mysqli_ston"], "\tUPDATE edtb_common\n\t\t\t\t\t\t\t\t\t\t\t\tSET unixtime = UNIX_TIMESTAMP()\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE name = 'last_galnet_update'\n\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__);
}
/*
*	fetch last check time and last new article time
*/
$last_galnet_check = edtb_common("last_galnet_check", "unixtime");
$last_galnet_new = edtb_common("last_galnet_new", "unixtime");
if ($last_galnet_new < $last_galnet_check) {
    echo "No new GalNet articles have been published since you last asked " . get_timeago($last_galnet_check, false) . ".";
} else {
    echo "New GalNet articles have been published since you last asked. Would you like me to read them to you?";
}
/*
*	 update last check time
*/
mysqli_query($GLOBALS["___mysqli_ston"], "\tUPDATE edtb_common\n\t\t\t\t\t\t\t\t\t\t\tSET unixtime = UNIX_TIMESTAMP()\n\t\t\t\t\t\t\t\t\t\t\tWHERE name = 'last_galnet_check'\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1") or write_log(mysqli_error($GLOBALS["___mysqli_ston"]), __FILE__, __LINE__);
is_null($___mysqli_res = mysqli_close($link)) ? false : $___mysqli_res;
开发者ID:padthaitofuhot,项目名称:EDTB,代码行数:31,代码来源:GalnetData.php


示例6: get_timeago

								<i class="mdi mdi-menu-right"></i>
								<a href="/user/<?php 
    echo $post->uid;
    ?>
/"><?php 
    echo $post->r_fn;
    ?>
</a>
							</p>
						</span> 

						<span id="post-date" class="time" title="<?php 
    echo $post->date;
    ?>
"><?php 
    echo get_timeago($post->date);
    ?>
</span>
					</div>
				<?php 
}
?>
					<br>
					<div class="ui left aligned">
						<?php 
if ($post->status == "2") {
    ?>
						<div class="ui warning message">
							This post is private, only you can see it, you can change that by clicking <a id="post-publish" href="#"> here.</a> 
						</div>
						<?php 
开发者ID:khaledkhalil94,项目名称:SH.A,代码行数:31,代码来源:post.php


示例7: foreach

            $html_content = '<div class="alert alert-warning" role="alert"><span class="label label-warning">OOPS..</span> No available snippet found under this category.</div>';
        }
    } else {
        // authenticated == true
        $query = "SELECT * FROM " . DBTABLE_SNIPPETS . " WHERE category_tag='" . $snippet_cat . "'";
        $total_found = $db->num_rows($query);
        if ($total_found > 0) {
            $results = $db->get_results($query);
            $html_content = '<div class="alert alert-info" role="alert"><span class="label label-info">INFO</span> This category contains <strong>' . $total_found . '</strong> snippets, but some snippets will not be listed here due to private visibility.</div>';
            $html_content .= '<div class="list-group snippet-list">';
            foreach ($results as $row) {
                if ($row['visibility'] == 'private' && $row['user_id'] == $user_loggedin_id) {
                    $html_content .= '<a href="view_snippet.php?id=' . $row['id'] . '" class="list-group-item"><span class="snippet-title">' . $row['name'] . '</span><span class="by-creator"> by <strong>' . get_username($row['user_id']) . '</strong></span> &middot; <span class="created-date">' . get_timeago($row['updated_time']) . '</span><br><span class="private-snippet"><i class="fa fa-info-circle"></i> This is your private snippet. Only you can see this!</span></a>';
                } else {
                    if ($row['visibility'] == 'public') {
                        $html_content .= '<a href="view_snippet.php?id=' . $row['id'] . '" class="list-group-item"><span class="snippet-title">' . $row['name'] . '</span><span class="by-creator"> by <strong>' . get_username($row['user_id']) . '</strong></span> &middot; <span class="created-date">' . get_timeago($row['updated_time']) . '</span></a>';
                    }
                }
            }
            $html_content .= '</div>';
        } else {
            $html_content = '<div class="alert alert-warning" role="alert"><span class="label label-warning">OOPS..</span> No available snippet found under this category.</div>';
        }
    }
} else {
    // ID not numeric
    header('Location: 404.php?error=invalid_category');
    exit;
}
$category_title = get_category_title($snippet_cat);
$category_color = get_category_color($snippet_cat);
开发者ID:heiswayi,项目名称:code-snippets-saver,代码行数:31,代码来源:list.php


示例8: get_timeago

    ?>
/"><img src="<?php 
    echo $u->img_path;
    ?>
"></a>
								</div>
								<div class="content">
									<a href="<?php 
    echo BASE_URL . 'user/' . $u->id;
    ?>
/" class="header"><?php 
    echo $u->username;
    ?>
</a>
									<div class="time"><?php 
    echo get_timeago($u->register_date);
    ?>
</div>
								</div>
							</div>
						<?php 
}
?>
						</div>
					</div>
				</div>
			</div>
			<div class="ui grid">
				<div class="eight wide column">
					<div class="ui segment purple cp_segs sections">
						<div class="seg_title">
开发者ID:khaledkhalil94,项目名称:SH.A,代码行数:31,代码来源:index.php


示例9: get_audio

 /**
  * Get audio log files
  *
  * @param object $obj
  * @return string
  */
 private function get_audio($obj)
 {
     $logdata .= '<div class="audio" id="' . $obj->id . '" style="display:none">';
     $audio_files = explode(", ", $obj->audio);
     foreach ($audio_files as $audio_file) {
         $file = $_SERVER["DOCUMENT_ROOT"] . "/audio_logs/" . $audio_file;
         $file_src = "/audio_logs/" . $audio_file;
         if (file_exists($file)) {
             $timestamp = filemtime($file) + $this->time_difference * 60 * 60;
             $record_date = date("Y-m-d H:i:s", $timestamp);
             $date = date_create($record_date);
             $record = date_modify($date, "+1286 years");
             $record_added = date_format($record, "j M Y, H:i");
             $added_ago = get_timeago($timestamp);
             $logdata .= '<div style="margin-bottom:4px;margin-top:6px;margin-left:3px">';
             $logdata .= 'Added: ' . $record_added . ' (' . $added_ago . ')';
             $logdata .= '</div>';
             $logdata .= '<div>';
             $logdata .= '<audio controls>';
             $logdata .= '<source src="' . $file_src . '" type="audio/mp3">';
             $logdata .= 'Your browser does not support the audio element.';
             $logdata .= '</audio>';
             $logdata .= '</div>';
         }
     }
     unset($audio_file);
     $logdata .= '</div>';
     return $logdata;
 }
开发者ID:DBnR1,项目名称:EDTB,代码行数:35,代码来源:MakeLog.php


示例10: get_timeago

    echo $post->thread->link;
    ?>
'"><div class="itemheadfull">
         <i><img src="<?php 
    echo $post->author->avatar->small->permalink;
    ?>
" width="40" height="40" class="img-circle" /></i>
         <?php 
    echo $post->author->username;
    ?>
 posted in
         <b><?php 
    echo $post->thread->title;
    ?>
</b>
         (<?php 
    echo $this->category_code[$post->thread->category];
    ?>
)
         <span><i class="fa fa-fw fa-clock-o"></i> <?php 
    echo get_timeago(strtotime(str_replace('T', ' ', $post->createdAt)));
    ?>
</span>
         <div class="discuss_postmessage">
         <?php 
    echo $post->message;
    ?>
         </div>
       </div></div>
      <?php 
}
开发者ID:jaksmid,项目名称:website,代码行数:31,代码来源:recent.php


示例11: number_format

 $ls_from_star = $station_obj->ls_from_star;
 $max_landing_pad_size = $station_obj->max_landing_pad_size;
 $s_faction = $station_obj->faction == "" ? "" : "<strong>Faction:</strong> " . $station_obj->faction;
 $s_distance_from_star = $ls_from_star == 0 ? "" : "" . number_format($ls_from_star, 0) . " ls - ";
 $s_information = '<span style="float:right;margin-right:8px">&boxur;&nbsp;' . $s_distance_from_star . 'Landing pad: ' . $max_landing_pad_size . '</span><br />';
 $s_government = $station_obj->government == "" ? "Government unknown" : $station_obj->government;
 $s_allegiance = $station_obj->allegiance == "" ? "Allegiance unknown" : $station_obj->allegiance;
 $s_state = $station_obj->state == "" ? "" : "<strong>State:</strong> " . $station_obj->state . "<br />";
 $type = $station_obj->type == "" ? "Type unknown" : $station_obj->type;
 $economies = $station_obj->economies == "" ? "Economies unknown" : $station_obj->economies;
 $economies = $economies == "" ? "Economies unknown" : $economies;
 $import_commodities = $station_obj->import_commodities == "" ? "" : "<br /><strong>Import commodities:</strong> " . $station_obj->import_commodities . "<br />";
 $export_commodities = $station_obj->export_commodities == "" ? "" : "<strong>Export commodities:</strong> " . $station_obj->export_commodities . "<br />";
 $prohibited_commodities = $station_obj->prohibited_commodities == "" ? "" : "<strong>Prohibited commodities:</strong> " . $station_obj->prohibited_commodities . "<br />";
 $outfitting_updated_ago = !empty($station_obj->outfitting_updated_at) ? 'Outfitting last updated: ' . get_timeago($station_obj->outfitting_updated_at, true, true) : "";
 $shipyard_updated_ago = !empty($station_obj->shipyard_updated_at) ? ' (updated ' . get_timeago($station_obj->shipyard_updated_at, true, true) . ')' : "";
 $selling_ships = $station_obj->selling_ships == "" ? "" : "<br /><br /><strong>Selling ships:</strong> " . str_replace("'", "", $station_obj->selling_ships) . $shipyard_updated_ago;
 $selling_modules = "";
 /**
  * Information about the modules sold at the station
  */
 if (!empty($station_obj->selling_modules)) {
     $modules = $station_obj->selling_modules;
     $modules_s = explode("-", $modules);
     $modules_t = "";
     $last_class = "";
     $last_module_name = "";
     $last_category_name = "";
     $mod_cat = [];
     $i = 0;
     foreach ($modules_s as $mods) {
开发者ID:DBnR1,项目名称:EDTB,代码行数:31,代码来源:getData_systemInfo.php


示例12: number_format

                $va_text .= " It has " . $count . " spaceports, the nearest one is " . $first_station_name . " " . number_format(round($first_station_ls_from_star)) . " light seconds away.";
            } else {
                $va_text .= " It has " . $count . " spaceports.";
            }
        }
        if ($num_visits == 1) {
            $inputs = [];
            $inputs[] = " We have not visited this system before.";
            $inputs[] = " This is our first time visiting this system.";
            shuffle($inputs);
            $va_text .= $inputs[0];
        } else {
            $query = "  SELECT visit\n                        FROM user_visited_systems\n                        WHERE system_name = '{$esc_sysname}'\n                        ORDER BY visit ASC\n                        LIMIT 1";
            $result = $mysqli->query($query) or write_log($mysqli->error, __FILE__, __LINE__);
            $vis_arr = $result->fetch_object();
            $first_vis = get_timeago(strtotime($vis_arr->visit));
            $result->close();
            if ($num_visits == 2) {
                $va_text .= " We have visited this system once before. That was " . $first_vis . ".";
            } else {
                $va_text .= " We have visited this system " . $num_visits . " times before. Our first visit was " . $first_vis . ".";
            }
        }
    }
    echo $va_text;
    exit;
}
/**
 * Nearest Station
 */
if (isset($_GET["cs"])) {
开发者ID:DBnR1,项目名称:EDTB,代码行数:31,代码来源:SystemData.php


示例13: get_timeago

				<div class="itemheadfull">
				<i class="<?php 
                    echo $this->icons[$type];
                    ?>
" style="color:<?php 
                    echo $this->colors[$type];
                    ?>
"></i>
				<a href="r/<?php 
                    echo $r['_id'];
                    ?>
"><?php 
                    echo $rs['uploader'];
                    ?>
 <span><i class="fa fa-fw fa-clock-o"></i> <?php 
                    echo get_timeago(strtotime(str_replace('.000Z', '', $rs['date'])));
                    ?>
</span><br>
					<span>ran flow</span> <?php 
                    echo $rs['run_flow']['name'];
                    ?>
 <span>on task</span> <?php 
                    echo $rs['run_task']['tasktype']['name'];
                    ?>
 on data set <?php 
                    echo $rs['run_task']['source_data']['name'];
                    ?>
</a>
				</div>
				<div class="runStats statLine">
				<?php 
开发者ID:jaksmid,项目名称:website,代码行数:31,代码来源:results.php


示例14: strtotime

/users/<?php 
        echo $img;
        ?>
">
                            </div>
                            <div class="col-sm-9 col-md-10">
                            <div class="row">
									<?php 
        $curenttime = $comment['comment_created_time'];
        $time_ago = strtotime($curenttime);
        ?>
                                <h4><span class="viewername"><?php 
        echo $comment['user_name'];
        ?>
</span> <span class="view-hr viewername"><?php 
        echo get_timeago($time_ago);
        ?>
</span></h4>
                                <p>
                                   <?php 
        echo $comment['comment'];
        ?>
 
                                </p>
                                <?php 
        if ($comment['id'] == $this->session->userdata('user_id')) {
            ?>
									
									<a href="<?php 
            echo site_url('home/comment_delete/' . $comment['comment_id'] . '/' . $product['id'] . '');
            ?>
开发者ID:ram-1501,项目名称:rs,代码行数:31,代码来源:product_detail.php


示例15: get_timeago

							<td><?php 
    echo $user->full_name;
    ?>
</td>
							<td title="<?php 
    echo $user->register_date;
    ?>
"><?php 
    echo get_timeago($user->register_date);
    ?>
</td>
							<td title="<?php 
    echo $user->activity;
    ?>
"><?php 
    echo get_timeago($user->activity);
    ?>
</td>
							<td><?php 
    echo $user->ip_address;
    ?>
</td>
						</tr>
						<?php 
}
?>
					</tbody>
				</table>
				<br>
				<?php 
echo $pag->display(true);
开发者ID:khaledkhalil94,项目名称:SH.A,代码行数:31,代码来源:users.php


示例16: elseif

    }
    echo '</div>';
} elseif ($_POST['page'] == 'followers') {
    echo '<div class="col-md-12 xoverflow_div" style="font-size:80%;height:550px;text-align:left;">';
    foreach ($tweets['followers/list'] as $tweet) {
        echo "<div class=''>";
        print_r($tweet);
        echo '</div>';
    }
    echo '</div>';
    $home_timeline[] = '<h3>Home</h3>';
    $home_timeline[] = '<div class="overflow_div">';
    foreach ($user_timeline as $status) {
        $time_since_posted = (time() - strtotime($status->created_at)) / 60;
        $time_since_posted = substr($time_since_posted, 0, 2);
        $date = get_timeago(strtotime($status->created_at));
        //$date = date( 'm-d h:i:s' , strtotime($status->created_at));
        $text = $status->text;
        $home_timeline[] = $date . ' - ' . $text . '<hr>';
    }
    echo '</div>';
} elseif ($_POST['page'] == 'mentions') {
    echo '<div class="col-md-12 xoverflow_div" style="font-size:80%;height:550px;text-align:left;"><h1>MENTIONS</h1>';
    echo $build_data;
    echo '</div>';
}
// ----------------------------------------------------------------- ///
// ---------------------- END OF POST VALIDATION ---------------------- ///
// ----------------------------------------------------------------- ///
//echo '</pre>';
//foreach ($tweets['direct_messages'] as $conversation) {
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:index.1.0.php


示例17: station_info

    /**
     * Show info about stations
     *
     * @param string $station_name
     * @param object $obj
     * @param string $tdclass
     */
    private function station_info($station_name, $obj, $tdclass)
    {
        $station_ls_from_star = $obj->ls_from_star == 0 ? "n/a" : number_format($obj->ls_from_star);
        $station_max_landing_pad_size = $obj->max_landing_pad_size;
        $station_max_landing_pad_size = $station_max_landing_pad_size == "L" ? "Large" : "Medium";
        $station_is_planetary = $obj->is_planetary;
        $station_type = $obj->type;
        $icon = get_station_icon($station_type, $station_is_planetary);
        $station_id = $obj->station_id;
        $station_faction = $obj->station_faction == "" ? "" : "<strong>Faction:</strong> " . $obj->station_faction . "<br />";
        $station_government = $obj->station_government == "" ? "" : "<strong>Government:</strong> " . $obj->station_government . "<br />";
        $station_allegiance = $obj->station_allegiance == "" ? "" : "<strong>Allegiance:</strong> " . $obj->station_allegiance . "<br />";
        $station_state = $obj->station_state == "" ? "" : "<strong>State:</strong> " . $obj->station_state . "<br />";
        $station_type_d = $obj->type == "" ? "" : "<strong>Type:</strong> " . $obj->type . "<br />";
        $station_economies = $obj->station_economies == "" ? "" : "<strong>Economies:</strong> " . $obj->station_economies . "<br />";
        $station_import_commodities = $obj->import_commodities == "" ? "" : "<br /><strong>Import commodities:</strong> " . $obj->import_commodities . "<br />";
        $station_export_commodities = $obj->export_commodities == "" ? "" : "<strong>Export commodities:</strong> " . $obj->export_commodities . "<br />";
        $station_prohibited_commodities = $obj->prohibited_commodities == "" ? "" : "<strong>Prohibited commodities:</strong> " . $obj->prohibited_commodities . "<br />";
        $station_selling_ships = $obj->selling_ships == "" ? "" : "<br /><strong>Selling ships:</strong> " . str_replace("'", "", $obj->selling_ships) . "<br />";
        $station_shipyard = $obj->shipyard;
        $station_outfitting = $obj->outfitting;
        $station_commodities_market = $obj->commodities_market;
        $station_black_market = $obj->black_market;
        $station_refuel = $obj->refuel;
        $station_repair = $obj->repair;
        $station_rearm = $obj->rearm;
        $station_includes = array("shipyard" => $station_shipyard, "outfitting" => $station_outfitting, "commodities market" => $station_commodities_market, "black market" => $station_black_market, "refuel" => $station_refuel, "repair" => $station_repair, "restock" => $station_rearm);
        $i = 0;
        $station_services = "";
        foreach ($station_includes as $name => $included) {
            if ($included == 1) {
                if ($i != 0) {
                    $station_services .= ", ";
                } else {
                    $station_services .= "<strong>Facilities:</strong> ";
                }
                $station_services .= $name;
                $i++;
            }
        }
        $station_services .= "<br />";
        $outfitting_updated_at = $obj->outfitting_updated_at == "0" ? "" : "<br /><strong>Outfitting last updated:</strong> " . get_timeago($obj->outfitting_updated_at, true, true) . "<br />";
        $shipyard_updated_at = $obj->shipyard_updated_at == "0" ? "" : "<strong>Shipyard last updated:</strong> " . get_timeago($obj->shipyard_updated_at, true, true) . "<br />";
        $info = $station_type_d . $station_faction . $station_government . $station_allegiance . $station_state . $station_economies . $station_services;
        $info .= $station_import_commodities . $station_export_commodities . $station_prohibited_commodities . $outfitting_updated_at . $shipyard_updated_at . $station_selling_ships;
        $info = str_replace("['", "", $info);
        $info = str_replace("']", "", $info);
        $info = str_replace("', '", ", ", $info);
        /**
         * get allegiance icon
         */
        $station_allegiance_icon = get_allegiance_icon($obj->station_allegiance);
        $station_allegiance_icon = '<img src="/style/img/' . $station_allegiance_icon . '" alt="' . $obj->station_allegiance . '" style="width:19px;height:19px;margin-right:5px" />';
        /**
         * notify user if data is old
         */
        $station_disp_name = $station_name;
        if (!empty($group_id) || !empty($ship_name)) {
            if (data_is_old($obj->outfitting_updated_at) || data_is_old($obj->shipyard_updated_at)) {
                $station_disp_name = '<span class="old_data">' . $station_name . '</span>';
            }
        }
        ?>
        <td class="<?php 
        echo $tdclass;
        ?>
">
            <?php 
        echo $station_allegiance_icon . $icon;
        ?>
            <a href="javascript:void(0)" id="minfo<?php 
        echo $station_id;
        ?>
"
               title="Additional information">
                <?php 
        echo $station_disp_name;
        ?>
            </a>
        </td>
        <td class="<?php 
        echo $tdclass;
        ?>
">
            <?php 
        echo $station_ls_from_star;
        ?>
        </td>
        <td class="<?php 
        echo $tdclass;
        ?>
">
            <?php 
//.........这里部分代码省略.........
开发者ID:DBnR1,项目名称:EDTB,代码行数:101,代码来源:NearestSystems.php


示例18: foreach

					<tr>
						<th>IP</th>
						<th>Last seen</th>
					</tr>
				</thead>
				<tbody>
					<?php 
foreach ($records as $r) {
    ?>
					<tr>
						<td><?php 
    echo $r->ip_addr;
    ?>
</td>
						<td><?php 
    echo get_timeago($r->date);
    ?>
</td>
					</tr>
					<?php 
}
?>
				</tbody>
			</table>
			<?php 
echo $pag->display(true);
?>
		</div>
	</div>
</div>
<?php 
开发者ID:khaledkhalil94,项目名称:SH.A,代码行数:31,代码来源:traffic.php


示例19: header

        if ($visibility == 'private' && $user_id != $user_loggedin_id) {
            // Visibility is private AND logged in user is not the owner of the snippet
            header('Location: 404.php?error=user_not_owner');
        } else {
            $snippet_user_id = $user_id;
            $snippet_name = $name;
            $snippet_cat = get_category_title($category_tag);
            $snippet_cat_color = get_category_color($category_tag);
            $snippet_desc = $description;
            if ($snippet_cat == 'plain-text') {
                $snippet_output = '<div id="plainOutput"><pre class="plain"><code>' . $snippet . '</code></pre></div>';
            } else {
                $snippet_output = '<div id="codeOutput"><pre class="highlighted"><code>' . $snippet . '</code></pre></div>';
            }
            $snippet_created_time = get_timeago($created_time);
            $snippet_updated_time = get_timeago($updated_time);
            $snippet_creator = get_username($user_id);
            $snippet_view_count = $view_count + 1;
            snippet_view_increment($snippet_id, $snippet_view_count);
        }
    } else {
        // ID not found
        header('Location: 404.php?error=id_not_found');
        exit;
    }
} else {
    // ID not numeric
    header('Location: 404.php?error=id_not_numeric');
    exit;
}
// Get total snippets for each category
开发者ID:heiswayi,项目名称:code-snippets-saver,代码行数:31,代码来源:view_snippet.php


示例20: get_timeago

 </span> by <span name="create-by"><?php 
echo $this->data["create_user_name"];
?>
 </span></td>    
				</tr>
				<tr>
					<td><strong>Memo</strong></td>
					<td><span name="memo"> <?php 
echo $this->data["memo"];
?>
</span></td>    
				</tr>
				<tr>
					<td><strong>Updated at</strong></td>
					<td><span name="update-date"> <?php 
echo get_timeago(strtotime($this->data["archived_date"]));
?>
 </span> by <span name="update-by"><?php 
echo $this->data["archived_user_name"];
?>
 </span></td>    
				</tr>
				<tr>
					<td colspan="3">
					<?php 
$image_per_row = 6;
$image_list_count = count($this->data["images"]);
$column_width = 12 / $image_per_row;
$i = 1;
$row = 1;
foreach ($this->data["images"] as $image) {
开发者ID:yhoyoex,项目名称:MyProject,代码行数:31,代码来源:ajax_view_file.php



注:本文中的get_timeago函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_timestamp函数代码示例发布时间:2022-05-15
下一篇:
PHP get_time函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap