• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Adding search button at home

kito2

www.masteria.net
Joined
Mar 9, 2009
Messages
3,766
Solutions
1
Reaction score
225
Location
Chile, Santiago
I have this PHP injection at home that show most powerfull guilds, and under the score I would like to add a centered search button (players search).

PHP:
<?php
//Script created by Elf 
//Changed by Paxton to work with Modern AAC
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = $ots->getDBHandle();
echo'    <div class="message"><div class="title">Most powerfull guilds</div>    <div class="content">
                    
<table border="0" cellspacing="3" cellpadding="4" width="100%">
    <tr>';

foreach($SQL->query('SELECT `g`.`id` AS `id`, `g`.`name` AS `name`,
    COUNT(`g`.`name`) as `frags`
FROM `killers` k
    LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`
    LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`
    LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`
    LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`
WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1
    GROUP BY `name`
    ORDER BY `frags` DESC, `name` ASC
    LIMIT 0, 4;') as $guild) {
        if(empty($guild['name'])) continue;
        $is = 1;
    echo'        <td style="width: 25%; text-align: center;">
            <a href="'.WEBSITE.'/index.php/guilds/view/' . $guild['id'] . '"><img src="'.WEBSITE.'/public/guild_logos/' . ((file_exists('public/guild_logos/' . $guild['id'] . '.gif')) ? $guild['id'].'.gif' : 'default.gif') . '" width="64" height="64" border="0"/><br />' . $guild['name'] . '</a><br />' . $guild['frags'] . ' kills
        </td>';
    }

echo'    </tr>
</table>';
    if(empty($is)) {
        echo "<center><font color='red'>There is no guilds yet.</font></center>";
    }
echo "</div>";
echo "</div><br/>";
?>
 
go to /path/to/injections/home/

and create a new folder called 'search' or something like it =D

and create this filde named 'injection.php' inside:
PHP:
<?php
$CI =& get_instance();
$CI->load->helper('form');
echo form_open("character/view");
?>
<div class='message'>
	<div class='title'>Character lookup</div>
	<div class='content'>
		<label>Character name</label>
		<input name='name' id='search' type='text'>
		<input type='submit' value='Search'>
		</form>
	</div>
</div>

it should work
 
Back
Top