'; $table_close = ' '; include('/home/foodand/includes/dbConnect.inc'); // Connect to MySQL if (!$dbcnx) { echo( " Unable to connect to the database server at this time. " ); exit(); } if (! @mysql_select_db("foodand_2", $dbcnx) ) { // connect to table (not necessary to specify the database ($dbcnx)) echo( " Unable to locate the database at this time. " ); exit(); } // 4 columns for 150px (25%), 3 columns for 250px (33%) $thmbs = 150; $cols = 4; $colw = "25%"; if (!isset($_GET['cat'])) { $_GET['cat'] = ''; } ?> 0) { shuffle($banners_array); if (count($banners_array) > 6) { $max = 6; } else { $max = count($banners_array); } echo ''; for ($i = 0; $i < $max; $i++) { echo "\n"; } echo ' ". $banners_array[$i] ." '; } // } ?> FREE Clipart Category Search: ---"); $result = mysql_query("SELECT Cat_ID, Title from Categories WHERE Cat_ID NOT IN (15, 16, 17, 18, 19, 20) ORDER BY Cat_ID ASC"); while ($myrow = mysql_fetch_array($result)) { echo("". $myrow["Title"]).""; } echo(""); ?> Keyword Search: To save the image, right click on it and select "Save Picture As" (Internet Explorer); "Save Image As" (Mozilla); or hold down the control button and click with mouse and select "Save Image As" (Mac), then choose a folder on your computer. \n"; $url = "http://www.foodandhealth.com/images/clipart/". urldecode($_GET["img"]); $size = getimagesize($url); $width = $size[0]; $height = $size[1]; echo " \n"; if ($_GET["cat"] == 1) { // display 3rd party info for January echo " Additional high resolution images and prints are available. \n"; } } elseif ( (isset($_GET["cat"]) && !in_array($_REQUEST["cat"], $hideCatArray) && ($_GET["cat"] != "")) || (isset($_GET["keyword"]) && ($_GET["keyword"] != ""))) { // begin category display / keyword search if (isset($_GET["cat"]) && ($_GET["cat"] != "")) { $sql = "SELECT FileName, Alt, Title FROM Images, Categories, Relations WHERE IMG_ID=I_ID AND Cat_ID=C_ID AND Cat_ID='". addslashes($_GET["cat"]) ."' ORDER BY IMG_ID DESC"; } elseif (isset($_GET["keyword"])) { $sql = "SELECT FileName, Alt FROM Images WHERE (Alt LIKE '%". addslashes($_GET["keyword"]) ."%') ORDER BY Alt ASC"; } else { exit(); } $result = mysql_query($sql); if (!$result) { echo(" Error performing query: ". mysql_error() ." "); exit(); } else { $i = 0; $txt = ""; $title = ''; while ($myrow = mysql_fetch_array($result)) { if (isset($_GET["cat"]) && ($_GET["cat"] != "")) { $title = $myrow["Title"]; } $alt = $myrow["Alt"]; // $width = $myrow["Width"]; // db settings are for fullsize image... // $height = $myrow["Height"]; $url = "http://www.foodandhealth.com/images/clipart_".$thmbs."/". $myrow["FileName"]; $size = getimagesize($url); $width = $size[0]; $height = $size[1]; if ($i == 0) { $txt .= "\n"; } $txt .= "\n"; $i++; if ($i == $cols) { $txt .= "\n"; $i = 0; } } echo " Click on a thumbnail to view the fullsize image. \n"; if (isset($_GET["cat"]) && ($_GET["cat"] != "") && ($_GET["cat"] <= 12)) { // filter out non-month categories echo " Free Clipart for $title (Click Here for $title Health Calendar) \n"; } else { if ($_GET["cat"] > 12) { $_GET["keyword"] = $title; // remap custom category name to keyword display } echo " Free Clipart search results for ". $_GET["keyword"] .": \n"; } echo "\n"; echo $txt; if ($i == 1) { echo "\n"; // pad 3 remaining cells } elseif ($i == 2) { echo "\n"; // pad 2 remaining cells } elseif ($i == 3) { echo "\n"; // pad 1 remaining cell } echo ""; echo "             \n"; } } else { // nothing selected -> display list of categories $result = mysql_query("SELECT Cat_ID, Title FROM Categories WHERE Cat_ID NOT IN (15, 16, 17, 18, 19, 20) ORDER BY Cat_ID ASC"); if (!$result) { echo(" Error performing query: " . mysql_error() . " "); exit(); } else { // $catnum = mysql_db_query(foodand_xfoodandhealth_2, "SELECT COUNT(*) AS num FROM Categories"); // $num = mysql_result($catnum,0,"num"); // $half = ($num / 2); // $i = 0; echo "\n"; echo "\n"; echo " \n"; echo " You may browse our free nutrition and food clipart in the following categories: "; while ($row = mysql_fetch_array($result)) { // if ($i > $half) { // echo (' '); // $i = "-1"; // } // $i++; $id = $row["Cat_ID"]; $category = $row["Title"]; echo "- $category "; } echo " \n"; echo "\n"; echo " \n"; echo "\n"; echo " \n"; echo "\n"; echo " \n"; echo "\n"; echo " \n"; } } ?>   Here is what our customers are saying: 
"Thanks again for providing this great service! : )" - Brunella A. Ibarrola MS, RD, CD-N, Hartford Hospital