Пример #1
0
function addAppInfo()
{
    if (!isset($_POST['submit'])) {
        exit;
    }
    foreach ($_POST['input'] as $_FORM) {
        if (empty($_FORM)) {
            exit("<p style='background-color:red;color:white;width:auto;'>Some value are blank!</p>");
        }
    }
    try {
        $truPth = '__src/__data/config.json';
        $dataF = '{
                   
				   "id"                  : "' . clearInputData($_POST['input'][0]) . '",
				   
                   "secret"              : "' . clearInputData($_POST['input'][1]) . '",
		           
				   "url"                 : "' . clearInputData($_POST['input'][2]) . '",
		           
				   "page"                : "' . clearInputData($_POST['input'][3]) . '",
		           
				   "post_msg"            : "' . clearInputData($_POST['input'][4]) . '",
                   
				   "inviteMsg"           : "' . clearInputData($_POST['input'][5]) . '",
                   
				   "pageTitle"           : "' . clearInputData($_POST['input'][6]) . '",
                   
				   "adsScript"           : "' . $_POST['input'][9] . '",
                   
				   "adsSlot"             : "' . $_POST['input'][10] . '",  
				   
				   "adsSlot_2"             : "' . $_POST['input'][11] . '",  
				   
				   "adsSlot_3"             : "' . $_POST['input'][12] . '",  
  
                  "fontName"             : "' . clearInputData($_POST['input'][13]) . '",    
				  
		          "fontSize"             : "' . clearInputData($_POST['input'][14]) . '"        
     }';
        $openF = fopen($truPth, 'w+');
        fwrite($openF, $dataF);
        echo '<script>window.top.location.reload</script>';
    } catch (Exception $e) {
        echo $e->getMessage();
    }
    exit;
}
Пример #2
0
Copyright (C) 2014  Samundra kc

*- @Author: Samundra kc;
*- @contact: samundrak@yahoo.com
*
*/
require '__src/__iii__.php';
DenyFromAll();
//if(adminOrder('server') != @$_SERVER['HTTP_REFERER'])
//exit('Invalid referer');
error_reporting(0);
$getPath = clearInputData(@$_POST['fileName']);
$doTask = clearInputData(@$_POST['doTask']);
$feat = @$_POST['features'];
$getMsg = empty($_POST['getMsg']) ? ' ' : $_POST['getMsg'];
$getMsg = clearInputData($getMsg);
$file = array($getPath, $feat);
$restrict = array('index.html', 'index', '.htaccess', 'http://', 'www', 'https://', '../', 'ftp', 'http', 'xml', 'css', 'php', 'php5', 'js', 'html');
if (!empty($file)) {
    foreach (@$file as $x) {
        foreach ($restrict as $y) {
            if (strchr($x, $y)) {
                alert("This types of files are not allowed to download or delete.");
                exit;
            }
        }
    }
}
switch ($doTask) {
    case 0:
        reloadFileFromAjaxReq($getPath);