Xataface  2.0alpha2
Xataface Application Framework
 All Data Structures Namespaces Files Functions Variables Groups Pages
db2app.inc.php
Go to the documentation of this file.
1 <?php include 'install'.DIRECTORY_SEPARATOR.'install_header.inc.php';?>
2 <h2><img src="images/preferences-system-windows.png"/> Create Application from Existing Database</h2>
3 <p>This form allows you to create a Dataface user interface for an existing MySQL database.</p>
4 
5 <form <?php echo $context['attributes'];?>>
6  <?php echo $context['javascript'].$context['hidden'];?>
7 
8  <div class="errors">
9  <?php if (count($context['errors']) > 0):?>
10  <ul>
11  <?php foreach ($context['errors'] as $err):?>
12  <?php echo $err;?>
13  <?php endforeach; ?>
14  </ul>
15  <?php endif;?>
16 
17 
18 
19  <div id="step1"><h3>Step 1: Select database</h3>
20  <p>Please select that database for which you wish to build a Xataface application.</p>
21 
22  <div><?php echo $context['elements']['database_name']['html'];?></div>
23  </div>
24 
25 
26  <div id="step2" style="display:none"><h3>Step 2: Enter Database Connection Info</h3>
27 
28  <p>Please enter the connection information that resulting Xataface application will
29  use to connect to the database.</p>
30 
31  <table>
32 
33  <tr><td>MySQL Username</td><td><?php echo $context['sections']['db_info']['elements']['mysql_user']['html'];?></td></tr>
34 
35  <tr><td>MySQL Password</td><td><?php echo $context['sections']['db_info']['elements']['mysql_password']['html'];?></td></tr>
36 
37  </table>
38  <input type="button" onclick="testdb(document.getElementById('db2app'));return false;" value="Test DB Connection" /><div id="db-test-results" ></div>
39 
40  <div>If database connection info is correct, <input type="button" onclick="document.getElementById('step3').style.display='';return false;" value="proceed to next step" /></div>
41 
42  </div>
43 
44 
45  <div id="step3" style="display:none"><h3>Step 3: Select Installation Type</h3>
46 
47  <p>You can either install the application directly on your web server (requires FTP
48  connection information), or download the application as a tar archive, so that you
49  can install it on your server manually.</p>
50 
51  <p>Please select your preferred method of installation:
52 
53  <?php echo $context['sections']['db_info']['elements']['install_type']['html'];?></p>
54 
55  </div>
56 
57 
58  <div id="step4" style="display:none"><h3>Step 4: FTP Connection Details</h3>
59 
60  <p>In order to install the application on your web server, Xataface needs to know
61  the FTP connection details to connect to the server. This is because Xataface
62  will make an FTP connection to your web server and copy the application directly
63  to a directory of your choosing.</p>
64 
65  <fieldset>
66  <legend>FTP Connection Info</legend>
67  <table>
68  <?php $f =& $context['sections']['ftp_info']['elements']; ?>
69  <tr><td>Host</td><td><?php echo $f['ftp_host']['html'];?> Use SSL: <?php echo $f['ftp_ssl']['html'];?></td><td class="instructions">e.g. weblite.ca</td></tr>
70 
71  <tr><td valign="top">Path</td><td><?php echo $f['ftp_path']['html'];?>
72  <div class="instructions">This should be the parent directory of your application. Your application will be created in a directory of the same name as the database. E.g. If your database is named <em>my_db</em> and you enter path <em>/var/www</em> in this field, then this installer will create the directory <em>/var/www/my_db</em> for your application.</div>
73 
74  </td><td valign="top" class="instructions">e.g. /var/www </td></tr>
75 
76  <tr><td>Username</td><td><?php echo $f['ftp_username']['html'];?></td><td></td></tr>
77 
78  <tr><td>Password</td><td><?php echo $f['ftp_password']['html'];?></td><td></td></tr>
79 
80  </table>
81 
82  <p><input type="button" onclick="testftp(document.getElementById('db2app')); return false;" value="Test FTP Connection" />Test FTP Connection</p>
83  <div id="ftp-test-results"></div>
84  <p>If FTP connection info is correct, <input type="button" onclick="document.getElementById('submitstep').style.display='';return false;" value="proceed to next step" /></p>
85  </fieldset>
86  </div>
87 
88  <div id="submitstep" style="text-align:center; display:none"><?php echo $f['submit']['html'];?></div>
89 
90 </form>
91 
92 <?php include 'install'.DIRECTORY_SEPARATOR.'install_footer.inc.php';?>