This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Before user can access the website, TasteWP will activate plugins. | |
// You can check for hook: "tastewp_activate_plugins" | |
// Or for function named: "__tastewp_initialization" --- | |
// if (function_exists('__tastewp_initialization')) { ... } | |
/* ———————————————————————————————————————————————————————— */ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add hook which will be initialized by TasteWP | |
add_action('tastewp_activate_plugins', function () { | |
// Prevent from calling this function multiple times | |
if (get_option('my_plugin_slug_pre_initialized', false)) return; | |
else update_option('my_plugin_slug_pre_initialized', true); | |
// Include some files, at this point anything you want. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $nrs = range($from,$to) - There you can set the compartment of your numbers e.g. range(10,992); | |
// $from == which number will be the lowest possibility | |
// $to == which number will be the highest possibility | |
// $scope == how many numbers from ($from,$to) will be displayed | |
function rnum($scope) { | |
$nrs = range(1,70); | |
$nr = array_rand($nrs,$scope); | |
shuffle($nr); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if ((!isset($_POST['login'])) || (!isset($_POST['haslo']))) { | |
header('Location: index.php'); | |
exit(); } | |
require_once 'users.php'; | |
$postlog = $_POST['login']; $postlog = htmlentities($postlog, ENT_QUOTES, "UTF-8"); | |
$postpass = $_POST['haslo']; $postpass = htmlentities($postpass, ENT_QUOTES, "UTF-8"); |