示例#1
0
    protected function RenderContent()
    {
        ?>
		<form method="POST">
			<div class="LoginContainer">
				<div class="Billboard">
					<img src="<?php 
        echo System::ExpandRelativePath("~/Images/Billboard.png");
        ?>
" />
				</div>
				<div class="Branding">
					Log in to <span class="ProductName"><?php 
        echo System::GetConfigurationValue("Application.Name");
        ?>
</span>
				</div>
				<div class="Credentials">
					<p><?php 
        echo System::GetConfigurationValue("Manager.LoginScreen.WelcomeMessage");
        ?>
</p>
					<div class="FormView">
						<div class="Field">
							<label for="txtUserName">User <u>N</u>ame</label>
							<input type="text" name="user_LoginID" id="txtUserName" placeholder="User name" />
						</div>
						<div class="Field">
							<label for="txtPassword"><u>P</u>assword</label>
							<input type="password" name="user_Password" id="txtPassword" placeholder="Password" />
						</div>
						<?php 
        if ($this->InvalidCredentials) {
            ?>
						<div class="Field">
							<span class="ErrorMessage">Incorrect user name or password. Please try again.</span>
						</div>
						<?php 
        }
        ?>
					</div>
					<div class="ButtonContainer">
						<input type="submit" value="Continue" />
					</div>
				</div>
				<div class="Footer">
					<?php 
        echo System::GetConfigurationValue("Manager.LoginScreen.FooterMessage");
        ?>
				</div>
			</div>
		</form>
		<?php 
    }
 public static function GetByAssoc($values)
 {
     $resource = new MarketResourceType();
     $resource->ID = $values["resourcetype_ID"];
     $resource->Name = $values["resourcetype_Name"];
     $resource->TitleSingular = $values["resourcetype_TitleSingular"];
     $resource->TitlePlural = $values["resourcetype_TitlePlural"];
     $query = "SELECT * FROM " . System::GetConfigurationValue("Database.TablePrefix") . "MarketResourceBankDetails WHERE bankdetail_ResourceTypeID = " . $resource->ID;
     global $MySQL;
     $result = $MySQL->query($query);
     $values = $result->fetch_assoc();
     $resource->BankInfo = MarketResourceBankInfo::GetByAssoc($values);
     return $resource;
 }
 public static function Get($max = null)
 {
     global $MySQL;
     $query = "SELECT * FROM " . System::GetConfigurationValue("Database.TablePrefix") . "SecurityPermissions";
     if (is_numeric($max)) {
         $query .= " LIMIT " . $max;
     }
     $result = $MySQL->query($query);
     $count = $result->num_rows;
     $retval = array();
     for ($i = 0; $i < $count; $i++) {
         $values = $result->fetch_assoc();
         $item = SecurityPermission::GetByAssoc($values);
         if ($item == null) {
             continue;
         }
         $retval[] = $item;
     }
     return $retval;
 }
示例#4
0
 protected function BeforeContent()
 {
     parent::BeforeContent();
     $tbsCommunity = new TabStrip("tbsCommunity");
     $tbsCommunity->TabPosition = TabContainerTabPosition::Top;
     $tbsCommunity->Tabs[] = new TabStripTab("tabMembers", "<i class=\"fa fa-users\"></i> <span class=\"Text\">Members (" . User::Count() . ")</span>", "~/community/members", null, $this->Name == "members");
     if (System::GetConfigurationValue("Groups.Enabled", false)) {
         $tbsCommunity->Tabs[] = new TabStripTab("tabGroups", "<i class=\"fa fa-comments\"></i> <span class=\"Text\">Groups (" . Group::Count() . ")</span>", "~/community/groups", null, $this->Name == "groups");
     }
     if (System::GetConfigurationValue("Pages.Enabled", false)) {
         $tbsCommunity->Tabs[] = new TabStripTab("tabPages", "<i class=\"fa fa-flag\"></i> <span class=\"Text\">Pages (" . Page::Count() . ")</span>", "~/community/pages", null, $this->Name == "pages");
     }
     $tbsCommunity->Render();
     /*
     	?>
     	<table style="width: 100%">
     		<tr>
     <td style="width: 128px; vertical-align: top;">
     	<?php
     		// $actionList = new PsychaticaActionList();
     		// $actionList->Items = array
     		// (
     		//		new PsychaticaActionListItem("~/community/members", "Members (" . User::Count() . ")"),
     		//		new PsychaticaActionListItem("~/community/groups", "Groups (" . User::Count() . ")"),
     		//		new PsychaticaActionListItem("~/community/pages", "Pages (" . User::Count() . ")")
     		// );
     		// $actionList->Items[1]->Selected = true;
     	?>
     	
     	<div class="ActionList">
     		<?php
     		// if (System::$Configuration["Members.Enabled"]) {
     		if ($pagename == "members") {
     			if ($outline) { ?> <a class="Selected" href="<?php echo(System::ExpandRelativePath("~/community/members")); ?>"> <?php }
     			else { ?> <span class="Selected"> <?php }
     		} else { ?><a href="<?php echo(System::ExpandRelativePath("~/community/members")); ?>"> <?php } ?>
     		Members (<?php echo(User::Count()); ?>)
     			<?php if ($pagename == "members" && !$outline) { ?> </span> <?php } else { ?> </a> <?php }
     		//	}
     		
     		if (System::$Configuration["Groups.Enabled"]) {
     		if ($pagename == "groups") {
     			if ($outline) { ?> <a class="Selected" href="<?php echo(System::ExpandRelativePath("~/community/groups")); ?>"> <?php }
     			else { ?> <span class="Selected"> <?php }
     		} else { ?><a href="<?php echo(System::ExpandRelativePath("~/community/groups")); ?>"> <?php } ?>
     		Groups (<?php echo(Group::Count()); ?>)
     			<?php if ($pagename == "groups" && !$outline) { ?> </span> <?php } else { ?> </a> <?php }
     		}
     		
     		if (System::$Configuration["Pages.Enabled"]) {
     		if ($pagename == "pages") {
     			if ($outline) { ?> <a class="Selected" href="<?php echo(System::ExpandRelativePath("~/community/pages")); ?>"> <?php }
     			else { ?> <span class="Selected"> <?php }
     		} else { ?><a href="<?php echo(System::ExpandRelativePath("~/community/pages")); ?>"> <?php } ?>
     		Pages (<?php echo(Page::Count()); ?>)
     			<?php if ($pagename == "pages" && !$outline) { ?> </span> <?php } else { ?> </a> <?php }
     		}
     		
     		if (System::$Configuration["Forums.Enabled"]) {
     		if ($pagename == "forums") {
     			if ($outline) { ?> <a class="Selected" href="<?php echo(System::ExpandRelativePath("~/community/forums")); ?>"> <?php }
     			else { ?> <span class="Selected"> <?php }
     		} else { ?><a href="<?php echo(System::ExpandRelativePath("~/community/forums")); ?>"> <?php } ?>
     		Forums (<?php echo(Forum::Count()); ?>)
     			<?php if ($pagename == "forums" && !$outline) { ?> </span> <?php } else { ?> </a> <?php }
     		}
     		?>
     	</div>
     </td>
     <td>
     	<?php
     */
 }
