clean
This commit is contained in:
44
.hta_slug/_home.php
Normal file
44
.hta_slug/_home.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
require_once('.hta_config/db_config.php');
|
||||
require_once('.htac_header.php');
|
||||
?>
|
||||
|
||||
<section class="diZContainer diZmxAuto diZmb20">
|
||||
<h1 class="diZBorderBottom">SiliconPin - Tools</h1>
|
||||
<div class="diZFlexRow diZmy8 diZFlexRow diZOverflowAuto diZWhiteSpaceNowrap">
|
||||
<a href="/tools" class="diZButtonDefault diZmr2"><span>All</span></a>
|
||||
<a href="/tools/image" class="diZButtonDefault diZmr2"><span>Image</span></a>
|
||||
<a href="/tools/text" class="diZButtonDefault diZmr2"><span>Text</span></a><br>
|
||||
<a href="/tools/html" class="diZButtonDefault diZmr2"><span>HTML</span></a>
|
||||
<a href="/tools/color" class="diZButtonDefault diZmr2"><span>Color</span></a>
|
||||
<a href="/tools/info" class="diZButtonDefault diZmr2"><span>Info</span></a>
|
||||
<a href="/tools/encrypt-decrypt" class="diZButtonDefault diZmr2"><span>Encrypt / Decrypt</span></a>
|
||||
</div>
|
||||
<div class="diZGridCols1-3">
|
||||
<?php
|
||||
try {
|
||||
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$stmt = $conn->prepare("SELECT * FROM api_tools");
|
||||
$stmt->execute();
|
||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
// var_dump($rows);
|
||||
foreach($rows as $row){
|
||||
// echo $row['name'].'<br>';
|
||||
if($row['status']==1){
|
||||
$link_button = '<a class="diZButtonDefault" href="/tools/'.$row['slug'].'" ><span class="">'.$row['name'].'</span></a>';
|
||||
} else{
|
||||
$link_button = '<a class="diZButtonDefault"><span>'.$row['name'].'</span></a>';
|
||||
}
|
||||
echo '
|
||||
<div class="diZblogStyle diZPadding10px">
|
||||
<p class="diZLineClamp2 diZTextJustify diZToolsContentHeight" >'.$row['description'].'</p>
|
||||
'.$link_button.'
|
||||
</div>';
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
$in_page_message = "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user