Skip to content

Commit

Permalink
Fixed #6
Browse files Browse the repository at this point in the history
  • Loading branch information
PlanetTheCloud committed Feb 8, 2019
1 parent 12e7b3b commit ddb0db6
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 22 deletions.
2 changes: 1 addition & 1 deletion signup.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function kick(Bool $addMsg=false){
<input type="hidden" name="number" value="<?=$_POST['number'];?>">
<input type="hidden" name="submit" value="Register">
<div>
<button type="submit" class="btn btn-success btn-block" id="signup">Click here if nothing happens</button>
<button type="submit" class="btn btn-success waves-effect btn-block" id="signup">Click here if nothing happens</button>
</div>
</form>
<script type="text/javascript">document.getElementById('signup').click();</script>
Expand Down
33 changes: 21 additions & 12 deletions sys-auth/app/backup/config.php.backup
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
* This version hopefully fixes all of it.
*/

/**
* Please keep the comments as it might come in handy later down the road.
*/



/**
* CONFIG FILE
* File name : config.php
Expand All @@ -17,28 +23,30 @@
* You may edit the $config variable array.
* Do not change the data type (e.g. String to Bool, String to Array, Array to String, etc.)
* Read the comments for instruction! They're there for a reason!
* Confused? Ask them on the forum here : https://www.byet.net/index.php?/topic/2663-free-professional-custom-signup-and-login-template-project-logged/
* Confused? Ask the community on the forum here : https://www.byet.net/index.php?/topic/2663-free-professional-custom-signup-and-login-template-project-logged/
* Note : Official support has been dropped on 1st February 2019.
* But the project will still continue on Privately due to lack of interest.
*/

$config = [

# Domain-Level Install Path
# From the URL path (Not folder path), where is the "app" folder located?
# Do not include the "app" directory and trailing slash. Example : /auth OR "/path1/path2"
# Do not include the "app" directory and trailing slash. Example : "/auth" OR "/path1/path2"
'dl_install_path' => '/auth',

# Enter your company name
'company_name' => 'COMPANY_NAME',
# Set to "true" if your site has a valid SSL certificate. Use "false" otherwise
'use_https' => false,
# Enter your Logo URL. Relative URL is possible
'logo' => 'LOGO_URL',
'logo' => 'https://via.placeholder.com/255x70.png?text=Logo',
# Where to send abuse email?
'abuse_email' => 'ABUSE_EMAIL',
# Where to send contact email? NOTE : THIS EMAIL MUST BE ACTIVELY MONITORED ACCORDING TO THE PRIVACY POLICY.
'contact_email' => 'CONTACT_EMAIL',
# Main site URL with protocol
'main_site' => 'MAIN_SITE',
'main_site' => 'MAIN_WEBSITE',

# What colors to use for elements like Buttons?
'site_theme_color' => 'blue',
Expand Down Expand Up @@ -67,12 +75,12 @@ $config = [
'register_button' => 'SIGN UP'
],

# This script assumes the cPanel is on the same domain where this script is installed.
# The cPanel URL must not include the "cpanel" subdomain. Example : xyz.com
# IMPORTANT NOTICE : THIS WILL ONLY APPLY TO THE LOGIN PAGE.
# This script assumes the cPanel is located on the same domain where this script is installed.
# The cPanel URL must not include the "cpanel" subdomain. Example : "xyz.com"
# IMPORTANT : THIS WILL ONLY APPLY TO THE LOGIN PAGE.
# SIGNUP MUST BE TO THE SAME DOMAIN WHERE THIS IS INSTALLED (Requirements by MOFH).
# Please uncomment the line below to define the cPanel URL
//'login_cpanel_url' => 'CPANEL_URL',
//'login_cpanel_url' => 'CPANEL_URL_FOR_LOGIN',
];

/**
Expand All @@ -90,7 +98,6 @@ $x = [
md5(rand(6000, PHP_INT_MAX)),
];
$x[] = (isset($config['login_cpanel_url'])) ? "cpanel.{$config['login_cpanel_url']}" : "cpanel.{$x[0]}";
$x[] = (isset($config['login_cpanel_url'])) ? "order.{$config['login_cpanel_url']}" : "order.{$x[0]}";
$x[] = "{$_SERVER['REQUEST_SCHEME']}://{$x[0]}";
$final = [
'base' => $config['dl_install_path'],
Expand All @@ -99,7 +106,7 @@ $final = [
'current_site' => $x[0],
'placeholders' => [
'signup' => [
'subdomain' => $config['login_cpanel_url'] ?? $x[0],
'subdomain' => $x[0],
]
],
'links' => [
Expand All @@ -109,7 +116,7 @@ $final = [
],
'submit' => [
'login' => "https://{$x[2]}/login.php",
'signup' => ($config['use_https']) ? "https://securesignup.net/register2.php" : "http://{$x[4]}/register2.php"
'signup' => ($config['use_https']) ? "https://securesignup.net/register2.php" : "http://order.{$x[0]}/register2.php"
],
'logo' => $config['logo'],
'email' => [
Expand Down Expand Up @@ -137,5 +144,7 @@ $final = [
'color' => $config['site_theme_color']
];
if(defined('LOGGED_LANGUAGE_PACK')){
$x = lang('/app/lang/en.php');
$lang = new Language;
$lang->loadLangFromObj(LOGGED_LANGUAGE_PACK);
$lang->mount('all');
}
27 changes: 18 additions & 9 deletions sys-auth/app/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
* This version hopefully fixes all of it.
*/

/**
* Please keep the comments as it might come in handy later down the road.
*/



/**
* CONFIG FILE
* File name : config.php
Expand All @@ -17,14 +23,16 @@
* You may edit the $config variable array.
* Do not change the data type (e.g. String to Bool, String to Array, Array to String, etc.)
* Read the comments for instruction! They're there for a reason!
* Confused? Ask them on the forum here : https://www.byet.net/index.php?/topic/2663-free-professional-custom-signup-and-login-template-project-logged/
* Confused? Ask the community on the forum here : https://www.byet.net/index.php?/topic/2663-free-professional-custom-signup-and-login-template-project-logged/
* Note : Official support has been dropped on 1st February 2019.
* But the project will still continue on Privately due to lack of interest.
*/

$config = [

# Domain-Level Install Path
# From the URL path (Not folder path), where is the "app" folder located?
# Do not include the "app" directory and trailing slash. Example : /auth OR "/path1/path2"
# Do not include the "app" directory and trailing slash. Example : "/auth" OR "/path1/path2"
'dl_install_path' => '/auth',

# Enter your company name
Expand Down Expand Up @@ -67,9 +75,9 @@
'register_button' => 'SIGN UP'
],

# This script assumes the cPanel is on the same domain where this script is installed.
# The cPanel URL must not include the "cpanel" subdomain. Example : xyz.com
# IMPORTANT NOTICE : THIS WILL ONLY APPLY TO THE LOGIN PAGE.
# This script assumes the cPanel is located on the same domain where this script is installed.
# The cPanel URL must not include the "cpanel" subdomain. Example : "xyz.com"
# IMPORTANT : THIS WILL ONLY APPLY TO THE LOGIN PAGE.
# SIGNUP MUST BE TO THE SAME DOMAIN WHERE THIS IS INSTALLED (Requirements by MOFH).
# Please uncomment the line below to define the cPanel URL
'login_cpanel_url' => 'planetcloudhosting.cf',
Expand All @@ -90,7 +98,6 @@
md5(rand(6000, PHP_INT_MAX)),
];
$x[] = (isset($config['login_cpanel_url'])) ? "cpanel.{$config['login_cpanel_url']}" : "cpanel.{$x[0]}";
$x[] = (isset($config['login_cpanel_url'])) ? "order.{$config['login_cpanel_url']}" : "order.{$x[0]}";
$x[] = "{$_SERVER['REQUEST_SCHEME']}://{$x[0]}";
$final = [
'base' => $config['dl_install_path'],
Expand All @@ -99,7 +106,7 @@
'current_site' => $x[0],
'placeholders' => [
'signup' => [
'subdomain' => $config['login_cpanel_url'] ?? $x[0],
'subdomain' => $x[0],
]
],
'links' => [
Expand All @@ -109,7 +116,7 @@
],
'submit' => [
'login' => "https://{$x[2]}/login.php",
'signup' => ($config['use_https']) ? "https://securesignup.net/register2.php" : "http://{$x[4]}/register2.php"
'signup' => ($config['use_https']) ? "https://securesignup.net/register2.php" : "http://order.{$x[0]}/register2.php"
],
'logo' => $config['logo'],
'email' => [
Expand Down Expand Up @@ -137,5 +144,7 @@
'color' => $config['site_theme_color']
];
if(defined('LOGGED_LANGUAGE_PACK')){
$x = lang('/app/lang/en.php');
$lang = new Language;
$lang->loadLangFromObj(LOGGED_LANGUAGE_PACK);
$lang->mount('all');
}

0 comments on commit ddb0db6

Please sign in to comment.