<?php
if(empty($fpj) || $fpj != "af0fb79757161256f2ee013df6a837d8"){
exit("DOING?");
}
function get_curl($url,$post=0,$referer=0,$cookie=0,$header=0,$ua=0,$nobaody=0){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$httpheader[] = "Accept:*/*";
$httpheader[] = "Accept-Encoding:gzip,deflate,sdch";
$httpheader[] = "Accept-Language:zh-CN,zh;q=0.8";
$httpheader[] = "Connection:close";
curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
if($post){
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
if($header){
curl_setopt($ch, CURLOPT_HEADER, TRUE);
}
if($cookie){
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
}
if($referer){
if($referer==1){
curl_setopt($ch, CURLOPT_REFERER, $_SERVER['HTTP_HOST']);
}else{
curl_setopt($ch, CURLOPT_REFERER, $referer);
}
}
if($ua){
curl_setopt($ch, CURLOPT_USERAGENT,$ua);
}else{
curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Linux; Android 4.4.2; NoxW Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36');
}
if($nobaody){
curl_setopt($ch, CURLOPT_NOBODY,1);
}
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$ret = curl_exec($ch);
curl_close($ch);
return $ret;
}
function real_ip(){
$ip = $_SERVER['REMOTE_ADDR'];
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && preg_match_all('#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}#s', $_SERVER['HTTP_X_FORWARDED_FOR'], $matches)) {
foreach ($matches[0] AS $xip) {
if (!preg_match('#^(10|172\.16|192\.168)\.#', $xip)) {
$ip = $xip;
break;
}
}
} elseif (isset($_SERVER['HTTP_CLIENT_IP']) && preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (isset($_SERVER['HTTP_CF_CONNECTING_IP']) && preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $_SERVER['HTTP_CF_CONNECTING_IP'])) {
$ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
} elseif (isset($_SERVER['HTTP_X_REAL_IP']) && preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $_SERVER['HTTP_X_REAL_IP'])) {
$ip = $_SERVER['HTTP_X_REAL_IP'];
}
return $ip;
}
function curl_post($url, $post){
$options = array(
CURLOPT_RETURNTRANSFER =>true,
CURLOPT_HEADER =>false,
CURLOPT_POST =>true,
CURLOPT_POSTFIELDS => $post,
);
$ch = curl_init($url);
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
function getblacktype($type){
if($type == 1){
return "QQ拉黑";
}
if($type == 2){
return "IP拉黑";
}
}
function wsyslog($logname,$logtxt){
global $DB;
$DB->query("insert into ayangw_syslog values(null,'$logname',now(),'$logtxt')");
}
function get_ip_city($ip)
{
$url = 'http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=json&ip=';
@$city = get_curl($url . $ip);
$city = json_decode($city, true);
if ($city['city']) {
$location = $city['province'].$city['city'];
} else {
$location = $city['province'];
}
if($location){
return $location;
}else{
return false;
}
}
function daddslashes($string, $force = 0, $strip = FALSE) {
!defined('MAGIC_QUOTES_GPC') && define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
if(!MAGIC_QUOTES_GPC || $force) {
if(is_array($string)) {
foreach($string as $key => $val) {
$string[$key] = daddslashes($val, $force, $strip);
}
} else {
$string = addslashes($strip ? stripslashes($string) : $string);
}
}
return $string;
}
function _ayangw($str){
$str = str_replace(">","",$str);
$str = str_replace("/","",$str);
$str = str_replace("<","",$str);
$str = str_replace(":","",$str);
$str = str_replace("'","",$str);
$str = str_replace(" ","",$str);
$str = str_replace("=","",$str);
$str = str_replace("||","",$str);
$str = str_replace("-","",$str);
$str = str_replace("#","",$str);
$str = str_replace("*","",$str);
$str = str_replace("?","",$str);
return $str;
}
function _ayangw2($str){
$str = str_replace("'","",$str);
$str = str_replace("\"","",$str);
return $str;
}
function upimgs($upfile){
$max_file_size=2000000; //上传文件大小限制, 单位BYTE
$destination_folder="../assets/goodsimg/"; //上传文件路径
$f="assets/goodsimg/";//图片名称
$watermark=1; //是否附加水印(1为加水印,其他为不加水印);
$watertype=1; //水印类型(1为文字,2为图片)
$waterposition=1; //水印位置(1为左下角,2为右下角,3为左上角,4为右上角,5为居中);
$waterstring="ayangw"; //水印字符串
$waterimg="xplore.gif"; //水印图片
$imgpreview=1; //是否生成预览图(1为生成,其他为不生成);
$imgpreviewsize=1/8; //缩略图比例
//上传文件类型列表
$uptypes=array(
'image/jpg',
'image/jpeg',
'image/png',
'image/pjpeg',
'image/gif',
'image/bmp',
'image/x-png'
);
if (!is_uploaded_file($upfile['tmp_name']))
//是否存在文件
{
return null;
exit;
}
$file = $upfile;
if($max_file_size < $file["size"])
//检查文件大小
{
return null;
exit;
}
if(!in_array($file["type"], $uptypes))
//检查文件类型
{
return null;
exit;
}
if(!file_exists($destination_folder))
{
mkdir($destination_folder);
}
$filename=$file["tmp_name"];
$image_size = getimagesize($filename);
$pinfo=pathinfo($file["name"]);
$ftype=$pinfo['extension'];
$destination = $destination_folder.time().".".$ftype;
if (file_exists($destination) && $overwrite != true)
{
return null;
exit;
}
if(!move_uploaded_file ($filename, $destination))
{
return null;
exit;
}
$pinfo=pathinfo($destination);
$fname=$pinfo['basename'];
return $f.$fname;//成功!
if($watermark==1)
{
$iinfo=getimagesize($destination,$iinfo);
$nimage=imagecreatetruecolor($image_size[0],$image_size[1]);
$white=imagecolorallocate($nimage,255,255,255);
$black=imagecolorallocate($nimage,0,0,0);
$red=imagecolorallocate($nimage,255,0,0);
imagefill($nimage,0,0,$white);
switch ($iinfo[2])
{
case 1:
$simage =imagecreatefromgif($destination);
break;
case 2:
$simage =imagecreatefromjpeg($destination);
break;
case 3:
$simage =imagecreatefrompng($destination);
break;
case 6:
$simage =imagecreatefromwbmp($destination);
break;
default:
return "不支持的文件类型";
exit;
}
imagecopy($nimage,$simage,0,0,0,0,$image_size[0],$image_size[1]);
imagefilledrectangle($nimage,1,$image_size[1]-15,80,$image_size[1],$white);
switch($watertype)
{
case 1: //加水印字符串
imagestring($nimage,2,3,$image_size[1]-15,$waterstring,$black);
break;
case 2: //加水印图片
$simage1 =imagecreatefromgif("xplore.gif");
imagecopy($nimage,$simage1,0,0,0,0,85,15);
imagedestroy($simage1);
break;
}
switch ($iinfo[2])
{
case 1:
imagejpeg($nimage, $destination);
break;
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
自动发卡(带官网+发卡后台+码支付).rar (490个子文件)
bootstrap.min.css 244KB
vendor.css 134KB
style.css 113KB
bootstrap.min.css 99KB
animate.css 60KB
font-awesome.min.css 30KB
style.css 29KB
jquery-ui-1.10.1.custom.min.css 26KB
sweetalert.css 22KB
font-awesome.css 21KB
font-awesome.css 21KB
custom-fonts.css 19KB
layer.css 14KB
style-responsive.css 14KB
dropzone.css 11KB
datetimepicker.css 11KB
main.css 10KB
bootstrap-fullcalendar.css 10KB
index_1.css 10KB
gallery.css 10KB
demo_table.css 7KB
bootstrap-reset.css 7KB
clndr.css 6KB
wechat_pay.css 6KB
style.css 6KB
jquery.fancybox.css 6KB
userPay.css 5KB
layer.css 5KB
newmobile.css 4KB
thickbox.css 4KB
xcharts.css 4KB
wechat_pay.css 4KB
daterangepicker-bs3.css 4KB
datepicker.css 4KB
flexslider.css 4KB
tree-style.css 4KB
daterangepicker.css 4KB
table-responsive.css 3KB
jquery.fancybox.css 3KB
DT_bootstrap.css 3KB
jquery.nestable.css 3KB
tasks.css 2KB
bootstrap-wysihtml5.css 2KB
multi-select.css 2KB
colorpicker.css 2KB
bootstrap-fileupload.css 2KB
nyroModal.css 2KB
timepicker.css 2KB
demo_page.css 1KB
jquery.fileupload-ui.css 1006B
prettify.css 817B
jquery.fileupload-ui.css 723B
invoice-print.css 629B
style.css 575B
morris.css 493B
jquery.stepy.css 433B
jquery.fileupload.css 355B
fontawesome-webfont.eot 37KB
fontawesome-webfont.eot 37KB
Icons.eot 32KB
4548982432e04aa00f49edffac3170df.gif 120KB
wxpay.gif 7KB
loading-0.gif 6KB
loading.gif 4KB
loading.gif 4KB
fancybox_loading.gif 4KB
fancybox_loading.gif 4KB
alipay.gif 3KB
progressbar.gif 3KB
defaultpic2.gif 2KB
qqpay.gif 2KB
input-spinner.gif 2KB
loading-2.gif 2KB
animated-overlay.gif 2KB
loading-1.gif 701B
customSelect-arrow.gif 47B
ie-spacer.gif 43B
blank.gif 43B
blank.gif 43B
.htaccess 135B
about.html 14KB
index.html 12KB
portfolio.html 11KB
services.html 10KB
pricing.html 9KB
contact.html 8KB
favicon.ico 15KB
alipay.ico 4KB
qqpay.ico 1KB
tenpay.ico 1KB
wechat.ico 1KB
sc1.jpg 853KB
bj3.jpg 339KB
2.jpg 154KB
8.jpg 126KB
service3.jpg 92KB
2.jpg 89KB
service1.jpg 85KB
6.jpg 81KB
4.jpg 78KB
共 490 条
- 1
- 2
- 3
- 4
- 5
资源评论
逆流未来
- 粉丝: 1
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功