Exemplo n.º 1
0
            if ($res_db) {
                $row = $res_db->FetchRow();
                if (count($row)) {
                    $databasepass = $row['dbpass'];
                }
            }
            add_acct_db(array('cpid' => $acc_id, 'db' => $databasename, 'dbuser' => $databaseuser, 'dbpass' => $databasepass));
        } else {
            add_message("can not add user to db, no provide user & db name");
        }
    }
}
invalid:
//delete db from manager
if (_get('do') == 'del_db_from_manager' && is_numeric(_get('id'))) {
    del_acct_db(array('id' => _get('id')));
    add_message('delete db=' . _get('id'));
}
//list accts
$accts = list_whm_accts();
//$list_dbs = get_acct_dbs();
?>
<html>
<head>
    <title>Database Cpanel</title>
    <?php 
include 'template/head.php';
?>
</head>
<body>
    <div class="wrapper">
Exemplo n.º 2
0
/**
 * delete db from manager
 * @param $cp
 */
function deldb_from_manager($cp)
{
    if (is_numeric(_get('id'))) {
        del_acct_db(array('id' => _get('id')));
        echo 'delete db=' . _get('id');
    }
}