Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VMS-SUEE_2.0
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eric Laufer
VMS-SUEE_2.0
Commits
a4d58eaf
There was an error fetching the commit references. Please try again later.
Commit
a4d58eaf
authored
6 years ago
by
Eric Laufer
Browse files
Options
Downloads
Patches
Plain Diff
Update index.php
parent
73e0c873
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install/index.php
+10
-96
10 additions, 96 deletions
install/index.php
with
10 additions
and
96 deletions
install/index.php
+
10
−
96
View file @
a4d58eaf
<center>
<center>
<?php
<?php
error_reporting
(
E_ALL
);
error_reporting
(
E_ALL
);
...
@@ -9,107 +8,22 @@ require('../lib/functions.lib.php');
...
@@ -9,107 +8,22 @@ require('../lib/functions.lib.php');
if
(
isset
(
$_POST
[
'datenbank_anlegen'
])){
if
(
isset
(
$_POST
[
'datenbank_anlegen'
])){
$inhalt
=
'
$inhalt
=
'
<?php
<?php
$db_host = "'
.
$_POST
[
'host'
]
.
'";
define("DB_HOST","'
.
$_POST
[
'host'
]
.
'");
// Mysql User
define("DB_USER","'
.
$_POST
[
'nutzername'
]
.
'");
$db_user = "'
.
$_POST
[
'nutzername'
]
.
'";
define("DB_PASS","'
.
$_POST
[
'passwort'
]
.
'");
// Mysql PW
define("DB_BASS","'
.
$_POST
[
'db'
]
.
'");
$db_pass = "'
.
$_POST
[
'passwort'
]
.
'";
// Datenbank
$db_base = "'
.
$_POST
[
'db'
]
.
'";
//Datenbank Prefix
$db_prefix = "'
.
$_POST
[
'prefix'
]
.
'";
//Passwort zusatz
define("PREFIX","'
.
$_POST
[
'prefix'
]
.
'");
$pw_zusatz = "'
.
create_code
(
5
)
.
'";
// Verschlsselungspasswort
$ver_schluessel = "'
.
create_code
(
16
)
.
'";
//Datenbankverbindung herstellen
function db_connect(){
global $sql_open,$db_host,$db_user, $db_pass, $db_base;
$sql_open = @mysqli_connect($db_host, $db_user, $db_pass, $db_base);
}
function db_close(){
global $sql_open;
mysqli_close($sql_open);
}
/**
* db_connect()
*
* @author designerscripte.net
* @category system Database
* @version 2.5.0
* @example db_query("SELECT `field` FROM `table` WHERE `field` = `value` ");
* @param mixed $sql_tag
* @return 0 bei Fehler Mysql_resource.
*
*/
function db_query($sql_tag) {
global $count_query,$sql_open;
$count_query++;
$fargs = func_get_args();
if (!empty($fargs)) {
//Passwort zusatz
$vargs = array();
define("PW_ZUSATZ","'
.
create_code
(
5
)
.
'");
foreach($fargs as $key => $arg) {
$vargs[$key] = mysqli_real_escape_string($sql_open,$arg);
}
array_shift($vargs);
if (!empty($vargs))$sql_tag = vsprintf($sql_tag, $vargs);
}
if ($ret = mysqli_query($sql_open,$sql_tag)) {
return $ret;
}else {
return 0;
}
}
function pw_erstellen($pw){
global $pw_zusatz;
$pw_er = hash("sha256",$pw.$pw_zusatz);
return $pw_er;
}
/**
* db_close()
*
* @author designerscripte.net
* @category system Database
* @version 2.5.0
* @example db_close();
* @return die(\'\'); bei fehler nichts bei erfolg
*/
function db_close() {
global $sql_open;
@mysqli_close($sql_open) or die(\'Konnte die Verbindung mit Datenbank nicht schliessen!\');
}
db_connect();
// Verschlsselungspasswort
$daten = mysqli_fetch_array(db_query("SELECT domain,seitenname,waehrung,betreibermail,cron_pw FROM ".$db_prefix."_seitenkonfig "));
define("VER_SCHLUESSEL","'
.
create_code
(
16
)
.
'");
// Domain (ohne Slash am Ende)
$domain = $daten[\'domain\'];
// Seitenname
$seitenname = $daten[\'seitenname\'];
// Seitenwhrung
$waehrung = $daten[\'waehrung\'];
// ID vom Admin
$admin_id = 1;
// Adminmail
$betreibermail = $daten[\'betreibermail\'];
// Passwort fr Crons
$cron_pw = $daten[\'cron_pw\'];
// beliebiger Alphanumerischer String hilft beim Schutz vor Autoklickern
$percode = \'551c3d4318d668cc2b00d02b40d1e6cd282817c2be65d401ed0cff2e6b\';
/* Globale Variablen nichts ndern */
$ip = $_SERVER[\'REMOTE_ADDR\'];
db_close();
?>
?>
'
;
'
;
$datei
=
fopen
(
"../lib/d
atenbank.inc
.php"
,
"w"
);
$datei
=
fopen
(
"../lib/d
b_config
.php"
,
"w"
);
fwrite
(
$datei
,
$inhalt
,
100000
);
fwrite
(
$datei
,
$inhalt
,
100000
);
fclose
(
$datei
);
fclose
(
$datei
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment