当前位置: 首页>>代码示例>>PHP>>正文


PHP FormatTime函数代码示例

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


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

示例1: FormatTimeSpecial

function FormatTimeSpecial($ut)
{
    if (is_null($ut) or strlen($ut) == 0) {
        return "";
    }
    return FormatTime($ut);
}
开发者ID:kailIII,项目名称:pos-erp,代码行数:7,代码来源:requests.ver.php

示例2: toDate

function toDate($unix_time)
{
    if (strlen($unix_time) == 0) {
        return "";
    }
    return FormatTime($unix_time);
    return $unix_time;
    return date("F jS h:i:s a", $unix_time);
}
开发者ID:kukogit,项目名称:omegaup,代码行数:9,代码来源:contests.php

示例3: toDate

function toDate($unix_time)
{
    if (strlen($unix_time) == 0) {
        return '';
    }
    return FormatTime($unix_time);
    return $unix_time;
    return date('F jS h:i:s a', $unix_time);
}
开发者ID:andreasantillana,项目名称:omegaup,代码行数:9,代码来源:contests.php

示例4: renderRow

function renderRow($unixTime, $fullArray)
{
    $out = "";
    switch ($fullArray["tipo"]) {
        case "SeguimientoDeServicio":
            $ods = OrdenDeServicioDAO::getByPK($fullArray["id_orden_de_servicio"]);
            $s = ServicioDAO::getByPK($ods->getIdServicio());
            $out .= '<strong> Seguimiento De Orden ' . $s->getNombreServicio() . ' ' . $fullArray["id_orden_de_servicio"] . ' </strong>';
            $out .= $fullArray["estado"];
            $u = $fullArray["id_usuario"];
            break;
        case "ClienteSeguimiento":
            $out .= '<strong> Seguimiento </strong>';
            $out .= $fullArray["texto"];
            $u = $fullArray["id_usuario"];
            break;
        case "OrdenDeServicio":
            $ods = OrdenDeServicioDAO::getByPK($fullArray["id_orden_de_servicio"]);
            $s = ServicioDAO::getByPK($ods->getIdServicio());
            $out .= '<strong>Nueva Orden de Servicio</strong> ' . $s->getNombreServicio() . ' ' . $fullArray["id_orden_de_servicio"] . ' ';
            $out .= $fullArray["descripcion"];
            $u = $fullArray["id_usuario"];
            break;
        case "Venta":
            if ($fullArray["cancelada"]) {
                $out .= '<strong><strike>Venta Cancelada ' . $fullArray["id_venta"] . '</strike></strong>';
            } else {
                $out .= '<strong>Venta ' . $fullArray["id_venta"] . '</strong>';
            }
            $out .= '&nbsp;' . FormatMoney($fullArray["total"]) . ' ' . $fullArray["tipo_de_venta"];
            $u = $fullArray["id_usuario"];
            break;
        case "Cotizacion":
            $out .= '<strong>Venta ' . $fullArray["id_venta"] . '</strong>';
            $u = $fullArray["id_usuario"];
            break;
    }
    //return json_encode( $fullVo );
    $u = UsuarioDAO::getByPK($u)->getNombre();
    $out .= '<br><div style="text-align: right; font-size:10px; color:gray">' . FormatTime($fullArray["fecha"]) . ' por ' . $u . "</div>";
    return $out;
}
开发者ID:kailIII,项目名称:pos-erp,代码行数:42,代码来源:clientes.ver.php

示例5: ArchiveCreate

function ArchiveCreate($Date, $DateMessage, $db, $Use, $BranchName)
{
    global $freshports_CommitMsgMaxNumOfLinesToShow;
    $commits = new Commits($db);
    $commits->SetBranch($BranchName);
    $NumRows = $commits->Fetch($Date, $User->id);
    #echo '<br>NumRows = ' . $NumRows;
    $HTML = '';
    if ($NumRows == 0) {
        $HTML .= '<TR><TD COLSPAN="3" BGCOLOR="' . BACKGROUND_COLOUR . '" HEIGHT="0">' . "\n";
        $HTML .= '   <FONT COLOR="#FFFFFF"><BIG>' . FormatTime($Date, 0, "D, j M Y") . '</BIG></FONT>' . "\n";
        $HTML .= '</TD></TR>' . "\n\n";
        $HTML .= '<TR><TD>No commits found for that date</TD></TR>';
    }
    unset($ThisCommitLogID);
    require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/display_commit.php';
    $DisplayCommit = new DisplayCommit($db, $commits->LocalResult);
    $DisplayCommit->SanityTestFailure = true;
    $RetVal = $DisplayCommit->CreateHTML();
    $HTML = $DisplayCommit->HTML;
    return $HTML;
}
开发者ID:brycied00d,项目名称:freshports,代码行数:22,代码来源:date.php

示例6: FormatTime

    echo $Topic['Title'];
    ?>
						</a>
					</h2>
					<span class="item-tags">
						<a href="###" onclick="javascript:Manage(<?php 
    echo $Topic['FavoriteID'];
    ?>
, 4, 1, false, this);"><?php 
    echo $Lang['Unsubscribe'];
    ?>
</a>
					</span>
					<span class="item-date float-right">
						<?php 
    echo $Lang['Collected_In'] . FormatTime($Topic['DateCreated']);
    ?>
					</span>
				</div>
				<div class="c"></div>
			</div>
							
		<?php 
}
?>
		<div class="pagination">
			<?php 
Pagination('/favorites/page/', $Page, $TotalPage);
?>
			<div class="c"></div>
		</div>
开发者ID:MrMoDoor,项目名称:Carbon-Forum,代码行数:31,代码来源:favorites.php

示例7: FormatTime

    echo $Lang['Tag'];
    ?>
:<?php 
    echo $TagName;
    ?>
</li>
		<li><?php 
    echo $TagInfo['Followers'];
    echo $Lang['Followers'];
    ?>
</li>
		<li><?php 
    echo $TagInfo['TotalPosts'];
    echo $Lang['Topics'];
    ?>
</li>
		<li><?php 
    echo $Lang['Created_In'];
    echo FormatTime($TagInfo['DateCreated']);
    ?>
</li>
		<li><?php 
    echo $Lang['Last_Updated_In'];
    echo FormatTime($TagInfo['MostRecentPostTime']);
    ?>
</li>

	</ul>
</nav>
<?php 
}
开发者ID:richardcj,项目名称:Carbon-Forum,代码行数:31,代码来源:tag.php

示例8: session_start

# Map
# Account
# Text
include 'mysql.php';
include 'functions.php';
session_start();
if ($_SESSION['Name']) {
    if ($_POST) {
        $Time = time();
        $Session = session_id();
        $Text = filter_var(trim(stripslashes($_POST['data'])), FILTER_SANITIZE_SPECIAL_CHARS);
        if ($Text) {
            $_SESSION['Active'] = $Time;
            mysql_query("Insert into `Chat`\r\t\t\t\t\t\t\tvalues('', '{$Time}', '{$_SESSION['Map']}', '{$_SESSION['AccountID']}', '{$Text}')");
            mysql_query("Update `Players` set `Active`='{$Time}' where `Account`='{$_SESSION['AccountID']}'");
        }
    }
} else {
    echo "You need to <a href='#signin'>sign in</a> or <a href='#register'>register</a> to use the chat.";
}
echo "<table>";
$Query = mysql_query("Select `Time`, `Account`, `Text`\r\t\t\t\t\t\tfrom `Chat`\r\t\t\t\t\t\twhere `Map`='{$_SESSION['Map']}'\r\t\t\t\t\t\torder by `ID` desc\r\t\t\t\t\t\tlimit 10");
while (list($Time, $AccountID, $Text) = mysql_fetch_array($Query)) {
    $AccountQuery = mysql_query("Select `Name`\r\t\t\t\t\t\t\t\t\tfrom `Accounts`\r\t\t\t\t\t\t\t\t\twhere `ID`='{$AccountID}'");
    list($Name) = mysql_fetch_array($AccountQuery);
    $Time = FormatTime($Time);
    $Text = FormatURL($Text);
    echo "<tr><td class='time'> {$Time} </td><td> <b>{$Name}</b> </td><td> {$Text} </td></tr>";
}
echo "</table>";
echo "<a href='#chat-history'>View Chat History</a>";
开发者ID:kelsh,项目名称:classic,代码行数:31,代码来源:chat.php

