📄 sign.php
字号:
<?php
require_once '../../common.php';
$addr =$_SERVER["REQUEST_URI"];
$id = explode('?',$addr);
$uid = $id[1];
$query1= "select username,user_pic from ".$DBprefix."users where user_id='$uid'";
$result1=mysql_query($query1);
$data1=@mysql_Fetch_array($result1);
$name=$data1['username'];
$uuid="(UID:$uid)";
$pic=$data1['user_pic'];
$tem=explode("attachments",$pic);
$tem[1]="../../attachments".$tem[1];
if (!file_exists($tem[1]) || $tem[1]=="../../attachments")
$pic="images/noavatar.jpg";
if ($name) {
Header("Content-type: image/png");
$query = "select content_body,share_time from ".$DBprefix."share where user_name='$name' order by share_id desc limit 0,1";
$result=mysql_query($query);
$data=@mysql_Fetch_array($result);
$content=$data['content_body'];
$tem=explode("|et|",$content);
if ($tem[1]) {
$content=$tem[0];
}
$ctime=$data['share_time'];
$ctime=gmdate('Y-m-d H:i:s',$ctime+8*3600);
$sign="images/sign.png";
$img = imagecreatefrompng($sign);
$pic = imagecreatefromjpeg($pic);
imagecopy ($img, $pic, 10, 10, 0, 0, 96, 96 );
$textColor = ImageColorAllocate($img, 100,100,100);
if (strlen($content)>20) {
$content1=get_substr($content,0,20);
$content2=get_substr($content, 20,26);
$content3=get_substr($content,19,26);
if ($content3!=$content2)
$content2=$content3;
$content=$content1."\n".$content2."...";
}
if ($content=="") {
$content="尚未发表信息!";
$ctime=gmdate('Y-m-d H:i:s',time()+8*3600);
}
$string = iconv("GB2312", "UTF-8", "$name $uuid\n最后发表:$content\n发表时间:$ctime");
ImageTTFText($img,10,0,125,25,$textColor,"c:\windows\fonts\simhei.ttf",$string);
imagejpeg($img);
}
echo "无效的用户ID!";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -