What's new

Gesior acc maker nawigacja i kilka linijek

Status
Not open for further replies.

dragon1155

Advanced User
Joined
Sep 22, 2009
Messages
297
Reaction score
1
Witam. Mam problem dotycz?cy nawigacji w gesior acc maker. Ot?? chcia?bym doda? do listy w community Bans oraz Gallery. W admin panel nigdzie niema. Za pomoc reput oraz wdzi?czno?? :)
 

Eturl

We shall know no fear!
Joined
May 21, 2008
Messages
2,280
Reaction score
463
Age
32
Odp: Gesior acc maker nawigacja i kilka linijek

Dodaje si? to w 2 plikach

Do layout.php dodaj takie linijki ( w odpowiednie dla siebie miejsce np ko?o domk?w)

Code:
<a href='?subtopic=bans'>
  <div id='submenu_bans' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_bans' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Bans</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>

Oraz

Code:
<a href='?subtopic=gallery'>
  <div id='submenu_gallery' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_bans' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Gallery</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>


teraz w index.php dodaj
Code:
case "bans":
 	         $topic = "Bans";
    	         $subtopic = "bans";
    		 include("bans.php");
 	break;  

case "gallery";
		$subtopic = "galerry";
		$topic = "Gallery";
		include("gallery.php");
	break;

Rozumiem ?e skrypty ju? masz. Je?li nie to podaje w?asne
-
-

@edit
bym zapomnia? o 1 pliku
 
Last edited:

dragon1155

Advanced User
Joined
Sep 22, 2009
Messages
297
Reaction score
1
Odp: Gesior acc maker nawigacja i kilka linijek

