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

PHP time_diff函数代码示例

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

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



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

示例1: reader_g

function reader_g($user_num, $day)
{
    $conect = connect_acc();
    $list = new linked_day();
    if ($result = $conect->query("SELECT * FROM `Event` WHERE `USER_#`='{$user_num}' AND `DAY`='{$day}' ORDER BY 'PRIORTY' ASC")) {
        if ($result->num_rows > 0) {
            while ($row = $result->fetch_assoc()) {
                $time_s = explode(' ', $row['TIME_BEGIN']);
                $time_e = explode(' ', $row['TIME_END']);
                $time_bs = $row['BUFF_BEGIN'];
                $time_be = $row['BUFF_END'];
                if (($buf_time_b = time_diff($time_bs, $time_s[1])) <= $time_s[1]) {
                    $list->add("free time", $buf_time_b, $time_s[1]);
                } else {
                    $list->add("free time", "00:00:00", $time_s[1]);
                }
                $list->add($row['EVENT_NAME'], $time_s[1], $time_e[1]);
                if (($buf_time_a = time_add($time_be, $time_e[1])) >= $time_e[1]) {
                    $list->add("free time", $time_e[1], $buf_time_a);
                } else {
                    $list->add("free time", $time_e[1], "23:59:59");
                }
            }
        }
    }
    disconnect($conect);
    return $list;
}
开发者ID:TylerCreatingThings,项目名称:Priority-Project,代码行数:28,代码来源:algorithm.php


示例2: make_staff_row

/**
 * Generate a table row for a staff member on staff.php
 *
 * @param $Row used for alternating row colors
 * @param $ID the user ID of the staff member
 * @param $Paranoia the user's paranoia
 * @param $Class the user class
 * @param $LastAccess datetime the user last browsed the site
 * @param $Remark the "Staff remark" or FLS' "Support for" text
 * @param $HiddenBy the text that is displayed when a staff member's
 *                  paranoia hides their LastAccess time
 * @return string $Row
 */
function make_staff_row($Row, $ID, $Paranoia, $Class, $LastAccess, $Remark = '', $HiddenBy = 'Hidden by user')
{
    $Row = $Row === 'a' ? 'b' : 'a';
    echo "\t\t\t<tr class=\"row{$Row}\">\n\t\t\t\t<td class=\"nobr\">\n\t\t\t\t\t" . Users::format_username($ID, false, false, false) . "\n\t\t\t\t</td>\n\t\t\t\t<td class=\"nobr\">\n\t\t\t\t\t";
    //used for proper indentation of HTML
    if (check_paranoia('lastseen', $Paranoia, $Class)) {
        echo time_diff($LastAccess);
    } else {
        echo "{$HiddenBy}";
    }
    echo "\n\t\t\t\t</td>\n\t\t\t\t<td class=\"nobr\">" . Text::full_format($Remark) . "</td>\n\t\t\t</tr>\n";
    // the "\n" is needed for pretty HTML
    // the foreach loop that calls this function needs to know the new value of $Row
    return $Row;
}
开发者ID:karamanolev,项目名称:Gazelle,代码行数:28,代码来源:functions.php


示例3: while

<div class="thin">
	<h2><?php 
echo $Subject;
?>
</h2>
	<div class="linkbox">
		<a href="inbox.php">[Back to inbox]</a>
	</div>
<? while(list($SentDate, $SenderID, $Body, $MessageID) = $DB->next_record()) { ?>
	<div class="box vertical_space">
		<div class="head">
			By <strong><?php 
echo $Users[$SenderID]['UserStr'];
?>
</strong> <?php 
echo time_diff($SentDate);
?>
 - <a href="#quickpost" onclick="Quote('<?php 
echo $MessageID;
?>
','<?php 
echo $Users[$SenderID]['Username'];
?>
');">[Quote]</a>	
		</div>
		<div class="body" id="message<?php 
echo $MessageID;
?>
"><?php 
echo $Text->full_format($Body);
?>
开发者ID:4play,项目名称:gazelle2,代码行数:31,代码来源:conversation.php


示例4: foreach

    $DB->query("\n\t\tUPDATE users_info\n\t\tSET LastReadBlog = '" . $Blog[0][0] . "'\n\t\tWHERE UserID = " . $LoggedUser['ID']);
    $LoggedUser['LastReadBlog'] = $Blog[0][0];
}
foreach ($Blog as $BlogItem) {
    list($BlogID, $Author, $AuthorID, $Title, $Body, $BlogTime, $ThreadID) = $BlogItem;
    ?>
	<div id="blog<?php 
    echo $BlogID;
    ?>
" class="box blog_post">
		<div class="head">
			<strong><?php 
    echo $Title;
    ?>
</strong> - posted <?php 
    echo time_diff($BlogTime);
    ?>
 by <a href="user.php?id=<?php 
    echo $AuthorID;
    ?>
"><?php 
    echo $Author;
    ?>
</a>
<?php 
    if (check_perms('admin_manage_blog')) {
        ?>
			- <a href="blog.php?action=editblog&amp;id=<?php 
        echo $BlogID;
        ?>
" class="brackets">Edit</a>
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:index.php


示例5: display

        ?>
</p>
                                                <p class="article-edit-nav"></p>
                                            </td>
                                            <?php 
        if ($category == 'ing_executives') {
            ?>
                                            <td><p><?php 
            display($members_item->position);
            ?>
</p></td>
                                            <?php 
        }
        ?>
                                            <td><p><?php 
        $time = time_diff($members_item->approved_date, TRUE);
        if ($time == 'just now') {
            display('Just now');
        } elseif (strpos($time, '1 day') !== FALSE) {
            display('Yesterday');
        } elseif (strpos($time, 'second') !== FALSE or strpos($time, 'minute') !== FALSE or strpos($time, 'hour') !== FALSE or strpos($time, 'day') !== FALSE) {
            display($time . ' ago');
        } else {
            display($members_item->approved_date);
        }
        ?>
</p></td>
                                            <td><p><?php 
        display($members_item->approved_by);
        ?>
</p></td>
开发者ID:puncoz,项目名称:ingnepal.org,代码行数:31,代码来源:member_manage.php


示例6: foreach

    die;
}
Text::$TOC = true;
$UserID = (int) $_GET['userid'];
$UserIDSQL = "";
if (!empty($UserID)) {
    $UserIDSQL = " AND UserID != '{$UserID}' ";
}
G::$DB->query("\n\t\tSELECT UserID, Answer, Date\n\t\tFROM staff_answers\n\t\tWHERE QuestionID = '{$ID}'\n\t\t\t{$UserIDSQL}\n\t\tORDER BY DATE DESC");
$Answers = G::$DB->to_array(false, MYSQLI_ASSOC);
foreach ($Answers as $Answer) {
    ?>
	<div class="box box2">
		<div class="head">
			<span>
				Answer by <?php 
    echo Users::format_username($Answer['UserID']);
    ?>
 - <?php 
    echo time_diff($Answer['Date']);
    ?>
			</span>
		</div>
		<div class="pad">
<?php 
    echo Text::full_format($Answer['Answer']);
    ?>
		</div>
	</div>
<?php 
}
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:ajax_get_answers.php


示例7: time_diff

            echo $LastRead[$TopicID]['Page'];
            ?>
#post<?php 
            echo $LastRead[$TopicID]['PostID'];
            ?>
"></a>
			</span>
<?php 
        }
        ?>
			<span style="float: right;" class="last_poster">
				by <?php 
        echo Users::format_username($LastAuthorID, false, false, false, false, false, $IsDonorForum);
        ?>
 <?php 
        echo time_diff($LastTime, 1);
        ?>
			</span>
		</td>
		<td class="number_column"><?php 
        echo number_format($PostCount - 1);
        ?>
</td>
		<td><?php 
        echo Users::format_username($AuthorID, false, false, false, false, false, $IsDonorForum);
        ?>
</td>
	</tr>
<?php 
    }
}
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:forum.php


示例8: foreach

    echo $LoggedUser['AuthKey'];
    ?>
" />
		<input type="hidden" name="topicid" value="<?php 
    echo $ThreadID;
    ?>
" />
		<table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border hidden" id="thread_notes_table">
<?php 
    foreach ($Notes as $Note) {
        ?>
			<tr><td><?php 
        echo Users::format_username($Note['AuthorID']);
        ?>
 (<?php 
        echo time_diff($Note['AddedTime'], 2, true, true);
        ?>
)</td><td><?php 
        echo Text::full_format($Note['Body']);
        ?>
</td></tr>
<?php 
    }
    ?>
			<tr>
				<td colspan="2" class="center">
					<div class="field_div textarea_wrap"><textarea id="topic_notes" name="body" cols="90" rows="3" onkeyup="resize('threadnotes');" style=" margin: 0px; width: 735px;"></textarea></div>
					<input type="submit" value="Save" />
				</td>
			</tr>
		</table>
