예제 #1
0
function mkTable($headers, $rowdata)
{
    echo "\t\t<table>\n";
    printTableRow($headers, 'th');
    foreach ($rowdata as $currow) {
        printTableRow($currow);
    }
    echo "\t\t</table>\n";
}
예제 #2
0
			}
		</style>
	<?php 
$sql = "\r\n\t\tselect * from timetable \r\n\t\twhere compid = " . $_COOKIE['CompanyId'] . " \r\n\t\torder by timeid desc\r\n\t\t";
$rs = $conn->Execute($sql);
/*
$stmt = $dbh->prepare('select * from timetable where compid='.$_COOKIE['CompanyId'].' order by timeid desc');
$stmt->execute();
*/
print '<center>';
print '<table id="timelist" border=1 bordercolor="#DDDDDD" style="border-collapse: collapse;">';
$rowArray = array(0 => "Start Time", 1 => "Stop Time", 2 => "Duration", 3 => "Comment");
printTableRow($rowArray, "labels");
while (!$rs->EOF) {
    $rowArray = array(0 => formatDateForTimeclock($rs->fields['start']), 1 => formatDateForTimeclock($rs->fields['stop']), 2 => getDurationClockedIn($rs->fields['start'], $rs->fields['stop']), 3 => $rs->fields['comment']);
    printTableRow($rowArray);
    $rs->MoveNext();
}
/*
while ($row = $stmt->fetch()) {
	$rowArray = array (
		0 => formatDateForTimeclock($row['start']),
		1 => formatDateForTimeclock($row['stop']),
		2 => getDurationClockedIn($row['start'], $row['stop']),
		3 => $row['comment'],
	);
	printTableRow($rowArray);
}
*/
print '</table>';
print '</center>';
예제 #3
0
        $t['price'] = '<div>' . $products_price . '</div>';
        $t['disc'] = "<div>{$discount}%</div>";
        $t['vc'] = '<div>' . $vc_now . '</div>';
        $t['vcpct'] = "<div>{$vc_percent}%</div>";
        $t['margin'] = "<div>{$margin}" . '</div>';
        $t['age'] = '<div>' . $res['products_age'] . ' days</div>';
        $t['totalsold'] = '<div>' . $res['total_sold'] . '</div>';
        $t['lastsold'] = '<div>' . 'L30D=' . $res['sold_monthly_1'] . '<br/>L60D=' . $res['sold_monthly_2'] . '<br/>L90D=' . $res['sold_monthly_3'] . '</div>';
        $t['soldpw'] = '<div>' . $sales_monthly . '</div>';
        $t['soldpm'] = '<div>' . $sales_weekly . '</div>';
        $t['totalreturn'] = '<div>' . $res['total_returned'] . '</div>';
        $t['returnrate'] = "<div>{$returned_rate}%</div>";
        $t['totalsales'] = '<div>' . $total_sales . '</div>';
        $t['brand'] = '<div>' . $res['brand_name'] . '</div>';
        $tr_class = $n % 2 == 0 ? 'e' : 'o';
        $content = printTableRow($t, $tr_class);
        unset($pids[0]);
        $result = array();
        $result['npids'] = count($pids);
        $result['ids'] = implode(',', $pids);
        $result['n'] = $n;
        $result['content'] = $content;
        ajaxReturn($result);
    }
}
$content .= '<div></div>';
$npids = explode(',', $pids);
$n = count($npids);
$title = 'Products Analysis Display Results ( ' . $n . ' products )';
$javascript .= '
            $.ajaxSetup({cache: false});    //prevent caching that could make browser halted or hang
예제 #4
0
    </table>
</div>
</fieldset>
<fieldset>
<legend><h3>Voiture 2 - Optionnelle</h3></legend>
<div style="display:block;margin-top:10px">
    <table>
    <?php 
$car = $demande->getSecondCar();
if ($car->isValid()) {
    print "Pas de seconde voiture";
} else {
    printTableRow("Marque", $car->getModel());
    printTableRow("Couleur", $car->getColor());
    printTableRow("Annee", $car->getYear());
    printTableRow("Plaque", $car->getLicense());
}
?>
    </table>
</div>
</fieldset>
<?php 
function printTableRow($title, $value)
{
    print '<tr>
            <td style="width:250px">' . $title . ' </td>
            <td>' . $value . '</td>
          </tr>';
}
?>
</p>