当前位置: 首页>>代码示例>>PHP>>正文


PHP showImage函数代码示例

本文整理汇总了PHP中showImage函数的典型用法代码示例。如果您正苦于以下问题:PHP showImage函数的具体用法?PHP showImage怎么用?PHP showImage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了showImage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processRequest

function processRequest()
{
    // if POST
    // -> handle Upload
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
        header('Content-type: application/json');
        echo json_encode(processUpload());
    } else {
        $imageId = getRequestParameter("img");
        header("Content-type: image/jpeg");
        echo showImage($imageId);
    }
}
开发者ID:khanab85,项目名称:OmniChannelDemo,代码行数:13,代码来源:index.php

示例2: getBranch

 public function getBranch()
 {
     $branches = Branch::all();
     return Datatables::of($branches)->edit_column('image', function ($row) {
         if (!empty($row->image)) {
             return showImage($row->image, BRANCH_IMAGE . showDate($row->created, 1));
         }
     })->edit_column('status', function ($row) {
         return showSelectStatus($row->id, $row->status, 'Kacana.product.branch.setStatusBranch(' . $row->id . ', 1)', 'Kacana.product.branch.setStatusBranch(' . $row->id . ', 0)');
     })->edit_column('created', function ($row) {
         return showDate($row->created);
     })->edit_column('updated', function ($row) {
         return showDate($row->updated);
     })->add_column('action', function ($row) {
         return showActionButton('Kacana.product.branch.showEditBranchForm(' . $row->id . ')', 'Kacana.product.branch.removeBranch(' . $row->id . ')', true);
     })->make(true);
 }
开发者ID:kacana,项目名称:kacana.com,代码行数:17,代码来源:BranchController.php

示例3: getProduct

 /**
  * get products
  *
  * @return Response
  */
 public function getProduct()
 {
     $products = Product::all();
     return Datatables::of($products)->edit_column('image', function ($row) {
         if (!empty($row->image)) {
             return showImage($row->image, PRODUCT_IMAGE . $row->id);
         }
     })->edit_column('status', function ($row) {
         return showSelectStatus($row->id, $row->status, 'Kacana.product.setStatus(' . $row->id . ', 1)', 'Kacana.product.setStatus(' . $row->id . ', 0)');
     })->edit_column('created', function ($row) {
         return showDate($row->created);
     })->edit_column('updated', function ($row) {
         return showDate($row->updated);
     })->add_column('action', function ($row) {
         return showActionButton("/product/editProduct/" . $row->id, 'Kacana.product.removeProduct(' . $row->id . ')', false, false);
     })->make(true);
 }
开发者ID:kacana,项目名称:admin,代码行数:22,代码来源:ProductController.php

示例4: getUser

 public function getUser()
 {
     $users = User::all();
     return Datatables::of($users)->edit_column('image', function ($row) {
         if (!empty($row->image)) {
             return showImage($row->image, PRODUCT_IMAGE . $row->id);
         }
     })->edit_column('status', function ($row) {
         return showSelectStatus($row->id, $row->status, 'Kacana.user.setStatus(' . $row->id . ', 1)', 'Kacana.user.setStatus(' . $row->id . ', 0)');
     })->edit_column('created', function ($row) {
         return showDate($row->created);
     })->edit_column('updated', function ($row) {
         return showDate($row->updated);
     })->add_column('action', function ($row) {
         return showActionButton('Kacana.user.show(' . $row->id . ')', 'Kacana.product.branch.removeBranch(' . $row->id . ')', true);
     })->make(true);
 }
开发者ID:kacana,项目名称:admin,代码行数:17,代码来源:UserController.php

示例5: include

