Skip to content
Closed

30 #70

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ce63dd2
Set APP_KEY in .env.example
pro-makeen Oct 27, 2025
9086d3e
Atualizar o .env.example
pro-makeen Oct 27, 2025
21efc3b
Add files via upload
pro-makeen Oct 27, 2025
c967fd1
Add files via upload
pro-makeen Oct 27, 2025
2ca9168
Atualizar o index.html
pro-makeen Oct 27, 2025
138653c
Add PHP echo for 'Hello World' in index.html
pro-makeen Oct 27, 2025
ef847c4
Atualizar o index.html
pro-makeen Oct 27, 2025
c570db4
Add files via upload
pro-makeen Oct 28, 2025
63266af
Add files via upload
pro-makeen Oct 28, 2025
c4db0a2
Delete public/customer/logos directory
pro-makeen Oct 28, 2025
776d9c9
Delete public/logos directory
pro-makeen Oct 28, 2025
4a3fb7c
Add files via upload
pro-makeen Oct 28, 2025
6cb3b65
teste
pro-makeen Oct 28, 2025
45185a9
Delete .vscode directory
pro-makeen Oct 28, 2025
6b2894d
teste45
pro-makeen Oct 28, 2025
ea1a816
teste d eupadte
pro-makeen Oct 28, 2025
65238e1
remove the php teste
pro-makeen Oct 28, 2025
9a67fd9
upadte index
pro-makeen Oct 28, 2025
7190f30
index with public folder
pro-makeen Oct 28, 2025
c6154dc
jason
pro-makeen Oct 29, 2025
d1de566
30
pro-makeen Oct 29, 2025
a1168f9
31
pro-makeen Oct 29, 2025
fb5b8ce
32
pro-makeen Oct 29, 2025
7ae4c57
Add GitHub Actions workflow for PHP Composer
pro-makeen Oct 29, 2025
414cb45
30
pro-makeen Oct 29, 2025
ade954f
Add files via upload
pro-makeen Oct 30, 2025
cd4738d
Delete public/customer/logos directory
pro-makeen Oct 30, 2025
e70cc0d
Add files via upload
pro-makeen Oct 30, 2025
be528fe
Delete public/index1.html
pro-makeen Oct 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=pgsql
DB_HOST=localhost
DB_PORT=5432
DB_DATABASE=your_database_name
DB_USERNAME=homestead
DB_PASSWORD=secret

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
39 changes: 39 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PHP Composer

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

# - name: Run test suite
# run: composer run-script test
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"bianxianyang.htmlplay"
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"master"
]
}
74 changes: 74 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Apache2 Ubuntu Default Page: It works</title>
<style type="text/css" media="screen">
* {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}

body, html {
padding: 3px 3px 3px 3px;

background-color: #D8DBE2;

font-family: Ubuntu, Verdana, sans-serif;
font-size: 11pt;
text-align: center;
}

div.main_page {
position: relative;
display: table;

width: 800px;

margin-bottom: 3px;
margin-left: auto;
margin-right: auto;
padding: 0px 0px 0px 0px;

border-width: 2px;
border-color: #212738;
border-style: solid;

background-color: #FFFFFF;

text-align: center;
}

div.page_header {
height: 180px;
width: 100%;

background-color: #ffffff;
}


</style>
</head>
<body>
<div class="main_page">
<div class="page_header floating_element">
<div>

<br><br>
<img src="/public/customer/logos/makeen_logo.png" alt="MAKEEN ENERGY LOGO"
width="350"
height="100">

<br><br>
<span style="margin-top: 1.5em;" class="floating_element">
</span>
</div>
<div class="banner">
<p></p>
<div id="about"></div>
Render is runnig!
</div>
</div>
</body>
</html>
93 changes: 93 additions & 0 deletions public/cyl/cyl_add.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Add LPG Cylinder</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
#qr-reader {
width: 100%;
max-width: 600px;
margin: auto;
}
@media (max-width: 600px) {
#qr-reader {
width: 100%;
}
}
</style>
</head>

<body>
<img src="/customer/logos/makeen_logo.png" alt="MAKEEN ENERGY LOGO"
width="350"
height="100">
<h1>New LPG Cylinder</h1>
<div id="qr-reader"></div>
<div id="qr-reader-results"></div>
<!-- <script src="https://unpkg.com/html5-qrcode"></script>-->
<script src="../scripts/html5-qrcode.js"></script>
<script src="../scripts/script.js"></script>