nie da rady, bans w ogole nie dodaje, a gallery:
Warning: include(gallery.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\index.php on line 196

Warning: include() [function.include]: Failed opening 'gallery.php' for inclusion (include_path='.;C:\xampp\php\
 

dragon1155

Advanced User
Joined
Sep 22, 2009
Messages
297
Reaction score
1
Odp: Gesior acc maker nawigacja i kilka linijek

r@e@f@r@e@s@h .
 

Grzechu

Senior User
Joined
Nov 29, 2008
Messages
1,263
Reaction score
93
Odp: Gesior acc maker nawigacja i kilka linijek

czy aby na pewno dobrze umie?ci?e? w index.php? Podaj sw?j index.php
 

dragon1155

Advanced User
Joined
Sep 22, 2009
Messages
297
Reaction score
1
Odp: Gesior acc maker nawigacja i kilka linijek

prosze:
by?bym niezmiernie wdzi?czny jakbys mogl mi go przerobic tak aby bylo dobrze

<?PHP
//start :)
//phpinfo();
//exit;
session_start();
ob_start("ob_gzhandler");
//require('./exaBD.php');
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
//##### CONFIG #####
include('config-and-functions.php');
$action = $_REQUEST['action'];
//##### LOGOUT #####
if($action == "logout") {
unset($_SESSION['account']);
unset($_SESSION['password']);
}
//##### LOGIN #####
//check is player logged
$logged = FALSE;
if(isset($_SESSION['account'])) {
$account_logged = $ots->createObject('Account');
$account_logged->load($_SESSION['account']);
if($account_logged->isLoaded() && $account_logged->getPassword() == $_SESSION['password']) {
$logged = TRUE;
$group_id_of_acc_logged = $account_logged->getPageAccess();
}
else
{
$logged = FALSE;
unset($_SESSION['account']);
unset($account_logged);
}
}
//login with data from form
$login_account = strtoupper($_POST['account_login']);
$login_password = trim($_POST['password_login']);
if(!$logged && !empty($login_account) && !empty($login_password))
{
$login_password = password_ency($login_password);
$account_logged = $ots->createObject('Account');
$account_logged->find($login_account);
if($account_logged->isLoaded())
{
if($login_password == $account_logged->getPassword())
{
$_SESSION['account'] = $account_logged->getId();
$_SESSION['password'] = $login_password;
$logged = TRUE;
$account_logged->setCustomField("page_lastday", time());
$group_id_of_acc_logged = $account_logged->getPageAccess();
} else
$logged = FALSE;
}
}
//#### LOAD PAGE ##########
//load subtopic page
if(empty($_REQUEST['subtopic'])) {
$_REQUEST['subtopic'] = "latestnews";
$subtopic = "latestnews";
}
switch($_REQUEST['subtopic']) {
case "latestnews":
$topic = "Latest News";
$subtopic = "latestnews";
include("latestnews.php");
break;

case "creatures";
$topic = "Creatures";
$subtopic = "creatures";
include("creatures.php");
break;

case "spells";
$topic = "Spells";
$subtopic = "spells";
include("spells.php");
break;

case "experiencetable";
$topic = "Experience Table";
$subtopic = "experiencetable";
include("experiencetable.php");
break;

case "characters";
$topic = "Characters";
$subtopic = "characters";
include("characters.php");
break;

case "whoisonline";
$topic = "Who is online?";
$subtopic = "whoisonline";
include("whoisonline.php");
break;

case "highscores";
$topic = "Highscores";
$subtopic = "highscores";
include("highscores.php");
break;

case "killstatistics";
$topic = "Last Kills";
$subtopic = "killstatistics";
include("killstatistics.php");
break;

case "houses";
$topic = "Houses";
$subtopic = "houses";
include("houses.php");
break;

case "guilds";
$topic = "Guilds";
$subtopic = "guilds";
include("guilds.php");
break;

case "accountmanagement";
$topic = "Account Management";
$subtopic = "accountmanagement";
include("accountmanagement.php");
break;

case "createaccount";
$topic = "Create Account";
$subtopic = "createaccount";
include("createaccount.php");
break;

case "lostaccount";
$topic = "Lost Account Interface";
$subtopic = "lostaccount";
include("lostaccount.php");
break;

case "tibiarules";
$topic = "Server Rules";
$subtopic = "tibiarules";
include("tibiarules.php");
break;

case "adminpanel":
$topic = "Admin Panel";
$subtopic = "adminpanel";
include("adminpanel.php");
break;

case "forum":
$topic = "Forum";
$subtopic = "forum";
include("forum.php");
break;

case "team";
$subtopic = "team";
$topic = "Gamemasters List";
include("team.php");
break;

case "downloads";
$subtopic = "downloads";
$topic = "Downloads";
include("downloads.php");
break;

case "serverinfo";
$subtopic = "serverinfo";
$topic = "Server Info";
include("serverinfo.php");
break;

case "shopsystem";
$subtopic = "shopsystem";
$topic = "Shop System";
include("shopsystem.php");
break;

case "buypoints";
$subtopic = "buypoints";
$topic = "Buy Points";
include("buypoints.php");
break;

case "gallery";
$subtopic = "gallery";
$topic = "Gallery";
include("gallery.php");
break;

case "namelock";
$subtopic = "namelock";
$topic = "Namelock Manager";
include("namelocks.php");
break;

case "archive";
$subtopic = "archive";
$topic = "News Archives";
include("archive.php");
break;

case "mail";
$subtopic = "mail";
$topic = "Mass emails sender";
include("mail.php");
break;

case "shopadmin";
$subtopic = "shopadmin";
$topic = "Shop Admin";
include("shopadmin.php");
break;

case "records";
$subtopic = "records";
$topic = "Players Online Records";
include("records.php");
break;

case "paypal";
$subtopic = "paypal";
$topic = "PayPal";
include("paypal.php");
break;


}
//generate title of page
if(empty($topic)) {
$title = $GLOBALS['config']['server']["serverName"]." - OTS";
$main_content .= 'Invalid subtopic. Can\'t load page.';
}
else
{
$title = $GLOBALS['config']['server']["serverName"]." - ".$topic;
}
//#####LAYOUT#####

$layout_header = '<script type=\'text/javascript\'>
function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}

function MouseOverBigButton(source)
{
source.firstChild.style.visibility = "visible";
}
function MouseOutBigButton(source)
{
source.firstChild.style.visibility = "hidden";
}
function BigButtonAction(path)
{
window.location = path;
}
var';
if($logged) { $layout_header .= "loginStatus=1; loginStatus='true';"; } else { $layout_header .= "loginStatus=0; loginStatus='false';"; };
$layout_header .= "var activeSubmenuItem='".$subtopic."'; var IMAGES=0; IMAGES='".$config['server']['url']."/".$layout_name."/images'; var LINK_ACCOUNT=0; LINK_ACCOUNT='".$config['server']['url']."';</script>";
include($layout_name."/layout.php");
ob_end_flush();
?>
 

Jazper

Advanced User
Joined
Nov 22, 2009
Messages
448
Reaction score
31
Odp: Gesior acc maker nawigacja i kilka linijek

^^ przeciez podal ci co masz wkleic do indexu, a ty dalej nic nie wkleiles to sie nie dziw ze nie dziala ;/

Code:
<?PHP
//start
//phpinfo();
//exit;
session_start();
ob_start("ob_gzhandler");
//require('./exaBD.php');
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
//##### CONFIG #####
include('config-and-functions.php');
$action = $_REQUEST['action'];
//##### LOGOUT #####
if($action == "logout") {
unset($_SESSION['account']);
unset($_SESSION['password']);
}
//##### LOGIN #####
//check is player logged
$logged = FALSE;
if(isset($_SESSION['account'])) {
$account_logged = $ots->createObject('Account');
$account_logged->load($_SESSION['account']);
if($account_logged->isLoaded() && $account_logged->getPassword() == $_SESSION['password']) {
$logged = TRUE;
$group_id_of_acc_logged = $account_logged->getPageAccess();
}
else
{
$logged = FALSE;
unset($_SESSION['account']);
unset($account_logged);
}
}
//login with data from form
$login_account = strtoupper($_POST['account_login']);
$login_password = trim($_POST['password_login']);
if(!$logged && !empty($login_account) && !empty($login_password))
{
$login_password = password_ency($login_password);
$account_logged = $ots->createObject('Account');
$account_logged->find($login_account);
if($account_logged->isLoaded())
{
if($login_password == $account_logged->getPassword())
{
$_SESSION['account'] = $account_logged->getId();
$_SESSION['password'] = $login_password;
$logged = TRUE;
$account_logged->setCustomField("page_lastday", time());
$group_id_of_acc_logged = $account_logged->getPageAccess();
} else
$logged = FALSE;
}
}
//#### LOAD PAGE ##########
//load subtopic page
if(empty($_REQUEST['subtopic'])) {
$_REQUEST['subtopic'] = "latestnews";
$subtopic = "latestnews";
}
switch($_REQUEST['subtopic']) {
case "latestnews":
$topic = "Latest News";
$subtopic = "latestnews";
include("latestnews.php");
break;

case "creatures";
$topic = "Creatures";
$subtopic = "creatures";
include("creatures.php");
break;

case "spells";
$topic = "Spells";
$subtopic = "spells";
include("spells.php");
break;

case "experiencetable";
$topic = "Experience Table";
$subtopic = "experiencetable";
include("experiencetable.php");
break;

case "characters";
$topic = "Characters";
$subtopic = "characters";
include("characters.php");
break;

case "whoisonline";
$topic = "Who is online?";
$subtopic = "whoisonline";
include("whoisonline.php");
break;

case "highscores";
$topic = "Highscores";
$subtopic = "highscores";
include("highscores.php");
break;

case "killstatistics";
$topic = "Last Kills";
$subtopic = "killstatistics";
include("killstatistics.php");
break;

case "houses";
$topic = "Houses";
$subtopic = "houses";
include("houses.php");
break;

case "guilds";
$topic = "Guilds";
$subtopic = "guilds";
include("guilds.php");
break;

case "bans":
 	         $topic = "Bans";
    	         $subtopic = "bans";
    		 include("bans.php");
 	break;  
case "gallery";
		$subtopic = "galerry";
		$topic = "Gallery";
		include("gallery.php");
	break;


case "accountmanagement";
$topic = "Account Management";
$subtopic = "accountmanagement";
include("accountmanagement.php");
break;

case "createaccount";
$topic = "Create Account";
$subtopic = "createaccount";
include("createaccount.php");
break;

case "lostaccount";
$topic = "Lost Account Interface";
$subtopic = "lostaccount";
include("lostaccount.php");
break;

case "tibiarules";
$topic = "Server Rules";
$subtopic = "tibiarules";
include("tibiarules.php");
break;

case "adminpanel":
$topic = "Admin Panel";
$subtopic = "adminpanel";
include("adminpanel.php");
break;

case "forum":
$topic = "Forum";
$subtopic = "forum";
include("forum.php");
break;

case "team";
$subtopic = "team";
$topic = "Gamemasters List";
include("team.php");
break;

case "downloads";
$subtopic = "downloads";
$topic = "Downloads";
include("downloads.php");
break;

case "serverinfo";
$subtopic = "serverinfo";
$topic = "Server Info";
include("serverinfo.php");
break;

case "shopsystem";
$subtopic = "shopsystem";
$topic = "Shop System";
include("shopsystem.php");
break;

case "buypoints";
$subtopic = "buypoints";
$topic = "Buy Points";
include("buypoints.php");
break;

case "gallery";
$subtopic = "gallery";
$topic = "Gallery";
include("gallery.php");
break;

case "namelock";
$subtopic = "namelock";
$topic = "Namelock Manager";
include("namelocks.php");
break;

case "archive";
$subtopic = "archive";
$topic = "News Archives";
include("archive.php");
break;

case "mail";
$subtopic = "mail";
$topic = "Mass emails sender";
include("mail.php");
break;

case "shopadmin";
$subtopic = "shopadmin";
$topic = "Shop Admin";
include("shopadmin.php");
break;

case "records";
$subtopic = "records";
$topic = "Players Online Records";
include("records.php");
break;

case "paypal";
$subtopic = "paypal";
$topic = "PayPal";
include("paypal.php");
break;


}
//generate title of page
if(empty($topic)) {
$title = $GLOBALS['config']['server']["serverName"]." - OTS";
$main_content .= 'Invalid subtopic. Can\'t load page.';
}
else
{
$title = $GLOBALS['config']['server']["serverName"]." - ".$topic;
}
//#####LAYOUT#####

$layout_header = '<script type=\'text/javascript\'>
function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}

function MouseOverBigButton(source)
{
source.firstChild.style.visibility = "visible";
}
function MouseOutBigButton(source)
{
source.firstChild.style.visibility = "hidden";
}
function BigButtonAction(path)
{
window.location = path;
}
var';
if($logged) { $layout_header .= "loginStatus=1; loginStatus='true';"; } else { $layout_header .= "loginStatus=0; loginStatus='false';"; };
$layout_header .= "var activeSubmenuItem='".$subtopic."'; var IMAGES=0; IMAGES='".$config['server']['url']."/".$layout_name."/images'; var LINK_ACCOUNT=0; LINK_ACCOUNT='".$config['server']['url']."';</script>";
include($layout_name."/layout.php");
ob_end_flush();
?>
 

dragon1155

Advanced User
Joined
Sep 22, 2009
Messages
297
Reaction score
1
Odp: Gesior acc maker nawigacja i kilka linijek

dzieki wam moi mili wszystko dziala :) po repucie lapcie.
 
Status
Not open for further replies.
Top