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

PHP param_errors_detected函数代码示例

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

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



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

示例1: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     // Name
     param_string_not_empty('pst_name', T_('Please enter a name.'));
     $this->set_from_Request('name');
     return !param_errors_detected();
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:12,代码来源:_itemstatus.class.php


示例2: load_from_request

 /**
  * Load data from Request form fields.
  *
  * @todo fp> check that we are not creating a loop!
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_request()
 {
     parent::load_from_Request();
     if (param($this->dbprefix . 'parent_ID', 'integer', -1) !== -1) {
         $this->set_from_Request('parent_ID');
     }
     return !param_errors_detected();
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:15,代码来源:_genericcategory.class.php


示例3: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     // Name
     $this->set_string_from_param('name', true);
     // Color
     $color = param('gcat_color', 'string', '');
     param_check_color('gcat_color', T_('Invalid color code.'), true);
     $this->set_string_from_param('color', true);
     return !param_errors_detected();
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:15,代码来源:_goalcat.class.php


示例4: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     // Name
     param_string_not_empty('ufgp_name', T_('Please enter a group name.'));
     $this->set_from_Request('name');
     // Order
     param_string_not_empty('ufgp_order', T_('Please enter an order number.'));
     $this->set_from_Request('order');
     return !param_errors_detected();
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:15,代码来源:_userfieldgroup.class.php


示例5: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     // Name
     param('org_name', 'string');
     param_check_not_empty('org_name', T_('You must provide a name!'));
     $this->set_from_Request('name', 'org_name');
     // Url
     param('org_url', 'string');
     param_check_url('org_url', 'commenting');
     $this->set_from_Request('url', 'org_url', true);
     return !param_errors_detected();
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:17,代码来源:_organization.class.php


示例6: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     // Name
     $this->set_string_from_param('name', true);
     // Shortcut
     $this->set_string_from_param('shortcut', true);
     // Code
     param('curr_code', 'string');
     param_check_regexp('curr_code', '#^[A-Za-z]{3}$#', T_('Currency code must be 3 letters.'));
     $this->set_from_Request('code', 'curr_code', true);
     return !param_errors_detected();
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:17,代码来源:_currency.class.php


示例7: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     // get new ID
     if (param('new_ptyp_ID', 'string', NULL) !== NULL) {
         param_check_number('new_ptyp_ID', T_('ID must be a number.'), true);
         $this->set_from_Request('ID', 'new_ptyp_ID');
     }
     // Name
     param_string_not_empty('ptyp_name', T_('Please enter a name.'));
     $this->set_from_Request('name');
     return !param_errors_detected();
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:17,代码来源:_itemtype.class.php


示例8: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     // Name
     $this->set_string_from_param('name', true);
     // Code
     param('ctry_code', 'string');
     param_check_regexp('ctry_code', '#^[A-Za-z]{2}$#', T_('Country code must be 2 letters.'));
     $this->set_from_Request('code', 'ctry_code');
     // Currency Id
     param('ctry_curr_ID', 'integer');
     param_check_number('ctry_curr_ID', T_('Please select a currency'));
     $this->set_from_Request('curr_ID', 'ctry_curr_ID', true);
     return !param_errors_detected();
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:19,代码来源:_country.class.php


示例9: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     // Country Id
     param('rgn_ctry_ID', 'integer', true);
     param_check_number('rgn_ctry_ID', T_('Please select a country'), true);
     $this->set_from_Request('ctry_ID', 'rgn_ctry_ID', true);
     // Name
     $this->set_string_from_param('name', true);
     // Code
     param('rgn_code', 'string');
     param_check_regexp('rgn_code', '#^[A-Za-z0-9]{1,6}$#', T_('Region code must be from 1 to 6 letters.'));
     $this->set_from_Request('code', 'rgn_code');
     return !param_errors_detected();
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:19,代码来源:_region.class.php


示例10: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     // Country Id
     param('city_ctry_ID', 'integer', true);
     param_check_number('city_ctry_ID', T_('Please select a country'), true);
     $this->set_from_Request('ctry_ID', 'city_ctry_ID', true);
     // Region Id
     $this->set_string_from_param('rgn_ID');
     // Subregion Id
     $this->set_string_from_param('subrg_ID');
     // Name
     $this->set_string_from_param('name', true);
     // Code
     param('city_postcode', 'string');
     param_check_regexp('city_postcode', '#^[A-Za-z0-9]{1,12}$#', T_('City code must be from 1 to 12 letters.'));
     $this->set_from_Request('postcode', 'city_postcode');
     return !param_errors_detected();
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:23,代码来源:_city.class.php


示例11: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     param_string_not_empty('dom_name', T_('Please enter domain name.'));
     $dom_name = get_param('dom_name');
     $this->set('name', $dom_name);
     $dom_status = param('dom_status', 'string', true);
     $this->set('status', $dom_status, true);
     $dom_type = param('dom_type', 'string', true);
     $this->set('type', $dom_type, true);
     if (!param_errors_detected()) {
         // Check domains with the same name and type
         global $Messages, $DB;
         $SQL = new SQL();
         $SQL->SELECT('dom_ID');
         $SQL->FROM('T_basedomains');
         $SQL->WHERE('dom_ID != ' . $this->ID);
         $SQL->WHERE_and('dom_name = ' . $DB->quote($dom_name));
         $SQL->WHERE_and('dom_type = ' . $DB->quote($dom_type));
         if ($DB->get_var($SQL->get())) {
             $Messages->add(T_('Domain already exists with the same name and type.'));
         }
     }
     return !param_errors_detected();
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:29,代码来源:_domain.class.php


示例12: load_from_Request


//.........这里部分代码省略.........
         // Update the name only of not special post types
         param_string_not_empty('ityp_name', T_('Please enter a name.'));
         $this->set_from_Request('name');
     }
     // Description
     param('ityp_description', 'text');
     $this->set_from_Request('description', NULL, true);
     // Permission level
     param('ityp_perm_level', 'string');
     $this->set_from_Request('perm_level');
     // Back-office tab
     param('ityp_backoffice_tab', 'string');
     $this->set_from_Request('backoffice_tab', NULL, true);
     // Template name
     param('ityp_template_name', 'string');
     $this->set_from_Request('template_name', NULL, true);
     // Use title
     param('ityp_use_title', 'string');
     $this->set_from_Request('use_title');
     // Use URL
     param('ityp_use_url', 'string');
     $this->set_from_Request('use_url');
     // Use Parent ID
     param('ityp_use_parent', 'string');
     $this->set_from_Request('use_parent');
     // Use text
     param('ityp_use_text', 'string');
     $this->set_from_Request('use_text');
     // Allow HTML
     param('ityp_allow_html', 'integer', 0);
     $this->set_from_Request('allow_html');
     // Allow Teaser and Page breaks
     param('ityp_allow_breaks', 'integer', 0);
     $this->set_from_Request('allow_breaks');
     // Allow attachments
     param('ityp_allow_attachments', 'integer', 0);
     $this->set_from_Request('allow_attachments');
     // Use excerpt
     param('ityp_use_excerpt', 'string');
     $this->set_from_Request('use_excerpt');
     // Use title tag
     param('ityp_use_title_tag', 'string');
     $this->set_from_Request('use_title_tag');
     // Use meta description
     param('ityp_use_meta_desc', 'string');
     $this->set_from_Request('use_meta_desc');
     // Use meta keywords
     param('ityp_use_meta_keywds', 'string');
     $this->set_from_Request('use_meta_keywds');
     // Use tags
     param('ityp_use_tags', 'string');
     $this->set_from_Request('use_tags');
     // Allow featured
     param('ityp_allow_featured', 'integer', 0);
     $this->set_from_Request('allow_featured');
     // Use country, region, sub-region, city:
     $use_country = param('ityp_use_country', 'string', 'never');
     $use_region = param('ityp_use_region', 'string', 'never');
     $use_sub_region = param('ityp_use_sub_region', 'string', 'never');
     $use_city = param('ityp_use_city', 'string', 'never');
     if ($use_city == 'required') {
         // If city is required - all location fields also are required
         $use_country = $use_region = $use_sub_region = 'required';
     } else {
         if ($use_sub_region == 'required') {
             // If subregion is required - country & region fields also are required
             $use_country = $use_region = 'required';
         } else {
             if ($use_region == 'required') {
                 // If region is required - country field also is required
                 $use_country = 'required';
             }
         }
     }
     $this->set('use_country', $use_country);
     $this->set('use_region', $use_region);
     $this->set('use_sub_region', $use_sub_region);
     $this->set('use_city', $use_city);
     // Use coordinates
     param('ityp_use_coordinates', 'string');
     $this->set_from_Request('use_coordinates');
     // Use custom fields
     param('ityp_use_custom_fields', 'integer', 0);
     $this->set_from_Request('use_custom_fields');
     // Use comments
     param('ityp_use_comments', 'integer', 0);
     $this->set_from_Request('use_comments');
     // Allow closing comments
     param('ityp_allow_closing_comments', 'integer', 0);
     $this->set_from_Request('allow_closing_comments');
     // Allow disabling comments
     param('ityp_allow_disabling_comments', 'integer', 0);
     $this->set_from_Request('allow_disabling_comments');
     // Use comment expiration
     param('ityp_use_comment_expiration', 'string');
     $this->set_from_Request('use_comment_expiration');
     // Load custom fields from request
     $this->load_custom_fields_from_Request();
     return !param_errors_detected();
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:101,代码来源:_itemtype.class.php


示例13: load_from_Request


//.........这里部分代码省略.........
      */
     $this->filters['statuses'] = param($this->param_prefix . 'status', '/^(-|-[0-9]+|[0-9]+)(,[0-9]+)*$/', $this->default_filters['statuses'], true);
     // List of statuses to restrict to
     /*
      * Restrict to selected types:
      */
     $this->filters['types'] = param($this->param_prefix . 'types', '/^(-|-[0-9]+|[0-9]+)(,[0-9]+)*$/', $this->default_filters['types'], true);
     // List of types to restrict to
     /*
      * Restrict by keywords
      */
     $this->filters['keywords'] = param($this->param_prefix . 's', 'string', $this->default_filters['keywords'], true);
     // Search string
     $this->filters['keyword_scope'] = param($this->param_prefix . 'scope', 'string', $this->default_filters['keyword_scope'], true);
     // Scope of search string
     $this->filters['phrase'] = param($this->param_prefix . 'sentence', 'string', $this->default_filters['phrase'], true);
     // Search for sentence or for words
     $this->filters['exact'] = param($this->param_prefix . 'exact', 'integer', $this->default_filters['exact'], true);
     // Require exact match of title or contents
     /*
      * Specific Item selection?
      */
     $this->filters['post_ID'] = param($this->param_prefix . 'p', 'integer', $this->default_filters['post_ID']);
     // Specific post number to display
     $this->filters['post_title'] = param($this->param_prefix . 'title', 'string', $this->default_filters['post_title']);
     // urtitle of post to display
     /*
      * multiple Item selection ?
      */
     $this->filters['post_ID_list'] = param($this->param_prefix . 'pl', 'string', $this->default_filters['post_ID_list']);
     // Specific list of post numbers to display
     $this->single_post = !empty($this->filters['post_ID']) || !empty($this->filters['post_title']);
     /*
      * If a timeframe is specified in the querystring, restrict to that timeframe:
      */
     $this->filters['ymdhms'] = param($this->param_prefix . 'm', '/^\\d{4}(0[1-9]|1[0-2])?(?(1)(0[1-9]|[12][0-9]|3[01])?)(?(2)([01][0-9]|2[0-3])?)(?(3)([0-5][0-9]){0,2})$/', $this->default_filters['ymdhms'], true);
     // YearMonth(Day) to display
     $this->filters['week'] = param($this->param_prefix . 'w', '/^(0?[0-9]|[1-4][0-9]|5[0-3])$/', $this->default_filters['week'], true);
     // Week number (0?0-53)
     $this->filters['ymdhms_min'] = param_compact_date($this->param_prefix . 'dstart', $this->default_filters['ymdhms_min'], true, T_('Invalid date'));
     // YearMonth(Day) to start at
     $this->filters['ymdhms_max'] = param_compact_date($this->param_prefix . 'dstop', $this->default_filters['ymdhms_max'], true, T_('Invalid date'));
     // YearMonth(Day) to stop at
     // TODO: show_past/future should probably be wired on dstart/dstop instead on timestamps -> get timestamps out of filter perimeter
     // So far, these act as SILENT filters. They will not advertise their filtering in titles etc.
     $this->filters['ts_min'] = $this->default_filters['ts_min'];
     $this->filters['ts_max'] = $this->default_filters['ts_max'];
     if (is_null($this->default_filters['ts_min']) && is_null($this->default_filters['ts_max'])) {
         // We have not set a strict default -> we allow overridding:
         $show_past = param($this->param_prefix . 'show_past', 'integer', 0, true);
         $show_future = param($this->param_prefix . 'show_future', 'integer', 0, true);
         if ($show_past != $show_future) {
             // There is a point in overridding:
             $this->filters['ts_min'] = $show_past == 0 ? 'now' : '';
             $this->filters['ts_max'] = $show_future == 0 ? 'now' : '';
         }
     }
     /*
      * Restrict to the statuses we want to show:
      */
     // Note: oftentimes, $show_statuses will have been preset to a more restrictive set of values
     $this->filters['visibility_array'] = param($this->param_prefix . 'show_statuses', 'array:string', $this->default_filters['visibility_array'], true, false, true, false);
     // Array of sharings to restrict to
     /*
      * Ordering:
      */
     $this->filters['order'] = param($this->param_prefix . 'order', '/^(ASC|asc|DESC|desc)$/', $this->default_filters['order'], true);
     // ASC or DESC
     // This order style is OK, because sometimes the commentList is not displayed on a table so we cannot say we want to order by a specific column. It's not a crap.
     $this->filters['orderby'] = param($this->param_prefix . 'orderby', '/^([A-Za-z0-9_]+([ ,][A-Za-z0-9_]+)*)?$/', $this->default_filters['orderby'], true);
     // list of fields to order by (TODO: change that crap)
     /*
      * Paging limits:
      */
     $this->filters['unit'] = param($this->param_prefix . 'unit', 'string', $this->default_filters['unit'], true);
     // list unit: 'posts' or 'days'
     $this->filters['posts'] = param($this->param_prefix . 'posts', 'integer', $this->default_filters['posts'], true);
     // # of units to display on the page
     $this->limit = $this->filters['posts'];
     // for compatibility with parent class
     // 'paged'
     $this->filters['page'] = param($this->page_param, 'integer', 1, true);
     // List page number in paged display
     $this->page = $this->filters['page'];
     if (param_errors_detected()) {
         return false;
     }
     if ($this->single_post) {
         // We have requested a specific post
         // Do not attempt to save or load any filterset:
         return true;
     }
     //echo ' Got filters from URL?:'.($this->is_filtered() ? 'YES' : 'NO');
     //pre_dump( $this->default_filters );
     //pre_dump( $this->filters );
     if ($use_filters && $filter_action == 'save') {
         $this->save_filterset();
     }
     return true;
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:101,代码来源:_itemlistlight.class.php


