Re: [chris] Using category num in URL
sorry - forgot I put password on the directory:
-----------------------------------
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
require_once "/home/jdgsi0/public_html/cmsAdmin/lib/viewer_functions.php";
list($productsRecords, $productsMetaData) = getRecords(array(
'tableName' => 'products',
));
list($productsBigRecords, $productsBigMetaData) = getRecords(array(
'tableName' => 'products',
'orderBy' => 'RAND()',
'limit' => '1',
));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/main_template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- InstanceEndEditable -->
<link href="../_css/main.css" rel="stylesheet" type="text/css" />
<script src="../AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<div id="header">
<div id="headerWrapper">
<div id="headerleft"><!-- InstanceBeginEditable name="Headerleft" --><?php echo @$_GET['category']; ?><!-- InstanceEndEditable --></div>
<div id="headerright">Service Hotline 1-800-728-8053</div>
</div>
</div>
<div id="contentWrapper">
<div id="contentLeft"><table id="contentLefttable"><tr><td id="contentLefttabletd"><!-- InstanceBeginEditable name="contentLeft" --> <!-- STEP 2a: Display Uploads for field 'lgimage' (Paste this anywhere inside STEP2 to display uploads) -->
<!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
<?php foreach ($productsBigRecords as $record): ?>
<?php foreach ($record['lgimage'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt='' /><br/>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt='' /><br/>
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
<?php endif ?>
<?php endforeach ?>
<!-- STEP2a: /Display Uploads -->
<p><span class="productBigheader"><?php echo $record['title'] ?></span><br />
<?php echo $record['content'] ?></p>
<?php endforeach ?>
<!-- InstanceEndEditable --></td></tr></table></div>
<div id="contentRight"><table id="contentRighttable"><tr><td id="contentRighttabletd"><!-- InstanceBeginEditable name="contentRight" -->
<!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
<?php foreach ($productsRecords as $record): ?>
<div id="productTable"><?php foreach ($record['thimage'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" alt="" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" border="0" class="productimage" /><br/>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" alt="" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" class="productimage" /><br/>
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><?php endif ?>
<?php endforeach ?><h4><a href="<?php echo $record['_link'] ?>"><?php echo $record['title'] ?></a></h4></div>
<?php endforeach; ?>
<!-- InstanceEndEditable --></td></tr></table></div>
</div>
<div id="divider"></div>
<div id="navBar"><div id="navBarwrapper"><div id="menu"><!-- QuickMenu Structure [Menu 0] -->
<ul id="qm0" class="qmmc">
<li><a href="../index.php">Home</a></li>
<li><a href="../about_siouxland_scale/index.php">About Us</a></li>
<li><a class="qmparent" href="javascript:void(0);">Services</a>
<ul style="margin:-47px 0px 0px 21px;">
<li><a href="../siouxland_scale_services/certified_services.php">Certified Services/Calibration</a></li>
<li><a href="../siouxland_scale_services/installations.php">Installations</a></li>
<li><a href="../siouxland_scale_services/repairs.php">Repairs</a></li>
</ul></li>
<li><a class="qmparent" href="javascript:void(0);">Products</a>
<ul style="margin:-72px 0px 0px 21px;">
<li><a href="index.php?category=Bench Scales">Balances</a></li>
<li><a class="qmparent" href="javascript:void(0);">Scales</a>
<ul style="margin:-17px 0px 0px 31px;">
<li><a class="qmparent" href="javascript:void(0);">Truck Scales</a>
<ul style="margin:1px 0px 0px 35px;">
<li><a href="index.php?category=Truck Pit Scales">Pit Type</a></li>
<li><a href="index.php?category=Truck Above Ground Scales">Above Ground</a></li>
</ul></li>
<li><a href="index.php?category=">Railroad/Truck Scales</a></li>
<li><a href="floor_scales.php">Floor Scales</a></li>
<li><a href="bench_scales.php">Bench Scales</a></li>
<li><a href="cattle_scales.php">Cattle Scales</a></li>
<li><a href="grain_sample_scales.php">Grain Sample Scales</a></li>
<li><a href="counting_scales.php">Counting Scales</a></li>
<li><a href="remote_displays.php">Remote Displays</a></li>
</ul></li>
<li><a href="instrinsically_safe.php">Intrinsically Safe</a></li>
<li><a class="qmparent" href="javascript:void(0);">Printers</a>
<ul style="margin:-53px 0px 0px 31px;">
<li><a href="label.php">Label</a></li>
<li><a href="ticket.php">Ticket</a></li>
</ul></li>
<li><a href="batch_controllers.php">Batch Controllers</a></li>
<li><a href="indicators.php">Indicators</a></li>
<li><a href="bulk_weighing_systems.php">Bulk Weighing Systems</a></li>
</ul></li>
<li><a href="../siouxland_scale_news/index.php">News</a></li>
<li><a href="../contact_siouxland_scale/index.php">Contact Us</a></li>
<li class="qmclear"> </li></ul>
<!-- Create Menu Settings: (Menu ID, Is Vertical, Show Timer, Hide Timer, On Click (options: 'all' * 'all-always-open' * 'main' * 'lev2'), Right to Left, Horizontal Subs, Flush Left, Flush Top) -->
<script type="text/javascript">qm_create(0,true,0,0,'all',false,false,false,false);</script><!--[END-QM0]--></div></div></div>
</body>
<!-- InstanceEnd --></html>