Exemplo n.º 1
0
function FormatTimeSpecial($ut)
{
    if (is_null($ut) or strlen($ut) == 0) {
        return "";
    }
    return FormatTime($ut);
}
Exemplo n.º 2
0
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);
}
Exemplo n.º 3
0
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);
}
Exemplo n.º 4
0
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;
}
Exemplo n.º 5
0
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;
}
Exemplo n.º 6
0
    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>
Exemplo n.º 7
0
    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 
}
Exemplo n.º 8
0
# 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>";
Exemplo n.º 9
0
                $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>
Exemplo n.º 10
0
    $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");
Exemplo n.º 11
0
<?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>
Exemplo n.º 12
0
 static function FriendlyDateFromUnixTime($unixtime)
 {
     return FormatTime($unixtime);
 }
Exemplo n.º 13
0
 function Display()
 {
     $port = $this->port;
     $HTML = '';
     #		$HTML = $this->JavascriptInclude();
     $MarkedAsNew = "N";
     $HTML .= "<DL>\n";
     $HTML .= "<DT>";
     $HTML .= port_display_WATCH_LIST_ADD_REMOVE;
     $HTML .= '<BIG><B>';
     if ($this->LinkToPort) {
         $HTML .= $this->LinkToPort();
     } else {
         $HTML .= $port->port;
     }
     $HTML .= "</B></BIG>";
     // description
     if ($port->short_description && ($this->ShowShortDescription || $this->ShowEverything)) {
         $HTML .= ' <span class="fp_description_short">' . htmlify(_forDisplay($port->short_description)) . '</span>';
         $HTML .= "<br>\n";
     }
     $HTML .= "<b>";
     $PackageVersion = freshports_PackageVersion($port->{'version'}, $port->{'revision'}, $port->{'epoch'});
     if (strlen($PackageVersion) > 0) {
         $HTML .= ' ' . $PackageVersion;
     }
     if (isset($port->category_looking_at)) {
         if ($port->category_looking_at != $port->category) {
             $HTML .= '<sup>*</sup>';
         }
     }
     $HTML .= "</b>";
     if ($this->ShowEverything || $this->ShowCategory) {
         $HTML .= ' <A HREF="/' . $port->category . '/" TITLE="The category for this port">' . $port->category . '</A>';
     }
     // indicate if this port has been removed from cvs
     if ($port->IsDeleted()) {
         $HTML .= " " . freshports_Deleted_Icon_Link() . "\n";
     }
     // indicate if this port needs refreshing from CVS
     if ($port->{'needs_refresh'}) {
         $HTML .= " " . freshports_Refresh_Icon_Link() . "\n";
     }
     if ($port->{'date_added'} > Time() - 3600 * 24 * $this->DaysMarkedAsNew) {
         $MarkedAsNew = "Y";
         $HTML .= freshports_New_Icon() . "\n";
     }
     if ($this->ShowEverything || $this->ShowWatchListCount) {
         $HTML .= ' ' . freshPorts_WatchListCount_Icon_Link() . '=' . $port->WatchListCount();
     }
     $HTML .= ' ' . freshports_Search_Depends_All($port->category . '/' . $port->port);
     # if this port is, or every has been, vulnerable, display the right skull
     # and a link to the list of all such vulnerabilities
     if ($port->IsVulnerable() || $port->WasVulnerable()) {
         $HTML .= ' ' . freshports_VuXML_Link($port->package_name, $port->IsVulnerable());
     }
     # search for bugs related to this port
     $HTML .= ' ' . freshports_Search_For_Bugs($port->category . '/' . $port->port);
     # report a bug related to this port
     $HTML .= ' ' . freshports_Report_A_Bug($port->category . '/' . $port->port);
     $HTML .= "</DT>\n<DD>";
     # show forbidden and broken
     if ($port->forbidden) {
         $HTML .= freshports_Forbidden_Icon_Link($port->forbidden) . ' FORBIDDEN: ' . htmlify(_forDisplay($port->forbidden)) . "<br>";
     }
     if ($port->broken) {
         $HTML .= freshports_Broken_Icon_Link($port->broken) . ' BROKEN: ' . htmlify(_forDisplay($port->broken)) . "<br>";
     }
     if ($port->deprecated) {
         $HTML .= freshports_Deprecated_Icon_Link($port->deprecated) . ' DEPRECATED: ' . htmlify(_forDisplay($port->deprecated)) . "<br>";
     }
     if ($port->expiration_date) {
         if (date('Y-m-d') >= $port->expiration_date) {
             $HTML .= freshports_Expired_Icon_Link($port->expiration_date) . ' This port expired on: ' . $port->expiration_date . '<br>';
         } else {
             $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);
     if ($port->categories) {
         // remove the primary category and remove any double spaces or trailing/leading spaces
         // this ensures that explode gives us the right stuff
         if (isset($port->category_looking_at)) {
             $CategoryToRemove = $port->category_looking_at;
         } else {
             $CategoryToRemove = $port->category;
         }
         $Categories = str_replace($CategoryToRemove, '', $port->categories);
         $Categories = str_replace('  ', ' ', $Categories);
         $Categories = trim($Categories);
         if ($Categories) {
             $HTML .= "<b>Also Listed In:</b> ";
             $CategoriesArray = explode(" ", $Categories);
             $Count = count($CategoriesArray);
             for ($i = 0; $i < $Count; $i++) {
                 $Category = $CategoriesArray[$i];
                 #					$CategoryID = freshports_CategoryIDFromCategory($Category, $this->db);
                 #					if ($CategoryID) {
                 #						// this is a real category
                 $HTML .= '<a href="/' . $Category . '/">' . $Category . '</a>';
                 #					} else {
                 #						$HTML .= $Category;
                 #					}
                 if ($i < $Count - 1) {
                     $HTML .= " ";
                 }
             }
             $HTML .= "<br>\n";
         }
     }
     $HTML .= '<b>License:</b> ';
     if ($port->license) {
         $HTML .= htmlentities($port->license);
     } else {
         $HTML .= 'not specified in port';
     }
     $HTML .= "<br>\n";
     # The ad goes here
     if ($this->ShowAd || $this->ShowEverything) {
         $HTML .= port_display_AD;
     }
     if ($this->ShowDescriptionLong || $this->ShowEverything) {
         $HTML .= '<PRE CLASS="code">' . htmlify(_forDisplay($port->long_description)) . '</PRE>';
     }
     if ($this->ShowChangesLink || $this->ShowEverything) {
         # we want something like
         # http://svn.freebsd.org/ports/head/x11-wm/awesome/
         $HTML .= '<a href="http://' . $port->svn_hostname . $port->element_pathname . '/">SVNWeb</a>';
     }
     if ($port->PackageExists() && ($this->ShowPackageLink || $this->ShowEverything)) {
         // package
         $HTML .= ' <b>:</b> ';
         $HTML .= '<A HREF="' . FRESHPORTS_FREEBSD_FTP_URL . '/' . freshports_PackageVersion($port->version, $port->revision, $port->epoch);
         $HTML .= '.tgz">Package</A>';
     }
     if ($port->homepage && ($this->ShowHomepageLink || $this->ShowEverything)) {
         $HTML .= ' <b>:</b> ';
         $HTML .= '<a HREF="' . _forDisplay($port->homepage) . '" TITLE="Homepage for this port">Homepage</a>';
     }
     if (defined('DISTFILESSURVEYSHOW') && ($this->ShowDistfilesSurveyLink || $this->ShowEverything)) {
         $HTML .= ' <b>:</b> ' . freshports_DistFilesSurveyURL($port->category, $port->port);
     }
     if (defined('PORTSMONSHOW') && ($this->ShowPortsMonLink || $this->ShowEverything)) {
         $HTML .= ' <b>:</b> ' . freshports_PortsMonitorURL($port->category, $port->port);
     }
     if ($this->ShowEverything || $this->ShowMasterSlave) {
         #
         # Display our master port
         #
         $MasterSlave = new MasterSlave($port->dbh);
         $NumRows = $MasterSlave->FetchByMaster($port->category . '/' . $port->port);
         if ($port->IsSlavePort() || $NumRows > 0) {
             $HTML .= "\n<hr>\n";
         }
         if ($port->IsSlavePort()) {
             $HTML .= '<dl><dt><b>Master port:</b> ';
             list($MyCategory, $MyPort) = explode('/', $port->master_port);
             $HTML .= freshports_link_to_port($MyCategory, $MyPort);
             $HTML .= "</dt>\n";
             $HTML .= "</dl>\n";
         }
         #
         # Display our slave ports
         #
         if ($NumRows > 0) {
             $HTML .= '<span class="slaveports">Slave ports</span>' . "\n" . '<ol class="slaveports" id="slaveports">';
             for ($i = 0; $i < $NumRows; $i++) {
                 $MasterSlave->FetchNth($i);
                 $HTML .= '<li>' . freshports_link_to_port($MasterSlave->slave_category_name, $MasterSlave->slave_port_name) . '</li>';
             }
             $HTML .= "</ol>\n";
         }
     }
     if ($this->ShowDepends || $this->ShowEverything) {
         if ($port->depends_build || $port->depends_run || $port->depends_lib) {
             $HTML .= '<hr><p><big>NOTE: FreshPorts displays only information on required and default dependencies.  Optional dependencies are not covered.</big></p>';
         }
         if ($port->depends_build) {
             $HTML .= '<span class="required">Build dependencies:</span>' . "\n" . '<ol class="required" id="requiredtobuild">';
             $HTML .= freshports_depends_links($this->db, $port->depends_build);
             $HTML .= "\n</ol>\n";
         }
         if ($port->depends_run) {
             $HTML .= '<span class="required">Runtime dependencies:</span>' . "\n" . '<ol class="required" id="requiredtorun">';
             $HTML .= freshports_depends_links($this->db, $port->depends_run);
             $HTML .= "\n</ol>\n";
         }
         if ($port->depends_lib) {
             $HTML .= '<span class="required">Library dependencies:</span>' . "\n" . '<ol class="required" id="requiredlibraries">';
             $HTML .= freshports_depends_links($this->db, $port->depends_lib);
             $HTML .= "\n</ol>\n";
         }
         if ($port->fetch_depends) {
             $HTML .= '<span class="required">Fetch dependencies:</span>' . "\n" . '<ol class="required" id="requiredfetches">';
             $HTML .= freshports_depends_links($this->db, $port->fetch_depends);
             $HTML .= "\n</ol>\n";
         }
         if ($port->patch_depends) {
             $HTML .= '<span class="required">Patch dependencies:</span>' . "\n" . '<ol class="required" id="requiredpatches">';
             $HTML .= freshports_depends_links($this->db, $port->patch_depends);
             $HTML .= "\n</ol>\n";
         }
         if ($port->extract_depends) {
             $HTML .= '<span class="required">Extract dependencies:</span>' . "\n" . '<ol class="required" id="requiredextracts">';
             $HTML .= freshports_depends_links($this->db, $port->extract_depends);
             $HTML .= "\n</ol>\n";
         }
         # XXX when adding new depends above, be sure to update the array in ShowDependencies()
         $HTML .= $this->ShowDependencies($port);
     }
     # only show if we're meant to show, and if the port has not been deleted.
     if ($this->ShowPackageLink || $this->ShowEverything) {
         $HTML .= "\n<hr>\n";
         if ($port->IsDeleted()) {
             $HTML .= '<p>No installation instructions: this port has been deleted.</p>';
             $HTML .= '<p>The package name of this deleted port was: <code class="code">' . $port->latest_link . '</code></p>';
         } else {
             $HTML .= '<p><b>To install <a href="/faq.php#port" TITLE="what is a port?">the port</a>:</b> <code class="code">cd /usr/ports/' . $port->category . '/' . $port->port . '/ && make install clean</code><br>';
             if (isset($port->no_package) && $port->no_package != '') {
                 $HTML .= '<p><b>No <a href="/faq.php#package" TITLE="what is a package?">package</a> is available:</b> ' . $port->no_package . '</p>';
             } else {
                 if ($port->forbidden || $port->broken || $port->ignore || $port->restricted) {
                     $HTML .= '<p><b>A <a href="/faq.php#package" TITLE="what is a package?">package</a> is not available for ports marked as: Forbidden / Broken / Ignore / Restricted</b></p>';
                 } else {
                     $HTML .= '<b>To add the <a href="/faq.php#package" TITLE="what is a package?">package</a>:</b> <code class="code">pkg install ' . $port->category . '/' . $port->port . '</code></p>';
                 }
             }
         }
         $HTML .= "\n<hr>\n";
     }
     if ($this->ShowDescriptionShort && ($this->ShowDescriptionLink || $this->ShowEverything)) {
         // Long description
         $HTML .= '<A HREF="/' . $port->category . '/' . $port->port . '/">Description</a>';
         $HTML .= ' <b>:</b> ';
     }
     if ($this->ShowEverything) {
         $HTML .= "<b>Configuration Options</b>\n<pre>";
         if ($port->showconfig) {
             $HTML .= $port->showconfig;
         } else {
             $HTML .= '     No options to configure';
         }
         $HTML .= "</pre>\n<hr>\n";
     }
     if ($this->ShowEverything && $port->uses) {
         $HTML .= "<b>USES:</b>\n<pre>";
         $HTML .= $port->uses;
         $HTML .= "</pre>\n<hr>\n";
     }
     if ($this->ShowEverything || $this->ShowMasterSites) {
         $HTML .= '<b>Master Sites:</b>' . "\n" . '<ol class="mastersites" id="mastersites">' . "\n";
         $MasterSites = explode(' ', $port->master_sites);
         asort($MasterSites);
         foreach ($MasterSites as $Site) {
             $HTML .= '<li>' . htmlify(_forDisplay($Site)) . "</li>\n";
         }
         $HTML .= "</ol>\n";
         #			$HTML .= '<br>';
     }
     #		$HTML .= "\n<hr>\n";
     $HTML .= "\n</DD>\n";
     $HTML .= "</DL>\n";
     return $HTML;
 }
Exemplo n.º 14
0
function ft($time)
{
    return FormatTime($time);
}
Exemplo n.º 15
0
 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";
 }
Exemplo n.º 16
0
$configuracion_moneda_form = new DAOFormComponent(new Moneda());
$configuracion_moneda_form->hideField(array("id_moneda", "nombre", "activa"));
$configuracion_moneda_form->addField("simbolo", "Moneda", "text", $empresa["contabilidad"]["moneda_base"]["simbolo"]);
$configuracion_moneda_form->setEditable(false);
$page->addComponent($configuracion_moneda_form);
$page->addComponent("<br />");
$page->addComponent(new TitleComponent("Ejercicio", 3));
$configuracion_ejercicio_form = new FormComponent();
$configuracion_ejercicio_form->addField("ejercicio", "A&#241;o del Ejercicio", "text", $empresa["contabilidad"]["ejercicio"]["anio"], "ejercicio");
$configuracion_ejercicio_form->setEditable(false);
$page->addComponent($configuracion_ejercicio_form);
$page->addComponent(new TitleComponent("Periodo", 3));
$configuracion_periodo_form = new FormComponent();
$configuracion_periodo_form->addField("periodo_actual", "Periodo Actual", "text", $empresa["contabilidad"]["ejercicio"]["periodo"], "periodo_actual");
$configuracion_periodo_form->addField("periodo_inicio", "Inicio", "text", FormatTime($empresa["contabilidad"]["ejercicio"]["periodo_inicio"]), "periodo_inicio");
$configuracion_periodo_form->addField("periodo_fin", "Fin", "text", FormatTime($empresa["contabilidad"]["ejercicio"]["periodo_fin"]), "periodo_fin");
$configuracion_periodo_form->setEditable(false);
$page->addComponent($configuracion_periodo_form);
$page->addComponent(new TitleComponent("Impuestos", 2));
$impuestos_compra_form = new FormComponent();
$impuestos_compra = array();
foreach ($empresa["impuestos_compra"] as $impuesto) {
    array_push($impuestos_compra, array("id" => $impuesto->getIdImpuesto(), "caption" => $impuesto->getNombre()));
}
$impuestos_venta = array();
foreach ($empresa["impuestos_venta"] as $impuesto) {
    array_push($impuestos_venta, array("id" => $impuesto->getIdImpuesto(), "caption" => $impuesto->getNombre()));
}
$impuestos_compra_form->addField('impuestos_compra', 'Impuestos Compra', 'listbox', $impuestos_compra, 'impuestos_compra');
$impuestos_compra_form->addField('impuestos_venta', 'Impuestos Venta', 'listbox', $impuestos_venta, 'impuestos_venta');
$page->addComponent($impuestos_compra_form);
Exemplo n.º 17
0
$page->addComponent(new TitleComponent($esta_sucursal->getDescripcion(), 2));
/*
 * Tab Detalles
 */