示例#5
0
 public function Delete()
 {
     if ($this->Language == null) {
         return false;
     }
     global $MySQL;
     $query = "SELECT COUNT(*) FROM " . System::GetConfigurationValue("Database.TablePrefix") . "LanguageStrings WHERE languagestring_LanguageID = " . $this->Language->ID . " AND languagestring_StringName = '" . $MySQL->real_escape_string($this->Name) . "'";
     $result = $MySQL->query($query);
     if ($MySQL->errno != 0) {
         return false;
     }
     $values = $result->fetch_array();
     $count = $values[0];
     if ($count > 0) {
         $query = "DELETE FROM " . System::GetConfigurationValue("Database.TablePrefix") . "LanguageStrings WHERE languagestring_LanguageID = " . $this->Language->ID . " AND languagestring_StringName = '" . $MySQL->real_escape_string($this->Name) . "'";
         $result = $MySQL->query($query);
         return $result !== false;
     }
     return false;
 }
示例#6
0
">Back to <?php 
    echo System::GetConfigurationValue("Application.Name");
    ?>
</a>
	</p>
	<?php 
    $page->EndContent();
}), new ModulePage("purchase", array(new ModulePage("", function ($path) {
    $page = new WebPage();
    $page->BeginContent();
    ?>
					<div class="Card">
						<div class="Title">Buy PsychatiGOLD with PayPal&reg;</div>
						<div class="Content">
							<p>Thank you for choosing to support PhoenixSNS and <?php 
    echo System::GetConfigurationValue("Application.Name");
    ?>
 development by purchasing PsychatiGold!</p>
							<p>PsychatiGold lets you get ahead of the game by purchasing a small, medium, or large pack of gold. Please choose the package you need:</p>
							<?php 
    $paypalForm = new PayPalForm("frmPurchase", "USD", "-----BEGIN PKCS7-----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-----END PKCS7-----");
    $paypalForm->BeginContent();
    ?>
								<table style="width: 100%;" border="1">
									<tr>
										<th style="width: 25%;">Amount</th>
										<th style="width: 25%;">What you pay (in USD)</th>
										<th style="width: 25%;">What you get (in PsychatiGold)</th>
										<th style="width: 25%;">Equivalent amount in PsychatiSilver</th>
									</tr>
									<tr>
    protected function RenderContent()
    {
        $CurrentUser = User::GetCurrent();
        ?>
			<div class="CardSet" style="width: 30%">
				<div class="Card">
					<div class="Title"><i class="fa fa-globe"></i><span class="Title">World</span></div>
					<div class="Content">
						<span class="Emphasis">No friends</span> are in the World at the moment
					</div>
					<div class="Actions Vertical">
						<a href="#">Invite a friend to a personal Place</a>
						<a href="#">Explore the World</a>
					</div>
				</div>
				<div class="Card">
					<div class="Title">
						<i class="fa fa-money"></i> <span class="Text">Resources</span>
					</div>
					<div class="Content" style="text-align: center;">
					<?php 
        $resources = MarketResourceType::Get();
        foreach ($resources as $resource) {
            ?>
							<div class="Resource">
								<div class="Icon"><img src="<?php 
            echo System::ExpandRelativePath("~/images/" . System::GetConfigurationValue("Application.DefaultResourceBundle") . "/Resources/24x24/" . $resource->ID . ".png");
            ?>
" title="<?php 
            echo $resource->TitlePlural;
            ?>
" /></div>
								<div class="Value"><?php 
            echo MarketResourceTransaction::GetAmountByUser($CurrentUser, $resource);
            ?>
</div>
							</div>
							<?php 
        }
        ?>
					</div>
					<div class="Actions Vertical">
						<a href="#">Learn more about earning credits</a>
						<a href="#">Earn interest by putting your credits in the Bank</a>
						<a href="<?php 
        echo System::ExpandRelativePath("~/contribute/purchase");
        ?>
">Get more with PsychatiGold</a>
					</div>
				</div>
				<div class="Card">
					<div class="Title">
						Fashion
					</div>
					<div class="Content">
						<span class="Emphasis">No new items</span> available in the Market
					</div>
					<div class="Actions Vertical">
						<a href="#"><i class="fa fa-shopping-cart"></i> <span class="Text">Visit the Market to buy and sell items</span></a>
					</div>
				</div>
			</div>
			<div class="CardSet" style="width: 30%">
				<?php 
        /*
        <div class="Card">
        	<div class="Title"><i class="fa fa-globe"></i><span class="Title">Next scheduled maintenance</span></div>
        	<div class="Content">
        	<?php
        		$et = Tenant::GetCurrent()->EndTimestamp;
        		if ($et == null)
        		{
        			?><span class="Emphasis">To be determined</span><?php
        		}
        		else
        		{
        			?><span class="Emphasis"><?php echo($et); ?></span><?php
        		}
        	?>
        	</div>
        </div>
        */
        ?>
				<div class="Card">
					<div class="Title"><i class="fa fa-information"></i><span class="Title">Fight the evil horde!</span></div>
					<div class="Content">
						<p>An invasion is taking place! Gather your wits and tactics to beat the enemy!</p>
						<p>14 friends play this</p>
					</div>
					<div class="Actions Vertical">
						<a href="#">Play War of Ages</a>
					</div>
				</div>
			</div>
			<div class="CardSet" style="width: 30%">
				<div class="Card">
					<div class="Title"><i class="fa fa-globe"></i><span class="Title"><a href="#">alcexhim</a> invited you to his Place!</span></div>
					<div class="Content">
						<span class="Emphasis">My Personal Room</span>
					</div>
					<div class="Actions Vertical">
						<a href="#">Go to alcexhim's Place</a>
					</div>
				</div>
			</div>
			<?php 
        /*
        $stories = DashboardStory::Get();
        if (count($stories) > 0)
        {
        	foreach ($stories as $story)
        	{
        		$card = new Card('card' . $story->ID, $story->Title, $story->Content, $story->ClassName, $story->IconName);
        		$card->Actions = array
        		(
        			new CardAction(LanguageString::GetByName("unlike"), "#", null, 'thumbs-o-up', '_blank', 4),
        			new CardAction(LanguageString::GetByName("comment"), null, null, "comment", "_blank"),
        			new CardAction(LanguageString::GetByName("share"), null, null, "share", "_blank")
        		);
        		$card->Render();
        	}
        }
        else
        {
        	?><p>There's nothing here!</p><?php
        }
        */
        /*
        (new Card('card1', '<a href="#">alcexhim</a> posted a video <span class="Location"> at <a href="/world/town-square">Town Square</a>',
        'Just chillin\' with the peeps.',
        null, "video-camera",
        array
        (
        	new CardAction(LanguageString::GetByName("like"), "#", null, "thumbs-up", null),
        )))->Render();
        
        (new Card('card2', "Ready for the next big thing in virtual concert production?",
        '<a href="http://www.concertroid.com" target="_blank"><img class="Advertisement" style="width: 100%;" src="http://www.concertroid.com/images/logo.png" alt="http://www.concertroid.com/" /></a>',
        "Sponsored", "star",
        array
        (
        	new CardAction("Like Concertroid on Psychatica", "#", null, 'thumbs-up', '_blank'),
        	new CardAction("Visit Web Site", "http://www.concertroid.com", null, "external-link", "_blank")
        )))->Render();
        
        (new Card('card3', "Psychatica design updated",
        'The new design is based around the concept of &quot;cards&quot;, which can update automatically
        over time and present you with only the most important information and an intuitive way to act
        upon it.',
        "Official", "info",
        array
        (
        	new CardAction(LanguageString::GetByName("unlike"), "#", null, 'thumbs-o-up', '_blank', 4),
        	new CardAction(LanguageString::GetByName("comment"), null, null, "comment", "_blank"),
        	new CardAction(LanguageString::GetByName("share"), null, null, "share", "_blank")
        )))->Render();
        
        (new Card('card4', "Psychatica fixes and updates",
        'The major issue with Journal creation has been fixed, and the
        Market now has some items for you to buy. Enjoy the new fashion
        items in the <a href="' . System::ExpandRelativePath("~/market") . '">Psychatica Market</a>!',
        "Official", "info",
        array
        (
        	new CardAction(LanguageString::GetByName("like"), "#", null, 'thumbs-up', '_blank', 1),
        	new CardAction(LanguageString::GetByName("comment"), null, null, "comment", "_blank"),
        	new CardAction(LanguageString::GetByName("share"), null, null, "share", "_blank")
        )))->Render();
        
        (new Card('card4', "Psychatica updates",
        'The terminology &quot;User name&quot; for the private credential associated with your account has been changed to
        &quot;User ID&quot; to avoid confusion with the publicly-visible Short and Long names so that people are not encouraged
        to use the same User ID as their Short or Long name. It will eventually be made impossible to create a user account
        with the same User ID and Short/Long name.',
        "Official", "info",
        array
        (
        	new CardAction(LanguageString::GetByName("like"), "#", null, 'thumbs-up', '_blank', 1),
        	new CardAction(LanguageString::GetByName("comment"), null, null, "comment", "_blank"),
        	new CardAction(LanguageString::GetByName("share"), null, null, "share", "_blank")
        )))->Render();
        
        (new Card('card4', "Psychatica updates",
        'The World button on the navigation bar now only displays when you are logged in. This is to avoid confusing users who don\'t
        realize that they must be logged in to use the World.',
        "Official", "info",
        array
        (
        	new CardAction(LanguageString::GetByName("like"), "#", null, 'thumbs-up', '_blank', 1),
        	new CardAction(LanguageString::GetByName("comment"), null, null, "comment", "_blank"),
        	new CardAction(LanguageString::GetByName("share"), null, null, "share", "_blank")
        )))->Render();
        */
        /*
        <div class="Card">
        	<div class="Title"><span class="Text"><?php echo(LanguageString::GetByName("currentevents")); ?></span></div>
        	<div class="Content">
        		<div class="ListBox">
        			<?php
        			$events = Event::Get();
        			foreach ($events as $event)
        			{
        			?>
        			<a href="<?php echo(\System::ExpandRelativePath("~/Events/" . $event->Name)); ?>">
        				<div class="ListItemTitle">
        					<?php
        						echo("<span class=\"EventType\" style=\"color: " . $event->Type->Color . "; border-color: " . $event->Type->Color . ";\">" . $event->Type->Title . "</span> ");
        						echo($event->Title);
        						echo("<span class=\"EventDate\">" . $event->BeginDate . " &mdash; " . $event->EndDate . "</span>");
        					?>
        				</div>
        				<div class="ListItemDescription">
        					<?php
        						echo($event->Description);
        					?>
        				</div>
        			</a>
        			<?php
        			}
        			?>
        		</div>
        	</div>
        </div>
        */
        /*
        $img = "~/images/wallpaper/bg1.jpg";
        (new Card('card4', "New wallpaper available",
        '<a style="text-align: center; display: block;" href="' . System::ExpandRelativePath($img) . '" target="_blank"><img src="' . System::ExpandRelativePath($img) . '" style="width: 300px; height: auto;" /></a>
        <span class="Description">
        	Our Phoenix-human hybrid girl Phelicia loves to go sky-tumbling! She will keep you company on your desktop or laptop PC. Be on the lookout for more designs targeted at mobile devices!
        </span><br /><br />Designed by <a href="#">roololoo</a>',
        "Official", "picture-o",
        array
        (
        	new CardAction(LanguageString::GetByName("like"), "#", null, 'thumbs-up', '_blank', 1),
        	new CardAction(LanguageString::GetByName("comment"), null, null, "comment", "_blank"),
        	new CardAction(LanguageString::GetByName("download"), null, null, "download", "_blank")
        )))->Render();
        */
        /*
        <tr>
        	<?php
        	if (\System::$Configuration["Questions.Enabled"])
        	{
        	?>
        	<td style="width: 50%; vertical-align: top;">
        		<div class="Panel">
        			<h3 class="PanelTitle"><?php echo(LanguageString::GetByName("questions")); ?></h3>
        			<div class="PanelContent">
        			<?php
        				$questions = Question::Enumerate();
        				if (count($questions) == 0)
        				{
        			?>
        			<p>No questionnaires yet, why not <a href="/questions/create.mmo">create one</a>!</p>
        			<?php
        				}
        			?>
        			</div>
        		</div>
        	</td>
        	<?php
        	}
        	if (\System::$Configuration["Suggestions.Enabled"])
        	{
        	?>
        	<td style="vertical-align: top;">
        		<div class="Panel">
        			<h3 class="PanelTitle"><?php echo(LanguageString::GetByName("suggestions")); ?></h3>
        			<div class="PanelContent">
        				<p>
        					Help us improve and make the site even more awesome! Tell us what kind of features, games,
        					items, and other ideas you'd like to see in Psychatica! If we use your ideas, you might
        					win prizes!
        				</p>
        				<?php
        				if ($CurrentUser == null)
        				{
        				?>
        				<p>
        					If you are interested in contributing, please first log into Psychatica by the form on the
        					right panel.
        				</p>
        				<?php
        				}
        				else
        				{
        					$form = new WebForm("modules/suggestionBoxReceive.php", "POST");
        					$form->Begin();
        					
        					$cboSuggestionTypeID = new WebDropDownList("suggestion_type_id");
        					$cboSuggestionTypeID->Width = "100%";
        					
        					$query = "SELECT * FROM phpmmo_suggestion_types";
        					$result = mysql_query($query);
        					$count = mysql_num_rows($result);
        					for ($i = 0; $i < $count; $i++)
        					{
        						$values = mysql_fetch_assoc($result);
        						$cboSuggestionTypeID->AddItem($values["suggestion_type_id"], $values["suggestion_type_title"]);
        					}
        					
        					$cboSuggestionTypeID->Render();
        					
        					$txtSuggestionContent = new WebTextBox("suggestion_content");
        					$txtSuggestionContent->RowCount = 3;
        					$txtSuggestionContent->Width = "100%";
        					$txtSuggestionContent->Multiline = true;
        					$txtSuggestionContent->Render();
        					
        					$cmdSubmit = new WebButton();
        					$cmdSubmit->Text = "Submit Request";
        					$cmdSubmit->HorizontalAlign = "right";
        					$cmdSubmit->Render();
        					
        					$form->End();
        				}
        				?>
        			</div>
        		</div>
        	</td>
        	<?php
        	}
        	?>
        </tr>
        */
    }
    protected function RenderContent()
    {
        ?>
		<form id="frmRegister" method="POST">
			<div class="Card">
				<div class="Title"><i class="fa fa-shield"></i> <span class="Text">Create an account</span></div>
				<div class="Content">
					<p>
						Welcome to the <?php 
        echo System::GetConfigurationValue("Application.Name");
        ?>
 community! Before you can access members-only
						features, you must complete the following information. Please choose a private login ID and password for your account. Do not
						give this information to anyone else even if they are a <?php 
        echo System::GetConfigurationValue("Application.Name");
        ?>
						team member.
					</p>
					<p>
						<table style="width: 100%">
							<tr>
								<td style="width: 300px;"><?php 
        if ($_POST["un"] !== null && $_POST["un"] == "") {
            echo "<span style=\"color: #FF0000\">*</span> ";
        }
        ?>
 Login I<u>D</u> (private):</td>
								<td><input name="un" type="text" accesskey="D" size="50" maxlength="50" value="<?php 
        echo $_POST["un"];
        ?>
" placeholder="ph3n1xxx" /></td>
							</tr>
							<tr>
								<td><?php 
        if ($_POST["pw"] !== null && $_POST["pw"] == "") {
            echo "<span style=\"color: #FF0000\">*</span> ";
        }
        ?>
 <u>P</u>assword:</td>
								<td><input name="pw" type="password" accesskey="P" size="50" maxlength="50" placeholder="S0me*Sup3r/SecRET_passWord!" /></td>
							</tr>
							<tr>
								<td><?php 
        if ($_POST["pwc"] !== null && $_POST["pwc"] == "") {
            echo "<span style=\"color: #FF0000\">*</span> ";
        }
        ?>
 <u>C</u>onfirm password:</td>
								<td><input name="pwc" type="password" accesskey="C" size="50" maxlength="50" /></td>
							</tr>
							<tr>
								<td><?php 
        if ($_POST["ln"] !== null && $_POST["ln"] == "") {
            echo "<span style=\"color: #FF0000\">*</span> ";
        }
        ?>
 Display <u>n</u>ame:</td>
								<td><input id="txtLongName" name="ln" type="text" accesskey="L" size="50" maxlength="100" value="<?php 
        echo $_POST["ln"];
        ?>
" onkeyup="AutoGenerateName('txtLongName', 'txtShortName');" placeholder="Phenix the Great" /></td>
							</tr>
							<tr>
								<td><?php 
        if ($_POST["sn"] !== null && $_POST["sn"] == "") {
            echo "<span style=\"color: #FF0000\">*</span> ";
        }
        ?>
 <u>S</u>hort URL: <span class="ShortURLPath" style="font-size: 9pt; color: #AAAAAA; display: block; text-align: right;"><?php 
        echo System::ExpandRelativePath("~/community/members/");
        ?>
</span></td>
								<td style="vertical-align: bottom;"><input id="txtShortName" name="sn" type="text" accesskey="S" size="50" maxlength="50" value="<?php 
        echo $_POST["sn"];
        ?>
" onkeyup="AutoGenerateNameInvalidate('txtShortName');" placeholder="phenix" /></td>
							</tr>
							<tr>
								<td colspan="2" style="color: #FF0000; padding-top: 16px;">
								<?php 
        if ($_POST["un"] !== null && $_POST["un"] == "" || $_POST["pw"] !== null && $_POST["pw"] == "" || $_POST["sn"] !== null && $_POST["sn"] == "" || $_POST["ln"] !== null && $_POST["ln"] == "") {
            echo "Your request for membership could not be completed because some required information was not provided. Please ensure that all fields marked with a red asterisk (<span style=\"color: #FF0000\">*</span>) have been completely filled out.";
        } else {
            if ($UserRegistered == UserRegistrationStatus::UserNameTaken) {
                echo "Your request for membership could not be completed because the user name is already taken. Please choose a different user name.";
            } else {
                if ($UserRegistered == UserRegistrationStatus::DisplayNameTaken) {
                    echo "Your request for membership could not be completed because the display name is already taken. Please choose a different display name.";
                } else {
                    if ($UserRegistered == UserRegistrationStatus::PasswordMismatch) {
                        echo "The password and confirmation password do not match.  Please re-enter your password and confirmation password, and then try again.";
                    }
                }
            }
        }
        ?>
 
								</td>
							</tr>
						</table>
					</p>
				</div>
				<div class="Actions Horizontal">
					<a href="#" onclick="document.getElementById('frmRegister').submit(); return false;"><i class="fa fa-check"></i> <span class="Text">Register</span></a>
					<a href="<?php 
        echo System::ExpandRelativePath("~/");
        ?>
"><i class="fa fa-times"></i> <span class="Text">Cancel</span></a>
				</div>
			</div>
		</form>
		<?php 
    }
示例#9
0
                    $message .= "</div>";
                }
                $message .= "</div>";
            }
            $page->Message = $message;
            $page->ReturnButtonText = "Log In to " . System::GetConfigurationValue("Application.Name");
            $page->ReturnButtonURL = System::ExpandRelativePath(System::GetConfigurationValue("Account.LoginPath"));
            $page->Render();
        }
    } else {
        if ($UserRegistered == UserRegistrationStatus::Registered) {
            $page = new MessagePage("Success");
            $page->Message = "Your membership request has been approved. You may now <a href=\"" . System::ExpandRelativePath(System::GetConfigurationValue("Account.LoginPath")) . "\">log in</a> to continue using the site.";
            $page->Render();
        } else {
            if ($UserRegistered == UserRegistrationStatus::GeneralError) {
                $page = new ErrorPage();
                $page->Message = "Thank you for your interest in becoming a member of the " . System::GetConfigurationValue("Application.Name") . " community. Unfortunately, an error has occurred " . "while attempting to process your request. You can try refreshing the page, or (better yet) clicking the &quot;Log In/Register&quot; link again and filling out " . "the form manually. If this continues to happen, please <a href=\"mailto:webmaster@alceproject.net\">e-mail the administrator</a> and explain the issue you are " . "having.";
                $page->ErrorCode = RegistrationManager::$ErrorCode;
                $page->ErrorDescription = RegistrationManager::$ErrorMessage;
                $page->Render();
            } else {
                if ($UserRegistered == UserRegistrationStatus::VerificationCodeInvalid) {
                    $page = new ErrorPage();
                    $page->Message = "The user verification code that you have provided is invalid. Your session may have expired, or an internal error may have occurred. You can try clicking " . "the &quot;Log In/Register&quot; link and filling out the registration form again. If this continues to happen, please " . "<a href=\"mailto:webmaster@alceproject.net\">e-mail the administrator</a> and explain the issue you are having.";
                    $page->Render();
                }
            }
        }
    }
}
示例#10
0
    protected function RenderContent()
    {
        $wndHelpWithServer = new Window("wndHelpWithServer", "About the &quot;Server&quot; parameter");
        $wndHelpWithServer->Width = 600;
        $wndHelpWithServer->Visible = false;
        $wndHelpWithServer->BeginContent();
        ?>
<p>
	Enter the server name on which you registered your PhoenixSNS account. Because PhoenixSNS accounts are decentralized, you may log into multiple sites
	using the same credentials. Whenever you log in, PhoenixSNS will contact your identity provider and retrieve information that you have shared between
	your identity provider and <?php 
        echo System::GetConfigurationValue("Application.Name");
        ?>
.
</p>
<p>
	You have total control over what information gets sent from <?php 
        echo System::GetConfigurationValue("Application.Name");
        ?>
 to your Identity Provider and vice versa. Your privacy and cross-posting options
	can be changed from your User Control Panel.
</p>
<?php 
        $wndHelpWithServer->BeginButtons();
        ?>
<div style="text-align: center;"><input type="submit" value="OK" onclick="wndHelpWithServer.Hide(); return false;" /></div>
<?php 
        $wndHelpWithServer->EndButtons();
        $wndHelpWithServer->EndContent();
        ?>
<div class="LogoAndLoginArea">
	<div class="LogoArea">
		<img class="Logo" src="<?php 
        echo System::ExpandRelativePath("~/images/Logo.png");
        ?>
" alt="<?php 
        echo System::GetConfigurationValue("Application.Name");
        ?>
" />
		<p class="Slogan"><?php 
        echo System::GetConfigurationValue("Application.Slogan");
        ?>
</p>
	</div>
	<form class="LoginForm" method="POST" action="<?php 
        echo System::ExpandRelativePath(System::GetConfigurationValue("Account.LoginPath"));
        ?>
" style="margin-left: auto; margin-right: auto;">
		<div class="Field">
			<label for="txtUserName">Login <u>n</u>ame:</label>
			<input type="text" id="txtUserName" name="member_username" value="" style="width: 100%;" />
		</div>
		<div class="Field">
			<label for="txtPassword"><u>P</u>assword:</label>
			<input type="password" id="txtPassword" name="member_password" value="" style="width: 100%;" />
		</div>
		<div class="Field">
			<label for="txtServerName" id="lblServerName"><u>S</u>erver:</label>
			<input type="text" id="txtServerName" accesskey="S" name="member_servername" value="<?php 
        echo System::GetConfigurationValue("Application.DomainName");
        ?>
" style="width: 100%;" /> <a href="#" onclick="wndHelpWithServer.ShowDialog();"><img style="vertical-align: middle;" src="<?php 
        echo System::ExpandRelativePath("~/images/icons/help.png");
        ?>
" alt="(?)" title="More information" /></a>
		</div>
		<?php 
        if ($this->InvalidCredentials) {
            ?>
		<div class="Message Error">
			The login name or password you specified is invalid.  Please try again.
		</div>
		<?php 
        }
        ?>
		<div class="Buttons">
			<input type="submit" value="Log In" onclick="frmLogin.submit(); return false;" />
		</div>
	</form>
	<p class="LoginMessage" style="font-style: oblique;"><?php 
        echo $this->Message;
        ?>
</p>
	<div class="ActionList">
		<a class="Action" href="<?php 
        echo System::ExpandRelativePath(System::GetConfigurationValue("Account.RegisterPath"));
        ?>
">
			<span class="ActionTitle">Don't have an account?</span>
			<span class="ActionLink">Register now!</span>
		</a>
		<a class="Action" href="<?php 
        echo System::ExpandRelativePath(System::GetConfigurationValue("Account.ResetPasswordPath"));
        ?>
">
			<span class="ActionTitle">Forgot your password?</span>
			<span class="ActionLink">Reset it here.</span>
		</a>
		<a class="Action" href="<?php 
        echo System::ExpandRelativePath("~/contribute");
        ?>
">
			<span class="ActionTitle">Want to help out?</span>
			<span class="ActionLink">See ways you can contribute.</span>
		</a>
	</div>
</div>

<script type='text/javascript'>
	// TEST!!!
	/*
	var supportsVibrate = "vibrate" in navigator;
	
	// Vibrate multiple times for multiple durations
	// Vibrate for three seconds, wait two seconds, then vibrate for one second
	navigator.vibrate([500, 500, 500, 500, 500]);
	*/
</script>

<?php 
    }
