Exemple #1
0
 * TODO
 * Consider caching this page, since it is very slow to load when having lots of tags!
 */
include 'conn.php';
include 'includes/tags_functions.php';
$sortOrder = "";
if (isset($_GET['sortOrder'])) {
    $sortOrder = $_GET['sortOrder'];
}
include 'includes/protection.php';
remhtml($sortOrder);
$userName = "";
if (isset($_GET['uname'])) {
    $userName = $_GET['uname'];
}
remhtml($userName);
if ($userName != "") {
    $userStr = "&uname=" . $userName;
    $current_page = "userb.php?uname=" . $userName . "&tag=";
}
$user = new User();
$username = $user->getUsername();
if (USECACHE) {
    require_once 'includes/cache.php';
    $cache =& Cache::getInstance(CACHE_DIR);
    // Generate hash for caching on
    $hashtext = $_SERVER['REQUEST_URI'];
    if ($user->isLoggedIn()) {
        $hashtext .= $user->getUsername();
    }
    $hash = md5($hashtext);
Exemple #2
0
 }
 if (isset($_POST['newpass'])) {
     $newpass = $_POST['newpass'];
 }
 if (isset($_POST['renewpass'])) {
     $renewpass = $_POST['renewpass'];
 }
 include "includes/protection.php";
 if ($actpass != null) {
     remhtml($actpass);
 }
 if ($newpass != null) {
     remhtml($newpass);
 }
 if ($renewpass != null) {
     remhtml($renewpass);
 }
 if (!$partOf) {
     echo "<p class=\"error\">" . T_("You must be the manager of this group") . ".</p>";
 } else {
     if ($actpass != null && $newpass != null && $renewpass != null && valid($actpass, 20) && valid($newpass, 20) && valid($renewpass, 20)) {
         //Change the password
         $passencrypt = $user->encryptPassword($actpass);
         $Query = "select manager from " . TABLE_PREFIX . "groups where group_id=" . $group_id . " and password='******'";
         $dbResult = $dblink->query($Query);
         $count = 0;
         while ($row =& $dbResult->fetchRow(DB_FETCHMODE_ASSOC)) {
             $count++;
         }
         if ($count == 0) {
             echo "<p class=\"error\">" . T_("The actual password is incorrect") . ".</p>";
Exemple #3
0
<title><?php 
echo T_("Check Username");
?>
</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen, projection" />
</head>
<body onload="closeWindow()">
<div style="text-align: center">
<br>
<?php 
//Put the javascript to automatically close the window
echo "<script type=\"text/javascript\"> function closeWindow() {setTimeout(\"window.close()\", 3000);} </script>";
$usernameToCheck = $_GET['usernameToCheck'];
include "includes/protection.php";
if ($usernameToCheck != null) {
    remhtml($usernameToCheck);
}
if ($usernameToCheck != null && valid($usernameToCheck, 20)) {
    include 'conn.php';
    $Query = "select name from " . TABLE_PREFIX . "session where (name='" . $usernameToCheck . "')";
    $dbResult = $dblink->query($Query);
    if ($row =& $dbResult->fetchRow(DB_FETCHMODE_ASSOC)) {
        echo "<b>" . T_("This username is already taken") . "</b>";
    } else {
        echo "<b>" . T_("This username is available") . "!</b>";
    }
} else {
    echo "<b>" . T_("Incorrect username format") . "</b>";
}
?>
<br><br>
Exemple #4
0
 }
 include 'includes/protection.php';
 if ($email != null) {
     remhtml($email);
 }
 if ($passhint != null) {
     remhtml($passhint);
 }
 if ($realname != null) {
     remhtml($realname);
 }
 if ($website != null) {
     remhtml($website);
 }
 if ($information != null) {
     remhtml($information);
 }
 echo "<h2>" . T_("Settings") . " -- " . T_("Modify account information") . "</h2>";
 if ($_POST['submitted']) {
     $displayemail = $displayemail == "on" ? 1 : 0;
     if ($donor) {
         $resultArr = $user->changeAccountInfo($email, $passhint, $style, $donor, $realname, $displayemail, $website, $information);
     } else {
         $resultArr = $user->changeAccountInfo($email, $passhint, $style);
     }
     $success = $resultArr['success'];
     if ($success) {
         echo "<p class=\"success\">" . $resultArr['message'] . "</p>";
         if ($resultArr['optmessage'] != null) {
             echo "<p class=\"notice\">" . $resultArr['optmessage'] . "</p>";
         }
Exemple #5
0
 $user = new User();
 $manager = $user->getUsername();
 $success = false;
 if ($_POST['submitted']) {
     include "includes/protection.php";
     if ($gname != null) {
         remhtml($gname);
     }
     if ($description != null) {
         remhtml($description);
     }
     if ($pass != null) {
         remhtml($pass);
     }
     if ($pass2 != null) {
         remhtml($pass2);
     }
     if ($gname != null && $description != null) {
         if (!(valid($gname, 20) && valid($pass, 20) && valid($pass2, 20) && strlen($description) <= 100)) {
             echo "<p class=\"error\">" . T_("Check for invalid characters or length") . ".</p>";
         } else {
             if ($pass != $pass2) {
                 echo "<p class=\"error\">" . T_("Both passwords have to match") . ".</p>";
             } else {
                 include 'conn.php';
                 $Query = "select group_name from " . TABLE_PREFIX . "groups where (group_name='{$gname}')";
                 //echo($Query . "<br>\n");
                 $dbResult = $dblink->query($Query);
                 $xusers = 0;
                 while ($row =& $dbResult->fetchRow(DB_FETCHMODE_ASSOC)) {
                     $xusers++;
Exemple #6
0
    $pageNb = $_GET['page'];
} else {
    $pageNb = "1";
}
if (isset($_GET['keywords'])) {
    $keywords = $_GET['keywords'];
}
$keywords_original = $keywords;
if ($keywords != null) {
    $keywords = trim($keywords);
    $keywords = preg_replace("/ +/", " ", $keywords);
}
include 'conn.php';
include 'includes/protection.php';
include 'includes/tags_functions.php';
remhtml($pageNb);
$keywords = filter($keywords);
$minTagsNb = ($pageNb - 1) * TAGS_PER_PAGE;
$maxTagsNb = TAGS_PER_PAGE;
if ($keywords != null) {
    include 'header.php';
    echo "<h2>" . T_("Search") . " -- " . $keywords . "</h2>";
    $anyBooks = false;
    $countBookmarks = 0;
    //$words = split(" ", $keywords, 8);
    $bookmarks = getSearchBookmarks($keywords, $minTagsNb, $maxTagsNb);
    //Display the bookmarks
    $displayUser = true;
    $displayDivs = true;
    include 'templates/publicb.tpl.php';
    if (!$anyBooks) {
Exemple #7
0
//####################################################################
$keywords = false;
include 'access.php';
$access = checkAccess();
if ($access) {
    $name = $user->getUsername();
    include 'conn.php';
    // Clean up the data that's been passed to us [LBS 20020211].
    if (isset($_POST['keywords'])) {
        $keywords = $_POST['keywords'];
    }
    if ($keywords != null) {
        $keywords = trim($keywords);
        $keywords = preg_replace("/ +/", " ", $keywords);
        include 'includes/protection.php';
        remhtml($keywords);
        $columns = array('b.url', 'b.description', 'b.title');
        $group_columns = array('g.title', 'g.description');
        $words = split(" ", $keywords, 8);
        $query = "\n\t        SELECT count(*) as total\n\t          FROM " . TABLE_PREFIX . "favourites b\n\t         WHERE b.name = '" . $name . "'";
        //echo "<pre>$query</pre>";
        $result = $dblink->query($query);
        $row =& $result->fetchRow(DB_FETCHMODE_ASSOC);
        $total_bookmarks = $row['total'];
        foreach ($words as $search_string) {
            // This doesn't do anything helpful yet...
            if (preg_match("/^-/", $search_string)) {
                echo "<b>" . T_("Invalid") . "</b>: {$search_string}<br>\n";
            }
            //Store the keywords for the user in table searches
            $domain = $_SERVER['REMOTE_ADDR'];
Exemple #8
0
 include 'includes/protection.php';
 $pageNb = "";
 if (isset($_GET['page'])) {
     $pageNb = $_GET['page'];
 } else {
     $pageNb = "1";
 }
 remhtml($pageNb);
 $perpagenb = "25";
 $minTagsNb = ($pageNb - 1) * $perpagenb;
 $maxTagsNb = $perpagenb;
 $orderBy = "LastLog desc";
 if (isset($_GET['order'])) {
     $orderBy = $_GET['order'];
 }
 remhtml($orderBy);
 echo "<h2>" . T_("Settings") . " -- " . T_("Manage Users") . "</h2>\n";
 if ($_POST['changeStatus']) {
     $uname = $_POST["name"];
     $currentStatus = $_POST["currentStatus"];
     if ($uname != null) {
         $actionStatus = $currentStatus == "disabled" ? "enabled" : "disabled";
         $Query = "update " . TABLE_PREFIX . "session set status='{$actionStatus}' where name='" . $uname . "'";
         //echo($Query . "<br>\n");
         $AffectedRows = $dblink->exec($Query);
         if ($AffectedRows == 1) {
             echo "<p class=\"success\">" . sprintf(T_("You have changed %s's account status"), $uname) . ".</p>\n";
             $success = true;
         }
     } else {
         echo "<p class=\"error\">" . T_("The username is missing") . "</p>\n";
Exemple #9
0
header('Content-Type: application/xml');
$writeStr = "<?xml version=\"1.0\" ?>\n";
$writeStr .= "<rss version=\"2.0\">\n";
$writeStr .= "<channel>\n";
$writeStr .= "<title>" . WEBSITE_NAME . " News</title>\n";
$writeStr .= "<description>News for " . WEBSITE_NAME . "!</description>\n";
$writeStr .= "<link>" . WEBSITE_ROOT . "</link>\n";
$writeStr .= "<language>" . WEBSITE_LOCALE . "</language>\n";
$builddate = date("D, d M Y H:i:s O");
$writeStr .= "<lastBuildDate>{$builddate}</lastBuildDate>\n\n";
include '../includes/convert_date.php';
$Query = "select newsID, date as formatted_time, author, title, date, msg from " . TABLE_PREFIX . "news order by formatted_time DESC";
//echo($Query . "<br>\n");
$dbResult = $dblink->query($Query);
include '../includes/protection.php';
while ($row =& $dbResult->fetchRow(DB_FETCHMODE_ASSOC)) {
    $date = "{$row["formatted_time"]}";
    $date2 = convert_date_feed($date);
    $writeStr .= "<item>\n";
    $writeStr .= "<pubDate>{$date2}</pubDate>\n";
    $writeStr .= "<title>{$row["title"]}</title>\n";
    $desc = "{$row["msg"]}";
    remhtml($desc);
    $writeStr .= "<description>{$desc}</description>\n";
    $writeStr .= "<link>" . WEBSITE_ROOT . "newsdetails.php?id={$row["newsid"]}&amp;src=f</link>\n";
    $writeStr .= "<guid>" . WEBSITE_ROOT . "newsdetails.php?id={$row["newsid"]}&amp;src=f</guid>\n";
    $writeStr .= "</item>\n";
}
$writeStr .= "</channel>\n";
$writeStr .= "</rss>\n";
echo $writeStr;
Exemple #10
0
<title><?php 
echo T_("Check Group Name");
?>
</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen, projection" />
</head>
<body onload="closeWindow()">
<div style="text-align: center">
<br>
<?php 
//Put the javascript to automatically close the window
echo "<script type=\"text/javascript\"> function closeWindow() {setTimeout(\"window.close()\", 3000);} </script>";
$groupToCheck = $_GET['groupToCheck'];
include "includes/protection.php";
if ($groupToCheck != null) {
    remhtml($groupToCheck);
}
if ($groupToCheck != null && valid($groupToCheck, 20)) {
    include 'conn.php';
    $Query = "select group_name from " . TABLE_PREFIX . "groups where (group_name='" . $groupToCheck . "')";
    $dbResult = $dblink->query($Query);
    if ($row =& $dbResult->fetchRow(DB_FETCHMODE_ASSOC)) {
        echo "<b>" . T_("This group name is already taken") . "</b>";
    } else {
        echo "<b>" . T_("This group name is available") . "!</b>";
    }
} else {
    echo "<b>" . T_("Incorrect group format") . "</b>";
}
?>
<br><br>
Exemple #11
0
     remhtml($aname);
 }
 if ($email != null) {
     remhtml($email);
 }
 if ($hint != null) {
     remhtml($hint);
 }
 if ($pass != null) {
     remhtml($pass);
 }
 if ($pass2 != null) {
     remhtml($pass2);
 }
 if ($captcha != null) {
     remhtml($captcha);
 }
 $successMsg = "<p class=\"success\">" . T_("Account created") . "!</p><p>" . sprintf(T_("You have been successfully added to %s"), WEBSITE_NAME) . "!<br>" . sprintf(T_("You need to check your email and activate your account with the given url (or code in the <a href=\"%s\">activation</a> page)"), "activate.php") . "<br>\n" . T_("The email is already sent, but with some free email providers it might take a few hours to receive it") . ".</p>";
 if ($emailrobot != null) {
     // Fake success so the robot thinks he registered an account
     $success = true;
     echo $successMsg;
 } else {
     if ($aname != null && $pass != null && $pass2 != null && $email != null) {
         if (!(valid($aname, 20) && valid($pass, 20) && check_email_address($email))) {
             echo "<p class=\"error\">" . T_("Check for invalid characters or length, or wrong email address format") . ".</p>";
         } else {
             if ($pass != $pass2) {
                 echo "<p class=\"error\">" . T_("Both passwords have to match") . ".</p>";
             } else {
                 include 'conn.php';
Exemple #12
0
You should have received a copy of the GNU General Public License
along with GetBoo; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
***************************************************************************/
$pageNb = "";
if (isset($_GET['page'])) {
    $pageNb = $_GET['page'];
} else {
    $pageNb = "1";
}
remhtml($pageNb);
$displayNb = "";
if (isset($_GET['display'])) {
    $displayNb = $_GET['display'];
}
remhtml($displayNb);
if ($displayNb) {
    $_SESSION['perpagenb'] = $displayNb;
}
$perPageNb = "10";
if ($_SESSION['perpagenb']) {
    $perPageNb = $_SESSION['perpagenb'];
} else {
    $perPageNb = TAGS_PER_PAGE;
}
$minTagsNb = ($pageNb - 1) * $perPageNb;
$maxTagsNb = $perPageNb;
$contaisQuery = strpos($pageUrl, "?");
if (!$contaisQuery === false) {
    $displayUrl = "&amp;display=";
} else {