Page MenuHomeIn-Portal Phabricator

globals.php
No OneTemporary

File Metadata

Created
Tue, May 20, 5:11 AM

globals.php

<?php
/**
* @version $Id: globals.php 11899 2009-07-14 11:11:59Z alex $
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.net/license/commercial/ for copyright notices and details.
*/
function bracket_comp($elem1, $elem2)
{
if( ($elem1['End']>$elem2['End'] || $elem1['End'] == -1) && $elem2['End'] != -1 )
{
return 1;
}
elseif ( ($elem1['End']<$elem2['End'] || $elem2['End'] == -1) && $elem1['End'] != -1 )
{
return -1;
}
else
{
return 0;
}
}
function bracket_id_sort($first_id, $second_id)
{
$first_abs = abs($first_id);
$second_abs = abs($second_id);
$first_sign = ($first_id == 0) ? 0 : $first_id / $first_abs;
$second_sign = ($second_id == 0) ? 0 : $second_id / $second_abs;
if($first_sign != $second_sign)
{
if($first_id > $second_id) {
$bigger =& $first_abs;
$smaller =& $second_abs;
}
else {
$bigger =& $second_abs;
$smaller =& $first_abs;
}
$smaller = $bigger + $smaller;
}
if($first_abs > $second_abs) {
return 1;
}
elseif ($first_abs < $second_abs)
{
return -1;
}
else
{
return 0;
}
}
?>

Event Timeline