示例14: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     global $Messages;
     $aipr_status = param('aipr_status', 'string', true);
     $this->set('status', $aipr_status, true);
     $aipr_IPv4start = param('aipr_IPv4start', 'string', true);
     param_check_regexp('aipr_IPv4start', '#^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$#i', T_('Please enter a correct IP range start'));
     $aipr_IPv4start = ip2int($aipr_IPv4start);
     $this->set('IPv4start', $aipr_IPv4start);
     $aipr_IPv4end = param('aipr_IPv4end', 'string', true);
     param_check_regexp('aipr_IPv4end', '#^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$#i', T_('Please enter a correct IP range end'));
     $aipr_IPv4end = ip2int($aipr_IPv4end);
     $this->set('IPv4end', $aipr_IPv4end);
     // start timestamp:
     param_date('aipr_IP_timestamp', T_('Please enter a valid Date.'), true);
     $this->set('IP_datetime', form_date(get_param('aipr_IP_timestamp')));
     if ($aipr_IPv4start > $aipr_IPv4end) {
         $Messages->add(T_('IP range start must be less than IP range end'), 'error');
     }
     if (!param_errors_detected()) {
         // Check IPs for inside in other ranges
         if ($ip_range = get_ip_range($aipr_IPv4start, $aipr_IPv4end, $this->ID)) {
             $admin_url;
             $Messages->add(sprintf(T_('IP range already exists with params: %s - <a %s>Edit this range</a>'), int2ip($ip_range->aipr_IPv4start) . ' - ' . int2ip($ip_range->aipr_IPv4end), 'href="' . $admin_url . '?ctrl=antispam&amp;tab3=ipranges&amp;action=iprange_edit&amp;iprange_ID=' . $ip_range->aipr_ID . '"'), 'error');
         }
     }
     return !param_errors_detected();
 }