$page->nextTab("Detalles");
$esta_direccion = DireccionDAO::getByPK($esta_sucursal->getIdDireccion());
if (is_null($esta_direccion)) {
    $esta_direccion = new Direccion();
}
$form = new DAOFormComponent($esta_sucursal);
$form->setEditable(false);
$form->hideField(array("id_sucursal", "id_direccion", "id_gerente", "fecha_apertura", "fecha_baja"));
$form->createComboBoxJoin("id_tarifa", "nombre", TarifaDAO::getAll(), $esta_sucursal->getIdTarifa());
$form->setCaption("id_tarifa", "Tarifa");
$form->addField("fecha_apertura_format", "Fecha Apertura", "text", FormatTime($esta_sucursal->getFechaApertura()), "fecha_apertura_format");
$form->addField("fecha_baja_format", "Fecha Baja", "text", FormatTime($esta_sucursal->getFechaBaja()), "fecha_baja_format");
$form->createComboBoxJoin("activa", "activa", array(array("id" => false, "caption" => "No"), array("id" => true, "caption" => "S&iacute;")), $esta_sucursal->getActiva());
$page->addComponent($form);
if (!is_null($esta_sucursal->getIdDireccion())) {
    $page->addComponent(new TitleComponent("Direcci&oacute;n", 3));
    $form = new DAOFormComponent($esta_direccion);
    $form->setEditable(false);
    $form->hideField(array("id_direccion", "id_usuario_ultima_modificacion"));
    $form->createComboBoxJoin("id_ciudad", "nombre", CiudadDAO::getAll(), $esta_direccion->getIdCiudad());
    $page->addComponent($form);
}
/*
 * Tab Cajas
 */
