Forráskód Böngészése

切换正式gpsnumber

git 6 éve
szülő
commit
70c5948e60
40 módosított fájl, 10570 hozzáadás és 26 törlés
  1. 1 0
      Home/Common/common.php
  2. 39 0
      Home/Common/pub_func.php
  3. 3 0
      Home/Conf/config.php
  4. 205 21
      Home/Lib/Action/ApiAction.class.php
  5. 101 0
      Home/Lib/Action/CronAction.class.php
  6. 3 3
      Home/Lib/Action/NoticeAction.class.php
  7. BIN
      boke/back_500x278.jpg
  8. BIN
      boke/bg.jpg
  9. 51 0
      boke/boke.html
  10. 587 0
      boke/bootstrap/css/bootstrap-theme.css
  11. 1 0
      boke/bootstrap/css/bootstrap-theme.css.map
  12. 6 0
      boke/bootstrap/css/bootstrap-theme.min.css
  13. 1 0
      boke/bootstrap/css/bootstrap-theme.min.css.map
  14. 6757 0
      boke/bootstrap/css/bootstrap.css
  15. 1 0
      boke/bootstrap/css/bootstrap.css.map
  16. 6 0
      boke/bootstrap/css/bootstrap.min.css
  17. 1 0
      boke/bootstrap/css/bootstrap.min.css.map
  18. BIN
      boke/bootstrap/fonts/glyphicons-halflings-regular.eot
  19. 288 0
      boke/bootstrap/fonts/glyphicons-halflings-regular.svg
  20. BIN
      boke/bootstrap/fonts/glyphicons-halflings-regular.ttf
  21. BIN
      boke/bootstrap/fonts/glyphicons-halflings-regular.woff
  22. BIN
      boke/bootstrap/fonts/glyphicons-halflings-regular.woff2
  23. 2377 0
      boke/bootstrap/js/bootstrap.js
  24. 7 0
      boke/bootstrap/js/bootstrap.min.js
  25. 13 0
      boke/bootstrap/js/npm.js
  26. 58 0
      boke/csdn.php
  27. BIN
      boke/demo.jpg
  28. BIN
      boke/front_500x278.jpg
  29. BIN
      boke/images/myplate.jpg
  30. 15 0
      boke/index.php
  31. 10 0
      boke/put.html
  32. BIN
      boke/stsong.ttf
  33. 36 0
      boke/test.php
  34. BIN
      boke/tu.png
  35. BIN
      boke/tu2.png
  36. BIN
      boke/tu3.gif
  37. 2 1
      composer.json
  38. 1 1
      czapp
  39. BIN
      uploadimage/gravatar.jpg
  40. BIN
      uploadimage/gravatar_resize.jpg

+ 1 - 0
Home/Common/common.php

@@ -1 +1,2 @@
 <?php
+require_once(COMMON_PATH . 'pub_func.php');

+ 39 - 0
Home/Common/pub_func.php

@@ -0,0 +1,39 @@
+<?php
+
+ 
+	function kafkaProducer( $topic, $msg_data ){
+		if (!extension_loaded('rdkafka')){
+			echo 'rdkafka extension is not installed!!'.PHP_EOL;
+			return false;
+		}
+		/********************* 初始化生产者配置项 start **************************/
+		//考勤记录分析结果生产者
+		$rk = new RdKafka\Producer();
+		$rk->setLogLevel(LOG_DEBUG);
+		$rk->addBrokers("127.0.0.1");
+		$start = microtime(true);
+		$topic = $rk->newTopic($topic);
+		/********************* 初始化生产者配置项 end **************************/
+		if( empty($msg_data) ){
+			var_dump($msg_data);
+			return;
+		}
+		if( is_array($msg_data) || is_object($msg_data) ){ // 对象、数组转换
+			$msg_data = json_encode($msg_data);
+		}
+		$topic->produce(RD_KAFKA_PARTITION_UA, 0, $msg_data);
+		$rk->poll(0);
+		
+	}
+	
+ 
+	function mockProduce(  ){
+		$msg_data = '{
+		  "type":9,
+		  "title":"群推消息",
+		  "content":"这是一个广播"
+		}';
+		kafkaProducer('gps_alarm_msg_queue',$msg_data);
+	}
+	
+

+ 3 - 0
Home/Conf/config.php

@@ -18,4 +18,7 @@ return array(
     'STOLEN_ALARM' 		    => 7, // 被盗告警
     'FENCE_ALARM' 			=> 8, // 电子围栏告警
     'BROADCASTING'			=> 9, // 广播
+
+    ######### 车主页 #########
+    'DRIVING_STATISTICS_DAYS' => 5, //行驶数据统计默认5天
 );

+ 205 - 21
Home/Lib/Action/ApiAction.class.php

