Beispiel #1
0
 public function index()
 {
     $user_tucao = $this->input->post('user_tucao');
     $must = array('user_tucao' => $user_tucao);
     $res = get_api_data('user/tucao', $must);
     echo json_encode($res);
 }
 public function __construct()
 {
     parent::__construct();
     $this->load->library('session');
     /*加载 session 类*/
     $this->get_data = $this->input->get();
     $this->post_data = $this->input->post();
     $admin_session = $this->session->userdata('admin_session');
     //管理员登录后才可以访问
     $login_url = uri_string();
     if ($login_url != 'auth/login' && $login_url != 'auth/do_login') {
         $res = get_api_data('employee/is_login', array('session' => $admin_session));
         if ($res['err_num'] == 0) {
             $this->employee_info['employee'] = $res['results']['employee'];
         } else {
             redirect(base_url('auth/login'));
         }
     }
     $this->init();
     $this->data['topnav'] = $this->top_nav;
     $this->data['title'] = "街报web管理系统";
     //web页面默认名字
     //设置分页默认值 page_now
     if (!isset($this->get_data['page_now'])) {
         $this->get_data['page_now'] = 1;
     }
 }
 public function index()
 {
     $mall_id = $this->input->post('mall_id');
     $must = array('mall_id' => $mall_id);
     $res = get_api_data('ad/mall_ad_lists', $must);
     echo json_encode($res);
 }
 public function index()
 {
     $comment = $this->input->post('comment');
     $must = array('comment' => $comment);
     $res = get_api_data('user/comment_add', $must);
     echo json_encode($res);
 }
Beispiel #5
0
 public function index()
 {
     $must = array('store_id' => 1);
     $res = get_api_data('store/add_verify_code', $must);
     op($res);
     echo json_encode($res);
 }
Beispiel #6
0
 public function index()
 {
     $floor_id = $this->input->post('floor_id');
     $must = array('floor_id' => $floor_id);
     $res = get_api_data('mall_floor/detail', $must);
     echo json_encode($res);
 }
function check_push_events_bitbucket($repo)
{
    $data = get_api_data("/api/1.0/repositories/{$repo}/events", "bitbucket");
    $changesets = get_api_data("/api/1.0/repositories/{$repo}/changesets?limit=10", "bitbucket");
    for ($i = 0; $i < count($data["events"]); $i++) {
        if (isset($data["events"][$i]["utc_created_on"]) == False) {
            continue;
        }
        $timestamp = $data["events"][$i]["utc_created_on"];
        $t = convert_timestamp($timestamp, "Y-m-d H:i:s      ");
        $dt = microtime(True) - $t;
        if ($dt <= TIME_LIMIT_SEC) {
            if ($data["events"][$i]["event"] == "pushed") {
                pm(FEED_CHAN, chr(3) . "13" . "push to https://bitbucket.org/{$repo} @ " . date("H:i:s", $t) . " by " . $data["events"][$i]["user"]["username"]);
                $commits = $data["events"][$i]["description"]["commits"];
                for ($j = 0; $j < count($commits); $j++) {
                    $changeset = bitbucket_get_changeset($changesets, $commits[$j]["hash"]);
                    if ($changeset === False) {
                        pm(FEED_CHAN, "changeset not found");
                        continue;
                    }
                    $desc = $commits[$j]["description"];
                    if ($desc != $changeset["message"]) {
                        continue;
                    }
                    pm(FEED_CHAN, chr(3) . "11" . "  " . $changeset["author"] . ": " . $changeset["message"]);
                    $url = "https://bitbucket.org/{$repo}/commits/" . $commits[$j]["hash"];
                    pm(FEED_CHAN, chr(3) . "11" . "  " . $url);
                }
            }
        }
    }
}
 public function index()
 {
     $store_session = $this->input->post('store_session');
     $must = array('store_session' => $store_session);
     $res = get_api_data('store/storedetail', $must);
     echo json_encode($res);
 }