$page->nextTab("Cajas");
$page->addComponent(new TitleComponent("Cajas", 3));
Exemplo n.º 18
0
    $link_to_customer = "<span style='color:gray'>este cliente ya no existe</span>.";
}
$page->addComponent(new TitleComponent("Orden de servicio " . $_GET["oid"] . " para " . $link_to_customer, 2));
//
// Menu de opciones
//
$page->nextTab("General");
$menu = new MenuComponent();
$imp = new MenuItem(" <img src='../../media/iconos/printer.png'> Imprimir", null);
$imp->addOnClick("_p", "function _p(){ window.open('servicios.detalle.orden.impresion.php?oid=" . $_GET["oid"] . "'); }");
$menu->addMenuItem($imp);
$page->addComponent($menu);
//
// Forma de producto
//
$esta_orden->setFechaOrden(FormatTime($esta_orden->getFechaOrden()));
$a = $esta_orden->getIdUsuarioAsignado();
$asignado = UsuarioDAO::getByPK($a);
if (!is_null($asignado)) {
    $esta_orden->setIdUsuarioAsignado($asignado->getNombre());
} else {
    $esta_orden->setIdUsuarioAsignado("<img src='../../media/iconos/user_delete.png'> Nadie esta asignado");
}
//$form->createComboBoxJoin("id_servicio", "nombre_servicio", ServicioDAO::getAll(), $esta_orden->getIdServicio());
//$form->createComboBoxJoin("id_usuario", "nombre", UsuarioDAO::getAll(), $esta_orden->getIdUsuario());
$servicio = ServicioDAO::getByPK($esta_orden->getIdServicio());
$esta_orden->setIdServicio($servicio->getNombreServicio());
$agente = UsuarioDAO::getByPK($esta_orden->getIdUsuario());
$esta_orden->setIdUsuario($agente->getNombre());
$esta_orden->setPrecio(FormatMoney($esta_orden->getPrecio()));
$form = new DAOFormComponent($esta_orden);
Exemplo n.º 19
0
    }
    ?>
				</span>
				<span class="item-date float-right">
					<a href="<?php 
    echo $Config['WebsitePath'];
    ?>
