本文整理汇总了PHP中input::get方法的典型用法代码示例。如果您正苦于以下问题:PHP input::get方法的具体用法?PHP input::get怎么用?PHP input::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类input
的用法示例。
在下文中一共展示了input::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: thirdlist
public function thirdlist()
{
$data = input::get();
$third = app::get('sysshop')->model('service');
$thirdinfo = $third->getRow('*', array('article_id' => $data['article_id'], "ifput" => true));
$this->setLayoutFlag('third');
if (!$thirdinfo) {
$pagedata["isfb"] = "0";
//不存在文章
return $this->page('topc/third/third.html', $pagedata);
} else {
if ($thirdinfo["ifpub"] == false) {
$pagedata["isfb"] = "1";
//文章下架
return $this->page('topc/third/third.html', $pagedata);
} else {
$pagedata["isfb"] = "2";
//正常显示
}
}
$oldthird = $thirdinfo;
$thirdinfo['count'] += 1;
try {
$third->update($thirdinfo, $oldthird);
} catch (Exception $e) {
$msg = $e->getMessage();
return $this->splash('error', null, $msg);
}
$pagedata['thirdinfo'] = $thirdinfo;
return $this->page('topc/third/third.html', $pagedata);
}
示例2: confirm
public function confirm($action = '')
{
// Do we have necessary data?
if (input::get('oauth_token') && input::get('oauth_verifier')) {
// Get temporary access token
$this->initialize(session::item('twitter', 'remote_connect', 'token'), session::item('twitter', 'remote_connect', 'secret'));
$access = $this->twitter->getAccessToken(input::get('oauth_verifier'));
// Do we have temporary token?
if ($access) {
// Get saved token
$token = $this->getToken(0, $access['user_id']);
// Do we have saved token or are we logging in?
if ($token || $action == 'login' && $token) {
$this->users_model->login($token['user_id']);
router::redirect(session::item('slug') . '#home');
} elseif (!$token || $action == 'signup') {
// Get user data
$this->initialize($access['oauth_token'], $access['oauth_token_secret']);
$user = $this->getUser($access['user_id']);
// Do we have user data?
if ($user && isset($user->id)) {
$connection = array('name' => 'twitter', 'twitter_id' => $user->id, 'token' => $access['oauth_token'], 'secret' => $access['oauth_token_secret']);
session::set(array('connection' => $connection), '', 'remote_connect');
$account = array('username' => isset($user->name) ? $user->name : '');
session::set(array('account' => $account), '', 'signup');
router::redirect('users/signup#account');
}
}
}
}
router::redirect('users/login');
}
示例3: doCreateRate
public function doCreateRate()
{
$params['tid'] = input::get('tid');
$params['tally_score'] = input::get('tally_score');
$params['attitude_score'] = input::get('attitude_score');
$params['delivery_speed_score'] = input::get('delivery_speed_score');
$params['logistics_service_score'] = input::get('logistics_service_score');
$anony = input::get('anony');
foreach (input::get('rate_data') as $key => $row) {
$rateData[$key] = $row;
if ($row['rate_pic']) {
$rateData[$key]['rate_pic'] = implode(',', $row['rate_pic']);
}
$rateData[$key]['anony'] = $anony == 'true' ? 1 : 0;
}
$params['rate_data'] = json_encode($rateData);
try {
$result = app::get('topm')->rpcCall('rate.add', $params, 'buyer');
} catch (\LogicException $e) {
$result = false;
$msg = $e->getMessage();
}
if (!$result) {
return $this->splash('error', $url, $msg, true);
}
$url = url::action('topm_ctl_member_trade@index');
$msg = '评价提交成功';
return $this->splash('success', $url, $msg, true);
}
示例4: add
public function add()
{
$data = array('id' => "", 'link' => input::get('link'), 'menu' => input::get('menu'), 'icon' => input::get('icon'), 'status' => input::get('status'));
$save = DB::table('tab_sidebar')->insert($data);
$link = DB::table('tab_sidebar')->get();
return view('sidebar_view')->with('link', $link);
}
示例5: saveInfo
/**
* 资讯保存
**/
public function saveInfo()
{
$userId = userAuth::id();
//$postData =utils::_filter_input(input::get());
$postData = input::get();
$postData['user_id'] = $userId;
$postData['modified'] = time();
$postData['pubtime'] = time();
$postData['ifpub'] = 0;
$postData["platform"] = 'pc';
$userName = app::get('sysuser')->model('account');
$infoName = $userName->getList(login_account, array('user_id' => $userId));
$postData['source'] = $infoName[0]['login_account'];
$postData["article_logo"] = $postData["article_logo"][0];
try {
$userMdlAddr = app::get('sysinfo')->model('article');
$userMdlAddr->save($postData);
} catch (Exception $e) {
$msg = $e->getMessage();
return $this->splash('error', null, $msg);
} catch (\LogicException $e) {
$msg = $e->getMessage();
return $this->splash('error', null, $msg);
}
$url = url::action('topc_ctl_member_info@publishInfo');
$msg = app::get('topc')->_('添加成功');
return $this->splash('success', $url, $msg);
}
示例6: create
public function create()
{
$literaryid = input::get('literary_id');
//var_dump($literaryid);
if ($literaryid) {
$literaryInfo = app::get('sysexpert')->model('literary')->getRow("*", array("literary_id" => $literaryid));
//后台维护数据时,编辑后,选择框字段显示上次保存专家和类型值!
$expert = app::get('sysexpert')->model('expert');
$name = $expert->getRow('name', array('expert_id' => $literaryInfo['expert_id']));
$literaryInfo['name'] = $name['name'];
$literarycat = app::get('sysexpert')->model('literarycat');
$cat = $literarycat->getRow('literarycat', array('literarycat_id' => $literaryInfo['literarycat_id']));
$literaryInfo['literarycat'] = $cat['literarycat'];
$pagedata['literaryInfo'] = $literaryInfo;
}
//$expertInfo=app::get("sysexpert")->model("expert")->getList("*"); //查询语句<==>
$sql = "select * from sysexpert_expert";
$expertInfo = app::get("base")->database()->executeQuery($sql)->fetchAll();
$pagedata["expertList"] = $expertInfo;
$literarycatList = app::get("sysexpert")->model("literarycat")->getList("*");
//取sysexpert>dbschema>literarycat所有值赋给变量$expertInfo
$pagedata["literarycatList"] = $literarycatList;
//再将数组$expertInfo的值赋值给数组$pagedata。
//var_dump($pagedata);
return $this->page('sysexpert/admin/adminaddliterary/addLiterary.html', $pagedata);
}
示例7: setAddrDef
public function setAddrDef()
{
$postData = input::get();
$addritem = app::get('sysshoppubt')->model('deliveryaddr');
try {
$sql = "update sysshoppubt_deliveryaddr set def_addr = 0 where uniqid = '" . $postData['uniqid'] . "'";
app::get('sysshoppubt')->database()->executeUpdate($sql);
$sql = "update sysshoppubt_deliveryaddr set def_addr = 1 where deliveryaddr_id = '" . $postData['deliveryaddr_id'] . "'";
app::get('sysshoppubt')->database()->executeUpdate($sql);
$filter['uniqid'] = $postData['uniqid'];
$userAddrList = $addritem->getList('*', $filter);
foreach ($userAddrList as &$addr) {
list($regions, $region_id) = explode(':', $addr['area']);
$addr['region_id'] = str_replace('/', ',', $region_id);
}
$pagedata['userAddrList'] = $userAddrList;
$msg = view::make('topc/member/shoppubt/add_edit.html', $pagedata)->render();
return $this->splash('success', null, $msg, true);
} catch (Exception $e) {
$msg = $e->getMessage();
return $this->splash('error', null, $msg);
} catch (\LogicException $e) {
$msg = $e->getMessage();
return $this->splash('error', null, $msg);
}
}
示例8: getPromotionItem
public function getPromotionItem()
{
$filter = input::get();
$promotionInfo = app::get('topc')->rpcCall('promotion.promotion.get', array('promotion_id' => $filter['promotion_id']));
if ($promotionInfo['valid']) {
if (!$filter['pages']) {
$filter['pages'] = 1;
}
$pageSize = 20;
$params = array('page_no' => $pageSize * ($filter['pages'] - 1), 'page_size' => $pageSize, 'fields' => 'item_id,shop_id,title,image_default_id,price');
//获取促销商品列表
$promotionItem = $this->__promotionItemList($promotionInfo, $params);
//echo '<pre>';print_r($promotionItem);exit();
$count = $promotionItem['total_found'];
$promotionItemList = $promotionItem['list'];
//处理翻页数据
$current = $filter['pages'] ? $filter['pages'] : 1;
$filter['pages'] = time();
if ($count > 0) {
$total = ceil($count / $pageSize);
}
$pagedata['pagers'] = array('link' => url::action('topc_ctl_promotion@getPromotionItem', $filter), 'current' => $current, 'total' => $total, 'token' => $filter['pages']);
$pagedata['promotionItemList'] = $promotionItemList;
$pagedata['count'] = $count;
$pagedata['promotionInfo'] = $promotionItem['promotionInfo'];
$pagedata['promotiontype'] = $promotionInfo['promotion_type'];
} else {
return abort(404);
}
return $this->page("topc/promotion/promotion.html", $pagedata);
}
示例9: create
public function create()
{
$literaryid = input::get('literary_id');
if ($literaryid) {
$literaryInfo = app::get('sysplan')->model('literary')->getRow("*", array("literary_id" => $literaryid));
$pagedata['literaryInfo'] = $literaryInfo;
}
$literarycatList = app::get("sysplan")->model("literarycat")->getList("*");
foreach ($literarycatList as $key => $value) {
if ($value["literarycat"] == "其他") {
unset($literarycatList[$key]);
}
}
$pagedata["literarycatList"] = $literarycatList;
$literaryclassList = app::get("sysplan")->model("literaryclass")->getList("*");
foreach ($literaryclassList as $key => $value) {
if ($value["literaryclass"] == "其他") {
unset($literaryclassList[$key]);
}
}
$pagedata["literaryclassList"] = $literaryclassList;
$literarytargetList = app::get("sysplan")->model("literarytarget")->getList("*");
foreach ($literarytargetList as $key => $value) {
if ($value["literarytarget"] == "其他") {
unset($literarytargetList[$key]);
}
}
$pagedata["literarytargetList"] = $literarytargetList;
return $this->page('sysplan/admin/adminaddliterary/addLiterary.html', $pagedata);
}
示例10: detail
/**
* 结算明细
* @return
*/
public function detail()
{
$this->contentHeaderTitle = app::get('topshop')->_('企业结算明细');
$filter['shop_id'] = $this->shopId;
$postSend = input::get();
if ($postSend['timearea']) {
$pagedata['timearea'] = $postSend['timearea'];
$timeArray = explode('-', $postSend['timearea']);
$filter['settlement_time|than'] = strtotime($timeArray[0]);
$filter['settlement_time|lthan'] = strtotime($timeArray[1]);
} else {
$filter['settlement_time|than'] = time() - 3600 * 24 * 7;
$filter['settlement_time|lthan'] = time();
$pagedata['timearea'] = date('Y/m/d', time() - 3600 * 24 * 7) . '-' . date('Y/m/d', time());
}
if ($postSend['settlement_type']) {
$filter['settlement_type'] = $postSend['settlement_type'];
$pagedata['settlement_type'] = $postSend['settlement_type'];
}
//处理翻页数据
$pagedata['page'] = $page = $postSend['page'] ? $postSend['page'] : 1;
$pagedata['limits'] = $pageLimit = 10;
$objMdlSettleDetail = app::get('sysclearing')->model('settlement_detail');
$pagedata['settlement_detail_list'] = $objMdlSettleDetail->getList('*', $filter, ($page - 1) * $pageLimit, $pageLimit, 'settlement_time desc');
$count = $objMdlSettleDetail->count($filter);
$postSend['token'] = time();
if ($count > 0) {
$total = ceil($count / $pageLimit);
}
$pagedata['pagers'] = array('link' => url::action('topshop_ctl_clearing_settlement@detail', $postSend), 'current' => $page, 'total' => $total, 'token' => $postSend['token']);
return $this->page('topshop/clearing/settlement_detail.html', $pagedata);
}
示例11: store
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public function store()
{
$date = \Carbon\Carbon::now();
$validator = Validator::make($data = Input::all(), User::$rules);
$validatora = Validator::make($dataa = Input::all(), Registrasi::$rules);
if ($validatora->fails()) {
return Redirect::back()->withErrors($validatora)->withInput();
} else {
if ($validator->fails()) {
return Redirect::back()->withErrors($validator)->withInput();
} else {
// Register User tanpa diaktivasi
$user = Sentry::register(array('email' => Input::get('email'), 'password' => Input::get('password'), 'first_name' => Input::get('name'), 'last_name' => Input::get('jenjang')), false);
// Cari grup user
$regularGroup = Sentry::findGroupByName('user');
// Masukkan user ke grup user
$user->addGroup($regularGroup);
DB::table('schools')->insertGetId(array('jenjang' => input::get('jenjang'), 'name' => Input::get('name'), 'adstreet' => Input::get('adstreet'), 'advillage' => Input::get('advillage'), 'addistricts' => Input::get('addistricts'), 'adcity' => Input::get('adcity'), 'adpostalcode' => Input::get('adpostalcode'), 'adphone' => Input::get('adphone'), 'hmname' => Input::get('hmname'), 'hmphone' => Input::get('hmphone'), 'hmmobile' => Input::get('hmphone'), 'user_id' => $user->id, 'created_at' => $date, 'updated_at' => $date));
// Persiapkan activation code untuk dikirim ke email
$data = ['email' => $user->email, 'activationCode' => $user->getActivationCode()];
// Kirim email aktivasi
Mail::send('emails.auth.register', $data, function ($message) use($user) {
$message->to($user->email, $user->first_name . ' ' . $user->last_name)->subject('Aktivasi Akun SIM Atletik UNESA');
});
// Redirect ke halaman login
return Redirect::route('login')->with("successMessage", "Berhasil disimpan. Silahkan cek email ({$user->email}) untuk melakukan aktivasi akun.");
}
}
}
示例12: auth
public function auth()
{
$username = input::get('username');
$password = input::get('password');
$sandi = hash::make('admin');
$ceklogin = DB::table('users')->where('password', '=', $sandi)->get();
return $sandi;
}
示例13: store
public function store()
{
$post = new Post();
$post->user_id = Auth::user()->id;
$post->text = filter_var(input::get('post'), FILTER_SANITIZE_STRING);
$post->save();
return redirect('/home');
}
示例14: catList
public function catList()
{
$catId = input::get('cat_id');
$catInfo = app::get('topm')->rpcCall('category.cat.get', array('cat_id' => $catId, 'fields' => 'cat_id,cat_name'));
$pagedata['data'] = $catInfo[$catId];
$pagedata['title'] = "商品分类";
return $this->page('topm/category/catlistinfo.html', $pagedata);
}
示例15: checkRFData
public static function checkRFData()
{
if (input::exists()) {
if (isset($_POST['rfdata'])) {
echo input::get('rfdata');
}
}
}