Esempio n. 1
0
function PrintUsers($entries, $repo_id)
{
    echo "<table id=\"users\">";
    echo "<tr><th>Username</th><th>Name</th></tr>";
    for ($i = 0; $i < $entries["count"]; $i++) {
        $cn = $entries[$i]["cn"][0];
        $name = cleanField($entries[$i]["givenname"][0]);
        $name .= " " . cleanField($entries[$i]["sn"][0]);
        echo "<tr>";
        echo "<td>" . $cn . "</td>";
        echo "<td>" . $name . "</td>";
        echo "<td><button type=\"button\" value=\"Add\" onclick=\"document.location='commit_transfer.php?action=add&type=user&repo=" . $repo_id . "&username="******"'\">Transfer repository</button></td>";
        echo "</tr>";
    }
    echo "</table>";
}
Esempio n. 2
0
function PrintUsers($entries, $repo_id)
{
    echo "<table id=\"users\">";
    echo "<tr><th>Username</th><th>Name</th></tr>";
    for ($i = 0; $i < $entries["count"]; $i++) {
        $cn = $entries[$i]["cn"][0];
        //$status = $entries[$i]["status"][0];
        $name = cleanField($entries[$i]["givenname"][0]);
        $name .= " " . cleanField($entries[$i]["sn"][0]);
        echo "<tr>";
        echo "<td>" . strtolower($cn) . "</td>";
        echo "<td>" . $name . "</td>";
        echo "<td>" . $status . "</td>";
        //if ( $status == "active" )
        echo "<td><button type=\"button\" value=\"Add\" onclick=\"document.location='edit_authorization.php?action=add&type=user&repo=" . $repo_id . "&username="******"'\">Authorize User</button></td>";
        //else
        //    echo "<td><button type=\"button\" value=\"Add\" onclick=\"document.location='edit_authorization.php?action=add&type=user&repo=" . $repo_id . "&username="******"'\" disabled=\"disabled\">Authorize User</button></td>";
        echo "<td><a href=\"" . queryUrl($cn, 'group', TRUE, $repo_id) . "\">Groups containing this user</a> </td>";
        echo "</tr>";
    }
    echo "</table>";
}
Esempio n. 3
0
    global $gbAllowedTags;
    $string = trim($string);
    $string = strip_tags($string, $gbAllowedTags);
    $string = str_replace("|", "&brvbar;", $string);
    $string = str_replace("\"", "&quot;", $string);
    $string = str_replace("\n", "<br>", $string);
    $string = str_replace("\r", "", $string);
    $string = stripslashes($string);
    return $string;
}
$name = $_POST["name"];
$email = $_POST["email"];
$url = $_POST["url"];
$msg = $_POST["msg"];
$spam = $_POST["spam"];
if ($spam == "no") {
    $name = cleanField($name);
    $email = cleanField($email);
    $url = cleanField($url);
    $msg = cleanMessage($msg);
    $date = Time();
    $ip = $_SERVER["REMOTE_ADDR"];
    $newEntry = $name . "|" . $email . "|" . $url . "|" . $msg . "|" . $date . "|" . $ip;
    $fp = fopen("gb_data.txt", "a");
    fwrite($fp, $newEntry . "\n");
    fclose($fp);
    echo Date("d. F H:i", Time());
    //echo "true";
} else {
    echo false;
}
Esempio n. 4
0
 function redraw()
 {
     $this->text = cleanField($_POST[$this->parms['name']]);
 }