当前位置: 首页>>代码示例>>PHP>>正文


PHP get_city函数代码示例

本文整理汇总了PHP中get_city函数的典型用法代码示例。如果您正苦于以下问题:PHP get_city函数的具体用法?PHP get_city怎么用?PHP get_city使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_city函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getBottomNav

 /**
  * 获取底部导航
  * @return array 底部导航
  */
 public function getBottomNav()
 {
     $city = get_city();
     if (($bottomNav = model('Cache')->get('bottomNav_' . $city)) === false) {
         $map['status'] = 1;
         $map['position'] = 1;
         $map['city'] = $city;
         $list = $this->where($map)->order('order_sort ASC')->findAll();
         foreach ($list as $v) {
             $v['url'] = empty($v['url']) ? 'javascript:;' : str_replace('{website}', SITE_URL, $v['url']);
             if ($v['parent_id'] == 0) {
                 $navlist[$v['navi_id']] = $v;
             }
         }
         foreach ($list as $v) {
             if ($v['parent_id'] > 0) {
                 $navlist[$v['parent_id']]['child'][] = $v;
             }
         }
         $bottomNav = $navlist;
         empty($bottomNav) && ($bottomNav = array());
         model('Cache')->set('bottomNav_' . $city, $bottomNav);
     }
     return $bottomNav;
 }
开发者ID:weiphpdev,项目名称:xindongfang,代码行数:29,代码来源:NaviModel.class.php

示例2: loadCity_option

 public function loadCity_option()
 {
     $this->load->helper('wall_mapdb');
     $state = $this->input->post('state');
     $cities = get_city(false, $state);
     foreach ($cities as $city) {
         echo "<option value=\"{$city['id']}\" >{$city['title']}</option>";
     }
 }
开发者ID:padideIt,项目名称:wall,代码行数:9,代码来源:Loader.php

示例3: getAllWeibaCate

 public function getAllWeibaCate()
 {
     $map['city'] = get_city();
     $list = $this->where($map)->findAll();
     $temp = array();
     foreach ($list as $v) {
         $temp[$v['id']] = $v['name'];
     }
     return $temp;
 }
开发者ID:weiphpdev,项目名称:xindongfang,代码行数:10,代码来源:WeibaCategoryModel.class.php

示例4: print_form

function print_form($db, $smarty, $print_ad = 0)
{
    if ($print_ad) {
        $print_ad = get_ad($db, $print_ad);
    }
    $add = get_all($db);
    $smarty->assign('add', $add);
    $smarty->assign('print_ad', $print_ad);
    $smarty->assign('city', get_city($db));
    $smarty->assign('category', get_category($db));
    $smarty->display('form.tpl');
}
开发者ID:aic513,项目名称:Web-programming,代码行数:12,代码来源:functions.php

示例5: adminLogin

 /**
  * 登录后台
  * @return boolean 登录后台是否成功
  */
 public function adminLogin()
 {
     if (is_numeric($_POST['uid'])) {
         $map['uid'] = intval($_POST['uid']);
     } else {
         $map['email'] = t($_POST['email']);
     }
     $login = M('User')->where($map)->find();
     if ($this->loginLocal($login['email'], $_POST['password'])) {
         $GLOBALS['ts']['mid'] = $_SESSION['adminLogin'] = intval($_SESSION['mid']);
         if ($_SESSION['mid'] != 1) {
             $city = getMyCity($_SESSION['mid']);
             get_city($city);
         }
         return true;
     } else {
         return false;
     }
 }
开发者ID:weiphpdev,项目名称:xindongfang,代码行数:23,代码来源:PassportModel.class.php

示例6: index

 /**
  * 用户管理 - 用户列表
  */
 public function index()
 {
     $_REQUEST['tabHash'] = 'index';
     // 初始化用户列表管理菜单
     $this->_initUserListAdminMenu('index');
     // 数据的格式化与listKey保持一致
     // 列表批量操作按钮
     $this->pageButton[] = array('title' => L('PUBLIC_SEARCH_USER'), 'onclick' => "admin.fold('search_form')");
     $this->pageButton[] = array('title' => '禁用用户', 'onclick' => "admin.delUser()");
     $map = array();
     if ($_SESSION['mid'] != 1) {
         $map['city_id'] = get_city();
     } else {
         $this->pageButton[] = array('title' => L('PUBLIC_TRANSFER_USER_GROUP'), 'onclick' => "admin.changeUserGroup()");
     }
     $listData = $this->_getUserList('20', $map, 'index');
     // 转移用户部门,如果需要请将下面的注释打开
     // $this->pageButton[] = array('title'=>L('PUBLIC_TRANSFER_DEPARTMENT'),'onclick'=>"admin.changeUserDepartment()");
     $this->displayList($listData);
 }