开发者ID:mohirt,项目名称:Gazelle,代码行数:31,代码来源:thread.php


示例9: format_username

?>
	<tr>
		<td><?php 
echo format_username($UserID, $Username, $Donor, $Warned, $Enabled, $PermissionID);
?>
</td>
		<td><?php 
echo PAYPAL_SYMBOL;
?>
 <?php 
echo display_str($Amount);
?>
</td>
		<td><?php 
echo display_str($Email);
?>
</td>
		<td><?php 
echo time_diff($DonationTime);
?>
</td>
	</tr>
<?	} ?>
</table>
<div class="linkbox">
	<?php 
echo $Pages;
?>
</div>
<? show_footer(); ?>
开发者ID:4play,项目名称:gazelle2,代码行数:30,代码来源:donation_log.php


示例10: display_str

    ?>
" size="30" />
			</td>
			<td>
				<input type="text" name="comment" value="<?php 
    echo display_str($Comment);
    ?>
" size="60" />
			</td>
			<td>
				<?php 
    echo format_username($UserID, $Username);
    ?>
<br />
				<?php 
    echo time_diff($Time, 1);
    ?>
</td>
			<td>
				<input type="submit" name="submit" value="Edit" />
				<input type="submit" name="submit" value="Delete" />
			</td>
		</form>
	</tr>
<?php 
}
?>
<tr>
	<td colspan="4" class="colhead">Add To Email Blacklist</td>
</tr>
<tr class="rowa">
开发者ID:morilo,项目名称:ptpimg,代码行数:31,代码来源:eb.php


示例11: while

        $Requests = $DB->has_results();
        if ($Requests > 0) {
            while (list($RequestID, $FillerID, $FillerName, $FilledTime) = $DB->next_record()) {
                ?>
						<div style="text-align: right;">
							<strong class="important_text"><a href="user.php?id=<?php 
                echo $FillerID;
                ?>
"><?php 
                echo $FillerName;
                ?>
</a> used this torrent to fill <a href="requests.php?action=viewrequest&amp;id=<?php 
                echo $RequestID;
                ?>
">this request</a> <?php 
                echo time_diff($FilledTime);
                ?>
</strong>
						</div>
<?php 
            }
        }
    }
    ?>
					</td>
				</tr>
<?php 
    // END REPORTED STUFF :|: BEGIN MOD STUFF
    ?>
				<tr>
					<td class="label">
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:delete.php


示例12: pretty_size

    ?>
torrent/<?php 
    echo $torrent->fid;
    ?>
"><?php 
    echo $torrent->title;
    ?>
</a><br />

				<span class="info">
					<?php 
    echo pretty_size($torrent->size);
    ?>
;
					added <?php 
    echo time_diff($torrent->ctime);
    ?>
					by
					<?php 
    $this->renderElement('user_byline', array('user' => $torrent->user));
    ?>
					in category <a href="<?php 
    echo WWW_BASE_PATH;
    ?>
browse/<?php 
    echo $torrent->category->slug;
    ?>
"><?php 
    echo $torrent->category->name;
    ?>
</a>
开发者ID:bencochran,项目名称:yeti,代码行数:31,代码来源:index.php


示例13: gixlg_execsqlrequest


