-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerator.php
More file actions
63 lines (55 loc) · 1.88 KB
/
generator.php
File metadata and controls
63 lines (55 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
include_once 'helper/Session.php';
/* if(Session::isSessionEmpty()){
header('Location:index.php');
} */
include_once 'generatorHeader.php';
?>
<html>
<head>
<meta charset="utf-8">
<title>Mysql DB table -> PHP class</title>
<link type="text/css" rel="stylesheet" href="css/bootstrap.css">
<link type="text/css" rel="stylesheet" href="css/mystyle.css">
</head>
<body>
<?php include_once 'title.php' ?>
<div class="pull-left" >
<!-- database list of tables -->
<h3>Database: <strong><em><?=Session::getDBName()?></em></strong></h3>
<p>List of Tables</p>
<ol class="db">
<?php foreach($db->listTables() as $table):?>
<li><a href="" id="table"><?=$table?></a></li>
<?php endforeach;?>
</ol>
<a href="generator.php?db=change">Change Database</a><a href="" id="gen-all" style="float:right;">Generate all</a>
<!-- end database list of tables -->
<!-- list of generated class(es) -->
<h3>Generated Class(es)</h3><span id="label" style="float:right"></span>
<p id="genlist">List of Generated Class(es)</p>
<span class="btn btn-link" id="gen-clear-all">Clear Generated Class(es)</span><a href="generator.php?dl_all=true" id="dl-all" style="margin-left:100px;">Download All</a>
<!-- end list of generated class(es) -->
</div>
<!--right-->
<div class="container pull-right col-md-8">
<div class="panel panel-success">
<div class="panel-heading">
<h3 id="table-name">Table Name</h3>
<a href="" class="download">Download </a>
</div>
<div class="panel-body" style="height:600px;overflow:auto;">
<pre>
<?=ClassGenerator::getGenClassContent(null)?>
</pre>
</div>
</div>
</div>
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/custom-js.js"></script>
</body>
</html>