@@ -70,7 +70,8 @@ class ApiAction extends Action {
 			"photoUrl" => $userinfo['Avatar'],
 			"plate" => $userinfo['LicensePlate'],
 			'deviceNumber' => $userinfo['DeviceNumber'],
-			'gpsNumber' => $userinfo['GpsDeviceNumber']
+			'gpsNumber' => $userinfo['GpsDeviceNumber'],
+			'cityid' => $userinfo['CityId']
 		);
 		$data = array(
 			"baseinfo" => $baseinfo,
@@ -129,7 +130,7 @@ class ApiAction extends Action {
 		}
 		
 		//获取车辆最新位置
-		$result = M('jms_vehicle')->field('GpsLongitude, GpsLatitude, Address, FenceShapeInfo, LockStatus, FenceAlarmEnable, Battery, GpsOnlineTime, Speed')->where(array('DeviceNumber' => $deviceNumber))->find();
+		$result = M('jms_vehicle')->field('GpsLongitude, GpsLatitude, Address, FenceShapeInfo, LockStatus, FenceAlarmEnable, Battery, GpsOnlineTime, Speed, CityId')->where(array('DeviceNumber' => $deviceNumber))->find();
 		if(!$result){
 			$this->api_fail(C('FAIL'),'cant find this vehicl !');
 		}
@@ -138,6 +139,15 @@ class ApiAction extends Action {
 			$onlineTimeStamp = 0;
 		}
 		
+		/*
+		if(!$result['GpsLongitude'] || !$result['GpsLatitude']){
+		
+			$where = array('ID' => $result['CityId']);
+			$cityLngLat = M('jms_city')->field('CenterLng, CenterLat')->where($where)->find();
+			$result['GpsLongitude'] = $cityLngLat['CenterLng'];
+			$result['GpsLatitude'] = $cityLngLat['CenterLat'];
+		}
+		*/
 		$mapData = array(
 			'vehicleLocation' => array('longitude' => $result['GpsLongitude'], 'latitude' => $result['GpsLatitude']),
 			'vehicleAddress' => $result['Address'],
@@ -193,6 +203,10 @@ class ApiAction extends Action {
 		if ( empty($userid)) {
 			$this->api_fail(C('FAIL'),'用户id不能为空');
 		}
+		$stolenaddress = $post_data['StolenAddress'];
+		if ( empty($stolenaddress)) {
+			$this->api_fail(C('FAIL'),'事发地址不能为空');
+		}
 		//获取登录用户城市id
 		/*$cond = array('ID'=>$userid);
 		$cityid = M('uc_user')->where($cond)->getField('CityId');
@@ -280,19 +294,22 @@ class ApiAction extends Action {
 		$this->token_verify();
 		$fence_info =I('post.data');
 		$fenceData = htmlspecialchars_decode($fence_info['data']);
+		$plate = $fence_info['plate'];
 		
-		$device_number = $fence_info['vehicleNumber'];
-		//var_dump($fence_info['fenceAlarmEnable']);
-		if( !$fence_info || !$device_number){
+		if( !$fence_info || !$plate){
 			json_fail('Missing param !');
 		}
-		$cond = array('DeviceNumber' => $device_number);
 		
 		$data = array(
-			'FenceAlarmEnable' => $fence_info['fenceAlarmEnable'] == 'true' ? true : false,
-			'FenceShapeInfo' => $fenceData
+			'fenceStatus' => $fence_info['fenceAlarmEnable'] == 'true' ? true : false,
+			'fenceInfo' => $fenceData
 		);
-		$result = M('jms_vehicle')->where($cond)->save($data);
+		//围栏信息改为存入redis表 rlfd_vehicle_fence( key车牌号,value围栏信息)
+		$rlfd_vehicle_fence = Redis('rlfd_vehicle_fence','hash');
+		$key = $plate;
+		$val = json_encode($data, JSON_UNESCAPED_UNICODE);
+		$hash = array($key=>$val);
+		$result = $rlfd_vehicle_fence->add($hash);
 		if( $result === false ){
 			json_fail('保存失败');
 		}
@@ -479,20 +496,18 @@ class ApiAction extends Action {
  
 	public  function get_fence_info(  ){
 		$this->token_verify();
-		$device_number = I('get.data');
-		if( !$device_number){
+		$plate = I('get.data');
+		if( !$plate){
 			json_fail('Missing param !');
 		}
-		$cond = array(
-				'DeviceNumber' => $device_number,
-		);
-		$fields = 'FenceShapeInfo as fenceInfo,FenceAlarmEnable as fenceStatus';
-		$fence = M('jms_vehicle')->field($fields)->where($cond)->find();
+		
+		$rlfd_vehicle_fence = Redis('rlfd_vehicle_fence','hash');
+		$fence = $rlfd_vehicle_fence->get($plate);
 		if( !$fence ){
 			json_fail('无围栏 !');
 		}
 		
-		$fence = json_encode($fence);
+		//$fence = json_encode($fence);
 		json_success('success',$fence);
 		
 	}
@@ -506,9 +521,8 @@ class ApiAction extends Action {
 		if( !$gps_number || !$search_date){
 			json_fail('请检查GPS标签或者日期 !');
 		}
-		
-		//$list = $this->getBTGpsRoute($search_date,$gps_number);
-		$list = $this->getBTGpsRoute($search_date,'1');
+		$list = $this->getBTGpsRoute($search_date,$gps_number);
+		//$list = $this->getBTGpsRoute($search_date, '1');
 		
 		$respData = array();
 		foreach($list as $v){
@@ -544,7 +558,7 @@ class ApiAction extends Action {
 		}
 		//获取所有轨迹信号
 		$option = array();
-		$option['pagesize'] = 100;
+		$option['pagesize'] = 1000;
 		$option['asc'];
 		$option['fields'] = array('Longitude','Latitude','Speed','DeviceTime');
 		$routesig = new \Rlfd\Route\RouteSignal();
@@ -555,5 +569,175 @@ class ApiAction extends Action {
 		return $list;
 	}
 	
+ 
+	public  function get_driving_data(  ){
+		$gpsNumber = $_GET['data']['gpsNumber'];
+		//var_dump($_GET);
+		$days = C('DRIVING_STATISTICS_DAYS');
+		if(!$gpsNumber){
+			json_fail('未获取到gps设备号');
+		}
+		if(!$days){
+			$days = 5;
+		}
+		$drivingData = array();
+		
+		$todayDate = date('Y-m-d');
+		$todayCache = S($gpsNumber.'_cache'.$todayDate);
+		if(!$todayCache){
+			$todayData = $this->searchDrivingData($gpsNumber, $date);
+			array_push($drivingData, $todayData);
+			$todayCache = S($gpsNumber.'_cache'.$todayData, $todayData, 3600*24);
+		}else{
+			$newOnlineTime = M('jms_vehicle')->where(array('GpsDeviceNumber' => $gpsNumber))->getField('GpsOnlineTime');
+			$nTime = strtotime($newOnlineTime);
+			$oTime = strtotime($lastOnlineTime);
+			if($nTime == $oTime){
+				array_push($drivingData, $todayCache);
+			}else{
+				$todayData = $this->searchDrivingData($gpsNumber, $date);
+				array_push($drivingData, $todayData);
+				$todayCache = S($gpsNumber.'_cache'.$todayDate, $todayData, 3600*24);
+			}
+		}
+		
+		for($i = $days-1; $i > 0; --$i){
+			$preStr2time = strtotime('-'.$i.'days', 1555689600);
+			$date = date('Y-m-d', $preStr2time);
+		/*	
+			$where = array(
+				'GpsDeviceNumber' => $gpsNumber,
+				'Date' => $date
+			);
+			$sqlData = M('gps_driving_data')->where($where)->find();//当天前的数据查询sql数据库
+			if($sqlData){
+				$dayData = array(
+					'date' => $date,
+					'averageSpeed' => $sqlData['AverageSpeed'],
+					'totalTime' => $sqlData['TotalTime'],
+					'totalDist' => $sqlData['TotalDistance']
+				);
+				array_push($drivingData, $dayData);
+				continue;
+			}
+		*/
+			$cache = S($gpsNumber.'_cache'.$date);
+			if($cache){
+				array_push($drivingData, $cache);
+				continue;
+			}else{
+				$dayData = $this->searchDrivingData($gpsNumber, $date);
+				array_push($drivingData, $dayData);
+				S($gpsNumber.'_cache'.$date, $dayData, 3600*24*7);
+			}
+			
+		}
+		
+		//dump($drivingData);
+		if(!$drivingData){
+			json_fail('未查询到近'.$days.'日行驶数据');
+		}
+		
+		json_success('查询成功', $drivingData);
+		
+		
+		
+	}
+	
+ 
+	private  function searchDrivingData( $gpsNumber, $date ){
+		if(!$gpsNumber){
+			return false;
+		}
+		
+		$start = microtime(true);
+		
+		$result = $this->getBTGpsRoute( $date,$gpsNumber);
+		
+		$end = microtime(true);
+		
+		$totalTime = 0;
+		$totalDist = 0;
+		
+		$lastOnlineTime =end($result)['OnlineTime'];
+		
+		for($i = 0; $i < count($result)-1; ++$i){
+			$lat1 = $result[$i]['lat'];
+			$lng1 = $result[$i]['lng'];
+			$lat2 = $result[$i+1]['lat'];
+			$lng2 = $result[$i+1]['lng'];
+			$dist = $this->get_2points_distance($lat1,$lng1,$lat2,$lng2 );
+			$totalDist += $dist;
+			$time = strtotime($result[$i+1]['OnlineTime']) - strtotime($result[$i]['OnlineTime']);
+			$totalTime += ($time/3600);
+		}
+		
+		return array(
+			'totalTime' => $totalTime,
+			'totalDist' => $totalDist,
+		//	'averageSpeed' => $totalDist/$totalTime,
+			'lastOnlineTime' => $lastOnlineTime,
+			'caculateTime' => $end - $start
+		);
+		
+		
+	}
+	
+ 
+	private  function get_2points_distance( $lat1, $lng1, $lat2, $lng2, $radius = 6378.137 ){
+		$rad = floatval(M_PI / 180.0);
+		$lat1 = floatval($lat1) * $rad;
+		$lng1 = floatval($lng1) * $rad;
+		$lat2 = floatval($lat2) * $rad;
+		$lng2 = floatval($lng2) * $rad;
+		
+		$theta = $lng2 - $lng1;
+		
+		$dist = acos(sin($lat1) * sin($lat2) +
+					 cos($lat1) * cos($lat2) * cos($theta)
+					);
+		
+		
+		if ($dist < 0 ) {
+			$dist += M_PI;
+		}
+		
+		return $dist = $dist * $radius;
+	}
+	
+ 
+	public  function test_function(  ){
+		$lat1 = '31.253411';
+		$lng1 = '121.518998';
+		
+		$lat2 = '31.277117';
+		$lng2 = '120.744587';
+		
+		$distance = $this->get_2points_distance($lat1, $lng1, $lat2, $lng2);
+		var_dump($distance);
+	}
+	
+ 
+	public  function get_vehicle_ElectronicPlateUrl(  ){
+		$this->token_verify();
+		$userid = I('userid');
+		$electronicPlateUrl = M('jms_vehicle')->where(array('ID'=>$userid))->field('FrontElectronicPlateUrl,BackElectronicPlateUrl')->cache(true,24*60*60)->select();
+		$this->api_success('成功',$electronicPlateUrl[0]);
+	}
+	
+ 
+	public  function getCityInfo(  ){
+		$this->token_verify();
+		$cityid = I('get.cityid');
+		if(!$cityid){
+			$this->api_fail(C('FAIL'),'开户城市不存在');
+		}
+		$parentcity = M('jms_city')->where(array('ID'=>$cityid))->find();
+		
+		$child_1 = M('jms_city')->where(array('ParentId'=>$parentcity['ParentId']))->select();
+		$this->api_success('成功',$child_1);
+		
+	}
+	
 
 }