示例#11
0
<?php

use WebFX\System;
use WebFX\Controls\TextBox;
use PhoenixSNS\MasterPages\WebPage;
use PhoenixSNS\Pages\ErrorPage;
if ($CurrentUser == null) {
    System::Redirect(System::GetConfigurationValue("Account.LoginPath"));
    return;
}
if ($_POST["attempt"] != null && $_POST["name"] != null) {
    $validation_result_name = Group::ValidateName($_POST["name"]);
}
if ($_POST["attempt"] != null && $_POST["name"] != null && $_POST["title"] != null) {
    // Create the group in the database
    if ($validation_result_name == null) {
        if (!Group::Create($_POST["name"], $_POST["title"], $_POST["description"])) {
            $page = new ErrorPage();
            $page->ErrorCode = mysql_errno();
            $page->ErrorDescription = mysql_error();
            $page->ReturnButtonURL = "~/community/groups/create.mmo";
            $page->ReturnButtonText = "Return to Create a Group";
            $page->Render();
            return;
        }
        System::Redirect("~/community/groups/" . $_POST["name"]);
        return;
    }
}
$page = new WebPage("Create a Group");
$page->BeginContent();
示例#12
0
    protected function BeforeFullContent()
    {
        ?>
			<div class="Page<?php 
        if (!$this->RenderHeader) {
            echo " HideHeader";
        }
        if (!$this->RenderSidebar) {
            echo " HideSidebar";
        }
        ?>
">
				<nav class="Top">
					<a class="MenuButton" onclick="toggleSidebarExpanded(); return false;" href="#"><i class="fa fa-bars">&nbsp;</i></a>
					<img class="Logo" src="<?php 
        echo System::ExpandRelativePath("~/Images/Logo.png");
        ?>
" alt="<?php 
        echo System::GetConfigurationValue("Application.Name");
        ?>
" />
					<?php 
        $txtSearch = new TextBox();
        $txtSearch->ClassList[] = "SearchBar";
        $txtSearch->PlaceholderText = "Type to search for tasks";
        $txtSearch->SuggestionURL = "~/API/Search.php?q=%1";
        $txtSearch->Render();
        ?>
					<div class="UserInfo">
						<div class="DropDownButton">
							<i class="fa fa-user">&nbsp;</i>
							<img class="UserIcon" alt="" />
							<span class="UserName"><?php 
        $user = User::GetByID($_SESSION["Authentication.UserID"]);
        if ($user == null) {
            echo "Not logged in";
        } else {
            if ($user->DisplayName != null) {
                echo $user->DisplayName;
            } else {
                echo $user->UserName;
            }
        }
        ?>
</span>
							<div class="Menu DropDownMenu">
								<a href="<?php 
        echo System::ExpandRelativePath("~/account/settings.page");
        ?>
">
									<span class="Icon"><i class="fa fa-cogs">&nbsp;</i></span>
									<span class="Text">Change Settings</span>
								</a>
								<a href="<?php 
        echo System::ExpandRelativePath("~/account/logout.page");
        ?>
">
									<span class="Icon"><i class="fa fa-sign-out">&nbsp;</i></span>
									<span class="Text">Log Out</span>
								</a>
							</div>
						</div>
					</div>
				</nav>
				<nav class="Sidebar" id="__SidebarFrame">
					<ul>
					<?php 
        foreach ($this->SidebarButtons as $button) {
            $this->RenderSidebarButton($button);
        }
        ?>
					</ul>
					<div class="BackstageView">
						<div class="Content">
							<div class="Column" style="width: 25%;">
								<div class="Title">Tenants</div>
								<?php 
        $tenants = Tenant::Get();
        foreach ($tenants as $tenant) {
            echo "<a href=\"" . System::ExpandRelativePath("~/tenant/modify/" . $tenant->URL) . "\">" . $tenant->URL . "</a>";
        }
        ?>
								
								<div class="Title">Actions</div>
								<a href="<?php 
        echo System::ExpandRelativePath("~/account/logout.page");
        ?>
"><i class="fa fa-sign-out"></i> <span class="Text">Log Out</span></a>
							</div>
							<div class="Column">
								<div class="Title">About</div>
								<div><img src="<?php 
        echo System::ExpandRelativePath("~/Images/Billboard.png");
        ?>
" /></div>
								<p>
									PhoenixSNS version 1.0
								</p>
							</div>
						</div>
					</div>
				</nav>
				<header>
					<div class="Title" id="__TitleFrame"><?php 
        echo $this->Title;
        ?>
</div>
					<div class="Subtitle" id="__SubtitleFrame"><?php 
        echo $this->Subtitle;
        ?>
</div>
					<div class="Buttons">
					<?php 
        foreach ($this->HeaderButtons as $button) {
            echo "<a class=\"Button";
            if ($button->CssClass != "") {
                echo " " . $button->CssClass;
            }
            echo "\"";
            if ($button->TargetURL != "") {
                echo " href=\"" . System::ExpandRelativePath($button->TargetURL) . "\"";
            }
            if ($button->TargetScript != "") {
                echo " onclick=\"" . $button->TargetScript . "\"";
            }
            echo ">";
            if ($button->IconName != "") {
                echo "<i class=\"fa " . $button->IconName . "\">&nbsp;</i>";
            }
            echo "<span class=\"Text\">";
            echo $button->Title;
            echo "</span>";
            echo "</a>";
        }
        ?>
					</div>
				</header>
				<div class="Content" id="__ContentFrame">
					<script type="text/javascript">
						function nav(url)
						{
							// disable AJAX navigation temporarily until it's figured out
							return true;
							
							// Add an item to the history log
							history.pushState(url, "", url);
							loadc(url);
							setSidebarExpanded(false);
							return false;
						}
						function toggleSidebarExpanded()
						{
							setSidebarExpanded(!getSidebarExpanded());
						}
						function getSidebarExpanded()
						{
							var u = document.getElementById("__SidebarFrame");
							return (u.className == "Sidebar Expanded");
						}
						function setSidebarExpanded(value)
						{
							var u = document.getElementById("__SidebarFrame");
							if (value)
							{
								u.className = "Sidebar Expanded";
							}
							else
							{
								u.className = "Sidebar";
							}
						}
						function loadc(url)
						{
							if (url == null) url = "";
							
							var contentFrame = document.getElementById("__ContentFrame");
							if (url.indexOf('?') != -1)
							{
								url += "&partial";
							}
							else
							{
								url += "?partial";
							}
							WebFramework.Navigation.LoadPartialContent(url, contentFrame);
							
							var event = new Event("load");
							window.dispatchEvent(event);
						}
						function setTitles(title, subtitle)
						{
							if (title)
							{
								var titleFrame = document.getElementById("__TitleFrame");
								titleFrame.innerHTML = title;
							}
							if (subtitle)
							{
								var subtitleFrame = document.getElementById("__SubtitleFrame");
								subtitleFrame.innerHTML = subtitle;
							}
						}
						
						// Revert to a previously saved state
						window.addEventListener('popstate', function(event)
						{
							loadc(event.state);
						});
						window.addEventListener("load", function(e)
						{
							var url = window.location.pathname.substring(1);
							var sidebar = document.getElementById("__SidebarFrame");
							var navs = sidebar.childNodes;
							for (var i = 0; i < navs.length; i++)
							{
								if (navs[i].tagName != "A") continue;
								if (navs[i].attributes["data-id"] != null && navs[i].attributes["data-id"].value == url)
								{
									navs[i].className = "Selected";
								}
								else
								{
									navs[i].className = "";
								}
							}
						});
					</script>
			<?php 
    }
