Jump to content
xisto Community

friiks

Members
  • Content Count

    54
  • Joined

  • Last visited

Everything posted by friiks

  1. Yea, true, I mean, I do give and get hugs But still something bothers me..I mean, I've done everything you said before..many times. But when I'm with her I get so... One her smile makes my day brighter...she makes me happy when she's just around.Feels weird.. Well... I should get more .. cooler .. you know, like attitude?I don't really know..I mean, how about showing some attention like giving her flowers or something...you know..
  2. Well...many Metallica songs like Fade To Black, Master Of Puppets.. But I <3 One
  3. Well yeah, I feel a little weird asking help here... But I've read other topics and maybe you can help me with an advice or two. Well my problem is ... a girl. I mean, she's not the problem - I am. I like her for like 2 years now. And I know stuff about her ex b-friends etc. We are good friends and yea, she knows I like her but I'm kinda afraid and don't really know how to show her that...you know. I mean, I've been with two girls since I like her but...I just broke up with them because I didn't really have any feelings against them. I even catch myself dreaming about her more and more. And yea, we go out to movies for a walks and stuff but nothing more. The dumbest thing is that I am more than sure she likes me as a friend - just a friend. She's year older than me though I don't think it's a problem as we go in same class... Well yea, shortened - I like her for a long long time and keep thinking about her (I'm a bad person about the girlfriend thing), and I think she doesn't like me that way and yea..I don't know what to do.. Hope there's an advice for me out there.. Thanks
  4. Well, when any of my friends..well girls are sad I just try to cheer em up..like telling funny stuff etc. If that doesn't help I usually say `aww` and give her a hug :PYea, that helps like half of the times.But there isn't one exact thing for all of the girls because some of them...just don't want to be helped. Like my ex girlfriend. Try not to upset her more and be nice to her. Don't know if this helped much but the best you know the girl the best you can help her
  5. friiks

    Starcraft 2

    [quote name='http://forums.xisto.com/no_longer_exists/, we must look at the concept of a StarCraft 2 through rational eyes. StarCraft is the most successful Real Time Strategy game of all time, played professionally on an international level. To create a StarCraft 2 makes complete sense financially, since it will immediately sell several million copies once released, thereby breaking the "fastest selling PC game ever" records set by its predecessors Diablo II and Warcraft III. However, Warcraft III is also a RTS game, and with the recent announcement of its expansion set, The Frozen Throne, it appears unlikely that Blizzard will announce or acknowledge a competing product anytime in the near future. We must also contemplate on the mere idea of StarCraft 2, the game. The original StarCraft and its expansion, Brood War, set the standard for all RTS games to come. It was perfect in nearly every way in respect to gameplay, including perfect speed, balance, and replayability. Regarding singleplayer, the original storyline was perfectly crafted to complement an already outstanding multiplayer game, earning the game much praise for having one of the best fictional universes ever created. Considering these facts, StarCraft 2 will have immense pressure on it to match, let alone surpass the greatness of its predecessor. The idea of taking on a task of such large magnitude is certainly daunting, and perhaps this is why none of Blizzard's teams have stepped up to the challenge. Website: It is a fact that starcraft2.com is owned by Vivendi Universal Interactive Publishing North America, the parent company of Blizzard Entertainment. The website's WHOIS information: Vivendi Universal Interactive Publishing North America DNS Admin 6080 Center Drive Los Angeles, CA 90045 US Phone: 310-431-4000 Email: vuipna-dns@vuinteractive.com Common sense tells us that the fact that Blizzard owns the domain itself means nothing. It isn't uncommon for game developers to register multiple domains to protect their copyrighted titles in anticipation of a sequel, spin off, or general expansion. All this tells us is that Blizzard intends to "revisit the world of StarCraft" some time in the future, but of course we already know that.
  6. Ok, you have three sites and you want to use one login for all of them?If yes, you want all the users to be able to do that or only you?And did you code them yourself or are they some kind of CMS's?
  7. Hey! Maybe you've seen my other tutorials...or my signature.. Anyways I'm going to show you how to make a system so users of your site could register accounts and you could have protected - user only - pages on your site Ok, so we start by creating a config.php file. <?php $dbhost = 'database host'; $dbname = 'database name'; $dbusername = 'database username'; $dbuserpass = 'database password'; mysql_connect ($dbhost, $dbusername, $dbuserpass);mysql_select_db($dbname) or die('Cannot select database');?>Fill in the values of your host and upload it.Here are querie to run in PHPmyadmin CREATE TABLE `users` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT , `username` VARCHAR( 255 ) NOT NULL , `password` VARCHAR( 255 ) NOT NULL , PRIMARY KEY ( `id` ) ) TYPE = MYISAM ; Next, lets create index.php. <?php//start the session so you would stay logged in//always must be on topsession_start();//include config.php fileinclude('config.php');?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>The site</title></head><body><center><a href="?p=idx">Home</a> - <a href="?p=page">Protected page</a><?php$p=$_GET['p'];//see my ?id= browsing tutorialswitch($p){default://if user isn't logged in lets show him the log in formif(!isset($_SESSION['username'])){?><form action='login.php' method='POST'>Username: <input type='text' name='username'><br>Password: <input type='password' name='password'><br><input name="login" type="submit" value="Submit"><br>Not <a href="register.php">registered</a>?</form><?}else{//$_SESSION['username'] = the current users //username. It will be echoed like "Hi, user!"echo "<br><br>Hi, ".$_SESSION['username']."!";echo "<a href='logout.php'>Log out</a>";}break;case 'page'://you can use it like this or use include()if(!isset($_SESSION['username'])){echo '<br><br>Log in to see this page!';}else{echo '<br><br>Only user who is logged in can see this!..and you see this so this means you are logged in;]';}}?></center></body></html>You see the explanations in the code. Now we need a file that will log the user in, right? Right! Create a file called login.php <?php//start session and include conf...session_start();include'config.php';//get the variables from form and adding some little security$submit=$_POST['login'];$username = mysql_real_escape_string(strip_tags(htmlspecialchars($_POST['username'])));$password = md5($_POST['password']);//if submit button is pressedif ($submit){if((!$username) || (!$password) || ($username=='') || ($password=='')){header("Refresh: 2;".$_SERVER['HTTP_REFERER']);echo'<center>Please enter both - username and password!</center>'; }//lets see if the user exists by making a query which selects//submitted username and password from the database//and the we use mysql_num_rows() to count the results returned//if there is a user with a username and password like that $c will be 1//as it will be counted otherwise it'll stay 0.$sql=mysql_query("SELECT * FROM `users` WHERE `username` = '".$username."' AND `password`= '".$password."'") OR die(mysql_error());$c=mysql_num_rows($sql);if($c>0){$r=mysql_fetch_array($sql);//set $_SESSION['username'] to the username from database$_SESSION['username'] = $r['username'];header("Refresh: 2; url=index.php?i=idx");echo'<center>Login successfull!</center>';//else, if there werent any records found show an error and //return the user to index.}else{header("Refresh: 2; url=index.php?i=idx");echo "<center>You couldn't be logged in!</center>";}}?>Ok, so the user is logged in, everything's fine ...but uh-oh...how can user log in if he's not registered ? make a file called register.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Register!</title></head><body><form action='<?=$_SERVER['PHP_SELF']?>' method='POST'>Username: <input type='text' name='username'><br>Password: <input type='password' name='password'><br><input name="register" type="submit" value="Submit"></form><?phpinclude('config.php');///variables...$submit=$_POST['register'];$username = mysql_real_escape_string(strip_tags(htmlspecialchars($_POST['username'])));$password = md5($_POST['password']);//if button is pressedif($submit){//if username is not blank..same for passif(($username) and ($password) and ($username!==NULL) and ($password!==NULL)){$sql="INSERT INTO `users` (`id`,`username`,`password`) VALUES ('NULL','".$username."','".$password."')";mysql_query($sql) or die(mysql_error());echo "Congratulations! You are registered!<br><a href='index.php'>Log in</a>";}}?></body></html>and the logout.php <?session_start();$_SESSION = array();header("Location: index.php");?> I'll add some more explanations later...don't have time now sorry.But you have the code...and if you have questions - ask. Preview
  8. Ok, um what exactly this does? I've worked with IPB so this adds some kind of link to users profile...?It's odd, you should explain more and give a link to an example as well as make a better topic title
  9. Like Lars ranting about Napster, eh? I really love Metallica but that disappointed me a lot although it was in 2000 it's kinda yea... All he said was that he doesn't mind people downloading their music - it's that they can download the album before you can buy it... I buy their cd's, yea... but I download music as well... I mean yeah...and this is kinda off topic yet I wanted to express how I feel
  10. Thanks all, I feel loved (...or at least noticed )'bout the hat...hmm, good question. I guess it's my style I like black (though I like all colors except brown (certain tones)) and, I like hats And yea.. I can't walk around in hot sun without hat.. I get migraine >.<
  11. It is, and you can change it easy for your needs. I still haven't done the administration file (Damnit >.< *slaps himself*) but I will do it either before going to bed today or tomorrow.
  12. For a million ..I would buy a house for my parents, an apartment for myself to party or just where me n the band could have rehearsals..um I'd buy an epiphone explorer and this one guitar I really like from my local music shop.. Um.. I would donate to the animal shelter...would go to a metallica concert for sure...go to a trip to egypt..visit my friend in netherlands..just use it for fun....and yea, put something in bank..
  13. Im here for some time so I know the rules, don't worry :(I have the points for #2 package too but Im not thinking about getting hosting at the moment so yea....thanks
  14. @sirphantom - that's a double post dude You could post it in a one post Anyways I like hockey. I love the fights and there's actually some action.
  15. Well, I never really noticed this forums. So I guess I wont get warn added up for posting late...Anyway, Hi, my name's Matt (It's Matīss actually but none of you(I guess)will be able to pronounce it...so I'm Matt ). I'm 16 and I live in Latvia. It's pretty boring here but I still like to hang out with my friends and be together with my girlfriend. Um, I can code php/mysql/css/html/gml Do it mostly for fun but sometimes make some sites for money. Got to eat too you know :(I'm about 178cm tall, got long brown hair, gray eyes, bad eye sight , my black hat (Yes, barely no one has seen me without it )...hmm and that's about it. I got a sexy picture in my profile :(Ah, yes, my taste of music - I'm into metal and heavy stuff. Metallica is my favorite band...but I also like some reggae and just random music...anything that's good actually.Now, I am tired as it's 1 .. in the night...thats after midnight x]I just don't know AM/PM format so ...bah.Hey!
  16. I'm from latvian and we say it like "Es tevi mīlu" here.If you don't see special letters it's "Es tevi milu".Um, It's "Ik hou van" In dutch I think and "Ya ljublju tjeba" (Needs russian letters to write it correct) in russian.Oh, and of course - "Ich liebe dich" in german!
  17. Like matrix said - robots have no feelings so...they have and shouldn't have any rights. I mean cmon...
  18. I agree with the people who say that having an mp3 player and a phone. I have a Samsung SGH-X660 cell phone. It has a pretty weak camera and no mp3 or anything. And yes, I have an mp3 player. I think that having they combined is ok if you don't your pocket to be stuffed and not so heavy but it still has disadvantages like, if you listen to music so much as I do you will have to recharge the battery like every second day. I used it's camera though until I got my digital camera. It's not too good...640x480 but..the pictures are ok. And yea, I like cameras in phones. They are pretty handy because you wont carry your camera always with you but you will always (atleast me) take your phone..
  19. Was just sitting and being bored but then I realized I could show how to create more or less popular ?id=page browsing. It's actually really easy. I know two ways how to do it. First one I learned was checking the variable and if it's true including the text/file/anything needed and so on. It was ok, but sometimes I just couldn't make it work so I switched to switch() function and that's what I'm going to show you guys right now. So, I made a test page which contains the code needed and here is its source. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Untitled</title></head><body><a href="?p=idx">Home</a> - <a href="?p=pagetwo">Page Two</a> - <a href="?p=pagethree">Page Three</a><br><?php$page=$_GET['p'];switch($page){default:echo 'This is the default page';break;case 'pagetwo':echo 'This is page two';break;case 'pagethree':echo 'This is page three<br>Cool, huh?';}?></body></html> Okies, I'll split up the code and explain it to you.I'll start with the links <a href="?p=idx">Home</a> - <a href="?p=pagetwo">Page Two</a> - <a href="?p=pagethree">Page Three</a><br>Those are normal html links only their href leads to links like ?p= ...well replace p with letter or a word you want - mind that you can't put spaces there..well, maybe you can but..don't do that. Now for the PHP. <?php$page=$_GET['p']; <?php starts php code $page=$_GET['p']; sets the $page variable to the page requested. Um, you have to change p in $_GET['p'] to word/letter you use for your links. $_GET gets the info from the url (in this tutorial ) switch($page){default:echo 'This is the default page';break;case 'pagetwo':echo 'This is page two';break;case 'pagethree':echo 'This is page three<br>Cool, huh?';} switch($page){ Um, this part of code uses switch function to switch parts of code by using the $page variable.default: sets the default page that will be shown when user inputs an invalid url and the content that will be shown in index page. You see the echo() function in next line. You can input anything there...echo text/include file...use your imagination. Just put what you want to see in the default page. break; ends execution of the current switch structure. Can't really explain it but that. Ok, now for the part you want to see so bad. case 'pagetwo': ...see anything in common with the previous code I've shown? If you guessed <a href='?p=pagetwo'> then you are correct. If the $page variable is set to pagetwo switch function will switch the content to the content you will put after the colon. Same thing works for the rest of the code. You add a case'': checking for a variable, put the code to show it is true, use break to break the code and add next case. When you have added all the pages you want you just put a curved bracket (Like here I have done all my pages and want to end it. case 'pagethree':echo 'This is page three<br>Cool, huh?';}) and voila, your links are working. Hope that helps you at least a little. Ask if you have any questions, corrections or suggestions. Oh, and here's the link to a preview. Cheers, Matt.
  20. friiks

    My Dad

    Wow, I guess moms just know all the things as well as they never get ill, are tired of her children boring stories... well ok xD I think it's just some experience with pc. Like your dad had a crash once, someone showed him what to do, next time when that happened he did the same...started exploring..and yea, got good at it. You learn from exploring. But ah well, maybe he just had taken some computer courses?
  21. Well, you have to change the color/theme, anything yourself. This is a tutorial in which I give you the code to learn from. You can get css and colorize it..
  22. Thank you for the replies :PAnd @ t3jem, I knew I commented the code too less, I was just in little hurry when submitting this so I'll add some more comments when I update the topic with a file for the administration.
  23. Ok, so I'm going to show you how to create a very basic shoutbox which is driven with PHP and a MySQL database. So, lets start - open a database management program like PHPMyAdmin and run these queries. CREATE TABLE `shoutbox` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT , `name` VARCHAR( 255 ) NOT NULL , `mail` VARCHAR( 255 ) NOT NULL , `time` VARCHAR( 255 ) NOT NULL , `message` TEXT NOT NULL , `ip` VARCHAR( 255 ) NOT NULL , PRIMARY KEY ( `id` ) ) TYPE = MYISAM ; CREATE TABLE `shoutbox_admin` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT , `name` VARCHAR( 255 ) NOT NULL , `password` VARCHAR( 255 ) NOT NULL , PRIMARY KEY ( `id` ) ) TYPE = MYISAM ; INSERT INTO `shoutbox_admin` (`id`,`name`,`password`) VALUES ('NULL', 'your_username', 'your_md5_hashed_password') replace your_username with your username [for administration] and your_md5_hashed_password with a password that has been md5 hashed. You can google for md5 hasher or just create a php file which contains this <?php$mypass='your_password';$mypass=md5($mypass);echo $mypass;?> Congratulations, your database is ready to be used Next we will create a form. Make a file called form.htm or any name you want it to be called. Put this code in it. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Shoutbox</title> </head> <body> <iframe src='shouts.php' width='150px' height='250px'></iframe> <form method="post" action="doit.php"> <input type='text' name='name' value='Name' onfocus='this.value=""'><br> <input type='text' name='mail' value='E-mail' onfocus='this.value=""'><br> <textarea name='message' onfocus='this.value=""' rows='3' cols='15'>Your text</textarea><br> <input type='submit' value='submit' name='submit'> </form> </body> </html> Here we create a form which will send data to a file that will insert the data into the database And I'm using an iframe to view the shoutbox as I couldn't find a code to refresh only one <div>. Ok, now for the file that will read the data sent from our form and will insert it into database. Create a file called doit.php and put this code in it. <?php//including the database connectioninclude('config.php');//getting everything that has been submitted$name=mysql_real_escape_string(strip_tags($_POST['name']));$mail=mysql_real_escape_string(strip_tags($_POST['mail']));$message=mysql_real_escape_string(strip_tags($_POST['message']));$submit=$_POST['submit'];//get the current time with php date() function//note that the server time will be recorded//more info about all functions - http://php.net$time=date("m/d/y");//get the ip. Note that this wont see through proxies$ip=$_SERVER['REMOTE_ADDR'];//just some basic error checking which//checks if name,e-mail and message //hasnt been left blank or with default textif (($name!=="") || ($name!=="Name") || ($mail!=="") || ($mail!=="E-mail") || ($message!=="") || ($message!=="Your text")){//inserts data into the database$sql = "INSERT INTO shoutbox (id, name, mail, message, time, ip) VALUES ('NULL', '$name', '$mail', '$message', '$time', '$ip')";mysql_query($sql) or die(mysql_error());//sends the user back to the formheader("Location:".$_SERVER['HTTP_REFERER']);}else{header("Location:".$_SERVER['HTTP_REFERER']);}?> Ah, config.php, forgot about it!Create a file named like that and put this in it. <?php $dbhost = 'database host'; $dbname = 'database name'; $dbusername = 'database username'; $dbuserpass = 'database password'; mysql_connect ($dbhost, $dbusername, $dbuserpass);mysql_select_db($dbname) or die('Cannot select database');?>I guess you understand which parts you have to edit here. Ok, now for the final part - file that will output the shouts. Create a file named shouts.php and this is the code to put in it. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><style type="text/css"><!--.shout{padding-bottom:4px;border-bottom:1px solid #000;width:150px;text-align:left;font-family:verdana;font-size:10px;}--></style><title>Shoutbox</title></head><body onLoad=window.setTimeout("location.href='shouts.php'",10000)><?phpinclude('config.php');$result = mysql_query("select * from shoutbox order by id desc limit 5");//the while loopwhile($r=mysql_fetch_array($result)){ //getting each variable from the table $time=$r["time"]; $id=$r["id"]; $message=$r["message"]; $name=$r["name"]; $mail=$r['mail'];echo "<div class='shout'> Shouted on: <i>".$time."</i><br> By <b><a href='mailto:".$mail."'>".$name."</b></a><br> ".$message."<br> </div><br>";} ?></body></html>The final code just gets all data from database and is outputted with a while loop. note that you can add pagination, limit...anything to this. This is a very simple shoutbox example. If you have any questions please ask as I may have forgotten something... I will add the administration later as my headache is killing me. Here's my files if someone wants to see. shoutbox.zip Edit: Oh yea, wanted to include the preview :$ clickie^^ Edit No.2: The Administration Panel! $idg=$_GET['id']; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> <title>ACP</title> </head> <body> <?php //include config.php include 'config.php'; //get the username from the form and add some security //so you cant get hacked so easy linenums:0'><?php //Start the session so you would stay logged in..//must be ABOVE ANY outputsession_start(); //Get the cmd variable$cmd=$_GET['cmd'];$idg=$_GET['id'];?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"><title>ACP</title></head><body><?php//include config.phpinclude 'config.php';//get the username from the form and add some security//so you cant get hacked so easy $username = mysql_real_escape_string(strip_tags(htmlspecialchars($_POST['username'])));$password = md5($_POST['password']);//if login button is pressedif ($_POST['login']){//check if username and password are insertedif((!$username) || (!$password)){//if not tell them to...do insert all of infoecho "Please enter both values<br>";}//when they have we check if the username and the password exists$sql = mysql_query("SELECT * FROM `shoutbox_admin` WHERE `name` = '$username' AND `password`= '$password'") OR die(mysql_error());//so we need to check it for real //mysql_num_rows() counts the rows which are returned as true$login_check = mysql_num_rows($sql);//if the check is true....true = 1 and $login check is set as $login_check=1if($login_check > 0){//so if it is larger than 1 we set some session variables -//username and id$r=mysql_fetch_array($sql);$_SESSION['id'] = $r['id'];$_SESSION['username'] = $r['name'];//if it's not let's make him suffer...moahahahaa...//reload the page I mean.. }else {header("Refresh:2;admin.php");echo 'Go and login <-<';}}//so if session username isn't set show user the login formif(!isset($_SESSION['username'])){?><center><form action='<?=$_SERVER['PHP_SELF']?>' method='POST'>Username: <input type='text' size='15' name='username'><br>Password: <input type='password' size='15' name='password'><br><input name="login" type="submit" value="Submit"></form></center><? }//if not - show him the contents and stuff...else{//welcome message and logout link...echo "<center>Welcome, ". $_SESSION['username'] ."! <a href='logout.php'>Log Out</a></center>";echo "<br><br><center>";//see my ?id= browsing tutorial to understand switch()switch($cmd){default://getting all of the shouts and adding `delete me` link...$result = mysql_query("select * from shoutbox order by id desc"); while($r=mysql_fetch_array($result)) { $name=$r["name"];$message=$r["message"];$time=$r["time"];$id=$r["id"];echo "Shout by: ".$name." <strong>@</strong> ".$time."<br>".$message."<br><a href='?cmd=delete&id=".$id."'>Delete me</a><br><br>";}break;case 'delete':$sql = "DELETE FROM shoutbox WHERE id=".$idg."";$result = mysql_query($sql);header('Refresh:2;admin.php');echo "deleted";};} ?> logout.php <?session_start();$_SESSION = array();header("Location: index.php");?> admin.php - admin.phplogout.php - logout.php
  24. Maybe someone already said this but <font> is evil as it is deprecated. Use CSS instead.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.