/** * @param ProfileCategory|XoopsObject $obj */ public function __construct(ProfileCategory &$obj) { $title = $obj->isNew() ? sprintf(_PROFILE_AM_ADD, _PROFILE_AM_CATEGORY) : sprintf(_PROFILE_AM_EDIT, _PROFILE_AM_CATEGORY); parent::__construct($title, 'form', false, 'post', true); $this->addElement(new Xoops\Form\Text(_PROFILE_AM_TITLE, 'cat_title', 5, 255, $obj->getVar('cat_title')), true); if (!$obj->isNew()) { //Load groups $this->addElement(new Xoops\Form\Hidden('id', $obj->getVar('cat_id'))); } $this->addElement(new Xoops\Form\TextArea(_PROFILE_AM_DESCRIPTION, 'cat_description', $obj->getVar('cat_description', 'e'), 5, 5)); $weight = new Xoops\Form\Text(_PROFILE_AM_WEIGHT, 'cat_weight', 1, 5, $obj->getVar('cat_weight', 'e'), ''); $weight->setPattern('^\\d+$', _PROFILE_AM_ERROR_WEIGHT); $this->addElement($weight, true); $this->addElement(new Xoops\Form\Hidden('op', 'save')); $this->addElement(new Xoops\Form\Button('', 'submit', XoopsLocale::A_SUBMIT, 'submit')); }
* E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include_once "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/rank.php"; include_once "../../../../classes/consoleoption.php"; include_once "../../../../classes/profilecategory.php"; include_once "../../../../classes/profileoption.php"; $consoleObj = new ConsoleOption($mysqli); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $profileCatObj = new ProfileCategory($mysqli); $profileObj = new ProfileOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Profile Options"); $consoleObj->select($cID); $_GET['cID'] = $cID; if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); $selectedOption = ""; $addSQL = ""; if ($member->hasAccess($consoleObj) && $profileCatObj->select($_POST['catID'])) { if ($_POST['oID'] != "" and $profileObj->SELECT($_POST['oID'])) { $addSQL = " AND profileoption_id != '" . $_POST['oID'] . "'"; $profileOptionInfo = $profileObj->get_info_filtered(); if ($profileOptionInfo['profilecategory_id'] == $_POST['catID']) { $arrAssociates = $profileCatObj->getAssociateIDs("ORDER BY sortnum"); $highestIndex = count($arrAssociates) - 1;
* */ if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") { exit; } else { $memberInfo = $member->get_info_filtered(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } include_once $prevFolder . "classes/profilecategory.php"; include_once $prevFolder . "classes/profileoption.php"; $cID = $_GET['cID']; $profileOptionObj = new ProfileOption($mysqli); $profileCatObj = new ProfileCategory($mysqli); if (!$profileOptionObj->select($_GET['oID'])) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "members';</script>"); } $profileOptionInfo = $profileOptionObj->get_info_filtered(); echo "\n\n<script type='text/javascript'>\n\$(document).ready(function() {\n\$('#breadCrumb').html(\"<a href='" . $MAIN_ROOT . "'>Home</a> > <a href='" . $MAIN_ROOT . "members'>My Account</a> > <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>Manage Profile Options</a> > " . $profileOptionInfo['name'] . "\");\n});\n</script>\n"; $dispError = ""; if ($_POST['submit']) { // Check Option Name if (trim($_POST['optionname']) == "") { $countErrors++; $dispError .= " <b>·</b> You must give the profile option a name.<br>"; } // Check Category if (!$profileCatObj->select($_POST['optioncategory'])) { $countErrors++;
* Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") { exit; } else { $memberInfo = $member->get_info(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } include $prevFolder . "classes/profilecategory.php"; $profileCatObj = new ProfileCategory($mysqli); $cID = $_GET['cID']; if ($_POST['submit']) { $countErrors = 0; // Check Category Name if (trim($_POST['catname']) == "") { $countErrors++; $dispError .= " <b>·</b> You must enter a Category Name.<br>"; } // Check Category Order $intNewOrderSpot = $profileCatObj->validateOrder($_POST['catorder'], $_POST['beforeafter']); if ($intNewOrderSpot === false) { $countErrors++; $dispError .= " <b>·</b> You selected an invalid category order.<br>"; } if ($countErrors == 0) {
* * License: http://www.bluethrust.com/license.php * */ if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") { exit; } else { $memberInfo = $member->get_info_filtered(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } include_once $prevFolder . "classes/profilecategory.php"; $cID = $_GET['cID']; $profileCatObj = new ProfileCategory($mysqli); if (!$profileCatObj->select($_GET['catID'])) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "members';</script>"); } $profileCatInfo = $profileCatObj->get_info_filtered(); echo "\n\n<script type='text/javascript'>\n\$(document).ready(function() {\n\$('#breadCrumb').html(\"<a href='" . $MAIN_ROOT . "'>Home</a> > <a href='" . $MAIN_ROOT . "members'>My Account</a> > <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>Manage Profile Categories</a> > " . $profileCatInfo['name'] . "\");\n});\n</script>\n"; $dispError = ""; if ($_POST['submit']) { $countErrors = 0; // Check Cat Name if (trim($_POST['catname']) == "") { $countErrors++; $dispError .= " <b>·</b> You must enter a Category Name.<br>"; } // Check Category Order $intNewOrderSpot = $profileCatObj->validateOrder($_POST['catorder'], $_POST['beforeafter'], true, $profileCatInfo['ordernum']);
* Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include_once "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/rank.php"; include_once "../../../../classes/consoleoption.php"; include_once "../../../../classes/profileoption.php"; include_once "../../../../classes/profilecategory.php"; $consoleObj = new ConsoleOption($mysqli); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $profileOptionObj = new ProfileOption($mysqli); $profileCatObj = new ProfileCategory($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Profile Options"); $consoleObj->select($cID); $_GET['cID'] = $cID; if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if ($member->hasAccess($consoleObj) && $profileOptionObj->select($_POST['oID'])) { define('MEMBERRANK_ID', $memberInfo['rank_id']); $profileOptionInfo = $profileOptionObj->get_info(); $profileCatObj->select($profileOptionInfo['profilecategory_id']); $arrAssociates = $profileCatObj->getAssociateIDs("ORDER BY sortnum"); array_unshift($arrAssociates, ""); unset($arrAssociates[0]); $intSortNum = $profileOptionInfo['sortnum']; $moveUp = $intSortNum - 1; $moveDown = $intSortNum + 1;
* Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") { exit; } else { $memberInfo = $member->get_info_filtered(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } $cID = $_GET['cID']; $profileCategoryObj = new ProfileCategory($mysqli); $profileOptionObj = new ProfileOption($mysqli); $gameObj = new Game($mysqli); $arrGames = $gameObj->getGameList(); $consoleCatSettingObj = new Basic($mysqli, "consolecategory", "consolecategory_id"); $arrSocialMediaInfo = $member->objSocial->get_entries(array(), "ordernum DESC"); // Setup Default Console Category Select Options $arrPrivileges = $memberRank->get_privileges(); $arrConsoleCats = array(); $consoleSettingObj = new ConsoleOption($mysqli); foreach ($arrPrivileges as $consoleOptionID) { $consoleSettingObj->select($consoleOptionID); $consoleCatID = $consoleSettingObj->get_info("consolecategory_id"); if (!in_array($consoleCatID, $arrConsoleCats)) { $consoleCatSettingObj->select($consoleCatID); $consoleCatOrder = $consoleCatSettingObj->get_info("ordernum");
/* * Bluethrust Clan Scripts v4 * Copyright 2014 * * Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include_once "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/rank.php"; include_once "../../../../classes/consoleoption.php"; include_once "../../../../classes/profilecategory.php"; $consoleObj = new ConsoleOption($mysqli); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $profileCatObj = new ProfileCategory($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Profile Categories"); $consoleObj->select($cID); $_GET['cID'] = $cID; if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if ($member->hasAccess($consoleObj) && $profileCatObj->select($_POST['catID'])) { define('MEMBERRANK_ID', $memberInfo['rank_id']); $profileCatObj->move($_POST['cDir']); include "main.php"; } }
* Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include_once "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/rank.php"; include_once "../../../../classes/consoleoption.php"; include_once "../../../../classes/profilecategory.php"; $consoleObj = new ConsoleOption($mysqli); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $profileCatObj = new ProfileCategory($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Profile Categories"); $_GET['cID'] = $cID; $consoleObj->select($cID); if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if ($member->hasAccess($consoleObj) && $profileCatObj->select($_POST['catID'])) { define('MEMBERRANK_ID', $memberInfo['rank_id']); $profileCatInfo = $profileCatObj->get_info_filtered(); $arrCats = $profileCatObj->getAssociateIDs(); if (count($arrCats) > 0) { echo "<div id='newDeleteMessage' style='display: none'><p align='center'>There are currently profile options with the profile category <b>" . $profileCatInfo['name'] . "</b>. Please move all profile options out of this category before deleting it.</p></div>"; echo "\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\$('#deleteMessage').dialog('close');\n\t\t\t\t\t\t\$('#newDeleteMessage').dialog({\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle: 'Manage Profile Categories - Delete',\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\tzIndex: 9999,\n\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t"; } elseif ($_POST['confirm'] == "1") { $profileCatObj->delete(); include "main.php";
<?php if (!defined("SHOW_PROFILE_MAIN")) { exit; } // CUSTOM PROFILE OPTIONS $profileCatObj = new ProfileCategory($mysqli); $profileOptionObj = new ProfileOption($mysqli); $member->select($memberInfo['member_id']); $result = $mysqli->query("SELECT * FROM " . $dbprefix . "profilecategory ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) { $profileCatObj->select($row['profilecategory_id']); $arrProfileOptions = $profileCatObj->getAssociateIDs("ORDER BY sortnum"); echo "\n\t\t<div class='formTitle' style='text-align: center; margin-top: 20px'>" . $profileCatObj->get_info_filtered("name") . "</div>\n\t\t<table class='profileTable' style='border-top-width: 0px'>\n\t"; foreach ($arrProfileOptions as $profileOptionID) { $profileOptionObj->select($profileOptionID); echo "\n\t\t\n\t\t<tr>\n\t\t\t<td class='profileLabel alternateBGColor' valign='top'>" . $profileOptionObj->get_info_filtered("name") . ":</td>\n\t\t\t<td class='main' style='padding-left: 10px' valign='top'>" . $member->getProfileValue($profileOptionID) . "</td>\n\t\t</tr>\n\t\t\n\t\t"; } echo "</table>"; }
* License: http://www.bluethrust.com/license.php * */ if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") { exit; } else { $memberInfo = $member->get_info(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } $cID = $_GET['cID']; include_once $prevFolder . "classes/profilecategory.php"; include_once $prevFolder . "classes/profileoption.php"; $profileCatObj = new ProfileCategory($mysqli); $profileOptionObj = new ProfileOption($mysqli); if ($_POST['submit']) { // Check Option Name if (trim($_POST['optionname']) == "") { $countErrors++; $dispError .= " <b>·</b> You must give the profile option a name.<br>"; } // Check Category if (!$profileCatObj->select($_POST['optioncategory'])) { $countErrors++; $dispError .= " <b>·</b> You selected an invalid profile category.<br>"; } else { // Check Order $arrProfileOptionIDs = $profileCatObj->getAssociateIDs(); $blnOrderCheck1 = $_POST['optionorder'] == "first" && count($arrProfileOptionIDs) > 0;