本文整理汇总了PHP中functions::getFullSize方法的典型用法代码示例。如果您正苦于以下问题:PHP functions::getFullSize方法的具体用法?PHP functions::getFullSize怎么用?PHP functions::getFullSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类functions
的用法示例。
在下文中一共展示了functions::getFullSize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPhoto
function getPhoto($name, $width, $height, $params = "", $method = "echo")
{
$url = HOME . substr($name, 2);
$size = functions::getFullSize(DIR . substr($name, 2), $width, $height);
$width = $size['width'];
$height = $size['height'];
$txt = "<img src=\"" . $url . "\" width=" . $width . " height=" . $height . " " . $params . "/>";
if ($method == "return") {
return $txt;
} else {
echo $txt;
}
}
示例2: _getBoardMobile
function _getBoardMobile($query)
{
$b = $this->db->query($query);
if ($this->db->getNumRows() > 0) {
while ($board = mysql_fetch_assoc($b)) {
echo "<table class='result-table'>";
echo "<tr>";
echo "<td>";
echo "<table class='result-table'>";
$class = $board['is_color'] == '1' ? " colored" : "";
echo "<tr class='{$class}'>";
echo "<td class='checkbox-colum'>";
echo "<input type='checkbox' name='ad[" . $board['id'] . "]' class='board-checkbox'/>";
echo "</td>";
echo "<td class='thumb'>";
if ($board['photos_id'] != "") {
$this->db->query("SELECT * FROM photo WHERE folder = '" . functions::q($board['photos_id']) . "' LIMIT 1");
while ($p = mysql_fetch_assoc($this->db->data)) {
$url = HOME . 'photo/' . $p['folder'] . '/' . $p['name'];
$size = functions::getFullSize(DIR . '/photo/' . $p['folder'] . '/' . $p['name'], 80, 65);
echo "<img src='{$url}' width='" . $size['width'] . "' height='" . $size['height'] . "' />";
}
}
echo "</td>";
echo "<td class='text'>";
echo "<a href='" . HOME . "obj/" . $board['href'] . "/'><strong>" . $board['title'] . "</strong></a>";
echo "<div class='admin-board-text'>" . $this->getShortText($board['text'], 120) . "</div>";
echo "</td>";
echo "<td class='sales'>";
echo "<span class='grey-info'>Успешно подано!</span>";
echo '<div class="btn-group btn-group-sm" role="group">';
echo "<a class='btn btn-info' href='" . HOME . "add-item/" . $board['href'] . "/'><i class='glyphicon glyphicon-pencil'></i></a><a class='btn btn-danger' href='" . HOME . "profile/drop/" . $board['id'] . "/'><i class='glyphicon glyphicon-trash'></i></a>";
echo '</div>';
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "</tr>";
echo "</table>";
}
echo "<input type='hidden' name='op' value='ok' class='op'/>";
echo '<div class="btn-group-vertical btn-group-sm" role="group">';
echo "<input type='submit' value='Разрешить объявления' class='btn btn-success' onClick=\"\$('.op').val('ok');\"/>";
echo "<input type='submit' value='Запретить объявления' class='btn btn-warning' onClick=\"\$('.op').val('wrong');\"/>";
echo "<input type='submit' value='Удалить объявления' class='btn btn-danger' onClick=\"\$('.op').val('drop');\"/>";
echo '</div>';
} else {
echo "\n\t\t\t<div class=\"panel panel-default\">\n\t\t\t <div class=\"panel-body\">\n\t\t\t Нет объявлений\n\t\t\t </div>\n\t\t\t</div>";
}
}
示例3: WriteBoardMobile
function WriteBoardMobile($board)
{
$class = $board['is_color'] == '1' ? " colored" : "";
echo "<tr><td>";
echo "<table class='result-table'>";
echo "<col width=\"5%\"/>";
echo "<col width=\"5%\"/>";
echo "<col width=\"90%\"/>";
echo "<tr class='{$class}'>";
echo "<td class='date'><div class='count'><span class=\"date\">" . $this->getDate($board['time']) . "</span></div></td>";
echo "<td class=\"thumb\">";
if ($board['photos_id'] != '') {
$url = HOME . "photo/" . $board['photos_id'] . "/avatar.jpg";
$url_local = DIR . "/photo/" . $board['photos_id'] . "/avatar.jpg";
if (file_exists($url_local)) {
$size = functions::getFullSize($url_local, 90, 90);
echo "\n\t\t\t<a href='" . HOME . "obj/" . $board['board_id'] . "/'>\n\t\t\t<img src='{$url}?" . time() . "'/>\n\t\t\t</a>";
} else {
echo "";
}
} else {
echo " ";
}
echo "</td>";
echo "<td class=\"text\">";
echo ($board['is_important'] == '1' ? "<span class='important'>Срочно!</span>" : "") . "<a href='" . HOME . "obj/" . $board['board_id'] . "/' class='link'>" . $board['header'] . "</a>";
echo ($price = $this->getPrice($board['price'])) !== '0' ? "<span class='price'>" . functions::currency($board['price'], $board['price_t']) . " грн." . "</span>" : "";
echo "<span class='category'>\n\t<a href='" . HOME . $board['city'] . "/" . $board['root_href'] . "/'>" . $board['root_category'] . "</a> »\n\t<a href='" . HOME . $board['city'] . "/" . $board['cat_href'] . "/'>" . $board['category'] . "</a>\n\t<br /><a href='" . HOME . $board['city'] . "/'>" . $board['city_name'] . "</a></span>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td></tr>";
}
示例4: getAdMobile
function getAdMobile($ad)
{
$query = $this->db->query("SELECT A.title as header, A.href as board_id, A.id as b_id, A.user_id,\n\t\t\tB.name as category, C.name as root_category, B.href as category_href,\n\t\t\tB.href as cat_href, C.href as root_href, D.name as city_name,\n\t\t\tA.*, B.*, C.*, D.* FROM\n\t\t\tboard as A,\n\t\t\tcategories as B,\n\t\t\tcategories as C,\n\t\t\tregion as D\n\t\t\tWHERE\n\t\t\tB.id = A.id_category and C.id = B.root_id and D.href = A.city\n\t\t\tand A.href = '" . functions::q($ad) . "' LIMIT 1");
while ($b = mysql_fetch_assoc($query)) {
self::check_hit($b['b_id']);
$this->INFO['title'] = $b['header'] . " - " . $b['category'] . " на %SITE%";
$this->INFO['description'] = $b['header'] . ($b['price'] != 0 ? " - " . $b['price'] . ' ' . ($b['price_t'] == 'uah' ? 'грн' : '$') . "." : "") . ", " . $b['category'] . " на %SITE%";
$this->search->R = $b['city'];
$this->search->CAT_HREF = $b['cat_href'];
$this->search->COUNT_ADS = 5;
$this->search->setInf();
$this->getInfo();
$board = $this;
$q = $this->db->query("SELECT * FROM photo WHERE folder = '" . functions::q($b['photos_id']) . "' ORDER BY time ASC");
$i = 0;
$photo = array();
while ($p = mysql_fetch_assoc($q)) {
$url = HOME . 'photo/' . $p['folder'] . '/' . $p['name'];
$url_local = DIR . '/photo/' . $p['folder'] . '/' . $p['name'];
$size = functions::getFullSize($url_local, 553, 373);
$size_min = functions::getFullSize($url_local, 90, 70);
$photo[$i] = array($url, $size['width'], $size['height'], $size_min['width'], $size_min['height']);
$i++;
}
$rel = "";
echo "<div class='row'>";
echo "<div class='gallery'>";
echo "<div id='item-gallery' class='owl-carousel owl-theme'>";
for ($i = 0; $i < count($photo); $i++) {
if (isset($a[1])) {
echo "<div class='item'><img src='" . str_replace($a[1], 'full.' . $a[1], $photo[$i][0]) . "' alt='' id='main-photo'></div>";
}
}
echo "</div>";
echo "</div>";
echo "</div>";
echo "<section class=\"item\">";
echo "<div class='row'>";
echo "<div class='item-data'>";
echo '<div class="item-header">
<h4>' . $b['header'] . '</h4>
</div>';
// SillexLab edit
if ($this->getUserId() == $b['user_id'] || $this->getAdmin()) {
echo '<div class="service-buttons-wrap">';
echo '<div class="service-buttons"><a class="button service" href="service/top/' . $b['b_id'] . '"><img src="img/button-top.png" class="img-button"></a>';
echo '<a class="button service" href="/service/color/' . $b['b_id'] . '" style=""><img src="img/button-color.png" class="img-button"></a><a class="button service" href="/service/important/' . $b['b_id'] . '" style=""><img src="img/button-time.png" class="img-button"></a></div>';
echo '</div>';
}
/*if ($this->getAdmin()) echo "<div class='service-buttons'>
<a class='button service' href='service/top/".$b['b_id']."'>В топ!</a>
<a class='button service' href='/service/color/".$b['b_id']."'>Выделить цветом</a>
<a class='button service' href='/service/important/".$b['b_id']."'>Сделать срочным</a></div>";
*/
$price = empty($b['price']) ? "---" : $b['price'] . " " . ($b['price_t'] == 'uah' ? 'грн' : '$') . ".";
echo "<div class='item-price'><span>{$price}</span></div>";
echo "<div class='item-author-data'>";
echo '<div class="item-author-name"><div class="ia-label">Автор:</div><div class="id-data">' . $b['autor'] . ' <a href="' . HOME . 'search/?hash=' . md5($b['email']) . '">(Все объявления владельца)</a></div></div>';
echo '<div class="item-author-type"><div class="ia-label">Статус:</div><div class="id-data">' . ($b['type'] == 'S' ? "Частное лицо" : "Бизнес") . '</div></div>';
echo '<div class="item-author-city"><div class="ia-label">Город:</div><div class="id-data">' . $b['city_name'] . '</div></div>';
if ($b['address'] != '') {
echo '<div class="item-author-city"><div class="ia-label">Адрес:</div><div class="id-data">' . $b['city_name'] . ', ' . $b['address'] . '</div></div>';
}
if ($b['phone'] != '') {
$phone = substr($b['phone'], 0, 3) . "XXXXXXXXXX";
echo '<div class="item-author-phone"><div class="ia-label">Город:</div><div class="id-data" class="phone-content" data-id="' . $b['b_id'] . '">' . $phone . ' <a href=\'javascript:void(0);\'>Показать номер</a></div></div>';
}
echo "<div class='center'>";
$this->getBanner(3);
echo "</div>";
//
$this->getBanner(4);
echo "</div>";
echo "<div class='row'>";
echo "<div class='item-description'>" . nl2br(strip_tags($b['text'])) . "</div>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "</section>";
echo '<section class="sayhi">
<div class="container">';
?>
<h4>Связаться с автором</h4>
<div class="row">
<div class="sayhi-form">
<form action='' id="mailmessage" data-board-id="<?php
echo $b['b_id'];
?>
">
<div class="sh-form-group">
<input type="text" name="email" data-validate="v_required,v_email" placeholder="Введите ваш e-mail для ответа">
</div>
<div class="sh-form-group">
<textarea name="text" id="plc1" data-validate="v_required,v_min_15" placeholder="Введите сообщение"></textarea>
</div>
<div class="sh-submit">
<button type="submit">Отправить</button>
</div>
</form>
</div>
//.........这里部分代码省略.........