Commit 96b759df by felix

first commit

parent aee4345a
<?php
// Silence is golden.
<?php
/**
* @package Hello_Dolly
* @version 1.6
*/
/*
Plugin Name: Hello Dolly
Plugin URI: http://wordpress.org/plugins/hello-dolly/
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
Author: Matt Mullenweg
Version: 1.6
Author URI: http://ma.tt/
*/
function hello_dolly_get_lyric() {
/** These are the lyrics to Hello Dolly */
$lyrics = "Hello, Dolly
Well, hello, Dolly
It's so nice to have you back where you belong
You're lookin' swell, Dolly
I can tell, Dolly
You're still glowin', you're still crowin'
You're still goin' strong
We feel the room swayin'
While the band's playin'
One of your old favourite songs from way back when
So, take her wrap, fellas
Find her an empty lap, fellas
Dolly'll never go away again
Hello, Dolly
Well, hello, Dolly
It's so nice to have you back where you belong
You're lookin' swell, Dolly
I can tell, Dolly
You're still glowin', you're still crowin'
You're still goin' strong
We feel the room swayin'
While the band's playin'
One of your old favourite songs from way back when
Golly, gee, fellas
Find her a vacant knee, fellas
Dolly'll never go away
Dolly'll never go away
Dolly'll never go away again";
// Here we split it into lines
$lyrics = explode( "\n", $lyrics );
// And then randomly choose a line
return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] );
}
// This just echoes the chosen line, we'll position it later
function hello_dolly() {
$chosen = hello_dolly_get_lyric();
echo "<p id='dolly'>$chosen</p>";
}
// Now we set that function up to execute when the admin_notices action is called
add_action( 'admin_notices', 'hello_dolly' );
// We need some CSS to position the paragraph
function dolly_css() {
// This makes sure that the positioning is also good for right-to-left languages
$x = is_rtl() ? 'left' : 'right';
echo "
<style type='text/css'>
#dolly {
float: $x;
padding-$x: 15px;
padding-top: 5px;
margin: 0;
font-size: 11px;
}
</style>
";
}
add_action( 'admin_head', 'dolly_css' );
?>
<?php
class SearchDao{
public function __construct() {
require_once(PLUGIN_DIR . '\TCSync.php');
}
public static function ajax_serachCity(){
wp_send_json(SearchDao::searchCity($_GET["cityId"],$_GET['districtId']));
}
public static function searchCity($cityId = NULL,$districtId = NULL){
global $wpdb;
$selectName = "cityId as id,cityName as value";
$where = " where 1=1 ";
$groupBy = " group by cityId";
if($cityId != NULL && $districtId == NULL){
$selectName = "districtId as id,districtName as value";
$where .= " and cityId =".$cityId;
$groupBy = " group by districtId";
}else if($cityId != NULL && $districtId != NULL){
$selectName = "plateId as id,plateName as value";
$where .= " and cityId = ".$cityId." and districtId = ".$districtId;
$groupBy = "";
}
$result = $wpdb->get_results('select '.$selectName.' from '.TCSync::DIC_CITY_TABLE.$where.$groupBy);
return $result;
}
public static function ajax_searchArea(){
wp_send_json(SearchDao::searchArea($_GET['cityId']));
}
public static function searchArea($cityId){
global $wpdb;
$where = " where 1=1";
if(isset($_GET['cityId'])){
$where .= " and cityId = ".$cityId;
}
$result = $wpdb->get_results('select id,priceValue as value from '.TCSync::DIC_AREA_TABLE.$where);
return $result;
}
public static function ajax_searchBuildProperty(){
wp_send_json(SearchDao::searchBuildProperty());
}
public static function searchBuildProperty(){
global $wpdb;
$result = $wpdb->get_results('select value as id,literal as value from '.TCSync::DIC_BUILDPROPERTY_TABLE);
return $result;
}
public static function ajax_searchRoom(){
wp_send_json(SearchDao::searchRoom());
}
public static function searchRoom(){
global $wpdb;
$result = $wpdb->get_results('select value as id,literal as value from '.TCSync::DIC_ROOM_TABLE);
return $result;
}
public static function ajax_searchUnitPriceRange(){
wp_send_json(SearchDao::searchUnitPriceRange($_GET['cityId']));
}
public static function searchUnitPriceRange($cityId){
global $wpdb;
$where = " where 1=1";
if(isset($_GET['cityId'])){
$where .= " and cityId = ".$cityId;
}
$result = $wpdb->get_results('select id,priceValue as value from '.TCSync::DIC_UNITPRICERANGE_TABLE.$where);
return $result;
}
public static function ajax_searchTotalPrice(){
wp_send_json(SearchDao::searchTotalPrice($_GET['cityId']));
}
public static function searchTotalPrice($cityId){
global $wpdb;
$where = " where 1=1";
if(isset($_GET['cityId'])){
$where .= " and cityId = ".$cityId;
}
$result = $wpdb->get_results('select id,priceValue as value from '.TCSync::DIC_TOTALPRICE_TABLE.$where);
return $result;
}
public static function ajax_searchOrganization(){
wp_send_json(SearchDao::searchOrganization($_GET['parentId']));
}
public static function searchOrganization($parentId = NULL){
global $wpdb;
$where = " where 1=1 ";
if($parentId != NULL){
$where .= " and ParentId =".$parentId;
}
$result = $wpdb->get_results('select Id as id,Name as name from '.TCSync::TOSPUR_ORGANIZATION_TABLE.$where);
return $result;
}
public static function getCityNameWithId($cityId){
global $wpdb;
$result = $wpdb->get_var("select cityName from ".TCSync::DIC_CITY_TABLE." where cityId = ".$cityId);
if($result){
return $result;
}else{
return "未知";
}
}
public static function getWorkUser(){
}
}
\ No newline at end of file
<?php
class TCSync {
const user_url = 'http://218.1.67.130:8988/api/NanTongWechat/GetPropertyConsultant?cityId=1';
const other_url = 'http://218.1.67.130:8988/api/NanTongWechat/GetCommonPlate?radomPla=123456';
const organization_url = 'http://218.1.67.130:8988/api/NanTongWechat/GetOrgnaziTion?radomOrg=123456';
const DIC_CITY_TABLE = 'dic_city';
const DIC_ROOM_TABLE = 'dic_room';
const DIC_BUILDPROPERTY_TABLE = 'dic_buildproperty';
const DIC_AREA_TABLE = 'dic_area';
const DIC_UNITPRICERANGE_TABLE = 'dic_unitpricerange';
const DIC_TOTALPRICE_TABLE = 'dic_totalprice';
const TOSPUR_ORGANIZATION_TABLE = 'tospur_organization';
public static function user_sync(){
$response = wp_remote_post( TCSync::user_url );
$res = array(
'code' => 200,
'msg' => "success"
);
//判断请求是否成功
if( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ){
$res['code'] = 500;
$res['msg'] = "get user info error";
}else{
set_time_limit(0) ;
//获取请求内容
$result = wp_remote_retrieve_body( $response );
$result = json_decode($result,true);
foreach($result['data'] as $item){
if(username_exists($item['WorkNum'])){
$user = get_user_by( "login", $item['WorkNum'] );
$userdata = array(
'ID' => $user->data->ID,
'display_name' => $item['Name']
);
$user_id = wp_update_user( $userdata ) ;
}else{
$userdata = array(
'user_login' => $item['WorkNum'],
'user_pass' => $item['WorkNumAndID'], // When creating an user, `user_pass` is expected.
'role' => 'editor',
'wp_user_level' => 7,
'display_name' => $item['Name']
);
$user_id = wp_insert_user( $userdata ) ;
}
if(is_numeric($user_id)){
if(!is_null($item['ImageUrl']))
update_user_meta( $user_id, "tc_image", $item['ImageUrl'] );
update_user_meta( $user_id, "tc_cityId", $item['CityId'] );
}
}
}
return $res;
}
public static function other_sync(){
global $wpdb;
$response = wp_remote_post( TCSync::other_url );
$res = array(
'code' => 200,
'msg' => "success"
);
//判断请求是否成功
if( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) {
$res['code'] = 500;
$res['msg'] = "get info error";
}else{
set_time_limit(0) ;
//获取请求内容
$result = wp_remote_retrieve_body( $response );
$result = json_decode($result,true);
//print_r($result['data']['CityList']);
foreach($result['data']['CityList'] as $item){
$wpdb->query(TCSync::create_insert_update_sql(TCSync::DIC_CITY_TABLE,$item,array('plateId')));
//print_r(TCSync::create_insert_update_sql(TCSync::CITY_TABLE,$item,array('plateId')));print_r("<br />");
}
foreach($result['data']['RoomStyle'] as $item){
$wpdb->query(TCSync::create_insert_update_sql(TCSync::DIC_ROOM_TABLE,$item,array('id')));
//print_r(TCSync::create_insert_update_sql(TCSync::DIC_ROOM_TABLE,$item,array('id')));print_r("<br />");
}
foreach($result['data']['BulidProperty'] as $item){
$wpdb->query(TCSync::create_insert_update_sql(TCSync::DIC_BUILDPROPERTY_TABLE,$item,array('id')));
//print_r(TCSync::create_insert_update_sql(TCSync::DIC_BUILDPROPERTY_TABLE,$item,array('id')));print_r("<br />");
}
foreach($result['data']['AreaRange'] as $item){
$wpdb->query(TCSync::create_insert_update_sql(TCSync::DIC_AREA_TABLE,$item,array('id'),array('maxValue'=>'max','minValue'=>'min')));
//print_r(TCSync::create_insert_update_sql(TCSync::DIC_AREA,$item,array('id'),array('maxValue'=>'max','minValue'=>'min')));print_r("<br />");
}
foreach($result['data']['TotalPrice'] as $item){
$wpdb->query(TCSync::create_insert_update_sql(TCSync::DIC_TOTALPRICE_TABLE,$item,array('id'),array('maxValue'=>'max','minValue'=>'min')));
//print_r(TCSync::create_insert_update_sql(TCSync::DIC_AREA,$item,array('id'),array('maxValue'=>'max','minValue'=>'min')));print_r("<br />");
}
foreach($result['data']['UnitPriceRange'] as $item){
$wpdb->query(TCSync::create_insert_update_sql(TCSync::DIC_UNITPRICERANGE_TABLE,$item,array('id'),array('maxValue'=>'max','minValue'=>'min')));
//print_r(TCSync::create_insert_update_sql(TCSync::DIC_AREA,$item,array('id'),array('maxValue'=>'max','minValue'=>'min')));print_r("<br />");
}
}
}
public static function organization_sync(){
global $wpdb;
$response = wp_remote_post( TCSync::organization_url );
$res = array(
'code' => 200,
'msg' => "success"
);
//判断请求是否成功
if( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) {
$res['code'] = 500;
$res['msg'] = "get info error";
}else{
set_time_limit(0) ;
$result = wp_remote_retrieve_body( $response );
$result = json_decode($result,true);
foreach($result['data'] as $item){
$wpdb->query(TCSync::create_insert_update_sql(TCSync::TOSPUR_ORGANIZATION_TABLE,$item,array('Id')));
//print_r(TCSync::create_insert_update_sql(TCSync::DIC_AREA,$item,array('id'),array('maxValue'=>'max','minValue'=>'min')));print_r("<br />");
}
}
}
private static function create_insert_update_sql($table,$item,$primary=array(),$change=array()){
$keys = "";
$values = "";
$update = "";
foreach($item as $key => $value){
if(strlen($keys)>0)
$keys .= ",";
$keys .= $change[$key]?$change[$key]:$key;
if(strlen($values)>0)
$values .= ",";
$value = is_numeric($value)?$value:"'".$value."'";
$values .= $value;
if(!in_array($key,$primary)){
if(strlen($update)>0)
$update .= ",";
$update .= ($change[$key]?$change[$key]:$key)."=".$value;
}
}
$sql = "insert into ".$table."(".$keys.") values(".$values.") ON DUPLICATE KEY UPDATE ".$update;
return $sql;
}
}
\ No newline at end of file
<?php
/*
Plugin Name: table_test
Version: 1.0
Plugin URI: http://www.u-gen.net
Author: U-GEN TECH.
Description: 自定义列表
*/
define( 'PLUGIN_DIR', dirname( __FILE__ ).'\\');
add_action('init','tospur_init');
function tospur_init(){
require_once(PLUGIN_DIR . 'Tools\TCSync.php');
require_once(PLUGIN_DIR . 'Dao\SearchDao.php');
add_action('admin_menu', 'create_menu');
tospur_ajax_set();
}
function tospur_ajax_set(){
add_action( 'wp_ajax_serachCity', 'SearchDao::ajax_serachCity' );
add_action( 'wp_ajax_nopriv_serachCity', 'SearchDao::ajax_serachCity' );
add_action( 'wp_ajax_searchArea', 'SearchDao::ajax_searchArea' );
add_action( 'wp_ajax_nopriv_searchArea', 'SearchDao::ajax_searchArea' );
add_action( 'wp_ajax_searchBuildProperty', 'SearchDao::ajax_searchBuildProperty' );
add_action( 'wp_ajax_nopriv_searchBuildProperty', 'SearchDao::ajax_searchBuildProperty' );
add_action( 'wp_ajax_searchRoom', 'SearchDao::ajax_searchRoom' );
add_action( 'wp_ajax_nopriv_searchRoom', 'SearchDao::ajax_searchRoom' );
add_action( 'wp_ajax_searchUnitPriceRange', 'SearchDao::ajax_searchUnitPriceRange' );
add_action( 'wp_ajax_nopriv_searchUnitPriceRange', 'SearchDao::ajax_searchUnitPriceRange' );
add_action( 'wp_ajax_searchTotalPrice', 'SearchDao::ajax_searchTotalPrice' );
add_action( 'wp_ajax_nopriv_searchTotalPrice', 'SearchDao::ajax_searchTotalPrice' );
add_action( 'wp_ajax_searchOrganization', 'SearchDao::ajax_searchOrganization' );
add_action( 'wp_ajax_nopriv_searchOrganization', 'SearchDao::ajax_searchOrganization' );
}
function create_menu(){
add_menu_page("talbe_test", "table_test", "manage_options", "1", "create_table");
}
function create_table(){
TCSync::user_sync();
//TCSync::organization_sync();
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
@font-face {
font-family: 'iconfont';
src: url('http://at.alicdn.com/t/font_1439002040_1403098.eot');
src: url('http://at.alicdn.com/t/font_1439002040_1403098.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439002040_1403098.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439002040_1403098.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439002040_1403098.svg#iconfont') format('svg');
/* IE9*/
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
html,
body {
width: 100%;
height: 100%;
}
body {
user-select: none;
-webkit-user-select: none;
tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
color: #707070;
background-color: #f9f9f9;
}
.collect {
position: fixed;
top: 10px;
right: 0;
z-index: 999;
width: 55px;
height: 35px;
line-height: 35px;
margin-bottom: 0;
padding-left: 10px;
color: #ffffff;
background-color: #008cd7;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
}
.collect .iconfont {
font-size: 26px;
}
.addWrap {
width: 100%;
height: 250px;
position: relative;
}
.addWrap .swipe {
overflow: hidden;
visibility: hidden;
position: relative;
height: 100%;
}
.addWrap .swipe .swipe-wrap {
overflow: hidden;
position: relative;
}
.addWrap .swipe .swipe-wrap div {
float: left;
width: 100%;
position: relative;
}
.addWrap .swipe .swipe-wrap div img {
max-width: 100%;
}
.addWrap ul {
position: absolute;
bottom: -2px;
left: 0;
right: 0;
font-size: 0;
}
.addWrap ul li {
width: 10px;
height: 10px;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
-webkit-border-top-left-radius: 50%;
-webkit-border-top-right-radius: 50%;
-webkit-border-bottom-left-radius: 50%;
-webkit-border-bottom-right-radius: 50%;
background-color: #000000;
margin-right: 10px;
opacity: 0.7;
}
.addWrap ul li.active {
background-color: #ffffff;
}
.detail_row {
width: 100%;
height: auto;
padding: 10px;
overflow: hidden;
border-bottom: 1px solid #b7b7b7;
}
.detail_row p {
margin-bottom: 0;
}
.detail_row .detail_title {
color: #000000;
}
.detail_row #wrapper {
width: 100%;
margin-top: 5px;
overflow: hidden;
}
.detail_row #wrapper #scroller {
height: 100%;
float: left;
padding: 0;
}
.detail_row #wrapper #scroller ul {
float: left;
width: 100%;
height: 100%;
margin: 0;
font-size: 0;
}
.detail_row #wrapper #scroller ul li {
width: 90px;
text-align: center;
vertical-align: top;
margin-right: 5px;
font-size: 14px;
}
.detail_row #wrapper #scroller ul li p img {
width: 100%;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
}
.detail_row #wrapper #scroller ul li:last-child {
margin-right: 0;
}
.detail_row ul {
margin-bottom: 0;
}
.detail_row ul li {
padding: 0;
}
.detail_row ul li .btn {
color: #ff0000;
border-color: #959595;
background-color: transparent;
}
.detail_row ul li.price span {
color: #000000;
}
.detail_row ul li.price span em {
font-style: normal;
}
.detail_row ul li.price span em:nth-child(1) {
color: #ff0000;
font-size: 16px;
font-weight: bold;
}
.detail_row ul li.price span em:nth-child(2) {
position: relative;
top: -5px;
font-size: 7px;
}
.detail_row .infoCont li span {
color: #000000;
}
.detail_row .recommendCont {
overflow: hidden;
}
.detail_row .recommendCont li {
margin: 5px 0 0 15px;
}
.detail_row .recommendCont li p {
width: 100%;
padding-bottom: 100%;
background-repeat: no-repeat;
background-position: center;
background-size: auto 100%;
-webkit-background-size: auto 100%;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
}
.detail_row .single_omit {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@font-face {
font-family: 'iconfont';
src: url('http://at.alicdn.com/t/font_1439002040_1403098.eot');
src: url('http://at.alicdn.com/t/font_1439002040_1403098.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('http://at.alicdn.com/t/font_1439002040_1403098.woff') format('woff'), /* chrome、firefox */ url('http://at.alicdn.com/t/font_1439002040_1403098.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('http://at.alicdn.com/t/font_1439002040_1403098.svg#iconfont') format('svg');
/* IE9*/
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
html,
body {
width: 100%;
height: 100%;
}
body {
user-select: none;
-webkit-user-select: none;
tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
color: #707070;
background-color: #f9f9f9;
}
.search {
width: 100%;
height: 54px;
padding: 10px 10px 10px 5px;
position: relative;
background-color: #008cd7;
}
.search .btn-group {
position: static;
}
.search .btn-group .btn {
color: #ffffff;
font-weight: bold;
}
.search .btn-group .btn .iconfont {
color: #ffffff;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.search .btn-group .btn .iconfont:after {
content: "\e601";
}
.search .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.search .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
border: 0;
padding: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.search .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.search .btn-group .dropdown-menu a:hover {
text-decoration: none;
}
.search .btn-group .dropdown-menu a.active {
color: #008cd7;
border-bottom-color: #008cd7;
}
.search .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.search .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.search .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.search .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.search .has-feedback {
width: 75%;
}
.search .has-feedback .form-control {
color: #b7b7b7;
border-color: #117bb9;
-webkit-appearance: none;
}
.search .has-feedback .form-control::-webkit-input-placeholder {
color: #b7b7b7;
}
.search .has-feedback .form-control-feedback {
top: 3px;
right: 3px;
width: 26px;
height: 26px;
line-height: 26px;
color: #ffffff;
background-color: #0bacd3;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
box-shadow: 0 2px 0 0 #088aa9;
-webkit-box-shadow: 0 2px 0 0 #088aa9;
}
.btn-group-justified {
width: 100%;
height: 45px;
position: relative;
box-sizing: content-box;
-webkit-box-sizing: content-box;
border-bottom: 1px solid #b7b7b7;
}
.btn-group-justified .btn-group {
position: static;
}
.btn-group-justified .btn-group .btn {
color: #000000;
font-weight: bold;
}
.btn-group-justified .btn-group .btn .iconfont {
color: #b7b7b7;
font-size: 12px;
font-weight: normal;
margin-left: 5px;
}
.btn-group-justified .btn-group .btn .iconfont:after {
content: "\e601";
}
.btn-group-justified .btn-group.open .btn .iconfont:after {
content: "\e602";
}
.btn-group-justified .btn-group .dropdown-menu {
left: 0;
width: 100%;
height: 300px;
border: 0;
padding: 0;
margin-top: 1px;
overflow: hidden;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.btn-group-justified .btn-group .dropdown-menu a {
color: #000000;
margin: 0 10px;
padding: 20px;
display: block;
border-bottom: 1px solid;
}
.btn-group-justified .btn-group .dropdown-menu a:hover {
text-decoration: none;
}
.btn-group-justified .btn-group .dropdown-menu a.active {
color: #008cd7;
border-bottom-color: #008cd7;
}
.btn-group-justified .btn-group .dropdown-menu .left-menu {
height: 100%;
overflow: hidden;
padding: 0;
background-color: #f9f9f9;
}
.btn-group-justified .btn-group .dropdown-menu .left-menu a {
margin: 0;
border-bottom-color: transparent;
}
.btn-group-justified .btn-group .dropdown-menu .left-menu a.active-bg {
background-color: #ffffff;
}
.btn-group-justified .btn-group .dropdown-menu .right-menu {
height: 100%;
overflow: hidden;
padding: 0;
}
.btn-group-justified .btn-group .btn {
padding: 2px 12px;
border-right-color: #b7b7b7;
}
.btn-group-justified .btn-group:last-child .btn {
border: 0;
}
#wrapper {
position: absolute;
z-index: 1;
top: 100px;
bottom: 0;
left: 0;
width: 100%;
overflow: hidden;
}
#wrapper #scroller {
padding-bottom: 40px;
}
#wrapper #scroller div {
width: 100%;
height: 121px;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
#wrapper #scroller div p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
#wrapper #scroller div p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
#wrapper #scroller div ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
}
#wrapper #scroller div ul li {
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#wrapper #scroller div ul li.multiLine_omit {
height: 36px;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
white-space: normal;
}
#wrapper #scroller div ul li:first-child {
color: #000000;
font-weight: bold;
}
#wrapper #scroller div ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
}
#wrapper #scroller div ul li:last-child .label {
color: #ff0000;
font-size: 7px;
padding: 0 3px;
border: 1px solid #acacac;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
-webkit-border-top-left-radius: 2px;
-webkit-border-top-right-radius: 2px;
-webkit-border-bottom-left-radius: 2px;
-webkit-border-bottom-right-radius: 2px;
}
#wrapper #scroller div ul li:last-child span {
color: #000000;
}
#wrapper #scroller div ul li:last-child span em {
font-style: normal;
}
#wrapper #scroller div ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 16px;
font-weight: bold;
}
#wrapper #scroller div ul li:last-child span em:nth-child(2) {
position: relative;
top: -5px;
font-size: 7px;
}
.footer {
width: 100%;
height: 40px;
line-height: 40px;
color: #008cd7;
font-size: 22px;
font-weight: bold;
background-color: rgba(255, 255, 255, 0.9);
}
<?php <?php
echo 'index.php'; $context = array();
$context['theme'] = get_template_directory_uri();
require_once(WP_PLUGIN_DIR."/tospur/Dao/SearchDao.php");
$cityId = 1;
if($_GET['cityId'])
$cityId = $_GET['cityId'];
$context['cityId'] = $cityId;
$context['cityName'] = SearchDao::getCityNameWithId($cityId);
$context['select']['city'] = SearchDao::searchCity();
$context['select']['district'] = SearchDao::searchCity($cityId);
$plateArray = array();
foreach($context['select']['district'] as $item){
$plateArray[$item->id] = array();
foreach(SearchDao::searchCity($cityId,$item->id) as $i){
$plateArray[$item->id][] = $i;
}
}
$context['select']['plate'] = json_encode($plateArray);
$context['select']['buildProperty'] = SearchDao::searchBuildProperty();
$context['select']['room'] = json_encode(SearchDao::searchRoom());
$context['select']['unitPriceRange'] = SearchDao::searchUnitPriceRange($cityId);
$context['select']['totalPrice'] = SearchDao::searchTotalPrice($cityId);
$context['select']['area'] = json_encode(SearchDao::searchArea($cityId));
$context['site_url'] = site_url();
Timber::render('index.html', $context);
?> ?>
\ No newline at end of file
/*! jQuery Mobile v1.4.5 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */
(function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function T(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function N(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function C(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function k(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function L(){g=!1}function A(){g=!0}function O(){E=0,v.length=0,m=!1,A()}function M(){L()}function _(){D(),c=setTimeout(function(){c=0,O()},e.vmouse.resetTimerDuration)}function D(){c&&(clearTimeout(c),c=0)}function P(t,n,r){var i;if(r&&r[t]||!r&&k(n.target,t))i=N(n,t),e(n.target).trigger(i);return i}function H(t){var n=e.data(t.target,s),r;!m&&(!E||E!==n)&&(r=P("v"+t.type,t),r&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function B(t){var n=T(t).touches,r,i,o;n&&n.length===1&&(r=t.target,i=C(r),i.hasVirtualBinding&&(E=w++,e.data(r,s,E),D(),M(),d=!1,o=T(t).touches[0],h=o.pageX,p=o.pageY,P("vmouseover",t,i),P("vmousedown",t,i)))}function j(e){if(g)return;d||P("vmousecancel",e,C(e.target)),d=!0,_()}function F(t){if(g)return;var n=T(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=C(t.target);d=d||Math.abs(n.pageX-h)>i||Math.abs(n.pageY-p)>i,d&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}function I(e){if(g)return;A();var t=C(e.target),n,r;P("vmouseup",e,t),d||(n=P("vclick",e,t),n&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0)),P("vmouseout",e,t),d=!1,_()}function q(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function R(){}function U(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{});var r=e.data(this,i);r[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S,x;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(x=0;x<o.length;x++)e.event.special[o[x]]=U(o[x]);y&&n.addEventListener("click",function(t){var n=v.length,r=t.target,i,o,u,a,f,l;if(n){i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;while(u){for(a=0;a<n;a++){f=v[a],l=0;if(u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID){t.preventDefault(),t.stopPropagation();return}}u=u.parentNode}}},!0)})(e,t,n),function(e){e.mobile={}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,t,r){function l(t,n,i,s){var o=i.type;i.type=n,s?e.event.trigger(i,r,t):e.event.dispatch.call(t,i),i.type=o}var i=e(n),s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){r=n,l(t,r?"scrollstart":"scrollstop",e)}var t=this,n=e(t),r,i;n.bind(o,function(t){if(!e.event.special.scrollstart.enabled)return;r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50)})},teardown:function(){e(this).unbind(o)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),r=!1;n.bind("vmousedown",function(s){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),!r&&o===e.target?l(t,"tap",e):r&&e.preventDefault()}r=!1;if(s.which&&s.which!==1)return!1;var o=s.target,u;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(r=!0),l(t,"taphold",e.Event("taphold",{target:o}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),i.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,r=t.pageYOffset,i=e.clientX,s=e.clientY;if(e.pageY===0&&Math.floor(s)>Math.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(s<e.pageY-r||i<e.pageX-n)i=e.pageX-n,s=e.pageY-r;return{x:i,y:s}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y]}},handleSwipe:function(t,n,r,i){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var s=t.coords[0]>n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventInProgress)return;e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){if(!o||t.isDefaultPrevented())return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)},r.on(u,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment