Пример #1
0
function SpellFieldInput($SpellID, $FieldName, $FieldData)
{
    global $spells_new_fields, $dbskills, $Spell_Categories, $spell_editor_fields, $Spell_Effects, $Base_Formulas, $target_type_enums, $select_fields, $l_sp_buffformulas, $dbspellresists_color, $npc_category;
    if ($FieldName == "id") {
        $dis = " disabled";
    } else {
        $dis = "";
    }
    if ($FieldName == "new_icon") {
        return '
			<input type="text" title="' . $spells_new_fields[$FieldName][0] . '" value="' . $FieldData . '" spell-id="' . $SpellID . '" id="' . $FieldName . '" class="form-control" onchange="DoSpellFieldInputEdit(this.id)" ' . $dis . ' ' . HoverCloseTip("ajax.php?M=SpellEditor&DoIconSelect&p_f=" . $FieldName . "") . '>
			<br>
			<img id="' . $FieldName . '_ico" class="btn btn-default" src="includes/img.php?type=spellimage&id=' . $FieldData . '" ' . HoverCloseTip("ajax.php?M=SpellEditor&DoIconSelect&p_f=" . $FieldName . "") . '>  
			';
    } else {
        if (preg_match('/effectid/i', $FieldName)) {
            $ret .= '<select class="form-control" title="' . $spells_new_fields[$FieldName][0] . '" value="' . $FieldData . '" spell-id="' . $SpellID . '" id="' . $FieldName . '" class="form-control" onchange="DoSpellFieldInputEdit(this.id)" ' . $dis . '>';
            foreach ($Spell_Effects as $key => $val) {
                $ret .= '<option value="' . $key . '"' . ($FieldData == $key ? ' selected="1"' : '') . '>' . $key . ': ' . $val[0] . ' ::: ' . $val[1] . '</option>';
            }
            $ret .= '</select>';
            return $ret;
        } else {
            if (preg_match('/buffdurationformula/i', $FieldName)) {
                $ret .= '<select class="form-control" title="' . $spells_new_fields[$FieldName][0] . '" value="' . $FieldData . '" spell-id="' . $SpellID . '" id="' . $FieldName . '" class="form-control" onchange="DoSpellFieldInputEdit(this.id)" ' . $dis . '>';
                foreach ($l_sp_buffformulas as $key => $val) {
                    $ret .= '<option value="' . $key . '"' . ($FieldData == $key ? ' selected="1"' : '') . '>' . $key . ': ' . $val . '</option>';
                }
                $ret .= '</select>';
                return $ret;
            } else {
                if (preg_match('/formula/i', $FieldName)) {
                    $ret .= '<select class="form-control" title="' . $spells_new_fields[$FieldName][0] . '" value="' . $FieldData . '" spell-id="' . $SpellID . '" id="' . $FieldName . '" class="form-control" onchange="DoSpellFieldInputEdit(this.id)" ' . $dis . '>';
                    foreach ($Base_Formulas as $key => $val) {
                        $ret .= '<option value="' . $key . '"' . ($FieldData == $key ? ' selected="1"' : '') . '>' . $key . ': ' . $val . '</option>';
                    }
                    $ret .= '</select>';
                    return $ret;
                } else {
                    if ($FieldName == "targettype") {
                        $ret .= '<select class="form-control" title="' . $spells_new_fields[$FieldName][0] . '" value="' . $FieldData . '" spell-id="' . $SpellID . '" id="' . $FieldName . '" class="form-control" onchange="DoSpellFieldInputEdit(this.id)" ' . $dis . '>';
                        foreach ($target_type_enums as $key => $val) {
                            $ret .= '<option value="' . $key . '"' . ($FieldData == $key ? ' selected="1"' : '') . '>' . $key . ': ' . $val[0] . '</option>';
                        }
                        $ret .= '</select>';
                        return $ret;
                    } else {
                        if ($FieldName == "resisttype") {
                            $ret .= '<select class="form-control" title="' . $spells_new_fields[$FieldName][0] . '" value="' . $FieldData . '" spell-id="' . $SpellID . '" id="' . $FieldName . '" class="form-control" onchange="DoSpellFieldInputEdit(this.id)" ' . $dis . '>';
                            foreach ($dbspellresists_color as $key => $val) {
                                $ret .= '<option value="' . $key . '"' . ($FieldData == $key ? ' selected="1"' : '') . '>' . $key . ': ' . $val[0] . '</option>';
                            }
                            $ret .= '</select>';
                            return $ret;
                        } else {
                            if ($FieldName == "skill") {
                                $ret .= '<select class="form-control" title="' . $spells_new_fields[$FieldName][0] . '" value="' . $FieldData . '" spell-id="' . $SpellID . '" id="' . $FieldName . '" class="form-control" onchange="DoSpellFieldInputEdit(this.id)" ' . $dis . '>';
                                foreach ($dbskills as $key => $val) {
                                    $ret .= '<option value="' . $key . '"' . ($FieldData == $key ? ' selected="1"' : '') . '>' . $key . ': ' . $val . '</option>';
                                }
                                $ret .= '</select>';
                                return $ret;
                            } else {
                                if ($FieldName == "spell_category") {
                                    $ret .= '<select class="form-control" title="' . $spells_new_fields[$FieldName][0] . '" value="' . $FieldData . '" spell-id="' . $SpellID . '" id="' . $FieldName . '" class="form-control" onchange="DoSpellFieldInputEdit(this.id)" ' . $dis . '>';
                                    foreach ($Spell_Categories as $key => $val) {
                                        $ret .= '<option value="' . $key . '"' . ($FieldData == $key ? ' selected="1"' : '') . '>' . $key . ': ' . $val . '</option>';
                                    }
                                    $ret .= '</select>';
                                    return $ret;
                                } else {
                                    if ($FieldName == "npc_category") {
                                        $ret .= '<select class="form-control" title="' . $spells_new_fields[$FieldName][0] . '" value="' . $FieldData . '" spell-id="' . $SpellID . '" id="' . $FieldName . '" class="form-control" onchange="DoSpellFieldInputEdit(this.id)" ' . $dis . '>';
                                        foreach ($npc_category as $key => $val) {
                                            $ret .= '<option value="' . $key . '"' . ($FieldData == $key ? ' selected="1"' : '') . '>' . $key . ': ' . $val . '</option>';
                                        }
                                        $ret .= '</select>';
                                        return $ret;
                                    } else {
                                        if ($select_fields[$FieldName]) {
                                            $ret .= '<select class="form-control" title="' . $spells_new_fields[$FieldName][0] . '" value="' . $FieldData . '" spell-id="' . $SpellID . '" id="' . $FieldName . '" class="form-control" onchange="DoSpellFieldInputEdit(this.id)" ' . $dis . '>';
                                            foreach ($select_fields[$FieldName] as $key => $val) {
                                                $ret .= '<option value="' . $key . '"' . ($FieldData == $key ? ' selected="1"' : '') . '>' . $key . ': ' . $val . '</option>';
                                            }
                                            $ret .= '</select>';
                                            return $ret;
                                        } else {
                                            if ($FieldName == "spellanim") {
                                                return ' 
			<div id="spellanim_video"> 
				<object width="360" height="420" data="http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf" type="application/x-shockwave-flash" style="border 5px black;"> 
					<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf" /> 
					<param name="allowfullscreen" value="true" /> 
					<param name="allowscriptaccess" value="always" /> 
					<param name="flashvars" value=\'config={"plugins":{"pseudo":{"url":"flowplayer.pseudostreaming-3.1.3.swf"},"controls":{"backgroundColor":"#000000","backgroundGradient":"low"}},"clip":{"provider":"pseudo","url":"cust_assets/spell_animations/' . $FieldData . '.flv"},"playlist":[{"provider":"pseudo","url":"cust_assets/spell_animations/' . $FieldData . '.flv"}]}\' /> 
				</object> 
			</div>
			<br>
			<input type="text" title="' . $spells_new_fields[$FieldName][0] . '" value="' . $FieldData . '" spell-id="' . $SpellID . '" id="' . $FieldName . '" class="form-control" onchange="DoSpellFieldInputEdit(this.id)" ' . $dis . ' ' . HoverCloseTip("ajax.php?M=SpellEditor&DoSpellAnimSelect&p_f=" . $FieldName . "") . '>
			';
                                            } else {
                                                return '<input type="text" title="' . $spells_new_fields[$FieldName][0] . '" value="' . $FieldData . '" spell-id="' . $SpellID . '" id="' . $FieldName . '" class="form-control" onchange="DoSpellFieldInputEdit(this.id)" ' . $dis . '>';
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
Пример #2
0
            }
            $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>';
    echo '</tr></table>';
}