<?php include('rotator.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<body>

<p>Reload to see a random image.</p>

<?php showImage(); ?>

</body>
</html>
开发者ID:rlbloxsom,项目名称:rlbloxsom.github.com,代码行数:10,代码来源:index_rotator.php

示例6: sanitizeString

if (isset($_GET['page'])) {
    $page = sanitizeString($_GET['page']);
}
$offset = ($page - 1) * $num_per_page;
$query = "SELECT * FROM messages WHERE recip='{$view}' ORDER BY time DESC LIMIT {$num_per_page} OFFSET {$offset}";
$result = queryMysql($query);
$num = $result->num_rows;
$end = min($num, $num_per_page);
if ($num) {
    echo "<p class='page'>page ";
    $href = "messages.php?view={$view}";
    showPage($page, $pages, $href);
    for ($i = 0; $i < $end; $i++) {
        $row = $result->fetch_array(MYSQLI_ASSOC);
        if ($row['pm'] == 0 || strtolower($row['auth']) == strtolower($user) || strtolower($row['recip']) == strtolower($user)) {
            echo "<div class='message clearfix'><a href='members.php?view=" . $row['auth'] . "'>" . showImage($row['auth']) . "<div class='message-text'>" . $row['auth'] . "</a>";
            // public messages
            if ($row['pm'] == 0) {
                echo " wrote: &quot;" . $row['message'] . "&quot;";
            } else {
                echo " whispered: <span class='whisper'><i>&quot;" . $row['message'] . "&quot;</i></span>";
            }
            if (strtolower($row['recip']) == strtolower($user)) {
                echo "<span class='action'>[<a href='messages.php?erase=" . $row['id'] . "'>erase</a>]</span>";
            }
            echo "<p class='date'>" . date('  M jS \'y g:ia', $row['time']) . "</p>";
            echo "</div></div>";
        }
    }
    echo "<p class='page'>page ";
    showPage($page, $pages, $href);
开发者ID:njuliuyun,项目名称:studygroup,代码行数:31,代码来源:messages.php

示例7: catch

    $pdo = $db->getPDO();
    $stmt = $pdo->prepare("SELECT image_id FROM image_data WHERE user_id = :user_id");
    try {
        $stmt->execute(array('user_id' => $user_id));
        $row = $stmt->fetchAll();
        return $row;
    } catch (Exception $e) {
        echo 'Message: ' . $e->getMessage() . '<br />';
    }
}
// end showUserImages
function showImage($image_id)
{
    $db = new DbAccess();
    $pdo = $db->getPDO();
    $stmt = $pdo->prepare("SELECT image_filename FROM image_data WHERE image_id = :image_id");
    try {
        $stmt->execute(array('image_id' => $image_id));
        $row = $stmt->fetch();
        return $row['image_filename'];
    } catch (Exception $e) {
        echo 'Message: ' . $e->getMessage() . '<br />';
    }
}
// end showImage
foreach (showUserImages(4571) as $key) {
    foreach ($key as $imggg) {
        echo showImage($imggg);
        echo '<img src="' . showImage($imggg) . '"/>' . '<br />';
    }
}
开发者ID:batica81,项目名称:travel,代码行数:31,代码来源:test.php

示例8: showImage

<table cellpadding="1" cellspacing="1" border="0" width="100%">

<form name="helpForm" action="<?php 
print $_SERVER['PHP_SELF'];
?>
" method="get" enctype="multipart/form-data">
<tr>
	<td colspan="2" width="100%">
		Use this to find directories and files which can be used below:
	</td>
</tr>
<tr>
	<td align="right">
		<a href="javascript:document.helpForm.submit();" title="browse tree">
<?php 
echo showImage('images/rc-gui-install-24.png', '24', '24');
?>
		</a>
	</td>
	<td>
		<input size="60" type="text" name="fileName" value="<?php 
print $filename;
?>
" class="text" />
	</td>
</tr>
<tr>
	<td>
		<input type="submit" name="helpdata" value="close" class="button" onclick="window.close();" />
	</td>
	<td align="right">
开发者ID:TTsWeb,项目名称:phptvdb,代码行数:31,代码来源:file_dialog.php

示例9: foreach

            <!-- 相册 -->
            <table id="image_table" width="100%" class="form_table" align="center" style="display:none;">
            	<tr><td><input id="add_image" type="button" value="添加一张" /></td></tr>
            	<tr><td>&nbsp;</td></tr>
            	<tr><td>
            	<ul id="image_ul">
	            	<?php 
foreach ($gpData as $k => $v) {
    ?>
		            	<li>
			            	<input pic_id="<?php 
    echo $v['id'];
    ?>
" type="button" value="删除" /><br />
			            	<?php 
    showImage($v['sm_image_url']);
    ?>
		            	</li>
	            	<?php 
}
?>
            	</ul>
            	</td></tr>
            	<tr><td>&nbsp;</td></tr>
            </table>
            <div class="button-div">
                <input type="submit" value=" 确定 " class="button"/>
                <input type="reset" value=" 重置 " class="button" />
            </div>
        </form>
    </div>
开发者ID:specialnginx,项目名称:admin.jdshop.com,代码行数:31,代码来源:df9397590741f3c74c3be1951b135195.php

示例10: popFile

function popFile($url, $width = 80, $ext = "jpg")
{
    if ($ext == "swf") {
        $url = showFlash($url, $width, 60) . "<br>" . "<a target='_blank' href={$url}>Full Screen</a>";
    } else {
        $url = "<a target='_blank' href={$url}>" . showImage($url, 80) . "</a>";
    }
    return $url;
}
开发者ID:BackupTheBerlios,项目名称:flushcms,代码行数:9,代码来源:FormObject.php

示例11: queryMysql

        queryMysql("INSERT INTO friends VALUES('{$user}', '{$add}')");
    }
} elseif (isset($_GET['remove'])) {
    $remove = sanitizeString($_GET['remove']);
    queryMysql("DELETE FROM friends WHERE user='{$user}' AND friend='{$remove}'");
}
// display members
$result = queryMysql("SELECT user FROM members ORDER BY user");
$num = $result->num_rows;
echo "<h3 class='title'>Other members</h3><div class='display'><ul>";
for ($i = 0; $i < $num; $i++) {
    $row = $result->fetch_array(MYSQLI_ASSOC);
    if (strtolower($row['user']) == strtolower($user)) {
        continue;
    }
    echo "<li class='clearfix'><a href='members.php?view=" . $row['user'] . "'>" . showImage($row['user']) . $row['user'] . "</a>";
    // check friend status
    $follow = "follow";
    $result1 = queryMysql("SELECT * FROM friends WHERE user='{$user}' AND friend='" . $row['user'] . "'");
    $t1 = $result1->num_rows;
    $result1 = queryMysql("SELECT * FROM friends WHERE user='" . $row['user'] . "' AND friend='{$user}'");
    $t2 = $result1->num_rows;
    if ($t1 + $t2 > 1) {
        echo "<span class='state'>&harr; is a mutual friend.</span>";
    } elseif ($t1) {
        echo "<span class='state'>&larr; you are following</span>";
    } elseif ($t2) {
        echo "<span class='state'>&rarr; is following you</span>";
        $follow = 'recip';
    }
    if (!$t1) {
开发者ID:njuliuyun,项目名称:studygroup,代码行数:31,代码来源:members.php

示例12: foreach

<?php

require VIEWS . '_layout/header.php';
?>
<div class="content">

  <div class="multimedia imagenes">
    <div id="accordion" style="width:100%">
    <?php 
foreach ($dirs as $i => $dir) {
    $path = !$i ? $dir : $dirs[0] . DIRECTORY_SEPARATOR . $dir;
    $gallery_imgs = scandir(PUBLICO . $path, 1);
    $cat = $dir == $dirs[0] ? 'índice' : $dir;
    echo "<h3>{$cat}</h3>";
    echo "<div>";
    foreach ($gallery_imgs as $id => $img) {
        $url = PUBLICO . $path . DIRECTORY_SEPARATOR . $img;
        if (isImageValid($url)) {
            $urlimg = URL . $path . DIRECTORY_SEPARATOR . $img;
            showImage($id, $urlimg);
        }
    }
    echo "</div>";
}
?>
          <!-- </div> -->
    </div>
  </div>
</div>
<?php 
require VIEWS . '_layout/footer.php';
开发者ID:GNURub,项目名称:daw2,代码行数:31,代码来源:imagenes.php

示例13: showImage

<h1><?php 
echo $_SESSION['pengar'];
?>
 € jäljellä</h1>

<form method="POST">
<h2 id="betsize">Panos: <?php 
echo $_SESSION['bet'];
?>
</h2>
<input type="range" min="10" max="100" name="bet" value="<?php 
echo $_SESSION['bet'];
?>
" onchange="document.getElementById('betsize').innerHTML = 'Panos: ' + value">
<button type="submit" name="run" class="full">Pelaa!</button>
</form>


<?php 
if (isset($_POST['run'])) {
    for ($i = 0; $i < $quantity; $i++) {
        echo showImage($nums[$i]);
    }
}
if ($_SESSION['won'] != '') {
    echo "<script>alert('" . $_SESSION['won'] . "');</script>";
}
?>
</body>

</html>
开发者ID:tarvainen,项目名称:iim50300,代码行数:31,代码来源:indexp.php

示例14: array_diff

$following = array_diff($following, $mutual);
$friends = FALSE;
if (sizeof($mutual)) {
    echo "<span class='subhead'>{$name2} mutual friends</span><ul>";
    foreach ($mutual as $friend) {
        echo "<li class='clearfix'><a href='members.php?view={$friend}'>" . showImage($friend) . "{$friend}</a></li>";
    }
    echo "</ul>";
    $friends = TRUE;
}
if (sizeof($followers)) {
    echo "<span class='subhead'>{$name2} followers</span><ul>";
    foreach ($followers as $friend) {
        echo "<li class='clearfix'><a href='members.php?view={$friend}'>" . showImage($friend) . "{$friend}</a></li>";
    }
    echo "</ul>";
    $friends = TRUE;
}
if (sizeof($following)) {
    echo "<span class='subhead'>{$name3} following</span><ul>";
    foreach ($following as $friend) {
        echo "<li class='clearfix'><a href='members.php?view={$friend}'>" . showImage($friend) . "{$friend}</a></li>";
    }
    echo "</ul>";
    $friends = TRUE;
}
if (!$friends) {
    echo "<br>You don't have any friends yet.<br><br>";
}
echo "</div>";
include_once '../templates/footer.php';
开发者ID:njuliuyun,项目名称:studygroup,代码行数:31,代码来源:friends.php

示例15: getTrackArt

function getTrackArt()
{
    $display = new jzDisplay();
    $track =& new jzMediaTrack($_GET['jz_path'], "id");
    $album = $track->getAncestor("album");
    $art = $album->getMainArt(false, true, "audio", true);
    if ($_GET['type'] == 'xml') {
        echoXMLHeader();
        echo "      <track>\n";
        echo "        <name>" . xmlentities($track->getName()) . "</name>\n";
        echo "        <image>";
        if ($art) {
            echo xmlentities($display->returnImage($art, false, false, false, "limit", false, false, false, false, false, "0", false, true, true));
        }
        echo "        </image>\n";
        echo "        <thumbnail>";
        $art = $album->getMainArt('75x75', true, "audio", true);
        if ($art) {
            echo xmlentities($display->returnImage($art, false, 75, 75, "limit", false, false, false, false, false, "0", false, true, true));
        }
        echo "        </thumbnail>\n";
        echo "      </track>\n";
        echoXMLFooter();
    } else {
        showImage($art);
    }
}
开发者ID:jinzora,项目名称:jinzora3,代码行数:27,代码来源:api.php


注:本文中的showImage函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。