+ 101 - 0
Home/Lib/Action/CronAction.class.php

@@ -0,0 +1,101 @@
+<?php
+
+
+
+class CronAction extends Action {
+			
+
+
+ 
+	public  function createEplate_index(  ){
+		$this->createElectronicPlate();
+	}
+	
+ 
+	private  function createElectronicPlate(  ){
+		$start = time();
+		$pendingElectricPlate = Redis('jyzl_wait_create_eplate');
+		$plateLocalPath = Redis('jyzl_wait_upload2oss_eplate', 'queue');
+		while( (time() - $start) < 60 ){
+			$licensPlate = $pendingElectricPlate->pop();
+			if($licensPlate){
+				echo 'pop licensPlate:'.$licensPlate.PHP_EOL;
+				$field = 'LicensPlate,VehicleColor, FullName, Address, FrameNumber, MotorNumber, VehicleBrand';
+				$vehicleInfo = M('jms_vehicle')->where('LicensPlate' => $licensPlate)->field($field);
+				$localPath = '生成函数';
+				$up2ossWait = json_encode(array('licensPlate' => $licensPlate, 'localPath' => $localPath));
+				$plateLocalPath->push($up2ossWait);
+			}
+			sleep(1);
+		}
+	}
+	
+ 
+	private  function uploadElectronicPlate2Oss(  ){
+		$config = array(
+			'OssDsn' => C('OSS_DSN'),
+			'filePathDir' => '/data/wwwroot/czapp.rltest.cn/1.0.0//uploadimage/',
+			"SaveRule" => "/electronic_plate/{Y}{m}{d}/{uid}.{ext}",
+			"AllowExts" => array('jpg', 'png', 'jpeg'), // 允许上传的文件后缀(留空为不限制)
+			"ResizeImage" => true,   // 是否自动压缩
+			"MaxImageWidth" => 1024,
+			"MaxImageHeight" => 1024,
+			"IsCheckRgb" => true,
+			"MinImgAverageRgb" => 70
+		);
+		$upload = new \Jms\File\Oss2($config);
+		
+		$start = time();
+		$plateLocalPath = Redis('jyzl_wait_upload2oss_eplate');
+		while( (time() - $start) < 60 ){
+			$data = $plateLocalPath->pop();
+			var_dump($data);
+			json_decode($data,true);
+			var_dump($data);
+			if($data){
+				//TEST
+				$fileName = 'gravatar.jpg';
+				//$fileName = $data['localPath'];
+				$uploadRes = $upload->localFileUpload($fileName);
+				if(!$uploadRes['success']){
+					echo $uploadRes['message'].PHP_EOL;
+					continue;
+				}
+				$frontImageUrl = $uploadRes['objectname'];
+		
+				$updateRes = M('jms_vehicle')->where(array('LicensePlate' => $data['licensPlate']))->setField('FrontElectronicPlateUrl',$frontImageUrl);
+				if(!$updateRes){
+					echo 'update failed'.PHP_EOL;
+					continue;
+				}
+				if(file_exists($filename)){
+					unlink($filename);
+				}
+			}
+			sleep(1);
+		}
+	}
+	
+ 
+	public  function uploadEplate_index(  ){
+		$this->uploadElectronicPlate2Oss();
+	}
+	
+ 
+	public  function test_function(  ){
+		$plate = 'BJ000100';
+		$pendingElectricPlate = Redis("jyzl_wait_create_eplate","queue");
+		$licensePlate = $plate;
+		$pendingElectricPlate->push($licensePlate);
+		
+	}
+	
+ 
+	public  function acrossAlarm2Kafka(  ){
+		// 从 topic :gps_location_data 取轨迹
+			
+		// 存入 topic:gps_alarm_msg_queue 
+	}
+	
+
+}