示例9: MicroNow

                $failed = true;
            }
        } else {
            $pattern = $test['html'];
            $failed = $result != $test['html'];
        }
        if (!$failed) {
            // If we didn't fail, run the same test twenty times so we can see how long
            // it takes, on average.
            $bbcode->SetDebug(false);
            $start = MicroNow();
            for ($i = 0; $i < 20; $i++) {
                $result = $bbcode->Parse($test['bbcode']);
            }
            $time = (MicroNow() - $start) / 20;
            $output .= "<td class='good'>Pass</td>" . "<td class='good' style='text-align:right;'>" . FormatTime($time) . "</td></tr>\n";
            $numpassed++;
        } else {
            $numfailed++;
            $output .= "<td class='bad' colspan='2'>FAILED</td></tr>\n" . "<tr class='error'><td colspan='3'><b>Tried:</b><br />\n" . "<tt style='white-space:pre-wrap;background-color:#FDB;'>" . htmlspecialchars(addcslashes($test['bbcode'], "..\t\v..\\..ÿ")) . "</tt><br /><br />\n" . "<b>Expected:</b> (length " . strlen($pattern) . ")<br />\n" . "<tt style='white-space:pre-wrap;background-color:#FDB;'>" . htmlspecialchars(addcslashes($pattern, "..\t\v..\\..ÿ")) . "</tt><br /><br />\n" . "<b>Got:</b> (length " . strlen($result) . ")<br />\n" . "<tt style='white-space:pre-wrap;background-color:#FDB;'>" . htmlspecialchars(addcslashes($result, "..\t\v..\\..ÿ")) . "</tt>\n" . "</td></tr>\n";
        }
        print $output;
    }
}
print "</tbody>\n" . "</table>\n";
print "<div style='text-align:center; font-size:14pt; margin-bottom: 2em;'><b>Test Results:  {$numtested} tests performed.  {$numpassed} passed successfully, {$numfailed} failed.</b></div>\n";
?>

</body>

</html>
开发者ID:TiGR,项目名称:Addons,代码行数:31,代码来源:test_nbbc.php

示例10: MenuItem

    $btn_eliminar = new MenuItem("Cancelar esta venta", null);
    $btn_eliminar->addApiCall("api/ventas/cancelar", "GET");
    $btn_eliminar->onApiCallSuccessRedirect("ventas.lista.php");
    $btn_eliminar->addName("cancelar");
    $funcion_eliminar = " function eliminar_empresa(btn){" . "if(btn == 'yes')" . "{" . "var p = {};" . "p.id_venta = " . $_GET["vid"] . ";" . "sendToApi_cancelar(p);" . "}" . "}" . "      " . "function confirmar(){" . " Ext.MessageBox.confirm('Desactivar', 'Desea cancelar esta venta?', eliminar_empresa );" . "}";
    $btn_eliminar->addOnClick("confirmar", $funcion_eliminar);
    $menu->addMenuItem($btn_eliminar);
}
$btn = new MenuItem("<img src='../../media/iconos/printer.png'> Imprimir", null);
$btn->addOnClick("i", "function i(){window.location = 'ventas.detalle.imprimir.php?vid=" . $esta_venta->getIdVenta() . "';}");
$menu->addMenuItem($btn);
$page->addComponent($menu);
$esta_venta->setSaldo(FormatMoney($esta_venta->getSaldo()));
$esta_venta->setTotal(FormatMoney($esta_venta->getTotal()));
$esta_venta->setSubtotal(FormatMoney($esta_venta->getSubtotal()));
$esta_venta->setFecha(FormatTime($esta_venta->getFecha(), "SUPLEMENTARY"));
$form = new DAOFormComponent($esta_venta);
$form->setEditable(false);
$form->hideField(array("id_venta", "id_caja", "id_venta_caja", "id_comprador_venta", "id_sucursal", "id_usuario", "impuesto", "retencion", "es_cotizacion", "cancelada", "tipo_de_pago"));
if ($esta_venta->getTipoDeVenta() == "contado") {
    $form->hideField("saldo");
}
$page->addComponent($form);
function function_importe($foo, $obj)
{
    return FormatMoney((double) $obj["precio"] * (double) $obj["cantidad"]);
}
if (sizeof($productos = VentaProductoDAO::search(new VentaProducto(array("id_venta" => $_GET["vid"])))) > 0) {
    $page->addComponent(new TitleComponent("Productos en esta venta", 3));
    $tabla = new TableComponent(array("id_producto" => "Producto", "cantidad" => "Cantidad", "precio" => "Precio Unitario", "id_unidad" => "Importe"), $productos);
    $tabla->addColRender("id_unidad", "function_importe");
开发者ID:kailIII,项目名称:pos-erp,代码行数:31,代码来源:ventas.detalle.php

示例11: DATE_FORMAT

<?php 
print "<TD>{$l10nstr['118']}\n";
/* user */
print "<TD>{$l10nstr['41']}\n";
/* forum */
print "<TD>{$l10nstr['225']}\n";
/* last opertaion time */
$query = "SELECT DATE_FORMAT(last, '%d:%m:%Y:%H:%I:%S'), forum, user FROM usrtrack ORDER BY last DESC";
$result = mysql_query($query);
if (!$result) {
    echo mysql_error();
    exit;
}
while ($line = mysql_fetch_array($result, MYSQL_NUM)) {
    $last = $line[0];
    $forum = $line[1];
    $alias = GetAlias($line[2]);
    $user = $line[2];
    $forum_title = GetForumTitle($forum);
    print "<TR>\n";
    print "<TD><A HREF={$descscript}?action=user&usrname={$user} target=_blank>{$alias}</A>\n";
    print "<TD><A HREF={$mainfile}?forum={$forum}>{$forum_title}</A>\n";
    print "<TD dir=LTR>\n";
    $timestr = FormatTime($last);
    print "{$timestr}\n";
}
?>

</BODY>
</HTML>
开发者ID:BackupTheBerlios,项目名称:fakt,代码行数:30,代码来源:usrtrack.php

示例12: FriendlyDateFromUnixTime

 static function FriendlyDateFromUnixTime($unixtime)
 {
     return FormatTime($unixtime);
 }
开发者ID:kailIII,项目名称:pos-erp,代码行数:4,代码来源:TextRender.php

示例13: Display


//.........这里部分代码省略.........
             $HTML .= freshports_Expiration_Icon_Link($port->expiration_date) . ' EXPIRATION DATE: ' . $port->expiration_date . '<br>';
         }
     }
     if ($port->ignore) {
         $HTML .= freshports_Ignore_Icon_Link($port->ignore) . ' IGNORE: ' . htmlify(_forDisplay($port->ignore)) . "<br>";
     }
     if ($port->restricted) {
         $HTML .= freshports_Restricted_Icon_Link($port->restricted) . ' RESTRICTED: ' . htmlify(_forDisplay($port->restricted)) . '<br>';
     }
     if ($port->no_cdrom) {
         $HTML .= freshports_No_CDROM_Icon_Link($port->no_cdrom) . ' NO CDROM: ' . htmlify(_forDisplay($port->no_cdrom)) . '<br>';
     }
     if ($port->is_interactive) {
         $HTML .= freshports_Is_Interactive_Icon_Link($port->is_interactive) . ' IS INTERACTIVE: ' . htmlify(_forDisplay($port->is_interactive)) . '<br>';
     }
     // maintainer
     if ($port->maintainer && ($this->ShowMaintainedBy || $this->ShowEverything)) {
         if (strtolower($port->maintainer) == UNMAINTAINTED_ADDRESS) {
             $HTML .= '<br>There is no maintainer for this port.<br>';
             $HTML .= 'Any concerns regarding this port should be directed to the FreeBSD ' . 'Ports mailing list via ';
             $HTML .= '<A HREF="' . MAILTO . ':' . freshportsObscureHTML($port->maintainer);
             $HTML .= '?subject=FreeBSD%20Port:%20' . $port->category . '/' . $port->port . '" TITLE="email the FreeBSD Ports mailing list">';
             $HTML .= freshportsObscureHTML($port->maintainer) . '</A>';
         } else {
             $HTML .= '<b>';
             $HTML .= 'Maintainer:</b> <A HREF="' . MAILTO . ':' . freshportsObscureHTML($port->maintainer);
             $HTML .= '?subject=FreeBSD%20Port:%20' . $port->category . '/' . $port->port . '" TITLE="email the maintainer">';
             $HTML .= freshportsObscureHTML($port->maintainer) . '</A>';
         }
         $HTML .= ' ' . freshports_Search_Maintainer($port->maintainer) . '<br>';
     }
     // last commit date
     if (($this->ShowLastCommitDate || $this->ShowEverything) && $port->last_commit_date) {
         $HTML .= '<b>Last commit date:</b> ' . FormatTime($port->last_commit_date, 0, "Y-m-d H:i:s") . '<br>';
     }
     // there are only a few places we want to show the last change.
     // therefore, we do not check ShowEverything here
     if ($this->ShowLastChange) {
         if ($port->updated != 0) {
             $HTML .= 'last change committed by ' . freshports_CommitterEmailLink($port->committer);
             // separate lines in case committer is null
             $HTML .= ' ' . freshports_Search_Committer($port->committer);
             $HTML .= ' on <font size="-1">' . $port->updated . '</font>' . "\n";
             $HTML .= freshports_Email_Link($port->message_id);
             if ($port->EncodingLosses()) {
                 $HTML .= ' ' . freshports_Encoding_Errors_Link();
             }
             $HTML .= ' ' . freshports_Commit_Link($port->message_id);
             $HTML .= ' ' . freshports_Commit_Link_Port($port->message_id, $port->category, $port->port);
             global $freshports_CommitMsgMaxNumOfLinesToShow;
             $HTML .= freshports_PortDescriptionPrint($port->update_description, $port->encoding_losses, $freshports_CommitMsgMaxNumOfLinesToShow, freshports_MoreCommitMsgToShow($port->message_id, $freshports_CommitMsgMaxNumOfLinesToShow));
         } else {
             $HTML .= "no changes recorded in FreshPorts<br>\n";
         }
     }
     # show the date added, if asked
     if ($this->ShowDateAdded || $this->ShowEverything) {
         $HTML .= '<b>Port Added:</b> <font size="-1">';
         if ($port->date_added) {
             $HTML .= $port->date_added;
         } else {
             $HTML .= "unknown";
         }
         $HTML .= '</font><BR>' . "\n";
     }
     $HTML .= PeopleWatchingThisPortAlsoWatch($this->db, $port->element_id);