Beispiel #9
0
 public function index()
 {
     $must = array('province' => '北京', 'page_now' => 1);
     //可选参数 : 'page_size'=>1000
     $res = get_api_data('city/lists', $must);
     echo json_encode($res);
 }
 public function index()
 {
     $district_id = $this->input->post('district_id');
     $must = array('district_id' => $district_id);
     $res = get_api_data('district/detail', $must);
     echo json_encode($res);
 }
 public function index()
 {
     $phone = $this->input->post('phone');
     $must = array('phone' => $phone);
     $res = get_api_data('user/msg_verify', $must);
     echo json_encode($res);
 }
Beispiel #12
0
 public function edit_store()
 {
     $store_id = $this->get_data['store_id'];
     $ret = get_api_data('store/detail', array('store_id' => $store_id));
     $this->data['store_info'] = $ret['results'];
     $this->load->view('store_box/store_edit', $this->data);
 }
Beispiel #13
0
 public function index()
 {
     $store_account = $this->input->post('store_account');
     $pwd = $this->input->post('pwd');
     $must = array('store_account' => $store_account, 'pwd' => $pwd);
     $res = get_api_data('store/login', $must);
     echo json_encode($res);
 }
Beispiel #14
0
 public function index()
 {
     $session = $_COOKIE['session'];
     $must = array('session' => $session);
     $res = get_api_data('user/user_street_time', $must);
     op($res);
     echo json_encode($res);
 }
Beispiel #15
0
 public function index()
 {
     $session_val = $_COOKIE['session'];
     $event_id = $this->input->post('event_id');
     $must = array('session' => $session_val, 'event_id' => $event_id);
     $res = get_api_data('user/like_event', $must);
     echo json_encode($res);
 }
Beispiel #16
0
 public function login_list()
 {
     $must = array('page_now' => $this->get_data['page_now'], 'page_size' => 10);
     $ret = get_api_data('user/login_list', $must);
     $this->data['users'] = $ret['results']['records'];
     $this->data['pager'] = $ret['results']['pager'];
     $this->data['url'] = 'user/login_list';
     $this->load->view('user/login_list', $this->data);
 }
Beispiel #17
0
 public function index()
 {
     $this->data["title"] = "享优惠看街报";
     $res = get_api_data('event/lists', $this->get_data);
     if ($res['err_num'] == 0) {
         $this->data['events'] = get_api_data('event/lists', $this->get_data)['results']['records'];
     }
     $this->load->view('index', $this->data);
 }
 public function index()
 {
     $store_id = $this->input->post('store_id');
     $lng = $this->input->post('lng');
     $lat = $this->input->post('lat');
     $must = array('store_id' => $store_id, 'Longitude' => $lng, 'Latitude' => $lat);
     $res = get_api_data('store/detail', $must);
     echo json_encode($res);
 }
 public function index()
 {
     $session_val = $_COOKIE['session'];
     $new_pwd = $this->input->post('new_pwd');
     $new_pwd_re = $this->input->post('new_pwd_re');
     $must = array("session" => $session_val, 'new_pwd' => $new_pwd, "new_pwd_re" => $new_pwd_re);
     $res = get_api_data('user/modify_pwd', $must);
     echo json_encode($res);
 }
Beispiel #20
0
 public function index()
 {
     $session_val = $_COOKIE['session'];
     $must = array('session' => $session_val);
     $res = get_api_data('user/logout', $must);
     if (0 == $res['err_num']) {
         setcookie('session', '');
     }
     echo json_encode($res);
 }
Beispiel #21
0
 public function index()
 {
     $verify_code = $this->input->post('verify_code');
     $account = $this->input->post('account');
     $pwd = $this->input->post('pwd');
     $re_pwd = $this->input->post('re_pwd');
     $must = array('verify_code' => $verify_code, 'account' => $account, 'pwd' => $pwd, 're_pwd' => $re_pwd);
     $res = get_api_data('store/register', $must);
     echo json_encode($res);
 }
 public function index()
 {
     $phone = $this->input->post('phone');
     $new_pwd = $this->input->post('new_pwd');
     $re_new_pwd = $this->input->post('re_new_pwd');
     $verify_code = $this->input->post('verify_code');
     $must = array('phone' => $phone, 'new_pwd' => $new_pwd, 're_new_pwd' => $re_new_pwd, 'verify_code' => $verify_code);
     $res = get_api_data('user/find_pwd', $must);
     echo json_encode($res);
 }
Beispiel #23
0
 public function _get_brand()
 {
     $must = array('page_now' => 1);
     $res = get_api_data('brand/lists', $must);
     if ($res['err_num'] == 0) {
         $results = $res['results'];
         $this->data['brand'] = $results['records'];
         $this->data['brand_pager'] = $results['pager'];
     }
 }
Beispiel #24
0
 public function index()
 {
     //$page_now = $this->input->post('page_now');
     //$page_size = $this->input->post('page_size');
     $district_id = $this->input->post('district_id');
     //$must = array('page_now'=>$page_now, 'page_size'=>$page_size, 'district_id'=>$district_id);
     $must = array('district_id' => $district_id);
     $res = get_api_data('mall/lists', $must);
     echo json_encode($res);
 }
 public function index()
 {
     $mall_floor_id = $this->input->post('mall_floor_id');
     //$street_id = $this->input->post('street_id');
     //$page_now = $this->input->post('page_now');
     //$page_size = $this->input->post('page_size');
     //$must = array('mall_floor_id'=>$mall_floor_id, 'page_now'=>$page_now, 'page_size'=>$page_size);
     $must = array('mall_floor_id' => $mall_floor_id);
     $res = get_api_data('store/lists', $must);
     echo json_encode($res);
 }
 public function index()
 {
     $city_id = $this->input->post('city_id');
     $page_now = $this->input->post('page_now');
     $page_size = $this->input->post('page_size');
     $lng = $this->input->post('lng');
     $lat = $this->input->post('lat');
     $must = array('city_id' => $city_id, 'page_now' => $page_now, 'page_size' => $page_size, 'Longitude' => $lng, 'Latitude' => $lat);
     $res = get_api_data('district/lists', $must);
     echo json_encode($res);
 }
Beispiel #27
0
 public function index()
 {
     $phone = $this->input->post('phone');
     $pwd = $this->input->post('pwd');
     $must = array('phone' => $phone, 'pwd' => $pwd);
     $res = get_api_data('user/login', $must);
     if (0 == $res['err_num']) {
         setcookie('session', $res['results']['session'], time() + 86400);
     }
     echo json_encode($res);
 }
Beispiel #28
0
 public function employee_login_list()
 {
     $must = array();
     if ($this->get_data['page_now']) {
         $must['page_now'] = $this->get_data['page_now'];
     }
     $res = get_api_data('employee/employee_login_list', $must);
     $this->data['login_list'] = $res['results']['records'];
     $this->data['pager'] = $res['results']['pager'];
     $this->data['url'] = 'company/employee_login_list';
     $this->load->view('company/employee_login_list', $this->data);
 }
Beispiel #29
0
 public function index()
 {
     $phone = $this->input->post('phone');
     $pwd = $this->input->post('pwd');
     $re_pwd = $this->input->post('re_pwd');
     $verify_code = $this->input->post('verify_code');
     $must = array("phone" => $phone, "pwd" => $pwd, "re_pwd" => $re_pwd, 'verify_code' => $verify_code);
     $res = get_api_data('user/register', $must);
     if (0 == $res['err_num']) {
         setcookie('session', $res['results']['session'], time() + 86400);
     }
     echo json_encode($res);
 }
Beispiel #30
0
 public function do_login()
 {
     // root 是超级管理员,写死在程序里面的
     // 		if($this->post_data['account'] == 'root'){
     // 			if($this->post_data['pwd']  == 'jiebao2015'){
     // 			}
     // 		}
     $res = get_api_data('employee/login', $this->post_data);
     if ($res['err_num'] == 0) {
         $this->load->library('session');
         $newdata = array('admin_session' => $res['results']['session']);
         $this->session->set_userdata($newdata);
         echo json_encode(return_format(array(), "登录成功", 0));
     }
 }