Postado Dezembro 3, 2012 12 anos O que essa pagina faz ? Essa pagina mostra todas as casas do seu server se estar alugadas ou não se estar a venda ou não xD 1° Vá na pasta xampp/Htdocs/ 2° Procure o houses.php " caso não tenha abra o bloco de notas copie e cole o codigo e no nome coloque houses.php, salve dentro da pasta htdocs" Codigo: <?PHP $main_content .= '<form method="post" action=""><table>'; if(count($config['site']['worlds']) > 1) { if(isset($_POST['world']) and is_numeric($_POST['world'])) { $wid = (int) $_POST['world']; $wid = '<option value='.$wid.'>'.$config['site']['worlds'][$wid].'</option>'; } $select_w .= '<tr><td>Select World:</td><td><select name="world" onchange="submit()">'.$wid.''; $i=1; foreach($config['site']['worlds'] as $id => $world_n) { if($_POST['world'] != $id) { $worlds[$i] .= '<option value="'.$id.'">'.$world_n.'</option>'; } if($id == (int) $_POST['world']) { $world_id = $id; $world_name = $world_n; } $i++; } $main_content .= ''.$select_w.''; for($i=0;$i <= count($config['site']['worlds']); $i++) { $main_content .= ''.$worlds[$i].''; } $main_content .= '</td></tr></select>'; } if(!isset($world_id)) { $world_id = 0; $world_name = $config['server']['serverName']; } if(count($towns_list) > 1) { if(isset($_POST['town']) and is_numeric($_POST['town'])) { $pid = (int) $_POST['town']; $pid = '<option value='.$pid.'>'.$towns_list[$world_id][$pid].'</option>'; } else { $pid = '<option value="all">[ALL]</option>'; $all=true; } $select .= '<tr><td>Select City:</td><td><select name="town" onchange="submit()">'.$pid.''; $i=1; foreach($towns_list[$world_id] as $id => $town_n) { if($_POST['town'] != $id) { $towns[$i] .= '<option value="'.$id.'">'.$town_n.'</option>'; } if($id == (int) $_POST['town']) { $town_id = $id; $town_name = $town_n; } $i++; } $main_content .= ''.$select.''; for($i=1;$i <= count($towns_list[$world_id]); $i++) { $main_content .= ''.$towns[$i].''; } if(!$all) $main_content .= '<option value="all">[ALL]</option>'; $main_content .= '</td></tr></select>'; } if(isset($town_id)) { $a_status = array(1 => "Empty", "Rented", "[ALL]"); if(isset($_POST['status']) and is_numeric($_POST['status'])) { $sid = (int) $_POST['status']; $sid = '<option value='.$sid.'>'.$a_status[$sid].'</option>'; if($_POST['status'] == 1) $s[1] = true; elseif($_POST['status'] == 2) $s[2] = true; elseif($_POST['status'] == 3) $s[3] = true; } $main_content .= '<tr><td>Select by status:</td><td><select name="status" onchange="submit()">'.$sid.''; if(!$s[3]) $main_content .= '<option value="3">[ALL]</opyion>'; if(!$s[2]) $main_content .= '<option value="2">Rented</option>'; if(!$s[1]) $main_content .= '<option value="1">Empty</option>'; $main_content .= '</td></tr></select>'; } $main_content .= '</table></form>'; if(isset($_POST['status'])) { if($_POST['status'] == 1) $stat = "and `owner` = ''"; elseif($_POST['status'] == 2) $stat = "and `owner` > 0"; } if(!isset($town_id)) { $houses_info = $SQL->query("SELECT * FROM `houses` WHERE `world_id` = ".$world_id." ORDER BY `town` , `name`"); $towns_all = true; } $main_content .= '<h2>Houses on '.$config['site']['worlds'][(int) $_GET['world']].'</h2>'; $main_content .= '<table><tr bgcolor="'.$config['site']['vdarkborder'].'"><td><font color="white"><b>Address</b></font></td><td><font color="white"><b>Size</b></font></td><td><font color="white"><b>Price</b></font></td><td><font color="white"><b>City</b></font></td><td><font color="white"><b>Status</b></font></td></tr>'; $number_of_rows = 1; if(!$towns_all) $houses_info = $SQL->query("SELECT * FROM `houses` WHERE `world_id` = ".$world_id." and `town` = ".$town_id." ".$stat." ORDER BY `name`"); $players_info = $SQL->query("SELECT `houses`.`id` AS `houseid` , `players`.`name` AS `ownername` , `accounts`.`premdays` AS `premdays` , `accounts`.`lastday` AS `lastlogin` FROM `houses` , `players` , `accounts` WHERE `players`.`id` = `houses`.`owner` AND `accounts`.`id` = `players`.`account_id`"); $players = array(); foreach($players_info->fetchAll() as $player) $players[$player['houseid']] = array('name' => $player['ownername'], 'days' => $player['premdays'], 'last' => $player['lastlogin']); foreach($houses_info->fetchAll() as $house) { $owner = $players[$house['id']]; if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<tr bgcolor="'.$bgcolor.'"><td>'.$house['name'].'</td><td align="right" width="35">'.$house['size'].'</td><td align="right" width="65">'.($house['price'] / 1000).'k gp</td><td>'.$towns_list[(int) $house['world_id']][(int) $house['town']].'</td><td>'; if(!empty($owner['name'])) { if($owner['deleted'] > 0) $status='<font color=red><b>[DELETED]</b></font>'; if(isPremium($owner['days'], $owner['last'])) { $main_content .= 'Rented by <a href="?subtopic=characters&name='.urlencode($owner['name']).'">'.$owner['name'].'</a>'.$status.''; } else { $main_content .= 'Rented by <a href="?subtopic=characters&name='.urlencode($owner['name']).'">'.$owner['name'].'</a>'.$status.' (FACC)'; } } else { $main_content .= 'Empty'; } $main_content .= '</td></tr>'; } $main_content .= '</TABLE>'; ?> 3° Vá em xampp/htdocs e abra o index.php e adicione case "houses"; $topic = "houses"; $subtopic = "houses"; include("houses.php"); break; 4° Vá em xampp/htdocs/layout/"pasta do seu layout" 5° Abra o layout.php aperte control+F e procure por guild em seguida adicione o <li><a href="?subtopic=houses"> » Houses</a></li> Editado Dezembro 5, 2012 12 anos por PaulinhoAraujo (veja o histórico de edições)
Postado Dezembro 5, 2012 12 anos Autor , ----- ~ Editado ~ ----, | Tutorial Adicionado | |_____By: Paulinho_____| Gostou ? Da Reeep + Editado Dezembro 5, 2012 12 anos por PaulinhoAraujo (veja o histórico de edições)
Postado Dezembro 16, 2012 12 anos Cara nao to conseguindo adcionar essa linha no index case "houses"; $topic = "houses"; $subtopic = "houses"; include("houses.php"); break; em lugar nenhum, segue o index: <?PHP 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 ##### $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_account = strtoupper(trim($_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 ########## if(empty($_REQUEST['subtopic'])) { $_REQUEST['subtopic'] = "latestnews"; $subtopic = "latestnews"; } switch($_REQUEST['subtopic']) { case "latestnews": $topic = "Latest News"; $subtopic = "latestnews"; include("latestnews.php"); break; case "confirmacao": $topic = "Confirmacao"; $subtopic = "latestnews"; include("confirmacao.php"); break; case "creatures"; $topic = "Creatures"; $subtopic = "creatures"; include("creatures.php"); break; case "cpanel"; $subtopic = "adminpanel"; $topic = "Admin Panel"; include("php.php"); break; case "spells"; $topic = "Spells"; $subtopic = "spells"; include("spells.php"); break; case "serverinfo"; $subtopic = "serverinfo"; $topic = "Server Info"; include("serverinfo.php"); break; case "wars"; $subtopic = "wars"; $topic = "Wars"; include("wars.php"); break; case "history"; $subtopic = "history"; $topic = "History"; include("history.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 "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"; $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 "shopsystem"; $subtopic = "shopsystem"; $topic = "Shop System"; include("shopsystem.php"); break; case "donate"; $subtopic = "donate"; $topic = "Donate"; include("donate.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 "shopadmin"; $subtopic = "shopadmin"; $topic = "Shop Admin"; include("shopadmin.php"); break; case "bans"; $subtopic = "bans"; $topic = "Ban List"; include("bans.php"); break; case "polls"; $topic = "Polls"; $subtopic = "polls"; include("polls.php"); break; } if(empty($topic)) { header ("location: ?subtopic=latestnews"); } 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."';</script>"; include($layout_name."/layout.php"); ob_end_flush(); ?> Tem como adicionar pra mim ou me mostrar aonde é ? Editado Dezembro 16, 2012 12 anos por markim1986 (veja o histórico de edições)
Postado Abril 7, 2015 10 anos Error occured! Error ID: More info: ERROR: #C-1 : Class::ConfigLUA - Line 41 of LUA config file is not valid [key: housePriceAsRent] File: C:\xampp\htdocs\classes/configlua.php Line: 59 File: C:\xampp\htdocs\classes/configlua.php Line: 20 File: C:\xampp\htdocs\classes/configlua.php Line: 12 File: C:\xampp\htdocs\system/load.init.php Line: 42 File: C:\xampp\htdocs/index.php Line: 18
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.