isIG()) { die("IG disabled for admin tool!"); } require_once("class/mySQL_class.php"); #require_once("include/ach_render_admin.php"); #require_once("include/ach_render_csr.php"); require_once($_CONF['app_achievements_path']."include/ach_render_common.php"); require_once($_CONF['app_achievements_path']."class/DLL_class.php"); require_once($_CONF['app_achievements_path']."class/Node_abstract.php"); require_once($_CONF['app_achievements_path']."class/AVLTree_class.php"); require_once($_CONF['app_achievements_path']."class/Parentum_abstract.php"); require_once($_CONF['app_achievements_path']."class/AchList_abstract.php"); require_once($_CONF['app_achievements_path']."class/Tieable_inter.php"); require_once($_CONF['app_achievements_path']."class/NodeIterator_class.php"); require_once($_CONF['app_achievements_path']."class/InDev_trait.php"); require_once($_CONF['app_achievements_path']."class/AchMenu_class.php"); require_once($_CONF['app_achievements_path']."class/AchMenuNode_class.php"); require_once($_CONF['app_achievements_path']."class/AchCategory_class.php"); require_once($_CONF['app_achievements_path']."class/AchAchievement_class.php"); require_once($_CONF['app_achievements_path']."class/AchPerk_class.php"); require_once($_CONF['app_achievements_path']."class/AchObjective_class.php"); require_once("class/ADM_inter.php"); require_once("class/AdmDispatcher_trait.php"); require_once("class/AdmMenu_class.php"); require_once("class/AdmMenuNode_class.php"); require_once("class/AdmCategory_class.php"); require_once("class/AdmAchievement_class.php"); require_once("class/AdmPerk_class.php"); require_once("class/AdmObjective_class.php"); require_once("class/AdmAtom_class.php"); require_once("class/CSRDispatcher_trait.php"); require_once("class/CSR_inter.php"); #require_once("class/CSRMenu_class.php"); require_once("class/CSRCategory_class.php"); require_once("class/CSRAchievement_class.php"); require_once("class/CSRPerk_class.php"); require_once("class/CSRObjective_class.php"); require_once("class/CSRAtom_class.php"); $DBc = ryDB::getInstance("app_achievements_test"); #$DBc = ryDB::getInstance("ahufler"); function mkn($x) { if($x == null || strtolower($x) == "null") { return "NULL"; } else { return "'".mysql_real_escape_string($x)."'"; } } $c = "
";
if($_ADMIN->isAdmin()) {
$c .= "Admin "; } if($_ADMIN->isCSR()) { $c .= "CSR "; } #$c .= ach_render_menu(); $c .= " |
";
if($_REQUEST['mode'] == "atom" && $_ADMIN->isAdmin()) {
$c .= "Tigger Settings"; $user = array(); $user['id'] = 0; $user['lang'] = 'en'; $user['name'] = 'Talvela'; $user['race'] = "r_matis"; $user['civilization'] = "c_neutral"; $user['cult'] = "c_neutral"; $_USER = new RyzomUser($user); //menu require_once("include/adm_render_atom.php"); $menu = new AdmMenu($_REQUEST['cat']); $c .= "
Menu Settings"; $user = array(); $user['id'] = 1; $user['lang'] = 'en'; $user['name'] = 'Talvela'; $user['race'] = "r_matis"; $user['civilization'] = "c_neutral"; $user['cult'] = "c_neutral"; $_USER = new RyzomUser($user); require_once("include/adm_render_menu.php"); $menu = new AdmMenu(false); if($_REQUEST['act'] == "insert") { $n = new AdmMenuNode(array(),null); $n->setID(null); $n->setInDev(true); $n->setName($_REQUEST['acl_name']); $n->setImage($_REQUEST['ac_image']); $n->setParentID($_REQUEST['ac_parent']); $menu->insertNode($n); } if($_REQUEST['act'] == "delete") { $menu->removeNode($_REQUEST['ac_id']); } if($_REQUEST['act'] == "update") { $menu->updateNode($_REQUEST['ac_id'],array("acl_name"=>$_REQUEST['acl_name'],"ac_image"=>$_REQUEST['ac_image'])); } if($_REQUEST['act'] == "dev") { $curr = $menu->getNode($_REQUEST['ac_id']); $curr->setInDev(($_REQUEST['state'] != 1)); } $c .= adm_render_menu($menu); } if($_REQUEST['mode'] == "ach" && $_ADMIN->isAdmin()) { $c .= "Achievement Settings"; $user = array(); $user['id'] = 0; $user['lang'] = 'en'; $user['name'] = 'Talvela'; $user['race'] = "r_matis"; $user['civilization'] = "c_neutral"; $user['cult'] = "c_neutral"; $_USER = new RyzomUser($user); //menu require_once("include/adm_render_ach.php"); $menu = new AdmMenu($_REQUEST['cat']); $c .= "
Player Administration"; $DBc_char = new mySQL($_CONF['mysql_error']); $DBc_char->connect($_CONF['char_mysql_server'],$_CONF['char_mysql_user'],$_CONF['char_mysql_pass'],$_CONF['char_mysql_database']); //menu require_once("include/adm_render_csr.php"); if(!is_user($_REQUEST['pid'])) { // no user ID $c .= csr_render_find_player(); } else { $user = array(); $user['id'] = $_REQUEST['pid']; $user['lang'] = 'en'; $user['name'] = 'Talvela'; $user['race'] = "r_matis"; $user['civilization'] = "c_neutral"; $user['cult'] = "c_neutral"; $_USER = new RyzomUser($user); $menu = new AchMenu($_REQUEST['cat']); $open = $menu->getOpenCat(); if($open != 0) { $cat = new CSRCategory($open,null,$_REQUEST['cult'],$_REQUEST['civ']); if($_REQUEST['grant'] != "") { $cat->grantNode($_REQUEST['grant'],$_USER->getID()); } if($_REQUEST['deny'] != "") { $cat->denyNode($_REQUEST['deny'],$_USER->getID()); } } $c .= "
|