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


PHP Application::formPosted方法代码示例

本文整理汇总了PHP中Application::formPosted方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::formPosted方法的具体用法?PHP Application::formPosted怎么用?PHP Application::formPosted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Application的用法示例。


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

示例1: performHandlerTasks

 public function performHandlerTasks()
 {
     if (($author_id = Application::param('author_id')) && ($entry_id = Application::param('entry_id'))) {
         $entry = new Entry();
         $entry->clauseSafe('author_id', $author_id);
         $entry->clauseSafe('entry_id', $entry_id);
         $this->entry_to_manage_for = $entry;
     } else {
         $this->redirectOnAccessDenied();
     }
     if (!LogbookAccess::currentUserCanManageAccess($this->entryToManageFor())) {
         $this->redirectOnAccessDenied();
     }
     if ($group_id = Application::param('group_id')) {
         $this->group_to_manage_for = new Group();
         $this->group_to_manage_for->clauseSafe('group_id', $group_id);
     }
     if (Application::formPosted()) {
         if (Application::param('choose_group')) {
             $this->chooseGroup();
         }
         if (Application::param('manage_access')) {
             $this->manageAccess();
         }
     }
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:26,代码来源:manage_group_access.class.php

示例2: performHandlerTasks

	public function performHandlerTasks()
	{
	    if(Application::formPosted())
	    {
	        if(Application::param('add_blog_comment'))
		    $this->save();
            }
        }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:8,代码来源:add_blog_comment.class.php

示例3: performHandlerTasks

 public function performHandlerTasks()
 {
     if(Application::formPosted())
     {
         if(Application::param('edit_about_me'))
             $this->editAboutMe();
     }
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:8,代码来源:edit_blog_author_details.class.php

示例4: performHandlerTasks

	public function performHandlerTasks()
	{
	    if(!LogbookAccess::currentUserCanEdit($this->entryToEdit()))
	        $this->redirectOnAccessDenied();

	    if(Application::formPosted())
	    {
	        if(Application::param('edit_blog_entry'))
		        $this->doEdit();
            else if(Application::param('delete_blog_entry'))
                $this->deleteBlogEntry();
        }
    }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:13,代码来源:edit_blog_entry.class.php

示例5: performHandlerTasks

 public function performHandlerTasks()
 {
     if(Application::formPosted())
     {
         if(!Application::param('cancel_edit'))
         {
             $this->savePart();
         }
         else if(Application::param('cancel_edit'))
         {
             Application::setUrlParam('module_id',Application::param('module_id'));
             Application::redirect('ModuleDetail');
         }
     }
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:15,代码来源:text_add.class.php

示例6: performHandlerTasks

 public function performHandlerTasks()
 {
     if (Application::formPosted()) {
         $form = Form::load('seeingsystem.views.Login');
         if ($form->validate()) {
             try {
                 PilotApplication::login(Application::param('user_email'), Application::param('user_password'));
             } catch (UserNotFoundException $exc) {
                 $this->login_error = 'No user with that email is registered';
             } catch (InvalidPasswordException $exc) {
                 $this->login_error = 'The password was incorrect';
             }
         }
     } else {
         if (Application::param('logout')) {
             PIlotApplication::logout();
         }
     }
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:19,代码来源:home.class.php

示例7: display

 public function display($vars)
 {
     $disp = new Display();
     if (!$vars || is_array($vars) && !count($vars)) {
         $vars = array('dumb', 'dumber');
     }
     $disp->setFilter($vars, '$$');
     if (Application::formPosted()) {
         $params = Application::post();
     } else {
         $params = '';
     }
     $disp->setValue('form_name', $this->name);
     $disp->setValue('form_action', Display::current()->hrefString($this->handler));
     foreach ($this->inputs as $inp) {
         if (!$this->clear) {
             $name = $inp->name();
             if ($inp->valueOverride()) {
                 $value = $inp->value();
             } else {
                 if ($params) {
                     $value = Form::getValueFromArray($name, $params);
                 } else {
                     $value = $inp->value();
                 }
             }
         } else {
             $value = '';
         }
         if ($inp->allowsOptions()) {
             if ($value === '' && !$this->clear) {
                 $value = $inp->selected;
             }
             $inp->setSelected($value);
             $options = $inp->generateInputObjects();
             $disp->setValue($inp->name() . '_options', $options);
         } else {
             if ($inp->getClass() == 'FileInput' || $inp->getClass() == 'ImageInput') {
                 $disp->setValue($inp->name() . '_existing_file', $inp->value());
             } else {
                 if ($inp->getClass() == 'DateInput') {
                     if ($params && $value !== '') {
                         $day = ArrayUtility::getArrayValue($value, 'day');
                         $month = ArrayUtility::getArrayValue($value, 'month');
                         $year = ArrayUtility::getArrayValue($value, 'year');
                     } else {
                         if ($value !== '') {
                             //$inp->setValue($value);
                             $day = $inp->day();
                             $month = $inp->month();
                             $year = $inp->year();
                         } else {
                             if (!$this->clear) {
                                 $day = $inp->day();
                                 $month = $inp->month();
                                 $year = $inp->year();
                             } else {
                                 $year = '';
                                 $month = '';
                                 $day = '';
                             }
                         }
                     }
                     $disp->setValue($inp->name() . '_year_value', $year);
                     $disp->setValue($inp->name() . '_month_value', $month);
                     $disp->setValue($inp->name() . '_day_value', $day);
                 } else {
                     if ($value === '' && !is_numeric($value) && !$this->clear || $inp instanceof HiddenInput && !$this->clear) {
                         $value = $inp->value();
                     }
                     $disp->setValue($inp->name() . '_value', $value);
                 }
             }
         }
     }
     $new_path = '';
     if (is_array($vars) && count($vars)) {
         $path = Application::CACHE . Form::cachePath($this->initPath()) . '.t';
         $new_path = Application::CACHE . 'dead-' . time() . '-' . Form::cachePath($this->initPath()) . '.t';
         $data = file_get_contents($path);
         foreach ($vars as $name => $value) {
             $data = str_replace('$$' . strtoupper(str_replace('-', '_', $name)) . '$$', $value, $data);
         }
         $data = preg_replace('/\\$\\$[A-Z_]*\\$\\$/', '', $data);
         @unlink($new_path);
         file_put_contents($new_path, $data);
         chmod($new_path, 0664);
         $path = $new_path;
     } else {
         $path = Application::CACHE . Form::cachePath($this->initPath()) . '.t';
     }
     foreach ($this->widgets() as $widg) {
         $widg->registerJavascript($disp);
     }
     $disp->displayPage($path);
     if ($new_path) {
         unlink($new_path);
     }
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:99,代码来源:form.class.php

示例8: buttonClicked

 function buttonClicked($name)
 {
     $ret = FALSE;
     if (Application::formPosted()) {
         if (isset($_POST[$name]) || isset($_POST[$name . '_x']) || isset($_POST[$name . '_y'])) {
             $ret = TRUE;
         }
     }
     return $ret;
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:10,代码来源:application.class.php

示例9: performHandlerTasks

 public function performHandlerTasks()
 {
     if (Application::formPosted()) {
         $this->mapView();
     }
 }
开发者ID:k7n4n5t3w4rt,项目名称:SeeingSystem,代码行数:6,代码来源:rsml_map.class.php


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