本文整理汇总了PHP中getimage函数的典型用法代码示例。如果您正苦于以下问题:PHP getimage函数的具体用法?PHP getimage怎么用?PHP getimage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getimage函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getuser
">
<?php
$c = getuser($post['user_id']);
echo $c['username'];
?>
</a>
<span style="float:right">
<?php
echo " posted on " . $post['created'];
?>
</span>
</div>
<div class="panel-body" style="color:#191970">
<p class="text-center">
<?php
$a = getimage($post['image_id']);
if ($a) {
echo '<img class="panel" src="images/' . $a['filename'] . '">';
}
?>
</p>
<?php
echo $post['body'];
?>
</div>
</div>
</div>
</div>
</div>
<?php
}
示例2: phrase
<td colspan="' . $cols . '">' . phrase($phrase, $args) . '</td>
</tr>
';
}
////
$homedir = './';
if (get_magic_quotes_gpc()) {
array_walk($_GET, 'strip');
array_walk($_POST, 'strip');
array_walk($_REQUEST, 'strip');
}
if (array_key_exists('image', $_GET)) {
header('Content-Type: image/gif');
die(getimage($_GET['image']));
}
$delim = DIRECTORY_SEPARATOR;
if (function_exists('php_uname')) {
$win = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? true : false;
} else {
$win = ($delim == '\\') ? true : false;
}
if (!empty($_SERVER['PATH_TRANSLATED'])) {
$scriptdir = dirname($_SERVER['PATH_TRANSLATED']);
} elseif (!empty($_SERVER['SCRIPT_FILENAME'])) {
$scriptdir = dirname($_SERVER['SCRIPT_FILENAME']);
} elseif (function_exists('getcwd')) {
$scriptdir = getcwd();
} else {
$scriptdir = '.';
示例3: getid
function getid($studid)
{
global $img_w, $intname, $cardlogo, $cardsign;
//Function used to create the ID card
include "data.php";
$con = mysql_connect($DatabaseServer, $DatabaseUsername, $DatabasePassword);
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db($DatabaseName, $con);
$result = mysql_query("SELECT * FROM students s WHERE s.student_id = {$studid}");
//echo "SELECT * FROM students s WHERE s.student_id = $studid";
$row = mysql_fetch_array($result);
if ($cardlogo["showlogo"] && file_exists("assets/int_logo.jpg")) {
$logoi = "<img src=\"assets/int_logo.jpg\" class='logo' alt='logo' />";
}
if ($cardsign["text"]) {
$cardsign_text = "\n\t<td colspan='4'>\n\t\t<span>" . $cardsign["text"] . "</span><img src='assets/sign_.png' class='signature' />\n\t</td>\n\t\t\t";
}
return "\n\t\t\n<table width=\"100%\" border=\"0\">\n <tr>\n <td colspan='4'>\n\t\t<div class='cardheader'>\n\t\t\t{$logoi} <span class='intname'>{$intname}</span>\n\t\t</div>\n\t</td>\n </tr>\n <tr>\n <!--<td colspan='4'>\n\t\t<div class='cardheader'>\n\t\t</div>\n\t</td> -->\n </tr>\n <tr>\n \t<td width='" . ($img_w + 4) . "' rowspan=\"5\">\n\t\t" . getimage($studid) . "\n\t</td>\n <td width=\"5px\"> </td>\n <td colspan='1'>\n\t\t<span class='lname'>" . $row['last_name'] . ",</span><br />\n\t\t" . $row['first_name'] . ' ' . $row['middle_name'] . "\n\t</td>\n\t<td>\n\t\t<span class=\"right\">\n\t\t\t<span class='small'>Date of Birth</span><br />\n\t\t\t" . $row['birthdate'] . "\n\t\t</span>\n\t</td>\n </tr>\n <!--<tr>\n <td> </td>\n <td colspan='3'>\n\t\t" . $row['first_name'] . ' ' . $row['middle_name'] . "\n\t</td>\n </tr> -->\n <tr>\n <td> </td>\n <td colspan='1' valign=\"top\">\n\t\t<span class='small'>Student ID Number</span><br />\n\t\t<strong>" . $row[$_REQUEST["id2use"]] . "</strong>\n\t</td>\n\t<td>\n\t\t<span class=\"right\">\n\t\t<span class='small'>Expire Date</span><br />\n\t\t<span>" . $_REQUEST["expire_year"] . "-" . str_pad($_REQUEST["expire_month"], 2, "0", STR_PAD_LEFT) . "</span>\n\t\t</span>\n\t</td>\n </tr>\n <tr>\n <td> </td>\n\t{$cardsign_text}\n </tr>\n</table>\n\t\t";
//return $row['last_name'];
mysql_close($con);
}
示例4: storage_data
private function storage_data($video, $vod_config)
{
if ($video['column_id']) {
$publish_column = new publishconfig();
$column_id = $video['column_id'];
$column_id = $publish_column->get_columnname_by_ids('id,name', $column_id);
$column_id = serialize($column_id);
}
$channel_id = $video['channel_id'];
if ($video['create_time'] != -1) {
$create_time = strtotime($video['create_time']);
}
$pathinfo = pathinfo($video['filepath']);
//如果不存在分类就默认其分类与类型相同
$vod_leixing = $video['vod_leixing'] ? $video['vod_leixing'] : 1;
if (!$video['vod_sort_id'] || intval($video['vod_sort_id']) == -1) {
$video['vod_sort_id'] = $vod_leixing;
}
/************创建视频的权限控制**********/
if ($this->user['group_type'] > MAX_ADMIN_TYPE) {
$prms['_action'] = 'create';
$prms['node'] = $video['vod_sort_id'];
if (!$this->verify_self_prms($prms)) {
$this->errorOutput('NO_PRIVILEGE');
//$this->addItem(array('return' => 'fail'));
//$this->output();
}
}
foreach ($video as $k => $v) {
if (is_string($v)) {
$video[$k] = rawurldecode($v);
}
}
$data = array('cur_clarity' => $vod_config['unique_id'], 'title' => $video['title'] ? $video['title'] : $this->dir_info['original'], 'source' => $video['source'], 'subtitle' => $video['subtitle'], 'keywords' => $video['keywords'], 'weight' => $video['weight'], 'comment' => $video['comment'], 'author' => $video['author'], 'vod_leixing' => $vod_leixing, 'bitrate' => $vod_config['video_bitrate'], 'vod_sort_id' => $video['vod_sort_id'], 'is_allow' => $video['is_mark'], 'starttime' => $video['starttime'] ? strtotime($video['starttime']) : '', 'hostwork' => defined("TARGET_VIDEO_DOMAIN") ? 'http://' . ltrim(TARGET_VIDEO_DOMAIN, 'http://') : $this->settings['videouploads']['protocol'] . $this->settings['videouploads']['host'], 'source_hostwork' => defined("SOURCE_VIDEO_DOMIAN") ? 'http://' . ltrim(SOURCE_VIDEO_DOMIAN, 'http://') : '', 'source_base_path' => UPLOAD_DIR, 'source_path' => rtrim($pathinfo['dirname'], '/') . '/', 'source_filename' => $pathinfo['basename'], 'video_base_path' => TARGET_DIR, 'video_path' => $this->dir_info['target_dir'], 'video_filename' => $this->dir_info['output_filename'] . '.' . $this->dir_info['output_format'], 'channel_id' => $channel_id, 'column_id' => $column_id, 'from_appid' => $this->user['appid'], 'from_appname' => $this->user['display_name'], 'user_id' => $video['_user_id'] ? $video['_user_id'] : ($this->input['user_id'] ? $this->input['user_id'] : $this->user['user_id']), 'addperson' => $video['_user_name'] ? $video['_user_name'] : ($this->input['user_name'] ? $this->input['user_name'] : $this->user['user_name']), 'org_id' => $this->input['org_id'] ? $this->input['org_id'] : $this->user['org_id'], 'create_time' => $create_time ? $create_time : TIMENOW, 'update_time' => TIMENOW, 'ip' => hg_getip(), 'app_uniqueid' => $video['app_uniqueid'] ? $video['app_uniqueid'] : 'livmedia', 'mod_uniqueid' => $video['mod_uniqueid'] ? $video['mod_uniqueid'] : MOD_UNIQUEID, 'morebitrate_config_id' => $video['vod_config_id'], 'template_sign' => $video['template_sign']);
if ($video['is_time_shift']) {
$sql = "UPDATE " . DB_PREFIX . "vodinfo SET ";
} else {
$sql = " INSERT INTO " . DB_PREFIX . "vodinfo SET ";
}
foreach ($data as $k => $v) {
$sql .= " {$k} = '{$v}',";
}
$sql = trim($sql, ',');
if ($video['is_time_shift']) {
$sql .= ' WHERE id = ' . $video['id'];
}
$this->db->query($sql);
if ($video['is_time_shift']) {
$vid = $video['id'];
} else {
$vid = $this->db->insert_id();
}
//记录发布库栏目分发表
$this->update_pub_column($vid, $video['column_id']);
//记录发布库栏目分发表
if ($video['index_pic']) {
$material = new material();
$img_info = $material->localMaterial($video['index_pic'], $vid);
$img_info = $img_info[0];
} else {
//获取一张截图,并且提交到图片服务器
$img_info = getimage(UPLOAD_DIR . $video['filepath'], TARGET_DIR . $this->dir_info['target_dir'], $vid);
if (!$img_info || !$img_info['filename']) {
if ($this->settings['App_live'] && $channel_id) {
include_once ROOT_PATH . 'lib/class/live.class.php';
$live = new live();
$channelinfo = $live->getChannelById($channel_id, 1, 1);
if ($channelinfo && $channelinfo[0] && $channelinfo[0]['snap']) {
$img_info = $channelinfo[0]['snap'];
}
}
}
}
if ($img_info && is_array($img_info)) {
$image_info = array('host' => $img_info['host'], 'dir' => $img_info['dir'], 'filepath' => $img_info['filepath'], 'filename' => $img_info['filename'], 'imgwidth' => $img_info['imgwidth'], 'imgheight' => $img_info['imgheight']);
} else {
$image_info = array();
}
$sql = " UPDATE " . DB_PREFIX . "vodinfo SET video_order_id = {$vid},img_info = '" . serialize($image_info) . "' WHERE id = {$vid}";
$this->db->query($sql);
//存储vod_extend表
if ($video['content_id']) {
$extend_data = array('vodinfo_id' => $vid, 'content_id' => $video['content_id'], 'extend_data' => $video['extend_data']);
$sql = " INSERT INTO " . DB_PREFIX . "vod_extend SET ";
foreach ($extend_data as $k => $v) {
$sql .= " {$k} = '{$v}',";
}
$sql = trim($sql, ',');
$this->db->query($sql);
}
//加入日志
$data['id'] = $vid;
$this->addLogs('创建视频', '', $data, $data['title']);
return array('vid' => $vid, 'img_info' => $image_info);
}
示例5: foreach
if ($Num_Rows <= $Per_Page) {
$Num_Pages = 1;
} else {
if ($Num_Rows % $Per_Page == 0) {
$Num_Pages = $Num_Rows / $Per_Page;
} else {
$Num_Pages = $Num_Rows / $Per_Page + 1;
$Num_Pages = (int) $Num_Pages;
}
}
$sql .= " limit {$Page_Start} , {$Per_Page}";
//$myrows = $wpdb->get_results($sql);
$myrows = $tkeqry;
// echo "<pre>";
foreach ($myrows as $key => $values) {
$ntr_images = getimage($values->MLS);
if (empty($ntr_images)) {
$ntr_images = 'imgres.png';
}
// echo $urls = get_bloginfo('url');
?>
<div class="property_div property clearfix">
<div class="wpp_overview_left_column">
</div>
<div class="property_div property clearfix">
<div class="wpp_overview_right_column fullcon">
<ul class="wpp_overview_data">
<?php
示例6: header
<?php
include 'controller/registrationConnection.php';
if (!isset($_SESSION['islogin'])) {
header('Location: index.php');
exit;
} else {
$photo = '';
$fullname = '';
if (isset($_SESSION['firstname'])) {
$fullname = $_SESSION['firstname'] . " " . $_SESSION['lastname'];
$id = $_SESSION['user_id'];
getimage($id);
}
if (isset($_SESSION['photo'])) {
$photo = $_SESSION['photo'];
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Arts Results</title>
<script>
window.onload=function()
{
var url = "controller/dataController.php?action=getNoneRegisteredArtClinics";
$.getJSON(url,function(result){
for (var i = 0; i < result.length; i++) {
var c = result[i];
display(c);
示例7: upload_pic_js
include_once 'ressources/class.system.network.inc';
//freeweb_slashsquid
if (isset($_GET["upload-pic-js"])) {
upload_pic_js();
exit;
}
if (isset($_GET["upload-pic-popup"])) {
upload_pic_popup();
exit;
}
if (isset($_GET['TargetpathUploaded'])) {
upload_form_perform();
exit;
}
if (isset($_GET["getimage"])) {
getimage();
exit;
}
if (isset($_POST["servername"])) {
save();
exit;
}
page();
function page()
{
$tpl = new templates();
$page = CurrentPageName();
$q = new mysql();
$servername = $_GET["servername"];
$q = new mysql();
$t = time();
示例8: saveimage
function saveimage($photoname, $image, $id)
{
$db = new PDO('mysql:host=localhost;dbname=spoarts', "root", "");
$sql = "UPDATE clients SET photoName = ?, photo = ? WHERE UserID = ?";
$cmd = $db->prepare($sql);
$cmd->execute(array($photoname, $image, $id));
$db = null;
getimage($id);
return "Image uploaded";
}
示例9: array_walk
* For example: 0604 would be '-rw----r--'.
*/
# $filepermission = 0604;
/* Filenames related to the apache web server:
*/
$htaccess = '.htaccess';
$htpasswd = '.htpasswd';
/* ------------------------------------------------------------------------- */
if (ini_get("magic_quotes_gpc") !== false and get_magic_quotes_gpc()) {
array_walk($_GET, 'strip');
array_walk($_POST, 'strip');
array_walk($_REQUEST, 'strip');
}
if (array_key_exists('image', $_GET)) {
header('Content-Type: image/gif');
exit(getimage($_GET['image']));
}
if (!function_exists('lstat')) {
function lstat($filename)
{
return stat($filename);
}
}
$delim = DIRECTORY_SEPARATOR;
if (function_exists('php_uname')) {
$win = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? true : false;
} else {
$win = $delim == '\\' ? true : false;
}
if (!empty($_SERVER['SCRIPT_FILENAME'])) {
$scriptdir = dirname($_SERVER['SCRIPT_FILENAME']);
示例10: file
© 2014
<?php
$prov_array = file("proverbs.txt", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$proverbcount = count($prov_array);
$index = rand(0, $proverbcount - 1);
echo "A randomly displayed Chinese proverb read from a text file<br />";
echo $prov_array[$index] . "<br />";
echo "<img src=" . getimage() . ">";
function getimage()
{
$files = glob("images/Dragon*.png");
shuffle($files);
return $files['0'];
}
示例11: userLogin
function userLogin($data)
{
$db = db();
$sql = "SELECT UserName,Password,UserID,UserType FROM user_accounts WHERE UserName = ? AND Password = ?";
$cmd = $db->prepare($sql);
$cmd->execute(array($data['user_login_username'], md5($data['user_login_password'])));
$result = $cmd->fetch();
$db = null;
if ($result) {
if ($result['UserType'] == "client") {
$_SESSION['islogin'] = true;
$_SESSION['user_id'] = $result['UserID'];
$_SESSION['username'] = $result['UserName'];
$_SESSION['password'] = $result['Password'];
$_SESSION['usertype'] = $result['UserType'];
getClientDetails($_SESSION['user_id']);
$id = userID();
getimage($id);
return 0;
} else {
if ($result['UserType'] == "service provider") {
//if(checkSubscription($result['UserID'])=='true'){
$_SESSION['islogin'] = true;
$_SESSION['user_id'] = $result['UserID'];
$_SESSION['username'] = $result['UserName'];
$_SESSION['password'] = $result['Password'];
$_SESSION['usertype'] = $result['UserType'];
getSPDetails($_SESSION['user_id']);
$id = userID();
getSPimage($id);
return 1;
//}
//else
//{
//return "Expired.";
//}
}
}
} else {
return "Incorrect username or password.";
}
}