Exemple #1
0
function ItemEditor($ItemID, $ViewMode)
{
    global $_COOKIE, $_SESSION, $page_title, $ItemSection, $ItemEditorSections, $resists, $root_url, $Return, $ShowTitle, $icons_dir, $SpecIncludes, $ItemEditorSectionsDesc;
    require_once './modules/ItemEditor/ajax/js.php';
    require_once 'modules/ItemEditor/constants_ie.php';
    $page_title = "Item Edit";
    $Return .= $SpecIncludes . '<title>' . $page_title . '</title>';
    // Editor Music Options
    if ($_SESSION['IEMusic'] == 1) {
        $Return .= "<div id='Music'><embed src=\"images/001130031538.wav\" hidden=\"true\" autostart=\"true\" loop=\"true\" type=\"application/x-mplayer2\"/></div>";
    } else {
        $Return .= "<div id='Music'></div>";
    }
    $result = mysql_query("SELECT * FROM items WHERE id = '" . $ItemID . "';");
    if (!$result) {
        $Return .= 'Could not run query: ' . mysql_error();
        exit;
    }
    echo '<style>
				.section_header{
					background-color: #fcf8e3;
					border-color: #faebcc;
					color: #8a6d3b;
				}
			</style>';
    ### Loop through item fields
    ### Automatically Generate the column names from the Table
    $columns = mysql_num_fields($result);
    $Item_Name = mysql_result($result, 0, 2);
    $Return .= '<h2>' . $Item_Name . '</h2><small>All changes are not saved until the "Save" button has been pressed.<br>Items can be copied by simple changing the Item ID to a free unassigned ID in the database using the form below</small><hr>';
    $Return .= '
			<form method="POST" id="frmMain" action="min.php?Mod=IE" class="customForm" style="display:inline;">
			<table><tr>
			<td><button type="submit" value="Save" 			class="btn green"><i class="fa fa-save"></i> Save</button></td>
			<td><button type="button" value="Preview Item" 	class="btn yellow" ' . HoverTip("global.php?item_view=" . $ItemID) . '><i class="fa fa-check-square-o"></i> Preview</button></td>
			<td><button type="button" value="Reload Page" 	class="btn blue" onclick="location.reload(false);"><span aria-hidden="true" class="icon-reload"></span> Reload Page</button></td>
			<td><button type="button" value="Auto Scaler" 	class="btn red" onclick="AutoScaler();"><span aria-hidden="true" class="icon-plus"></span> Auto Scaler</button></td>
			</tr></table> ';
    for ($i = 0; $i < $columns; $i++) {
        if ($Debug) {
            echo 'dbg1<br>';
        }
        $FClass = "";
        $FieldName = mysql_field_name($result, $i);
        $FieldNameLabel = $ITD[$FieldName][1];
        if ($FieldNameLabel == False) {
            $FieldNameLabel = $FieldName;
        }
        //Exchange the Field name for the Array field name
        /* Field Data */
        $FieldData = mysql_result($result, 0, $i);
        if ($FieldData == "") {
            $FieldData = $ITD[$FieldName][0];
        }
        if ($FieldName == "Name") {
            PageTitle($ItemID . ": " . $FieldData);
        }
        $CharCount = strlen($FieldData);
        if ($CharCount < 5) {
            $CharCount = 5;
        }
        if ($ITD[$FieldName][2] == False) {
            $InputTitle = "";
        } else {
            $InputTitle = "title='" . $ITD[$FieldName][2] . "' class='form-control '";
        }
        /* Define the Array to Store all Input Fields */
        $FieldKey = $ItemSection[$FieldName][0];
        if ($FieldKey == '') {
            $FieldKey = 'misc';
        }
        $FI[$FieldKey][$FieldName][0] = $FieldNameLabel;
        $FI[$FieldKey][$FieldName][1] = '<input type="text" name="' . $FieldName . '" id="' . $FieldName . '" placeholder="' . $FieldData . '" value="' . $FieldData . '" size="' . $CharCount . '" ' . $InputTitle . ' >';
        if ($FieldName == "color") {
            $colHex = dechex($FieldData);
            $colHex = '#' . str_pad($colHex, 6, "0");
            if (strlen($colHex) == 9) {
                $colHex = str_replace('#ff', '', $colHex);
            }
            $FI[$FieldKey][$FieldName][1] = '
				<input type="text" name="' . $FieldName . '" id="' . $FieldName . '" placeholder="#' . $colHex . '" value="#' . $colHex . '" size="' . $CharCount . '" ' . $InputTitle . ' >
				<div id="color_preview" style="background-color:#' . $colHex . ' !important;border: 1px solid #e5e5e5;width:40px;height:40px"></div>';
        }
        $FI[$FieldKey][$FieldName][2] = $FieldName;
        $SpellData = "<a href='javascript:;' class='btn green' onClick='FieldEditGet(\"" . $FieldName . "\", 1200, 700);'><i class='fa fa-edit'></i> EDIT" . '</a><input type="text" name="' . $FieldName . '" placeholder="' . $FieldData . '" value="' . $FieldData . '" size="' . $CharCount . '" ' . $InputTitle . ' id="' . $FieldName . '"><a class="btn blue" data-' . $FieldName . '="1" ' . HoverTip("global.php?spell_view=" . $FieldData . "") . '>View</a>';
        $FieldData1 = '<input type="text" name="' . $FieldName . '" placeholder="' . $FieldData . '" value="' . $FieldData . '" size="' . $CharCount . '" ' . $InputTitle . ' >';
        if ($ItemSection[$FieldName][2] == 0) {
            $FClass = ' class="' . $FieldKey . '" style="display: none"';
        }
        if ($ItemSection[$FieldName][1] != "NO" && $ItemSection[$FieldName][1] != "") {
            $FI[$FieldKey][$FieldName][1] = ItemInputFromArray($FieldName, $ItemSection[$FieldName][1], $FieldData, $InputTitle);
            continue;
        }
        if ($ItemSection[$FieldName][1] != "NO") {
            $CustData = ItemInputFromArray($FieldName, $ItemSection[$FieldName][1], $FieldData, $InputTitle);
        }
        if ($FieldKey == "topinfo") {
            $FI[$FieldKey][$FieldName][1] = '<input type="text" name="' . $FieldName . '" placeholder="' . $FieldData . '" value="' . $FieldData . '" size="' . $CharCount . '" ' . $InputTitle . '>';
            continue;
        }
        if ($FieldName == "id") {
            $FI[$FieldKey][$FieldName][1] = "<a href='javascript:;' class='btn green' onClick='FieldEditGet(\"" . $FieldName . "\", 500, 600);'><i class='fa fa-edit'></i> EDIT</a><input type='text' name='" . $FieldName . "' placeholder='" . $FieldData . "' value='" . $FieldData . "' size='" . $CharCount . "' " . $InputTitle . " id=" . $FieldName . ">";
            continue;
        }
        if ($FieldName == "icon") {
            /*if(file_exists("cust_assets/icons/item_" . $FieldData . ".png")){
            			$FI[$FieldKey][$FieldName][1] = "<a href='javascript:;' title='' class='btn btn-default' onClick='IconEdit(". $FieldData. ")'><img src='includes/img.php?type=iconimage&id=" . $FieldData ."'  name='MyIcon' title='Click here to Edit your Icon' valgin='top' align='right'></a>"; 
            			$FI[$FieldKey][$FieldName][1] .= '<input type="text" name="' . $FieldName . '" placeholder="'. $FieldData . '" value="'. $FieldData . '" size="'. $CharCount .'" '. $InputTitle . ' id=icon onchange="UpdateIcon('. $FieldData . ')" >';
            		} continue;*/
            $FI[$FieldKey][$FieldName][1] = "<a href='javascript:;' class='btn btn-default' onClick='IconEdit(" . $FieldData . ")'><img class='icon-" . $FieldData . "' name='MyIcon' valgin='top' align='right' width='40px' height='40px'/></a>";
            $FI[$FieldKey][$FieldName][1] .= '<input type="text" name="' . $FieldName . '" placeholder="' . $FieldData . '" value="' . $FieldData . '" size="' . $CharCount . '" ' . $InputTitle . ' id=icon onchange="UpdateIcon(' . $FieldData . ')" >';
            continue;
        }
        if ($FieldName == "idfile") {
            $FI[$FieldKey][$FieldName][1] = "<a href='javascript:;' title='' class='btn btn-default ' onClick='IDFileEdit(" . preg_replace('/IT/i', '', $FieldData) . ")'><img src='includes/img.php?type=weaponimage&id=" . preg_replace('/IT/i', '', $FieldData) . "' name='MyIDFile' title='Click here to Edit your Graphic' class=weapongraphic></a>";
            $FI[$FieldKey][$FieldName][1] .= '<input type="text" name="' . $FieldName . '" placeholder="' . $FieldData . '" value="' . $FieldData . '" size="' . $CharCount . '" ' . $InputTitle . ' id=idfile onchange="UpdateIDFile(' . $FieldData . ')">';
            continue;
        }
        if ($FieldName == "classes") {
            $FI[$FieldKey][$FieldName][1] = "<a href='javascript:;' class='btn green' onClick='FieldEditGet(\"" . $FieldName . "\", 1000, 750);'><i class='fa fa-edit'></i> EDIT</a><input type='text' name='" . $FieldName . "' placeholder='" . $FieldData . "' value='" . $FieldData . "' size='" . $CharCount . "' " . $InputTitle . " id=" . $FieldName . ">";
            continue;
        }
        if ($FieldName == "races") {
            $FI[$FieldKey][$FieldName][1] = "<a href='javascript:;' class='btn green' onClick='FieldEditGet(\"" . $FieldName . "\", 320, 720);'><i class='fa fa-edit'></i> EDIT</a><input type='text' name='" . $FieldName . "' placeholder='" . $FieldData . "' value='" . $FieldData . "' size='" . $CharCount . "' " . $InputTitle . " id=" . $FieldName . ">";
            continue;
        }
        if ($FieldName == "slots") {
            $FI[$FieldKey][$FieldName][1] = "<a href='javascript:;' class='btn green' onClick='FieldEditGet(\"" . $FieldName . "\", 450, 725);'><i class='fa fa-edit'></i> EDIT</a><input type='text' name='" . $FieldName . "' placeholder='" . $FieldData . "' value='" . $FieldData . "' size='" . $CharCount . "' " . $InputTitle . " id=" . $FieldName . ">";
            continue;
        }
        if ($FieldName == "price") {
            $FI[$FieldKey][$FieldName][1] = "<a href='javascript:;' class='btn green' onClick='FieldEditGet(\"" . $FieldName . "\", 400, 500);'><i class='fa fa-edit'></i> EDIT</a><input type='text' name='" . $FieldName . "' placeholder='" . $FieldData . "' value='" . $FieldData . "' size='" . $CharCount . "' " . $InputTitle . " id=" . $FieldName . ">";
            continue;
        }
        if ($FieldName == "scrolleffect") {
            $FI[$FieldKey][$FieldName][1] = "<a href='javascript:;' class='btn green' onClick='FieldEditGet(\"" . $FieldName . "\", 1200, 700);'>" . '<i class="fa fa-edit"></i> EDIT' . '</a><input type="text" name="' . $FieldName . '" placeholder="' . $FieldData . '" value="' . $FieldData . '" size="' . $CharCount . '" ' . $InputTitle . ' id="' . $FieldName . '"><a class="btn blue" data-' . $FieldName . '="1" ' . HoverTip("global.php?spell_view=" . $FieldData . "") . '>View</a>';
            continue;
        }
        if ($FieldName == "casttime") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "casttime_") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "recastdelay") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "recasttype") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "maxcharges") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "scrolleffect") {
            $FI[$FieldKey][$FieldName][1] = $SpellData;
            continue;
        }
        if ($FieldName == "scrolltype") {
            $FI[$FieldKey][$FieldName][1] = $CustData;
            continue;
        }
        if ($FieldName == "scrolllevel") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "scrolllevel2") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "scrollname") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "clickeffect") {
            $FI[$FieldKey][$FieldName][1] = $SpellData;
            continue;
        }
        if ($FieldName == "clicklevel") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "clicklevel2") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "clicktype") {
            $FI[$FieldKey][$FieldName][1] = $CustData;
            continue;
        }
        if ($FieldName == "proceffect") {
            $FI[$FieldKey][$FieldName][1] = $SpellData;
            continue;
        }
        if ($FieldName == "proclevel") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "proclevel2") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "procrate") {
            $FI[$FieldKey][$FieldName][1] = $CustData;
            continue;
        }
        if ($FieldName == "proctype") {
            $FI[$FieldKey][$FieldName][1] = $CustData;
            continue;
        }
        if ($FieldName == "worneffect") {
            $FI[$FieldKey][$FieldName][1] = $SpellData;
            continue;
        }
        if ($FieldName == "wornlevel") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "wornlevel2") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "worntype") {
            $FI[$FieldKey][$FieldName][1] = $CustData;
            continue;
        }
        if ($FieldName == "focuseffect") {
            $FI[$FieldKey][$FieldName][1] = $SpellData;
            continue;
        }
        if ($FieldName == "focuslevel") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "focuslevel2") {
            $FI[$FieldKey][$FieldName][1] = $FieldData1;
            continue;
        }
        if ($FieldName == "focustype") {
            $FI[$FieldKey][$FieldName][1] = $CustData;
            continue;
        }
        if ($FieldName == "bardeffect") {
            $FI[$FieldKey][$FieldName][1] = $SpellData;
            continue;
        }
        if ($FieldName == "proceffect" || $FieldName == "focuseffect" || $FieldName == "clickeffect" || $FieldName == "worneffect" || $FieldName == "bardeffect") {
            $FI[$FieldKey][$FieldName][1] = "<a href='javascript:;' class='btn green' onClick='FieldEditGet(\"" . $FieldName . "\", 1200, 700);'><i class='fa fa-edit'></i> EDIT</a>" . '<input type="text" name="' . $FieldName . '" placeholder="' . $FieldData . '" value="' . $FieldData . '" size="' . $CharCount . '" ' . $InputTitle . ' id="' . $FieldName . '"><a class="btn blue" data-' . $FieldName . '="1" ' . HoverTip("global.php?spell_view=" . $FieldData . "") . '>View</a>';
            continue;
        }
        $FDA = '<input type="text" id="' . $FieldName . '" name="' . $FieldName . '" placeholder="' . $FieldData . '" value="' . $FieldData . '" size="' . $CharCount . '" ' . $InputTitle . ' >';
        if ($FieldName == "banedmgrace") {
            $FI[$FieldKey][$FieldName][1] = "<a href='javascript:;' class='btn green' onClick='FieldEditGet(\"" . $FieldName . "\", 500, 600);'><i class='fa fa-edit'></i> EDIT</a><input type='text' name='" . $FieldName . "' placeholder='" . $FieldData . "' value='" . $FieldData . "' size='" . $CharCount . "' " . $InputTitle . " >";
            continue;
        }
        if ($FieldKey == "") {
            $FI[''][$FieldName][1] = '<input type="text" name="' . $FieldName . '" placeholder="' . $FieldData . '" value="' . $FieldData . '" size="' . $CharCount . '" ' . $InputTitle . ' >';
            continue;
        }
    }
    /* Array Documentation 
    			$FI
    				Key1 [0] = Field Name Label
    				Key2 [1] = Input Field
    				Key3 [2] = Field Name - Unused?
    			Keyed by:
    				$FieldName][0] = Mysql Field name
    			
    			$ItemEditorSections - Comes from includes/constants.php
    				Used to determine section types 
    		*/
    /* This area handles all of the display of the Item Editor */
    $Tabs = array();
    $Rem = array();
    $n = 1;
    foreach ($ItemEditorSectionsDesc as $val) {
        if (!$Rem[$val]) {
            $Rem[$val] = 1;
            $SID = md5($val);
            $n++;
        }
    }
    $t = 1;
    $TSection = array();
    ksort($FI);
    // Sort the iteration of sections alphabetically...
    foreach ($FI as $value) {
        if ($Debug) {
            echo 'dbg2<br>';
        }
        ksort($value);
        // Sort the iteration of fields aplhabetically...
        #print var_dump($value) . '<br>';
        foreach ($value as $value2) {
            if ($Debug) {
                echo 'dbg5<br>';
            }
            $FClass = "";
            $Style = "";
            $DSection2 = "";
            // The following two IF checks fall under the Misc. category by having no index and are miscellaneous uncategorized fields
            if ($ItemSection[$value2[2]][2] == 0) {
                $FClass = $ItemSection[$value2[2]][0];
                $Style = 'style="display: none"';
            }
            if ($ItemSection[$value2[2]][0] == "misc") {
                $FClass = "Unknown";
                $Style = 'style="display: none"';
            }
            // $DSection is a temp selection identifier
            if ($DSection != $ItemSection[$value2[2]][0]) {
                if ($ItemSection[$value2[2]][0] == "misc") {
                    $DSection2 = "Misc.";
                }
                $FClass = $DSection;
                $FClass .= ' itemheader';
                $DSection = $ItemSection[$value2[2]][0];
                $Section = $ItemEditorSections[$DSection];
                if ($Section == "") {
                    $Section = "Misc.";
                }
                $SID = md5($Section);
                if (!$ItemEditorSectionsDesc[$DSection]) {
                    $Tab = "Misc.";
                } else {
                    $Tab = $ItemEditorSectionsDesc[$DSection];
                }
                $Tabs[$SID][0] .= '<tr><th class="section_header"><h4><i class="fa fa-angle-right"></i> ' . $Tab . '<h4></th><th class="section_header"></th></tr>';
            }
            $FClass .= $DSection;
            $Tabs[$SID][0] .= '<tr class="' . $FClass . '" ' . $Style . '><td style="text-align: right;">' . $value2[0] . '</td><td> ' . $value2[1] . '</td></tr>';
        }
        $t++;
        ### Increment Tab Counts
    }
    // Let's print out these Tabs
    $Return .= '
			  <div class="widget">
				<ul class="tabs">';
    $Rem = array();
    $n = 1;
    foreach ($ItemEditorSections as $val) {
        if ($Debug) {
            echo 'dbg3<br>';
        }
        if (!$Rem[$val]) {
            $Rem[$val] = 1;
            if ($ViewMode == 0) {
                $Return .= '<li><a href="#tab' . $n . '">' . $val . '</a></li>';
            }
            $n++;
        }
    }
    $Return .= '</ul>
					<div class="tab_container">';
    $Rem = array();
    $n = 1;
    if ($ViewMode == 1) {
        $Return .= '<table><tr><td>';
    }
    foreach ($ItemEditorSections as $val) {
        if ($Debug) {
            echo 'dbg4<br>';
        }
        if (!$Rem[$val]) {
            $Rem[$val] = 1;
            if ($ViewMode == 0) {
                $Return .= '<div id="tab' . $n . '" class="tab_content"> <table class="table table-hover table-bordered">' . $Tabs[md5($val)][0] . '</table> </div>';
            }
            if ($ViewMode == 1) {
                $DP[$val] = '<table class="table ">' . $Tabs[md5($val)][0] . '</table>';
                #$Return .= $val . '<table class="table table-hover">' . $Tabs[md5($val)][0] . '</table>';
            }
            $n++;
        }
    }
    if ($ViewMode == 1) {
        $Return .= "<td style='vertical-align: top !important;padding-right: 10px;'>" . $DP['Item Info'] . $DP['Bag Info'] . $DP['Restrictions'] . '</td>' . "<td style='vertical-align: top !important;padding-right: 10px;'>" . $DP['Resists'] . $DP['Statistics'] . '</td>' . "<td style='vertical-align: top !important;padding-right: 10px;'>" . $DP['Weapon'] . $DP['Augmentation'] . $DP['Faction'] . '</td>' . "<td style='vertical-align: top !important;padding-right: 10px;'>" . $DP['Spell Related Data'] . $DP['Misc.'] . '</td>';
        $Return .= '</td></tr></table>';
    }
    $Return .= ' </div> 
			<div class="fix"></div>
		</div>';
    return $Return;
}
                            <th>Multiplier</th>
                        </tr>
                    </thead>
                ';
    $result = mysql_query("SELECT\n                lootdrop_entries.*,\n                items.id,\n                items.`Name`,\n                items.icon\n                FROM\n                lootdrop_entries\n                INNER JOIN items ON lootdrop_entries.item_id = items.id\n                WHERE `lootdrop_id` = " . $_GET['show_lootdrop_entries']);
    $item_count = 0;
    while ($row = mysql_fetch_array($result)) {
        echo '
                <tr loot_drop="' . $_GET['show_lootdrop_entries'] . '" item_id="' . $row['item_id'] . '"">
                    <td>
                        <button type="button" class="btn badge btn-default btn-sm red btn-xs" onclick="do_lootdrop_delete(' . $_GET['show_lootdrop_entries'] . ', ' . $row['item_id'] . ')" title="Delete Item from Lootdrop"><i class="fa fa-times"></i> </button>
                    </td>
                    <td nonedit="1">' . $row['item_id'] . '</td>
                    <td style="text-align:left" nonedit="1">
                        <img class="lazy" data-original="cust_assets/icons/item_622.png" style="height:15px;width:auto" src="cust_assets/icons/item_' . $row['icon'] . '.png" style="display: inline;">
                        <a href="javascript:;" ' . HoverTip("global.php?item_view=" . $row['id']) . '>' . (strlen($row['Name']) > 25 ? substr($row['Name'], 0, 25) . '...' : $row['Name']) . '</a>
                    </td>
                    <td field_name="equip_item">' . $row['equip_item'] . '</td>
                    <td field_name="chance">' . $row['chance'] . '</td>
                    <td nonedit="1" style="background-color:orange"> ' . round($_GET['probability'] / 100 * ($row['chance'] / 100) * 100, 3) . '%</td>
                    <td field_name="minlevel">' . $row['minlevel'] . '</td>
                    <td field_name="maxlevel">' . $row['maxlevel'] . '</td>
                    <td field_name="multiplier">' . $row['multiplier'] . '</td>
                </tr>';
        $item_count++;
    }
    echo '</table>';
    echo '<span class="badge label label-danger" style="font-weight:bold">' . $item_count . ' item(s) in lootdrop total</span>';
    $FJS .= '<script type="text/javascript" src="modules/NPC/ajax/npc_top_right_pane_lootdrop_display.js"></script>';
    echo $FJS;
}
 $content_out .= "</tr>";
 $RowClass = "lr";
 for ($count = 1; $count <= $num_rows; $count++) {
     $TableData = "";
     $row = mysql_fetch_array($QueryResult);
     $colHex = dechex($row['color']);
     $colHex = '#' . str_pad($colHex, 6, "0");
     if (strlen($colHex) == 9) {
         $colHex = str_replace('#ff', '', $colHex);
         $colHex = '#' . $colHex;
     }
     $color_display = '<div style="background-color:	' . $colHex . ' !important;border: 1px solid #e5e5e5;width:20px;height:20px;display:inline-block"></div>';
     $TableData .= "<tr valign='top' class='" . $RowClass . "' style='vertical-align:middle;text-align: center;'><td align='center'>";
     $TableData .= "<img class='image-wrap icon-" . $row["icon"] . "' " . $SizeConstraints . "/>" . $color_display;
     $TableData .= "</td><td>";
     $TableData .= " <a href='?M=ItemEditor&Edit=" . $row["id"] . "' id='" . $row["id"] . "' target='" . $row["id"] . "' " . HoverTip("global.php?item_view=" . $row['id']) . " >" . $row["Name"] . "</a><br><small style='color:gray'>" . $row['lore'] . "</small>";
     $TableData .= "</td>";
     $TableData .= "<td><a href='javascript:;' class='btn btn-xs red' onclick='add_to_lootdrop(" . $_GET['loot_drop_add_item_stack'] . ", " . $row['id'] . ")'> Add to Lootdrop <i class='fa fa-sign-in'></i></a></td>";
     $TableData .= "<td>" . $row["id"] . "</td>";
     $TableData .= "<td>" . $dbitypes[$row["itemtype"]] . "</td>";
     $TableData .= "<td>" . number_format($row["ac"]) . "</td>";
     $TableData .= "<td>" . number_format($row["hp"]) . "</td>";
     $TableData .= "<td>" . number_format($row["mana"]) . "</td>";
     $TableData .= "<td>" . number_format($row["damage"]) . "</td>";
     $TableData .= "<td>" . number_format($row["delay"]) . "</td>";
     $TableData .= "<td>" . round($row["damage"] / $row["delay"], 2) . "</td>";
     $TableData .= "</tr>";
     $content_out .= $TableData;
 }
 $content_out .= "</table></center><br><br>";
 echo $content_out;
