protected function RenderContent() { $wndCreateUser = new Window(); $wndCreateUser->ID = "wndCreateUser"; $wndCreateUser->Title = "Create User"; $wndCreateUser->BeginContent(); ?> <form method="POST" action="<?php echo System::ExpandRelativePath("~/users/modify"); ?> " onsubmit="wndCreateUser.Hide();"> <div class="FormView" style="width: 100%"> <div class="Field"> <label for="txtLoginID" style="width: 280px;">Login ID:</label> <input type="text" id="txtLoginID" name="user_LoginID" /> </div> <div class="Field"> <label for="txtDisplayName">Display name:</label> <input type="text" id="txtDisplayName" name="user_DisplayName" /> </div> <div class="Field"> <label for="chkAccountLocked">Lock account</label> <input type="checkbox" name="user_AccountLocked" id="chkAccountLocked" /> </div> <div class="Field"> <label for="chkForcePasswordChange">Require password reset at next logon</label> <input type="checkbox" name="user_ForcePasswordChange" id="chkForcePasswordChange" /> </div> </div> <?php $wndCreateUser->BeginButtons(); ?> <input type="submit" class="Button Default" value="Save Changes" /> <a class="Button" href="#" onclick="wndCreateUser.Hide(); return false;">Discard Changes</a> <?php $wndCreateUser->EndButtons(); ?> </form> <?php $wndCreateUser->EndContent(); $users = User::Get(); $lv = new ListView(); $lv->Width = "100%"; $lv->Columns = array(new ListViewColumn("lvcLoginID", "Login ID"), new ListViewColumn("lvcDisplayName", "Display Name"), new ListViewColumnCheckBox("lvcAccountLocked", "Account Locked"), new ListViewColumnCheckBox("lvcPasswordChangeRequired", "Password Change Required")); foreach ($users as $user) { $lv->Items[] = new ListViewItem(array(new ListViewItemColumn("lvcLoginID", "<a href=\"" . System::ExpandRelativePath("~/users/modify/" . $user->ID . "\">" . $user->UserName . "</a>", $user->UserName)), new ListViewItemColumn("lvcDisplayName", $user->DisplayName), new ListViewItemColumn("lvcAccountLocked", $user->AccountLocked), new ListViewItemColumn("lvcPasswordChangeRequired", $user->ForcePasswordChange))); } $lv->Render(); }
?> <?php return true; case "members.rss": header("Content-Type: application/rss+xml"); echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"; echo "<rss version=\"2.0\">\n"; echo "\t<channel>\n"; echo "\t\t<title>Members</title>\n"; echo "\t\t<description>A list of all members in " . System::$Configuration["Application.Name"] . "</description>\n"; echo "\t\t<link>" . System::ExpandRelativePath("~/") . "</link>\n"; echo "\t\t<lastBuildDate>Mon, 06 Sep 2010 00:01:00 +0000 </lastBuildDate>\n"; echo "\t\t<pubDate>Mon, 06 Sep 2009 16:20:00 +0000 </pubDate>\n"; echo "\t\t<ttl>1800</ttl>\n"; $members = User::Get(); foreach ($members as $member) { echo "\t\t<item>\n"; echo "\t\t\t<title>" . $member->LongName . "</title>\n"; echo "\t\t\t<description>" . \JH\Utilities::HtmlEncode($member->ProfileContent->Description) . "</description>\n"; echo "\t\t\t<link>" . System::ExpandRelativePath("~/community/members/" . $member->ShortName) . "</link>\n"; // <guid>unique string per item</guid> echo "\t\t\t<pubDate>Mon, 06 Sep 2009 16:20:00 +0000 </pubDate>\n"; echo "\t\t</item>\n"; } echo "\t</channel>\n"; echo "</rss>"; return true; case "members": require "Members/Main.inc.php"; return true;
{ $this->Title = $title; $this->Description = $description; $this->Type = $type; $this->TargetURL = $targetURL; } } $query = $_GET["q"]; $results = array(); $items = System::$Tasks; $count = count($items); for ($i = 0; $i < $count; $i++) { $item = $items[$i]; $results[] = new SearchResult($item->Title, $item->Description, "Task", $item->TargetURL); } $items = User::Get(); $count = count($items); for ($i = 0; $i < $count; $i++) { $item = $items[$i]; $displayName = $item->DisplayName == null ? $item->UserName : $item->DisplayName; $results[] = new SearchResult($displayName, "", "User", "~/users/modify/" . $item->ID); } $realResults = array(); $count = count($results); for ($i = 0; $i < $count; $i++) { $item = $results[$i]; if (strpos(strtolower($item->Title), strtolower($query)) === false) { continue; } $realResults[] = $item; }
public static function Count($includeAll = false) { return count(User::Get(null, $includeAll)); // $query = "SELECT COUNT(" . System::GetConfigurationValue("Database.TablePrefix") . "Users.user_ID), " . System::GetConfigurationValue("Database.TablePrefix") . "Users.user_ID, " . System::GetConfigurationValue("Database.TablePrefix") . "blocked_members FROM " . System::GetConfigurationValue("Database.TablePrefix") . "Users, " . System::GetConfigurationValue("Database.TablePrefix") . "member_blocked_members WHERE member_emailcode IS NULL AND NOT user_ID IN FROM " . System::GetConfigurationValue("Database.TablePrefix") . "member_blocked_users WHERE user_ID = " . $this->ID . ")"; // $result = $MySQL->query($query); // $values = $result->fetch_array(); // return $values[0]; }