本文整理汇总了PHP中getImagesPath函数的典型用法代码示例。如果您正苦于以下问题:PHP getImagesPath函数的具体用法?PHP getImagesPath怎么用?PHP getImagesPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getImagesPath函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: BuildOutput
function BuildOutput($bg)
{
$output = "<tr>\n";
$output .= " <td width=16 bgcolor=\"" . $bg . "\"><a href=\"dispatcher.php?action=urlUpload&type=torrent&url=" . $this->torrentFile . "\"><img src=\"" . getImagesPath() . "download_owner.gif\" width=\"16\" height=\"16\" title=\"" . $this->torrentName . "\" border=0></a></td>\n";
$output .= " <td bgcolor=\"" . $bg . "\"><a href=\"dispatcher.php?action=urlUpload&type=torrent&url=" . $this->torrentFile . "\" title=\"" . $this->torrentName . "\">" . $this->torrentDisplayName . "</a></td>\n";
$output .= " <td bgcolor=\"" . $bg . "\">" . $this->catName . " </td>\n";
// $output .= " <td bgcolor=\"" . $bg . "\" align=center>" . $this->dateAdded . "</td>\n";
$output .= " <td bgcolor=\"" . $bg . "\" align=right>" . $this->torrentSize . "</td>\n";
$output .= "</tr>\n";
return $output;
}
开发者ID:sulaweyo,项目名称:torrentflux-b4rt-php7,代码行数:11,代码来源:TokyoToshoEngine.php
示例2: BuildOutput
function BuildOutput($bg, $searchURL = '')
{
$output = "<tr>\n";
$output .= " <td width=16 bgcolor=\"" . $bg . "\"><a href=\"dispatcher.php?action=urlUpload&type=torrent&url=" . $this->torrentFile . "\"><img src=\"" . getImagesPath() . "download_owner.gif\" width=\"16\" height=\"16\" title=\"" . $this->torrentName . "\" border=0></a></td>\n";
$output .= " <td bgcolor=\"" . $bg . "\"><a href=\"dispatcher.php?action=urlUpload&type=torrent&url=" . $this->torrentFile . "\" title=\"" . $this->torrentName . "\">" . $this->torrentDisplayName . "</a></td>\n";
if (strlen($this->MainCategory) > 1) {
$genre = "<a href=\"" . $searchURL . "&mainGenre=" . $this->MainId . "\">" . $this->MainCategory . "</a>";
} else {
$genre = "";
}
$output .= " <td bgcolor=\"" . $bg . "\">" . $genre . "</td>\n";
$output .= " <td bgcolor=\"" . $bg . "\" align=right>" . $this->torrentSize . "</td>\n";
$output .= " <td bgcolor=\"" . $bg . "\" align=center>" . $this->Seeds . "</td>\n";
$output .= " <td bgcolor=\"" . $bg . "\" align=center>" . $this->Peers . "</td>\n";
if ($this->needsWait) {
$output .= " <td bgcolor=\"" . $bg . "\" align=center>" . $this->waitTime . "</td>\n";
}
$output .= " <td bgcolor=\"" . $bg . "\" align=center>" . $this->fileLife . "</td>\n";
$output .= " <td bgcolor=\"" . $bg . "\" align=center>" . $this->torrentStatus . "</td>\n";
$output .= "</tr>\n";
return $output;
}
开发者ID:sulaweyo,项目名称:torrentflux-b4rt-php7,代码行数:22,代码来源:Filemp3Engine.php
示例3: getImagesPath
<div class="main-box-body clearfix">
<div class="form-group">
<label for="exampleInputEmail1">Capa</label>
<input type="file" class="filestyle" name="cover_photo" value="<?php
echo @$database_post->cover_photo;
?>
" data-buttonBefore="true" data-buttonText=" Procurar Arquivo" />
</div>
<div class="col-md-2 ">
<?php
if (isset($database_post->cover_photo)) {
?>
<div class="bootstrap-filestyle input-group">
<img src="<?php
echo getImagesPath() . $database_post->cover_photo;
?>
" class="img_holder" />
</div>
<?php
}
?>
</div>
</div>
<div class="main-box-body clearfix">
<div class="form-group">
<label for="exampleInputEmail1">Texto</label>
<textarea class="form-control ckeditor" name="entry" rows="8" name="input">
<?php
echo @$database_post->entry;
开发者ID:caina,项目名称:pando,代码行数:30,代码来源:post.php
示例4: BuildOutput
function BuildOutput($bg, $searchURL = '', $maxDisplayLength = 80)
{
if (strlen($this->torrentDisplayName) > $maxDisplayLength) {
$this->torrentDisplayName = substr($this->torrentDisplayName, 0, $maxDisplayLength - 3) . "...";
}
if (strpos($this->torrentFile, "www.torrentday.me") === false) {
$this->torrentFile = "http://www.torrentday.me/" . $this->torrentFile;
}
$output = "<tr>\n";
$output .= "\t<td width=\"16\" bgcolor=\"" . $bg . "\"><a href=\"dispatcher.php?action=urlUpload&type=torrent&url=" . $this->torrentFile . "\"><img src=\"" . getImagesPath() . "download_owner.gif\" width=\"16\" height=\"16\" title=\"" . $this->torrentName . "\" bsort=0></a></td>\n";
$output .= "\t<td bgcolor=\"" . $bg . "\"><a href=\"dispatcher.php?action=urlUpload&type=torrent&url=" . $this->torrentFile . "\" title=\"" . $this->torrentName . "\">" . $this->torrentDisplayName . "</a></td>\n";
if (strlen($this->MainCategory) > 1) {
if (strlen($this->SubCategory) > 1) {
$mainGenre = "<a href=\"" . $searchURL . "&mainGenre=" . $this->MainId . "\">" . $this->MainCategory . "</a>";
$subGenre = "<a href=\"" . $searchURL . "&subGenre=" . $this->SubId . "\">" . $this->SubCategory . "</a>";
$genre = $mainGenre . "-" . $subGenre;
} else {
$genre = "<a href=\"" . $searchURL . "&mainGenre=" . $this->MainId . "\">" . $this->MainCategory . "</a>";
}
} else {
$genre = "<a href=\"" . $searchURL . "&subGenre=" . $this->SubId . "\">" . $this->SubCategory . "</a>";
}
$output .= "\t<td bgcolor=\"" . $bg . "\">" . $genre . "</td>\n";
$output .= "\t<td bgcolor=\"" . $bg . "\" align=right>" . $this->torrentSize . "</td>\n";
$output .= "\t<td bgcolor=\"" . $bg . "\" align=center>" . $this->dateAdded . "</td>\n";
$output .= "\t<td bgcolor=\"" . $bg . "\" align=center>" . $this->Seeds . "</td>\n";
$output .= "\t<td bgcolor=\"" . $bg . "\" align=center>" . $this->Peers . "</td>\n";
$output .= "</tr>\n";
return $output;
}
开发者ID:ThYpHo0n,项目名称:torrentflux,代码行数:30,代码来源:TorrentDayEngine.php
示例5: BuildOutput
function BuildOutput($bg, $searchURL = '', $maxDisplayLength = 80)
{
if (strlen($this->torrentDisplayName) > $maxDisplayLength) {
$this->torrentDisplayName = substr($this->torrentDisplayName, 0, $maxDisplayLength - 3) . "...";
}
$output = "<tr>\n";
$output .= "\t<td width=16 bgcolor=\"" . $bg . "\"><a href=\"dispatcher.php?action=urlUpload&type=torrent&url=" . urlencode($this->torrentFile) . "\"><img src=\"" . getImagesPath() . "download_owner.gif\" width=\"16\" height=\"16\" title=\"" . $this->torrentName . "\" border=0></a></td>\n";
$output .= "\t<td bgcolor=\"" . $bg . "\"><a href=\"dispatcher.php?action=urlUpload&type=torrent&url=" . urlencode($this->torrentFile) . "\" title=\"" . $this->torrentName . "\">" . $this->torrentDisplayName . "</a></td>\n";
if (strlen($this->MainCategory) > 1) {
$genre = $this->MainCategory;
//$genre = "<a href=\"".$searchURL."&mainGenre=".$this->MainId."\">".$this->MainCategory."</a>";
} else {
$genre = "";
}
$output .= "\t<td bgcolor=\"" . $bg . "\">" . $genre . "</td>\n";
$output .= "\t<td bgcolor=\"" . $bg . "\" align=right>" . $this->torrentSize . "</td>\n";
$output .= "\t<td bgcolor=\"" . $bg . "\" align=center>" . $this->Seeds . "</td>\n";
$output .= "\t<td bgcolor=\"" . $bg . "\" align=center>" . $this->Peers . "</td>\n";
$output .= "\t<td bgcolor=\"" . $bg . "\" align=center>" . $this->torrentStatus . "</td>\n";
$output .= "</tr>\n";
return $output;
}
开发者ID:ThYpHo0n,项目名称:torrentflux,代码行数:22,代码来源:ItomaEngine.php
示例6: BuildOutput
function BuildOutput($bg, $searchURL)
{
$output = "<tr>\n";
$output .= " <td width=16 bgcolor=\"" . $bg . "\"><a href=\"dispatcher.php?action=urlUpload&type=torrent&url=" . $this->torrentFile . "\"><img src=\"" . getImagesPath() . "download_owner.gif\" width=\"16\" height=\"16\" title=\"" . $this->torrentName . "\" border=0></a></td>\n";
$output .= " <td bgcolor=\"" . $bg . "\"><a href=\"dispatcher.php?action=urlUpload&type=torrent&url=" . $this->torrentFile . "\" title=\"" . $this->torrentName . "\">" . $this->torrentDisplayName . "</a></td>\n";
if (strlen($this->MainCategory) > 1) {
if (strlen($this->SubCategory) > 1) {
$mainGenre = "<a href=\"" . $searchURL . "&mainGenre=" . $this->MainId . "\">" . $this->MainCategory . "</a>";
$subGenre = "<a href=\"" . $searchURL . "&subGenre=" . $this->SubId . "\">" . $this->SubCategory . "</a>";
$genre = $mainGenre . "-" . $subGenre;
} else {
$genre = "<a href=\"" . $searchURL . "&mainGenre=" . $this->MainId . "\">" . $this->MainCategory . "</a>";
}
} else {
$genre = "<a href=\"" . $searchURL . "&subGenre=" . $this->SubId . "\">" . $this->SubCategory . "</a>";
}
$output .= " <td bgcolor=\"" . $bg . "\">" . $genre . "</td>\n";
$output .= " <td bgcolor=\"" . $bg . "\" align=right>" . $this->torrentSize . "</td>\n";
$output .= " <td bgcolor=\"" . $bg . "\" align=center>" . $this->Seeds . "</td>\n";
$output .= " <td bgcolor=\"" . $bg . "\" align=center>" . $this->Peers . "</td>\n";
$output .= "</tr>\n";
if (!empty($this->dateAdded)) {
$output .= "<tr bgcolor=\"\"> <td colspan=\"6\" align=center>" . $this->dateAdded . "</td></tr>\n";
}
return $output;
}
开发者ID:sulaweyo,项目名称:torrentflux-b4rt-php7,代码行数:26,代码来源:DemonoidEngine.php
示例7: generateMapImages
//.........这里部分代码省略.........
if ($SW_marker_x > $SW_X_LIMIT && $SW_marker_y < $SW_Y_LIMIT && $NE_marker_x < $NE_X_LIMIT && $NE_marker_y > $NE_Y_LIMIT) {
break;
} else {
$zoom--;
}
}
//This iteration is to determine the x and y co-ordinates with the final
//calculated zoom
$dirIds = array();
$dirXYDetails = array();
foreach ($dirs as $d) {
$dbObj->bindParams(array($d->id));
$stopDetails = $dbObj->get_row("SELECT * FROM stop WHERE id =\n (SELECT stop_id FROM stop_direction_map\n WHERE direction_id = ? {$versionClause}\n ORDER BY position DESC LIMIT 1) {$versionClause}");
$target_y = Google_Maps::LatToY($stopDetails->latitude);
$target_x = Google_Maps::LonToX($stopDetails->longitude);
$delta_x = $target_x - $center_x >> 21 - $zoom;
$delta_y = $target_y - $center_y >> 21 - $zoom;
$marker_x = $center_offset_x + $delta_x;
$marker_y = $center_offset_y + $delta_y;
//print "Route:".$routeObj->getTag()." | Direction: ".$d->tag." | zoom:".($zoom)." | x:$marker_x | y:$marker_y<br />";
$dirXYDetails[$d->tag] = array('x' => $marker_x, 'y' => $marker_y);
$dirIds[] = $d->id;
}
$routeNode->addAttribute("center", "{$lat_avg},{$lon_avg}");
$routeNode->addAttribute("zoom", $zoom);
//Get the path co-ordinates
//We fetch the direction with the largest number of stops and draw a
//path for that
$dirWithStops = $dbObj->get_results("SELECT direction_id, COUNT(*) as stops\n FROM stop_direction_map\n WHERE direction_id IN (" . implode(",", $dirIds) . ") {$versionClause}\n GROUP BY direction_id\n ORDER BY stops DESC");
//$dbObj->debug();
$dirStopsArray = array();
foreach ($dirWithStops as $dirStops) {
$skipCondition = $dirStops->stops % 2 == 0 ? " AND mod(b.position, 2) = 0 " : " AND mod(b.position, 2) = 1 ";
$stopsForPath = $dbObj->get_results("SELECT a.tag, b.position, a.latitude, a.longitude\n FROM stop AS a, stop_direction_map AS b\n WHERE a.id=b.stop_id AND a.id IN\n (SELECT stop_id\n FROM stop_direction_map\n WHERE direction_id = " . $dirStops->direction_id . " {$versionClause})\n AND b.direction_id = " . $dirStops->direction_id . $skipCondition . " AND a.version={$version}\n ORDER BY b.position DESC");
//$dbObj->debug();exit;
$pathArray = array();
foreach ($stopsForPath as $sp) {
$pathArray[] = $sp->latitude . "," . $sp->longitude;
}
if ("actransit" == $agencyTitle) {
$pathColor = "0x008969";
} elseif ("sf-muni" == $agencyTitle) {
$pathColor = "0xC74F3A";
}
$getParamStr = "path=weight:" . PATH_LINE_WEIGHT . "|" . getPathString($pathArray);
$dirStopsArray[$dirStops->direction_id] = $getParamStr;
}
//Get the image from the Google Static Maps API
$url = "http://maps.google.com/maps/api/staticmap?center={$lat_avg},{$lon_avg}&zoom={$zoom}&size=" . MAP_SIZE_X . "x" . MAP_SIZE_Y . "&maptype=roadmap&sensor=false&" . implode("&", $dirStopsArray);
$pngImgFileName = $agencyTitle . "_" . $routeObj->getTag() . ".png";
if (!file_exists($basePathOrig)) {
//print $basePathOrig;exit;
Util::createDir($basePathOrig);
}
$filePath = $basePathOrig . $pngImgFileName;
//print "$url<br />$fileName<br /><br />";
if (!copy($url, $filePath)) {
$logStr = "Failed to copy {$fileName} \n";
$logger->log($logStr, Logger::WARN, "IMAGE");
}
//Crop the image
$intermediateImg_Y = MAP_SIZE_Y / 2 + round((FINAL_MAP_SIZE_Y - TOP_EDGE - BOTTOM_EDGE) / 2) + BOTTOM_EDGE;
$intermediateImg = imagecreatetruecolor(MAP_SIZE_X, $intermediateImg_Y);
list($current_width, $current_height) = getimagesize($filePath);
if (!imagecopy($intermediateImg, imagecreatefrompng($filePath), 0, 0, 0, 0, $current_width, $current_height)) {
$logStr = "Failed to crop and copy image [{$filePath}]";
$logger->log($logStr, Logger::WARN, "IMAGE");
}
$fileName = $agencyTitle . "_" . $routeObj->getTag() . ".jpg";
$newFilePath = $basePathConverted . $fileName;
$startFromTop_Y = $intermediateImg_Y - FINAL_MAP_SIZE_Y;
$newImage = imagecreatetruecolor(MAP_SIZE_X, FINAL_MAP_SIZE_Y);
if (!imagecopy($newImage, $intermediateImg, 0, 0, 0, $startFromTop_Y, MAP_SIZE_X, FINAL_MAP_SIZE_Y)) {
$logStr = "Failed to crop and copy image [{$newFilePath}]";
$logger->log($logStr, Logger::WARN, "IMAGE");
} else {
imagejpeg($newImage, $newFilePath);
}
imagedestroy($newImage);
imagedestroy($intermediateImg);
//Add file name to zip file contents array
$zipFileContents[] = $newFilePath;
foreach ($dirXYDetails as $dirTag => $xyDetails) {
$dirFinalY = $xyDetails['y'] - $startFromTop_Y;
$dirNode = $routeNode->addChild("direction");
$dirNode->addAttribute("tag", $dirTag);
$dirNode->addAttribute("x", $xyDetails['x']);
$dirNode->addAttribute("y", $dirFinalY);
}
$routeNode->addAttribute("yCropPixels", $startFromTop_Y);
sleep(1);
//if($cnt++ == 1) { break;}
}
}
$fileName = Util::getBaseDirectoryPath(Util::IMAGE_FILE) . "map_overlay_coordinates.xml";
Util::prettyPrintXml($xml, $fileName);
//Create the zip file
$zipFileContents[] = $fileName;
Util::createZip($zipFileContents, getImagesPath(), true);
}
开发者ID:nikhilpatel1989,项目名称:Transporter-Server,代码行数:101,代码来源:map_images.php
示例8: BuildOutput
function BuildOutput($bg, $langFILE, $searchURL = '')
{
$output = "<tr>\n";
$output .= " <td width=16 bgcolor=\"" . $bg . "\"><a href=\"dispatcher.php?action=urlUpload&type=torrent&url=" . $this->torrentFile . "\"><img src=\"" . getImagesPath() . "download_owner.gif\" width=\"16\" height=\"16\" title=\"" . $this->torrentName . "\" border=0></a></td>\n";
$output .= " <td bgcolor=\"" . $bg . "\"><a href=\"dispatcher.php?action=urlUpload&type=torrent&url=" . $this->torrentFile . "\" title=\"" . $this->torrentName . "\">" . $this->torrentDisplayName . "</a>";
switch ($this->torrentStatus) {
case "R":
$output .= " <span title='Registration needed'><b>R</b></span>";
break;
case "P":
$output .= " <span title='Password needed'><b>P</b></span>";
break;
}
$output .= "</td>\n";
if (strlen($this->MainCategory) > 1) {
if (strlen($this->SubCategory) > 1) {
$mainGenre = "<a href=\"" . $searchURL . "&mainGenre=" . $this->MainId . "\">" . $this->MainCategory . "</a>";
$subGenre = "<a href=\"" . $searchURL . "&subGenre=" . $this->SubId . "\">" . $this->SubCategory . "</a>";
$genre = $mainGenre . "-" . $subGenre;
} else {
$genre = "<a href=\"" . $searchURL . "&mainGenre=" . $this->MainId . "\">" . $this->MainCategory . "</a>";
}
} else {
$genre = "<a href=\"" . $searchURL . "&subGenre=" . $this->SubId . "\">" . $this->SubCategory . "</a>";
}
$output .= " <td bgcolor=\"" . $bg . "\">" . $genre . "</td>\n";
$output .= " <td bgcolor=\"" . $bg . "\" align=right>" . $this->torrentSize . "</td>\n";
$output .= " <td bgcolor=\"" . $bg . "\" align=center>" . $this->Seeds . "</td>\n";
$output .= " <td bgcolor=\"" . $bg . "\" align=center>" . $this->Peers . "</td>\n";
$output .= "</tr>\n";
return $output;
}
开发者ID:sulaweyo,项目名称:torrentflux-b4rt-php7,代码行数:32,代码来源:TorrentSpyEngine.php
示例9: form_single_upload
function form_single_upload($data = '', $value = '', $label = '', $extra = '', $tooltip = '')
{
$defaults = array('name' => !is_array($data) ? $data : '', 'cols' => '40', 'rows' => '10');
$name = is_array($data) ? $data['name'] : $data;
// $textarea = "<textarea "._parse_form_attributes($data, $defaults).$extra.">".form_prep($val, $name)."</textarea>";
// return "<textarea "._parse_form_attributes($data, $defaults).$extra.">".form_prep($val, $name)."</textarea>";
$label = empty($label) ? isset($data['label']) ? $data['label'] : "" : $label;
$error = '';
if (function_exists('form_error')) {
if (form_error($defaults['name'])) {
$error = ' error';
$tooltip = '<span class="help-inline">' . form_error($defaults['name']) . '</span>' . PHP_EOL;
}
}
// dump($data);die;
$size = isset($data['options']->size) ? $data['options']->size : "";
list($w, $h) = explode("x", $size);
$file_image_path = "http://www.placehold.it/{$size}/EFEFEF/AAAAAA";
if (!empty($data['value'])) {
$file_image_path = base_url($data['options']->image_path . $data['value']);
}
// dump($data);
$img = "";
if ($data['value']) {
$img = "<img src='" . getImagesPath() . "/{$data['value']}' />";
}
$w = $w > 300 ? 300 : $w;
$h = $h > 200 ? 200 : $h;
$output = <<<EOL
<div class="form-group example-twitter-oss">
\t<label for="id_for">{$label}</label>
\t<div class="col-lg-12">
\t \t<div class="fileinput fileinput-new" data-provides="fileinput">
\t\t <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 150px; height: 100px;">
\t\t\t{$img}
\t\t </div>
\t\t <div>
\t\t <span class="btn btn-default btn-file"><span class="fileinput-new">Selecione imagem</span>
\t\t <span class="fileinput-exists">Alterar</span>
\t\t <input type="file" value="{$data['value']}" name="{$data['id']}"></span>
\t\t <a href="#" class="btn btn-default fileinput-exists" data-dismiss="fileinput">Remover</a>
\t\t </div>
\t\t</div>
\t</div>
</div>
EOL;
// $output = <<<EOL
// <div class="form-group {$error}">
// <label class="col-lg-2 control-label" for="{$defaults['name']}">{$label}</label>
// <div class="col-lg-10">
// <div class="fileupload fileupload-new" data-provides="fileupload" data-name="{$name}">
// <div class="fileupload-new thumbnail" style="width: {$w}px; height: {$h}px;">
// <img src="{$file_image_path}" />
// </div>
// <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;"></div>
// <div>
// <span class="btn btn-file">
// <span class="fileupload-new">Selecione uma imagem</span>
// <span class="fileupload-exists">Change</span>
// <input type="file" />
// </span>
// <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remover</a>
// </div>
// </div>
// {$tooltip}
// </div>
// </div>
// EOL;
return $output;
}
开发者ID:caina,项目名称:pando,代码行数:73,代码来源:MY_form_helper.php
注:本文中的getImagesPath函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论