//.........这里部分代码省略.........
</td></tr>
</tfoot>
<tbody>
<?php 
            while ($d = mysqli_fetch_assoc($res)) {
                $as_info_dns = dns_get_record("AS" . $d['asn'] . ".asn.cymru.com", DNS_TXT);
                list($as_info['as'], $as_info['country'], $as_info['rir'], $as_info['date'], $as_info['desc']) = explode("|", $as_info_dns[0]['txt']);
                $asinfo = explode(" ", $as_info['desc']);
                if ($d['type'] == '4') {
                    $res_node = mysqli_query($mid, "SELECT * FROM `nodes` WHERE `ip4`='" . $d['neighbor'] . "'");
                } else {
                    $res_node = mysqli_query($mid, "SELECT * FROM `nodes` WHERE `ip6`='" . $d['neighbor'] . "'");
                }
                $d_node = mysqli_fetch_assoc($res_node);
                echo "<tr>";
                echo "<td>" . $d_node['vendor'] . " " . $d_node['model'] . "</td>";
                echo "<td>" . $d_node['location'] . "</td>";
                echo "<td>" . $as_info['country'] . "</td>";
                echo "<td>" . strtoupper($as_info['rir']) . "</td>";
                echo "<td>" . $asinfo[1] . "</td>";
                echo "<td>" . $d['asn'] . "</td>";
                echo "<td>" . $d['neighbor'] . "</td>";
                echo "<td>" . $d['type'] . "</td>";
                if ($d['status'] == 1) {
                    echo "<td>up</td>";
                } else {
                    echo "<td>down</td>";
                }
                echo "<td>" . $d['prefixes'] . "</td>";
                echo "<td>" . $d['updown'] . "</td>";
                if ($d['time'] == '0000-00-00 00:00:00') {
                    echo "<td>never</td>";
                } else {
                    echo "<td>" . time_diff($d['time']) . "</td>";
                }
                if ($d['lastup'] == '0000-00-00 00:00:00') {
                    echo "<td>never</td>";
                } else {
                    if ($d['status'] == 0) {
                        echo "<td>" . $d['lastup'] . "</td>";
                    } else {
                        echo "<td>" . time_diff($d['lastup']) . "</td>";
                    }
                }
                if ($d['lastdown'] == '0000-00-00 00:00:00') {
                    echo "<td>never</td>";
                } else {
                    if ($d['status'] == 1) {
                        echo "<td>" . $d['lastdown'] . "</td>";
                    } else {
                        echo "<td>" . time_diff($d['lastdown']) . "</td>";
                    }
                }
                echo "</tr>";
            }
            echo "</tbody>";
            echo "</table>";
            break;
        case 20:
            if ($ipnet == 1) {
                $res = mysqli_query($mid, "SELECT * FROM `prefixes` WHERE (`prefix`='{$argument}') ORDER BY LENGTH(aspath),`neighbor`,(neighbor+0),`neighbor`");
            } else {
                $int_ip = inet_ptoi($argument);
                if ($gixlg['ignore_default_routes']) {
                    $res = mysqli_query($mid, "SELECT * FROM `prefixes` WHERE (MBRCONTAINS(ip_poly, POINTFROMWKB(POINT({$int_ip}, 0))) && (`prefix`!='::/0') and (`prefix`!='0.0.0.0/0')) ORDER BY LENGTH(aspath),`neighbor`,(neighbor+0),`neighbor`");
                } else {
开发者ID:atwardowski,项目名称:gixlg,代码行数:67,代码来源:gixlg-core.php


示例14: while

"><?php 
echo $Username;
?>
</a></h2>
<table width="100%">
	<tr class="colhead">
		<td>Changed</td>
		<td>IP [<a href="/userhistory.php?action=ips&userid=<?php 
echo $UserID;
?>
">H</a>]</td>
	</tr>
<? while(list($ChangeTime, $ChangerIP) = $DB->next_record()){ ?>
	<tr class="rowa">
		<td><?php 
echo time_diff($ChangeTime);
?>
</td>
		<td><?php 
echo display_str($ChangerIP);
?>
 [<a href="/user.php?action=search&ip_history=on&ip=<?php 
echo display_str($ChangerIP);
?>
" title="Search">S</a>]<br /><?php 
echo get_host($ChangerIP);
?>
</td>
	</tr>
<? } ?>
</table>
开发者ID:4play,项目名称:gazelle2,代码行数:31,代码来源:password_history.php


示例15: time_diff

            $User = '<strong>' . $User . '</strong>';
        }
    }
    if ($i % 2 == 0 && $i > 0) {
        ?>
	</tr>
	<tr>
<?php 
    }
    ?>
		<td><?php 
    echo $User;
    ?>
</td>
		<td><?php 
    echo time_diff($Timestamp);
    ?>
</td>
<?php 
    $i++;
}
?>
	</tr>
</table>
<?php 
if ($NumResults > 100) {
    ?>
<div class="linkbox"><?php 
    echo js_pages('show_downloads', $_GET['torrentid'], $NumResults, $Page);
    ?>
</div>
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:downloadlist.php


示例16: time_diff

    ?>
			<tr>
				<td><?php 
    echo $Revision;
    ?>
</td>
				<td><?php 
    echo $Title;
    ?>
</td>
				<td><?php 
    echo Users::format_username($AuthorID, false, false, false);
    ?>
</td>
				<td><?php 
    echo time_diff($Date);
    ?>
</td>
				<td><input type="radio" name="old" value="<?php 
    echo $Revision;
    ?>
" /></td>
				<td><input type="radio" name="new" value="<?php 
    echo $Revision;
    ?>
" /></td>
			</tr>
<?php 
}
?>
			<tr>
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:revisions.php


示例17: time_diff

			<?php 
echo $DisplayName;
?>
			<br />
			<div class="tags">
				<?php 
echo $TorrentTags;
?>
			</div>
		</td>
		<td><?php 
echo $Data['FileCount'];
?>
</td>
		<td class="nobr"><?php 
echo time_diff($GroupTime, 1);
?>
</td>
		<td class="nobr"><?php 
echo get_size($Data['Size']);
?>
</td>
		<td><?php 
echo number_format($TotalSnatched);
?>
</td>
		<td<?php 
echo $TotalSeeders == 0 ? ' class="r00"' : '';
?>
><?php 
echo number_format($TotalSeeders);
开发者ID:4play,项目名称:gazelle2,代码行数:31,代码来源:browse2.php


示例18: time_diff

				<a href="user.php?id=<?php 
            echo $Request['UserID'];
            ?>
"><?php 
            echo Users::format_username($Request['UserID'], false, false, false);
            ?>
</a>
			</td>
			<td class="nobr">
				<?php 
            echo time_diff($Request['TimeAdded'], 1);
            ?>
			</td>
			<td class="nobr">
				<?php 
            echo time_diff($Request['LastVote'], 1);
            ?>
			</td>
		</tr>
<?php 
        }
        // foreach
    }
    // else
}
// if ($BookmarkView && $NumResults < 1)
?>
	</table>
