Пример #1
0
    /**
     * Step #6 - Cookie Stuff
     *
     */
    function step_6($data = null)
    {
        if ($data['response']) {
            if ($data['htmldata']['cookiepath_other'] and $data['htmldata']['cookiepath_value']) {
                $cookiepath = $data['htmldata']['cookiepath_value'];
            } else {
                $cookiepath = $data['htmldata']['cookiepath'];
            }
            if ($data['htmldata']['cookiedomain_other'] and $data['htmldata']['cookiedomain_value']) {
                $cookiedomain = $data['htmldata']['cookiedomain_value'];
            } else {
                $cookiedomain = $data['htmldata']['cookiedomain'];
            }
            $this->db->query("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "setting\n\t\t\t\tSET value = '" . $this->db->escape_string($cookiepath) . "'\n\t\t\t\tWHERE varname = 'cookiepath'\n\t\t\t");
            $this->db->query("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "setting\n\t\t\t\tSET value = '" . $this->db->escape_string($cookiedomain) . "'\n\t\t\t\tWHERE varname = 'cookiedomain'\n\t\t\t");
            $this->show_message($this->phrase['install']['cookie_settings_saved']);
            return;
        }
        require_once DIR . '/includes/adminfunctions_options.php';
        $cookiepaths = construct_select_options(fetch_valid_cookiepaths($this->registry->script), '/');
        $cookiedomains = construct_select_options(fetch_valid_cookiedomains($_SERVER['HTTP_HOST'], $this->phrase['install']['blank']), '');
        $html = '<table cellspacing="0" cellpadding="4" border="0" align="center" width="100%" id="cpform_table" class="" style="border-collapse: separate;">
<tbody>
<tr valign="top">
	<td class="alt2">' . $this->phrase['install']['cookiepath'] . '</td>
	<td class="alt2">
		<fieldset>
			<legend>' . $this->phrase['install']['suggested_settings'] . '</legend>
			<div style="padding: 4px;">
				<select class="bginput lbinstallselect" tabindex="1" name="htmldata[cookiepath]">' . $cookiepaths . '</select>
			</div>
		</fieldset>
		<br>
		<fieldset>
			<legend>' . $this->phrase['install']['custom_setting'] . '</legend>
			<div style="padding: 4px;">
				<label for="cookiepatho"><input type="checkbox" value="1" tabindex="1" name="htmldata[cookiepath_other]" id="cookiepatho" />' . $this->phrase['install']['use_custom_setting'] . '
				</label><br>
				<input type="text" value="" name="htmldata[cookiepath_value]" tabindex="1" size="25" class="bginput" />
			</div>
		</fieldset>
	</td>
</tr>
<tr valign="top">
	<td class="alt1">' . $this->phrase['install']['cookiedomain'] . '</td>
	<td class="alt1">
		<fieldset>
			<legend>' . $this->phrase['install']['suggested_settings'] . '</legend>
			<div style="padding: 4px;">
				<select class="bginput lbinstallselect" tabindex="1" name="htmldata[cookiedomain]">' . $cookiedomains . '</select>
			</div>
		</fieldset>
		<br>
		<fieldset>
			<legend>' . $this->phrase['install']['custom_setting'] . '</legend>
			<div style="padding: 4px;">
				<label for="cookiedomaino"><input type="checkbox" value="1" tabindex="1" name="htmldata[cookiedomain_other]" id="cookiedomaino" />' . $this->phrase['install']['use_custom_setting'] . '
				</label><br>
				<input type="text" value="" name="htmldata[cookiedomain_value]" tabindex="1" size="25" class="bginput" />
			</div>
		</fieldset>
	</td>
</tr>
</tbody></table>';
        return array('html' => $html, 'width' => '640px', 'hidecancel' => true, 'title' => $this->phrase['install']['cookie_settings'], 'reset' => true);
    }
Пример #2
0
	$webmaster = 'webmaster@' . preg_replace('#^www\.#', '', $_SERVER['SERVER_NAME']);

	print_form_header(substr(THIS_SCRIPT, 0, -strlen('.php')), '');
	construct_hidden_code('step', ($vbulletin->GPC['step'] + 1));
	print_table_header($install_phrases['general_settings']);
	print_input_row($install_phrases['bbtitle'], 'vboptions[bbtitle]', 'Forums', 0, 40);
	print_input_row($install_phrases['hometitle'], 'vboptions[hometitle]', '', 0, 40);
	print_input_row($install_phrases['bburl'], 'vboptions[bburl]', $vboptions['bburl'], 0, 40);
	print_input_row($install_phrases['homeurl'], 'vboptions[homeurl]', $vboptions['homeurl'], 0, 40);
	print_input_row($install_phrases['webmasteremail'], 'vboptions[webmasteremail]', $webmaster, 0, 40);
	print_label_row($install_phrases['cookiepath'], '
		<fieldset>
			<legend>' . $install_phrases['suggested_settings'] . '</legend>
			<div style="padding:4px">
				<select name="vboptions[cookiepath]" tabindex="1" class="bginput">' .
					construct_select_options(fetch_valid_cookiepaths($vbulletin->script), '/') . '
				</select>
			</div>
		</fieldset>
		<br />
		<fieldset>
			<legend>' . $install_phrases['custom_setting'] . '</legend>
			<div style="padding:4px">
				<label for="cookiepatho"><input type="checkbox" id="cookiepatho" name="cookiepath_other" tabindex="1" value="1" />' . $install_phrases['use_custom_setting'] . '
				</label><br />
				<input type="text" class="bginput" size="25" name="cookiepath_value" value="" />
			</div>
		</fieldset>
	');
	print_label_row($install_phrases['cookiedomain'], '
		<fieldset>
Пример #3
0
    $vboptions['bburl'] = 'http://' . $_SERVER['SERVER_NAME'] . $port . substr(SCRIPTPATH, 0, strpos(SCRIPTPATH, '/install/'));
    $vboptions['homeurl'] = 'http://' . $_SERVER['SERVER_NAME'] . $port;
    $webmaster = 'webmaster@' . preg_replace('#^www\\.#', '', $_SERVER['SERVER_NAME']);
    print_form_header(substr(THIS_SCRIPT, 0, -strlen('.php')), '');
    construct_hidden_code('step', $vbulletin->GPC['step'] + 1);
    print_table_header($install_phrases['general_settings']);
    print_input_row($install_phrases['bbtitle'], 'vboptions[bbtitle]', 'Forums', 0, 40);
    print_input_row($install_phrases['hometitle'], 'vboptions[hometitle]', '', 0, 40);
    print_input_row($install_phrases['bburl'], 'vboptions[bburl]', $vboptions['bburl'], 0, 40);
    print_input_row($install_phrases['homeurl'], 'vboptions[homeurl]', $vboptions['homeurl'], 0, 40);
    print_input_row($install_phrases['webmasteremail'], 'vboptions[webmasteremail]', $webmaster, 0, 40);
    print_label_row($install_phrases['cookiepath'], '
		<fieldset>
			<legend>' . $install_phrases['suggested_settings'] . '</legend>
			<div style="padding:4px">
				<select name="vboptions[cookiepath]" tabindex="1" class="bginput">' . construct_select_options(fetch_valid_cookiepaths($vbulletin->script), '/') . '
				</select>
			</div>
		</fieldset>
		<br />
		<fieldset>
			<legend>' . $install_phrases['custom_setting'] . '</legend>
			<div style="padding:4px">
				<label for="cookiepatho"><input type="checkbox" id="cookiepatho" name="cookiepath_other" tabindex="1" value="1" />' . $install_phrases['use_custom_setting'] . '
				</label><br />
				<input type="text" class="bginput" size="25" name="cookiepath_value" value="" />
			</div>
		</fieldset>
	');
    print_label_row($install_phrases['cookiedomain'], '
		<fieldset>