Advertisement
Advertisement
| 08.25.2008 at 03:47PM PDT, ID: 23676876 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: |
<?php
include 'config.php';
include 'opendb.php';
//config
$per_page = 5;
// find number of elements and pages
$query = 'SELECT Count(*) `cnt` FROM `ap_form_1`';
$result = mysql_fetch_array(mysql_query($query));
$cnt = $result['cnt'];
$page_count = ceil(intval($cnt) / $per_page);
// find current page
$page = max(intval($_REQUEST['page']), 1);
// sort by name
$start = ($page - 1) * $per_page;
$query = "SELECT element_1 , DATE_FORMAT(`element_2`,'%m/%d/%Y') as TheElement_2, TIME_FORMAT(`element_14`,'%h:%i %p') as TheElement_14, element_15, element_16, element_17, element_8, element_9, element_10, element_11, element_13, element_12 FROM `ap_form_1` WHERE DATE_FORMAT(`element_2`,'%Y-%m-%d') > DATE_FORMAT(Now(),'%Y-%m-%d') ORDER BY `element_2` LIMIT $start, $per_page";
$result = mysql_query($query) or die("Error while executing " . $query . ": " . mysql_error() );
// fetch each result
while($row = mysql_fetch_assoc($result))
{
// print three lines for each row
if (strval($row['element_1']) !== '') echo "<span style=\"color: #000033; font-size: 10pt; font-weight: bold; font-variant: small-caps; padding-bottom: 5px\">{$row['element_1']}</span>";
echo "<br>";
if (strval($row['TheElement_2']) !== '') if (strval($row['TheElement_14']) !== '') echo "<span style=\"color: #FF3300; font-size:8pt\">FECHA: <b>{$row['TheElement_2']}</b> / HORA: <b>{$row['TheElement_14']}</b></span>";
echo "<br>";
if (strval($row['element_15']) !== '') echo "<span style=\"color: #660000; font-size:12px\"><b>Dirección: </b> {$row['element_15']}</span>";
echo "<br>";
if (strval($row['element_16']) !== '') if (strval($row['element_17']) !== '') echo "<span style=\"color: #660000; font-size:12px\"><b>{$row['element_16']} , {$row['element_17']}</b></span>";
echo "<br>";
if (strval($row['element_12']) !== '') echo "<span style=\"color: #000033; font-size: 12px\"><b>Contacto:</b> {$row['element_12']}</span>";
echo "<br>";
if (strval($row['element_8']) !== '') echo "<span style=\"color: #666666; font-variant: small-caps; font-size: 8pt\">Tel?fono: <b>{$row['element_8']}</b></span>";
echo "<br>";
if (strval($row['element_10']) !== '') echo "<a style=\"color: #666666; font-variant: small-caps; font-size: 8pt; font-weight: bold\" href=\"mailto:{$row['element_10']}\">{$row['element_10']}</a>";
echo "<br>";
if (strval($row['element_11']) !== '') echo "<a style=\"color: #666666; font-variant: small-caps; font-size: 8pt; font-weight: bold\" target=_blank href=\"{$row['element_11']}\">
{$row['element_11']}</a>";
echo "<br>";
if (strval($row['element_13']) !== '') echo "<span style=\"color: #000033; font-size: 10px\"><b>Costo: </b>$ {$row['element_13']}</span>";
echo "<br><br>";
}
include 'closedb.php';
?>
<hr />
<div style="font-family:Verdana; font-size:10pt; color:#999999">
<?php
echo "Página <b>$page</b> de <b>$page_count</b>, mostrando <b>$per_page</b> por página<br>";
if ($page > 1)
{
echo '<a href="EventosDCI.php?page='.($page-1).'">Anterior</a> ';
}
if ($page < $page_count)
{
echo '<a href="EventosDCI.php?page='.($page+1).'">Siguiente</a> ';
}
?>
</div>
|