コード例 #1
0
 public function write_config()
 {
     $data = array('db_hostname' => $this->session_data('dbhost'), 'db_username' => $this->session_data('dbusername'), 'db_password' => $this->session_data('dbpassword'), 'db_name' => $this->session_data('dbname'), 'salt' => $this->session_data('site_salt'));
     $filename = dirname(__FILE__) . '/../../user/settings/config.php';
     $config_data = $this->create_mysql_config($data);
     if ($handle = fopen($filename, 'x')) {
         if (fwrite($handle, $config_data)) {
             fclose($handle);
             return true;
         } else {
             $return['message'] = 'Unable to write "' . ipm_htmlentities($filename) . '". Please make sure you create it yourself.';
             $return['success'] = false;
             fclose($handle);
             return $return;
         }
     } else {
         $return['message'] = '"' . ipm_htmlentities($filename) . '" already seems to exist or PHP doesn\'t have write access to its location. Please make sure this file has been created with the correct details.';
         $return['success'] = false;
         return false;
     }
 }
コード例 #2
0
?>
">
				<p>Site Name<br /><input type="text" name="site_name" value="<?php 
echo ipm_htmlentities($ipm_install->form_data('site_name'));
?>
" size="50" /></p>		
				<p>Domain Name<br /><input type="text" name="domain" value="<?php 
echo ipm_htmlentities($ipm_install->form_data('domain', strtolower($_SERVER['SERVER_NAME'])));
?>
" size="50" /></p>		
				<p>Script Path<br /><input type="text" name="script_path" value="<?php 
echo ipm_htmlentities($ipm_install->form_data('script_path', str_replace('/install/site.php', '', strtolower($_SERVER['PHP_SELF']))));
?>
" size="50" /></p>		
				<p>Port Number<br /><input type="text" name="port" value="<?php 
echo ipm_htmlentities($ipm_install->form_data('port', (int) $_SERVER['SERVER_PORT']));
?>
" size="10" /></p>		
				<p>Secure HTTP (recommended, requires SSL certificate)<br />
				<select name="https">
					<option value="0">No</option>
					<option value="1"<?php 
if ($ipm_install->form_data('https') == 1) {
    echo ' selected="selected"';
}
?>
>Yes</option>
				</select></p>

				<div class="right">
					<p class="seperator"><button type="submit" name="next">Next</button></p>
コード例 #3
0
    } else {
        echo 'Fail';
    }
    ?>
</td>
						<td class="centre">Required for Pushover Notifications</td>
					</tr>
				</table>
				
				<?php 
    if ($system_check['pass']) {
        ?>
					<br />
					<div class="right">
						<form method="post" action="<?php 
        echo ipm_htmlentities($_SERVER['REQUEST_URI']);
        ?>
">
							<p class="seperator"><button type="submit" name="next">Next</button></p>
						</form>	
					</div>
				<?php 
    } else {
        ?>
					<br />
					<div class="message">Sorry you cannot install Tickets on this server, please check your system.</div>
				<?php 
    }
    ?>
			
			
コード例 #4
0
" size="50" /></p>		
				<p>Database Name<br /><input autocomplete="off" type="text" name="dbname" value="<?php 
    echo ipm_htmlentities($ipm_install->form_data('dbname'));
    ?>
" size="50" /></p>		
				<p>Database Username<br /><input autocomplete="off" type="text" name="dbusername" value="<?php 
    echo ipm_htmlentities($ipm_install->form_data('dbusername'));
    ?>
" size="50" /></p>		
				<p>Database Password<br /><input autocomplete="off" type="password" name="dbpassword" value="<?php 
    echo ipm_htmlentities($ipm_install->form_data('dbpassword'));
    ?>
" size="50" /></p>		
				
				<p>Site Salt<br /><input autocomplete="off" type="text" name="site_salt" value="<?php 
    echo ipm_htmlentities($ipm_install->form_data('site_salt', ipm_rand_str()));
    ?>
" size="50" /></p>		
				<div class="right">
					<p class="seperator"><button type="submit" name="next">Next</button></p>
				</div>
			</form>
			<?php 
}
?>
			
			<br />
			<p><a href="check_system.php" class="button">Back</a></p>
			
		</div>
	</div>
コード例 #5
0
			<form method="post" action="<?php 
echo ipm_htmlentities($_SERVER['PHP_SELF']);
?>
">
				<p>Name<br /><input type="text" name="admin_name" value="<?php 
echo ipm_htmlentities($ipm_install->form_data('admin_name'));
?>
" size="50" /></p>		
				<p>Email Address (optional)<br /><input type="text" name="admin_email" value="<?php 
echo ipm_htmlentities($ipm_install->form_data('admin_email'));
?>
" size="50" /></p>		

				
				<p>Username<br /><input type="text" name="admin_username" value="<?php 
echo ipm_htmlentities($ipm_install->form_data('admin_username'));
?>
" size="50" /></p>		
				<p>Password<br /><input autocomplete="off" type="password" name="password" value="" size="50" /></p>		
				<p>Password Again<br /><input autocomplete="off" type="password" name="password2" value="" size="50" /></p>		
				
				<div class="right">
					<p class="seperator"><button type="submit" name="next">Install</button></p>
				</div>
			</form>
			
			<br />
			<p><a href="site.php" class="button">Back</a></p>
			
		</div>
	</div>