function loadExperimentFromJson($fileName) { if (isset($fileName)) { $JsonPath = "experiments/" . $fileName; $pagesJson = file_get_contents($JsonPath); $pagesArray = json_decode($pagesJson, true); echo "<h2>Edit Experiment '" . $fileName . "' </h2>\n <ul class='nav nav-tabs' id='tabAdd'>"; foreach ($pagesArray as $pageNum => $jsonString) { if ($pageNum == 'slideInterval') { } elseif ($pageNum == 1) { echo "<li class='active' ><a data-toggle='tab' href='#page" . $pageNum . "'>Page " . $pageNum . " <button class='close' type='button' title='Remove this page'><span class='glyphicon glyphicon-trash'></span></button></a></li>"; } else { //echo "<li><a data-toggle='tab' href='#page" . $pageNum . "'>Page " . $pageNum . " <button class='close' type='button' title='Remove this page'><span class='glyphicon glyphicon-trash'></span></button></a></li>"; addTab($pageNum); } } echo " </ul><div class='tab-content' id='pages'>"; foreach ($pagesArray as $pageNum => $jsonString) { if ($pageNum == 'slideInterval') { } else { addNewEditSlide($pageNum, $jsonString); } } echo "</div><script>\n \$(document).ready(function(){\n var editCanvasNum = document.getElementsByTagName('canvas').length;\n canvasNum = (editCanvasNum/2);\n pageNum = (editCanvasNum/2);\n });\n </script>"; } else { echo "<h2>Create New Experiment </h2><ul class='nav nav-tabs' id='tabAdd'>"; echo "<li class='active' ><a data-toggle='tab' href='#page1'>Page 1 <button class='close' type='button' title='Remove this page'><span class='glyphicon glyphicon-trash'></span></button></a></li>"; echo " </ul><div class='tab-content' id='pages'>"; addNewEditSlide(1, null); echo "</div><script>\n \$(document).ready(function(){\n var editCanvasNum = document.getElementsByTagName('canvas').length;\n canvasNum = (editCanvasNum/2);\n pageNum = (editCanvasNum/2);\n });\n </script>"; } }
function commandRouter($action) { switch ($action) { case 'login': loginUser(); break; case 'createUser': createUser(); break; case 'getUser': getUser(); break; case 'deleteUser': deleteUser(); break; case 'updateUser': updateUser(); break; case 'addTab': addTab(); break; case 'delTab': delTab(); break; case 'editTab': editTab(); break; case 'getTabs': getTabs(); break; case 'addNote': addNote(); break; case 'delNote': delNote(); break; case 'editNote': editNote(); break; case 'getNotes': getNotes(); break; default: break; } }
<?php /*<h2><?php ; ?></h2> <a href="http://<?php echo DOMAIN; ?>/"><p><?php L("to.home") ?></p></a>*/ $tab = addTab(L("404"), "404"); infoBox($tab, L("404"), L("to.home"));
function renderItemFishingList($lootList, $refLoot, $header, $page_seek, $totalRecords, $baseLink, $headMARK) { global $lang, $config; if (!$lootList) { return; } echo '<div class=reportContainer id=' . $headMARK . '>'; addTab($header . ' (' . $totalRecords . ')', $headMARK); echo "<table class=report width=500>"; echo "<tbody>"; echo "<tr><td colspan=2 class=head><a name=\"{$headMARK}\">{$header}</a></td></tr>"; echo "<tr><th>{$lang['zone_name']}</th><th>{$lang['drop']}%</th></tr>"; foreach ($lootList as $area_loot) { echo "<tr>"; echo '<td class=left>' . getFullAreaName($area_loot['loot_entry']) . '</td>'; if ($area_loot['ChanceOrQuestChance'] < 0) { echo "<td>Q" . -$area_loot['ChanceOrQuestChance'] . "%</td>"; } else { echo "<td>" . $area_loot['ChanceOrQuestChance'] . "%</td>"; } echo "</tr>"; } render_Page($page_seek, $totalRecords, 2, $baseLink, $headMARK); echo "</tbody></table></div>"; }
function createReport($header) { global $bw_icon_mode; if (!$this->data_array || !$this->total_data || !$this->column_conf) { return; } $this->slicePage(); $columns = count($this->fields); if ($this->ajax_mode == 0) { echo '<div class=reportContainer id="' . $this->mark . '">'; } echo '<table class=report width=500>'; echo '<thead>'; echo '<tr class=head><td colspan=' . $columns . '>' . $header . '</td></tr>'; echo '<tr>'; foreach ($this->fields as $field) { $f =& $this->column_conf[$field]; echo '<th>'; if ($f['sort'] && $this->total_data > 1) { echo $this->createHref($this->page, $f['sort'], $f['text']); } else { echo $f['text']; } echo '</th>'; } echo '</tr>'; echo '</thead>'; echo '<tbody>'; foreach ($this->data_array as &$data) { $cb = $this->rowCallback; $class = $cb ? $cb($data) : 0; $row_class = $class ? ' class=' . $class : ''; echo '<tr' . $row_class . '>'; foreach ($this->fields as $field) { $f =& $this->column_conf[$field]; echo $f['class'] ? '<td class=' . $f['class'] . '>' : '<td>'; $f['draw']($data); echo '</td>'; } echo '</tr>'; unsetBwIconMode(); } if ($this->size_limit && $this->total_data > $this->size_limit) { $totalPage = floor($this->total_data / $this->size_limit + 0.9999); $page = $this->page; echo '<tr><td colspan=' . $columns . ' class=page>'; for ($i = 1; $i <= $totalPage; $i++) { if ($i != $page) { echo $this->createHref($i, $this->sort_method, $i) . ' '; } else { echo '<b><i>' . $i . ' </i></b>'; } } echo "</td></tr>"; } echo '</tbody></table>'; if ($this->ajax_mode == 0) { echo '</div>'; // Cache data $link = $this->createLink($this->page, $this->sort_method); echo "<script type=\"text/javascript\">ajaxCacheHtmlId('{$this->mark}','{$link}');</script>"; $tabName = $this->total_data > 1 ? $header . ' (' . $this->total_data . ')' : $header; if (!$this->disable_mark) { addTab($tabName, $this->mark); } } }
$fields = array('SPELL_REPORT_ICON', 'SPELL_REPORT_RECIPE', 'SPELL_REPORT_REAGENTS', 'SPELL_REPORT_CREATE'); if ($recipe->Init($fields, $baseLink, 'recipeLIST', $config['fade_limit'], '')) { $recipe->doRequirest('`id` = ?d', $item['spellid_2']); $recipe->createReport($lang['recipe_for']); } } //******************************************************************************** // Рандом энчанты вещи //******************************************************************************** if ($ajaxmode == 0 and ($item['RandomProperty'] or $item['RandomSuffix'])) { $randEnch = $item['RandomProperty'] ? $item['RandomProperty'] : $item['RandomSuffix']; $rows = $dDB->selectPage($totalRecords, "SELECT * FROM `item_enchantment_template` WHERE `entry` = ?d ORDER BY `chance` DESC", $randEnch); if ($rows) { $points = getRandomPropertyPoint($item['ItemLevel'], $item['InventoryType'], $item['Quality']); echo '<div class=reportContainer id=randList>'; addTab($lang['random_enchants'] . ' (' . $totalRecords . ')', 'randList'); echo "<table class=report width=500>"; echo "<tbody>"; echo "<tr class=head><td colspan=4>{$lang['random_enchants']}</td></tr>"; echo "<tr><th>{$lang['enchant_id']}</th><th>{$lang['random_enc_name']}</th><th>{$lang['random_enc_info']}</th><th>{$lang['random_enc_cnance']}</th></tr>"; foreach ($rows as $i_ench) { echo "<tr>"; if ($item['RandomSuffix']) { $prop = getRandomSuffix($i_ench['ench']); echo "<td class=small>" . $prop['id'] . "</td>"; echo "<td class=left> ... " . $prop['name'] . "</td>"; echo "<td class=left>"; for ($j = 1; $j <= 3; $j++) { if ($prop['EnchantID_' . $j]) { $text = getEnchantmentDesc($prop['EnchantID_' . $j]); echo str_ireplace('$i', round($points * $prop['Prefix_' . $j] / 10000, 0), $text) . "<br>";