-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate.php
More file actions
31 lines (29 loc) · 765 Bytes
/
Copy pathgenerate.php
File metadata and controls
31 lines (29 loc) · 765 Bytes
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
<?php
include_once('lib/head.php');
include_once('lib/include.php');
?>
<body>
<?php include_once('lib/navbar.php');?>
<?php
$CONFIG = db_quote($_POST['CONFIG']);
/* Get the config file and replace the variables */
$result = db_query("SELECT * FROM `template` WHERE `name` LIKE $CONFIG");
while($row = mysqli_fetch_assoc($result)){
$source = $row['config'];
$text = strtr($source, $_POST);
}
?>
<!-- Page Content -->
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="well">
<button onclick="copyToClipboard('#config')" class="btn btn-block btn-success">Copy Config</button>
<p id="config"><?php echo nl2br ("$text");?></p>
</div>
</div>
</div>
</div>
<!-- Page Content end here -->
</body>
</html>