Create a new page
438247
def page(name, attributes = {}, &block)
      page = Elements::Page.new(name, nil, @resolver, attributes, &block)
      pages << page if page.visible?
    end
808949
function createPage(casper) {
    /*jshint maxstatements:20*/
    "use strict";
    var page = require('webpage').create();
    page.onAlert = function onAlert(message) {
        casper.log('[alert] ' + message, "info", "remote");
        casper.emit('remote.alert', message);
        if (utils.isFunction(casper.options.onAlert)) {
            casper.options.onAlert.call(casper, casper, message);
        }
    };
    page.onConfirm = function onConfirm(message) {
        if ('page.confirm' in casper._filters) {
            return casper.filter('page.confirm', message);
        }
        return true;
    };
    page.onConsoleMessage = function onConsoleMessage(msg) {
        // client utils casper console message
        var consoleTest = /^\[casper\.echo\]\s?([\s\S]*)/.exec(msg);
        if (consoleTest && consoleTest.length === 2) {
            casper.echo(consoleTest[1]);
            return; // don't trigger remote.message event for these
        }
        // client utils log messages
        var logLevel = "info",
            logTest = /^\[casper:(\w+)\]\s?([\s\S]*)/m.exec(msg);
        if (logTest && logTest.length === 3) {
            logLevel = logTest[1];
            msg = logTest[2];
            casper.log(msg, logLevel, "remote");
        } else {
            casper.emit('remote.message', msg);
        }
    };

    page.onCallback = function onCallback(data){
        casper.emit('remote.callback',data);
    };

    page.onError = function onError(msg, trace) {
        casper.emit('page.error', msg, trace);
    };
    page.onInitialized = function onInitialized() {
        casper.emit('page.initialized', page);
        if (utils.isFunction(casper.options.onPageInitialized)) {
            casper.log("Post-configuring WebPage instance", "debug");
            casper.options.onPageInitialized.call(casper, page);
        }
    };
    page.onLoadStarted = function onLoadStarted() {
        // in some case, there is no navigation requested event, so
        // be sure that browserInitializing is false to not block checkStep()
        casper.browserInitializing = false;
        casper.loadInProgress = true;
        casper.emit('load.started');
    };
    page.onLoadFinished = function onLoadFinished(status) {
        /*jshint maxstatements:20*/
        if (status !== "success") {
            casper.emit('load.failed', {
                status:      status,
                http_status: casper.currentHTTPStatus,
                url:         casper.requestUrl
            });
            var message = 'Loading resource failed with status=' + status;
            if (casper.currentHTTPStatus) {
                message += f(' (HTTP %d)', casper.currentHTTPStatus);
            }
            message += ': ' + casper.requestUrl;
            casper.log(message, "warning");
            casper.navigationRequested = false;
            casper.browserInitializing = false;
            if (utils.isFunction(casper.options.onLoadError)) {
                casper.options.onLoadError.call(casper, casper, casper.requestUrl, status);
            }
        }
        // local client scripts
        casper.injectClientScripts();
        // remote client scripts
        casper.includeRemoteScripts();
        // Client-side utils injection
        casper.injectClientUtils();
        // history
        casper.history.push(casper.getCurrentUrl());
        casper.emit('load.finished', status);
        casper.loadInProgress = false;
    };
    page.onNavigationRequested = function onNavigationRequested(url, type, willNavigate, isMainFrame) {
        casper.log(f('Navigation requested: url=%s, type=%s, willNavigate=%s, isMainFrame=%s',
                     url, type, willNavigate, isMainFrame), "debug");
        casper.browserInitializing = false;
        if (isMainFrame && casper.requestUrl !== url) {
            var currentUrl = casper.requestUrl;
            var newUrl = url;
            var pos = currentUrl.indexOf('#')
            if (pos !== -1) {
                currentUrl = currentUrl.substring(0, pos);
            }
            pos = newUrl.indexOf('#')
            if (pos !== -1) {
                newUrl = newUrl.substring(0, pos);
            }
            // for URLs that are only different by their hash part
            // don't turn navigationRequested to true, because
            // there will not be loadStarted, loadFinished events
            // so it could cause issues (for exemple, checkStep that
            // do no execute the next step -> infinite loop on checkStep)
            if (currentUrl !== newUrl)
                casper.navigationRequested  = true;

            if (willNavigate) {
                casper.requestUrl = url;
            }
        }
        casper.emit('navigation.requested', url, type, willNavigate, isMainFrame);
    };
    page.onPageCreated = function onPageCreated(popupPage) {
        casper.emit('popup.created', popupPage);
        popupPage.onLoadFinished = function onLoadFinished() {
            // SlimerJS needs this line of code because of issue
            // https://github.com/laurentj/slimerjs/issues/48
            // else checkStep turns into an infinite loop
            // after clicking on an <a target="_blank">
            casper.navigationRequested  = false;
            casper.popups.push(popupPage);
            casper.emit('popup.loaded', popupPage);
        };
        popupPage.onClosing = function onClosing(closedPopup) {
            casper.popups.clean(closedPopup);
            casper.emit('popup.closed', closedPopup);
        };
    };
    page.onPrompt = function onPrompt(message, value) {
        return casper.filter('page.prompt', message, value);
    };
    page.onResourceReceived = function onResourceReceived(resource) {
        http.augmentResponse(resource);
        casper.emit('resource.received', resource);
        if (utils.isFunction(casper.options.onResourceReceived)) {
            casper.options.onResourceReceived.call(casper, casper, resource);
        }
        casper.handleReceivedResource(resource);
    };
    page.onResourceRequested = function onResourceRequested(requestData, request) {
        casper.emit('resource.requested', requestData, request);
        if (requestData.url === casper.requestUrl) {
            casper.emit('page.resource.requested', requestData, request);
        }
        if (utils.isFunction(casper.options.onResourceRequested)) {
            casper.options.onResourceRequested.call(casper, casper, requestData, request);
        }
    };
    page.onUrlChanged = function onUrlChanged(url) {
        casper.log(f('url changed to "%s"', url), "debug");
        casper.navigationRequested = false;
        casper.emit('url.changed', url);
    };
    casper.emit('page.created', page);
    return page;
}
1350974
def page(self, *args):
        
        for arg in args:
            self.__pages__.append(arg)
        return self
671479
def duplicate!
      Page.new(attributes.except('id', 'updated_at', 'created_at')).tap do |page|
        page.title = page.title + ' (Copy)'
        page.slug = page.slug + '-copy'
        page.draft = true

        regions.each do |region|
          page.regions.build(region.attributes.except('id', 'updated_at', 'created_at'))
        end

        page.save!
      end
    end
466975
def new(obj):
    
    title = request.form['title']
    _site.config['ADDITIONAL_METADATA']['author.uid'] = current_user.uid
    try:
        title = title.encode(sys.stdin.encoding)
    except (AttributeError, TypeError):
        title = title.encode('utf-8')
    try:
        if obj == 'post':
            f = NewPostForm()
            if f.validate():
                _site.commands.new_post(title=title,
                                        author=current_user.realname,
                                        content_format='html')
            else:
                return error("Bad Request", 400)
        elif obj == 'page':
            f = NewPageForm()
            if f.validate():
                _site.commands.new_page(title=title,
                                        author=current_user.realname,
                                        content_format='html')
            else:
                return error("Bad Request", 400)
        else:
            return error("Cannot create {0} — unknown type.".format(obj), 400)
    except SystemExit:
        return error("This {0} already exists!".format(obj), 500)
    finally:
        del _site.config['ADDITIONAL_METADATA']['author.uid']
    # reload post list and go to index
    scan_site()
    if db is not None:
        db.set('site:needs_rebuild', '1')
    else:
        site.coil_needs_rebuild = '1'
    return redirect(url_for('index'))
758487
function makePage(number, text, isActive) {
        return {
          number: number,
          text: text,
          active: isActive
        };
      }
182192
def create
      @page = ::Page.new(page_params)

      respond_to do |format|
        if @page.save
          format.html { redirect_to(cmtool.pages_path, :notice => I18n.t('cmtool.action.create.successful', :model => ::Page.model_name.human)) }
          format.xml  { render :xml => @page, :status => :created, :location => @page }
        else
          format.html { render :action => "new" }
          format.xml  { render :xml => @page.errors, :status => :unprocessable_entity }
        end
      end
    end
1366816
def create_page(title, space, parrent_page_id=nil)
            params = { 'type' => 'page',
                'title' => title,
                'space' => {'key' => space},
                'body' => {
                    'storage' => {
                        'value' => ("#{ @body_message.to_json.gsub("&&", "&amp;&amp;").gsub(/\\u001b.../, "   ") }").force_encoding('UTF-8'),
                        'representation' => 'storage'
                        }
                    }
                }
            if parrent_page_id
                params['ancestors'] = [{'type' => 'page', 'id' => parrent_page_id}]
            end

            uri = URI.parse(@base_url)
            https = Net::HTTP.new(uri.host,uri.port)
            https.use_ssl = true
            # https.set_debug_output $stderr
            req = Net::HTTP::Post.new(uri.path, initheader = {'Content-Type' =>'application/json'})
            req.basic_auth(@user, @password)
            req['Accept'] = 'application/json'
            req.body = "#{params.to_json}"
            response = https.request(req)
            response = JSON.parse(response.body)
            if response["statusCode"] == 400
                puts response.inspect
                puts req.body.inspect
                puts "Create page: Error reporting to confluence: #{response["message"]}"
                raise "Create page: Error reporting to confluence: #{response["message"]}"
            else
                puts "Reported page creation."
            end
        end
664588
public function CreatePage()
	{
		switch ($this->_action)
		{
			case ModuleActionLogin::LOGIN :
				$this->MakeLogin();
				break;
			case ModuleActionLogin::FORGOTPASSWORD :
				$this->ForgotPassword();
				break;
			case ModuleActionLogin::FORGOTPASSWORDCONFIRM :
				$this->ForgotPasswordConfirm();
				break;
			case ModuleActionLogin::NEWUSER :
				$this->CreateNewUser();
				break;
			case ModuleActionLogin::NEWUSERCONFIRM :
				$this->CreateNewUserConfirm();
				break;
			case ModuleActionLogin::RESETPASSWORD :
				$this->ResetPassword();
				break;
			case ModuleActionLogin::RESETPASSWORDCONFIRM :
				$this->ResetPasswordConfirm();
				break;
			default:
				$this->FormLogin();
				break;
		}

		$this->_blockCenter->addXmlnukeObject($this->_login);

		return $this->defaultXmlnukeDocument;
	}
1128146
def create
      @page = Humpyard::config.page_types[params[:type]].new params[:page]
      @page.title_for_url = @page.page.suggested_title_for_url
      
      authorize! :create, @page.page
      
      if @page.save
        @prev = Humpyard::Page.find_by_id(params[:prev_id])
        @next = Humpyard::Page.find_by_id(params[:next_id])
        
        #do_move(@page, @prev, @next)
      
        # insert_options = {
        #   :element => "hy-id-#{@page.id}",
        #   :url => @page.page.human_url,
        #   :parent => @page.parent ? "hy-page-dialog-item-#{@page.id}" : "hy-page-dialog-pages"
        # }
        
        # insert_options[:before] = "hy-page-dialog-item-#{@next.id}" if @next
        # insert_options[:after] = "hy-page-dialog-item-#{@prev.id}" if not @next and @prev

        # just reload the tree
      
        replace_options = {
          :element => "hy-page-treeview",
          :content => render_to_string(:partial => "tree.html", :locals => {:page => @page})
        }
      
        render :json => {
          :status => :ok,
          #:dialog => :close,
          # :insert => [insert_options],
          :replace => [replace_options],
          :flash => {
            :level => 'info',
            :content => I18n.t('humpyard_form.flashes.create_success', :model => Humpyard::Page.model_name.human)
          }
        }
      else
        render :json => {
          :status => :failed, 
          :errors => @page.errors,
          :flash => {
            :level => 'error',
            :content => I18n.t('humpyard_form.flashes.create_fail', :model => Humpyard::Page.model_name.human)
          }
        }
      end
    end
382753
@Override
    protected void startNewPage()
    {
        super.startNewPage();
        pagebox = createBlock(body, curpage, false);
        pagebox.setStyle(createPageStyle());
        body.addSubBox(pagebox);
    }
713416
public function CreatePage() 
	{
		$this->addMenuOption($this->myWords->Value("CREATE_ROLE"), $this->url->getUrl());
		switch ($this->_action)
		{
			case ModuleAction::Create :
			$this->actionCreate();
			break;
			case ModuleAction::CreateConfirm :
			$this->actionSave();
			break;
			case ModuleAction::Delete :
			$this->actionDelete();
			break;
			case ModuleAction::Edit :
			$this->actionEdit();
			break;
			case ModuleAction::EditConfirm :
			$this->actionEditSave();
			break;
			default:
			$this->actionList();
			break;
		}
		
		return $this->defaultXmlnukeDocument->generatePage();
	}
714963
protected function Page()
    {
        if (!$this->page) {
            $this->page = new Page(Request::GetData('page'));
        }
        return $this->page;
    }
594519
def create_page(slug, post_data):
        '''
        
        '''
        logger.info('Call create Page')
        if MWiki.get_by_uid(slug):
            return False

        title = post_data['title'].strip()
        if len(title) < 2:
            return False
        return MWiki.__create_rec(slug, '2', post_data=post_data)