开发者ID:weiphpdev,项目名称:xindongfang,代码行数:23,代码来源:UserAction.class.php

示例7: cookie_city

function cookie_city($city)
{
    global $INI;
    if ($city) {
        cookieset('city', $city['id']);
        return $city;
    }
    $city_id = cookieget('city');
    if (!$city_id) {
        $city = get_city();
        if (!$city) {
            $city = Table::Fetch('category', $INI['hotcity'][0]);
        }
        if ($city) {
            cookie_city($city);
        }
        return $city;
    } else {
        if (in_array($city_id, $INI['hotcity'])) {
            return Table::Fetch('category', $city_id);
        }
        $INI['hotcity'] = array_diff($INI['hotcity'], array(0, NULL));
        $city = Table::Fetch('category', $INI['hotcity'][0]);
    }
    return $city;
}
开发者ID:yunsite,项目名称:hhzuitu,代码行数:26,代码来源:common.php

示例8: get_shopname

}
if (isset($_COOKIE['renrenid'])) {
    $_SESSION['email'] = $_COOKIE['renrenid'];
    $mark = 1;
} else {
    $mark = 0;
}
if (isset($_GET['shopid'])) {
    $smarty->assign('shopname', get_shopname($db, $_GET['shopid']));
}
if (isset($_SESSION['email']) && isset($_COOKIE['renrenid'])) {
    $user = get_user($db, $_SESSION['email']);
    $nc = "<img src='./images/ico_renren.gif' align='bottom'/><a href='http://www.renren.com'  target='_blank'>" . $user['nickname'] . "</a>&nbsp;积分:" . $user['jifen'] . "&nbsp;&nbsp;<a id='feed_link' href='javascript:void(0);'>告诉好友</a>";
} elseif (isset($_SESSION['email']) && !isset($_COOKIE['renrenid'])) {
    $user = get_user($db, $_SESSION['email']);
    $nc = $user['nickname'] . "&nbsp;积分:" . $user['jifen'];
} else {
    $nc = NULL;
}
$city = get_city($db, $bulid);
$area = get_area($db, $bulid);
$shopcount = getshopcounts($db, $bulid);
$dinnercount = getdinnercounts($db, $bulid);
$smarty->assign("city", $city);
$smarty->assign("dinnercount", $dinnercount);
$smarty->assign("shopcount", $shopcount);
$smarty->assign("build", $area['b']);
$smarty->assign('mark', $mark);
$smarty->assign('nc', $nc);
$smarty->assign('tag', $tag);
$smarty->display("header.tpl");
开发者ID:sandyliao80,项目名称:oswaimai,代码行数:31,代码来源:header.php

示例9: get_city

              <div id="cont-postalcode" class="row">
                <label for="postalcode">Zip / Postal Code</label>
                <input type="text" name="postalcode" id="postalcode" value=""/>
              </div>               

              <div id="cont-country" class="row">
                <label for="country">Country</label>
                <input type="text" name="country" id="country" value="Indonesia" readonly="readonly"/>
              </div>      

              <div class="row">
                <label for="city">City</label>
                <select class="select" name="city" id="city">
                  <?php 
$data = get_city();
if ($data["result"]) {
    foreach ($data["result"] as $row) {
        $city_id = $row->city_id;
        $city_name = $row->city_name;
        $type = $row->type;
        echo "\n                          <option value='" . $city_id . "'>" . $city_name . " [" . $type . "]</option>\t\t\t\t\n                        ";
    }
}
?>
   
                </select>
              </div>                         


              <div class="row">
开发者ID:Effzz,项目名称:www.momocuppy.com,代码行数:30,代码来源:index.php

示例10: update_country

                update_country($recData['ID'], $recData['value_est'], $recData['value_eng'], $recData['value_rus']);
            }
        }
        $refresh = true;
    }
}
$strTemplate = "pop.edasimuuja.location.tpl";
if (!$_POST['formUser_submit']) {
    $recData['country'] = $_GET['country'];
    $recData['region'] = $_GET['region'];
    $recData['ID'] = $_GET['ID'];
}
if ($recData['country']) {
    if ($recData['region']) {
        if ($recData['ID']) {
            $city = get_city($recData['ID']);
            $recData['city'] = $recData['ID'];
            if (!$_POST['formUser_submit']) {
                $recData['value_est'] = $city[0]['name_est'];
                $recData['value_eng'] = $city[0]['name_eng'];
                $recData['value_rus'] = $city[0]['name_rus'];
            }
        }
        $region = get_region($recData['region']);
    } else {
        if ($recData['ID']) {
            $region = get_region($recData['ID']);
            if (!$_POST['formUser_submit']) {
                $recData['value_est'] = $region[0]['name_est'];
                $recData['value_eng'] = $region[0]['name_eng'];
                $recData['value_rus'] = $region[0]['name_rus'];
开发者ID:vcgato29,项目名称:poff,代码行数:31,代码来源:pop.edasimuuja.location.php

示例11: checkCity

 public function checkCity()
 {
     $this->load->helper('wall_mapdb');
     $city = get_city($this->security->xss_clean($_POST['city']));
     if (isset($city[0])) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:padideIt,项目名称:wall,代码行数:10,代码来源:Ads.php

示例12: foreach

     foreach ($courier_city as $key => $city) {
         insertCourierRate($courier_name, $courier_province, $city, $courier_rate[$key], $courier_weight);
     }
     foreach ($courier_rate as $rate) {
         update_rate($initial_id, $courier_id['latest_id'], $rate);
         $initial_id++;
     }
 } else {
     if ($courier_service == "Local & International") {
         // LOCAL
         $foreach_province = $_POST['province_name'];
         $foreach_city_name = $_POST['city_name'];
         $foreach_rate = clean_price($_POST['array_rate']);
         $weight = $_POST['courier_weight'];
         foreach ($foreach_province as $provinces) {
             $city = get_city($provinces);
             foreach ($city as $key => $city) {
                 insertCourierRate($courier_id['latest_id'], $provinces, $city['city_name'], '0', $weight);
             }
         }
         $rate = clean_price($_POST['courier_rate']);
         $courier_rate_id = get_min_courier($courier_id['latest_id']);
         $initial_id = $courier_rate_id['latest_id'];
         foreach ($rate as $rate) {
             update_rate($initial_id, $courier_id['latest_id'], $rate);
             $initial_id++;
         }
         // INTERNATIONAL
         $courier_name = $courier_id['latest_id'];
         $courier_province = "international";
         $courier_city = $_POST['international_id'];
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:control.php

示例13: page_init

$default_sort_by = "category_name";
$pgdata = page_init($equal_search, $default_sort_by);
// static/general.php
$page = $pgdata['page'];
$query_per_page = $pgdata['query_per_page'];
$sort_by = $pgdata['sort_by'];
$first_record = $pgdata['first_record'];
$search_parameter = $pgdata['search_parameter'];
$search_value = $pgdata['search_value'];
$search_query = $pgdata['search_query'];
$search = $pgdata['search'];
$full_order = count_city($search_query, $sort_by, $query_per_page);
$total_query = $full_order['total_query'];
$total_page = ceil($full_order['total_query'] / $query_per_page);
// CALL FUNCTION
$listing_order = get_city($search_query, $sort_by, $first_record, $query_per_page);
// HANDLING ARROW SORTING
if ($_REQUEST['srt'] == "category_name DESC") {
    $arr_order_number = "<span class=\"sort-arrow-up\"></span>";
} else {
    if ($_REQUEST['srt'] == "category_name") {
        $arr_order_number = "<span class=\"sort-arrow-down\"></span>";
    } else {
        $arr_order_number = "<span class=\"sort-arrow-down\"></span>";
    }
}
// STORED VALUE
echo "<input type=\"hidden\" name=\"url\" id=\"url\" class=\"hidden\" value=\"http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/career-city-view\">\n";
echo "<input type=\"hidden\" name=\"page\" id=\"page\" class=\"hidden\" value=\"" . $page . "\" /> \n";
echo "<input type=\"hidden\" name=\"query_per_page\" id=\"query_per_page\" class=\"hidden\" value=\"" . $query_per_page . "\" /> \n";
echo "<input type=\"hidden\" name=\"total_page\" id=\"total_page\" class=\"hidden\" value=\"" . ceil($full_order['total_query'] / $query_per_page) . "\" /> \n";
开发者ID:nickyudha,项目名称:spalosophy,代码行数:31,代码来源:control.php

示例14: manage_ads

 public function manage_ads($offset = 0)
 {
     if ($this->ion_auth->is_admin() or $this->ion_auth->in_group(3) && $this->permission(2)) {
         $this->load->model('admin_model');
         $this->load->library('pagination');
         $this->load->helper('wall_mapdb');
         $get = array();
         $query = urldecode($_SERVER['QUERY_STRING']);
         if ($query != null || $query != "") {
             $a = explode('&', $query);
             foreach ($a as $key => $b) {
                 $b = explode('=', $b);
                 if (isset($b[0]) && isset($b[1])) {
                     $get[htmlspecialchars(urldecode($b[0]))] = htmlspecialchars(urldecode($b[1]));
                 }
             }
         }
         // pagination offset
         if (!isset($get['ipp']) || !is_numeric($get['ipp'])) {
             $get['ipp'] = 0;
         }
         $search['page'] = $this->security->xss_clean($get['ipp']);
         $str = "";
         $flag = true;
         // ads id filter
         if (isset($get['id']) && $get['id'] != "") {
             $recived['id'] = $this->security->xss_clean($get['id']);
             $id = $recived['id'];
             $search['id'] = $id;
             if (!$flag) {
                 $str .= "&id={$recived['id']}";
             } else {
                 $str .= "id={$recived['id']}";
             }
             $flag = false;
             $data['searchId'] = $recived['id'];
         } else {
             $data['searchId'] = "";
         }
         // ads cat filter
         if (isset($get['cat']) && $get['cat'] != "") {
             $recived['cat'] = $this->security->xss_clean($get['cat']);
             $cat = $recived['cat'];
             $search['cat'] = $cat;
             if (!$flag) {
                 $str .= "&cat={$recived['cat']}";
             } else {
                 $str .= "cat={$recived['cat']}";
             }
             $flag = false;
             $data['searchCat'] = $recived['cat'];
         } else {
             $data['searchCat'] = "";
         }
         // ads status filter
         if (isset($get['status']) && $get['status'] != 'false') {
             $recived['status'] = $this->security->xss_clean($get['status']);
             $status = $recived['status'];
             $search['status'] = $status;
             if (!$flag) {
                 $str .= "&status={$recived['status']}";
             } else {
                 $str .= "status={$recived['status']}";
             }
             $flag = false;
             $data['searchStatus'] = $recived['status'];
         } else {
             $data['searchStatus'] = "";
         }
         // ads state filter
         if (isset($get['state']) && $get['state'] != 0) {
             $recived['state'] = $this->security->xss_clean($get['state']);
             $search['state'] = $recived['state'];
             if (!$flag) {
                 $str .= "&state={$recived['state']}";
             } else {
                 $str .= "state={$recived['state']}";
             }
             $flag = false;
             $data['searchState'] = $recived['state'];
             $data['states'] = get_state();
         } else {
             $data['searchState'] = "";
             $data['states'] = get_state();
         }
         // ads city filter
         if (isset($get['city']) && $get['city'] != 0 && (isset($get['state']) && $get['state'] != 0)) {
             $recived['city'] = $this->security->xss_clean($get['city']);
             $search['city'] = $recived['city'];
             if (!$flag) {
                 $str .= "&city={$recived['city']}";
             } else {
                 $str .= "city={$recived['city']}";
             }
             $flag = false;
             $data['searchCity'] = $recived['city'];
             $data['cities'] = get_city(false, $get['state']);
         } else {
             if (isset($get['state']) && $get['state'] != 0) {
                 $data['cities'] = get_city(false, $get['state']);
//.........这里部分代码省略.........
开发者ID:padideIt,项目名称:wall,代码行数:101,代码来源:Admin.php

示例15: get_city

<?php

/* -- DEFINED VARIABLE -- */
// REQUEST
$category_id = $_REQUEST['cat_id'];
// CALL FUNCTION
$category = get_city($category_id);
$check = count_job($category_id);
$city = get_cities();
//$category_name =
if (isset($_POST['btn_detail_store_job'])) {
    // DEFINED VARIABLE
    $active = '1';
    $visibility = $_POST['visibility_status'];
    $city_name = stripslashes($_POST['category_name']);
    $cat_id = $_POST['cat_id'];
    $category = $_POST['category_department'];
    $desc = stripslashes($_POST['career_description']);
    $map = stripslashes($_POST['category_maps']);
    if ($_POST['btn_detail_job'] == 'Delete') {
        delete($cat_id);
        $_SESSION['alert'] = 'success';
        $_SESSION['msg'] = 'Item has been successfully deleted.';
    } else {
        update($city_name, $category, $desc, $map, $visibility, $cat_id);
        $_SESSION['alert'] = 'success';
        $_SESSION['msg'] = 'Item has been successfully saved.';
    }
}
开发者ID:nickyudha,项目名称:spalosophy,代码行数:29,代码来源:control.php


注:本文中的get_city函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。