} } else { message_div("message_div", "Your username can contain only A-Z and 0-9!"); } //} else { // message_div("message_div","Wrong captcha entered."); //} } if (isset($_POST['kraj'])) { $email = htmlspecialchars($_POST['mails'], ENT_QUOTES); $code = htmlspecialchars($_POST['code'], ENT_QUOTES); $query = mysql_query("SELECT * FROM users WHERE email='{$email}' AND code='{$code}'"); if (mysql_num_rows($query) == 1) { message_div("message_div", "Your profile is successfully verified."); mysql_query("UPDATE users SET active='yes' WHERE email='{$email}'"); message_div("message_div", "Visit e-mail to confirm account."); } } ?> <form method='post' autocomplete='off'> <div class='form'><center> <div id="1"> <label style="color: #3992b1;font-size:17px;font-weight:bold;">REGISTER - Set up account</label> <label style="float:right;padding-right:40px;"><img src="style/css/img/1340723723_1_filled.png"> <img src="style/css/img/1340722607_2_filled.png" style="opacity:0.5;"> </label> <div style="clear:both;"></div> <br/> <hr height="1px" width="660px" color="#d1d3d5"> <br/><br/> <div style="float:left;padding-left:40px;">
} else { message_div("message_div", "Wrong username and password combination."); } } else { $result = mysqli_query($mysqli_connect_db, "SELECT * FROM users WHERE username='******' AND password='******'"); if ($result->num_rows == 1) { while ($row = $result->fetch_assoc()) { $status = $row['status']; $_SESSION['user'] = $row['username']; $_SESSION['status'] = $row['status']; setcookie("user", "{$row['username']}", time() + 3600, "/"); setcookie("status", "{$row['status']}", time() + 3600, "/"); die("<script>location.replace('profile.php')</script>"); } } else { message_div("message_div", "Wrong username and password combination."); } } } } ?> <form method='post' autocomplete='off'> <div class='form'> <div id="1"><center> <label style="color: #3992b1;font-size:17px;font-weight:bold;">LOGIN</label> <div style="clear:both;"></div> <br/> <hr height="1px" width="620px" color="#d1d3d5"> <br/><br/> <div style="float:left;padding-left:40px;"> <table>
</center> </div> <div class="graybg" style='720px;'> <div class="button_well"> <a href="index.php"><input type='button' class='dugme' value="Get Back" disabled></a> </div> <br/><br/><br/> </div> <br/><br/> <?php } } else { message_div('message_div', 'Link is removed.'); } } else { message_div('message_div', "Link has been removed or never existed."); banner(); ?> <div class='form' style='720px;'> <center> <!--<img src='http://2.bp.blogspot.com/-IqXGVlCP0jo/T2y8koA137I/AAAAAAAADbk/VWU059O1j1w/s1600/404.jpg'>--> <img src='http://css-tricks.com/images/404.jpg'> </center> </div> <div class="graybg" style='720px;'> <div class="button_well"> <a href="index.php"><input type='button' class='dugme'value="Get Back"/></a> </div> <br/><br/><br/> </div> <br/><br/>
<html> <head> <title>Template Creation</title> <?php common_styles(); ?> </head> <body> <?php login_bar(); ?> <div class="container"> <div class="span-24 prepend-top append-bottom"> <h3 class="bottom">Select premade Template</h3> <?php message_div(); ?> <?php if (empty($_SESSION["user_id"])) { echo '<div class="span-24 title">You need to be logged in to Be able to create an account.</div>'; } else { // Calls API to get templates XML and parses it $templates_xml = simplexml_load_string($rightsignature->getTemplates()); echo ' <form action="select_template.php" method="post"> <select name="guid">'; // Loops through each template in XML and creates dropbox foreach ($templates_xml->templates->template as $template) { // Split up tags string into an array $tags = preg_split("/,/", (string) $template->tags); // If tags has a 'user' tag with the same value as the current user,
$dobitak = rand(1, 9) . time(); //*----------------Getting site name function curPageURL() { $pageURL = 'http'; $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"] . '/'; } return $pageURL; } //*----------------File linking message_div('nista', 'Test link redirect: <a href="url.php?name=' . $dobitak . '">' . $url . ' </a><br><br> Original url: <input class="text" value="' . curPageURL() . 'url.php?name=' . $dobitak . '" readonly="true" name="url_full">'); //*----------------Inserting in database if (empty($_SESSION['user'])) { $user = "******"; $stmt = $mysqli_connect_db->prepare("INSERT INTO links(original,short,user,via,ip,datum,clicks) VALUES('{$url_clean}','{$dobitak}','{$user}','WebSite','{$ip}','{$date}','0')"); $stmt->execute(); $stmt->close(); } else { $user = $_SESSION['user']; $stmt = $mysqli_connect_db->prepare("INSERT INTO links(original,short,user,via,ip,datum,clicks) VALUES('{$url_clean}','{$dobitak}','{$user}','WebSite','{$ip}','{$date}','0')"); $stmt->execute(); $stmt->close(); } } ?>