本文整理汇总了PHP中images函数的典型用法代码示例。如果您正苦于以下问题:PHP images函数的具体用法?PHP images怎么用?PHP images使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了images函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: text
/**
* @desc 文本自动回复
* @return string
*/
public function text()
{
$keyword = trim($this->_postObj->Content);
switch ($keyword) {
case '':
echo text($this->_postObj, '你什么意思?');
break;
case '你好!':
echo text($this->_postObj, '你好呀!');
break;
case 'hello':
echo text($this->_postObj, 'Hi!!');
break;
case 'Hi':
echo text($this->_postObj, 'Oh!');
break;
case '换行':
echo text($this->_postObj, '这是第一行!' . "\n" . '我是第二行!');
break;
case '多图文':
$array = [['Title' => '多图文一', 'Description' => '第一个文本内容', 'PicUrl' => 'http://7xqoks.com1.z0.glb.clouddn.com/1455679468779.jpg', 'Url' => 'http://www.goto318.com'], ['Title' => '多图文二', 'Description' => '第二个文本内容', 'PicUrl' => 'http://7xqoks.com1.z0.glb.clouddn.com/10.jpg', 'Url' => 'http://www.goto318.com']];
echo images($this->_postObj, $array);
default:
echo text($this->_postObj, '/::)');
break;
}
}
示例2: fetchAllImages
function fetchAllImages()
{
$pdo = databaseConnection();
$sql = "SELECT Path, TravelImage.ImageID, Title\n" . "FROM `TravelImage`\n" . "INNER JOIN TravelImageDetails\n" . "ON TravelImage.ImageID = TravelImageDetails.ImageID";
$result = $pdo->query($sql);
images($result);
$pdo = null;
}
示例3: images_ui_setup_entity_menu
/**
* Setup image menu
*
* @param string $hook "register"
* @param string $type "menu:entity"
* @param ElggMenuItem[] $return Menu
* @param array $params Hook params
* @return ElggMenuItem[]
*/
function images_ui_setup_entity_menu($hook, $type, $return, $params)
{
$entity = elgg_extract('entity', $params);
if (!images()->isImage($entity)) {
return;
}
if ($entity->canEdit()) {
$return[] = ElggMenuItem::factory(['name' => 'edit', 'text' => elgg_echo('edit'), 'title' => elgg_echo('edit:this'), 'href' => "/images/edit/{$entity->guid}", 'priority' => 200]);
$return[] = ElggMenuItem::factory(['name' => 'delete', 'text' => elgg_view_icon('delete'), 'title' => elgg_echo('delete:this'), 'href' => "/action/entity/delete?guid={$entity->guid}", 'confirm' => elgg_echo('deleteconfirm'), 'priority' => 300]);
}
return $return;
}
示例4: ImageUrl
function ImageUrl($relPath)
{
$relPath = str_replace('\\', '/', $relPath);
if (strpos($relPath, '/') === 0) {
$relPath = substr($relPath, 1);
}
if (is_file(FCPATH . DIRECTORY_SEPARATOR . $relPath) && file_exists(FCPATH . DIRECTORY_SEPARATOR . $relPath)) {
return base_url() . $relPath;
} else {
return images() . 'no.gif';
}
}
示例5: avatars_user_icon_url
/**
* User avatar icon URL handler
*
* @param string $hook "entity:icon:url"
* @param string $type "object"
* @param string $return URL
* @param array $params Hook params
* @return array
*/
function avatars_user_icon_url($hook, $type, $return, $params)
{
$entity = elgg_extract('entity', $params);
$size = elgg_extract('size', $params);
$avatar = avatars_get_avatar($entity);
if (!$avatar) {
return;
}
$thumb = images()->getThumb($avatar, $size);
if (!$thumb) {
return;
}
return elgg_get_inline_url($thumb, false);
}
示例6: avatars_create_aavatar_from_resource
/**
* Create an avatar from a file resource
*
* @param ElggEntity $entity Entity to which avatar will belong
* @param type $path Path to file
* @return Avatar|false
*/
function avatars_create_aavatar_from_resource(ElggEntity $entity, $path)
{
avatars_clear_avatars($entity);
$basename = pathinfo($path, PATHINFO_BASENAME);
$avatar = new Avatar();
$avatar->owner_guid = $entity instanceof ElggUser ? $entity->guid : $entity->owner_guid;
$avatar->container_guid = $entity->guid;
$avatar->access_id = $entity->access_id;
$avatar->setFilename("avatars/{$entity->guid}/" . time() . $basename);
$avatar = images()->createFromResource($path, $avatar);
if ($avatar && $avatar->save()) {
$entity->avatar_last_modified = $avatar->time_created;
}
return $avatar;
}
示例7: images
<div id="myCarouselMini" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarouselMini" data-slide-to="0" class="active"></li>
<li data-target="#myCarouselMini" data-slide-to="1"></li>
<li data-target="#myCarouselMini" data-slide-to="2"></li>
<li data-target="#myCarouselMini" data-slide-to="3"></li>
<li data-target="#myCarouselMini" data-slide-to="4"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox" style="height: 370px;width:295px;">
<?php
for ($i = 0; $i < 5; $i++) {
$class = "";
$imgs_tend = images($oeuvretend, $i);
$p = pubData($oeuvretend, $i);
$title = body_title($oeuvretend, $i);
if ($i == 0) {
$class = "active";
}
echo '<div class="item ' . $class . '">';
echo '<a href="oeuvre.php?artiste=' . $p[0] . '&oeuvre=' . ID($oeuvretend, $i) . '&type=' . Type($oeuvretend, $i) . '"><div class="oeuvre_detail"><strong>“' . $p[0] . '”</strong><br>' . $title . '</div><br/><img src="' . $imgs_tend[count($imgs_tend) - 1] . '" width="295"/></a>';
echo '</div>';
}
?>
</div>
</div>
示例8: image
/**
* @param string $hash
* @param string|null $filterName
* @return string
*/
function image($hash, $filterName = null)
{
return images()->url($hash, $filterName);
}
示例9: addslashes
<div class="menu_center">
<a href="index.php" title="Home" class="menu_txt">Home</a>
<a href="index.php?id=1" title="Settings" class="menu_txt">Settings</a>
<a href="index.php?id=2" title="Tiles" class="menu_txt">Tiles</a>
<a href="index.php?id=3" title="Articles" class="menu_txt">Articles</a>
<a href="index.php?id=4" title="Message to Users" class="menu_txt">Messages to Users</a>
</div>
<a href="index.php?logout_admin=1" title="Logout" class="logout"></a>
</div>
<?
$id = addslashes(strip_tags(trim($_GET['id'])));
if(!$id){statistic();}
if($id==1){change_password();}
if($id==2){tails($id);}
if($id==3){articles($id);}
if($id==4){messages($id);}
if($id==9){images($id);}
}
?>
<br /><br />
<div class="push"></div>
</center>
</div>
<div class="stopka"><? stopka(); ?></div>
</body>
</html>
示例10: images
<link rel="icon" type="image/ico" href="<?php
echo images() . "favicon.png";
?>
"/>
<link rel="stylesheet" href="<?php
echo css() . "bootstrap.min.css";
?>
">
<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
<script src="<?php
echo js() . "jquery.js";
?>
"></script>
<script src="<?php
echo js() . "myjquery.js";
?>
"></script>
<script src="<?php
echo js() . "myjs.js";
?>
"></script>
<script src="<?php
echo js() . "bootstrap.min.js";
?>
" type="text/javascript"></script>
<style>
h2{
color: #269abc;
}
</style>
示例11: stdClass
$params = new stdClass();
$input_keys = array_keys((array) elgg_get_config('input'));
$request_keys = array_keys((array) $_REQUEST);
$keys = array_unique(array_merge($input_keys, $request_keys));
foreach ($keys as $key) {
if ($key) {
$params->{$key} = get_input($key);
}
}
$entity = get_entity($params->guid);
if (!images()->isImage($entity)) {
register_error(elgg_echo('images:error:not_found'));
forward(REFERRER);
}
if (!$entity->canEdit()) {
register_error(elgg_echo('images:error:permission_denied'));
forward(REFERRER);
}
$cropped = images()->crop($entity, $params->crop_coords['x1'], $params->crop_coords['y1'], $params->crop_coords['x2'], $params->crop_coords['y2']);
if ($cropped) {
// reset cropping coordinates as they no longer represent an area on the original image
unset($entity->x1);
unset($entity->y1);
unset($entity->x2);
unset($entity->y2);
system_message(elgg_echo('images:crop:success'));
} else {
register_error(elgg_echo('images:crop:error'));
}
forward(REFERRER);
示例12: module
module();
break;
case 'partenaires':
module();
break;
case 'ajouter':
anti_slash();
ajout_news();
break;
case 'editer':
anti_slash();
editer_news();
break;
case 'images':
formulaire_images();
images();
break;
case 'upload':
envoyer_images();
break;
case 'delete':
supprimer_images();
break;
case 'configuration':
configuration();
break;
case 'listeliens':
lienslisteadmin();
break;
case 'ajouterliens':
anti_slash();
示例13: databaseConnection
echo "<p>" . $row['CountryDescription'] . "</p>";
?>
</div>
<div class="panel panel-info">
<div class="panel-heading">Images From <?php
echo $row['CountryName'];
?>
</div>
<div class="well">
<div class="row">
<?php
$pdo = databaseConnection();
$sql = "SELECT TravelImage.ImageID, Path, CountryCodeISO, Title FROM TravelImageDetails\n" . "INNER JOIN TravelImage\n" . "ON TravelImage.ImageID = TravelImageDetails.ImageID WHERE CountryCodeISO ='" . $row['ISO'] . "'";
$result = $pdo->query($sql);
images($result);
$pdo = null;
?>
</div>
</div>
</div>
</div> <!-- end main content column -->
</div> <!-- end main content row -->
</div> <!-- end main content container -->
<?php
include "includes/travel-footer.inc.php";
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="bootstrap3_travelTheme/dist/js/bootstrap.min.js"></script>
示例14: purpose
<h1>Description : </h1>
<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem I
psum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like) ...<p>
<br>
<a href="#" class="right">Lire la suite</a>
</div>
<br>
<div class="content">
<h3>Ses Oeuvres</h3>
<div class="slider center">
<?php
$result = requete('{"query":{"bool":{"must":[{"query_string":{"default_field":"oeuvre.pubDate","query":"\\"' . $_GET["artiste"] . '\\""}}],"must_not":[],"should":[]}},"sort":[],"facets":{}} ');
for ($i = 0; $i < $result['hits']['total']; $i++) {
$imgs = images($result, $i);
echo '<div><h3><a href=' . $imgs[count($imgs) - 1] . ' class="zoombox zgallery1" title="oeuvre.php" ><img src=' . $imgs[count($imgs) - 1] . ' ></a></h3></div>';
}
?>
</div>
</div>
</div>
<br>
</section>
<footer>
<div id="footer_top"> <br>
示例15: elgg_extract
<?php
$entity = elgg_extract('entity', $vars);
if (!images()->isImage($entity)) {
return;
}
?>
<div class="elgg-text-help">
<?php
echo elgg_echo('images:crop:instructions');
?>
</div>
<div>
<?php
$src = elgg_get_download_url($entity);
$info = getimagesize($entity->getFilenameOnFilestore());
echo elgg_view('input/cropper', ['src' => $src, 'name' => 'crop_coords', 'x1' => 0, 'y1' => 0, 'x2' => $info[0], 'y2' => $info[1], 'ratio' => '']);
?>
</div>
<div class="elgg-foot">
<?php
echo elgg_view('input/hidden', ['name' => 'guid', 'value' => $entity->guid]);
echo elgg_view('input/submit', ['value' => elgg_echo('images:crop')]);
?>
</div>