+ 3 - 3
Home/Lib/Action/NoticeAction.class.php

@@ -233,7 +233,7 @@ class NoticeAction extends Action {
 	}
 	
  
-	public  function kafkaProducer( $msg_data ){
+	public  function kafkaProducer( $topic, $msg_data ){
 		if (!extension_loaded('rdkafka')){
 			echo 'rdkafka extension is not installed!!'.PHP_EOL;
 			return false;
@@ -244,7 +244,7 @@ class NoticeAction extends Action {
 		$rk->setLogLevel(LOG_DEBUG);
 		$rk->addBrokers("127.0.0.1");
 		$start = microtime(true);
-		$topic = $rk->newTopic('gps_alarm_msg_queue');
+		$topic = $rk->newTopic($topic);
 		/********************* 初始化生产者配置项 end **************************/
 		if( empty($msg_data) ){
 			var_dump($msg_data);
@@ -265,7 +265,7 @@ class NoticeAction extends Action {
 		  "title":"群推消息",
 		  "content":"这是一个广播"
 		}';
-		$this->kafkaProducer($msg_data);
+		$this->kafkaProducer('gps_alarm_msg_queue',$msg_data);
 	}
 	
 

BIN
boke/back_500x278.jpg


BIN
boke/bg.jpg


+ 51 - 0
boke/boke.html

@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>生成CSDN博客图片</title>
+
+    <link href="bootstrap/css/bootstrap.css" rel="stylesheet">
+</head>
+<body>
+
+<img src="demo.jpg" width="50%" style="margin:80px 25% 80px 25%;"/>
+
+<form class="form-horizontal" role="form" method="get" action=csdn.php>
+    <div class="form-group" >
+        <label class="col-sm-4 control-label">CSDN名称</label>
+        <div class="col-sm-5">
+            <input type="text" name="name" class="form-control" placeholder="请输入CSDN名字">
+        </div>
+    </div>
+
+    <div class="form-group">
+        <label class="col-sm-4 control-label">访问人数</label>
+        <div class="col-sm-5">
+            <input type="text" name="people" class="form-control" placeholder="请输入访问人数">
+        </div>
+    </div>
+
+    <div class="form-group">
+        <label class="col-sm-4 control-label">排名</label>
+        <div class="col-sm-5">
+            <input type="text" name="ranking" class="form-control" placeholder="请输入排名">
+        </div>
+    </div>
+
+    <div class="form-group">
+        <label class="col-sm-4 control-label">积分</label>
+        <div class="col-sm-5">
+            <input type="text" name="integral" class="form-control" placeholder="请输入积分">
+        </div>
+    </div>
+
+    <div class="form-group" >
+        <div class="col-sm-offset-4 col-sm-5">
+            <button type="submit" class="btn btn-info btn-block" >提交生成</button>
+        </div>
+    </div>
+
+</form>
+
+</body>
+</html>

+ 587 - 0
boke/bootstrap/css/bootstrap-theme.css

@@ -0,0 +1,587 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+.btn-default,
+.btn-primary,
+.btn-success,
+.btn-info,
+.btn-warning,
+.btn-danger {
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
+}
+.btn-default:active,
+.btn-primary:active,
+.btn-success:active,
+.btn-info:active,
+.btn-warning:active,
+.btn-danger:active,
+.btn-default.active,
+.btn-primary.active,
+.btn-success.active,
+.btn-info.active,
+.btn-warning.active,
+.btn-danger.active {
+  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn-default.disabled,
+.btn-primary.disabled,
+.btn-success.disabled,
+.btn-info.disabled,
+.btn-warning.disabled,
+.btn-danger.disabled,
+.btn-default[disabled],
+.btn-primary[disabled],
+.btn-success[disabled],
+.btn-info[disabled],
+.btn-warning[disabled],
+.btn-danger[disabled],
+fieldset[disabled] .btn-default,
+fieldset[disabled] .btn-primary,
+fieldset[disabled] .btn-success,
+fieldset[disabled] .btn-info,
+fieldset[disabled] .btn-warning,
+fieldset[disabled] .btn-danger {
+  -webkit-box-shadow: none;
+          box-shadow: none;
+}
+.btn-default .badge,
+.btn-primary .badge,
+.btn-success .badge,
+.btn-info .badge,
+.btn-warning .badge,
+.btn-danger .badge {
+  text-shadow: none;
+}
+.btn:active,
+.btn.active {
+  background-image: none;
+}
+.btn-default {
+  text-shadow: 0 1px 0 #fff;
+  background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
+  background-image:      -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
+  background-image:         linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #dbdbdb;
+  border-color: #ccc;
+}
+.btn-default:hover,
+.btn-default:focus {
+  background-color: #e0e0e0;
+  background-position: 0 -15px;
+}
+.btn-default:active,
+.btn-default.active {
+  background-color: #e0e0e0;
+  border-color: #dbdbdb;
+}
+.btn-default.disabled,
+.btn-default[disabled],
+fieldset[disabled] .btn-default,
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled.focus,
+.btn-default[disabled].focus,
+fieldset[disabled] .btn-default.focus,
+.btn-default.disabled:active,
+.btn-default[disabled]:active,
+fieldset[disabled] .btn-default:active,
+.btn-default.disabled.active,
+.btn-default[disabled].active,
+fieldset[disabled] .btn-default.active {
+  background-color: #e0e0e0;
+  background-image: none;
+}
+.btn-primary {
+  background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
+  background-image:      -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
+  background-image:         linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #245580;
+}
+.btn-primary:hover,
+.btn-primary:focus {
+  background-color: #265a88;
+  background-position: 0 -15px;
+}
+.btn-primary:active,
+.btn-primary.active {
+  background-color: #265a88;
+  border-color: #245580;
+}
+.btn-primary.disabled,
+.btn-primary[disabled],
+fieldset[disabled] .btn-primary,
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled.focus,
+.btn-primary[disabled].focus,
+fieldset[disabled] .btn-primary.focus,
+.btn-primary.disabled:active,
+.btn-primary[disabled]:active,
+fieldset[disabled] .btn-primary:active,
+.btn-primary.disabled.active,
+.btn-primary[disabled].active,
+fieldset[disabled] .btn-primary.active {
+  background-color: #265a88;
+  background-image: none;
+}
+.btn-success {
+  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
+  background-image:      -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
+  background-image:         linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #3e8f3e;
+}
+.btn-success:hover,
+.btn-success:focus {
+  background-color: #419641;
+  background-position: 0 -15px;
+}
+.btn-success:active,
+.btn-success.active {
+  background-color: #419641;
+  border-color: #3e8f3e;
+}
+.btn-success.disabled,
+.btn-success[disabled],
+fieldset[disabled] .btn-success,
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled.focus,
+.btn-success[disabled].focus,
+fieldset[disabled] .btn-success.focus,
+.btn-success.disabled:active,
+.btn-success[disabled]:active,
+fieldset[disabled] .btn-success:active,
+.btn-success.disabled.active,
+.btn-success[disabled].active,
+fieldset[disabled] .btn-success.active {
+  background-color: #419641;
+  background-image: none;
+}
+.btn-info {
+  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
+  background-image:      -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
+  background-image:         linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #28a4c9;
+}
+.btn-info:hover,
+.btn-info:focus {
+  background-color: #2aabd2;
+  background-position: 0 -15px;
+}
+.btn-info:active,
+.btn-info.active {
+  background-color: #2aabd2;
+  border-color: #28a4c9;
+}
+.btn-info.disabled,
+.btn-info[disabled],
+fieldset[disabled] .btn-info,
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled.focus,
+.btn-info[disabled].focus,
+fieldset[disabled] .btn-info.focus,
+.btn-info.disabled:active,
+.btn-info[disabled]:active,
+fieldset[disabled] .btn-info:active,
+.btn-info.disabled.active,
+.btn-info[disabled].active,
+fieldset[disabled] .btn-info.active {
+  background-color: #2aabd2;
+  background-image: none;
+}
+.btn-warning {
+  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
+  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
+  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #e38d13;
+}
+.btn-warning:hover,
+.btn-warning:focus {
+  background-color: #eb9316;
+  background-position: 0 -15px;
+}
+.btn-warning:active,
+.btn-warning.active {
+  background-color: #eb9316;
+  border-color: #e38d13;
+}
+.btn-warning.disabled,
+.btn-warning[disabled],
+fieldset[disabled] .btn-warning,
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled.focus,
+.btn-warning[disabled].focus,
+fieldset[disabled] .btn-warning.focus,
+.btn-warning.disabled:active,
+.btn-warning[disabled]:active,
+fieldset[disabled] .btn-warning:active,
+.btn-warning.disabled.active,
+.btn-warning[disabled].active,
+fieldset[disabled] .btn-warning.active {
+  background-color: #eb9316;
+  background-image: none;
+}
+.btn-danger {
+  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
+  background-image:      -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
+  background-image:         linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #b92c28;
+}
+.btn-danger:hover,
+.btn-danger:focus {
+  background-color: #c12e2a;
+  background-position: 0 -15px;
+}
+.btn-danger:active,
+.btn-danger.active {
+  background-color: #c12e2a;
+  border-color: #b92c28;
+}
+.btn-danger.disabled,
+.btn-danger[disabled],
+fieldset[disabled] .btn-danger,
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled.focus,
+.btn-danger[disabled].focus,
+fieldset[disabled] .btn-danger.focus,
+.btn-danger.disabled:active,
+.btn-danger[disabled]:active,
+fieldset[disabled] .btn-danger:active,
+.btn-danger.disabled.active,
+.btn-danger[disabled].active,
+fieldset[disabled] .btn-danger.active {
+  background-color: #c12e2a;
+  background-image: none;
+}
+.thumbnail,
+.img-thumbnail {
+  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+  background-color: #e8e8e8;
+  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
+  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
+  background-repeat: repeat-x;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+  background-color: #2e6da4;
+  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+  background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
+  background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
+  background-repeat: repeat-x;
+}
+.navbar-default {
+  background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
+  background-image:      -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
+  background-image:         linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
+}
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .active > a {
+  background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
+  background-image:      -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
+  background-image:         linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
+  background-repeat: repeat-x;
+  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
+}
+.navbar-brand,
+.navbar-nav > li > a {
+  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
+}
+.navbar-inverse {
+  background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
+  background-image:      -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
+  background-image:         linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-radius: 4px;
+}
+.navbar-inverse .navbar-nav > .open > a,
+.navbar-inverse .navbar-nav > .active > a {
+  background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
+  background-image:      -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
+  background-image:         linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
+  background-repeat: repeat-x;
+  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
+          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
+}
+.navbar-inverse .navbar-brand,
+.navbar-inverse .navbar-nav > li > a {
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
+}
+.navbar-static-top,
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+  border-radius: 0;
+}
+@media (max-width: 767px) {
+  .navbar .navbar-nav .open .dropdown-menu > .active > a,
+  .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
+  .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
+    color: #fff;
+    background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+    background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+    background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
+    background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
+    background-repeat: repeat-x;
+  }
+}
+.alert {
+  text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
+}
+.alert-success {
+  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
+  background-image:      -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
+  background-image:         linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #b2dba1;
+}
+.alert-info {
+  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
+  background-image:      -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
+  background-image:         linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #9acfea;
+}
+.alert-warning {
+  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
+  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
+  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #f5e79e;
+}
+.alert-danger {
+  background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
+  background-image:      -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
+  background-image:         linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #dca7a7;
+}
+.progress {
+  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
+  background-image:      -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
+  background-image:         linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar {
+  background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
+  background-image:      -o-linear-gradient(top, #337ab7 0%, #286090 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
+  background-image:         linear-gradient(to bottom, #337ab7 0%, #286090 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-success {
+  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
+  background-image:      -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
+  background-image:         linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-info {
+  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
+  background-image:      -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
+  background-image:         linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-warning {
+  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
+  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
+  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-danger {
+  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
+  background-image:      -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
+  background-image:         linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-striped {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.list-group {
+  border-radius: 4px;
+  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+}
+.list-group-item.active,
+.list-group-item.active:hover,
+.list-group-item.active:focus {
+  text-shadow: 0 -1px 0 #286090;
+  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
+  background-image:      -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
+  background-image:         linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #2b669a;
+}
+.list-group-item.active .badge,
+.list-group-item.active:hover .badge,
+.list-group-item.active:focus .badge {
+  text-shadow: none;
+}
+.panel {
+  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
+          box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
+}
+.panel-default > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
+  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-primary > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+  background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
+  background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-success > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
+  background-image:      -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
+  background-image:         linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-info > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
+  background-image:      -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
+  background-image:         linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-warning > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
+  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
+  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-danger > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
+  background-image:      -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
+  background-image:         linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
+  background-repeat: repeat-x;
+}
+.well {
+  background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
+  background-image:      -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
+  background-image:         linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #dcdcdc;
+  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
+          box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
+}
+/*# sourceMappingURL=bootstrap-theme.css.map */

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
boke/bootstrap/css/bootstrap-theme.css.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 6 - 0
boke/bootstrap/css/bootstrap-theme.min.css


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
boke/bootstrap/css/bootstrap-theme.min.css.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 6757 - 0
boke/bootstrap/css/bootstrap.css


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
boke/bootstrap/css/bootstrap.css.map


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 6 - 0
boke/bootstrap/css/bootstrap.min.css


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
boke/bootstrap/css/bootstrap.min.css.map


BIN
boke/bootstrap/fonts/glyphicons-halflings-regular.eot


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 288 - 0
boke/bootstrap/fonts/glyphicons-halflings-regular.svg


BIN
boke/bootstrap/fonts/glyphicons-halflings-regular.ttf


BIN
boke/bootstrap/fonts/glyphicons-halflings-regular.woff


BIN
boke/bootstrap/fonts/glyphicons-halflings-regular.woff2


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 2377 - 0
boke/bootstrap/js/bootstrap.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 7 - 0
boke/bootstrap/js/bootstrap.min.js


+ 13 - 0
boke/bootstrap/js/npm.js

@@ -0,0 +1,13 @@
+// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
+require('../../js/transition.js')
+require('../../js/alert.js')
+require('../../js/button.js')
+require('../../js/carousel.js')
+require('../../js/collapse.js')
+require('../../js/dropdown.js')
+require('../../js/modal.js')
+require('../../js/tooltip.js')
+require('../../js/popover.js')
+require('../../js/scrollspy.js')
+require('../../js/tab.js')
+require('../../js/affix.js')

+ 58 - 0
boke/csdn.php

@@ -0,0 +1,58 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 莫言情难忘
+ * Date: 2018/11/21
+ * Time: 21:10
+ */
+//header("content-type:image/jpeg");
+$license_plate = $_GET['license_plate']?$_GET['license_plate']:"BJ88888888";
+$vehicle_color = $_GET['vehicle_color']?$_GET['vehicle_color']:"红色";
+$real_name = $_GET['real_name']?$_GET['real_name']:"张三";
+$address = $_GET['address']?$_GET['address']:"包头市青山区友谊大街195号";
+$cjh = $_GET['cjh']?$_GET['cjh']:"zsd123456789";
+$djh = $_GET['djh']?$_GET['djh']:"zsd123456789";
+$cph = $_GET['cph']?$_GET['cph']:"zsd123456789";
+$reg_date = $_GET['reg_date']?$_GET['reg_date']:"2019-04-15";
+$fz_date = $_GET['fz_date']?$_GET['fz_date']:"2019-04-15";
+$fz_org = $_GET['fz_org']?$_GET['fz_org']:"包头市公安局";
+
+$im = imagecreatetruecolor(500, 278);           // 设置画布
+//$bg = imagecreatefromjpeg('bg.jpg');   // 设置背景图片
+$bg = imagecreatefromjpeg('front_500x278.jpg');   // 设置背景图片
+imagecopy($im,$bg,0,0,0,0,500,278);             // 将背景图片拷贝到画布相应位置
+imagedestroy($bg);                              // 销毁背景图片
+$font = __DIR__ . '/stsong.ttf';               // 设置字体             // 设置字体,这里可以指向ttf文件
+$blacka = imagecolorallocate($im, 15, 23, 25);  // 颜色
+/*
+//lzm
+$bx = imagesx($im);
+$by = imagesy($im);
+$small = imagecreatefromgif('./tu3.gif');
+$sx = imagesx($small);
+$sy = imagesy($small);
+//3.执行图片水印处理
+imagecopymerge($im,$small,$bx-$sx,0,0,0,$sx,$sy,100);
+*/
+/* 写入内容 */
+imagettftext($im, 12, 0, 135, 66, $blacka, $font,$license_plate );       // 车牌号
+imagettftext($im, 12, 0, 335, 66, $blacka, $font,$vehicle_color );       // 车辆颜色
+imagettftext($im, 12, 0, 135, 96, $blacka, $font,$real_name );       // 姓名
+imagettftext($im, 12, 0, 135, 128, $blacka, $font,$address );       // 住址
+imagettftext($im, 12, 0, 135, 160, $blacka, $font,$cjh );       // 车架号
+imagettftext($im, 12, 0, 335, 160, $blacka, $font,$djh );       // 电机号
+imagettftext($im, 12, 0, 263, 192, $blacka, $font,$cph );       // 厂牌型号
+imagettftext($im, 11, 0, 260, 222, $blacka, $font,$reg_date );       // 注册日期
+imagettftext($im, 11, 0, 376, 222, $blacka, $font,$fz_date );       // 发证期
+imagettftext($im, 12, 0, 263, 255, $blacka, $font,$fz_org );       // 发证机关
+
+
+$img_file = "./images/myplate.jpg";
+$result = imagejpeg($im, $img_file);     // 生成jpeg格式图片
+imagedestroy($im);  // 销毁图片
+if(!$result){
+	echo "生成电子车牌失败";
+	exit;
+}
+
+echo '生成电子车牌完成';

BIN
boke/demo.jpg


BIN
boke/front_500x278.jpg


BIN
boke/images/myplate.jpg


+ 15 - 0
boke/index.php

@@ -0,0 +1,15 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: 莫言情难忘
+ * Date: 2018/11/21
+ * Time: 21:32
+ */
+
+if(isset($_GET['name'])){           // 如果用户已经输入信息,拼接生成图片
+    $url = "csdn.php?name=".$_GET['name']."&people=".$_GET['people']."&ranking=".$_GET['ranking']
+        ."&integral=".$_GET['integral'];
+    include 'put.html';  // 引入生成图片页面
+}else{
+    include 'boke.html';       // 引入填写表单页面
+}

+ 10 - 0
boke/put.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>生成成功</title>
+</head>
+<body>
+<img src="<?php echo $url ?>" />
+</body>
+</html>

BIN
boke/stsong.ttf


+ 36 - 0
boke/test.php

@@ -0,0 +1,36 @@
+<?php 
+    /*
+    步骤:
+        1.分别创建大小图画布并获取它们的宽高
+        2.添加文字水印
+        3.执行图片水印处理
+        4.输出
+        5.销毁画布
+     */
+    //1.分别创建大小图画布并获取它们的宽高
+    $big = imagecreatefromjpeg('./bg.jpg');
+    $bx = imagesx($big);
+    $by = imagesy($big);
+
+    $small = imagecreatefrompng('./tu2.png');
+    $sx = imagesx($small);
+    $sy = imagesy($small);
+
+
+    //2.添加水印文字
+    $blue = imagecolorallocate($big,0,0,255);
+    imagettftext($big,16,0,100,100,$blue,'./stsong.ttf','骄傲的少年');
+
+    //3.执行图片水印处理
+    imagecopymerge($big,$small,$bx-$sx,0,0,0,$sx,$sy,37);
+
+    //4.输出到浏览器
+    header('content-type: image/jpeg');
+    imagejpeg($big);
+
+    //5.销毁画布
+    imagedestroy($big);
+    imagedestroy($small);
+
+    
+ ?>

BIN
boke/tu.png


BIN
boke/tu2.png


BIN
boke/tu3.gif


+ 2 - 1
composer.json

@@ -12,7 +12,8 @@
 		"jrtk/php-crypto":"dev-master",
 		"jrtk/jr-phpcls2": "dev-master",
 		"jrtk/aliyun-ots-sdk-php":"2.1.1",
-		"jpush/jpush": "*"
+		"jpush/jpush": "*",
+        "aliyuncs/oss-sdk-php": "^2.3"
     },
 	"config": {
 		"secure-http": false

+ 1 - 1
czapp

@@ -1 +1 @@
-Subproject commit 8d468299c20fb0382f12489fd844c1122555b514
+Subproject commit 36b5a9aa527c25689173485af2480c8b97d1b001

BIN
uploadimage/gravatar.jpg


BIN
uploadimage/gravatar_resize.jpg