  def create_q_page
    Log.add_info(request, params.inspect)

    return unless request.post?

    @tmpl_folder, @tmpl_q_folder = TemplatesHelper.get_tmpl_subfolder(TemplatesHelper::TMPL_RESEARCH)

    unless @tmpl_q_folder.nil?

      @items = Folder.get_items_admin(@tmpl_q_folder.id, 'xorder ASC')

      if !@items.nil? and @items.length >= ResearchesHelper::MAX_PAGES
        flash[:notice] = 'ERROR:' + t('research.max_pages')
        render(:partial => 'ajax_q_page', :layout => false)
        return
      end

      item = Item.new_research(@tmpl_q_folder.id)
      item.title = t('research.new_page')
      item.user_id = 0
      item.save!

      @items << item

    else
      Log.add_error(request, nil, '/'+TemplatesHelper::TMPL_ROOT+'/'+TemplatesHelper::TMPL_RESEARCH+' NOT found!')
    end

    render(:partial => 'ajax_q_page', :layout => false)
  end
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.