Example #1
0
					<h2>' . $list0fitems[$i]['name'] . '</h2>
					<p class="onlyheight">' . statue($list0fitems[$i]['status']) . ' ' . picicon($list0fitems[$i]['picture01']) . '</p>
					<span class="icon">&nbsp;</span>
					<div class="clr"></div>
					</a>
					</li>
				';
            }
            if (array_search("request", $list0fitems[$i])) {
                # code...
                echo '
					<li class="only4">
					<a href="register_request.php?id=' . $list0fitems[$i]['id'] . '&openid=' . $list0fitems[$i]['openid'] . '">
					<div class="img"><img src="item.jpg" ></div>
					<h2>' . $list0fitems[$i]['name'] . '</h2>
					<p class="onlyheight">' . statue($list0fitems[$i]['status']) . ' ' . picicon($list0fitems[$i]['picture01']) . '</p>
					<span class="icon">&nbsp;</span>
					<div class="clr"></div>
					</a>
					</li>
				';
            }
        }
    } else {
        echo "<h2 align='center'>没有条目</h2>";
    }
}
function picicon($a)
{
    if (!empty($a)) {
        return "<span style='color:red'>含有图片</span>";
Example #2
0
function makeList($data, $class)
{
    while ($val = mysql_fetch_array($data)) {
        //编列列表
        //传递店面名,name
        echo '
		<li class="only4">';
        if ($_GET['class'] == "sell") {
            echo '<a href="item.php?id=' . $val['id'] . '">';
            echo '
						<div class="img">' . picicon($val['picture01']) . '</div>
						<h2>' . $val['name'] . '</h2>
						<p class="onlyheight">此货品' . statue($val['status']) . ' 发布于:' . $val['time'] . '</p>
						<span class="icon"></span>
						</a>
						</li>
						';
        } else {
            if ($_GET['class'] == "buy") {
                echo '<a href="item_buy.php?id=' . $val['id'] . '">';
                echo '
						<div class="img">' . picicon($val['picture01']) . '</div>
						<h2>' . $val['name'] . '</h2>
						<p class="onlyheight">此货品' . statue_buy($val['status']) . ' 发布于:' . $val['time'] . '</p>
						<span class="icon"></span>
						</a>
						</li>
						';
            }
        }
    }
}