コード例 #1
0
ファイル: functions.inc.php プロジェクト: vvp24/tsvshop
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>";
        }
    }
}
コード例 #2
0
ファイル: reaver_actions.php プロジェクト: vaginessa/reaver
                             } 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...";
 }
コード例 #3
0
ファイル: functions.inc.php プロジェクト: myindexlike/tsvshop
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;
}