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 if (count($errors) > 0) : ?> | |
<div class="error"> | |
<?php foreach ($errors as $error) : ?> | |
<p class="alert-warning"><?php echo $error ?></p> | |
<?php endforeach ?> | |
</div> | |
<?php endif ?> |
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 include('server.php') ?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Registracija korisnika. </title> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
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(); | |
// variable declaration | |
$username = ""; | |
$country = ""; | |
$email = ""; | |
$first_name = ""; | |
$last_name = ""; | |
$birth_date = ""; |
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
CREATE TABLE `users` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
`username` varchar(50) NOT NULL, | |
`first_name` varchar(50) NOT NULL, | |
`last_name` varchar(50) NOT NULL, | |
`email` varchar(100) NOT NULL, | |
`birth_date` date NOT NULL, | |
`password` varchar(100) NOT NULL, | |
`spol` varchar(2) NOT NULL, | |
`country` varchar(100) NOT NULL |
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
/* Set the background color of body to tan */ | |
body { | |
background-color: tan; | |
} | |
/* On screens that are 1200px or less, set the background color to red */ | |
@media screen and (max-width: 1200px) { | |
body { | |
background-color: red; | |
} |
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
/* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ | |
@media (min-width:320px) { | |
} | |
/* smartphones, Android phones, landscape iPhone */ | |
@media (min-width:480px) { | |
} |
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
/*Different depth of nodes will use different colour allowing you to see the size of each element on the page, their margin and their padding. Now you can easily identify inconsistencies. | |
*/ | |
* { background-color: rgba(255,0,0,.2); } | |
* * { background-color: rgba(0,255,0,.2); } | |
* * * { background-color: rgba(0,0,255,.2); } | |
* * * * { background-color: rgba(255,0,255,.2); } | |
* * * * * { background-color: rgba(0,255,255,.2); } | |
* * * * * * { background-color: rgba(255,255,0,.2); } | |
* * * * * * * { background-color: rgba(255,0,0,.2); } | |
* * * * * * * * { background-color: rgba(0,255,0,.2); } |
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 | |
/*Disable comments from WordPress*/ | |
add_action('admin_init', function () { | |
// Redirect any user trying to access comments page | |
global $pagenow; | |
if ($pagenow === 'edit-comments.php') { | |
wp_redirect(admin_url()); | |
exit; | |
} |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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 | |
error_reporting(-1); // reports all errors | |
ini_set("display_errors", "1"); // shows all errors | |
ini_set("log_errors", 1); | |
ini_set('user_agent','Mozilla/4.0 (compatible; MSIE 6.0)'); | |
// https://github.com/MartinThoma/ics-parser/blob/master/class.iCalReader.php | |
require_once 'class.iCalReader.php'; |
OlderNewer