Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
pepiuox committed Aug 27, 2020
1 parent 839b5a3 commit c61cb6c
Show file tree
Hide file tree
Showing 5 changed files with 392 additions and 60 deletions.
27 changes: 0 additions & 27 deletions announcement.php

This file was deleted.

25 changes: 0 additions & 25 deletions balance.php

This file was deleted.

6 changes: 3 additions & 3 deletions db.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

define('DBHOST', 'localhost');
define('DBUSER', 'user');
define('DBPASS', 'password');
define('DBNAME', 'database_name');
define('DBUSER', 'root');
define('DBPASS', 'truelove');
define('DBNAME', 'login_system');
$link = new mysqli(DBHOST, DBUSER, DBPASS, DBNAME);

/* If connection fails for some reason */
Expand Down
10 changes: 5 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function getID($tble) {
</div>
<div class="w-100">
<?php
$tmpfile = $tble . '.php';
$tmpfile = 'tmp/' . $tble . '.php';
if (file_exists($tmpfile)) {
unlink($tmpfile);
}
Expand Down Expand Up @@ -189,7 +189,7 @@ function getID($tble) {
$nvals = $c->addTPost($tble, $idCol);
$mpty = $c->ifMpty($tble, $idCol);

$tmpfile = $tble . '.php';
$tmpfile = 'tmp/' . $tble . '.php';
$myfile = fopen("$tmpfile", "w") or die("Unable to open file!");
$start = '<?php' . "\n";

Expand All @@ -215,7 +215,7 @@ function getID($tble) {

file_put_contents($tmpfile, $actual);

include $tble . '.php';
include 'tmp/' . $tble . '.php';
//get add form
$c->addItem($tble, $idCol);
?>
Expand Down Expand Up @@ -246,7 +246,7 @@ function getID($tble) {
$ecols = $c->updateData($tble, $idCol);
$mpty = $c->ifMpty($tble, $idCol);

$tmpfile = $tble . '.php';
$tmpfile = 'tmp/' . $tble . '.php';
$myfile = fopen("$tmpfile", "w") or die("Unable to open file!");
$content = '<?php' . "\n";
$content .= '//This is temporal file only for add new row' . "\n";
Expand All @@ -273,7 +273,7 @@ function getID($tble) {

file_put_contents($tmpfile, $actual);

include $tble . '.php';
include 'tmp/' . $tble . '.php';

$c->editItem($tble, $id, $idCol);
?>
Expand Down
Loading

0 comments on commit c61cb6c

Please sign in to comment.