forked from serphacker/serposcope
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql prefix handling
- Loading branch information
serphacker
committed
Mar 23, 2013
1 parent
c35150c
commit 0fce70c
Showing
23 changed files
with
656 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
/docs/ | ||
/tests/ | ||
/demo/ | ||
/modules/Test/ | ||
/modules/Test/ | ||
/inc/config_1.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
|
||
$incdir=dirname(dirname($_SERVER['SCRIPT_FILENAME'])."..")."/inc/"; | ||
|
||
|
||
function h8($str){ | ||
return htmlentities($str, ENT_QUOTES, "UTF-8"); | ||
} | ||
|
||
include('../inc/define.php'); | ||
include('install-inc/db.php'); | ||
|
||
ini_set("default_charset", 'utf-8'); | ||
|
||
function check_db_co($host,$login,$pass,$db){ | ||
return @mysql_connect($host, $login, $pass) && @mysql_select_db($db) && @mysql_query("set names 'utf8'"); | ||
} | ||
|
||
if(isset($_GET['do'])){ | ||
if($_GET['do'] === "info"){ | ||
die(phpinfo()); | ||
} | ||
} | ||
?> | ||
<html> | ||
<head> | ||
<title>Serposcope installer</title> | ||
<meta name="robots" content="noindex"> | ||
<link href="../lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | ||
<style> | ||
.container-narrow { | ||
margin: 0 auto; | ||
max-width: 700px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="masthead"> | ||
<div class="pull-right" > | ||
<b>PHP version : <?php echo phpversion(); ?></b> | ||
<a href='?do=info' >phpinfo</a> | ||
</div> | ||
<h3><a href='?step=1' class="muted" >Serposcope Installer</a></h3> | ||
</div> | ||
|
||
<hr/> | ||
<div style='text-align:center;' ><h4>Before updating be sure to have done a SQL backup of your serposcope DB</h4></div> | ||
<hr/> | ||
|
||
<div> | ||
<?php | ||
|
||
if(file_exists($incdir."/config.php")){ | ||
|
||
// echo "<h3>Installation done !</h3>"; | ||
// echo "<a href='".dirname(dirname($_SERVER['PHP_SELF'])."..")."' >Go ninja go</a><br/><br/>"; | ||
echo "For security purpose, if you want to reinstall or upgrade the current installation, you must first remove <code>inc/config.php</code>.<br/>"; | ||
}else{ | ||
|
||
if(!isset($_GET['step']) || !is_numeric($_GET['step'])){ | ||
$_GET['step'] = 1; | ||
} | ||
echo '<div style="text-align:center" ><h2>Step '.$_GET['step'].'</h2></div>'; | ||
@include("step/step".intval($_GET['step']).".php"); | ||
|
||
} | ||
?> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.