• 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!

[PHP] 2 Requests

Kavvson

Gdy boli cie glowa wez
Joined
Jun 25, 2008
Messages
1,177
Reaction score
72
Location
Poland
First is a standalone way to show a character outfit i use : But it dont work.

I use this query normally (
PHP:
$result = $mysqli->query( 'SELECT * FROM `players` WHERE `name` = \''.$mysqli->real_escape_string( $_GET['editcharacter'] ).'\' LIMIT 1;' )->fetch_assoc( );
)

PHP:
        echo'<table width=100%><tr><td align=center WIDTH=25%>';
                    

            echo'<table with=100% style="border: solid 1px #888888;" CELLSPACING="3"><TR>';        
                        $listaddon = array('128','129','130','131','132','133','134','135','136','137','138','139','140','141','142','143','144','145','146','147','148','149','150','151','152','153','154','155','158','159','251','252','268','269','270','273','278','279','288','289','324','325'); 
                        $lookadd = array('0','1','2','3');
                        foreach ($listaddon as $pid => $name)
                        foreach ($lookadd as $addo => $name) {
                        $addon1 = $SQL->query('SELECT * FROM players WHERE `name` = \''.$mysqli->real_escape_string( $_GET['editcharacter'] ).'\' AND looktype = '.$listaddon[$pid].' AND lookaddons = '.$lookadd[$addo].';')->fetch_assco();

                           if($addon1[looktype] == true ) {
                  

                        $finaddon = $addon1[looktype] + $addon1[lookaddons] * 300;
            echo'<TD with=50% style="background-color: '.$config['site']['darkborder'].'"><img src="images/addons/'.$finaddon.'.gif"/></TD>';
            }


            }
                 echo'</tr>';
                              echo'</TABLE></td>';

Second is a way to display news (foreach) + edit option etc. I need it all to my admin panel. You will get credits.

Code:
CREATE TABLE IF NOT EXISTS `z_news_big` (
  `hide_news` tinyint(1) NOT NULL DEFAULT '0',
  `date` int(11) NOT NULL DEFAULT '0',
  `author` varchar(255) NOT NULL,
  `author_id` int(11) NOT NULL,
  `image_id` int(3) NOT NULL DEFAULT '0',
  `topic` varchar(255) NOT NULL,
  `text` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

INSERT INTO `z_news_big` (`hide_news`, `date`, `author`, `author_id`, `image_id`, `topic`, `text`) VALUES
(0, 1285342738, 'layouts.4za.pl', 1, 0, 'New account manager!', 'Gesior account manager 0.3.6 installed. All options should work fine. Report bugs in acc. maker thread'),
(0, 1285342792, 'As', 1, 4, 'Test', 'Test');
 
It is a lot easier for you to learn PHP by attempting to solve your problems rather than asking for a fix.
 
Back
Top