725050
function createSite() {
  function app(page) { app.handle(page); }
  mixin(app, EventEmitter.prototype, false);
  mixin(app, proto, false);
  app.init();
  return app;
}
250603
function createPage(casper) {
    /*eslint max-statements:0*/
    "use strict";
    var mainPage = require('webpage').create();
    mainPage.isPopup = false;

    var onClosing = function onClosing(closedPopup) {
        if (closedPopup.isPopup) {
            if (casper.page !== null && casper.page.id === closedPopup.id) {
                casper.page = casper.mainPage;
            }
            casper.popups.clean();
            casper.emit('popup.closed', closedPopup);
        } else {
            casper.page = null;
            casper.emit('page.closed', closedPopup);
        }
    };

    var onLoadFinished = function onLoadFinished(status) {
        this.windowNameBackUp = this.windowName;
        /*eslint max-statements:0*/
        if (status !== "success") {
            casper.emit('load.failed', {
                status:      status,
                http_status: casper.currentHTTPStatus,
                url:         this.url
            });
            var message = 'Loading resource failed with status=' + status;
            if (casper.currentHTTPStatus) {
                message += f(' (HTTP %d)', casper.currentHTTPStatus);
            }
            message += ': ' + casper.requestUrl;
            casper.log(message, "warning");
            casper.navigationRequested = false;
            this.browserInitializing = false;
            if (utils.isFunction(casper.options.onLoadError)) {
                casper.options.onLoadError.call(casper, casper, casper.requestUrl, status);
            }
        }

        var index = 0, currentPage = casper.page;
        casper.page = this;
        this.switchToMainFrame();
        for (var l = this.frames.length; index < l ; index++) {
            try {
                casper.switchToChildFrame(this.frames[index]);
            } catch(e) {
                break;
            }
        }
        this.framesReloaded = this.frames.slice(index);
        this.frames = this.frames.slice(0, index);

        if (this.framesReloaded.length !== 0) {
            casper.emit('frame.reset', this.framesReloaded);
        }
        casper.page = currentPage;

        // local client scripts
        casper.injectClientScripts(this);
        // remote client scripts
        casper.includeRemoteScripts(this);
        // Client-side utils injection
        casper.injectClientUtils(this);
        // history
        casper.history.push(casper.getCurrentUrl());
        casper.emit('load.finished', status);
        this.loadInProgress = false;
        if (this.isPopup) {
            casper.emit('popup.loaded', this);
        } else {
            casper.emit('page.loaded', this);
        }
    };

    var onLoadStarted = function onLoadStarted() {
        // in some case, there is no navigation requested event, so
        // be sure that browserInitializing is false to not block checkStep()
        this.browserInitializing = false;
        this.loadInProgress = true;
        casper.emit('load.started');
    };

    var onNavigationRequested = function onNavigationRequested(url, type, willNavigate, isMainFrame) {
        casper.log(f('Navigation requested: url=%s, type=%s, willNavigate=%s, isMainFrame=%s',
                     url, type, willNavigate, isMainFrame), "debug");
        this.browserInitializing = false;
        casper.page.switchToMainFrame();
        if (isMainFrame && casper.requestUrl !== url) {
            var currentUrl = casper.requestUrl;
            var newUrl = url;
            var pos = currentUrl.indexOf('#');
            if (pos !== -1) {
                currentUrl = currentUrl.substring(0, pos);
            }
            pos = newUrl.indexOf('#');
            if (pos !== -1) {
                newUrl = newUrl.substring(0, pos);
            }
            // for URLs that are only different by their hash part
            // or if navigation locked (willNavigate == false)
            // don't turn navigationRequested to true, because
            // there will not be loadStarted, loadFinished events
            // so it could cause issues (for exemple, checkStep that
            // do no execute the next step -> infinite loop on checkStep)
            if (willNavigate && currentUrl !== newUrl) {
                casper.navigationRequested = true;
            }
            if (willNavigate) {
                casper.requestUrl = url;
            }
        }
        casper.emit('navigation.requested', url, type, willNavigate, isMainFrame);
    };
    
    var onPageCreated = function onPageCreated(page) {
        page.isPopup = (typeof page.isPopup === "undefined") ? true : false;
        page.id = new Date().getTime();
        page.browserInitializing = false;
        page.loadInProgress = false; 
        page.windowNameBackUp = page.windowName;
        page.frames = [];
        page.framesReloaded = [];
        page.context = {
            "x": 0,
            "y": 0
        };

        page.settings.loadImagesValue = page.settings.loadImages;
        Object.defineProperty(page.settings,'loadImages', {
            get: function() { 
                return page.settings.loadImagesValue;
            },
            set: function(newValue) {
                page.settings.loadImagesValue = newValue;
                if (typeof page.clearMemoryCache === 'function') {
                    page.clearMemoryCache();
                }
            }
        });

        page.onClosing =  function() {
            var p = page;
            return function() {
                return onClosing.apply(p, arguments);
            };
        }();
        page.onLoadFinished = function() {
            var p = page;
            return function() {
                return onLoadFinished.apply(p, arguments);
            };
        }();
        page.onLoadStarted = function() {
            var p = page;
            return function() {
                return onLoadStarted.apply(p, arguments);
            };
        }();
        page.onNavigationRequested = function() {
            var p = page;
            return function() {
                return onNavigationRequested.apply(p, arguments);
            };
        }();
        page.onPageCreated = onPageCreated;

        page.onAlert = function onAlert(message) {
            casper.log('[alert] ' + message, "info", "remote");
            casper.emit('remote.alert', message);
            if (utils.isFunction(casper.options.onAlert)) {
                casper.options.onAlert.call(casper, casper, message);
            }
        };
        page.onConfirm = function onConfirm(message) {
            if ('page.confirm' in casper._filters) {
                return casper.filter('page.confirm', message);
            }
            return true;
        };
        page.onConsoleMessage = function onConsoleMessage(msg) {
            // client utils casper console message
            var consoleTest = /^\[casper\.echo\]\s?([\s\S]*)/.exec(msg);
            if (consoleTest && consoleTest.length === 2) {
                casper.echo(consoleTest[1]);
                return; // don't trigger remote.message event for these
            }
            // client utils log messages
            var logLevel = "info",
                logTest = /^\[casper:(\w+)\]\s?([\s\S]*)/m.exec(msg);
            if (logTest && logTest.length === 3) {
                logLevel = logTest[1];
                msg = logTest[2];
                casper.log(msg, logLevel, "remote");
            } else {
                casper.emit('remote.message', msg);
            }
        };

        page.onCallback = function onCallback(data){
            casper.emit('remote.callback', data);
        };
        page.onError = function onError(msg, trace) {
            casper.emit('page.error', msg, trace);
        };
        page.onFilePicker = function onFilePicker(olderFile) {
            return casper.filter('page.filePicker', olderFile);
        };
        page.onFileDownload = function onFileDownload(url, data) {
            if ('fileDownload' in casper._filters) {
                return casper.filter('fileDownload', url, data);
            }
            casper.log("File to download : aborted", "debug");
            return null;
        };
        page.onFileDownloadError = function onFileDownloadError(error) {
            return casper.emit('fileDownloadError', error);
        };
        page.onInitialized = function onInitialized() {
            casper.emit('page.initialized', page);
            if (utils.isFunction(casper.options.onPageInitialized)) {
                casper.log("Post-configuring WebPage instance", "debug");
                casper.options.onPageInitialized.call(casper, page);
            }
        };
        page.onLongRunningScript = function onLongRunningScript(message) {
            casper.emit('remote.longRunningScript', page, message);
        };
        page.onPrompt = function onPrompt(message, value) {
            return casper.filter('page.prompt', message, value);
        };
        page.onResourceReceived = function onResourceReceived(resource) {
            http.augmentResponse(resource);
            casper.emit('resource.received', resource);
            if (utils.isFunction(casper.options.onResourceReceived)) {
                casper.options.onResourceReceived.call(casper, casper, resource);
            }
            casper.handleReceivedResource(resource);
        };
        page.onResourceRequested = function onResourceRequested(requestData, request) {
            casper.emit('resource.requested', requestData, request);
            var checkUrl = ((phantom.casperEngine === 'phantomjs' && utils.ltVersion(phantom.version, '2.1.0')) ||
                       (phantom.casperEngine === 'slimerjs' && utils.ltVersion(slimer.version, '0.10.0'))) ? utils.decodeUrl(requestData.url) : requestData.url;
            if (checkUrl === casper.requestUrl) {
                casper.emit('page.resource.requested', requestData, request);
            }
            if (utils.isFunction(casper.options.onResourceRequested)) {
                casper.options.onResourceRequested.call(casper, casper, requestData, request);
            }
            casper.requestData[requestData.id] = requestData;
        };
        page.onResourceError = function onResourceError(resourceError) {
            casper.emit('resource.error', resourceError);
        };
        page.onResourceTimeout = function onResourceTimeout(resourceError) {
            casper.emit('resource.timeout', resourceError);
        };
        page.onUrlChanged= function onUrlChanged(url) {
            casper.log(f('url changed to "%s"', url), "debug");
            casper.navigationRequested= false;
            casper.emit('url.changed', url);
        };

        if (page.isPopup) {
            casper.emit('popup.created', page);
            if (casper.options.pageSettings.userAgent !== defaultUserAgent) {
                page.customHeaders = {"User-Agent": casper.options.pageSettings.userAgent};
            }
            page.settings = utils.mergeObjects(page.settings, casper.options.pageSettings);
            if (utils.isClipRect(casper.options.clipRect)) {
                page.clipRect = casper.options.clipRect;
            }
            if (utils.isObject(casper.options.viewportSize)) {
                page.viewportSize = casper.options.viewportSize;
            }
            casper.popups.push(page);
        } else {
            casper.emit('page.created', page);
        }
    };
    onPageCreated(mainPage);
    return mainPage;
}
682138
public function CreatePage()
	{
		parent::CreatePage();

		$this->myWords = $this->WordCollection();
		$this->setTitlePage($this->myWords->Value("TITLE"));
		$this->setHelp($this->myWords->Value("DESCRIPTION"));

		$block = new XmlBlockCollection($this->myWords->Value("BLOCK_TITLE"), BlockPosition::Center);

		$anydatafile = new AnydatasetFilenameProcessor("_db");

		if ($this->_action != "test")
		{

			$processfields = new CrudFieldCollection();

			$field = new CrudField();
			$field->fieldName = "dbname";
			$field->editable = true;
			$field->key = true;
			$field->visibleInList = true;
			$field->dataType = INPUTTYPE::TEXT;
			$field->fieldXmlInput = XmlInputObjectType::TEXTBOX;
			$field->fieldCaption = $this->myWords->Value("DBNAME");
			$field->size = 20;
			$field->maxLength = 20;
			$field->required = true;
			$field->newColumn = true;
			$processfields->addCrudField($field);

			$field = new CrudField();
			$field->fieldName = "dbtype";
			$field->editable = true;
			$field->key = false;
			$field->visibleInList = true;
			$field->dataType = INPUTTYPE::TEXT;
			$field->fieldXmlInput = XmlInputObjectType::SELECTLIST;
			$field->fieldCaption = $this->myWords->Value("DBTYPE");
			$field->size = 15;
			$field->maxLength = 15;
			$field->required = true;
			$field->arraySelectList = array("dsn"=>"dsn (use it)",
				"literal"=>"PDO Literal connection string",
				"dblib"=>"FreeTDS / Microsoft SQL Server / Sybase",
				"firebird"=>"Firebird/Interbase 6",
				"informix"=>"IBM Informix Dynamic Server",
				"mysql"=>"MySQL 3.x/4.x/5.x",
				"oci"=>"Oracle Call Interface",
				"odbc"=>"ODBC v3 (IBM DB2, unixODBC and win32 ODBC)",
				"pgsql"=>"PostgreSQL",
				"sqlite"=>"SQL Lite");
			$field->defaultValue = "dsn";
			$field->newColumn = true;
			$processfields->addCrudField($field);

			$field = new CrudField();
			$field->fieldName = "dbconnectionstring";
			$field->editable = true;
			$field->key = false;
			$field->visibleInList = true;
			$field->dataType = INPUTTYPE::TEXT;
			$field->fieldXmlInput = XmlInputObjectType::TEXTBOX;
			$field->fieldCaption = $this->myWords->Value("DBCONNECTIONSTRING");
			$field->size = 50;
			$field->maxLength = 200;
			$field->required = true;
			$field->defaultValue = "adodriver://username:password@server/datasource?persist";
			$field->newColumn = true;
			$processfields->addCrudField($field);

			$buttons = new CustomButtons();
			$buttons->action = "test";
			$buttons->alternateText = $this->myWords->Value("TESTALTERNATETEXT");
			$buttons->enabled = true;
			$buttons->icon = "common/editlist/ic_selecionar.gif";
			$buttons->message = $this->myWords->Value("TESTMESSAGETEXT");
			$buttons->multiple = MultipleSelectType::ONLYONE;

			$crud =
				new XmlnukeCrudAnydata(
					$this->_context,
					$processfields,
					$this->myWords->Value("AVAILABLELANGUAGES"),
					"module:Xmlnuke.Admin.ManageDBConn",
					array($buttons),
					$anydatafile
				);

			$block->addXmlnukeObject($crud);

			$p = new XmlParagraphCollection();
			$p->addXmlnukeObject(new XmlnukeText($this->myWords->Value("NOTE"), true));
			$p->addXmlnukeObject(new XmlnukeText($this->myWords->Value("PHPNOTE")));
			$block->addXmlnukeObject($p);
		}
		else
		{
			$p = new XmlParagraphCollection();
			$db = $this->_context->get("valueid");
			if ($db == "")
			{
				$p->addXmlnukeObject(new XmlnukeText($this->myWords->Value("ERRORDBEMPTY")));
			}
			else
			{
				try
				{
					$dbdataset = new DBDataset($db);
					$dbdataset->TestConnection();
					$p->addXmlnukeObject(new XmlnukeText($this->myWords->Value("SEEMSOK")));
				}
				catch (Exception $ex)
				{
					$p->addXmlnukeObject(new XmlnukeText($this->myWords->Value("GOTERROR", $ex->getMessage())));
				}
			}
			$block->addXmlnukeObject($p);
			$p = new XmlParagraphCollection();
			$href = new XmlAnchorCollection("module:Xmlnuke.Admin.ManageDBConn");
			$href->addXmlnukeObject(new XmlnukeText($this->myWords->Value("GOBACK")));
			$p->addXmlnukeObject($href);
			$block->addXmlnukeObject($p);
		}

		$this->defaultXmlnukeDocument->addXmlnukeObject($block);
		return $this->defaultXmlnukeDocument->generatePage();
	}