• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getInput函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __construct

 public function __construct()
 {
     gateKeeper();
     $title = getInput("title");
     $description = getInput("description");
     $access_id = getInput("access_id");
     $membership = getInput("membership");
     $group = new Group();
     $group->title = $title;
     $group->description = $description;
     $group->access_id = $access_id;
     $group->membership = $membership;
     $group->owner_guid = getLoggedInUserGuid();
     $group->save();
     $group->createAvatar();
     $test = getEntity(array("type" => "Groupmembership", "metadata_name_value_pairs" => array(array("name" => "group", "value" => $group->guid), array("name" => "member_guid", "value" => getLoggedInUserGuid()))));
     if (!$test) {
         $group_membership = new Groupmembership();
         $group_membership->group = $group->guid;
         $group_membership->member_guid = getLoggedInUserGuid();
         $group_membership->access_id = "system";
         $group_membership->save();
     }
     new Activity(getLoggedInUserGuid(), "group:created", array(getLoggedInUser()->getURL(), getLoggedInUser()->full_name, $group->getURL(), $group->title), $group->guid);
     new SystemMessage("Your group has been created.");
     forward("groups");
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:27,代码来源:CreateGroupActionHandler.php


示例2: __construct

 public function __construct()
 {
     runHook("action:login:before");
     $email = getInput("email");
     $access = getIgnoreAccess();
     $referer = getInput("referer");
     $user = getEntity(array("type" => "User", "metadata_name" => "email", "metadata_value" => $email), true, true);
     if ($user) {
         $password = getInput("password");
         $password1 = md5($password);
         $password2 = $user->password;
         if ($password1 == $password2) {
             $user->logIn();
             new SystemMessage(translate("system_message:logged_in"));
             runHook("action:login:after", array("user" => $user));
             if ($referer) {
                 forward($referer);
             }
         } else {
             new SystemMessage(translate("system_message:could_not_log_in"));
         }
     } else {
         new SystemMessage(translate("system_message:could_not_log_in"));
     }
     forward("home");
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:26,代码来源:LoginActionHandler.php


示例3: __construct

 function __construct()
 {
     $guid = getInput("guid");
     $reply = getInput("reply");
     if (!$reply) {
         new SystemMessage("Message body cannot be left empty.");
         forward();
     }
     $message = getEntity($guid);
     $to = getLoggedInUserGuid() == $message->to ? $message->from : $message->to;
     $from = getLoggedInUserGuid();
     $to_user = getEntity($to);
     $from_user = getEntity($from);
     $message_element = new Messageelement();
     $message_element->message = $reply;
     $message_element->to = $to;
     $message_element->from = $from;
     $message_element->container_guid = $guid;
     $message_element->save();
     $link = getSiteURL() . "messages";
     notifyUser("message", $to, getLoggedInUserGuid(), $to);
     sendEmail(array("to" => array("name" => $to_user->full_name, "email" => $to_user->email), "from" => array("name" => getSiteName(), "email" => getSiteEmail()), "subject" => "You have a new message from " . getLoggedInUser()->full_name, "body" => "You have received a new message from " . getLoggedInUser()->full_name . "<br/><a href='{$link}'>Click here to view it.</a>", "html" => true));
     new SystemMessage("Your message has been sent.");
     forward("messages/" . $message->guid);
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:25,代码来源:MessageReplyActionHandler.php


示例4: __construct

 function __construct()
 {
     adminGateKeeper();
     $guid = getInput("guid");
     $title = getInput("title");
     $description = getInput('description');
     $price = getInput("price");
     $hidden = getInput("hidden") == 0 ? false : true;
     $product = getEntity($guid);
     $product->title = $title;
     $product->description = $description;
     $product->price = $price;
     $product->hidden = $hidden;
     $product->save();
     $product->createAvatar();
     if (isset($_FILES["download"]) && $_FILES["download"]["name"]) {
         $file = new File();
         $file->access_id = "product";
         $file->container_guid = $product->guid;
         $guid = $file->save();
         uploadFile("download", $guid, array("zip"));
         $product->download = $guid;
     }
     new SystemMessage("Your product has been updated.");
     forward("store");
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:26,代码来源:EditProductActionHandler.php


示例5: __construct

 public function __construct()
 {
     $body = display("pages/search_friends");
     $guid = getInput("guid");
     $button = "<a class='btn btn-success' href='" . getSiteURL() . "profile/{$guid}'>Return</a>";
     $this->html = drawPage(array("header" => "Search Results", "body" => $body, "button" => $button));
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:7,代码来源:SearchFriendsPageHandler.php


示例6: __construct

 public function __construct()
 {
     gateKeeper();
     $message = NULL;
     $user = getLoggedInUser();
     $user->profile_complete = true;
     $profile_type = $user->profile_type;
     $fields = ProfileField::get($profile_type);
     foreach ($fields as $key => $field) {
         if ($field['required'] == "true" && !getInput($key)) {
             $message .= "{$field['label']} cannot be empty.";
         }
     }
     if ($message) {
         new SystemMessage($message);
         forward("editProfile");
     }
     foreach ($fields as $key => $field) {
         $user->{$key} = getInput($key);
     }
     $user->save();
     new Activity($user->guid, "activity:profile:updated", array($user->getURL(), $user->full_name));
     new SystemMessage("Your profile has been updated.");
     forward("profile/{$user->guid}");
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:25,代码来源:EditProfileActionHandler.php


示例7: __construct

 public function __construct()
 {
     gateKeeper();
     $guid = getInput("guid");
     $title = getInput("blog_title");
     $description = getInput("description");
     $access_id = getInput("access_id");
     $container_guid = getInput("container_guid");
     $owner_guid = getLoggedInUserGuid();
     if ($guid) {
         $blog = getEntity($guid);
     } else {
         $blog = new Blog();
     }
     $blog->title = $title;
     $blog->description = $description;
     $blog->access_id = $access_id;
     $blog->owner_guid = $owner_guid;
     $blog->status = "published";
     $blog->container_guid = $container_guid;
     $blog->save();
     new Activity(getLoggedInUserGuid(), "blog:add", array(getLoggedInUser()->getURL(), getLoggedInUser()->full_name, $blog->getURL(), $blog->title, truncate($blog->description)), "", $access_id);
     new SystemMessage("Your blog has been published");
     forward("blogs/all_blogs");
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:25,代码来源:AddBlogActionHandler.php


示例8: __construct

 public function __construct()
 {
     $editor = getInput("editor_id");
     if (file_exists($_FILES['avatar']['tmp_name'])) {
         // Check if General album exists
         $album = getEntity(array("type" => "Photoalbum", "metadata_name_value_pairs" => array(array("name" => "owner_guid", "value" => getLoggedInUserGuid()), array("name" => "title", "value" => "General"))));
         $photo = new Photo();
         $photo->owner_guid = getLoggedInUserGuid();
         $photo->save();
         $photo->createAvatar();
         if (!$album) {
             $album = new Photoalbum();
             $album->title = "General";
             $album->owner_guid = getLoggedInUserGuid();
             $album->access_id = "public";
             Image::copyAvatar($photo, $album);
             $album->save();
         }
         $photo->container_guid = $album->guid;
         if (!$album->title != "Profile Avatars" && $album->title != "General") {
             new Activity(getLoggedInUserGuid(), "activity:add:photo", array(getLoggedInUser()->getURL(), getLoggedInUser()->full_name, $album->getURL(), $album->title, "<a href='" . $album->getURL() . "'>" . $photo->icon(EXTRALARGE, "img-responsive") . "</a>"), $album->access_id);
         }
         $photo->save();
         forward(false, array("insertphoto" => $photo->guid, "editor" => $editor));
     } else {
         forward();
     }
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:28,代码来源:UploadPhotoActionHandler.php


示例9: __construct

 public function __construct()
 {
     Setting::set("allow_video_uploads", getInput("allow_video_uploads"));
     Setting::set("ffmpeg_ffmprobe_executable_path", getInput("ffmpeg_ffmprobe_executable_path"));
     new SystemMessage("Your settings have been updated.");
     forward();
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:7,代码来源:VideoSettingsActionHandler.php


示例10: showMenu2

	function showMenu2($menu,$started=false)
	{
		$name=$menu[0];
		$title=$menu[1];
		$view=$menu[2];
		$ar=$menu[3];
		
		if($name==getInput("page"))
			$title=boldMenuItem($title);
		if($title!="")
			$c=anchor(page($name),$title);//,"menu_title");
		if(is_array($ar))
		{
			foreach($ar as $a)
			{
				if($c!="")
					$c.=" | ";
				$c.=showMenu2($a,true);
			}
		}
		if($started)
			return $c;
		else
			return $c;//table(tr($c),"full_width");
	}
开发者ID:BackupTheBerlios,项目名称:antargis-svn,代码行数:25,代码来源:menu.inc.php


示例11: __construct

 public function __construct()
 {
     $title = getInput("title");
     $description = getInput("description");
     // Create filestore object to store file information
     $file = new File();
     $file->title = $title;
     $file->description = $description;
     $file->owner_guid = getLoggedInUserGuid();
     $file->access_id = "public";
     $file->container_guid = getInput("container_guid");
     $guid = $file->save();
     uploadFile("file", $guid, getLoggedInUserGuid());
     $file = getEntity($guid);
     Image::createThumbnail($file->guid, TINY);
     Image::createThumbnail($file->guid, SMALL);
     Image::createThumbnail($file->guid, MEDIUM);
     Image::createThumbnail($file->guid, LARGE);
     Image::createThumbnail($file->guid, EXTRALARGE);
     Image::createThumbnail($file->guid, HUGE);
     new Activity(getLoggedInUserGuid(), "action:upload:file", $guid);
     runHook("upload_file:redirect");
     new SystemMessage("Your file has been uploaded.");
     forward();
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:25,代码来源:FileUploadActionHandler.php


示例12: __construct

 public function __construct()
 {
     $password = getInput("password");
     $password2 = getInput("password2");
     if ($password != $password2) {
         new SystemMessage("Passwords must match.");
     }
     $guid = getInput("guid");
     $code = getInput("code");
     $access = getIgnoreAccess();
     setIgnoreAccess();
     $user = getEntity($guid);
     if ($user) {
         if ($user->password_reset_code == $code) {
             $user->password = password_hash($password, PASSWORD_BCRYPT);
             $user->password_reset_code = NULL;
             $user->save();
             new SystemMessage("Your password has been reset.");
             forward("home");
         }
     } else {
         new SystemMessage("No user found with that email.");
         forward("home");
     }
     setIgnoreAccess($access);
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:26,代码来源:NewPasswordActionHandler.php


示例13: __construct

 function __construct()
 {
     \Stripe\Stripe::setApiKey(EcommercePlugin::secretKey());
     $order_items = array();
     $user = getLoggedInUser();
     $stripe_cust = $user->stripe_cust;
     $cart = Cache::get("cart", "session");
     if (!$stripe_cust) {
         try {
             $cu = \Stripe\Customer::create(array("description" => $user->email, "source" => getInput("stripeToken")));
         } catch (Exception $e) {
             new SystemMessage("There has been an error.  Please contact us.");
             forward("home");
         }
         $user->stripe_cust = $cu->id;
         $user->save();
     } else {
         $cu = \Stripe\Customer::retrieve($stripe_cust);
         try {
             $cu->source = getInput("stripeToken");
         } catch (Exception $e) {
             new SystemMessage("There has been an error.  Please contact us.");
             forward("home");
         }
         $cu->save();
     }
     foreach ($cart as $guid => $details) {
         $product = getEntity($guid);
         if ($product->interval == "one_time") {
             $order_item = array("type" => "sku", "parent" => $product->stripe_sku, "description" => $product->description . $details);
             $order_items[] = $order_item;
         } else {
             try {
                 $cu->subscriptions->create(array("plan" => $guid));
             } catch (Exception $e) {
                 new SystemMessage("There has been an error.  Please contact us.");
                 forward("home");
             }
         }
     }
     if (!empty($order_items)) {
         try {
             $order = \Stripe\Order::create(array("items" => $order_items, "currency" => "usd", "customer" => $cu->id));
             $order->pay(array("customer" => $cu->id, "email" => $user->email));
         } catch (Exception $e) {
             new SystemMessage("There has been an error.  Please contact us.");
             forward("home");
         }
     }
     $invoice = new Invoice();
     $invoice->items = $cart;
     $invoice->status = "paid";
     $invoice->owner_guid = getLoggedInUserGuid();
     $invoice->stripe_order = $order->id;
     $invoice->save();
     Cache::delete("cart", "session");
     new SystemMessage("Your purchase is complete.");
     forward("billing");
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:59,代码来源:ChargeCardActionHandler.php


示例14: __construct

 public function __construct()
 {
     adminGateKeeper();
     $add_this = getInput("add_this");
     Setting::set("add_this", $add_this);
     new SystemMessage("Your Addthis Code has been updated");
     forward();
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:8,代码来源:AddthisActionHandler.php


示例15: __construct

 function __construct()
 {
     adminGateKeeper();
     $home_page = getInput("home_page");
     Setting::set("home_page", $home_page);
     new SystemMessage("Your home page has been updated.");
     forward();
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:8,代码来源:EditHomepageActionHandler.php


示例16: __construct

 function __construct()
 {
     $settings = Setting::getAll("groups");
     foreach ($settings as $setting) {
         Setting::set($setting->name, getInput($setting->name));
     }
     forward("admin/groups");
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:8,代码来源:AdminGroupsActionHandler.php


示例17: __construct

 public function __construct()
 {
     adminGateKeeper();
     $google_analytics = getInput("google_analytics");
     Setting::set("google_analytics", $google_analytics);
     new SystemMessage("Your code has been updated.");
     forward();
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:8,代码来源:SaveAnalyticsCodeActionHandler.php


示例18: __construct

 function __construct()
 {
     $settings = Setting::getAll("stripe");
     foreach ($settings as $setting) {
         Setting::set($setting->name, getInput($setting->name));
     }
     new SystemMessage("Your stripe settings have been saved.");
     forward();
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:9,代码来源:UpdateStripeSettingsActionHandler.php


示例19: __construct

 public function __construct()
 {
     $limit = getInput("limit", 10);
     $offset = getInput("offset", 0);
     $count = getEntities(array("type" => "File", "count" => true, "metadata_name_value_pairs" => array(array("name" => "owner_guid", "value" => getLoggedInUserGuid()), array("name" => "title", "value" => "NULL", "operand" => "!="))));
     $files = listEntities(array("type" => "File", "limit" => $limit, "offset" => $offset, "metadata_name_value_pairs" => array(array("name" => "owner_guid", "value" => getLoggedInUserGuid()), array("name" => "title", "value" => "NULL", "operand" => "!="))));
     $pagination = display("page_elements/pagination", array("count" => $count, "offset" => $offset, "limit" => $limit, "url" => getSiteURL() . "files"));
     $page = drawPage(array("header" => "Files", "body" => $files, "footer" => $pagination, "button" => "<a href='" . getSiteURL() . "file/upload' class='btn btn-success'>Upload a File</a>"));
     $this->html = $page;
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:10,代码来源:FilesPageHandler.php


示例20: promptForBlogID

 /**
  * This function retrieves all the blogs associated with the authenticated  
  * user and prompts the user to choose which to manipulate.
  *
  * Once the index is selected by the user, the corresponding blogID is 
  * extracted and stored for easy access. 
  */
 public function promptForBlogID()
 {
     $query = new Zend_Gdata_Query('http://www.blogger.com/feeds/default/blogs');
     $feed = $this->gdClient->getFeed($query);
     $this->printFeed($feed);
     $input = getInput("\nSelection");
     //id text is of the form: tag:blogger.com,1999:user-blogID.blogs
     $idText = split('-', $feed->entries[$input]->id->text);
     $this->blogID = $idText[2];
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:17,代码来源:Blogger.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getInstallDbInstance函数代码示例发布时间:2022-05-15
下一篇:
PHP getInformUser函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap