コード例 #1
0
        $query .= "AND {$pilihan} LIKE '{$tekscari}%' ";
    }
}
$query .= "ORDER BY p.productname asc ";
$query1 = $query;
$query .= "LIMIT {$posisi},{$batas}";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
    echo '<tr bgcolor>
			<td align="right">' . $row["idproduct"] . '</td>
			<td align="left">' . $row["productname"] . '</b><br><br><br><span class="keterangan">';
    echo "&nbsp;&#187;&nbsp;added ";
    $nowtime = time();
    //echo $row["inputdate"];
    $oldtime = strtotime($row["inputdate"]);
    echo time_elapsed_B($nowtime - $oldtime);
    echo '</span></td>
			<td align="left">';
    $gambar = "../imgz_product/" . $row["idproduct"] . ".jpg";
    if (file_exists($gambar)) {
        echo '<img src="" width="100%" height="">';
    } else {
        echo '<img src="../images/noimage.jpg" width="100%" height="">';
    }
    echo '</td>
			<td align="left">' . $row["categoryname"] . '</td>
			<td align="left">' . $row["subcategoryname"] . '</td>';
    echo '<td align="center">' . $row['symbol'] . ' ' . number_format($row["productprice"], 0, ",", ".") . '</td>';
    echo '<td align="center">' . $row["membername"] . '</td>';
    echo '<td align="center">' . $row["cityname"] . '</td>';
}
コード例 #2
0
ファイル: bans.php プロジェクト: RedstoneMedal/panel
                    echo '<div class="alert alert-danger">';
                } else {
                    echo '<div class="alert alert-success">';
                }
            }
        }
        echo '<h4>' . getBansPlayerName($bhcon, $row["creator_id"]) . " Banned " . getBansPlayerName($bhcon, $row["player_id"]) . "</h4><h5> For " . $row["reason"] . "</h5>";
        echo '<br>Ban issued on: ' . $row["created_at"];
        if ($row["expires_at"] != NULL) {
            $banlength = strtotime($row["expires_at"]) - strtotime($row["created_at"]);
            if (strtotime($row["expires_at"]) > time()) {
                echo '<br>Ban expiry on: ' . $row["expires_at"];
                echo '<br>Ban lenght: ' . time_elapsed_B($banlength);
            } else {
                echo '<br>Ban expired on: ' . $row["expires_at"];
                echo '<br>Ban lasted: ' . time_elapsed_B($banlength);
            }
        }
        echo '</div>';
        echo '</div>';
        $count = $count + 1;
        if ($count == 3) {
            $count = 0;
            echo '</div>';
        }
    }
} else {
    echo '<div class="alert alert-danger">
						 BanHammer Database has not been setup</a>
						</div><br>';
}