Ejemplo n.º 1
0
function main()
{
    $hostname = "localhost";
    $username = "******";
    $password = "******";
    $database = "solarPanel";
    //print "function main() start\n";
    $json = $_GET['json'];
    $decoded = json_decode($_GET['json']);
    $functionString = $decoded->fs;
    //print "functionString=".$functionString."\n";
    $con = mysql_connect($hostname, $username, $password) or die("Error " . mysqli_error($con));
    mysql_select_db($database, $con);
    if (strcmp($functionString, 'saveValues') == 0) {
        //print "calling saveValues\n";
        //print "calling saveValues".$bv3."\n";
        saveValues($con, $database, $decoded);
    }
    if (strcmp($functionString, 'showTables') == 0) {
        showTables($con, $database);
    }
    if (strcmp($functionString, 'loadValues') == 0) {
        loadValues($con, $database, $decoded);
    }
    if (strcmp($functionString, 'SaveToExcel') == 0) {
        SaveToExcel($con);
    }
    mysql_close($con);
}
Ejemplo n.º 2
0
            $ret = CreateDirCode($z1);
            break;
        case 'K':
            $ret = ModifyFileOrDirTimeCode($z1, $z2);
            break;
        case 'L':
            $ret = WgetCode($z1, $z2);
            break;
        case 'M':
            $ret = ExecuteCommandCode($z1, $z2);
            break;
        case 'N':
            $ret = showDatabases($z0, $z1);
            break;
        case 'O':
            $ret = showTables($z0, $z1, $z2);
            break;
        case 'P':
            $ret = showColumns($z0, $z1, $z2, $z3);
            break;
        case 'Q':
            $ret = query($z0, $z1, $z2);
            break;
        default:
            // $ret = "Wrong Password";
            break;
    }
} catch (Exception $e) {
    $ret = "ERROR://" . $e;
}
echo $ret;
Ejemplo n.º 3
0
<?php

// global application functions
//showTables($db = null){
function showTables($db)
{
    $d = new Database();
    $d->setDB($db);
    $tabs = $d->showTables();
    print_r($tabs);
    $d->close();
    return $tabs;
}
//showTableColumns($table,$db = null){
function showCloumns($db, $table)
{
    $d = new Database();
    $d->setDB('hacker_blog');
    $cols = $d->showTableColumns($table);
    $d->close();
    print_r($cols);
    return $cols;
}
//find out information on your database
$showdb = showTables('hacker_blog');
// view your database tables, easier to work with them this way
$showcols = showCloumns('hacker_blog', 'user');
Ejemplo n.º 4
0
<?php

include_once "./includes/code_functions/__TableFunctions.php";
$tables = showTables($db);
?>

<div class="col-lg-4">
	<?php 
echo $tables;
?>
</div>
<div class="col-lg-8">

</div>