1
0
mirror of https://github.com/cp6/my-idlers.git synced 2024-11-16 23:42:32 +01:00

Moved config constants to new class at top

Moved config constants into a new class at the top of the file
This commit is contained in:
cp6 2021-01-22 11:21:50 +11:00
parent 088723d904
commit 12845a3940

View File

@ -1,6 +1,21 @@
<?php <?php
class elementHelpers class idlersConfig {
const PAGE_TITLE = 'My idlers';
const PAGE_DESC = 'My idlers listing server, shared hosting and domains information and data.';
const SRV_SORT_TYPE = 'HOSTNAME_ASC';//Server card sort type
const SH_SORT_TYPE = 'HOSTNAME_ASC';//Shared hosting sort type
const DC_SORT_TYPE = 'HOSTNAME_ASC';//Domains sort type
//Options: PRICE_DESC, PRICE_ASC, DUE_DESC, DUE_ASC, OWNED_SINCE_DESC,OWNED_SINCE_ASC, HOSTNAME_DESC & HOSTNAME_ASC
const DB_HOSTNAME = '127.0.0.1';
const DB_NAME = 'idlers';
const DB_USERNAME = 'root';
const DB_PASSWORD = '';
}
class elementHelpers extends idlersConfig
{ {
//Minimizes lines used + opening and closing of <?PHP tag //Minimizes lines used + opening and closing of <?PHP tag
protected function tagOpen(string $tag = 'div', string $class = '', string $id = '') protected function tagOpen(string $tag = 'div', string $class = '', string $id = '')
@ -533,19 +548,6 @@ class helperFunctions extends elementHelpers
class idlers extends helperFunctions class idlers extends helperFunctions
{ {
const PAGE_TITLE = 'My idlers';
const PAGE_DESC = 'My idlers listing server, shared hosting and domains information and data.';
const SRV_SORT_TYPE = 'HOSTNAME_ASC';//Server card sort type
const SH_SORT_TYPE = 'HOSTNAME_ASC';//Shared hosting sort type
const DC_SORT_TYPE = 'HOSTNAME_ASC';//Domains sort type
//Options: PRICE_DESC, PRICE_ASC, DUE_DESC, DUE_ASC, OWNED_SINCE_DESC,OWNED_SINCE_ASC, HOSTNAME_DESC & HOSTNAME_ASC
const DB_HOSTNAME = '127.0.0.1';
const DB_NAME = 'idlers';
const DB_USERNAME = 'root';
const DB_PASSWORD = '';
protected function dbConnect() protected function dbConnect()
{ {
$options = array( $options = array(