Exemple #1
0
	
	$ksm->addParent("root","step3","<span class='hid' id='wstep3' >Step3 : Terms of use </span>");
	$ksm->addPanel( "step3", "Pstep3" , echoStep3() ) ;
	
	$ksm->singleExpand = true;
	$ksm->width="500px";
	
	$regisForm = new UpdatePanel( "regisForm" ) ;
	$regisForm->setLoading("$KoolControlsFolder/koolajax/loading/1.gif" , "white"   , 50 );	
	$stepDone = ( isset( $_POST["task"] ) && $_POST[ "task" ] == "done" ) ? true : false  ;
	
	if( $stepDone ) {
		$return = '<div style="height:auto;width:500px;" id="registration-form">		
						<div id="my-tit" >Registration form</div><br/>
						<div >';						
		$return .= echoResult( $_POST[ "data" ]) ;
		$return .= '</div>';
	}else{		
		$return = '	<script type="text/javascript" src="functions.js"></script>
					<div style="height:auto;width:500px;" id="registration-form">		
						<div id="my-tit" >Registration form</div><br/>
						<div >'. $ksm->Render().
						'</div>						
						<input type="hidden" name="data" value="" />
						<input type="hidden" name="task" value="" />
						<script language="javascript">
							ksm.registerEvent("OnBeforeExpand",OnBeforeExpand_handle);
						</script>
					</div>';
	}
	
        // controller
        require_once APP_PATH . 'control/categoriesController.php';
        // Template
        $sitePath = '/view/site/dashboard/admin/categories.php';
        break;
    default:
        // DASHBOARD
        // load models
        require_once APP_PATH . 'model/getPackageOverviewData.php';
        require_once APP_PATH . 'model/organizePackageOverviewData.php';
        require_once APP_PATH . 'model/getNewsletterData.php';
        require_once APP_PATH . 'model/getUsersAmount.php';
        require_once APP_PATH . 'model/echoResult.php';
        require_once APP_PATH . 'model/getJs.php';
        // scripts
        $requiredScripts = ['chart' => 1, 'adminChart' => 1];
        // call models
        $scripts = getJs($allScripts, $requiredScripts, true);
        $packageOverviewData = getPackageOverviewData($db);
        $organizedPackageOverview = organizePackageOverviewData($packageOverviewData);
        $latestSubscribersAmount = echoResult(getNewsletterData($db, 1));
        $yesterdaySubscribersAmount = echoResult(getNewsletterData($db, 0, 1));
        $allSubscribers = echoResult(getNewsletterData($db));
        $usersThisMonth = echoResult(getUsersAmount($db, 1));
        $allUsers = echoResult(getUsersAmount($db));
        // template
        $sitePath = '/view/site/dashboard/admin/dashboard.php';
        $graphData = '/config/graphdata/dataForAdminGraph.php';
        $optScript = $graphData;
        break;
}
Exemple #3
0
    echoResult("err", "b1c-err", "", $l["sent"]);
} else {
    $get_data = $_GET["cs"];
    if (count($get_data) > 1) {
        // data to send
        $ip = $_SERVER['REMOTE_ADDR'];
        $prd = gF("prd");
        $geo = @file_get_contents("http://freegeoip.net/json/" . $ip);
        $geo = @json_decode($geo, true);
        $title = $l["title"];
        $title = "=?UTF-8?B?" . base64_encode($title) . "?=";
        $mess = "<h3>Заказ на " . $prd . "</h3><div style='background:#fffce8;border:1px solid #cdc485;padding:0 10px'>";
        $mess .= getOptions(1);
        $mess .= "</div><div style=\"background: #f9f2f4; border: 1px solid #c7254e;padding:0 10px;margin-top:10px;\">";
        $mess .= addToMess("IP", $ip);
        $mess .= addToMess("Откуда запрос", $geo['city'] . " (" . $geo['country_name'] . ")");
        $mess .= "</div>" . $l["footer"];
        $headers = "Content-type: text/html; charset=utf-8 \r\n";
        $headers .= "From: garant.kuvalda.by <" . $from . ">\r\n";
        $sms["msg"] = substr(translit($prd . "," . getOptions(0)), 0, 160);
        if (strlen($to) > 5 && $to != "yourMail") {
            @mail($to, $title, $mess, $headers);
        }
        if ($sms["id"] != "" || $sms["key"] != "" || $sms["log"] != "") {
            @sendSMS($num, $sms["msg"]);
        }
        echoResult("ok", "b1c-ok", $time, $l["ok"]);
    } else {
        echoResult("err", "b1c-err", "", $l["err"]);
    }
}
Exemple #4
0
                                $result['status'] = 0;
                                break;
                            }
                        } else {
                            $result['msg'] = 'Enable \'exec()\' in PHP (http://php.net/manual/en/function.exec.php)';
                            $result['status'] = 0;
                            break;
                        }
                    } else {
                        $result['msg'] = 'Disable PHP \'safe_mode\' (http://php.net/manual/en/features.safe-mode.php)';
                        $result['status'] = 0;
                        break;
                    }
                } else {
                    $result['msg'] = 'Directory, defined in \'DOWNLOAD_PATH\' not exists or not writable';
                    $result['status'] = 0;
                    break;
                }
            } else {
                $result['msg'] = 'Directory, defined in \'TMP_PATH\' not exists or not writable';
                $result['status'] = 0;
                break;
            }
            break;
        default:
            $result['msg'] = 'No action';
            $result['status'] = 0;
    }
}
echoResult($result, 'json');
Exemple #5
0
// ...........................................................
// Izpis vpisanih vrednosti v obrazec
echo "Ime = " . htmlspecialchars($ime, ENT_NOQUOTES, "UTF-8") . "<br/>";
echo "E-mail = " . $email . "<br/>";
echo "Geslo = " . $geslo . "<br/>";
echo "Geslo2 = " . $geslo2 . "<br/>";
echo "CaptchaCode = " . $captchaCode . "<br/>";
// Preverjanje funkcij za odstranjevanje / dodajanje slashev
echo "<hr/>";
echo "Odstranim slashe:" . stripslashes($_POST['ime']) . "<br/>";
echo "Dodam slashe:" . addslashes($_POST['ime']) . "<br/>";
echo "<hr/>";
echoResult("Preverjanje dolžine (med 6 in 16 znaki): ", isWithinLength($geslo, 6, 16));
echoResult("Preverjanje ujemanja obeh vpisanih gesel: ", $geslo == $geslo2);
echoResult("Ali geslo vsebuje cifre: ", areDigitsPresent($geslo));
echoResult("Ali geslo vsebuje male znake abecede: ", areLowerCharsPresent($geslo));
echoResult("Ali geslo vsebuje velike znake abecede: ", areUpperCharsPresent($geslo));
echoResult("Ali geslo vsebuje posebne znake: ", areSpecCharsPresent($geslo));
echo "Moč gesla (pri min. dolžini 6 znakov) = " . passwordStrength($geslo, 6) . "<br/>";
echoResult("Ali geslo ima moč 4 in je med 6 - 16 znaki? ", isStrongEnough($geslo, 6, 16, 4));
echoResult("Je e-mail ustrezen? ", isEmailValid($email));
echoResult('Ali je bila CAPTCHA koda pravilno vnešena? ', $imgCaptcha->check($captchaCode) == true);
// ...........................................................
// Izpis informacije v desn stolpec
// ...........................................................
$infoOdstavek = "Preverjanje moči gesla, funkcij za delo z nizi, ter preprečevanje " . "napadov kot sta XSS in SQL injection";
desniStolpec($infoOdstavek);
noga();
?>