本文整理汇总了PHP中Settings::getUploadedImages方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings::getUploadedImages方法的具体用法?PHP Settings::getUploadedImages怎么用?PHP Settings::getUploadedImages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Settings
的用法示例。
在下文中一共展示了Settings::getUploadedImages方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listDemos
public function listDemos(Paging $paging){
while($row = mysql_fetch_assoc($paging->pagingResult)){
if($row['rowid']==$_GET['demo_id']) continue;
// Got to make a new query beacuse of error in mysql_fetch_assoc
$query = new Query($this->q->getTable());
$query->whereLeftJoinImageQuery("*","image_id",$row['image_id'],"rowid","ASC");
$image_id = $query->getResultRow("image_id");
$file_name=$query->getResultRow("file");
?>
<table border="0" cellpadding="0" cellspacing="0" class="demoTable">
<tr>
<?php
if(Helper::hasValue($image_id)){
?>
<td width="80" class="noPadding" rowspan="2"><img src="image_crop.php?source=<?php echo Settings::getUploadedImages().'/'.$file_name ?>&dest=&thumb_size=80" class="flowPic" /></td>
<?php
}
?>
<td width="270" class="tdPadding" colspan="2"><span class="boldGrey"><?php echo $row['name']; ?></span></td>
</tr>
<tr>
<td class="tdVertBottom"><span class="smallPink"><a href="?demo_id=<?php echo $row['rowid']; ?>">Läs mer</a></span></td>
<td align="right" class="tdVertBottom"><span class="smallGrey"><?php echo date("Y-m-d",strtotime($row['date'])); ?></span></td>
</tr>
</table>
<?
}
}
示例2: listReviews
public function listReviews(Paging $paging)
{
while ($row = mysql_fetch_assoc($paging->pagingResult)) {
if ($row['rowid'] == $_GET['id'] && isset($_GET['id']) && $_GET['id'] != "") {
continue;
}
// Got to make a new query beacuse of error in mysql_fetch_assoc
$query = new Query($this->q->getTable());
$query->whereLeftJoinImageQuery("*", "image_id", $row['image_id'], "rowid", "ASC");
$image_id = $query->getResultRow("image_id");
$file_name = $query->getResultRow("file");
echo '<div class="reviewFlow">';
if (Helper::hasValue($image_id)) {
echo '<a href="?id=' . $row['rowid'] . '">';
echo '<img src="image_crop.php?source=' . Settings::getUploadedImages() . '/' . $file_name . '&dest=&thumb_size=100" alt="' . $row['name'] . '" class="img"/>';
echo '</a>';
}
echo '<div class="title">';
echo '<a href="?id=' . $row['rowid'] . '">';
echo $row["title"];
echo '</a>';
echo '</div>';
echo '<div class="description">';
echo '<a href="?id=' . $row['rowid'] . '">';
echo $row['description'];
echo '</a>';
echo '</div>';
echo '<div class="date">';
echo '<span class="smallBlack">';
echo date("Y-m-d", strtotime($row['date']));
echo '</span>';
echo '</div>';
echo '</div>';
}
}
示例3: displayImage
static function displayImage($filename, $width, $class, $alt)
{
$size = getimagesize(Settings::getUploadedImages() . "/" . $filename);
if ($size[0] > $width) {
return '<img src="' . Settings::getUploadedImages() . "/" . $filename . '" alt="' . $alt . '" class="' . $class . '" width="' . $width . '"/>';
} else {
return '<img src="' . Settings::getUploadedImages() . "/" . $filename . '" alt="' . $alt . '" class="' . $class . '" />';
}
}
示例4: displayImage
static function displayImage($filename, $width, $class, $alt)
{
/** Some servers **/
//$size = getimagesize($_SERVER['DOCUMENT_ROOT']."/".Settings::getUploadedImages()."/".$filename);
$size = getimagesize(Settings::getUploadedImages() . "/" . $filename);
if ($size[0] > $width) {
return '<img src="' . Settings::getUploadedImages() . "/" . $filename . '" alt="' . $alt . '" class="' . $class . '" width="' . $width . '"/>';
} else {
return '<img src="' . Settings::getUploadedImages() . "/" . $filename . '" alt="' . $alt . '" class="' . $class . '" />';
}
}
示例5: field
public function field($class)
{
$ret = '<h4>' . $this->description . '</h4>';
$ret .= '<span id="imageShow" limit="' . $this->optional . '" maxWidth="200">' . "\n";
for ($i = 0; $i < count($this->value); $i++) {
$ret .= '<span id="' . $this->value[$i] . '">' . "\n";
$ret .= '<img src="image_thumb.php?source=' . Settings::getUploadedImages() . "/" . $this->value[$i] . '&width=200" />' . "\n";
$ret .= '<a href="#" removeImageId="' . $this->value[$i] . '" >' . "\n";
$ret .= '<img src="graphics/minus.jpg" width="10" border="0" alt="Ta bort"/>' . "\n";
$ret .= '</a>' . "\n";
$ret .= '<input type="hidden" name="imageArray[]" id="' . $this->value[$i] . '" value="' . $this->value[$i] . '" />' . "\n";
$ret .= '</span>' . "\n";
}
$ret .= '</span> <br/>' . "\n";
return $ret;
}
示例6: createNews
public function createNews(Paging $paging)
{
while ($row = mysql_fetch_assoc($paging->pagingResult)) {
?>
<h2><?php
echo $row['title'];
?>
</h2>
<?php
echo $row['date'] . "<br />";
echo $row['image_id'] . "<br />";
if (Helper::hasValue($row['image_id'])) {
echo '<img src="phpThumb.php/100;' . Settings::getUploadedImages() . '/' . $row['file'] . '" alt="' . $row['name'] . '" />';
}
echo "<br />" . $row['description'];
?>
<br />
<?php
}
}
示例7: Query
<span id="imageShow" limit="1" maxWidth="250"></span> <br/>
</div>
<h2>Befintliga banners</h2>
<?php
$rightBannerQ = new Query("banners");
$rightBannerQ->whereLeftJoinImageQuery("*", "category", "right", "order_no", "ASC", 1);
while ($row = mysql_fetch_assoc($rightBannerQ->getResult())) {
echo "Ordningsnummer: " . $row['order_no'] . "<br />";
if (trim($row['bannersCode']) == "") {
?>
<a href="admin_banners_edit.php?category=right&id=<?php
echo $row['rowid'];
?>
"><img src="<?php
echo "../" . Settings::getUploadedImages() . '/' . $row['file'];
?>
" width="250" /></a>
<a href="admin_banners_action.php?category=right&action=remove&id=<?php
echo $row['rowid'];
?>
"><img src="graphics/remove.jpg" alt="Ta bort" width="10" border="0"/></a>
<br />
<?php
} else {
echo $row['bannersCode'];
echo '<a href="admin_banners_edit.php?category=right&id=' . $row['rowid'] . '">Ändra</a> ';
echo '<a href="admin_banners_action.php?category=right&action=remove&id=' . $row['rowid'] . '"><img src="graphics/remove.jpg" alt="Ta bort" width="10" border="0"/></a><br />';
}
}
?>
示例8: showActual
public function showActual()
{
$id = (int) $_GET['id'];
if (Helper::givesResult($this->table, "rowid", $id)) {
$q = new Query($this->table);
$q->whereLeftJoinImageQuery("*", "rowid", $id, "rowid", "DESC");
$personal = new Query("personal");
$personal->whereQuery("*", "username", $q->getResultRow("published_by"), "rowid", "ASC", "1");
?>
<div class="newsHeader"><span class="dateAuthor">
<?php
echo date("Y-m-d", strtotime($q->getResultRow("date"))) . ' ' . $personal->getResultRow("first_name") . ' ' . $personal->getResultRow("last_name");
?>
</span><br /><br />
<span class="newsHeaderFont"><?php
echo $q->getResultRow("title");
?>
</span>
</div>
<div class="newsDescActual"><span class="boldGrey"><?php
echo nl2br(strip_tags($q->getResultRow("description"), '<a><b><br><strong>'));
?>
</span></div>
<div class="newsPicActual">
<?php
if ($q->getResultRow("image_id") > 0) {
?>
<table><tr><td>
<?php
echo '<img src="image_thumb.php?source=' . Settings::getUploadedImages() . '/' . $q->getResultRow("file") . '&width=340" alt="' . $q->getResultRow("name") . '" />';
?>
</td>
</tr>
<tr>
<td align="right" class="smallGrey2">
<?php
if ($q->getResultRow("photo") != "") {
echo '<span class="smallGrey">Foto: ' . $q->getResultRow("photo") . '</span>';
}
?>
</td>
</tr>
</table>
<?php
}
?>
</div>
<?php
echo nl2br(strip_tags($q->getResultRow("text"), '<a><b><br><strong>'));
?>
<br /><br />
<?php
}
}
示例9: Query
</div>
<div id="centerContainer">
<?php
$newest = new Query("new");
$newest->whereAndLeftJoinImageQuery("*", "active", 1, "date", "DESC");
if ($newest->getNumRows() > 0) {
?>
<div class="newestHeaderBig"></div>
<div class="newestBig">
<table border="0" cellpadding="0" cellspacing="0" class="noBorder">
<tr>
<td width="80" class="noPadding" rowspan="3"><a href="index.php?id=<?php
echo $newest->getResultRow("rowid");
?>
"><img src="image_crop.php?source=<?php
echo Settings::getUploadedImages() . '/' . $newest->getResultRow("file");
?>
&dest=&thumb_size=100" class="imgWhiteBorder" /></a></td>
<td width="450" class="tdPadding" colspan="2"><span class="boldWhite"><a href="index.php?id=<?php
echo $newest->getResultRow("rowid");
?>
"><?php
echo $newest->getResultRow("title");
?>
</a></span></td>
</tr>
<tr>
<td class="tdPadding" colspan="2"><span class="smallWhite"><a href="index.php?id=<?php
echo $newest->getResultRow("rowid");
?>
"><?php
示例10: mysql_query
echo '<a href="shop.php"><img src="graphics/menuItems/butik.png" border="0" class="menuItem" /></a>';
echo '<a href="prenumeration.php"><img src="graphics/menuItems/prenumeration.png" border="0" class="menuItem" /></a>';
echo '<a href="letter.php"><img src="graphics/menuItems/letter.png" border="0" class="menuItem"/></a>';
echo '<a href="about.php"><img src="graphics/menuItems/om.png" border="0" class="menuItem"/></a>';
echo '<a href="announce.php"><img src="graphics/menuItems/annonsera.png" border="0" class="menuItem" /></a>';
echo '</div>';
echo '</div>';
echo '</div>';
//topDiv
echo '<div id="leftDiv">';
$query = "SELECT * FROM monthly_magazine\n\t\tLEFT JOIN bilder\n\t\tON monthly_magazine.image_id = bilder.id\n\t\tWHERE active='1' AND image_id > '0' \n\t\tORDER BY number DESC\n\t\tLIMIT 0, 1";
$result = mysql_query($query) or die(mysql_error());
if (mysql_num_rows($result) > 0) {
echo '<div id="monthlyMag">';
echo '<a href="number.php?id=' . mysql_result($result, 0, "rowid") . '">';
echo '<img src="image_thumb.php?source=' . Settings::getUploadedImages() . '/' . mysql_result($result, 0, "file") . '&width=148" class="imgWhiteBorder"/>';
echo '</a>';
echo '</div>';
}
echo '<div id="shop">';
echo '<div class="shopBg"></div>';
echo '<div class="shopCenter">';
echo '<span class="smallWhite">';
echo '<a href="shop2.php">';
echo 'Köp exklusiva OPUS-prylar, tidigare utgåvor, utvalda cd & dvd, t-shirts mm. Här hittar du julklappar och presenter för hela året!';
echo '</a>';
echo '</span>';
echo '<span class="boldWhite">';
echo '</span>';
echo '</div>';
echo '</div>';
示例11: Query
<?php
include "header_inc.php";
echo '<div id="centerDiv">';
echo '<div class="newsBg">';
echo '<div class="newsHeaderActual">';
echo '<span class="newsHeaderFont">';
echo 'Skribenterna på OPUS';
echo '</span>';
echo '</div>';
echo '<br />';
if (Helper::isInt($_GET['id']) && Helper::hasValue($_GET['id']) && Helper::givesResult("personal", "rowid", $_GET['id'])) {
$query = new Query("personal");
$query->whereLeftJoinImageQuery("*", "rowid", $_GET['id'], "last_name", "DESC");
if (Helper::hasValue($query->getResultRow("image_id"))) {
echo '<img src="image_thumb.php?source=' . Settings::getUploadedImages() . '/' . $query->getResultRow("file") . '&width=200" />';
}
echo '<br />';
echo '<br />';
echo '<p>';
echo '<strong>';
echo $query->getResultRow("first_name") . " " . $query->getResultRow("last_name");
echo '</strong>';
echo '</p>';
echo '<br />';
echo '<p>';
echo '<strong>';
echo 'Bäst just nu';
echo '</strong>';
echo '</p>';
echo '<ul style="list-style:decimal; margin-left:20px";>';
示例12: showTable2
/**
* Listar alla på förstasidan, dvs level=0
*/
private function showTable2($class)
{
$q = new Query("matruschka");
$q->whereQuery("*", "mLevel", 0, "mLang", "DESC", 0);
echo '<br/><br/>';
echo '<table class="' . $class . '" cellpadding="0" cellspacing="0">' . "\n";
echo '<th> </th>';
echo '<th>Title</th>';
echo '<th>Sub cat´s</th>';
echo '<th>Show style</th>';
echo '<th>Order no.</th>';
echo '<th>Lang</th>';
echo '<th>Published</th>';
//echo '<th align="left">Publiceringsdatum</th>';
//echo '<th align="left">Senast uppdaterad</th>';
//echo '<th align="left">Adminlevel</th>';
echo '<th> </th>';
echo '<th> </th>';
$i = 0;
while ($row = mysql_fetch_object($q->getResult())) {
$ssThumb;
$imgQ = new Query("matruschkaImages");
$imgQ->whereQuery('*', 'miMatruschkaID', $row->mRowid, 'miMatruschkaID', 'DESC', 2);
$img = $imgQ->getResultRow('miFilename');
if ($row->mShowStyle == "ImageShow") {
$ssThumb = AdminImageShow::$thumbnail;
} elseif ($row->mShowStyle == "TextShow") {
$ssThumb = AdminTextShow::$thumbnail;
} elseif ($row->mShowStyle == "ImageShow2") {
$ssThumb = AdminImageShow2::$thumbnail;
} elseif ($row->mShowStyle == "Agree") {
$ssThumb = AdminAgree::$thumbnail;
} elseif ($row->mShowStyle == "Start") {
$ssThumb = AdminStart::$thumbnail;
}
// Fyll på med fler
echo "<tr>\n";
echo '<td class="td' . $i . '"><img src="image_crop.php?source=' . Settings::getUploadedImages() . '/' . $img . '&dest=&thumb_size=40" /></td>' . "\n";
echo '<td class="td' . $i . '">';
if ($_SESSION['admin_level'] >= $row->mAdminLevel || $_SESSION['admin_logged'] == $row->mAuthor) {
echo '<a href="?ID=' . $row->mRowid . '">';
echo $row->mButtonTitle ? $row->mButtonTitle : $row->mTitle;
echo '</a>';
} else {
echo $row->mButtonTitle ? $row->mButtonTitle : $row->mTitle;
}
echo "</td>\n";
echo '<td class="td' . $i . '">';
$subQ = new Query("matruschka");
$subQ->whereQuery("mRowid", "mParent", $row->mRowid, "mRowid", "ASC", 0);
echo $subQ->getNumRows();
echo "</td>\n";
echo "<td valign=\"bottom\" class=\"td{$i}\">";
echo "<span onclick=\"MM_openBrWindow('" . Settings::$customGraphics . $ssThumb . "','Preview','width=500,height=500')\" style=\"cursor: hand; cursor: pointer;\">";
echo $row->mShowStyle;
echo '</span>';
echo "</td>\n";
echo '<td class="td' . $i . '">' . $row->mOrderNo . '</td>' . "\n";
echo '<td class="td' . $i . '">' . $row->mLang . '</td>' . "\n";
echo '<td class="td' . $i . '">';
echo $row->mPublished ? '<span style="color:#339900">Yes</span>' : '<span style="color:#FF0000">No</span>';
echo "</td>\n";
//echo '<td valign="bottom">'.$row->mPubDate.'</td>'."\n";
//echo '<td valign="bottom">'.$row->mUpdateDate.'</td>'."\n";
//echo '<td valign="bottom">'.$row->mAdminLevel.'</td>'."\n";
echo '<td class="td' . $i . '">';
if ($_SESSION['admin_level'] >= $row->mAdminLevel || $_SESSION['admin_logged'] == $row->mAuthor) {
echo '<a href="?ID=' . $row->mRowid . '">Edit</a>';
} else {
echo ' ';
}
echo '</td>' . "\n";
echo '<td class="td' . $i . '">';
if ($_SESSION['admin_level'] >= $row->mAdminLevel || $_SESSION['admin_logged'] == $row->mAuthor) {
echo '<a href="?action=Remove&mID=' . $row->mRowid . '&ID=' . $this->ID . '" name="removeButton">Remove</a>';
} else {
echo ' ';
}
echo '</td>' . "\n";
echo '</tr>' . "\n";
$i++;
$i = $i % 2;
}
echo '</table>';
}
示例13: mysql_query
<div id="centerDivBig">
<?php
$id = (int) $_GET['id'];
if (Helper::givesResult("monthly_magazine", "rowid", $id) && Helper::isInt($id)) {
$query = "SELECT * FROM monthly_magazine\n\t\t\tLEFT JOIN bilder\n\t\t\tON monthly_magazine.crossword=bilder.id\n\t\t\tWHERE rowid = " . $_GET['id'] . "";
$result = mysql_query($query) or die(mysql_error());
?>
<div class="newsHeader">
<span class="newsHeaderSmaller"><p>#<?php
echo mysql_result($result, 0, "number");
?>
</p></span> </div>
<div class="newsPicActual">
<?php
echo '<img src="image_thumb.php?source=' . Settings::getUploadedImages() . '/' . mysql_result($result, 0, "file") . '&width=512" alt="#' . mysql_result($result, 0, "number") . ' lösning"/>';
?>
</div>
<?php
}
?>
<br/>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<?php
$query = new Query(monthly_magazine);
$query->whereCustom("*", "crossword > 0", "number", "DESC", 1000);
$paging = new Paging($query, 30);
$paging->whereCustom();
while ($row = mysql_fetch_assoc($paging->getResult())) {
示例14: showImage
public function showImage($width)
{
return '<img src="image_thumb.php?source=' . Settings::getUploadedImages() . '/' . $this->q->getResultRow("file") . '&width=' . $width . '" alt="' . $this->q->getResultRow("name") . '"/>';
}