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


PHP input类代码示例

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


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

示例1: getJson

 public function getJson($addWhere = '', $addSql = '', $showMax = 12)
 {
     $sort = input::getInput("mix.sort") ? input::getInput("mix.sort") : 'id';
     $order = input::getInput("mix.order") ? input::getInput("mix.order") : "asc";
     $page = input::getInput("mix.page") ? input::getInput("mix.page") : 1;
     $rows = input::getInput("mix.rows") ? input::getInput("mix.rows") : 10;
     $db = sf::getLib("db");
     if ($select) {
         $sql = $select . " ";
     } else {
         $sql = "SELECT * FROM `" . $this->table . "` ";
     }
     $addWhere && ($sql .= "WHERE " . $addWhere . " ");
     if ($addSql) {
         $sql .= $addSql . " ";
     } else {
         $sql .= " ORDER BY {$sort} {$order} ";
     }
     if (!router::get("totalnum" . $key)) {
         $query = $db->query($sql);
         $total = $db->num_rows($query);
     } else {
         $total = router::get("totalnum" . $key);
     }
     $sql .= "LIMIT " . $rows * ($page - 1) . "," . $rows;
     $query = $db->query($sql);
     while ($row = $db->fetch_array($query)) {
         $result[] = $this->fillObject($row)->toArray();
     }
     return '{"total":' . $total . ',"rows":' . json_encode($result) . '}';
 }
开发者ID:meetcd,项目名称:sofast,代码行数:31,代码来源:Model.php

示例2: 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);
 }
开发者ID:453111208,项目名称:bbc,代码行数:30,代码来源:literary.php

示例3: _sendFeedback

 protected function _sendFeedback()
 {
     // Check if demo mode is enabled
     if (input::demo()) {
         return false;
     }
     // Extra rules
     $rules = array('name' => array('rules' => array('required', 'is_string', 'trim', 'min_length' => 2, 'max_length' => 255)), 'email' => array('rules' => array('required', 'is_string', 'trim', 'valid_email', 'min_length' => 4, 'max_length' => 255)), 'subject' => array('rules' => array('required', 'is_string', 'trim', 'min_length' => 5, 'max_length' => 255)), 'message' => array('rules' => array('required', 'is_string', 'trim', 'min_length' => 10, 'max_length' => 10000)));
     if (config::item('feedback_captcha', 'feedback') == 1 || config::item('feedback_captcha', 'feedback') == 2 && !users_helper::isLoggedin()) {
         $rules['captcha'] = array('rules' => array('is_captcha'));
     }
     validate::setRules($rules);
     // Validate form values
     if (!validate::run($rules)) {
         return false;
     }
     // Get values
     $email = input::post('email');
     $subject = input::post('subject');
     $message = input::post('message') . "\n\n--\n" . input::post('name') . ' <' . input::post('email') . '>' . "\n" . input::ipaddress();
     // Send feedback
     if (!$this->feedback_model->sendFeedback($email, $subject, $message)) {
         if (!validate::getTotalErrors()) {
             view::setError(__('send_error', 'system'));
         }
         return false;
     }
     // Success
     view::setInfo(__('message_sent', 'feedback'));
     router::redirect('feedback');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:31,代码来源:feedback.php

示例4: bannerDuzenleKaydet

 function bannerDuzenleKaydet($duzenle)
 {
     $form = input::all();
     //        $kural = array('ad'=>'required','yol'=>'required','genislik'=>'required','yukseklik'=>'required','url'=>'required','durum'=>'required');
     //        $dogrulama = \Validator::Make($form,$kural);
     //        if($dogrulama->fails()) {
     //            // gönderilen verilerde hata var
     //            return Redirect::to('admin/bannerDuzenle/'. $duzenle)->withErrors($dogrulama)->withInput();
     //        }else{
     $dosya = Input::file('dosya');
     $uzanti = $dosya->getClientOriginalExtension();
     $dosyaAdi = date('YmdHis') . "_b." . $uzanti;
     $path = base_path('bannerResimler/' . $dosyaAdi);
     $imagePath = 'bannerResimler/' . $dosyaAdi;
     Image::make($dosya->getRealPath())->save($path);
     $sorgu = "UPDATE banner SET ad=?,yol=?, genislik=?, yukseklik=?, url=?, durum=? WHERE id=?";
     $islem = DB::update($sorgu, array($form["ad"], $dosyaAdi, $form["genislik"], $form["yukseklik"], $form["url"], $form["durum"], $duzenle));
     if ($islem) {
         $mesaj = "basarili";
         return Redirect::to("admin/bannerListele")->with("mesaj", $mesaj);
     } else {
         $mesaj = "başarısız";
         return Redirect::to("admin/bannerListele")->with("mesaj", $mesaj);
     }
 }
开发者ID:hakanozer,项目名称:laravelAdmin,代码行数:25,代码来源:bannerDuzenleController.php

示例5: 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);
 }
开发者ID:453111208,项目名称:bbc,代码行数:36,代码来源:settlement.php

示例6: send

 /**
  * 发送简历
  */
 function send()
 {
     if (input::getInput("post")) {
         $back = sf::getModel("backs");
         $back->setSubject(input::getInput("post.subject"));
         $back->setUserName(input::getInput("post.user_name"));
         $back->setUserSex(input::getInput("post.user_sex"));
         $back->setUserAge(input::getInput("post.user_age"));
         $back->setUserDegree(input::getInput("post.user_degree"));
         $back->setIdcard(input::getInput("post.idcard"));
         $back->setUserPhone(input::getInput("post.user_phone"));
         $back->setUserIm(input::getInput("post.user_im"));
         $back->setUserEmail(input::getInput("post.user_email"));
         $back->setUserAddress(input::getInput("post.user_address"));
         $back->setPostCode(input::getInput("post.post_code"));
         $back->setWorkAt(input::getInput("post.work_at"));
         $back->setStudyList(input::getInput("post.study_list"));
         $back->setWorkList(input::getInput("post.work_list"));
         $back->setUpdatedAt(date("Y-m-d H:i:s"));
         $back->save();
         $this->page_debug(lang::get("Has been saved!"), site_url("job/index"));
     }
     view::set("job", sf::getModel("jobs", input::getInput("get.id")));
     view::apply("inc_body", "template/job_send");
     view::display("template/page");
 }
开发者ID:GitBeBest,项目名称:sf-framwork,代码行数:29,代码来源:Job.php

示例7: 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);
 }
开发者ID:453111208,项目名称:bbc,代码行数:31,代码来源:info.php

示例8: 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.");
         }
     }
 }
开发者ID:inseo201,项目名称:atletik4,代码行数:34,代码来源:RegistrasiController.php

示例9: 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);
 }
开发者ID:453111208,项目名称:bbc,代码行数:29,代码来源:rate.php

示例10: 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);
 }
开发者ID:453111208,项目名称:bbc,代码行数:31,代码来源:third.php

示例11: file_selector

 /**
  * Селектор файлов плагинов
  * @param array $res массив уже включенных плагинов
  * @return null
  */
 public function file_selector($res = null)
 {
     $res = (array) $res;
     $mask = implode('|', array_map('mpc', $res));
     $mask = '/^plugin\\.' . ($mask ? "(?!" . $mask . ")" : "") . '(\\w+)\\.php$/i';
     return input::o()->snull()->select_folder("plugin_files", PLUGINS_PATH, false, $mask, 1);
 }
开发者ID:SjayLiFe,项目名称:CTRev,代码行数:12,代码来源:plugins.php

示例12: 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);
 }
开发者ID:453111208,项目名称:bbc,代码行数:26,代码来源:literary.php

示例13: store

 public function store(Request $request)
 {
     $rules = array('dmm4-7' => 'required', 'dmm8-13' => 'required', 'dfgd8-13' => 'required', 'lmm4-7' => 'required', 'lmm8-10' => 'required', 'lmm11-13' => 'required', 'lfgd8-13' => 'required');
     $validator = Validator::make(Input::all(), $rules);
     // if the validator fails, redirect back to the form
     if ($validator->fails()) {
         session()->flash('error_message', " You can't leave this all empty.");
         session()->flash('error_message2', " You can use letters, numbers, Periods, and Hyphen.");
         return Redirect::back()->withErrors($validator)->withInput();
         $input = input::all();
     } else {
         $id = $request->input('id');
         $data = ServSetModel::find($id);
         $data->mm_4_17_db_server = $request->input('dmm4-7');
         $data->mm_8_13_db_server = $request->input('dmm8-13');
         //$data->mm_11_13_db_server = $request->input('dmm11-13');
         $data->fgd_8_13_db_server = $request->input('dfgd8-13');
         $data->mm_4_7_logs_server = $request->input('lmm4-7');
         $data->mm_8_10_logs_server = $request->input('lmm8-10');
         $data->mm_11_13_logs_server = $request->input('lmm11-13');
         $data->fgd_8_13_logs_server = $request->input('lfgd8-13');
         $data->save();
         session()->flash('message', ' Update successfuly.');
         return redirect('ais/serverSetting');
     }
 }
开发者ID:imakedev,项目名称:ais5_2,代码行数:26,代码来源:ServController.php

示例14: 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');
 }
开发者ID:soremi,项目名称:tutornavi,代码行数:32,代码来源:twitter.php

示例15: get

 public static function get($id, $type = FALSE)
 {
     // Type specified
     if ($type) {
         if ($note = input::cookie("note-{$type}-{$id}")) {
             self::delete($id);
             return array('id' => $id, 'type' => $type, 'content' => $note);
         } else {
             return FALSE;
         }
     } else {
         // Regular
         if ($note = input::cookie("note-regular-{$id}")) {
             self::delete($id);
             return array('id' => $id, 'type' => 'regular', 'content' => $note);
         } elseif ($note = input::cookie("note-error-{$id}")) {
             self::delete($id);
             return array('id' => $id, 'type' => 'error', 'content' => $note);
         } elseif ($note = input::cookie("note-warning-{$id}")) {
             self::delete($id);
             return array('id' => $id, 'type' => 'warning', 'content' => $note);
         } elseif ($note = input::cookie("note-success-{$id}")) {
             self::delete($id);
             return array('id' => $id, 'type' => 'success', 'content' => $note);
         } else {
             return FALSE;
         }
     }
 }
开发者ID:reang,项目名称:Dingo-Framework,代码行数:29,代码来源:note.php


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