Exemple #4
0
            while ($row2 = mysql_fetch_array($result2)) {
                $rec_data[$row['RecourseLink']] = $row2;
            }
            $rec_string = '<br><a href="javascript:;" class="btn btn-default btn-xs ' . $target_type_enums[$rec_data[$row['RecourseLink']]["targettype"]][1] . '" target=' . $row['id'] . ' ' . HoverTip("global.php?spell_view=" . $row['RecourseLink']) . '>' . $rec_data[$row['RecourseLink']]['id'] . ' :: ' . $rec_data[$row['RecourseLink']]['name'] . ' <i class="fa fa-arrow-circle-right"></i></a> ';
        }
        echo '<tr>
				<td valign="top" style="text-align:center">' . $row['id'] . '</td>
				<td valign="top" style="text-align:center">
					<button type="button" class="btn btn-default">
						<img src="includes/img.php?type=spellimage&id=' . $row['new_icon'] . '" style="width:30px;height:30px"> 
					</button>
					' . $spell_type_ico . '   
					<br><small class="btn btn-default btn-xs ' . $target_type_enums[$row["targettype"]][1] . '">' . $dbspelltargets[$row["targettype"]] . '</small>
				</td>
				<td valign="top" style="text-align:center">
					<a href="index.php?M=SpellEditor&Edit=' . $row['id'] . '" class="btn btn-default ' . $target_type_enums[$row["targettype"]][1] . '" target=' . $row['id'] . ' ' . HoverTip("global.php?spell_view=" . $row['id']) . '> ' . $row['name'] . ' <i class="fa fa-arrow-circle-right"></i></a> 
					' . $rec_string . '
				</td>
				<td valign="top" style="text-align:center">
					<a href="javascript:;" class="btn btn-default btn-xs" target=' . $row['id'] . ' ' . HoverCloseTip("global.php?spell_view_data_quick=" . $row['id']) . '><i class="fa fa-database"></i> Data </a> 
				</td>
				<td valign="top" style="text-align:center"> <center><small>' . $classes_string . '</small></center></td>
				<td style="text-align:center"><small>' . $Spell_Categories[$row['spell_category']] . '</small></td>
				<td style="text-align:center"><small>' . $row['mana'] . '</small></td>
				<td style="text-align:center"><small>' . $row['EndurCost'] . '</small></td>
				<td style="text-align:center"><small>' . $row['EndurTimerIndex'] . '</small></td>
				<td style="text-align:center"><small>' . ucwords(strtolower($dbskills[$row["skill"]])) . '</small></td> 
				<td style="text-align:center"><small class="btn btn-xs btn-default ' . $dbspellresists_color[$row['resisttype']][1] . ' ">' . $dbr_btn_ico . ' ' . $dbspellresists[$row['resisttype']] . '</small></td> 
				</tr>';
    }
    echo '</tr></table>';