开发者ID:brycied00d,项目名称:freshports,代码行数:67,代码来源:port-display.php

示例14: ft

function ft($time)
{
    return FormatTime($time);
}
开发者ID:kailIII,项目名称:pos-erp,代码行数:4,代码来源:FormatTime.php

示例15: DisplayValsOnPage

 function DisplayValsOnPage()
 {
     $formattedUpTime = FormatTime($this->upTime, SECONDS);
     echo '  <table width="100%" border="0" cellspacing="2" cellpadding="2" class="dataTable">', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Time of status check:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->timeStamp, '</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td colspan="2">&nbsp;</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">CPU usage:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->cpuUtilization, '%</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Up time:</td>', "\n";
     echo '          <td class="serverStatusValue">', $formattedUpTime, '</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td colspan="2">&nbsp;</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Admin operations queued:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->adminOpsQueueSize, '</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Client operations queued:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->clientOpsQueueSize, '</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Site operations queued:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->siteOpsQueueSize, '</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Average client operation time:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->avgClientOpTime, ' milliseconds</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Total operation time:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->totalOpTime, ' seconds</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Total operations processed:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->totalOpsProcessed, '</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Total operations received:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->totalOpsReceived, '</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td colspan="2">&nbsp;</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Total physical memory:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->totalPhysicalMemory / 1024, ' KB</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Physical memory used:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->physicalMemoryUsed / 1024, ' KB</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Total virtual memory:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->totalVirtualMemory / 1024, ' KB</td>', "\n";
     echo '      </tr>', "\n";
     echo '      <tr>', "\n";
     echo '          <td class="serverStatusLabel">Virtual memory used:</td>', "\n";
     echo '          <td class="serverStatusValue">', $this->virtualMemoryUsed / 1024, ' KB</td>', "\n";
     echo '      </tr>', "\n";
     echo '  </table>', "\n";
 }
开发者ID:kanbang,项目名称:Colt,代码行数:71,代码来源:viewserverstatusbottom.php


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