<?php 
if (isset($PageLinks)) {
    ?>
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:requests.php


示例19: build_torrents_table

function build_torrents_table($Cache, $DB, $LoggedUser, $GroupID, $GroupName, $GroupCategoryID, $ReleaseType, $TorrentList, $Types, $Username, $ReportedTimes)
{
    function filelist($Str)
    {
        return "</td>\n<td>" . Format::get_size($Str[1]) . "</td>\n</tr>";
    }
    $LastRemasterYear = '-';
    $LastRemasterTitle = '';
    $LastRemasterRecordLabel = '';
    $LastRemasterCatalogueNumber = '';
    $EditionID = 0;
    foreach ($TorrentList as $Torrent) {
        //t.ID,	t.Media, t.Format, t.Encoding, t.Remastered, t.RemasterYear,
        //t.RemasterTitle, t.RemasterRecordLabel, t.RemasterCatalogueNumber, t.Scene,
        //t.HasLog, t.HasCue, t.LogScore, t.FileCount, t.Size, t.Seeders, t.Leechers,
        //t.Snatched, t.FreeTorrent, t.Time, t.Description, t.FileList,
        //t.FilePath, t.UserID, t.last_action, HEX(t.info_hash), (bad tags), (bad folders), (bad filenames),
        //(cassette approved), (lossy master approved), (lossy web approved), t.LastReseedRequest,
        //LogInDB, (has file), Torrents::torrent_properties()
        list($TorrentID, $Media, $Format, $Encoding, $Remastered, $RemasterYear, $RemasterTitle, $RemasterRecordLabel, $RemasterCatalogueNumber, $Scene, $HasLog, $HasCue, $LogScore, $FileCount, $Size, $Seeders, $Leechers, $Snatched, $FreeTorrent, $TorrentTime, $Description, $FileList, $FilePath, $UserID, $LastActive, $InfoHash, $BadTags, $BadFolders, $BadFiles, $CassetteApproved, $LossymasterApproved, $LossywebApproved, $LastReseedRequest, $LogInDB, $HasFile, $PersonalFL, $IsSnatched) = array_values($Torrent);
        if ($Remastered && !$RemasterYear) {
            $FirstUnknown = !isset($FirstUnknown);
        }
        $Reported = false;
        unset($ReportedTimes);
        $Reports = Torrents::get_reports($TorrentID);
        $NumReports = count($Reports);
        if ($NumReports > 0) {
            $Reported = true;
            include SERVER_ROOT . '/sections/reportsv2/array.php';
            $ReportInfo = '
		<table class="reportinfo_table">
			<tr class="colhead_dark" style="font-weight: bold;">
				<td>This torrent has ' . $NumReports . ' active ' . ($NumReports === 1 ? 'report' : 'reports') . ":</td>\n\t\t\t</tr>";
            foreach ($Reports as $Report) {
                if (check_perms('admin_reports')) {
                    $ReporterID = $Report['ReporterID'];
                    $Reporter = Users::user_info($ReporterID);
                    $ReporterName = $Reporter['Username'];
                    $ReportLinks = "<a href=\"user.php?id={$ReporterID}\">{$ReporterName}</a> <a href=\"reportsv2.php?view=report&amp;id={$Report['ID']}\">reported it</a>";
                } else {
                    $ReportLinks = 'Someone reported it';
                }
                if (isset($Types[$GroupCategoryID][$Report['Type']])) {
                    $ReportType = $Types[$GroupCategoryID][$Report['Type']];
                } elseif (isset($Types['master'][$Report['Type']])) {
                    $ReportType = $Types['master'][$Report['Type']];
                } else {
                    //There was a type but it wasn't an option!
                    $ReportType = $Types['master']['other'];
                }
                $ReportInfo .= "\n\t\t\t<tr>\n\t\t\t\t<td>{$ReportLinks} " . time_diff($Report['ReportedTime'], 2, true, true) . ' for the reason "' . $ReportType['title'] . '":
					<blockquote>' . Text::full_format($Report['UserComment']) . '</blockquote>
				</td>
			</tr>';
            }
            $ReportInfo .= "\n\t\t</table>";
        }
        $CanEdit = check_perms('torrents_edit') || $UserID == $LoggedUser['ID'] && !$LoggedUser['DisableWiki'] && !($Remastered && !$RemasterYear);
        $RegenLink = check_perms('users_mod') ? ' <a href="torrents.php?action=regen_filelist&amp;torrentid=' . $TorrentID . '" class="brackets">Regenerate</a>' : '';
        $FileTable = '
	<table class="filelist_table">
		<tr class="colhead_dark">
			<td>
				<div class="filelist_title" style="float: left;">File Names' . $RegenLink . '</div>
				<div class="filelist_path" style="float: right;">' . ($FilePath ? "/{$FilePath}/" : '') . '</div>
			</td>
			<td>
				<strong>Size</strong>
			</td>
		</tr>';
        if (substr($FileList, -3) == '}}}') {
            // Old style
            $FileListSplit = explode('|||', $FileList);
            foreach ($FileListSplit as $File) {
                $NameEnd = strrpos($File, '{{{');
                $Name = substr($File, 0, $NameEnd);
                if ($Spaces = strspn($Name, ' ')) {
                    $Name = str_replace(' ', '&nbsp;', substr($Name, 0, $Spaces)) . substr($Name, $Spaces);
                }
                $FileSize = substr($File, $NameEnd + 3, -3);
                $FileTable .= sprintf("\n<tr><td>%s</td><td class=\"number_column\">%s</td></tr>", $Name, Format::get_size($FileSize));
            }
        } else {
            $FileListSplit = explode("\n", $FileList);
            foreach ($FileListSplit as $File) {
                $FileInfo = Torrents::filelist_get_file($File);
                $FileTable .= sprintf("\n<tr><td>%s</td><td class=\"number_column\">%s</td></tr>", $FileInfo['name'], Format::get_size($FileInfo['size']));
            }
        }
        $FileTable .= '
	</table>';
        $ExtraInfo = '';
        // String that contains information on the torrent (e.g. format and encoding)
        $AddExtra = '';
        // Separator between torrent properties
        $TorrentUploader = $Username;
        // Save this for "Uploaded by:" below
        // similar to Torrents::torrent_info()
        if ($Format) {
//.........这里部分代码省略.........
开发者ID:karamanolev,项目名称:Gazelle,代码行数:101,代码来源:functions.php


示例20: time_diff

    ?>
">
				<td class="nobr"><?php 
    echo $IP;
    ?>
</td>
				<td><?php 
    echo $Browser;
    ?>
</td>
				<td><?php 
    echo $OperatingSystem;
    ?>
</td>
				<td><?php 
    echo time_diff($LastUpdate);
    ?>
</td>
				<td>
					<form class="delete_form" name="session" action="" method="post">
						<input type="hidden" name="action" value="sessions" />
						<input type="hidden" name="auth" value="<?php 
    echo $LoggedUser['AuthKey'];
    ?>
" />
						<input type="hidden" name="session" value="<?php 
    echo $ThisSessionID;
    ?>
" />
						<input type="submit" value="<?php 
    echo $ThisSessionID == $SessionID ? 'Current" disabled="disabled' : 'Log out';
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:sessions.php



注:本文中的time_diff函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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