示例#13
0
             echo $values1["bt_LineNumber"];
             echo "</td>";
             echo "</tr>";
         }
         echo "</table>";
         echo "<div class=\"Buttons\">";
         echo "<form method=\"post\">";
         echo "<input type=\"hidden\" name=\"action\" value=\"delete\" />";
         echo "<input type=\"submit\" value=\"Delete Message\" />";
         echo "<a class=\"Button\" href=\"" . System::ExpandRelativePath("~/system-log") . "\">Back to Messages</a>";
         echo "</form>";
         echo "</div>";
     }
 } else {
     if ($_SERVER["REQUEST_METHOD"] == "POST" && $_POST["action"] == "delete") {
         $query = "DELETE FROM " . System::GetConfigurationValue("Database.TablePrefix") . "DebugMessages";
         $result = $MySQL->query($query);
         System::Redirect("~/system-log");
     } else {
         echo "<form method=\"post\">";
         echo "<input type=\"hidden\" name=\"action\" value=\"delete\" />";
         echo "<input type=\"submit\" value=\"Clear Messages\" />";
         echo "</form>";
         echo "<table class=\"ListView\">";
         echo "<tr>";
         echo "<th>Tenant</th>";
         echo "<th>Severity</th>";
         echo "<th>Message</th>";
         echo "<th>Timestamp</th>";
         echo "<th>IP Address</th>";
         echo "</tr>";
示例#14
0
            $item = StartPage::GetByAssoc($values);
            echo "{ \"Category\": \"StartPages\", \"Item\": ";
            echo $item->ToJSON();
            echo " }";
            if ($i + $previousCount < $totalCount - 1) {
                echo ", ";
            }
        }
    });
}
header("Content-Type: application/json; charset=UTF-8");
echo "{ ";
$lookup = $_GET["query"];
$totalCount = 0;
foreach ($lookupTables as $lookupTable) {
    $query = "SELECT * FROM " . System::GetConfigurationValue("Database.TablePrefix") . $lookupTable->TableName;
    if ($lookup != null && $lookup != "") {
        $query .= " WHERE " . $lookupTable->LookupFieldName . " LIKE '%" . $lookup . "%'";
    }
    if (isset($_GET["maximum"])) {
        if (is_numeric($_GET["maximum"])) {
            $query .= " LIMIT " . $_GET["maximum"];
        }
    }
    $result = $MySQL->query($query);
    if ($MySQL->errno != 0) {
        echo "\"result\": \"error\", \"error_code\": " . $MySQL->errno . ", \"error_message\": \"" . $MySQL->error . "\" }";
        return;
    }
    $totalCount += $result->num_rows;
    $lookupTable->Result = $result;
示例#15
0
                ?>
" name="starterpack_id" value="<?php 
                echo $pack->ID;
                ?>
" />
											</div>
										</div>
										<?php 
            }
            ?>
								</div>
								<div style="text-align: center;"><input type="submit" value="Apply My Choice" /></div>
							</form>
						</div>
					</div>
					<?php 
            $page->EndContent();
            return true;
        }
    }
})), function ($path) {
    // function called before the module is executed
    if (!System::GetConfigurationValue("Market.Enabled", false)) {
        System::Redirect("~/");
        return false;
    }
    return true;
}, function ($path) {
    // function called when the file could not be found
    System::Redirect("~/market/items");
})));
示例#16
0
                if ($retval) {
                    Success("Created table '" . $table->Name . "'");
                } else {
                    Failure("Could not create table '" . $table->Name . "'");
                    Message("Database returned error " . DataFX::$Errors->Items[0]->Code . ": " . DataFX::$Errors->Items[0]->Message);
                }
            }
        }
        global $MySQL;
        $MySQL->query("ALTER TABLE " . System::GetConfigurationValue("Database.TablePrefix") . "Users ADD UNIQUE KEY (user_LoginID, user_TenantID)");
        $MySQL->query("ALTER TABLE " . System::GetConfigurationValue("Database.TablePrefix") . "Users ADD UNIQUE KEY (user_URLName, user_TenantID)");
        $MySQL->query("ALTER TABLE " . System::GetConfigurationValue("Database.TablePrefix") . "Users ADD UNIQUE KEY (user_DisplayName, user_TenantID)");
        $MySQL->query("ALTER TABLE " . System::GetConfigurationValue("Database.TablePrefix") . "Groups ADD UNIQUE KEY (group_Name, group_TenantID)");
        $MySQL->query("ALTER TABLE " . System::GetConfigurationValue("Database.TablePrefix") . "Groups ADD UNIQUE KEY (group_Title, group_TenantID)");
        $MySQL->query("ALTER TABLE " . System::GetConfigurationValue("Database.TablePrefix") . "Places ADD UNIQUE KEY (place_Name, place_TenantID)");
        $MySQL->query("ALTER TABLE " . System::GetConfigurationValue("Database.TablePrefix") . "Places ADD UNIQUE KEY (place_Title, place_TenantID)");
        ?>
				</table>
				<?php 
        return true;
    }
    $page = new WebPage();
    $page->BeginContent();
    ?>
