protected function RenderContent() { ?> <form method="POST" id="frmMain"> <?php $tbs = new TabContainer("tbs"); $tbs->TabPages[] = new TabPage("tabInformation", "Information", null, null, null, function () { ?> <table style="width: 100%;"> <tr> <td style="width: 100px;">Title: </td> <td><input name="organization_Title" type="text" value="<?php echo $this->CurrentObject->Title; ?> " /></td> </tr> </table> <?php }); $tbs->TabPages[] = new TabPage("tabUsers", "Users", null, null, null, function () { }); $tbs->CurrentTab = $tbs->TabPages[0]; $tbs->Render(); ?> <div class="Buttons"> <input class="Button Default" type="submit" value="Save Changes" /> <a class="Button" href="<?php echo System::ExpandRelativePath("~/organizations"); ?> ">Discard Changes</a> </div> </form> <?php }
public function OnInit() { if ($this->IsPostback) { if (isset($_POST["user_LoginID"]) && isset($_POST["user_Password"])) { $admun = $_POST["user_LoginID"]; $admpw = $_POST["user_Password"]; $user = User::GetByCredentials($admun, $admpw); if ($user != null) { if ($user->ForcePasswordChange) { $_SESSION["ResetPasswordUserID"] = $user->ID; System::Redirect("~/account/resetPassword.page"); } else { $_SESSION["Authentication.UserName"] = $admun; $_SESSION["Authentication.Password"] = $admpw; if (isset($_SESSION["LoginRedirectURL"])) { System::Redirect($_SESSION["LoginRedirectURL"]); } else { System::Redirect("~/"); } } return true; } else { $script = new HTMLControl(); $script->TagName = "script"; $script->Attributes[] = new WebControlAttribute("type", "text/javascript"); $script->InnerHTML = "window.addEventListener(\"load\", function() { Notification.Show('The user name or password you entered is incorrect', 'Invalid Credentials', 'Error'); });"; // child control has to go into the Section (which is control at index 1 on the page) $this->Controls[1]->Controls[] = $script; } } } }
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 }
function AutoRedirect() { $loc = $_POST["AccountLoginRedirect"]; if ($loc == null) { $loc = $_SESSION["AccountLoginRedirect"]; } if ($loc == null) { $loc = "~/"; } $_SESSION["AccountLoginRedirect"] = null; System::Redirect($loc); return true; }
protected function RenderContent() { $pages = Page::Get(); $count = count($pages); ?> <div class="Panel"> <h3 class="PanelTitle">Pages (<?php echo $count; ?> )</h3> <div class="PanelContent"> <div class="ProfilePage"> <div class="ProfileTitle"> <span class="ProfileUserName"> <?php echo "There "; if ($count == 1) { echo "is "; } else { echo "are "; } echo $count; if ($count == 1) { echo " page"; } else { echo " pages"; } echo "."; ?> </span> <span class="ProfileControlBox"> <a href="<?php echo System::ExpandRelativePath("~/community/pages/create.mmo"); ?> " onclick="DisplayCreatePageDialog();">Create Page</a> </span> </div> <div class="ProfileContent"> <?php $grpPages = new ButtonGroup("grpPages"); foreach ($pages as $item) { $grpPages->Items[] = new ButtonGroupButton(null, $item->Title, null, "~/community/pages/" . $item->Name . "/images/thumbnail.png", "~/community/pages/" . $item->Name, "PageInformationDialog.ShowDialog(" . $item->ID . ");"); } $grpPages->Render(); ?> </div> </div> </div> </div> <?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; }
protected function RenderContent() { if ($this->CurrentObject != null) { ?> <table style="width: 100%;"> <tr id="Property_Header"> <?php $properties = $this->CurrentObject->GetInstanceProperties(); foreach ($properties as $property) { if ($property->ColumnVisible) { echo "<th>" . $property->Name . "</th>"; } } ?> </tr> <?php $instances = $this->CurrentObject->GetInstances(); foreach ($instances as $instance) { ?> <tr id="Property_<?php echo $property->ID; ?> "> <?php foreach ($properties as $property) { if ($property->ColumnVisible) { echo "<td>"; $value = $instance->GetPropertyValue($property); $property->RenderColumn($value); echo "</td>"; } } ?> </tr> <?php } ?> </table> <div class="Buttons"> <input type="submit" class="Button Default" value="Save Changes" /> <a class="Button" href="<?php echo System::ExpandRelativePath("~/tenant/modify/" . $this->CurrentTenant->URL . "/objects/" . $this->CurrentObject->ID); ?> ">Discard Changes</a> </div> <?php } }
protected function BeforeContent() { ?> <div class="SetupContainer"> <div class="Billboard"> <img src="<?php echo System::ExpandRelativePath("~/Images/Billboard.png"); ?> " /> </div> <div class="Branding"> <span class="ProductName">PhoenixSNS</span> Initial Configuration </div> <div class="Credentials"> <?php }
function RenderSliceRecursive($slice) { echo "div.Avatar" . $slice->Base->ID . " div." . $slice->Name . "\r\n"; echo "{\r\n"; echo "\tbackground-image: url('" . System::ExpandRelativePath("~/images/avatar/bases/" . $slice->Base->ID . "/1/slices/" . $slice->Name . ".png');\r\n"); echo "\tposition: absolute;\r\n"; echo "\tleft: " . $slice->Left . "px;\r\n"; echo "\ttop: " . $slice->Top . "px;\r\n"; echo "\twidth: " . $slice->Width . "px;\r\n"; echo "\theight: " . $slice->Height . "px;\r\n"; echo "\ttransform-origin: " . $slice->OriginLeft . "px " . $slice->OriginTop . "px;\r\n"; echo "}\r\n"; $slices = $slice->GetSlices(); foreach ($slices as $slice1) { RenderSliceRecursive($slice1); } }
protected function RenderContent() { ?> <p><?php echo $this->Message; ?> </p> <form method="POST"> <input type="hidden" name="Confirm" value="1" /> <input class="Button Default" type="submit" value="Continue" /> <a class="Button" href="<?php echo System::ExpandRelativePath($this->ReturnButtonURL); ?> ">Cancel</a> </form> <?php }
protected function RenderContent() { ?> <form method="POST" id="frmMain"> <?php $tbs = new TabContainer("tbs"); $tbs->TabPages[] = new TabPage("tabInformation", "Information", null, null, null, function () { ?> <div class="FormView" style="width: 100%;"> <div class="Field"> <label for="txtTitle" style="width: 100px;">Title:</label> <input id="txtTitle" name="datacenter_Title" type="text" value="<?php echo $this->CurrentObject->Title; ?> " /> </div> <div class="Field"> <label for="txtDescription" style="vertical-align: top;">Description:</label> <textarea id="txtDescription" name="datacenter_Description" style="width: 100%;" rows="5"><?php echo $this->CurrentObject->Description; ?> </textarea> </div> <div class="Field"> <label for="txtHostName">Hostname:</label> <input id="txtHostName" name="datacenter_HostName" type="text" value="<?php echo $this->CurrentObject->HostName; ?> " /> </div> </div> <?php }); $tbs->SelectedTab = $tbs->TabPages[0]; $tbs->Render(); ?> <div class="Buttons"> <input type="submit" class="Button Default" value="Save Changes" /> <a class="Button" href="<?php echo System::ExpandRelativePath("~/data-centers"); ?> ">Discard Changes</a> </div> </form> <?php }
protected function RenderContent() { ?> <p><?php echo $this->Message; ?> </p> <p style="text-align: right;"> <a href="<?php echo System::ExpandRelativePath($this->ReturnButtonURL); ?> "><?php echo $this->ReturnButtonText; ?> </a> </p> <?php }
function RenderMemberTile($member) { ?> <div class="Tile"> <div class="TileImage"> <a href="<?php echo System::ExpandRelativePath("~/community/members/" . $member->ShortName); ?> " onclick="DisplayMemberInformation(<?php echo $member->ID; ?> ); return false;"> <img class="ButtonGroupButtonImage" src="<?php echo System::ExpandRelativePath("~/community/members/" . $member->ShortName . "/images/avatar/thumbnail.png"); ?> " /> </a> </div> <div class="TileTitle"> <a href="<?php echo System::ExpandRelativePath("~/community/members/" . $member->ShortName); ?> " onclick="DisplayMemberInformation(<?php echo $member->ID; ?> ); return false;"> <?php \PhoenixSNS\Objects\mmo_display_user_badges_by_user($member); echo $member->LongName; ?> </a> </div> <div class="TileContent"> <div style="font-size: 0.8em;">Friends since</div> <div style="padding-left: 8px;"><?php echo $member->Timestamp; ?> </div> </div> </div> <?php }
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; }
public static function BuildSearchURL($properties = null, $validObjects = null, $caseInsensitive = false, $tenant = null) { if ($properties == null) { $properties = array(); } if ($validObjects == null) { $validObjects = array(); } $url = System::ExpandRelativePath("~/API/Search.php?"); if ($tenant != null) { $url .= "tenant=" . $tenant->URL; } else { $url .= "tenant=" . System::$TenantName; } $url .= "&propertyCount=" . count($properties); $i = 0; foreach ($properties as $propertyID => $searchValue) { $url .= "&propertyID" . $i . "=" . $propertyID; $url .= "&propertyValue" . $i . "=" . $searchValue; $url .= "&propertyComparison" . $i . "=" . "contains"; $i++; } $count = count($validObjects); if ($count > 0) { $objectIDs = ""; for ($i = 0; $i < $count; $i++) { $objectIDs .= $validObjects[$i]->ID; if ($i < $count - 1) { $objectIDs .= ","; } } $url .= "&validObjects=" . $objectIDs; } if ($caseInsensitive) { $url .= "&caseInsensitive"; } return $url; }
protected function RenderContent() { ?> <div class="Jumbotron"> <div class="Title">The new PhoenixSNS is here</div> <div class="Content">Upgrade to the latest version for important security updates and bug fixes</div> <div class="Buttons"><a href="#" class="Button Default">Download now</a> <a href="#" class="Button">Learn more</a></div> </div> <div class="PanelContainer ThreeColumn"> <?php $countActive = Tenant::Count(true, false); $countInactive = Tenant::Count(false, true); ?> <div class="Panel Primary"> <div class="Header"> <div class="Expand"> <div> <div class="Icon"><i class="fa fa-building-o fa-5x"> </i></div> </div> <div> <div class="PrimaryContent"><?php echo $countActive; ?> </div> <div class="SecondaryContent">active tenant<?php echo $countActive != 1 ? "s" : ""; ?> </div> </div> </div> </div> <div class="Footer Dark Borderless"> <a href="<?php echo System::ExpandRelativePath("~/tenant"); ?> ">Manage Tenants</a> </div> </div> <div class="Panel Warning"> <div class="Header"> <div class="Expand"> <div> <div class="Icon"><i class="fa fa-warning fa-5x"> </i></div> </div> <div> <div class="PrimaryContent"><?php echo $countInactive; ?> </div> <div class="SecondaryContent">inactive or expired tenant<?php echo $countInactive != 1 ? "s" : ""; ?> </div> </div> </div> </div> <div class="Footer Dark Borderless"> <a href="<?php echo System::ExpandRelativePath("~/tenant"); ?> ">Manage Tenants</a> </div> </div> <div class="Panel Success"> <div class="Header"> <div class="Expand"> <div> <div class="Icon"><i class="fa fa-warning fa-5x"> </i></div> </div> <div> <div class="PrimaryContent">0</div> <div class="SecondaryContent">issues to resolve</div> </div> </div> </div> <div class="Footer Dark Borderless"> <a href="#">View Details</a> </div> </div> </div> <?php }
protected function RenderContent() { $wndHelpWithServer = new Window("wndHelpWithServer", "About the "Server" 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 }
use WebFX\ModulePage; use WebFX\System; System::$Modules[] = new Module("net.phoenixsns.AccountManagement.Messages", array(new ModulePage("account", array(new ModulePage("messages", function ($path) { if (System::$Configuration["Messages.Enabled"]) { switch ($path[0]) { case "": System::Redirect("~/account/messages/inbox"); return true; case "inbox": require "Inbox.inc.php"; return true; case "outbox": require "Outbox.inc.php"; return true; case "create": require "Create.inc.php"; return true; default: header("HTTP/1.1 404 Not Found"); $page = new PsychaticaErrorPage("Not Found"); $page->Message = "The specified page was not found."; $page->ReturnButtonURL = "~/account/messages"; $page->ReturnButtonText = "Return to Message Center"; $page->Render(); return true; } } else { System::Redirect("~/account"); return true; } })))));
<td><input type="text" id="txtTablePrefix" name="database_tableprefix" value="<?php if (isset(System::$Configuration["Database.TablePrefix"])) { echo System::$Configuration["Database.TablePrefix"]; } else { echo "phoenix_"; } ?> " style="width: 100%;" /></td> </tr> <tr> <td colspan="2" style="text-align: center;"><input type="submit" value="Continue" /></td> </tr> </table> </form> <?php $page->EndContent(); return true; }, function ($path) { $enabled = false; if (isset(System::$Configuration["Setup.Enabled"])) { $enabled = System::$Configuration["Setup.Enabled"] == "true"; } if (!$enabled) { $page = new \WebFX\WebPage(); $page->Title = "Configuration Error"; $page->BeginContent(); echo "<div style=\"text-align: center;\"><img style=\"height: 120px;\" src=\"" . System::ExpandRelativePath("~/images/PhoenixSNSLogo.png") . "\" /></div><div>This PhoenixSNS installation has not been configured. Please contact the server administrator.</div>"; $page->EndContent(); return false; } })));
?> " 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"); })));
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 */ }
<?php $page->EndContent(); return true; }), new ModulePage("complete", function ($path) { $page = new \PsychaticaWebPage(); $page->BeginContent(); ?> <div class="Card"> <div class="Title"><i class="fa fa-smile-o"></i> <span class="Text">Thank you for your payment!</span></div> <div class="Content"> <p> Your transaction has been completed, and a receipt for your purchase has been emailed to you. You may log into your PayPal® account to view details of this transaction. </p> <p style="text-align: center;"> <img src="<?php echo System::ExpandRelativePath("~/images/coingold.png"); ?> " alt="PsychatiGold" /><br /> <span style="font-size: 24pt; font-weight: bold;">50500</span><br /> PsychatiGold coins have been added to your Wallet </p> </div> <div class="Actions Horizontal"> <a href="#">Go to the Market</a> </div> </div> <?php $page->EndContent(); return true; })))))));
protected function RenderContent() { if ($this->CurrentObject != null) { ?> <h1>Method: <?php echo $this->CurrentMethod->Name; ?> on <?php echo $this->CurrentObject->Name; ?> @<?php echo $this->CurrentTenant->URL; ?> </h1> <table class="FormView"> <tr class="Required"> <td><label for="txtMethodName">Method Name</label></td> <td><input type="text" id="txtMethodName" name="method_Name" value="<?php echo $this->CurrentMethod->Name; ?> " /></td> </tr> </table> <h2>Code Blob</h2> <form method="POST"> <textarea id="txtCodeBlob" name="method_CodeBlob" style="width: 100%;" rows="40"><?php echo $this->CurrentMethod->CodeBlob; ?> </textarea> <style type="text/css"> .CodeMirror { border: dotted 1px #AAAAAA; line-height: 18px; } .CodeMirror .CodeMirror-linenumbers { width: 48px; } </style> <script type="text/javascript"> var txtCodeBlob = document.getElementById("txtCodeBlob"); var editor = CodeMirror.fromTextArea(txtCodeBlob, { lineNumbers: true, matchBrackets: true, mode: "text/x-php", indentUnit: 4, indentWithTabs: true }); </script> <div class="Buttons"> <input type="submit" value="Save Changes" /> <a class="Button" href="<?php echo System::ExpandRelativePath("~/tenant/modify/" . $this->CurrentTenant->URL . "/objects/" . $this->CurrentObject->ID); ?> ">Discard Changes</a> </div> </form> <?php } }
// it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ============================================================================= // We need to get the root path of the Web site. It's usually something like // /var/www/yourdomain.com. global $RootPath; $RootPath = dirname(__FILE__); // Now that we have defined the root path, load the WebFX content (which also // include_once's the modules and other WebFX-specific stuff) require_once "WebFX/WebFX.inc.php"; require_once "Include/UUID.inc.php"; // Bring in the WebFX\System and WebFX\IncludeFile classes so we can simply refer // to them (in this file only) as "System" and "IncludeFile", respectively, from // now on use WebFX\System; use WebFX\IncludeFile; // Tell WebFX that we are ready to launch the application. This cycles through // all of the modules (usually you will define your main application content in // 000-Default) and executes the first module page that corresponds to the path // the user is GETting. System::Launch();
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; }
protected function RenderContent() { ?> <form method="POST"> <?php $tc = new TabContainer(); $tc->TabPages[] = new TabPage("tabGeneralInformation", "General Information", null, null, null, function () { ?> <div class="FormView"> <div class="Field"> <label for="txtModuleTitle">Title:</label> <input id="txtModuleTitle" name="module_Title" type="text" value="<?php echo $this->Module->Title; ?> " /> </div> <div class="Field"> <label for="txtModuleDescription" style="vertical-align: top;">Description: </label> <textarea id="txtModuleDescription" name="module_Description" style="width: 100%;" rows="5"><?php echo $this->Module->Description; ?> </textarea> </div> </div> <?php }); $tc->TabPages[] = new TabPage("tabApplicationMenuItems", "Application Menu Items", null, null, null, function () { $lv = new ListView(); $lv->Columns = array(new ListViewColumn("chTitle", "Title"), new ListViewColumn("chDescription", "Description"), new ListViewColumn("chTarget", "Target")); $menuitems = $this->Module->GetMainMenuItems(); foreach ($menuitems as $menuitem) { $lv->Items[] = new ListViewItem(array(new ListViewItemColumn("chTitle", $menuitem->Title), new ListViewItemColumn("chDescription", $menuitem->Description), new ListViewItemColumn("chTarget", $menuitem->TargetURL))); } $lv->Render(); }); $tc->TabPages[] = new TabPage("tabModulePages", "Module Pages", null, null, null, function () { $lv = new ListView(); $lv->Columns = array(new ListViewColumn("chURL", "URL")); $pages = $this->Module->GetPages(); foreach ($pages as $modulePage) { $lv->Items[] = new ListViewItem(array(new ListViewItemColumn("chURL", "<a href=\"" . System::ExpandRelativePath("~/modules/modify/" . $this->Module->ID . "/pages/" . $modulePage->ID) . "\">" . $modulePage->URL . "</a>", $modulePage->URL))); } $lv->Render(); }); $tc->Render(); ?> <div class="Buttons" style="text-align: right;"> <input class="Button Default" type="submit" value="Save Changes" /> <a class="Button" href="<?php echo System::ExpandRelativePath("~/modules"); ?> ">Discard Changes</a> </div> </form> <?php }
echo $topic->Title; ?> </span> </div> <div class="Content"> <?php echo $topic->Description; ?> </div> <div class="Actions Horizontal"> <a href="<?php echo System::ExpandRelativePath("~/community/groups/" . $thisgroup->Name . "/topics/" . $topic->Name . "/comment.mmo"); ?> "><i class="fa fa-comment"></i> Leave a comment</a> <a href="<?php echo System::ExpandRelativePath("~/community/groups/" . $thisgroup->Name . "/topics"); ?> "><i class="fa fa-list-alt"></i> <span class="Text">Return to group</span></a> </div> <div class="Comments"> <?php $comments = $topic->GetComments(5); foreach ($comments as $comment) { $comment->Render(); } ?> </div> </div> <?php /* if (count($path) > 6 && $path[6] == "delete.mmo")
} $item_image_resampled = imagecreatetruecolor($item_image_width, $item_image_height); imagemaketransparent($item_image_resampled); imagecopyresampled($item_image_resampled, $item_image, $image_left, $image_top, 0, 0, $image_width, $image_height, $item_image_width, $item_image_height); $item_images[] = $item_image_resampled; } $final_image = imagelayerimages($item_images); header('Content-Type: image/png'); imagepng($final_image); return; case "item.png": $array = array(); foreach ($item->Images as $image) { $array[] = "images/avatar/items/" . $image->ID . ".png"; } $image = imagelayerfiles($array); header('Content-Type: image/png'); imagepng($image); return; } return; } System::Redirect("~/market/items/" . $path[0]); return; } require "Detail.inc.php"; return; } else { require "Browse.inc.php"; return; }
function displayProfileTitle() { $path = System::GetVirtualPath(); $id = $path[1]; $CurrentTenant = Tenant::GetCurrent(); $objUser = $CurrentTenant->GetObject("User"); $thisuser = $objUser->GetInstance(new TenantQueryParameter("URL", $id)); if ($thisuser == null) { return; } ?> <div class="ProfileTitle"> <?php mmo_display_user_badges_by_user($thisuser); ?> <span class="ProfileUserName"><?php echo $thisuser->LongName; ?> </span> <?php if ($action != "customize") { ?> <span class="ProfileControlBox"> <?php if ($CurrentUser != null && $thisuser->ID != $CurrentUser->ID) { if (mmo_has_user_friend_request(null, $thisuser)) { ?> <a href="<?php echo System::$Configuration["Application.BasePath"]; ?> /community/members/<?php echo $id; ?> /Disconnect">Withdraw Friend Request</a> <?php } else { if (mmo_has_user_friend_request($thisuser, $CurrentUser)) { ?> <a href="<?php echo System::$Configuration["Application.BasePath"]; ?> /community/members/<?php echo $id; ?> /Connect/<?php echo mmo_get_user_friendship_auth_key($thisuser, $CurrentUser); ?> ">Confirm Friendship</a> <?php } else { if ($CurrentUser->HasFriend($thisuser)) { ?> <a href="<?php echo System::$Configuration["Application.BasePath"]; ?> /community/members/<?php echo $id; ?> /Disconnect"><?php echo LanguageString::GetByName("friend_disconnect"); ?> </a> <?php } else { ?> <a href="<?php echo System::$Configuration["Application.BasePath"]; ?> /community/members/<?php echo $id; ?> /Connect"><?php echo LanguageString::GetByName("friend_connect"); ?> </a> <?php } } } ?> <form action="<?php echo System::$Configuration["Application.BasePath"]; ?> /Account/Messages/Create" method="POST"> <input type="hidden" name="message_receiver" value="<?php echo $thisuser->ID; ?> " /> <input class="LinkButton" type="submit" value="<?php echo LanguageString::GetByName("message_send"); ?> " /> </form> <a href="<?php echo System::$Configuration["Application.BasePath"]; ?> /community/members/<?php echo $id; ?> /trade/"><?php echo LanguageString::GetByName("resource_trade"); ?> </a> <a href="<?php echo System::$Configuration["Application.BasePath"]; ?> /community/members/<?php echo $id; ?> /block" onclick="/* ReportBlockDialog.Show(); return false; */">Report/Block</a> <?php } if ($thisuser->IsAuthenticated) { ?> <a href="<?php echo System::$Configuration["Application.BasePath"]; ?> /community/members/<?php echo $id; ?> /Customize">Customize Profile</a> <?php } } ?> </span> </div> <?php }
protected function RenderContent() { if ($this->CurrentObject != null) { ?> <form method="POST"> <?php $tbs = new TabContainer("tbsObject"); // ID title imageurl targeturl script contentfunc $tbs->TabPages[] = new TabPage("tabGeneralInformation", "General Information", null, null, null, function () { ?> <div class="FormView"> <div class="Field"> <label for="txtObjectName">Object <u>n</u>ame:</label> <input type="text" name="object_Name" id="txtObjectName" accesskey="n" value="<?php echo $this->CurrentObject->Name; ?> " /> </div> <div class="Field"> <label for="cboModuleID">Parent <u>m</u>odule:</label> <select id="cboModuleID" name="object_ModuleID" accesskey="m"> </select> </div> <div class="Field"> <label for="cboParentObjectID">Parent <u>o</u>bject:</label> <select id="cboParentObjectID" name="object_ParentObjectID" accesskey="o"> </select> </div> </div> <?php }); $tbs->TabPages[] = new TabPage("tabStaticProperties", "Static Properties", null, null, null, function () { ?> <table class="ListView" style="width: 100%;"> <tr id="Property_Header"> <th style="width: 32px;"><a href="#" onclick="AddPropertyBelow('Header');" title="Add Below">[+]</a></th> <th style="width: 256px;">Property</th> <th style="width: 128px;">Data Type</th> <th>Default Value</th> </tr> <?php $properties = $this->CurrentObject->GetProperties(); foreach ($properties as $property) { ?> <tr id="StaticProperty_<?php echo $property->ID; ?> "> <td style="width: 32px;"><a href="#" onclick="AddStaticPropertyBelow('<?php echo $property->ID; ?> ');" title="Add Below">[+]</a></td> <td><?php echo $property->Name; ?> </td> <td><?php echo $property->DataType == null ? "(undefined)" : "<a href=\"" . System::ExpandRelativePath("~/datatype/modify/" . $property->DataType->ID) . "\">" . $property->DataType->Name . "</a>"; ?> </td> <td> <?php if ($property->DataType == null || $property->DataType->ColumnRendererCodeBlob == null) { ?> <input style="width: 100%;" type="text" id="txtStaticProperty_<?php echo $property->ID; ?> " name="StaticProperty_<?php echo $property->ID; ?> " value="<?php echo $property->DefaultValue; ?> " /> <?php } else { call_user_func($property->DataType->ColumnRendererCodeBlob, $property->Value); } ?> </td> </tr> <?php } ?> </table> <?php }); $tbs->TabPages[] = new TabPage("tabInstanceProperties", "Instance Properties", null, null, null, function () { ?> <script type="text/javascript"> function AddInstancePropertyBelow(id) { var hdnNewPropertyCount = document.getElementById("hdnNewPropertyCount"); hdnNewPropertyCount.value = parseInt(hdnNewPropertyCount.value) + 1; var parentRow = document.getElementById("InstanceProperty_" + id); var table = parentRow.parentElement; var tr = table.insertRow(parentRow.sectionRowIndex + 1); var tdAdd = tr.insertCell(-1); tdAdd.innerHTML = "<a href=\"#\" onclick=\"AddInstancePropertyBelow('');\" title=\"Add Below\">[+]</a>"; var tdProperty = tr.insertCell(-1); tdProperty.innerHTML = "<input type=\"text\" name=\"InstanceProperty_" + hdnNewPropertyCount.value + "_Name\" />"; var tdDataType = tr.insertCell(-1); tdDataType.innerHTML = "<input type=\"text\" name=\"InstanceProperty_" + hdnNewPropertyCount.value + "_DataTypeID\" />"; var tdDefaultValue = tr.insertCell(-1); tdDefaultValue.innerHTML = "<input type=\"text\" name=\"InstanceProperty_" + hdnNewPropertyCount.value + "_DefaultValue\" />"; } </script> <input type="hidden" id="hdnNewPropertyCount" name="InstanceProperty_NewPropertyCount" value="0" /> <table class="ListView" style="width: 100%;"> <tr id="InstanceProperty_Header"> <th style="width: 32px;"><a href="#" onclick="AddInstancePropertyBelow('Header'); return false;" title="Add Below">[+]</a></th> <th style="width: 256px;">Property</th> <th style="width: 128px;">Data Type</th> <th>Default Value</th> </tr> <?php $properties = $this->CurrentObject->GetInstanceProperties(); foreach ($properties as $property) { ?> <tr id="InstanceProperty_<?php echo $property->ID; ?> "> <td style="width: 32px;"><a href="#" onclick="AddInstancePropertyBelow('<?php echo $property->ID; ?> '); return false;" title="Add Below">[+]</a></td> <td><?php echo $property->Name; ?> </td> <td><?php echo $property->DataType == null ? "(undefined)" : "<a href=\"" . System::ExpandRelativePath("~/datatype/modify/" . $property->DataType->ID) . "\">" . $property->DataType->Name . "</a>"; ?> </td> <td> <?php $property->RenderColumn(); ?> </td> </tr> <?php } ?> </table> <?php }); $tbs->TabPages[] = new TabPage("tabStaticMethods", "Static Methods", null, null, null, function () { ?> <table class="ListView" style="width: 100%;"> <tr id="StaticMethod_Header"> <th style="width: 32px;"><a href="#" onclick="AddStaticMethodBelow('Header');" title="Add Below">[+]</a></th> <th style="width: 256px;">Method</th> <th>Description</th> <th style="width: 128px;">Return Data Type</th> </tr> <?php $methods = $this->CurrentObject->GetMethods(); foreach ($methods as $method) { ?> <tr id="StaticMethod_<?php echo $method->ID; ?> "> <td style="width: 32px;"><a href="#" onclick="AddStaticMethodBelow('<?php echo $method->ID; ?> ');" title="Add Below">[+]</a></td> <td><a href="<?php echo System::ExpandRelativePath("~/tenant/modify/" . $this->CurrentTenant->URL . "/objects/" . $this->CurrentObject->ID . "/methods/static/" . $method->ID); ?> "><?php echo $method->Name; ?> </a></td> <td><?php echo $method->Description; ?> </td> <td><?php /* echo($method->DataType == null ? "(undefined)" : "<a href=\"#\">" . $method->DataType->Name . "</a>"); */ ?> </td> </tr> <?php } ?> </table> <?php }); $tbs->TabPages[] = new TabPage("tabInstances", "Instances", null, "~/tenant/modify/" . $this->CurrentTenant->URL . "/objects/" . $this->CurrentObject->ID . "/instances", null, function () { $listview = new ListView("lvInstances"); $listview->Width = "100%"; $properties = $this->CurrentObject->GetInstanceProperties(); foreach ($properties as $property) { if ($property->ColumnVisible) { $listview->Columns[] = new ListViewColumn("P" . $property->ID, $property->Name); } } $instances = $this->CurrentObject->GetInstances(); foreach ($instances as $instance) { $cols = array(); foreach ($properties as $property) { if ($property->ColumnVisible) { $cols[] = new ListViewItemColumn("P" . $property->ID, "", "", function ($vals) { $inst = $vals[0]; $prop = $vals[1]; $prop->RenderColumn($inst->GetPropertyValue($prop)); }, array($instance, $property)); } } $lvi = new ListViewItem($cols); $listview->Items[] = $lvi; } $listview->Render(); }); $tbs->SelectedTab = $tbs->TabPages[0]; $tbs->Render(); ?> <div class="Buttons"> <input type="submit" class="Button Default" value="Save Changes" /> <a class="Button" href="<?php echo System::ExpandRelativePath("~/tenant/modify/" . $this->CurrentTenant->URL); ?> ">Discard Changes</a> </div> </form> <?php } }