Файл: Kagao-v3.0/upload/install.php
Строк: 211
<?php
error_reporting(0);
require('classes/config.php');
include "inc/db.php";
function check_path($e){
$chmod = substr(sprintf('%o', fileperms($e)), -4);
if( $chmod == '0777' ){
?><font style="color:green">Perfect!</font><?php
}else{
?><font style="color:red">Fail! <br />CHMOD: <?php echo $chmod; ?></font><?php
}
}
function checkdb(){
$connect = mysql_connect(db_host, db_user, db_pass);
if( mysql_select_db(db_name, $connect) ){
echo '<font style="color:green">Connection to database was successful.</font><br><br><br>
<a href="classes/assets/install/"><div class="myButton">Install database now!</div></a>';
}else{
echo '<font style="color:red">Connection failed! Please open the file "classes/config.php" and insert at Line 16 your Database "username, password and Database name".</font>';
}
}
?>
<!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" />
<link rel="stylesheet" href="tpl/cdn/v1/anVuMTEyMQ==.css" media="screen" />
<title>Install Kogao</title>
</head>
<body style="margin:0; background:#222 url(http://kogaoscript.com/templates/img/help/_bg_1.png) center repeat-x; font-family:Open Sans; font-size:16px;">
<style type="text/css">
.myButton {
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
box-shadow:inset 0px 1px 0px 0px #ffffff;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9));
background:-moz-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%);
background:-webkit-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%);
background:-o-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%);
background:-ms-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%);
background:linear-gradient(to bottom, #f9f9f9 5%, #e9e9e9 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9',GradientType=0);
background-color:#f9f9f9;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
border:1px solid #dcdcdc;
display:inline-block;
cursor:pointer;
color:#666666;
font-family:Arial;
font-size:15px;
font-weight:bold;
padding:6px 24px;
text-decoration:none;
text-shadow:0px 1px 0px #ffffff;
}
.myButton:hover {
background-color:#fff;
background:#fff;
}
.myButton:active {
position:relative;
top:1px;
}
</style>
<div style="float:left; width:100%;">
<div style="position:relative; margin:0 auto; width:700px; margin-top:30px;">
<div style="float:left; width:100%; border:1px solid #e2e2e2; background:#fff; box-shadow:0 0 0 10px rgba(0,0,0,.3); border-radius:3px;">
<div style="float:left;">
<div style="padding:30px; float:left;">
<div style="float:left;"><img src="tpl/img/_/logo_.png" /></div>
<div style="float:left; font-weight:bold; clear:both; padding-top:20px;">Installation</div>
<div style="float:left; clear:both; font-size:14px; color:#666;">Welcome to the Kogao Installation</div>
<?php if(empty($_GET['step'])){ ?>
<div style="float:left; clear:both; font-size:14px; color:#666; padding-top:50px;">
Step 1: Set folders to CHMOD777
</div>
<div style="float:left; clear:both; padding-top:20px; padding-bottom:30px;">
<div style="float:left; clear:both; padding-bottom:10px;">
<div style="float:left; width:100px;">Folder</div>
<div style="float:left; width:400px;">/tmp/</div>
<div style="float:left;"><?php echo check_path('tmp'); ?></div>
</div>
<div style="float:left; clear:both; padding-bottom:10px;">
<div style="float:left; width:100px;">Folder</div>
<div style="float:left; width:400px;">/tpl/uploads/banner/</div>
<div style="float:left;"><?php echo check_path('tpl/upload/banner'); ?></div>
</div>
<div style="float:left; clear:both; padding-bottom:10px;">
<div style="float:left; width:100px;">Folder</div>
<div style="float:left; width:400px;">/tmp/image/</div>
<div style="float:left;"><?php echo check_path('tmp/image'); ?></div>
</div>
<div style="float:left; clear:both; padding-bottom:10px;">
<div style="float:left; width:100px;">Folder</div>
<div style="float:left; width:400px;">/tmp/m/</div>
<div style="float:left;"><?php echo check_path('tmp/m'); ?></div>
</div>
<div style="float:left; clear:both; padding-bottom:10px;">
<div style="float:left; width:100px;">Folder</div>
<div style="float:left; width:400px;">/tpl/upload/</div>
<div style="float:left;"><?php echo check_path('tpl/upload'); ?></div>
</div>
<div style="float:left; clear:both; padding-bottom:10px;">
<div style="float:left; width:100px;">Folder</div>
<div style="float:left; width:400px;">/tpl/img/_/</div>
<div style="float:left;"><?php echo check_path('tpl/img/_'); ?></div>
</div>
<div style="float:left; clear:both; padding-bottom:10px;">
<div style="float:left; width:100px;">File</div>
<div style="float:left; width:400px;">/tpl/assets/css/autoload.css</div>
<div style="float:left;"><?php echo check_path('tpl/assets/css/autoload.css'); ?></div>
</div>
</div>
</div>
<div style="float:left; clear:both; padding:20px 30px; width:640px; background:#f5f5f5;"><div style="float:right;">
<a href="?step=2"><div class="myButton">Go to Step 2</div></a></div>
</div>
<?php } ?>
<?php if($_GET['step'] == 2){ ?>
<div style="float:left; clear:both; font-size:14px; color:#666; clear:both; padding-top:50px;">
Step 2: Setup the database settings and settings
</div>
<div style="float:left; clear:both; padding-top:20px; font-size:14px; padding-bottom:30px;">
<div style="float:left; clear:both;">
<ul>
<b>Database settings</b>
<li>Open the Config-file "classes/config.php"</li>
<li>Go to line "16". Please insert your Database user, password and Database name</li>
</ul>
</div>
<div style="float:left; clear:both;">
<ul>
<b>Settings</b>
<li>Open the file "classes/config.php"</li>
<li>Go to line "8". Insert your Domain into base_url 'http://domain.com/'</li>
<li>Go to line "22". Insert your Newsletter-Mail news_email 'mail@domain.com'</li>
<li>Go to line "35". Here you can update the E-Mail Configs for register and send message to a user from ad.</li>
</ul>
</div>
</div>
</div>
<div style="float:left; clear:both; padding:20px 30px; width:640px; background:#f5f5f5;"><div style="float:right;">
<a href="?step=3"><div class="myButton">Go to Step 3</div></a></div>
</div>
<?php } ?>
<?php if($_GET['step'] == 3){ ?>
<div style="float:left; clear:both; font-size:14px; color:#666; clear:both; padding-top:50px;">
Step 3: Test connection to database
</div>
<div style="float:left; clear:both; padding-top:20px; font-size:14px; padding-bottom:30px;">
<?php echo checkdb(); ?>
</div>
</div>
<?php } ?>
<?php if($_GET['step'] == 4){ ?>
<div style="float:left; clear:both; font-size:14px; color:#666; clear:both; padding-top:50px;">
Step 4: Installation complete follow the last steps
</div>
<div style="float:left; clear:both; padding-top:20px; font-size:14px; padding-bottom:30px;">
<ul>
<li>Database was installed</li>
<li>Delete the "install.php" and the folder "classes/assets/install/" from your server.</li>
<li>Your first Admin-Login
<ul>
<li>Username/E-Mail: admin</li>
<li>Password: admin</li>
<li>Tipp: Change the password after login on "profile settings"</li>
</ul>
</li>
<li>Help & Contact to us on: <a href="http://kogaoscript.com/help" target="_blank">http://kogaoscript.com/help</a></li>
</ul>
</div>
<div style="float:left; clear:both; padding-top:20px; font-size:14px; color:#666;">
Thanks for install Kogao.
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</body>
</html>