コード例 #1
0
ファイル: user.php プロジェクト: TPhillip/walkntrade
					<table>
						<?php 
$schs = $um->getListingConnection()->prepare("SELECT `textId` FROM `schools` ORDER BY `name` DESC LIMIT 100");
$schs->execute();
$schs->store_result();
$schs->bind_result($school);
if ($userName != null) {
    $count = 0;
    while ($schs->fetch()) {
        $mypost = $um->getListingConnection()->prepare("SELECT `identifier`, `category`, `title`,  `date` FROM `" . $school . "` WHERE `userid` = ? ORDER BY `id` DESC");
        $mypost->bind_param("s", $uid);
        $mypost->execute();
        $mypost->store_result();
        $mypost->bind_result($identifier, $pCat, $pTitle, $pDate);
        if ($mypost->num_rows > 0) {
            $concatenated = "<tr><th colspan='2'>At " . $um->getSchoolName($school) . "</th></tr><tr><th>Title</th><th class=\"right\">Posted</th></tr>";
            while ($mypost->fetch()) {
                $link = $school . ":" . $identifier;
                $pTitle = strlen($pTitle) > 55 ? substr($pTitle, 0, 55) . "..." : $pTitle;
                $html_blacklist = "/< >/";
                $pTitle = htmlspecialchars($pTitle);
                $pDate = $um->getAgeInDays($pDate);
                $pCat = htmlspecialchars($pCat);
                $concatenated .= "<tr><td><a href='/show?" . $link . "'>" . $pTitle . "</a></td><td class='right'>" . $pDate . "</td>";
                $count++;
            }
        }
        $mypost->close();
    }
    if ($count != 0) {
        $concatenated = $concatenated . "</userProfile>";