Exemplo n.º 1
0
 function addItemlist($ilength)
 {
     $inventory = self::getWH($_SESSION["mwcuser"], $ilength);
     $length = strlen($inventory) / $ilength;
     $coumt = 0;
     $path = "build/" . tbuild . "/_dat/items/harmony.php";
     if (file_exists($path)) {
         require $path;
     } else {
         $harm = array();
     }
     $sel = "<SELECT name='itm' id='itm' class='selectbox'>";
     for ($i = 0; $i < $length; $i++) {
         $target = substr($inventory, $i * $ilength, $ilength);
         if ($target != "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" && $target != "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF") {
             $id = rItem::dehex($target, 0, 2);
             $group = rItem::dehex($target, 18, 1);
             if (self::isDenied($id, $group)) {
                 //если вещь нельзя выкладывать
                 continue;
             }
             $ret = itemListShow($target, $harm);
             $sel .= "<option class='{$ret[1]}' value='{$i}'>{$ret[0]}</option>";
             $coumt++;
         }
     }
     $sel .= "</SELECT>";
     return $sel;
 }