开发者ID:Edind304,项目名称:b2evolution,代码行数:33,代码来源:_iprange.class.php


示例15: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     global $Messages, $demo_mode;
     // Edited Group Name
     param('edited_grp_name', 'string');
     param_check_not_empty('edited_grp_name', T_('You must provide a group name!'));
     $this->set_from_Request('name', 'edited_grp_name', true);
     // Edited Group Permission Blogs
     param('edited_grp_perm_blogs', 'string', true);
     $this->set_from_Request('perm_blogs', 'edited_grp_perm_blogs', true);
     $apply_antispam = param('apply_antispam', 'integer', 0) ? 0 : 1;
     $perm_xhtmlvalidation = param('perm_xhtmlvalidation', 'string', true);
     $perm_xhtmlvalidation_xmlrpc = param('perm_xhtmlvalidation_xmlrpc', 'string', true);
     $prevent_css_tweaks = param('prevent_css_tweaks', 'integer', 0) ? 0 : 1;
     $prevent_iframes = param('prevent_iframes', 'integer', 0) ? 0 : 1;
     $prevent_javascript = param('prevent_javascript', 'integer', 0) ? 0 : 1;
     $prevent_objects = param('prevent_objects', 'integer', 0) ? 0 : 1;
     if ($demo_mode && ($apply_antispam || $perm_xhtmlvalidation != 'always' && $perm_xhtmlvalidation_xmlrpc != 'always' || $prevent_css_tweaks || $prevent_iframes || $prevent_javascript || $prevent_objects)) {
         // Demo mode restriction: Do not allow to change these settings in demo mode, because it may lead to security problem!
         $Messages->add('Validation settings and security filters are not editable in demo mode!', 'error');
     } else {
         // Apply Antispam
         $this->set('perm_bypass_antispam', $apply_antispam);
         // XHTML Validation
         $this->set('perm_xhtmlvalidation', $perm_xhtmlvalidation);
         // XHTML Validation XMLRPC
         $this->set('perm_xhtmlvalidation_xmlrpc', $perm_xhtmlvalidation_xmlrpc);
         // CSS Tweaks
         $this->set('perm_xhtml_css_tweaks', $prevent_css_tweaks);
         // Iframes
         $this->set('perm_xhtml_iframes', $prevent_iframes);
         // Javascript
         $this->set('perm_xhtml_javascript', $prevent_javascript);
         // Objects
         $this->set('perm_xhtml_objects', $prevent_objects);
     }
     // Stats
     $this->set('perm_stats', param('edited_grp_perm_stats', 'string', true));
     // Load pluggable group permissions from request
     $GroupSettings =& $this->get_GroupSettings();
     foreach ($GroupSettings->permission_values as $name => $value) {
         // We need to handle checkboxes and radioboxes separately , because when a checkbox isn't checked the checkbox variable is not sent
         if ($name == 'perm_createblog' || $name == 'perm_getblog' || $name == 'perm_templates') {
             // These two permissions are represented by checkboxes, all other pluggable group permissions are represented by radiobox.
             $value = param('edited_grp_' . $name, 'string', 'denied');
         } elseif (($name == 'perm_admin' || $name == 'perm_users') && $this->ID == 1) {
             // Admin group has always admin perm, it can not be set or changed.
             continue;
         } else {
             $value = param('edited_grp_' . $name, 'string', '');
         }
         if ($value != '' || $name == 'max_new_threads') {
             // if radio is not set, then doesn't change the settings
             $GroupSettings->set($name, $value, $this->ID);
         }
     }
     return !param_errors_detected();
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:63,代码来源:_group.class.php


示例16: evo_flush

// Begin payload block:
$AdminUI->disp_payload_begin();
evo_flush();
switch ($action) {
    case 'new':
        // Display a form of new email campaign:
        $AdminUI->disp_view('email_campaigns/views/_campaigns_new.form.php');
        break;
    case 'edit':
        // Display a form to edit email campaign:
        switch ($tab) {
            case 'info':
                $AdminUI->disp_view('email_campaigns/views/_campaigns_info.form.php');
                break;
            case 'html':
                if ($edited_EmailCampaign->get('email_html') == '' && !param_errors_detected()) {
                    // Set default value for HTML message
                    $edited_EmailCampaign->set('email_html', '<p>Hello $login$!</p>' . "\r\n\r\n" . '<p>This is our newsletter...</p>');
                }
                $AdminUI->disp_view('email_campaigns/views/_campaigns_html.form.php');
                break;
            case 'text':
                $AdminUI->disp_view('email_campaigns/views/_campaigns_text.form.php');
                break;
            case 'send':
                $AdminUI->disp_view('email_campaigns/views/_campaigns_send.form.php');
                break;
        }
        break;
    default:
        // Display a list of email campaigns:
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:campaigns.ctrl.php


示例17: locale_restore_previous

    locale_restore_previous();
}
// Plugins should cleanup their temporary data here:
$Plugins->trigger_event('MessageFormSentCleanup', array('success_message' => $success_message));
if (empty($redirect_to) && empty($Blog)) {
    $redirect_to = $baseurl;
}
if ($success_message) {
    // Never say to whom we sent the email -- prevent user enumeration.
    $Messages->add(T_('Your message has been sent by email.'), 'success');
    if (empty($redirect_to)) {
        $redirect_to = $Blog->gen_blogurl();
        if (!empty($recipient_User)) {
            $redirect_to = url_add_param($redirect_to, 'disp=msgform&recipient_id=' . $recipient_User->ID);
        }
    }
    header_redirect($redirect_to);
    // exited here
}
// unsuccessful message send, save message params into the Session to not lose the content
$unsaved_message_params = array();
$unsaved_message_params['sender_name'] = $sender_name;
$unsaved_message_params['sender_address'] = $sender_address;
$unsaved_message_params['subject'] = $subject;
$unsaved_message_params['message'] = $original_content;
save_message_params_to_session($unsaved_message_params);
if (param_errors_detected() || empty($redirect_to)) {
    $redirect_to = url_add_param($Blog->gen_blogurl(), 'disp=msgform&recipient_id=' . $recipient_id, '&');
}
header_redirect($redirect_to);
//exited here
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:message_send.php


示例18: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request()
 {
     $new_thread = empty($this->thread_ID);
     // Text
     // WARNING: the messages may contain MALICIOUS HTML and javascript snippets. They must ALWAYS be ESCAPED prior to display!
     param('msg_text', 'html');
     if (!$new_thread) {
         param_check_not_empty('msg_text');
     }
     $this->set('text', get_param('msg_text'));
     // Thread
     if ($new_thread) {
         $this->Thread->load_from_Request();
     } else {
         // this is a reply to an existing conversation, check if current User is allowed to reply
         $this->get_Thread();
         $this->Thread->check_allow_reply();
     }
     return !param_errors_detected();
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:25,代码来源:_message.class.php


示例19: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request($cron_job_names = array(), $cron_job_params = array())
 {
     if ($this->ID > 0 || get_param('ctsk_ID') > 0) {
         // Update or copy cron job
         $cjob_name = param('cjob_name', 'string', true);
         param_check_not_empty('cjob_name', T_('Please enter job name'));
     } else {
         // Create new cron job
         $cjob_type = param('cjob_type', 'string', true);
         if (!isset($cron_job_params[$cjob_type])) {
             // This cron job type doesn't exist, so this is an invalid state
             debug_die('Invalid job type received');
             $cjob_name = '';
         } else {
             $cjob_name = $cron_job_names[$cjob_type];
         }
     }
     // start datetime:
     param_date('cjob_date', T_('Please enter a valid date.'), true);
     param_time('cjob_time');
     $this->set('start_datetime', form_date(get_param('cjob_date'), get_param('cjob_time')));
     // repeat after:
     $cjob_repeat_after = param_duration('cjob_repeat_after');
     if ($cjob_repeat_after == 0) {
         $cjob_repeat_after = NULL;
     }
     $this->set('repeat_after', $cjob_repeat_after);
     // name:
     if (!empty($cjob_name) && $cjob_name != $this->get('name')) {
         $this->set('name', $cjob_name);
     }
     if ($this->ID == 0 && get_param('ctsk_ID') == 0) {
         // Set these params only on creating and copying actions
         // controller:
         $this->set('controller', $cron_job_params[$cjob_type]['ctrl']);
         // params:
         $this->set('params', $cron_job_params[$cjob_type]['params']);
     }
     return !param_errors_detected();
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:45,代码来源:_cronjob.class.php


示例20: load_from_Request


//.........这里部分代码省略.........
                    $UserSettings->set('notify_closed_account', param('edited_user_notify_closed_account', 'integer', 0), $this->ID);
                    $UserSettings->set('notify_reported_account', param('edited_user_notify_reported_account', 'integer', 0), $this->ID);
                    $UserSettings->set('notify_changed_account', param('edited_user_notify_changed_account', 'integer', 0), $this->ID);
                }
                if ($this->check_perm('options', 'edit')) {
                    // edited user has permission to edit options, save notification preferences
                    $UserSettings->set('notify_cronjob_error', param('edited_user_notify_cronjob_error', 'integer', 0), $this->ID);
                }
                // Newsletter
                $UserSettings->set('newsletter_news', param('edited_user_newsletter_news', 'integer', 0), $this->ID);
                $UserSettings->set('newsletter_ads', param('edited_user_newsletter_ads', 'integer', 0), $this->ID);
                // Emails limit per day
                param_integer_range('edited_user_notification_email_limit', 0, 999, T_('Notificaiton email limit must be between %d and %d.'));
                $UserSettings->set('notification_email_limit', param('edited_user_notification_email_limit', 'integer', 0), $this->ID);
                param_integer_range('edited_user_newsletter_limit', 0, 999, T_('Newsletter limit must be between %d and %d.'));
                $UserSettings->set('newsletter_limit', param('edited_user_newsletter_limit', 'integer', 0), $this->ID);
                /**
                 * Update the subscriptions:
                 */
                $subs_blog_IDs = param('subs_blog_IDs', 'string', true);
                $subs_item_IDs = param('subs_item_IDs', 'string', true);
                // Work the blogs:
                $subscription_values = array();
                $unsubscribed = array();
                $subs_blog_IDs = explode(',', $subs_blog_IDs);
                foreach ($subs_blog_IDs as $loop_blog_ID) {
                    // Make sure no dirty hack is coming in here:
                    $loop_blog_ID = intval($loop_blog_ID);
                    // Get checkbox values:
                    $sub_items = param('sub_items_' . $loop_blog_ID, 'integer', 0);
                    $sub_comments = param('sub_comments_' . $loop_blog_ID, 'integer', 0);
                    if ($sub_items || $sub_comments) {
                        // We have a subscription for this blog
                        $subscription_values[] = "( {$loop_blog_ID}, {$this->ID}, {$sub_items}, {$sub_comments} )";
                    } else {
                        // No subscription here:
                        $unsubscribed[] = $loop_blog_ID;
                    }
                }
                // Note: we do not check if subscriptions are allowed here, but we check at the time we're about to send something
                if (count($subscription_values)) {
                    // We need to record values:
                    $DB->query('REPLACE INTO T_subscriptions( sub_coll_ID, sub_user_ID, sub_items, sub_comments )
												VALUES ' . implode(', ', $subscription_values));
                }
                if (count($unsubscribed)) {
                    // We need to make sure some values are cleared:
                    $DB->query('DELETE FROM T_subscriptions
												 WHERE sub_user_ID = ' . $this->ID . '
													 AND sub_coll_ID IN (' . implode(', ', $unsubscribed) . ')');
                }
                // Individual post subscriptions
                if (!empty($subs_item_IDs)) {
                    // user was subscribed to at least one post update notification
                    $subs_item_IDs = explode(',', $subs_item_IDs);
                    $unsubscribed = array();
                    foreach ($subs_item_IDs as $loop_item_ID) {
                        if (!param('item_sub_' . $loop_item_ID, 'integer', 0)) {
                            // user wants to unsubscribe from this post notifications
                            $unsubscribed[] = $loop_item_ID;
                        }
                    }
                    if (!empty($unsubscribed)) {
                        // unsubscribe list is not empty, delete not wanted subscriptions
                        $DB->query('DELETE FROM T_items__subscriptions
												 WHERE isub_user_ID = ' . $this->ID . '
													 AND isub_item_ID IN (' . implode(', ', $unsubscribed) . ')');
                    }
                }
            }
        }
        // ******* Advanced form ******* //
        $is_advanced_form = param('advanced_form', 'boolean', false);
        if ($is_advanced_form) {
            $UserSettings->set('admin_skin', param('edited_user_admin_skin', 'string'), $this->ID);
            // Action icon params:
            param_integer_range('edited_user_action_icon_threshold', 1, 5, T_('The threshold must be between 1 and 5.'));
            $UserSettings->set('action_icon_threshold', param('edited_user_action_icon_threshold', 'integer', true), $this->ID);
            param_integer_range('edited_user_action_word_threshold', 1, 5, T_('The threshold must be between 1 and 5.'));
            $UserSettings->set('action_word_threshold', param('edited_user_action_word_threshold', 'integer'), $this->ID);
            $UserSettings->set('display_icon_legend', param('edited_user_legend', 'integer', 0), $this->ID);
            // Set bozo validador activation
            $UserSettings->set('control_form_abortions', param('edited_user_bozo', 'integer', 0), $this->ID);
            // Focus on first
            $UserSettings->set('focus_on_first_input', param('edited_user_focusonfirst', 'integer', 0), $this->ID);
            // Results per page
            $edited_user_results_page_size = param('edited_user_results_page_size', 'integer', NULL);
            if (isset($edited_user_results_page_size)) {
                $UserSettings->set('results_per_page', $edited_user_results_page_size, $this->ID);
            }
        }
        if ($is_preferences_form || $is_identity_form && $is_new_user) {
            // Multiple session
            $multiple_sessions = $Settings->get('multiple_sessions');
            if ($multiple_sessions != 'adminset_default_no' && $multiple_sessions != 'adminset_default_yes' || $current_User->check_perm('users', 'edit')) {
                $UserSettings->set('login_multiple_sessions', param('edited_user_set_login_multiple_sessions', 'integer', 0), $this->ID);
            }
        }
        return !param_errors_detected();
    }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:101,代码来源:_user.class.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP param_integer函数代码示例发布时间:2022-05-15
下一篇:
PHP param_error函数代码示例发布时间: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