Exemplo n.º 1
0
function saveconfig()
{
    global $shop_lang, $modx;
    $user = $modx->userLoggedIn();
    $act = $_GET['act'];
    if ($user['usertype'] == "manager") {
        if (!empty($act) && $act == "saveconfig") {
            foreach ($_GET as $key => $value) {
                if ($key != "a" && $key != "id" && $key != "act" && $key != "act2" && $key != "act3") {
                    //echo  $value;
                    setConf("", $key, $value, 1);
                }
            }
            include_once $modx->config['base_path'] . "manager/processors/cache_sync.class.processor.php";
            $sync = new synccache();
            $sync->setCachepath($modx->config['base_path'] . "assets/cache/");
            $sync->setReport(false);
            $sync->emptyCache();
            // first empty the cache
            regenConf();
            return "<span class='ok'>" . $shop_lang['saveok'] . "</span>";
        }
    }
}
Exemplo n.º 2
0
                             } else {
                                 echo "No usb detected !";
                             }
                         } else {
                             if ($dest == "internal") {
                                 if (strstr($logPath, '/pineapple')) {
                                     echo "Already on internal";
                                 } else {
                                     $newPath = "/pineapple/logs/reaver/";
                                     if (!is_dir($newPath)) {
                                         if (!exec("mkdir -p {$newPath}")) {
                                             echo "Error while creating internal log directory !";
                                         }
                                     }
                                     if (exec('mv ' . $logPath . 'reaver-* ' . $newPath) == "") {
                                         setConf('logPath', $newPath);
                                         echo 'logs moved to internal';
                                     } else {
                                         echo 'error while moving to internal';
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 } else {
     echo "NO TRIGGER; please report to hackrylix@gmail.com...";
 }
Exemplo n.º 3
0
function off_addon($addon)
{
    global $modx, $shop_lang;
    $user = $modx->userLoggedIn();
    $output = "";
    $output_sales_notice = "";
    $output_sales_error = "";
    $act = $_GET['act'];
    if ($user['usertype'] == "manager") {
        if (!empty($act) && $act == "addonoff" && !empty($addon) && $tables[$addon] != "system") {
            setConf("addons", $addon . "_active", "no", 1);
            $output = notice($shop_lang['addons_off_ok'], 'success');
        }
    }
    return $output;
}