Beispiel #1
0
/**
 * Show account/alias details
 * @param string $compte
 * @param string $type
 * @return NULL
 */
function show_my_details($name, $type)
{
    print '<tr><td><a href="' . $type . '.php?view=' . $name . '">' . $name . '</a></td>';
    if ($type == 'compte') {
        print '<td>' . getquota($name, 'user') . '</td>';
    }
    print '<td>';
    print '<a href="' . $type . '.php?del=' . $name . '">
        <img src="inc/suppr.png" /></a>';
    print '</td></tr>';
}
Beispiel #2
0
/**
 * Show domain details
 * @param string $domain
 * @return NULL
 */
function show_domaine_details($domain)
{
    global $conf;
    print '<tr><td><a href="admin.php?domain=' . $domain . '">' . $domain . '</a></td>';
    // TODO : synchronization OpenLDAP<-Active Directory
    print '<td>N/A</td>';
    print '<td><b>' . getnumber($domain, 'compte') . '</b></td>';
    print '<td><b>' . getnumber($domain, 'mail') . '</b></td>';
    print '<td><b>' . getnumber($domain, 'smb') . '</b></td>';
    print '<td><b>' . getnumber($domain, 'alias') . '</b></td>';
    print '<td>' . getquota($domain, 'group') . '</td>';
    print '<td>';
    // suppression possible que si utilisation de LDAP
    if ($conf['domaines']['driver'] == 'ldap') {
        print '<a href="domaine.php?del=' . $domain . '">
            <img src="inc/suppr.png" /></a>';
    } else {
        print "Impossible";
    }
    print '</td></tr>';
}
Beispiel #3
0
<?php

require 'config.php';
header('Content-Type: application/json,charset=utf-8');
$action = $_REQUEST['action'];
if ($action == 'getquota') {
    getquota($_REQUEST['rank']);
} else {
    if ($action == 'getinfo') {
        getInfo($_REQUEST['fbid']);
    } else {
        if ($action == 'getall') {
            getAll();
        } else {
            if ($action == 'random') {
                random($_REQUEST['rank'], $_REQUEST['fbid']);
            }
        }
    }
}
/*$json=json_decode($jsonstr);
//print_r($json);
foreach ($json as $user) {
  $result = $conn->query("update member set response='{$user->rsvp_status}' where fbid='{$user->id}'");
    //mysqli_stmt_execute($stmt);
}*/
function getInfo($fbid)
{
    //echo $conn;
    global $conn;
    if (isset($_REQUEST['token'])) {
 $cmd = $_POST['command'];
 switch ($cmd) {
     case 'auth':
         authenticate();
         break;
     case 'checkauth':
         checkauthentication();
         break;
     case 'userinfo':
         getuserinformation();
         break;
     case 'getprivilages':
         getprivilages();
         break;
     case 'getquota':
         getquota();
         break;
     case 'getitems':
         getitems($_POST['playlistid']);
         break;
     case 'uploaditemfile':
         uploaditemfile($_FILES['file'], $_POST['playlistid']);
         break;
     case 'createitementry':
         createitementry($_POST['name'], $_POST['title'], $_POST['description'], $_POST['type'], $_POST['playlistid']);
         break;
     case 'deleteitem':
         deleteitem($_POST['itemid']);
         break;
     case 'getplaylistitems':
         getplaylistitems();