<div style="text-align: center;">
	<img src="<?php 
    echo System::ExpandRelativePath("~/images/PhoenixSNSLogo.png");
    ?>
" style="height: 200px;" />
</div>
<p style="text-align: center;">
示例#17
0
	<div class="FormView" id="fvStep2" style="display: none;">
		<div class="Field">
			<label for="txtPassword">A<u>d</u>ministrator User Name</label>
			<input type="text" name="TenantManager_UserName" id="txtAdministratorUserName" value="<?php 
    echo System::GetConfigurationValue("AdministratorUserName", "phoenixroot");
    ?>
" />
		</div>
		<div class="Field">
			<label for="txtPassword">Ad<u>m</u>inistrator Password</label>
			<input type="password" name="TenantManager_Password" id="txtAdministratorPassword" value="" />
		</div>
		<div class="Field">
			<label for="txtPassword"><u>I</u>nitial Tenant</label>
			<input type="text" name="Application_DefaultTenant" id="txtDefaultTenant" value="<?php 
    echo System::GetConfigurationValue("Application.DefaultTenant", "default");
    ?>
" />
		</div>
	</div>
	<div class="ButtonContainer">
		<input type="button" value="Continue" id="cmdContinue" />
	</div>
	<script type="text/javascript">
		var frm = document.getElementById("frm");
		var cmdContinue = document.getElementById("cmdContinue");
		var fvStep1 = document.getElementById("fvStep1");
		var fvStep2 = document.getElementById("fvStep2");
		cmdContinue.addEventListener("click", function(e)
		{
			if (fvStep2.style.display == "block")
示例#18
0
if ($thisuser->ProfileVisibility != UserProfileVisibility::Everyone && $action != "images") {
    if (!$thisuser->IsVisible()) {
        $errorPage = new ErrorPage();
        $errorPage->Title = "Private Profile";
        $errorPage->DisplayContactMessage = false;
        if ($thisuser->ProfileVisibility == UserProfileVisibility::Hidden) {
            $errorPage->Message = "This user's profile is private.";
        } else {
            if ($thisuser->ProfileVisibility == UserProfileVisibility::Friends) {
                $errorPage->Message = "This user's profile is only visible to their friends. Please <a href=\"" . System::ExpandRelativePath("~/community/members/" . $thisuser->ShortName . "/connect") . "\">add this person as a friend</a> to see this person's profile.";
            } else {
                if ($thisuser->ProfileVisibility == UserProfileVisibility::ExtendedFriends) {
                    $errorPage->Message = "This user's profile is only visible to their friends, or friends of their friends. Please <a href=\"" . System::ExpandRelativePath("~/community/members/" . $thisuser->ShortName . "/connect") . "\">add this person as a friend</a> to see this person's profile.";
                } else {
                    if ($thisuser->ProfileVisibility == UserProfileVisibility::Sitewide) {
                        $errorPage->Message = "This person's profile is not visible to people outside of " . System::GetConfigurationValue("Application.Name") . ". Please <a href=\"" . System::ExpandRelativePath("~/account/login.page") . "\">log in to " . System::GetConfigurationValue("Application.Name") . "</a> to see this person's profile.";
                    } else {
                        $errorPage->Message = "Unknown profile visibility " . $thisuser->ProfileVisibility;
                    }
                }
            }
        }
        $errorPage->ReturnButtonURL = "~/community/members";
        $errorPage->ReturnButtonText = "Return to User List";
        $errorPage->Render();
        return;
    }
}
switch ($path[2]) {
    case "journals":
        if ($path[4] == "entries.rss" || $path[4] == "entries.atom") {
示例#19
0
require_once "Controls/PhoenixVision.inc.php";
require_once "Objects/PlaceClippingRegionPoint.inc.php";
require_once "Objects/PlaceClippingRegion.inc.php";
require_once "Objects/PlaceHotspot.inc.php";
require_once "Objects/Place.inc.php";
require_once "Pages/WorldPage.inc.php";
use WebFX\System;
use WebFX\Module;
use WebFX\ModulePage;
use PhoenixSNS\Objects\User;
use PhoenixSNS\Modules\World\Objects\Place;
use PsychaticaErrorPage;
use PhoenixSNS\Modules\World\Pages\WorldPage;
System::$Modules[] = new Module("net.phoenixsns.World", array(new ModulePage("world", function ($path) {
    $CurrentUser = User::GetCurrent();
    if (!System::GetConfigurationValue("World.Enabled", false)) {
        System::Redirect("~/");
        return true;
    }
    $CurrentPlace = null;
    if ($path[0] == "places") {
        if ($path[1] != "") {
            $CurrentPlace = Place::GetByIDOrName($path[1]);
            if ($path[2] == "images") {
                switch ($path[3]) {
                    case "backgrnd.png":
                        header("Content-Type: image");
                        readfile("images/world/places/" . $CurrentPlace->ID . "/backgrnd.png");
                        return true;
                    case "preview.png":
                        header("Content-Type: image");