cleaned up formatting and added custom.css

This commit is contained in:
Botanic 2013-06-16 22:57:09 -07:00
parent 1d155268d2
commit 473703c19f
11 changed files with 116 additions and 99 deletions

View file

@ -1,7 +1,7 @@
<?php <?php
class Helpers{ class Helpers{
static public function loadTemplate( $template, $vars = array (), $forcelibrender = false ) static public function loadTemplate( $template, $vars = array (), $forcelibrender = false )
{ {
global $AMS_LIB; global $AMS_LIB;
global $SITEBASE; global $SITEBASE;
@ -44,35 +44,35 @@ class Helpers{
foreach ( $variables[$template] as $key => $value ){ foreach ( $variables[$template] as $key => $value ){
$smarty -> assign( $key, $value ); $smarty -> assign( $key, $value );
} }
if($vars['permission'] == 1){ if( $vars['permission'] == 1 ){
$inherited = "layout_admin.tpl"; $inherited = "layout_admin.tpl";
}else{ }else{
$inherited = "layout_user.tpl"; $inherited = "layout_user.tpl";
} }
//extends:' . $inherited .'|register.tpl // extends:' . $inherited .'|register.tpl
$smarty -> display( $template.'.tpl' ); $smarty -> display( $template . '.tpl' );
} }
static public function create_folders(){ static public function create_folders(){
global $AMS_LIB; global $AMS_LIB;
global $SITEBASE; global $SITEBASE;
$arr = array( $AMS_LIB . '/ingame_templates/', $arr = array( $AMS_LIB . '/ingame_templates/',
$AMS_LIB . '/configs', $AMS_LIB . '/configs',
$AMS_LIB . '/cache', $AMS_LIB . '/cache',
$SITEBASE . '/cache/', $SITEBASE . '/cache/',
$SITEBASE . '/templates/', $SITEBASE . '/templates/',
$SITEBASE . '/templates_c/', $SITEBASE . '/templates_c/',
$SITEBASE . '/configs' $SITEBASE . '/configs'
); );
foreach ( $arr as & $value ){ foreach ( $arr as & $value ){
if ( !file_exists( $value ) ){ if ( !file_exists( $value ) ){
mkdir( $value ); mkdir( $value );
} }
} }
} }
static public function check_if_game_client() static public function check_if_game_client()
{ {
// if HTTP_USER_AGENT is not set then its ryzom core // if HTTP_USER_AGENT is not set then its ryzom core
if ( !isset( $_SERVER['HTTP_USER_AGENT'] ) ){ if ( !isset( $_SERVER['HTTP_USER_AGENT'] ) ){

View file

@ -1,11 +1,10 @@
<?php <?php
class Sql{ class Sql{
public function db_query( $query, $values = array() ) public function db_query( $query, $values = array() )
{ {
echo "tst"; echo "tst";
} }
}
}

View file

@ -230,4 +230,3 @@ class Users{
} }
} }

View file

@ -3,6 +3,6 @@
// Base include file for library functions for AMS // Base include file for library functions for AMS
// *********************************************** // ***********************************************
function __autoload( $className ){ function __autoload( $className ){
require_once 'autoload/' . strtolower ($className) . '.php'; require_once 'autoload/' . strtolower ( $className ) . '.php';
} }

View file

@ -64,7 +64,7 @@ if ( ( $user == "success" ) and ( $pass == "success" ) and ( $cpass == "success"
$pageElements['TAC_ERROR'] = 'TRUE'; $pageElements['TAC_ERROR'] = 'TRUE';
} }
if ( helpers :: check_if_game_client() ){ if ( helpers :: check_if_game_client() ){
helpers :: loadtemplate( '../../ams_lib/ingame_templates/register.phtml', $pageElements ); helpers :: loadtemplate( '../../ams_lib/ingame_templates/register.phtml', $pageElements );
}else{ }else{
helpers :: loadtemplate( 'templates/register.phtml', $pageElements ); helpers :: loadtemplate( 'templates/register.phtml', $pageElements );
} }

View file

@ -0,0 +1,17 @@
.login-header
{
height:190px;
}
.brand img
{
height:100%;
margin-bottom:-18px;
margin-top:-15px;
width:100%;
}
#for-is-ajax
{
display:none;
}

View file

@ -1,12 +1,12 @@
<?php <?php
function add_user(){ function add_user(){
// add user locally here // add user locally here
$return = users :: add_user(); $return = users :: add_user();
return $return; return $return;
} }
function checkUser(){ function checkUser(){
} }

View file

@ -6,18 +6,18 @@ require( '../../ams_lib/libinclude.php' );
if ( isset( $_POST["function"] ) ){ if ( isset( $_POST["function"] ) ){
require( "inc/" . $_POST["function"] . ".php" ); require( "inc/" . $_POST["function"] . ".php" );
$return = $_POST["function"](); $return = $_POST["function"]();
} }
function loadpage ( $page ){ function loadpage ( $page ){
require_once( 'autoload/' . $page . '.php' ); require_once( 'autoload/' . $page . '.php' );
} }
$page = 'home'; $page = 'home';
if ( isset( $_GET["page"] ) ){ if ( isset( $_GET["page"] ) ){
$page = $_GET["page"]; $page = $_GET["page"];
} }
//temporary set permission to 1 which = admin mode // temporary set permission to 1 which = admin mode
$return = array('permission' => 1, 'no_visible_elements' => 'TRUE'); $return = array( 'permission' => 1, 'no_visible_elements' => 'TRUE' );
helpers :: loadTemplate( $page , $return ); helpers :: loadTemplate( $page , $return );

View file

@ -1,7 +1,7 @@
$(document).ready(function(){ $(document).ready(function(){
//themes, change CSS with JS //themes, change CSS with JS
//default theme(CSS) is cerulean, change it if needed //default theme(CSS) is cerulean, change it if needed
var current_theme = $.cookie('current_theme')==null ? 'spacelab' :$.cookie('current_theme'); var current_theme = $.cookie('current_theme')==null ? 'cerulean' :$.cookie('current_theme');
switch_theme(current_theme); switch_theme(current_theme);
$('#themes a[data-value="'+current_theme+'"]').find('i').addClass('icon-ok'); $('#themes a[data-value="'+current_theme+'"]').find('i').addClass('icon-ok');

View file

@ -52,6 +52,8 @@
<!-- The fav icon --> <!-- The fav icon -->
<!--<link rel="shortcut icon" href="img/favicon.ico">--> <!--<link rel="shortcut icon" href="img/favicon.ico">-->
<!--custom css file-->
<link href="css/custom.css" rel="stylesheet">
</head> </head>
<body> <body>