/u/<?php 
    echo $Topic['UserName'];
    ?>
" target="_blank"><?php 
    echo $Topic['UserName'];
    ?>
</a>&nbsp;•&nbsp;
					<?php 
    echo FormatTime($Topic['LastTime']);
    if ($Topic['Replies']) {
        ?>
&nbsp;•&nbsp;<?php 
        echo $Lang['Last_Reply_From'];
        ?>
&nbsp;<a href="<?php 
        echo $Config['WebsitePath'];
        ?>
/u/<?php 
        echo $Topic['LastName'];
        ?>
" target="_blank"><?php 
        echo $Topic['LastName'];
        ?>
</a>
Exemplo n.º 20
0
<?php

# Maps
#
# ID
# Name
# Description
# Image
# Spawn
include 'mysql.php';
include 'functions.php';
session_start();
echo "Welcome to the lobby.<hr />";
echo "<table>";
$MapQuery = mysql_query("Select `ID`, `Name`, `URL`,  `Description`\r\n\t\t\t\t\t\t\tfrom `Maps`");
while (list($ID, $Name, $URL, $Description) = mysql_fetch_array($MapQuery)) {
    $Activity = mysql_query("Select `Active`\r\n\t\t\t\t\t\t\t\tfrom `Players`\r\n\t\t\t\t\t\t\t\twhere `Map`='{$ID}'\r\n\t\t\t\t\t\t\t\torder by `Active`\r\n\t\t\t\t\t\t\t\tdesc limit 1");
    list($ActiveTime) = mysql_fetch_array($Activity);
    $ActiveTime = FormatTime($ActiveTime);
    echo "<tr><td style='width:111px;'> <a href='{$URL}'>{$Name}</a><br />{$ActiveTime} </td><td> {$Description} </td></tr>";
}
echo "</table>";
Exemplo n.º 21
0
    if ($esta_compra->getTipoDeCompra() == "credito") {
        $menu->addItem("Abonar a esta compra", "cargos_y_abonos.nuevo.abono.php?cid=" . $_GET["cid"] . "&did=" . $esta_compra->getIdVendedorCompra());
    }
    $btn_eliminar = new MenuItem("Cancelar esta compra", null);
    $btn_eliminar->addApiCall("api/compras/cancelar", "GET");
    $btn_eliminar->onApiCallSuccessRedirect("compras.lista.php");
    $btn_eliminar->addName("cancelar");
    $funcion_eliminar = " function eliminar_empresa(btn){" . "if(btn == 'yes')" . "{" . "var p = {};" . "p.id_compra = " . $_GET["cid"] . ";" . "sendToApi_cancelar(p);" . "}" . "}" . "      " . "function confirmar(){" . " Ext.MessageBox.confirm('Desactivar', 'Desea cancelar esta compra?', eliminar_empresa );" . "}";
    $btn_eliminar->addOnClick("confirmar", $funcion_eliminar);
    $menu->addMenuItem($btn_eliminar);
    $page->addComponent($menu);
}
//
// Forma de producto
//
$esta_compra->setFecha(FormatTime($esta_compra->getFecha()));
$esta_compra->setImpuesto(FormatMoney($esta_compra->getImpuesto()));
$esta_compra->setDescuento(FormatMoney($esta_compra->getDescuento()));
$esta_compra->setSubtotal(FormatMoney($esta_compra->getSubtotal()));
$esta_compra->setTotal(FormatMoney($esta_compra->getTotal()));
$form = new DAOFormComponent($esta_compra);
$form->setEditable(false);
$form->hideField(array("id_compra", "id_caja", "id_compra_caja", "id_vendedor_compra", "id_sucursal", "id_usuario", "saldo", "retencion", "id_empresa"));
$page->addComponent($form);
$page->addComponent(new TitleComponent("Productos de esta compra", 3));
$tabla = new TableComponent(array("id_producto" => "Producto", "cantidad" => "Cantidad", "id_unidad" => "Unidad", "precio" => "Precio Unitario", "impuesto" => "Importe"), CompraProductoDAO::search(new CompraProducto(array("id_compra" => $_GET["cid"]))));
function cImporte($foo, $obj)
{
    return FormatMoney($obj["precio"] * $obj["cantidad"]);
}
function toReadableUnidad($v, $obj)
Exemplo n.º 22
0
			<div>
				<table cellpadding="5" cellspacing="8" border="0" width="100%" class="fs14"><tbody>
<?php 
foreach ($CurUserOauthData as $Value) {
    ?>
					<tr>
						<td width="180" align="right"><img src="<?php 
    echo $Config['WebsitePath'] . $OauthData[$Value['AppID']]['LogoUrl'];
    ?>
" /></td>
						<td width="auto" align="left" class="grey">
								<?php 
    echo $Value['AppUserName'] ? $Value['AppUserName'] : '******';
    ?>
&nbsp;(<?php 
    echo FormatTime($Value['Time']);
    ?>
)
						</td>
					</tr>
<?php 
}
foreach ($OauthData as $Value) {
    ?>
					<tr>
						<td width="180" align="right"><img src="<?php 
    echo $Config['WebsitePath'] . $Value['LogoUrl'];
    ?>
" /></td>
						<td width="auto" align="left">
							<a href="<?php 
Exemplo n.º 23
0
		<div class="carbonforum-avatar">
			<a href="<?php 
    echo $Config['WebsitePath'] . '/u/' . urlencode($Post['UserName']);
    ?>
">
				<?php 
    echo GetAvatar($Post['UserID'], $Post['UserName'], 'small');
    ?>
			</a>
		</div>
		<div class="carbonforum-name"><?php 
    echo $Post['UserName'];
    ?>
</div>
		<div class="carbonforum-date"><?php 
    echo FormatTime($Post['PostTime']);
    ?>
</div>
	</div>
	<div class="card-header">
		<a href="<?php 
    echo $Config['WebsitePath'];
    ?>
/t/<?php 
    echo $Post['TopicID'];
    ?>
"><?php 
    echo $Post['IsTopic'] ? $Lang['Created_Topic'] : $Lang['Replied_Topic'];
    ?>
&nbsp;<?php 
    echo $Post['Subject'];
Exemplo n.º 24
-1
 function CreateHTML()
 {
     global $freshports_CommitMsgMaxNumOfLinesToShow;
     $Debug = 0;
     if (!$this->result) {
         syslog(LOG_ERR, __FILE__ . '::' . __LINE__ . ': no result set supplied');
         die("read from database failed");
         exit;
     }
     $NumRows = pg_numrows($this->result);
     if ($this->Debug) {
         echo __FILE__ . ':' . __LINE__ . " Number of rows = {$NumRows}<br>\n";
     }
     if (!$NumRows) {
         $this->HTML = "<TR><TD>\n<P>Sorry, nothing found in the database....</P>\n</td></tr>\n";
         return $this->HTML;
     }
     # if we have a UserID, but no flagged commits, grab them
     #
     if ($this->UserID && !isset($this->FlaggedCommits)) {
         require_once $_SERVER['DOCUMENT_ROOT'] . '/../classes/commit_flag.php';
         $FlaggedCommits = new CommitFlag($this->dbh);
         $NumFlaggedCommits = $FlaggedCommits->Fetch($this->UserID);
         for ($i = 0; $i < $NumFlaggedCommits; $i++) {
             $FlaggedCommits->FetchNth($i);
             $this->FlaggedCommits[$FlaggedCommits->commit_log_id] = $FlaggedCommits->commit_log_id;
             if ($this->Debug) {
                 echo "fetching record # {$i} -> {$FlaggedCommits->commit_log_id}<br>";
             }
         }
     }
     $GlobalHideLastChange = "N";
     $this->HTML = "";
     # leave it all empty as a comparison point
     $PreviousCommit = new CommitRecord();
     $NumberOfPortsInThisCommit = 0;
     $MaxNumberPortsToShow = 10;
     $TooManyPorts = false;
     # we might not show all of a commit, just for the really big ones.
     for ($i = 0; $i < $NumRows; $i++) {
         $myrow = pg_fetch_array($this->result, $i);
         if ($Debug) {
             echo 'processing row ' . $i . ' ' . $myrow['commit_log_id'] . ' ' . $myrow['message_id'] . "<br>\n";
         }
         unset($mycommit);
         $mycommit = new CommitRecord();
         $mycommit->PopulateValues($myrow);
         // OK, while we have the log change log, let's put the port details here.
         if ($mycommit->commit_log_id != $PreviousCommit->commit_log_id) {
             if ($NumberOfPortsInThisCommit > $MaxNumberPortsToShow && !$this->ShowAllPorts) {
                 $this->HTML .= '<BR>' . freshports_MorePortsToShow($PreviousCommit->message_id, $NumberOfPortsInThisCommit, $MaxNumberPortsToShow);
             }
             $TooManyPorts = false;
             if ($i > 0) {
                 $this->HTML .= "\n<BLOCKQUOTE>";
                 $this->HTML .= freshports_CommitDescriptionPrint($PreviousCommit->commit_description, $PreviousCommit->encoding_losses, $Lines, freshports_MoreCommitMsgToShow($PreviousCommit->message_id, $Lines));
                 # close off the previous commit first
                 $this->HTML .= "\n</BLOCKQUOTE>\n</TD></TR>\n\n\n";
             }
             # count the number of ports in this commit.
             # first time into the loop, this will be executed.
             $NumberOfPortsInThisCommit = 0;
             $MaxNumberPortsToShow = 10;
             if ($mycommit->commit_date != $PreviousCommit->commit_date) {
                 $this->HTML .= '<TR><TD COLSPAN="3" BGCOLOR="' . BACKGROUND_COLOUR . '" HEIGHT="0">' . "\n";
                 $this->HTML .= '   <FONT COLOR="#FFFFFF"><BIG>' . FormatTime($mycommit->commit_date, 0, "D, j M Y") . '</BIG></FONT>' . "\n";
                 $this->HTML .= '</TD></TR>' . "\n\n";
             }
             global $freshports_mail_archive;
             $this->HTML .= "<TR><TD>\n";
             $this->HTML .= '<SMALL>';
             $this->HTML .= '[ ' . $mycommit->commit_time . ' ' . freshports_CommitterEmailLink($mycommit->committer) . ' ]';
             $this->HTML .= '</SMALL>';
             $this->HTML .= '&nbsp;';
             $this->HTML .= freshports_Email_Link($mycommit->message_id);
             $this->HTML .= '&nbsp;';
             if ($this->UserID) {
                 if (isset($this->FlaggedCommits[$mycommit->commit_log_id])) {
                     $this->HTML .= freshports_Commit_Flagged_Link($mycommit->message_id);
                 } else {
                     $this->HTML .= freshports_Commit_Flagged_Not_Link($mycommit->message_id);
                 }
             }
             if ($mycommit->EncodingLosses()) {
                 $this->HTML .= '&nbsp;' . freshports_Encoding_Errors();
             }
             if ($mycommit->stf_message != '') {
                 $this->HTML .= '&nbsp; ' . freshports_SanityTestFailure_Link($mycommit->message_id);
             }
             #        			echo '<pre>' . print_r($mycommit, true) . '</pre>';
             if ($mycommit->svn_revision != '') {
                 $this->HTML .= '&nbsp; ' . freshports_svnweb_ChangeSet_Link($mycommit->svn_revision, $mycommit->svn_hostname, $mycommit->path_to_repo);
             }
             $this->HTML .= "<br>\n";
         }
         $NumberOfPortsInThisCommit++;
         if ($NumberOfPortsInThisCommit > $MaxNumberPortsToShow && !$this->ShowAllPorts) {
             $TooManyPorts = true;
         }
         if (!$TooManyPorts) {
             if (isset($mycommit->category) && $mycommit->category != '') {
                 if ($this->UserID) {
                     if ($mycommit->watch) {
                         $this->HTML .= ' ' . freshports_Watch_Link_Remove($this->WatchListAsk, $mycommit->watch, $mycommit->element_id) . ' ';
                     } else {
                         $this->HTML .= ' ' . freshports_Watch_Link_Add($this->WatchListAsk, $mycommit->watch, $mycommit->element_id) . ' ';
                     }
                 }
                 $this->HTML .= '<BIG><B>';
                 $this->HTML .= '<A HREF="/' . $mycommit->category . '/' . $mycommit->port . '/">';
                 $this->HTML .= $mycommit->port;
                 $this->HTML .= '</A>';
                 $PackageVersion = freshports_PackageVersion($mycommit->version, $mycommit->revision, $mycommit->epoch);
                 if (strlen($PackageVersion) > 0) {
                     $this->HTML .= ' ' . $PackageVersion;
                 }
                 $this->HTML .= "</B></BIG>\n";
                 $this->HTML .= '<A HREF="/' . $mycommit->category . '/">';
                 $this->HTML .= $mycommit->category . "</A>";
                 $this->HTML .= '&nbsp;';
                 // indicate if this port has been removed from cvs
                 if ($mycommit->status == "D") {
                     $this->HTML .= " " . freshports_Deleted_Icon_Link() . "\n";
                 }
                 // indicate if this port needs refreshing from CVS
                 if ($mycommit->needs_refresh) {
                     $this->HTML .= " " . freshports_Refresh_Icon_Link() . "\n";
                 }
                 if ($mycommit->date_added > Time() - 3600 * 24 * $this->DaysMarkedAsNew) {
                     $MarkedAsNew = "Y";
                     $this->HTML .= freshports_New_Icon() . "\n";
                 }
                 if ($mycommit->forbidden) {
                     $this->HTML .= ' ' . freshports_Forbidden_Icon_Link() . "\n";
                 }
                 if ($mycommit->broken) {
                     $this->HTML .= ' ' . freshports_Broken_Icon_Link() . "\n";
                 }
                 if ($mycommit->deprecated) {
                     $this->HTML .= ' ' . freshports_Deprecated_Icon_Link() . "\n";
                 }
                 if ($mycommit->expiration_date) {
                     if (date('Y-m-d') >= $mycommit->expiration_date) {
                         $this->HTML .= freshports_Expired_Icon_Link($mycommit->expiration_date) . "\n";
                     } else {
                         $this->HTML .= freshports_Expiration_Icon_Link($mycommit->expiration_date) . "\n";
                     }
                 }
                 if ($mycommit->ignore) {
                     $this->HTML .= ' ' . freshports_Ignore_Icon_Link() . "\n";
                 }
                 $this->HTML .= freshports_Commit_Link_Port($mycommit->message_id, $mycommit->category, $mycommit->port);
                 $this->HTML .= "&nbsp;";
                 if ($mycommit->vulnerable_current) {
                     $this->HTML .= '&nbsp;' . freshports_VuXML_Icon() . '&nbsp;';
                 } else {
                     if ($mycommit->vulnerable_past) {
                         $this->HTML .= '&nbsp;' . freshports_VuXML_Icon_Faded() . '&nbsp;';
                     }
                 }
                 if ($mycommit->restricted) {
                     $this->HTML .= freshports_Restricted_Icon_Link($mycommit->restricted) . '&nbsp;';
                 }
                 if ($mycommit->no_cdrom) {
                     $this->HTML .= freshports_No_CDROM_Icon_Link($mycommit->no_cdrom) . '&nbsp;';
                 }
                 if ($mycommit->is_interactive) {
                     $this->HTML .= freshports_Is_Interactive_Icon_Link($mycommit->is_interactive) . '&nbsp;';
                 }
             } else {
                 # This is a non-port element...
                 $this->HTML .= $mycommit->revision . ' ';
                 $this->HTML .= '<big><B>';
                 $PathName = preg_replace('|^/?ports/|', '', $mycommit->element_pathname);
                 #				echo "'$PathName' " . "'" . $mycommit->repo_name . "'";
                 switch ($mycommit->repo_name) {
                     case 'ports':
                         $PathName = preg_replace('|^head/|', '', $PathName);
                         break;
                 }
                 if ($PathName != $mycommit->element_pathname) {
                     $this->HTML .= '<a href="/' . str_replace('%2F', '/', urlencode($PathName)) . '">' . $PathName . '</a>';
                     $this->HTML .= "</B></BIG>\n";
                 } else {
                     $this->HTML .= '<a href="' . FRESHPORTS_FREEBSD_CVS_URL . $PathName . '#rev' . $mycommit->revision . '">' . $PathName . '</a>';
                     $this->HTML .= "</B></BIG>\n";
                 }
             }
             $this->HTML .= htmlify(_forDisplay($mycommit->short_description)) . "\n";
             $this->HTML .= "<BR>\n";
             global $freshports_CommitMsgMaxNumOfLinesToShow;
             if ($this->ShowEntireCommit) {
                 $Lines = 0;
             } else {
                 $Lines = $freshports_CommitMsgMaxNumOfLinesToShow;
             }
         }
         # !$TooManyPorts
         $PreviousCommit = $mycommit;
     }
     if ($NumberOfPortsInThisCommit > $MaxNumberPortsToShow && !$this->ShowAllPorts) {
         $this->HTML .= '<BR>' . freshports_MorePortsToShow($PreviousCommit->message_id, $NumberOfPortsInThisCommit, $MaxNumberPortsToShow);
     }
     $this->HTML .= "\n<BLOCKQUOTE>";
     $this->HTML .= freshports_CommitDescriptionPrint($PreviousCommit->commit_description, $PreviousCommit->encoding_losses, $Lines, freshports_MoreCommitMsgToShow($PreviousCommit->message_id, $Lines));
     # close off the last commit
     $this->HTML .= "\n</BLOCKQUOTE>\n</TD></TR>\n\n\n";
     unset($mycommit);
     return $this->HTML;
 }