Advertisement
Guest User

Untitled

a guest
Jan 7th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 26.22 KB | None | 0 0
  1. <?php
  2. ob_start();
  3. session_start();
  4. include("includes/functions.php");
  5.  
  6. $step = protect($_GET['step']);
  7.  
  8. if ($step == 1) {
  9. ?>
  10. <!DOCTYPE html>
  11. <html lang="en">
  12. <head>
  13.     <meta charset="utf-8">
  14.     <title>Step 2 • Install Vanguard Marketplace</title>
  15.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  16.     <meta name="description" content="Install Vanguard Multi-Vendor">
  17.     <meta name="author" content="Vanguard">
  18.    
  19.     <!-- Stylesheets -->
  20.     <link rel="stylesheet" href="static/gen/css/icon.min.css">
  21.     <link rel="stylesheet" href="static/gen/css/semantic.min.css">
  22.     <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  23.     <link rel="stylesheet" href="static/gen/css/animate.min.css">
  24.     <!-- End Stylesheets -->
  25.  
  26.     <!-- Icon/Favicon -->
  27.     <link rel="icon" type="image/png" href="static/favicons/favicon.png" />
  28.     <!-- End Icon/Favicon -->
  29.    
  30.     <!-- Styles perso -->
  31.     <style type="text/css">
  32.         body {
  33.             background-color: #edeff0;
  34.         }
  35.        
  36.         .ui.menu .item img.logo {
  37.             margin-right: 1.3em;
  38.         }
  39.        
  40.         .main.container {
  41.             margin-top: 7em;
  42.         }
  43.        
  44.         .wireframe {
  45.             margin-top: 2em;
  46.         }
  47.        
  48.         .ui.footer.segment {
  49.             margin: 5em 0em 0em;
  50.             padding: 5em 0em;
  51.         }
  52.  
  53.     </style>
  54.     <!-- End Styles perso -->
  55. </head>
  56. <body>
  57.     <!-- HEADER START -->
  58.     <div class="ui fixed menu">
  59.         <div class="ui container">
  60.             <div class="header item">
  61.                 <h2>Vanguard</h2>
  62.             </div>
  63.             <div class="right item">
  64.                 <a href="https://demo.squamifer.ovh/vanguard/" class="ui positive button" target="_blank">Support</a>
  65.             </div>
  66.         </div>
  67.     </div>
  68.     <!-- HEADER END -->
  69.     <!-- BODY START -->
  70.     <div class="ui main container animated fadeIn">
  71.         <div class="ui three top attached ordered steps">
  72.             <div class="completed step">
  73.                 <div class="content">
  74.                     <div class="title">Introduction</div>
  75.                     <div class="description">Informations before installation</div>
  76.                 </div>
  77.             </div>
  78.             <div class="active step">
  79.                 <div class="content">
  80.                     <div class="title">Installation</div>
  81.                     <div class="description">Configure your MySQL and Personal settings</div>
  82.                 </div>
  83.             </div>
  84.             <div class="disabled step">
  85.                 <div class="content">
  86.                     <div class="title">Success</div>
  87.                     <div class="description">Checking parameters</div>
  88.                 </div>
  89.             </div>
  90.         </div>
  91.         <div class="ui attached padded segment">
  92.         <?php
  93.             if (isset($_POST['do_install'])) {
  94.             $mysql_host = protect($_POST['mysql_host']);
  95.             $mysql_user = protect($_POST['mysql_user']);
  96.             $mysql_pass = protect($_POST['mysql_pass']);
  97.             $mysql_db = protect($_POST['mysql_db']);
  98.             $title = protect($_POST['title']);
  99.             $description = protect($_POST['description']);
  100.             $keywords = protect($_POST['keywords']);
  101.             $url = protect($_POST['url']);
  102.             $usern = protect($_POST['usern']);
  103.             $passwd = protect($_POST['passwd']);
  104.             $email = protect($_POST['email']);
  105.             $contact_email = protect($_POST['contact_email']);
  106.             $sitename = protect($_POST['sitename']);
  107.             $currency = protect($_POST['currency']);
  108.             $paypal_email = protect($_POST['paypal_email']);
  109.             $main_folder_name = protect($_POST['main_folder_name']);
  110.             $home_title = protect($_POST['home_title']);
  111.             $home_desc = protect($_POST['home_desc']);
  112.             $footer_text = protect($_POST['footer_text']);
  113.  
  114.                 if (empty($mysql_host) or empty($mysql_user) or empty($mysql_pass) or empty($mysql_db) or empty($title) or empty($description) or empty($keywords) or empty($main_folder_name) or empty($home_title) or empty($home_desc) or empty($footer_text) or empty($sitename) or empty($url) or empty($usern) or empty($passwd) or empty($email) or empty($contact_email)) { echo error("Error! All fields are required."); }
  115.                 elseif(!isValidUsername($usern)) { echo error('<div class="ui icon error message"><i class="checkmark icon"></i><div class="content"><div class="header">Error!</div><p>Please enter valid username.</p></div></div>'); }
  116.                 elseif(!isValidURL($url)) { echo error('<div class="ui icon error message"><i class="checkmark icon"></i><div class="content"><div class="header">Error!</div><p>Please enter valid website address.</p></div></div>'); }
  117.                 elseif(!isValidEmail($email)) { echo error('<div class="ui icon error message"><i class="checkmark icon"></i><div class="content"><div class="header">Error!</div><p>Please enter valid e-mail address.</p></div></div>'); }
  118.                 else {
  119.  
  120.                     $db = new PDO('mysql:host='. $mysql_host .';dbname='. $mysql_db, $mysql_user, $mysql_pass, [PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"]);
  121.  
  122.                     if ($db) {
  123.  
  124.                         $sql_filename = 'sql.sql';
  125.                         $sql_contents = file_get_contents($sql_filename);
  126.                         $sql_contents = explode(";", $sql_contents);
  127.  
  128.                         foreach($sql_contents as $k=>$v) {
  129.                             $db->exec($v);
  130.                         }
  131.  
  132.                         $insert = $db->prepare("INSERT vanguard_settings (title,description,keywords,sitename,email,contact_email,url,main_folder_name,earnings,home_title,home_desc,footer_text,reg_quota,mem_quota) VALUES (?,?,?,?,?,?,?,?,'0',?,?,?,'10','10')");
  133.                         $insert->execute(array($title,$description,$keywords,$sitename,$email,$contact_email,$url,$main_folder_name,$home_title,$home_desc,$footer_text));
  134.                         $passwd = md5($passwd);
  135.                         $insert = $db->prepare("INSERT vanguard_users (usern,passwd,email,role,status,quotas) VALUES (?,?,?,'1','0','100000')");
  136.                         $insert->execute(array($usern,$passwd,$email));
  137.                         mkdir($main_folder_name);
  138.  
  139.                         $current .= '<?php
  140.                        ';
  141.                         $current .= '$sql["driver"] = "mysql";
  142.                        ';
  143.                         $current .= '$sql["host"] = "'.$mysql_host.'";
  144.                        ';
  145.                         $current .= '$sql["user"] = "'.$mysql_user.'";
  146.                        ';
  147.                         $current .= '$sql["pass"] = "'.$mysql_pass.'";
  148.                        ';
  149.                         $current .= '$sql["base"] = "'.$mysql_db.'";
  150.                        ';
  151.                         $current .= '$sql["options"] = array(
  152.                        ';
  153.                         $current .= 'PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
  154.                        ';
  155.                         $current .= 'PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"
  156.                        ';
  157.                         $current .= ');
  158.                        ';
  159.                         $current .= '$bdd = new PDO($sql["driver"] .":host=". $sql["host"] .";dbname=". $sql["base"], $sql["user"], $sql["pass"], $sql["options"]);
  160.                        ';
  161.                         $current .= '?>
  162.                        ';
  163.  
  164.                         file_put_contents("includes/config.php", $current);
  165.  
  166.                         $_SESSION['install_url'] = $url;
  167.                         $_SESSION['install_usern'] = $usern;
  168.                         $_SESSION['install_passwd'] = protect($_POST['passwd']);
  169.  
  170.                         header("Location: ./install.php?step=2");
  171.  
  172.                     } else {
  173.                         echo error('<div class="ui icon error message"><i class="checkmark icon"></i><div class="content"><div class="header">Error!</div><p>Failed to connect to MySQL server.</p></div></div>');
  174.                     }
  175.                 }
  176.             }
  177.             ?>
  178.             <form action="" method="post" accept-charset="utf-8" class="ui form">
  179.                 <div class="ui horizontal icon divider"><i class="circular teal database icon"></i></div>
  180.                 <div class="field required">
  181.                     <label for="1">MySQL Hostname</label>
  182.                     <input name="mysql_host" id="1" value="<?php echo protect($_POST['mysql_host']); ?>" placeholder="e.g: localhost" type="text" autocomplete="off" required>
  183.                 </div>
  184.                 <div class="field required">
  185.                     <label for="2">MySQL Database</label>
  186.                     <input name="mysql_db" id="2" value="<?php echo protect($_POST['mysql_db']); ?>" placeholder="e.g: database" type="text" autocomplete="off" required>
  187.                 </div>
  188.                 <div class="field required">
  189.                     <label for="3">MySQL Username</label>
  190.                     <input name="mysql_user" id="3" value="<?php echo protect($_POST['mysql_user']); ?>" placeholder="e.g: root" type="text" autocomplete="off" required>
  191.                 </div>
  192.                 <div class="field required">
  193.                     <label for="4">MySQL Password</label>
  194.                     <input name="mysql_pass" id="4" value="<?php echo protect($_POST['mysql_pass']); ?>" placeholder="e.g: rootpasswd" type="text" autocomplete="off" required>
  195.                 </div>
  196.                 <div class="ui horizontal icon divider"><i class="circular blue info icon"></i></div>
  197.                 <div class="field required">
  198.                     <label for="5">Website Title</label>
  199.                     <input name="title" id="5" value="<?php echo protect($_POST['title']); ?>" placeholder="e.g: Vanguard" type="text" autocomplete="off" required>
  200.                 </div>
  201.                 <div class="field required">
  202.                     <label for="6">Website Description</label>
  203.                     <textarea name="description" id="6" placeholder="Enter website description here..." rows="6" autocomplete="off" required><?php echo protect($_POST['description']); ?></textarea>
  204.                 </div>
  205.                 <div class="field required">
  206.                     <label for="7">Website Keywords</label>
  207.                     <textarea name="keywords" id="7" placeholder="Enter website keywords here..." rows="3" autocomplete="off" required><?php echo protect($_POST['keywords']); ?></textarea>
  208.                 </div>
  209.                 <div class="field required">
  210.                     <label for="8">Contact e-mail address</label>
  211.                     <input name="contact_email" id="8" value="<?php echo protect($_POST['contact_email']); ?>" placeholder="e.g: contact@address.com" type="email" autocomplete="off" required>
  212.                 </div>
  213.                 <div class="field required">
  214.                     <label for="9">Company Name</label>
  215.                     <input name="sitename" id="9" value="<?php echo protect($_POST['sitename']); ?>" placeholder="e.g: Vanguard" type="text" autocomplete="off" required>
  216.                 </div>
  217.                 <div class="field required">
  218.                     <label for="10">Website URL with ending '/'</label>
  219.                     <input name="url" id="10" value="<?php echo protect($_POST['url']); ?>" placeholder="e.g: http://example.com/ with ending '/'" type="text" autocomplete="off" required>
  220.                 </div>
  221.                 <div class="field required">
  222.                     <label for="uuid">Secured folder (for uploads)</label>
  223.                     <div class="ui left action fluid input">
  224.                     <button id="generateUUID" class="ui black labeled icon button">
  225.                         <i class="key icon"></i>
  226.                         Generate
  227.                     </button>
  228.                     <textarea name="main_folder_name" id="uuid" rows="1" placeholder="e.g: v17u3hv215vui982" required><?php echo protect($_POST['main_folder_name']); ?></textarea>
  229.                 </div>
  230.                 <script>
  231.                     function generateUUID() {
  232.                         var d = new Date().getTime();
  233.                         if(window.performance && typeof window.performance.now === "function"){
  234.                             d += performance.now();; //use high-precision timer if available
  235.                         }
  236.                         var uuid = 'xxxxxxx-xxxx-4xxx-yxxx-xxxxxx'.replace(/[xy]/g, function(c) {
  237.                             var r = (d + Math.random()*16)%16 | 0;
  238.                             d = Math.floor(d/16);
  239.                             return (c=='x' ? r : (r&0x3|0x8)).toString(16);
  240.                         });
  241.                         return uuid;
  242.                     };
  243.                     document.getElementById('generateUUID').onclick = function() {
  244.                         document.getElementById('uuid').innerHTML = generateUUID();
  245.                     };
  246.                     document.getElementById('uuid').innerHTML = generateUUID();
  247.                 </script>
  248.                 </div>
  249.                 <div class="ui horizontal divider">AND</div>
  250.                 <div class="field required">
  251.                     <label for="12">Homepage Title</label>
  252.                     <input name="home_title" id="12" value="<?php echo protect($_POST['home_title']); ?>" placeholder="e.g: Vanguard" type="text" autocomplete="off" required>
  253.                 </div>
  254.                 <div class="field required">
  255.                     <label for="13">Homepage Description</label>
  256.                     <textarea name="home_desc" id="13" placeholder="e.g: Buy premium PHP scripts, app templates, themes and plugins and create amazing websites & apps." rows="6" autocomplete="off" required><?php echo protect($_POST['home_desc']); ?></textarea>
  257.                 </div>
  258.                 <div class="field required">
  259.                     <label for="14">Copyright Text footer</label>
  260.                     <input name="footer_text" id="14" value="<?php echo protect($_POST['footer_text']); ?>" placeholder="e.g: Earn a Living Selling Your Digital Products" type="text" autocomplete="off" required>
  261.                 </div>
  262.                 <div class="ui horizontal icon divider"><i class="circular red user icon"></i></div>
  263.                 <div class="field required">
  264.                     <label for="15">Notification E-mail Address</label>
  265.                     <input name="email" id="15" value="<?php echo protect($_POST['email']); ?>" placeholder="e.g: example@address.com" type="email" autocomplete="off" required>
  266.                 </div>
  267.                 <div class="field required">
  268.                     <label for="16">Admin Username</label>
  269.                     <input name="usern" id="16" value="<?php echo protect($_POST['usern']); ?>" placeholder="e.g: Squamifer" type="text" autocomplete="off" required>
  270.                 </div>
  271.                 <div class="field required">
  272.                     <label for="17">Admin Password</label>
  273.                     <input name="passwd" id="17" value="<?php echo protect($_POST['passwd']); ?>" placeholder="e.g: YourPassword321" type="password" autocomplete="off" required>
  274.                 </div>
  275.                 <div class="ui divider"></div>
  276.                 <button type="submit" name="do_install" class="ui positive fluid button">Install Vanguard</button>
  277.             </form>
  278.         </div>
  279.         <div class="ui divider hidden"></div>
  280.     </div>
  281.     <!-- BODY END -->
  282.     <!-- FOOTER CODE -->
  283.     <script type="text/javascript" src="static/gen/scripts.min.js"></script>
  284.     <script type="text/javascript" src="static/gen/js/semantic.min.js"></script>
  285.     <!-- FOOTER CODE -->
  286. </body>
  287. </html>
  288.  
  289. <?php
  290. } elseif ($step == 2) {
  291. ?>
  292.  
  293. <!DOCTYPE html>
  294. <html lang="en">
  295. <head>
  296.     <meta charset="utf-8">
  297.     <title>Step 3 • Install Vanguard Marketplace</title>
  298.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  299.     <meta name="description" content="Install Vanguard Multi-Vendor">
  300.     <meta name="author" content="Vanguard">
  301.    
  302.     <!-- Stylesheets -->
  303.     <link rel="stylesheet" href="static/gen/css/icon.min.css">
  304.     <link rel="stylesheet" href="static/gen/css/semantic.min.css">
  305.     <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  306.     <link rel="stylesheet" href="static/gen/css/animate.min.css">
  307.     <!-- End Stylesheets -->
  308.  
  309.     <!-- Icon/Favicon -->
  310.     <link rel="icon" type="image/png" href="static/favicons/favicon.png" />
  311.     <!-- End Icon/Favicon -->
  312.    
  313.     <!-- Styles perso -->
  314.     <style type="text/css">
  315.         body {
  316.             background-color: #edeff0;
  317.         }
  318.        
  319.         .ui.menu .item img.logo {
  320.             margin-right: 1.3em;
  321.         }
  322.        
  323.         .main.container {
  324.             margin-top: 7em;
  325.         }
  326.        
  327.         .wireframe {
  328.             margin-top: 2em;
  329.         }
  330.        
  331.         .ui.footer.segment {
  332.             margin: 5em 0em 0em;
  333.             padding: 5em 0em;
  334.         }
  335.  
  336.     </style>
  337.     <!-- End Styles perso -->
  338. </head>
  339. <body>
  340.     <!-- HEADER START -->
  341.     <div class="ui fixed menu">
  342.         <div class="ui container">
  343.             <div class="header item">
  344.                 <h2>Vanguard</h2>
  345.             </div>
  346.             <div class="right item">
  347.                 <a href="https://demo.squamifer.ovh/vanguard/" class="ui positive button" target="_blank">Support</a>
  348.             </div>
  349.         </div>
  350.     </div>
  351.     <!-- HEADER END -->
  352.     <!-- BODY START -->
  353.     <div class="ui main container animated fadeIn">
  354.         <div class="ui three top attached ordered steps">
  355.             <div class="completed step">
  356.                 <div class="content">
  357.                     <div class="title">Introduction</div>
  358.                     <div class="description">Informations before installation</div>
  359.                 </div>
  360.             </div>
  361.             <div class="completed step">
  362.                 <div class="content">
  363.                     <div class="title">Installation</div>
  364.                     <div class="description">Configure your MySQL and Personal settings</div>
  365.                 </div>
  366.             </div>
  367.             <div class="completed active step">
  368.                 <div class="content">
  369.                     <div class="title">Success</div>
  370.                     <div class="description">Checking parameters</div>
  371.                 </div>
  372.             </div>
  373.         </div>
  374.         <div class="ui attached padded segment">
  375.             <h1 class="ui center aligned green header animated pulse">Vanguard Installation Processed!</h1>
  376.             <center>
  377.                 <p>Parameters installation successfully completed.</p>
  378.                 <div class="ui divider"></div>
  379.                 <p><strong>Store URL</strong><br> <a href="<?php echo $_SESSION['install_url']; ?>" target="_blank" class="ui blue label"><?php echo $_SESSION['install_url']; ?></a></p>
  380.                 <p><strong>Admin Username</strong><br> <span class="ui black label"><?php echo $_SESSION['install_usern']; ?></span></p>
  381.                 <p><strong>Admin Password</strong><br> <span class="ui black label"><?php echo $_SESSION['install_passwd']; ?></span></p>
  382.                 <div class="ui divider"></div>
  383.                 <a href="<?php echo $_SESSION['install_url']; ?>account/login" class="large ui primary button">Visit admin panel <i class="right arrow icon"></i></a></center>
  384.         </div>
  385.     </div>
  386.     <!-- BODY END -->
  387.     <!-- FOOTER CODE -->
  388.     <script type="text/javascript" src="static/gen/scripts.min.js"></script>
  389.     <script type="text/javascript" src="static/gen/js/semantic.min.js"></script>
  390.     <!-- FOOTER CODE -->
  391. </body>
  392. </html>
  393.  
  394. <?php
  395. @unlink("install.php");
  396. @unlink("sql.sql");
  397. unset($_SESSION['install_url']);
  398. unset($_SESSION['install_usern']);
  399. unset($_SESSION['install_passwd']);
  400. session_unset();
  401. session_destroy();
  402. } else {
  403. ?>
  404.  
  405. <!DOCTYPE html>
  406. <html lang="en">
  407. <head>
  408.     <meta charset="utf-8">
  409.     <title>Install Vanguard Marketplace</title>
  410.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  411.     <meta name="description" content="Install Vanguard Multi-Vendor">
  412.     <meta name="author" content="Vanguard">
  413.    
  414.     <!-- Stylesheets -->
  415.     <link rel="stylesheet" href="static/gen/css/icon.min.css">
  416.     <link rel="stylesheet" href="static/gen/css/semantic.min.css">
  417.     <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  418.     <link rel="stylesheet" href="static/gen/css/animate.min.css">
  419.     <!-- End Stylesheets -->
  420.  
  421.     <!-- Icon/Favicon -->
  422.     <link rel="icon" type="image/png" href="static/favicons/favicon.png" />
  423.     <!-- End Icon/Favicon -->
  424.    
  425.     <!-- Styles perso -->
  426.     <style type="text/css">
  427.         body {
  428.             background-color: #edeff0;
  429.         }
  430.        
  431.         .ui.menu .item img.logo {
  432.             margin-right: 1.3em;
  433.         }
  434.        
  435.         .main.container {
  436.             margin-top: 7em;
  437.         }
  438.        
  439.         .wireframe {
  440.             margin-top: 2em;
  441.         }
  442.        
  443.         .ui.footer.segment {
  444.             margin: 5em 0em 0em;
  445.             padding: 5em 0em;
  446.         }
  447.  
  448.     </style>
  449.     <!-- End Styles perso -->
  450. </head>
  451. <body>
  452.     <!-- HEADER START -->
  453.     <div class="ui fixed menu">
  454.         <div class="ui container">
  455.             <div class="header item">
  456.                 <h2>Vanguard</h2>
  457.             </div>
  458.             <div class="right item">
  459.                 <a href="https://demo.squamifer.ovh/vanguard/" class="ui positive button" target="_blank">Support</a>
  460.             </div>
  461.         </div>
  462.     </div>
  463.     <!-- HEADER END -->
  464.     <!-- BODY START -->
  465.     <div class="ui main container animated fadeIn">
  466.         <div class="ui three top attached ordered steps">
  467.             <div class="active step">
  468.                 <div class="content">
  469.                     <div class="title">Introduction</div>
  470.                     <div class="description">Informations before installation</div>
  471.                 </div>
  472.             </div>
  473.             <div class="disabled step">
  474.                 <div class="content">
  475.                     <div class="title">Installation</div>
  476.                     <div class="description">Configure your MySQL and Personal settings</div>
  477.                 </div>
  478.             </div>
  479.             <div class="disabled step">
  480.                 <div class="content">
  481.                     <div class="title">Success</div>
  482.                     <div class="description">Checking parameters</div>
  483.                 </div>
  484.             </div>
  485.         </div>
  486.         <div class="ui attached padded segment">
  487.             <h1 class="ui center aligned header animated pulse">Vanguard needs an installation!</h1>
  488.             <center>
  489.                 <p>With this script you can sell your products without resellers commission takes half the cost of your product. All profits just for you just need to install the script and add your products. Registered users can also sell their products, and you will receive a commission.</p>
  490.                 <p><i class="warning circular icon"></i> When you will be asked for your URL Website, do not forget to mention the <strong style="color:red;">/</strong> (slash) at the end of your address!</p>
  491.                 <p>You have a problem installing Vanguard? I can help you, have you put the following files/folders in <strong>CHMOD 755</strong>:</p>
  492.                 <?php
  493.                 $filename = 'includes/config.php';
  494.                 if (is_writable($filename)) {
  495.                     echo '<div class="ui basic label">includes/config.php</div><i class="angle right icon"></i><div class="ui green label">Writable</div>';
  496.                 } else {
  497.                     echo '<div class="ui basic label">includes/config.php</div><i class="angle right icon"></i><div class="ui red label">Not Writable</div>';
  498.                 }
  499.                 $filename2 = 'uploads';
  500.                 if (is_writable($filename2)) {
  501.                     echo '<br><br><div class="ui basic label">uploads (folder)</div><i class="angle right icon"></i><div class="ui green label">Writable</div>';
  502.                 } else {
  503.                     echo '<br><br><div class="ui basic label">uploads (folder)</div><i class="angle right icon"></i><div class="ui red label">Not Writable</div>';
  504.                 }
  505.                 $filename3 = 'install.php';
  506.                 if (is_writable($filename3)) {
  507.                     echo '<br><br><div class="ui basic label">install.php</div><i class="angle right icon"></i><div class="ui green label">Writable</div>';
  508.                 } else {
  509.                     echo '<br><br><div class="ui basic label">install.php</div><i class="angle right icon"></i><div class="ui red label">Not Writable</div>';
  510.                 }
  511.                 if (!defined('PDO::ATTR_DRIVER_NAME')) {
  512.                     echo '<div class="ui divider"></div><div class="ui red label">PDO unavailable</div>';
  513.                 } else { echo '<div class="ui divider"></div><div class="ui green label">PDO available</div><br><br>'; }
  514.                 ?>
  515.                 <?php
  516.                 if(!function_exists('apache_get_modules') ){ phpinfo(); exit; }
  517.                 $res = '<div class="ui red label">Module Unavailable and OFF</div>';
  518.                 if(in_array('mod_rewrite',apache_get_modules()))
  519.                     $res = '<div class="ui green label">Module Available and ON</div>';
  520.                 ?>
  521.                 <?php echo apache_get_version(),"<br><br><div class='ui basic label'>mod_rewrite</div><i class='angle right icon'></i>$res"; ?>
  522.                 <p><?php echo '<h3 class="header">Current PHP version</h3> <span class="ui blue label">' . phpversion() . '</span>'; ?></p>
  523.                 <p><h3 class="header">Recommended PHP Version</h3> <span class="ui orange label">PHP 5.x</span><span class="ui green label">PHP 7.x</span></p>
  524.                 <div class="ui divider"></div>
  525.                 <a href="./install.php?step=1" class="large ui black button">Start installation</a>
  526.             </center>
  527.         </div>
  528.     </div>
  529.     <!-- BODY END -->
  530.     <!-- FOOTER CODE -->
  531.     <script type="text/javascript" src="static/gen/scripts.min.js"></script>
  532.     <script type="text/javascript" src="static/gen/js/semantic.min.js"></script>
  533.     <!-- FOOTER CODE -->
  534. </body>
  535. </html>
  536. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement