Jump to content
xisto Community

msabas

Members
  • Content Count

    88
  • Joined

  • Last visited

Everything posted by msabas

  1. Well i just finished ordering this HP 160GB Personal Media Drive, It belive its built to fit the new model HP desktops, it is an external drive. From what I plan on using this is to transfer everything from my current 80GB hard drive, that would be moving all my pictures, movies, and pretty much any files that i have saved to my pc. In hopes to free up space, in my 80GB. The rice for it is only 150.00 US Dollars, plus tax. So its not too bad,. Also its a plus since i can take it any where, and there are no cables to plug it into, But it only fits on select model HP and Compaq desktops, so that is the only disadvantage to it.
  2. I am very interested in learning how to create or start my own tutorial submitt site. What do I need to learn ? What do I need to have. Is there a script that can be made up or a software? What I would like to do is start my own tutorial submit site. something similar to good-tutorials and or pixel2life except those sites are really big and cover many tutoriasl for many different programs. Id like to just cover tutorials for maybe a total of 3 to 4 different programs. Im sure I need hosting a domain a site and some good forums to get something good going. But the main thing i need is the script on how to create this Tutorial Submit site What i found is this but im a bit confused since i do not know how to create the mysql tables portion Features include: Categories Comments Admin Panel First off, we gotta make some MySQL tables. First table: CREATE TABLE `tutorials` (`id` int(250) NOT NULL auto_increment,`submitter` varchar(250) NOT NULL,`text` text NOT NULL,`short_description` text NOT NULL,`title` varchar(250) NOT NULL,`cat_id` int(25) NOT NULL,`date_submitted` varchar(250) NOT NULL,`time_submitted` varchar(250) NOT NULL,`show_email` tinyint(1) NOT NULL,`email` varchar(250) NOT NULL,`views` int(250) NOT NULL default '0',`is_validated` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) ENGINE=MyISAM; This sets up the table where all of the actual tutorials will be stored. Second table: CREATE TABLE `tutorials_categorys` (`id` int(25) NOT NULL auto_increment,`category` varchar(250) NOT NULL,`description` text NOT NULL,PRIMARY KEY (`id`)) ENGINE=MyISAM; This table will make the tutorial categorys, in which the different tutorials will be shown! Third table: CREATE TABLE `tutorials_comments` (`id` int(250) NOT NULL auto_increment,`tut_id` int(250) NOT NULL,`submitter` varchar(250) NOT NULL,`text` text NOT NULL,`time_submitted` varchar(250) NOT NULL,PRIMARY KEY (`id`)) ENGINE=MyISAM; This table will store all the tutorial comments in which we can later display them! Alrighty, now, onto the coding. First off, we are going to want to make a file called tutorials.php. We will be using switch() for our navigation system in this, and if you don't like it, replace it with your own. Here is the code: tutorials.php php code: <?php //------------------------------------------ //database connection mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("database") or die(mysql_error()); //end database connection //------------------------------------------ //------------------------------------------ //echo out a navigation panel echo " <center><a href='tutorials.php'>View Categorys</a> | <a href='tutorials.php?action=addtutorial'>Add Tutorial</a></center> "; //------------------------------------------ //------------------------------------------ //begin main navigation (tutorials.php?action=) switch($_GET['action']) { //------------------------------------------ //this case adds a tutorial. //pretty self-explanitory //------------------------------------------ case "addtutorial": //if the form to enter a new //tutorial hasn't been submitted, //show it if(!isset($_POST['add_tutorial'])) { echo " <table border='0' cellpadding='0' cellspacing='0' width='500'> <form action='$self?action=addtutorial' method='post'> <tr> <td>Name:</td> <td><input type='text' name='name'></td> </tr> <tr> <td>Title:</td> <td><input type='text' name='title'></td> </tr> <tr> <td>Category:</td> <td> <select name='category'> "; //now what we are doing here is looping through //the categorys table and getting all the //categorys and putting them into a select //so the user can select which category //the tutorial is on $query = mysql_query("SELECT * FROM tutorials_categorys ORDER BY id ASC") or die(mysql_error()); while($row = mysql_fetch_array($query)) { echo "<option value='$row[id]'>$row[category]"; } echo " </select> </td> </tr> <tr> <td>Tutorial:</td> <td><textarea name='tutorial' cols='40' rows='10'></textarea></td> </tr> </tr> <tr> <td>Short Description:</td> <td><textarea name='short_description' cols='40' rows='2'></textarea></td> </tr> <tr> <td>Email:</td> <td><input type='text' name='email' maxlength='50'></td> </tr> <tr> <td>Show Email?</td> <td><input type='checkbox' name='show_email' value='1' checked></td> </tr> <tr> <td colspan='2'><center><input type='submit' name='add_tutorial' value='Submit New Tutorial'></center></td> </tr> </form> </table> "; } //else, error check, enter it elseif(isset($_POST['add_tutorial'])) { $name = mysql_real_escape_string(strip_tags($_POST['name'])); $title = mysql_real_escape_string(strip_tags($_POST['title'])); $category = mysql_real_escape_string(strip_tags($_POST['category'])); $tutorial = mysql_real_escape_string(strip_tags($_POST['tutorial'])); $short_description = mysql_real_escape_string(strip_tags($_POST['short_description'])); $email = mysql_real_escape_string(strip_tags($_POST['email'])); $show_email = mysql_real_escape_string($_POST['show_email']); $date = date("m/d/Y"); $time = time(); //we begin error checking.... $error_msg = array(); if(empty($name)) { $error_msg[] = "Please insert a name!<br />"; } if(empty($title)) { $error_msg[] = "Please insert a title!<br />"; } if(empty($category)) { $error_msg[] = "Please insert a category!<br />"; } if(empty($tutorial)) { $error_msg[] = "Please insert the tutorial text!<br />"; } if(empty($short_description)) { $error_msg[] = "Please insert a short description!<br />"; } if(empty($email)) { $error_msg[] = "Please insert an email!<br />"; } //print the errors, if any if(count($error_msg)>0) { echo "<strong>ERROR:</strong><br>n"; foreach($error_msg as $err) echo "$err"; } //everythings ok, insert it to the DB else { $sql = "INSERT INTO tutorials (submitter, text, short_description, title, cat_id, date_submitted, time_submitted, show_email, email, is_validated) VALUES ('$name', '$tutorial', '$short_description', '$title', '$category', '$date', '$time', '$show_email', '$email', '0')"; mysql_query($sql) or die(mysql_error()); echo "Tutorial added for review!"; } } break; //------------------------------------------ //this case gets the specified [ID] in the url //(tutorials.php?action=viewcategory&id=[ID] //and gets all the tutorials listed under that //category ID (cat_id) //------------------------------------------ case "viewcategory": //if there is an ID given... if($_GET['id']) { //get the id, put it into a variable, cast to an INT //(for security purposes) $id = (int)$_GET['id']; $query = mysql_query("SELECT * FROM tutorials WHERE cat_id = '$id' AND is_validated = '1'") or die(mysql_error()); //if no results, show that there are no tutorials //for that category if(mysql_num_rows($query) == 0) { echo "No tutorials for this category yet!"; } //else, there is..show em else { echo "<h1>Tutorials</h1>"; //loop through the tutorials //show all tutorials echo "<table border='0' cellpadding='0' cellspacing='0' width='500'>"; while($row = mysql_fetch_array($query)) { echo " <tr> <td>Title:</td> <td><b>$row[title]</b></td> </tr> <tr> <td>Date Submitted:</td> <td><b>$row[date_submitted]</b></td> </tr> <tr> <td>Views:</td> <td>$row[views]</td> </tr> <tr> <td>Short Description:</td> <td>$row[short_description]</td> </tr> <tr> <td>Submitter:</td> <td>$row[submitter]</td> </tr> <tr> <td colspan='2'><center><b><a href='$self?action=viewtutorial&id=$row[id]'>View</a></b></center></td> </tr> <tr> <td colspan='2'><hr /></td> </tr> "; } echo "</table>"; } } else { echo "Please give me a category ID!"; } break; //------------------------------------------ //this case gets the given [ID] //action=viewtutorial&id=[ID] //and gets that tutorial ID from the database //and displays it! //------------------------------------------ case "viewtutorial": //if there is an ID given.. if($_GET['id']) { //set $id to the URL id, cast to an INT //for security purposes $id = (int)$_GET['id']; //query the database $query = mysql_query("SELECT * FROM tutorials WHERE id = '$id' LIMIT 1") or die (mysql_error()); //if no rows returned... if(mysql_num_rows($query) == 0) { echo "That ID is not in the database!"; } //else, show it! else { //update the views for this tutorial! $update_views = mysql_query("UPDATE tutorials SET views = views + 1 WHERE id = '$id'") or die(mysql_error()); //loop through the database while($row = mysql_fetch_array($query)) { echo " <table border='0' cellpadding='0' cellspacing='0' width='500' style='border: 1px solid black; padding: 3px;'> <tr> <td colspan='2'>Tutorial: <b>$row[title]</b></td> </tr> <tr> <td colspan='2' style='border: 1px solid black;'><center><b>Tutorial</b></center><br />$row[text]</td> </tr> <tr> "; //---------------------------- //this part of the code //checks to see if the submitter //wants an email left for support //---------------------------- if($row['show_email'] == 1) { echo " <td colspan='2'>This tutorial was submitted by <b>$row[submitter]</b> with an email left for support questions. Contact this person <a href='mailto:$row[email]'>here</a></td> "; } echo " </tr> <tr> <td><hr /></td> </tr> "; } //-------------------------------- //this is where we loop through the //comments table to show all the //comments for this tutorial //-------------------------------- $comments = mysql_query("SELECT * FROM tutorials_comments WHERE tut_id = '$id' ORDER BY id DESC") or die (mysql_error()); //if there are no comments.. if(mysql_num_rows($comments) == 0) { echo " <tr> <td colspan='2'>No comments for this tutorial yet!</td> </tr> "; } //else, show them! else { //loop through them while($row = mysql_fetch_array($comments)) { echo " <tr> <td colspan='2'>Comment by: <b>$row[submitter]</b></td> </tr> <tr> <td colspan='2' style='border: 1px solid black; padding: 2px;' vAlign='top'>$row[text]</td> </tr> "; } } //show the form to enter comments echo " <tr> <td colspan='2'><hr /></td> </tr> <form action='$self' method='post'> <tr> <td>Name:</td> <td><input type='text' name='name' maxlength='25'></td> </tr> <tr> <td>Comment:</td> <td><textarea name='message' cols='40' rows='10'></textarea></td> </tr> <tr> <td colspan='2'><center><input type='submit' name='add_comment' value='Add Comment'></center></td> </tr> </form> "; //----------------------------- //if the comment submit form //HAS been submitted, enter info //to the database. //----------------------------- if(isset($_POST['add_comment'])) { //strip all HTML tags //and get rid of any quotes to prevent //SQL injection $message = mysql_real_escape_string(strip_tags($_POST['message'])); $name = mysql_real_escape_string(strip_tags($_POST['name'])); $time = time(); //use an array to store all error messages $error_msg = array(); if(empty($message)) { $error_msg[] = "Please enter a message!<br />"; } if(empty($name)) { $error_msg[] = "Please enter a name!<br />"; } //print the errors if(count($error_msg)>0) { echo "<strong>ERROR:</strong><br>n"; foreach($error_msg as $err) echo "$err"; } //else, everything is ok, enter it in the DB else { $query = mysql_query("INSERT INTO tutorials_comments VALUES (NULL,'$id','$name', '$message', '$time')") or die(mysql_error()); } } echo "</table>"; } } //if not.. else { echo "No ID specified!"; } break; //------------------------------------------ //default case, this is shown default //in this instance, we are going to make the default case show //all the categories that you can view tutorials on //------------------------------------------ default: $query = mysql_query("SELECT * FROM tutorials_categorys") or die(mysql_error()); //if the number of rows returned is 0, then say, no categories if(mysql_num_rows($query) == 0) { echo "No tutorial categories currently!"; } //if anything else, then there has to be categories. show em. else { echo "<h1>Tutorial Categories:</h1> "; //while loop to loop through the database and display results! while($row = mysql_fetch_array($query)) { echo " <table border='0' cellpadding = '0' cellspacing='0' width='500'> <tr> <td>Category Name:</td> <td>$row[category]</td> </tr> <tr> <td>Description:</td> <td>$row[description]</td> </tr> <tr> <td><a href='$self?action=viewcategory&id=$row[id]'>Visit this category</a></td> </tr> <tr> <td><hr /></td> </tr> </table> "; } } break; } //end navigation //------------------------------------------ ?> Phew, theres explanations in the code, so i'm going to save your time by just letting you readthe comments in the code. Second file. This is our admin panel, where we can review submitted tutorials, and validate/delete them! tutorials_admin.php PHP Code: <?php //------------------------------------------ //database connection mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("database") or die(mysql_error()); //end database connection //------------------------------------------ //------------[IMPORTANT]------------------- // I would suggest adding this file to part // of a user system so it doesn't get viewed // by just anyone //------------[IMPORTANT]------------------- //------------------------------------------ //echo out a navigation panel echo " <center><a href="tutorials.php">View Categorys</a> | <a href="tutorials.php?action=addtutorial">Add Tutorial</a> | <a href="tutorials_admin.php">Admin</a> | <a href="tutorials_admin.php?action=addcategory">Add Category</a></center> "; //------------------------------------------ //------------------------------------------ //begin main navigation (tutorials.php?action=) switch($_GET['action']) { //-------------------------- // case to add a tutorial category //-------------------------- case "addcategory": //if the form to add a new category //isn't submitted, show one if(!isset($_POST['new_category'])) { echo " <form action='tutorials_admin.php?action=addcategory' method='post'> <table border='0' cellpadding='0' cellspacing='0' width='500'> <tr> <td>Category name:</td> <td><input type='text' name='category' maxlength='25'></td> </tr> <tr> <td>Description:</td> <td><textarea name='description' cols='40' rows='10'></textarea></td> </tr> <tr> <td colspan='2'><center><input type='submit' name='new_category' value='New Category!'></td> </tr> </table> </form> "; } //else, error check and then insert data to database! elseif(isset($_POST['new_category'])) { $category = mysql_real_escape_string(strip_tags($_POST['category'])); $description = mysql_real_escape_string(strip_tags($_POST['description'])); //begin error reporting $error_msg = array(); if(empty($category)) { $error_msg[] = "No Category name entered!<br />"; } if(empty($description)) { $error_msg[] = "No description entered!<br />"; } //print errors, if any if(count($error_msg)>0) { echo "<strong>ERROR:</strong><br>n"; foreach($error_msg as $err) echo "$err"; } //else, no errors, insert to the DB! else { $query = mysql_query("INSERT INTO tutorials_categorys (category, description) VALUES ('$category', '$description')") or die(mysql_error()); echo "Tutorial Category Added!"; } } break; //-------------------------- //this case takes the submitted //form data of the admin form. //you can either validate, or delete //-------------------------- case "handle": //if nothing is submitted in the //row[] array, then error! if(empty($_POST['row'])) { echo "Nothing to delete/validate!"; } if(isset($_POST['delete_tutorials'])) { $delete_array = $_POST['row']; //loop through each individual //item in the array foreach($delete_array as $val) { //delete them! $query = "DELETE FROM tutorials WHERE id = '$val'"; $result = mysql_query($query) or die(mysql_error()); } echo "Tutorial(s) deleted"; } elseif(isset($_POST['validate_tutorials'])) { $validate_array = $_POST['row']; //loop through each individual //item in the array foreach($validate_array as $val) { //update the status to 1 which means validated! $query = "UPDATE tutorials SET is_validated = '1' WHERE id = '$val'"; $result = mysql_query($query) or die(mysql_error()); } echo "Tutorial(s) validated!"; } break; //-------------------------- //default case, we show //all tutorials with actions //-------------------------- default: $query = mysql_query("SELECT * FROM tutorials WHERE is_validated = '0' ORDER BY time_submitted DESC") or die(mysql_error()); echo "<h1>Unreviewed Tutorials</h1>"; if(mysql_num_rows($query) == 0) { echo "No tutorials unreviewed!"; } //there are rows, show the tutorials to //verify them else { //echo the submit buttons echo " <form action='tutorials_admin.php?action=handle' method='post'> <table border='0' cellpadding='0' cellspacing='0' width='500'> <tr> <td><center>With Selected</center></td> </tr> <tr> <td colspan='2'><center><input type='submit' name='validate_tutorials' value='Validate'><input type='submit' name='delete_tutorials' value='Delete'></center></td> </tr> <tr> <td colspan='2'><hr /></td> </tr> "; //loop throught it to show them all while($row = mysql_fetch_array($query)) { echo " <tr> <td>Title:</td> <td>$row[title]</td> </tr> <tr> <td>Submitter:</td> <td>$row[submitter]</td> </tr> <tr> <td>Short Description:</td> <td>$row[short_description]</td> </tr> <tr> <td>Tutorial Text:</td> <td>$row[text]</td> </tr> <tr>
  3. Those are all some definate good links to go and get free templates, , and by far I would say clantemplates has some of the best free available ones, also if you havent see this go to socomcentral.net they also offer some nice free templates.
  4. Yeah there is some planning involved, in your head, but its nothing like your sitting there with a sketch pad before you begin. Naturally you get visuals of what youd like to make in your mind, and from there ofcourse you want to try and create what your mind sees. and alot of the design also has to do with once you begin the process. see how things take you...
  5. Here is a quick definition of Bumber stickers: Mobile Spam. That is what they look like and appear. some stuff is like why would i read that other stuff is funny, and some stuff is just plain idiotic.
  6. thanks for that info . I will look into shoutcast, maybe mycaster was bought out by them.
  7. check this put guys i found this information on a different website. the only thing i dont know whow to do is creat the mysql tables can some one do that for me or tell me how to do it
  8. i hope im not going out of topic on this but do you remember a game called killer instinc that game was the best killer fighting game ever. it was on the NES system.
  9. what type of directoryis this site and have you tried using google adsense. and you could also try to offer banner advertising at low montly or yearly prices.
  10. At what point in a long relation ship do you say Hey I need a break or Ineed to spend time on my own?Just imagine a new couple, being toghether almost everyday if not every other day. As the relation ship grows time passes. The relation ship evolves into something more. eventually to marriage.But this entire time, you are deeply in love and you continue to spend almost every minute together. and you start to realize that you need some time away as well. but at this point suggesting something like this would cause the other person to think well whats wrong are you no longer interested in me.ofcourse you still are and the love has not changed, so this bring me to the question when is it good time to bring this up.Im sure the best time would be when modlding hte relationship. But who really knows how a relationship will turn out to be like in the future. so most of us spent alot of time with that peron, and sometimes it evolvesd to what i mentioned above. and then you just cant get away..
  11. well that sounds pretty good. its definately interesting to hear about it, is all the hardware built into it somewhere or is it seperate
  12. well if she like sthem both shes probably a player. and who knows who knows who else shes diggin.
  13. A few years back, and I want to say about 6 or 7 years, there was a site called mycast or mycaster. What this site was about was running your own online radio station. The interface was pretty easy and simple to use. It would also load all your mp3 wav and audio files. All you had to do was create play lists and play them online. You could view how many people were listening to your station, and also see how other stations where doing.It also had options for you to speak as it had a mic option , so you needed a micro phone to speak .I thought that it was a good thing , but i have yet to be able to locate it again. I have not seenit online and I was wondering if any one else had ever heard of it used it or know of simialr sites
  14. I am very interested in learning how to create or start my own tutorial submitt site. What do I need to learn ? What do I need to have.Is there a script that can be made up or a software?What I would like to do is start my own tutorial submit site. something similar to good-tutorials and or pixel2life except those sites are really big and cover many tutoriasl for many different programs. Id like to just cover tutorials for maybe a total of 3 to 4 different programs. Im sure I need hosting a domain a site and some good forums to get something good going. But the main thing i need is the script on how to create this Tutorial Submit siteSo I ask does anyone know what or how I go about creating this, or does anyone know of any site links that you can direct me too. Itried google and I could not find anything. the only thing it would pull was actuall sites.
  15. I have wanted to buy the game but I never got around to it, regardless of how old it is and how many poeple are or are not playing i will be buying it someday. That game just looks like its one of the best car driving games ever. I had a chance to play a quick demo but that was alll
  16. i think its still yet to come in the future
  17. I do have one that im getting ready to use. some one is selling me a gaming mother board, I m not sure if thats true but this certain person did get it for free from a gaming convention a while back, and i think it was a ATi or something similar as far as a brand, I may be wrong tho.
  18. Im in the US, and id like to build one to atleast be able to run Quake and maybe another game.As far as bulding a pc I know how, it's just when it gets into performance of th epc and which graphics cards to get. I have a tough time
  19. Another suggestion is to get some of your friends girls, and what not , to start a rumor about him cheating on her.. and see how that goes..heck you can even get some girl to write a note to him and you slip it in her locker or his and see if he hides it from her. or put it in hers so she can really question him.
  20. well ther you have it vic, using dreamwever is a great way to learn how to code in css. as you can select a premade css template and follow it and edit it. Also I say if you have the programs and if you have the knowlegde just use everything you have.. the more resources the better.
  21. I voted no, since I have no clue what Blogger is. As a matter of fact this is the first time I had ever even heard of it. Can someone explain to me what it is.
  22. A few questions:How old are you guys? Age range.How big is the boyfriend?How much do you weigh?How much can you bench press?Hell these questions ont matter? Just walk up to her and make sure the boyfriend is nno where near around, and feed her a good set of lines.Me I would say something like. well.. first of all does she even know you?If she doesnt know you id go withthe following.Let her know who you are, also let her know that you are interested in her but you see that she is dating someone, but tell her that you are willing to risk getting beat up everday just for a chance to take her out on a date.if it works let me know.
  23. I would have to say Grand Theft Auto
  24. I agree with Plenoptic 100% on the fact that it will take hard work and lots of time and money to advertise your site and gain visitors. Because people will not visit your site unless they know it even exsist. How do you make it exsist? paid advertising, by far will be your best soruce with the best results.I also wanted to say. Make sure you have a good idea. It seems that most ideas or atleast the good ideas have been taken, but thats not true, there are so many ideas out there that people have yet to even think about, or have implimented. Just be unique, and creative. it can be done. So good luck
×
×
  • 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.