<p></p>

<form action="submit.php" method="POST">

<label id="scanner_QR">Tag information:</label><br>
<input id="tag_txt_value" type="text" name="tag" size="40" readonly required value=""><br><br>

<label id="code">QR Code:</label><br>
<input id="serial_qr_code" type="text" name="qrcode" readonly required value="">
<button onclick="updateLastElement()">Get QR code</button><br><br>

<label for="serial">Serial:</label><br>
<input type="text" name="serial" required><br><br>

<label for="brand">Brand:</label><br>
<input type="text" name="brand" required><br><br>

<label for="year">Manufacture Year:</label><br>
<input type="number" name="year" required><br><br>

<label for="year_insp">Inspection Year:</label><br>
<input type="number" name="year_insp" required><br><br>

<label for="tare">Tare:</label><br>
<input type="number" name="tare" required><br><br>

<label for="net">Net:</label><br>
<input type="number" name="net" required><br><br>

<label for="type">Type:</label><br>
<input type="number" name="type" required><br><br>

<label for="gas">Gas:</label><br>
<input type="number" name="gas" required><br><br>

<label for="valve">Valve:</label><br>
<input type="number" name="valve" required><br><br>

<label for="owner">Owner:</label><br>
<input type="number" name="owner" required><br><br>

<label for="device">Device:</label><br>
<input type="text" name="device" required><br><br>

<label for="operator">Operator:</label><br>
<input type="test" name="operator" required><br><br>

<input type="submit" value="Add Cylinder">
</form>

<script>
function updateLastElement(){
let text = document.getElementById("tag_txt_value").value.trim();
let parts = text.split("?id=");
let last = parts.length > 0 ? parts[parts.length - 1 ] : "not found";
document.getElementById("serial_qr_code").value = last;
}
</script>

<br><a href="cyl_list.php">View All LPG Cylinders</a>
</body>
</html>
85 changes: 85 additions & 0 deletions public/cyl/cyl_list.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?php
include __DIR__ . "/../connector/connection.php";
//$path = $_SERVER['DOCUMENT_ROOT'];
//$path .= "/customer/postgres/connection.php";
//include_once($path);

// Connect to database

$conn = pg_connect("host=$host dbname=$dbname user=$user password=$password");

if (!$conn) {
die("Database connection failed: " . pg_last_error());
}

// Fetch students
//$query = "SELECT * FROM student ORDER BY id ASC";
$query = "SELECT * FROM lpg_cylinder_basic_data";
$result = pg_query($conn, $query);
?>

<!DOCTYPE html>
<html>
<head>
<title>LPG Cylinder Basic Data</title>
</head>
<body>
<img src="/customer/logos/makeen_logo.png" alt="MAKEEN ENERGY LOGO"
width="350"
height="100">
<h1>LPG Cylinder Basic Data</h1>
<table border="1" cellpadding="8">
<tr>
<th>ID</th>
<th>Date</th>
<th>Time</th>
<th>Tag</th>
<th>Qr Code</th>
<th>Serial</th>
<th>Brand</th>
<th>Production Year</th>
<th>Inspection Year</th>
<th>Tare</th>
<th>Net</th>
<th>Type</th>
<th>Gas</th>
<th>Valve</th>
<th>Owner</th>
<th>Device</th>
<th>Operator</th>
</tr>

<?php
if (pg_num_rows($result) > 0) {
while ($row = pg_fetch_assoc($result)) {
echo "<tr>
<td>{$row['id']}</td>
<td>{$row['date']}</td>
<td>{$row['time']}</td>
<td>{$row['tag']}</td>
<td>{$row['qrcode']}</td>
<td>{$row['serial']}</td>
<td>{$row['brand']}</td>
<td>{$row['year']}</td>
<td>{$row['year_insp']}</td>
<td>{$row['tare']}</td>
<td>{$row['net']}</td>
<td>{$row['type']}</td>
<td>{$row['gas']}</td>
<td>{$row['valve']}</td>
<td>{$row['owner']}</td>
<td>{$row['device']}</td>
<td>{$row['operator']}</td>
</tr>";
}
} else {
echo "<tr><td colspan='4'>No LPG cylinders found.</td></tr>";
}

pg_close($conn);
?>
</table>
<br>
<a href="cyl_add.html">← Add New LPG Cylinder</a>
</body>
</html>
Loading