Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 10.34 KB | None | 0 0
  1. <?php if(!defined('INITIALIZED')) exit;
  2.  
  3.  
  4.     $main_content .= '<div class="TableContainer">
  5.         <div class="CaptionContainer">
  6.             <div class="CaptionInnerContainer">
  7.                 <span class="CaptionEdgeLeftTop" style="background-image:url(layouts/custom/img/content/box-frame-edge.gif);"></span>
  8.                 <span class="CaptionEdgeRightTop" style="background-image:url(layouts/custom/img/content/box-frame-edge.gif);"></span>
  9.                 <span class="CaptionBorderTop" style="background-image:url(layouts/custom/img/content/table-headline-border.gif);"></span>
  10.                 <span class="CaptionVerticalLeft" style="background-image:url(layouts/custom/img/content/box-frame-vertical.gif);"></span>
  11.                 <div class="Text">Commands</div>
  12.                 <span class="CaptionVerticalRight" style="background-image:url(layouts/custom/img/content/box-frame-vertical.gif);"></span>
  13.                 <span class="CaptionBorderBottom" style="background-image:url(layouts/custom/img/content/table-headline-border.gif);"></span>
  14.                 <span class="CaptionEdgeLeftBottom" style="background-image:url(layouts/custom/img/content/box-frame-edge.gif);"></span>
  15.                 <span class="CaptionEdgeRightBottom" style="background-image:url(layouts/custom/img/content/box-frame-edge.gif);"></span>
  16.                     </div>
  17.                         </div>
  18.                             <table class="Table5" cellpadding="0" cellspacing="0">
  19.                                 <tbody>
  20.                                     <tr>
  21.                                         <td>
  22.                                         <div class="InnerTableContainer">
  23.                                             <table style="width:100%;">
  24.                                                 <tbody>
  25.                                                 <tr>
  26.                                                     <td>
  27.                                                         <div class="TableShadowContainerRightTop">
  28.                                                             <div class="TableShadowRightTop" style="background-image:url(layouts/custom/img/content/table-shadow-rt.gif);"></div>
  29.                                                         </div>
  30.                                                         <div class="TableContentAndRightShadow" style="background-image:url(layouts/custom/img/content/table-shadow-rm.gif);">
  31.                                                             <div class="TableContentContainer">
  32.                                                                 <table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
  33.                                                                     <tbody><tr>
  34.                                                                        
  35.                                                                        
  36.                                                                         <td style="float: center;"><center><small><font color="green"> Exemplo para adicionar uma venda.</font></small><br><b>!offer add, itemName, itemCount, itemPrice </b><br><small>example: !offer add, plate armor, 1, 500</small><br><font color="red"><font size="1"></font></font></center><br><br></td>
  37.                                                                         </center>
  38.  
  39.                                                                             <!--<td width="25%"><img src="" style="float: right;"></td>-->
  40.                                                                     </tr>                                  
  41.                                                                 </tbody></table>
  42.                                                             </div>
  43.                                                         </div>                                         
  44.                                                     <tr>
  45.                                                     <td>
  46.                                                         <div class="TableShadowContainerRightTop">
  47.                                                             <div class="TableShadowRightTop" style="background-image:url(layouts/custom/img/content/table-shadow-rt.gif);"></div>
  48.                                                         </div>
  49.                                                         <div class="TableContentAndRightShadow" style="background-image:url(layouts/custom/img/content/table-shadow-rm.gif);">
  50.                                                             <div class="TableContentContainer">
  51.                                                                 <table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
  52.                                                                     <tbody><tr>
  53.                                                                         <td width="40%" style="background: #1a7b1a;color: white;"><center><i class="fas fa-cart-plus" style="font-size: 36px;float: left;"></i><b>!offer buy, AuctionID</b><br><small>example: !offer buy, 1943<br>Esse comando compra uma oferta.</small></center></td>
  54.                                                                         <td width="40%" style="background: #b52525;color: white;"><center><i style="font-size: 36px;float: left;" class="fas fa-trash-alt"></i><b>!offer remove, AuctionID </b><br><small>example: !offer remove, 1943<br>Esse comando remove uma oferta.</small></center></td>
  55.                                                                     </tr>                                  
  56.                                                                 </tbody></table>
  57.                                                             </div>
  58.                                                         </div>                                         
  59.                                                         <div class="TableShadowContainer">
  60.                                                             <div class="TableBottomShadow" style="background-image:url(layouts/custom/img/content/table-shadow-bm.gif);">
  61.                                                                 <div class="TableBottomLeftShadow" style="background-image:url(layouts/custom/img/content/table-shadow-bl.gif);"></div>
  62.                                                                 <div class="TableBottomRightShadow" style="background-image:url(layouts/custom/img/content/table-shadow-br.gif);"></div>
  63.                                                             </div>
  64.                                                         </div>
  65.                                                     </td>
  66.                                                 </tr>
  67.                                         </tbody>
  68.                                     </table>
  69.                                 </div>
  70.                             </td>
  71.                         </tr>
  72.                     </tbody>
  73.                 </table>
  74.             </div>
  75.             </br>
  76.     <div style="float: right;">
  77.         <form action="?subtopic=auction&action=items" method="post">
  78.             <input class="inputclass" type="text" name="pesquisar" value="" placeholder="Item Name" required="">
  79.             <input class="inputbotton" type="submit" name="searching" value="Search" onclick="checkSearch();">
  80.         </form>
  81.     </div>
  82.     </br>
  83.     </br>';
  84.  
  85.  
  86.  
  87.     $page = 0;
  88.     if (isset($_REQUEST['page']))
  89.         $page = (int) $_REQUEST['page'];
  90.  
  91.     $rows = 20;
  92.     $rowsPerPage = 20;
  93.     $found_item = false;
  94.     $submit = trim($_POST['submit']);
  95.     $pesquisar = (string) $_POST['pesquisar'];
  96.     $info = $SQL->query('SELECT * FROM `auction_system` WHERE item_name LIKE "%'.$pesquisar.'%" ORDER BY `item_name` DESC');
  97.  
  98.     if(empty($info))
  99.     {
  100.         $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Auctions</b></td></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD>Currently is no one active Auction.</TD></TR></TABLE>';
  101.         $main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/pedrook/">Yinz</a>.</small></p>';
  102.     }
  103.     else
  104.     {
  105.  
  106.     foreach($SQL->query('SELECT * FROM `auction_system` WHERE item_name LIKE "%'.$pesquisar.'%" ORDER BY `item_name` DESC') as $info)
  107.     {
  108.         $player = new Player();
  109.         $player->load($info['player_id']);
  110.         $cost = round($info['value']/1000, 2);
  111.         if($action == "items")
  112.         {
  113.             if($pesquisar)
  114.             {
  115.                 $found_item = true;
  116.                 $info_item .=
  117.        
  118.         $content .= '<TR>
  119.         <TD><center>'.$info['id'].'</center></TD>
  120.         <TD><center><img src="/images/all/'.$info['item_id'].'.gif"/></center></TD>
  121.         <TD><center>'.$info['item_name'].'</center></TD>
  122.         <TD><center><a href="?subtopic=characters&name='.urlencode($info['name']).'">'.$info['name'].'</a></center></TD>
  123.         <TD><center>'.$info['count'].'</center></TD>
  124.         <TD><center>'.$cost.'k<br /><small>'.$info['value'].'gp</small></center></TD>
  125.         <TD><center>!offer buy, '.$info['id'].'</center></TR>';
  126.             }
  127.         }
  128.        
  129.         if($action == "")
  130.         {
  131.             $info_item .=
  132.        
  133.         $content .= '<TR>
  134.         <TD><center>'.$info['id'].'</center></TD>
  135.         <TD><center><img src="/images/all/'.$info['item_id'].'.gif"/></center></TD>
  136.         <TD><center>'.$info['item_name'].'</center></TD>
  137.         <TD><center><div>Adicionado por <strong>'.$player->getName().'</strong></div></center></TD>
  138.         <TD><center>'.$info['count'].'</center></TD>
  139.         <TD><center>'.$cost.'k<br /><small>'.$info['value'].'gp</small></center></TD>
  140.         <TD><center>!offer buy, '.$info['id'].'</center></TR>';
  141.         }
  142.     }
  143.  
  144.     $main_content .= '
  145.     <div class="TableContainer">
  146.                 <div class="CaptionContainer">
  147.                     <div class="CaptionInnerContainer">
  148.                         <span class="CaptionEdgeLeftTop" style="background-image:url(layouts/custom/img/content/box-frame-edge.gif);"></span>
  149.                         <span class="CaptionEdgeRightTop" style="background-image:url(layouts/custom/img/content/box-frame-edge.gif);"></span>
  150.                         <span class="CaptionBorderTop" style="background-image:url(layouts/custom/img/content/table-headline-border.gif);"></span>
  151.                         <span class="CaptionVerticalLeft" style="background-image:url(layouts/custom/img/content/box-frame-vertical.gif);"></span>
  152.                         <div class="Text"><a href="?subtopic=auction"><font color="white">Trade OFF</font></a><p style="display: inline; float: right; margin: 0 10px 0px 0px;">Filters: <a class="branquim" href="?subtopic=auction">[ ALL Items ]</a></p></div>
  153.                         <span class="CaptionVerticalRight" style="background-image:url(layouts/custom/img/content/box-frame-vertical.gif);"></span>
  154.                         <span class="CaptionBorderBottom" style="background-image:url(layouts/custom/img/content/table-headline-border.gif);"></span>
  155.                         <span class="CaptionEdgeLeftBottom" style="background-image:url(layouts/custom/img/content/box-frame-edge.gif);"></span>
  156.                         <span class="CaptionEdgeRightBottom" style="background-image:url(layouts/custom/img/content/box-frame-edge.gif);"></span>
  157.                             </div>
  158.                                 </div>
  159.                                     <table class="Table5" cellpadding="0" cellspacing="0">
  160.                                         <tbody>
  161.                                             <tr>
  162.                                                 <td>
  163.                                                 <div class="InnerTableContainer">
  164.                                                     <table style="width:100%;">
  165.                                                         <tbody>
  166.                                                         <tr>
  167.                                                             <td>
  168.                                                                 <div class="TableShadowContainerRightTop">
  169.                                                                     <div class="TableShadowRightTop" style="background-image:url(layouts/custom/img/content/table-shadow-rt.gif);"></div>
  170.                                                                 </div>
  171.                                                                 <div class="TableContentAndRightShadow" style="background-image:url(layouts/custom/img/content/table-shadow-rm.gif);">
  172.                                                                     <div class="TableContentContainer">
  173.     <TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>ID</center></b></TD><TD class="white"><b><center>#</center></b></TD><TD class="white"><b><center>Item Name</center></b></TD><TD class="white"><b><center>Player</center></b></TD><TD class="white"><b><center>Count</center></b></TD><TD class="white"><b><center>Cost</center></b></td><TD class="white"><b><center>Buy</center></b></td></TR>'.$content.'</TABLE>';
  174.     $main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/pedrook/">Yinz</a>.</small></p>
  175.     </div>
  176.                                                                 </div>                                         
  177.                                                         </tbody>
  178.                                                     </table>
  179.                                                 </div>
  180.                                             </td>
  181.                                         </tr>
  182.                                     </tbody>
  183.                                 </table>';
  184.  
  185.     }
  186.    
  187.     if(isset($_POST['submit']) && $_POST['submit'] == 'search')
  188.     {
  189.         if(!$found_item)
  190.         {
  191.             $info_item .= 'Este item não existe.';
  192.         }
  193.     }
  194.    
  195.  
  196. $main_content .= '<center><div class="text-center"><ul class="pagin">';
  197. $pages = (int)($rows / $rowsPerPage);
  198. for ($i = 0; $i < $pages; $i++) {
  199.     $x = $i + 1;
  200.     $main_content .= '<li '. (($x - 1) == $page ? 'class="active"' : '') .'><a href="?subtopic=auction&list='.urlencode($list).'&page='.($x - 1).'" data-original-title="" title="">'.($x).'</a></li>';
  201. }
  202. $main_content .= '</ul></div></center></div>';
  203.  
  204.  
  205.     ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement