Exemple #1
0
 public function action_index()
 {
     $buildList = Tools::getAllBuilds();
     $sinList = array();
     $ai = new ArrayIterator($buildList);
     foreach ($ai as $id => $vals) {
         if (substr_count($vals, "admin") > 0) {
             unset($buildList[$id]);
         } else {
             if (!empty($this->sinonims[$vals])) {
                 $sinList[$vals] = $this->sinonims[$vals];
             } else {
                 $sinList[$id] = $vals;
             }
         }
     }
     unset($buildList[-1]);
     unset($sinList[-1]);
     if (!empty($_POST["abchenge"])) {
         if (!empty($buildList[$_POST["abchenge"]])) {
             unset($_SESSION["mwcuser"], $_SESSION["mwcpwd"], $_SESSION["mwcpoints"], $_SESSION["mwccharacter"]);
             $_SESSION["mwcbuild"] = $buildList[$_POST["abchenge"]];
             Tools::go();
         }
     }
     if (count($buildList) > 1) {
         $this->view->set("buildlist", html_::select($sinList, "abchenge", $_SESSION["mwcbuild"], 'onchange="document.getElementById(\'abcnanger\').submit();" class="selectbox"'))->out("plugin_bchanger");
     }
 }
Exemple #2
0
 /**
  * поиск персонажа али чара
  */
 public function action_search()
 {
     if (!empty($_POST["typesearch"]) && !empty($_POST["charoracc"])) {
         $type = (int) $_POST["typesearch"];
         if ($type == 1) {
             $charInfo = $this->model->getChar($_POST["charoracc"]);
             if (!empty($charInfo)) {
                 if ($charInfo["ConnectStat"] < 1) {
                     $charInfo["ConnectStat"] = "<b style='color:red'>Offline</b>";
                     $charInfo["ServerName"] .= " " . date_::transDate($charInfo["DisConnectTM"], true);
                 } else {
                     $charInfo["ConnectStat"] = "<b style='color:green'>Online</b>";
                     $charInfo["ServerName"] .= " " . date_::transDate($charInfo["ConnectTM"], true);
                 }
                 $this->view->add_dict($charInfo)->set("classlist", html_::select($this->model->class, 'Class', $charInfo['Class'], "style='width:100px;'"))->out("character", "editchars");
             }
         } else {
             $account = $this->model->getAccIfo($_POST["charoracc"]);
             if (!empty($account["Characters"])) {
                 $chars = "";
                 foreach ($account["Characters"] as $names) {
                     if (!empty($chars)) {
                         $chars .= ", ";
                     }
                     $chars .= "<span style='cursor: pointer;' onclick=\"document.getElementById('charoracc').value='{$names}';document.getElementById('typesearch').selectedIndex = 0;searchObject();\">{$names}</span>";
                 }
                 $account["Characters"] = $chars;
             }
             $this->view->add_dict($account)->out("account", "editchars");
         }
     } else {
         echo " 0o?";
     }
 }
Exemple #3
0
 /**
  * форма редактирования плагина
  */
 public function action_info()
 {
     if (!empty($_GET["id"])) {
         $idp = (int) $_GET["id"];
         $info = $this->model->getInfo($idp);
         $stateAr = array(0 => $this->view->getVal("state0"), 1 => $this->view->getVal("state1"), 2 => $this->view->getVal("state2"));
         $path = "build" . DIRECTORY_SEPARATOR . $_SESSION["mwcabuild"] . DIRECTORY_SEPARATOR . "lang" . DIRECTORY_SEPARATOR . $_SESSION["mwclang"] . DIRECTORY_SEPARATOR . "group.php";
         if (file_exists($path)) {
             require $path;
         }
         $groups = $this->model->getGroups($idp);
         $ai = new ArrayIterator($groups);
         $argroup = array();
         foreach ($ai as $id => $val) {
             if (!empty($lang[$val])) {
                 $_name = $lang[$val];
             } else {
                 $_name = $val;
             }
             $argroup[$id] = $_name;
         }
         $argroup[0] = "...";
         $this->view->add_dict($info)->set("grplist", html_::select($argroup, "newgroup", 0, "style='width:100px;' onchange=\"addToPlugin(this,{$idp})\""))->set("statelist", html_::select($stateAr, "chosedstate", $info["pstate"], "style='width:100px;'"))->out("editform", "apman");
     }
 }
Exemple #4
0
 /**
  * инфа по админу
  */
 public function action_info()
 {
     if (!empty($_GET["id"])) {
         $info = $this->model->getInfo((int) $_GET["id"]);
         $this->view->add_dict($info)->set("grplist", html_::select($this->model->getCurrentList(), "checkedgroup", $info["access"], "style='width:183px;'"))->set("id", $_GET["id"])->out("form", "acontrol");
     }
 }
Exemple #5
0
 public function action_index()
 {
     $characters = $this->model->getCharlist();
     if (!empty($characters)) {
         $characters[0] = "...";
         $this->view->add_dict("freepoints")->set("chlist", html_::select($characters, "charsChoose", "0", "class='selectbox' onchange=' genIn({element:\"getfreeptcontent\",address:\"" . $this->view->getAdr() . "pagebg/freepoints/choose/\"+this.value+\".html\"});'"))->out("main", "freePoints");
     }
 }
Exemple #6
0
 /**
  * информация о доступных группе страницах
  */
 public function action_groupinfo()
 {
     if (!empty($_GET["id"])) {
         $pid = (int) $_GET["id"];
         $opages = $this->model->nonpageList($pid);
         self::action_getplist($pid);
         //генерируем список страниц для группы
         $this->view->setFContainer("knownpages", true)->set("id", $pid)->set("grplist", html_::select($opages, "newpage"))->out("groupinfo", "agroup");
     }
 }
Exemple #7
0
 public function action_index()
 {
     if (!empty($_SESSION["mwccfgread"])) {
         $selectted = $_SESSION["mwccfgread"];
     } else {
         require "configs/configs.php";
         $selectted = $cfg["defaultabuild"];
         $_SESSION["mwccfgread"] = $cfg["defaultabuild"];
     }
     $this->view->set("buildsList", html_::select(Tools::getAllBuilds(), "whosconfig", $selectted, "class='selectserv' onchange='document.getElementById(\"bselecter\").submit()'"))->out("selserver");
 }
 public function action_index()
 {
     $Langs = $this->model->getLangs();
     if (count($Langs) <= 1) {
         //если для билда только 1 папка с языком, зачем ее показывать?
         return;
     }
     $_REQUEST["langchooses"] = substr(trim($_REQUEST["langchooses"]), 0, 2);
     if (!empty($_REQUEST["langchooses"]) && !empty($Langs[$_REQUEST["langchooses"]])) {
         $_SESSION["mwclang"] = $_REQUEST["langchooses"];
         Tools::go();
     }
     $this->view->set("langdirlist", html_::select($Langs, "langchooses", $_SESSION["mwclang"], " class='selectbox' onchange='document.getElementById(\"langmenuform\").submit()'"))->out("plugin_langselector");
 }
Exemple #9
0
 public function action_index()
 {
     $this->view->add_dict("login");
     if (empty($_SESSION["mwcuser"]) && empty($_SESSION["mwcpwd"])) {
         if (isset($_REQUEST["secure-Btn"])) {
             $login = !empty($_POST["username"]) ? $_POST["username"] : NULL;
             $pwd = !empty($_POST["password"]) ? $_POST["password"] : NULL;
             if (!is_null($login) && !is_null($pwd)) {
                 if ($this->model->auth($login, $pwd)) {
                     Tools::go($this->view->getAdr() . "page/" . $this->configs["pageIn"] . ".html");
                 } else {
                     $_GET["p"] = "error";
                     $_GET["get"] = 8;
                 }
             }
         }
         $this->view->out("login", "login");
     } else {
         $characters = $this->model->getCharacters();
         $characters[-1] = "...";
         if (isset($_REQUEST["chosedchar"]) && in_array($_POST["chosedchar"], $characters)) {
             $_SESSION["mwccharacter"] = $_POST["chosedchar"];
         }
         if (!empty($_SESSION["mwccharacter"])) {
             $choosed = $_SESSION["mwccharacter"];
         } else {
             $choosed = -1;
         }
         $money = $this->model->aboutUser();
         $money["mwc_bankZ"] = Tools::number($money["mwc_bankZ"], 0);
         $money["mwc_credits"] = Tools::number($money["mwc_credits"], 0);
         $this->view->set("charlist", html_::select($characters, "chosedchar", $choosed, "class='selectbox' onchange='loginarea.submit()'"))->add_dict($money)->out("userPanel", "login");
         if (isset($_REQUEST["btn-out"])) {
             unset($_SESSION["mwcuser"], $_SESSION["mwcpwd"], $_SESSION["mwcpoints"], $_SESSION["mwccharacter"]);
             Tools::go($this->view->getAdr());
         }
     }
 }
Exemple #10
0
$gaddress = "http://" . getenv("HTTP_HOST") . implode("/", $list) . "/";
$content = new content($gaddress, "install", "ru");
if (!isset($_GET["st"])) {
    $content->out("index", "public", false);
} else {
    switch ($_GET["st"]) {
        //1 шаг. форма
        case 1:
            $dir = scandir("build");
            $list = array();
            foreach ($dir as $did => $name) {
                if ($name != ".htaccess" && $name != "." && $name != "..") {
                    $list[$did] = $name;
                }
            }
            $content->set("admlist", html_::select($list, "dirselect", 3, "style='width:173px'"))->out("step1", "public", false);
            break;
            //проверка коннекта
        //проверка коннекта
        case 2:
            try {
                if (!empty($_POST["conType"]) && !empty($_POST["db_host"]) && !empty($_POST["db_usr"]) && !empty($_POST["db_pwd"])) {
                    $conType = (int) $_POST["conType"];
                    $db = connect::start($conType, $_POST["db_host"], NULL, $_POST["db_usr"], $_POST["db_pwd"]);
                    $_SESSION["installmwcct"] = $conType;
                    $_SESSION["installmwcdb_host"] = $_POST["db_host"];
                    if (!empty($_POST["adb_name"])) {
                        $_SESSION["installamwcdb_name"] = $_POST["adb_name"];
                    }
                    $_SESSION["installmwcdb_usr"] = $_POST["db_usr"];
                    $_SESSION["installmwcdb_pwd"] = $_POST["db_pwd"];
Exemple #11
0
 public function action_index()
 {
     $this->view->set("langfileslist", html_::select($this->model->getFileList(), "selFolder", 0, "onchange='lmanfilter();'"))->out("main", "lmanage");
 }
Exemple #12
0
 /**
  * логи из файлов
  */
 public function action_fileindex()
 {
     $files = $this->model->getFilelist();
     $files[0] = "...";
     $this->view->set("filelist", html_::select($files, "chosfile", 0, "style='width:100px;' onchange='setfile(this.value);'"))->out("filemain", "logs");
 }
Exemple #13
0
 /**
  * форма добавления позиции в меню
  */
 public function action_addp()
 {
     if (!empty($_GET["pid"])) {
         $tmenu = (int) $_GET["pid"];
         $lpath = "build" . DIRECTORY_SEPARATOR . $_SESSION["mwccfgread"] . DIRECTORY_SEPARATOR . "lang" . DIRECTORY_SEPARATOR . $_SESSION["mwclang"] . DIRECTORY_SEPARATOR . "titles.php";
         if (file_exists($lpath)) {
             require $lpath;
         } else {
             $lang = array();
         }
         $this->view->set("mtypelist", html_::select($this->model->getMenuList(), "typemenu", $tmenu))->set("titlest", html_::select($lang, "mtitel", 1))->set("modullist", html_::select($this->model->pageList(), "pagesList", -1, "onchange='getlink();'"))->out("addPosition", "aaddmenu");
     }
 }