function print_import() { global $self, $xurl, $DB; print_header(); ?> <center> <h3>Import DB</h3> <div class="frm"> <b>.sql</b> or <b>.gz</b> file: <input type="file" name="file1" value="" size=40><br> <input type="hidden" name="doim" value="1"> <input type="submit" value=" Upload and Import " onclick="return ays()"><input type="button" value=" Cancel " onclick="window.location='<?php eo($self . '?' . $xurl . '&db=' . $DB['db']); ?> '"> </div> <br><br><br> <!-- <h3>Import one Table from CSV</h3> <div class="frm"> .csv file (Excel style): <input type="file" name="file2" value="" size=40><br> <input type="checkbox" name="r1" value="1" checked> first row contain field names<br> <small>(note: for success, field names should be exactly the same as in DB)</small><br> Character set of the file: <select name="chset"><?php echo chset_select('utf8'); ?> </select> <br><br> Import into:<br> <input type="radio" name="tt" value="1" checked="checked"> existing table: <select name="t"> <option value=''>- select -</option> <?php echo sel(db_array('show tables', NULL, 0, 1), 0, ''); ?> </select> <div style="margin-left:20px"> <input type="checkbox" name="ttr" value="1"> replace existing DB data<br> <input type="checkbox" name="tti" value="1"> ignore duplicate rows </div> <input type="radio" name="tt" value="2"> create new table with name <input type="text" name="tn" value="" size="20"> <br><br> <input type="hidden" name="doimcsv" value="1"> <input type="submit" value=" Upload and Import " onclick="return ays()"><input type="button" value=" Cancel " onclick="window.location='<?php eo($self); ?> '"> </div> --> </center> <?php print_footer(); exit; }
function print_cfg() { global $DB, $err_msg, $self; print_header(); ?> <center> <h3>DB Connection Settings</h3> <div class="frm"> User name: <input type="text" name="v[user]" value="<?php echo $DB['user']; ?> "><br /> Password: <input type="password" name="v[pwd]" value=""><br /> MySQL host: <input type="text" name="v[host]" value="<?php echo $DB['host']; ?> "> port: <input type="text" name="v[port]" value="<?php echo $DB['port']; ?> " size="4"><br /> DB name: <input type="text" name="v[db]" value="<?php echo $DB['db']; ?> "><br /> Charset: <select name="v[chset]"><option value="">- default -</option><?php echo chset_select($DB['chset']); ?> </select><br /> <input type="checkbox" name="rmb" value="1" checked> Remember in cookies for 30 days <input type="hidden" name="savecfg" value="1"> <input type="submit" value=" Apply "><input type="button" value=" Cancel " onClick="window.location='<?php echo $self; ?> '"> </div> </center> <?php print_footer(); }
function print_cfg() { global $DB, $CRYPTDB, $err_msg, $self; print_header(); ?> <center> <div class="frm"> <label class="l">Host:</label><input type="text" name="v[host]" value="<?php echo $DB['host']; ?> "><br> <label class="l">DB user:</label><input type="text" name="v[user]" value="<?php echo $DB['user']; ?> "><br> <label class="l">Password:</label><input type="password" name="v[pwd]" value=""><br> <br> <!-- <label class="l">CryptDB host:</label><input type="text" readonly name="c[host]" value="localhost"><br> <label class="l">DB user:</label><input type="text" name="c[user]" value="<?php echo $CRYPTDB['user']; ?> "><br> <label class="l">Password:</label><input type="password" name="c[pwd]" value=""><br> --> <!--<label class="l">Port:</label><input type="text" readonly name="c[port]" value="<?php echo $CRYPTDB['port']; ?> " size="4"><br>--> <div id="cfg-adv" style="display:none;"> <label class="l">Charset:</label> <select name="v[chset]"><option value="">- default -</option><?php echo chset_select($DB['chset']); ?> </select><br> <br> <br><input type="checkbox" name="rmb" value="1" checked> Remember in cookies for 30 days </div> <center> <input type="hidden" name="savecfg" value="1"> <input type="submit" value=" Apply "><input type="button" value=" Cancel " onclick="window.location='<?php echo $self; ?> '"> </center> </div> </center> <?php print_footer(); }