FirefoxRocks
Members-
Content Count
1,251 -
Joined
-
Last visited
Everything posted by FirefoxRocks
-
To Hide A Drive From Appearing In Windows Explorer
FirefoxRocks replied to iGuest's topic in Websites and Web Designing
For Windows XP Home Edition, you can use the partition tool in Administrative Tools to hide a partition (which is a drive).Or use Super FDISK and hide your partitions in a different method than Windows does.I guess I don't really have the need to hide partitions. You may need to when installing new operating systems and stuff. Or just to hide your files from others -
Is this really a Microsoft product? I really doubt it because it would have Copyright Microsoft on it. Also there is absolutely no correlation between Microsoft and this website (no Microsoft logo, the word Microsoft isn't even on there). That website is badly designed and there is not much to it. If it was really a Microsoft product, it would probably be https://onedrive.live.com/
-
Quick Tips On Html And Css
FirefoxRocks replied to mik1405241541's topic in Websites and Web Designing
First of all, XHTML 1.1 MUST be served with application/xhtml+xml MIME type, which can be tricky. Internet Explorer doesn't support this MIME type (it requests a File Download ) so you will miss many visitors. If you serve XHTML 1.1 over text/html (usually), the document is TRULY XHTML 1.1. I recommend using XHTML 1.0 Strict (almost same) instead, otherwise deal with some server-side content negotiation scripts! I agree, CSS is the way to go. However I still use tables for 1 of my sites because I want to retain utmost compatibility with all browsers and IE positions things funny (tried many, many tips). In my XHTML tutorial, I have informed that Tables for layout is NOT the way to go. If you use <div> or <span>, make sure you have a good use for them and that you probably use heavy CSS coding on them. <div> with an id attribute is not very useful because it is a one-time use thing, use it only if you are covering a large area. I love using <fieldset> as well as <legend>, not to forget <label>. They are part of the Section 508/Web Accessibility Initiative guidelines so that my audience is larger for disabled people and/or screen readers. I don't know how you can make the forms look "spectacular" though. Those CSS tips are great! I have never even seen such an advanced selector The part explaining browsers was really helpful. Thanks for the great info! -
I am working on a web "application" thing that allows you to click a button to add text to a textarea.Similar to this forum when you click the BOLD button and it puts in {b}{/b} with the square brackets. I want a similar function like that. Also, I want it to add wherever the cursor is, not at the end. And after adding the thing, the cursor should be in between the tag or whatever that was added.All the extra stuff are extra priorities. For now I would like to get something that inserts text on click.The thing I came up with is: <html><head><script type="text/javascript">function write() {document.form.textarea.value = "This is the stuff that goes into the textarea";}</script></head><body><textarea id="txt1">Hello world....This is a text area</textarea></body></html> I know that isn't right, so I need more help on this.
-
I find that reading from databases is quite hard actually from ASP.It uses a bunch of complicated code that I can't understand at all.The most final question is:Which scripting language is more popular? ASP or PHP?Do major web portals such as Google, Yahoo!, MSN (Windows Live) and Shaw use ASP or PHP?I'd go with whichever gets the best results.I'm voting for PHP!
-
In an IRC chatroom/channel, is saying that you may do a DDoS a chargeable offense? I know that the user was joking because he could do no such thing on the IRC server, but he got banned an received a scary message from an op/moderator telling him that they could trace his IP address down to his doorbell. It is really scaring him.Now I was wondering if this would fall under uttering threats or what because it was only 1 time occurrence and that he didn't actually do anything harmful. Also, the ban message he got from the op was much more worse than what he said in the chatroom.I was just wondering about this, but this would majorly scare me and users in that channel if it WAS a chargeable offense. I couldn't find anything on this and it seemed like a good topic to investigate. Wikipedia says that it is against the Internet Ethics defined in the RFC protocol but other than that no other info was available. I know that actually launching a DDoS attack would be a chargeable offense because of the damage but this...I don't know?
-
So if all of the 13 servers got knocked down then we wouldn't be able to access any domain names? Is that right?That is one step to breaking the Internet. Getting rid of the DNS servers and HTTP backbone.The servers must be really strong to withstand such a strong threshold, however it must be a huge powerful connection for this DDoS attack to make it worthwhile.
-
Now I have a message appearing if the user is not authorized, incorrect username/password, etc. Also, unauthorized users can now log in. For example, please log into XKingdom Member Center with the username Xisto and password 123. That user is supposed to be unauthorized, but it can still go through. Why is that? My revised code is: <?phpsession_start();$name = $_POST['username'];$password = $_POST['password'];$con = mysql_connect("localhost","myDbUser","myDbPassword"); if(!$con) { die('Sorry, the XKingdom Center database has encountered an error right now. Please try again later or contact the website administrator. The MySQL error is: ' . mysql_error()); }mysql_select_db("myDb", $con);$result = mysql_query("SELECT * FROM myTable WHERE name='$name' and password = '$password'");$rowid = mysql_query("SELECT id FROM myTable WHERE name='$name' and password = '$password'");$auth = mysql_query("SELECT auth FROM myTable");$rowcheck = mysql_num_rows($result);if($rowcheck==1) { $row=mysql_result($auth,$rowid); if($row==YES||yes||Yes) { $_SESSION['db_is_logged_in'] = true; setcookie("user", "$name", time()+86400); header('Location: moderate.php'); header('(anti-spam-content-type:) text/html;charset=iso-8859-1'); } elseif($row==NO||no||No) { $error="You are not authorized as an XKingdom Member yet. Please try again later.n If this problem persists for more than 24 hours, please contact the website administrator."; } }else{$error="You have entered an incorrect username/password combination. Please try again.n If you forgot your password, contact the website administrator."; header('(anti-spam-content-type:) text/html;charset=iso-8859-1');}header('(anti-spam-content-type:) text/html;charset=iso-8859-1');mysql_close();?> I don't care if the incorrect username/password message appears at first visit. It isn't a priority right now.As for lost password, I whipped up something that can be used. It does use the mail() function. And users NEED to provide an email address when registering.
-
It wouldn't be very difficult or time consuming to maintain a forum for approximately 50 to 75 members. You can assign moderators for jobs to be done in each forum so you don't have to do everything.Try and install phpBB2 (recommended easiest one) and administrate it. It is quite easy and the interface is simple and extensible (with MODs).Make sure that you can trust your users. For the first few weeks of the forum, keep an eye on what happens around it. You don't want anyone breaking the Terms and Conditions and possibly getting your hosting taken away. ;)Once you decide you want to move onto a better forum, IPB is the way to go. If you like to keep it at phpBB2, there's nothing wrong with that.
-
I have developed a piece of code that is going to work as my login script for my website. I need some help making improvements and creating additional features. Here is my code: <?phpsession_start();$name = $_POST['username'];$password = $_POST['password'];$con = mysql_connect("localhost","myDbUser","myDbPassword"); if(!$con) { die('Sorry, the XKingdom Center database has encountered an error right now. Please try again later or contact the website administrator. The MySQL error is: ' . mysql_error()); }mysql_select_db("myDb", $con);$result = mysql_query("SELECT * FROM myTable WHERE name='$name' and password = '$password'");$auth = mysql_query("SELECT auth FROM myTable");$rowcheck = mysql_num_rows($result);if($rowcheck==1) { while($auth_check = mysql_fetch_array($auth)) { if($auth_check==YES) { $_SESSION['db_is_logged_in'] = true; setcookie("user", "$name", time()+86400); header('Location: moderate.php'); header('(anti-spam-(anti-spam-content-type:)) text/html;charset=iso-8859-1'); } elseif($auth_check==NO) { $error="You are not authorized as an XKingdom Member yet. Please try again later. If this problem persists for more than 24 hours, please contact the website administrator."; } } }elseif($rowcheck>1){$error="You have entered an incorrect username/password combination. Please try again. If you forgot your password, contact the website administrator."; header('(anti-spam-(anti-spam-content-type:)) text/html;charset=iso-8859-1');}header('(anti-spam-(anti-spam-content-type:)) text/html;charset=iso-8859-1');mysql_close();?> It doesn't work. Also the $error variable isn't echoing properly in a <p> tag in the body. This code works: <?phpsession_start();$name = $_POST['username'];$password = $_POST['password'];$con = mysql_connect("localhost","myDbUser","myDbPassword"); if(!$con) { die('Sorry, the XKingdom Center database has encountered an error right now. Please try again later or contact the website administrator. The MySQL error is: ' . mysql_error()); }mysql_select_db("myDb", $con);$result = mysql_query("SELECT * FROM myTable WHERE name='$name' and password = '$password'");$rowcheck = mysql_num_rows($result);if($rowcheck==1) { $_SESSION['db_is_logged_in'] = true; setcookie("user", "$name", time()+86400); header('Location: moderate.php'); header('(anti-spam-(anti-spam-content-type:)) text/html;charset=iso-8859-1'); }elseif($rowcheck>1){$error="You have entered an incorrect username/password combination. Please try again. If you forgot your password, contact the website administrator."; header('(anti-spam-(anti-spam-content-type:)) text/html;charset=iso-8859-1');}header('(anti-spam-(anti-spam-content-type:)) text/html;charset=iso-8859-1');mysql_close();?> I have removed the authorization stuff, and the $error variable isn't echoing properly here either. 1st priority: Get the authorized users right to log in, unauthorized users to wait. 2nd priority: Display a message if(...). 3rd priorities: Lost Password IP address logging at logon Ability to enter more information (optional) Could someone help me achieve my goal please?Thank you,
-
Why don't you just store the files here on Xisto and then have the domain http://frusciante.net/ pointed to your hosting account? That would be a lot easier. You wouldn't need frames then. You could also try this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; <html xmlns="http://www.w3.org/1999/xhtml/ <head><title>Home - [url=http://frusciante.net</title></head>]http://frusciante.net</title></head>[/url] <body> <iframe src="locborg.de/fru/; frameborder="0" width="100%" height="100%" scrolling="auto"><p><a href="locborg.de/fru/ to [url=http://frusciante.net/</a>]http://frusciante.net/</a>[/url]. Your browser does not support frames.</p></iframe> </body> </html> It should help. Because the <object> tag isn't compatible with IE, I'll use iFrame for now. --EDIT 5:37PM-- Never mind, it didn't work. I just tested it. The site has this on it: <script language="JavaScript" type="text/javascript">if( top.parent.frames.length > 0)top.parent.location.href = self.location.href;</script> This means that if the page isn't EXACTLY at the very top corner of the document, it will reload itself into a new document.
-
Where do I insert this? <input type="hidden" name="PHPSESSID" value="<?php echo session_id();?>" /> My best guess is in the form thing but I'm not sure.
-
Login Script PHP Help #3 - Need help creating one
FirefoxRocks replied to FirefoxRocks's topic in Programming
Okay, I have whipped up this code and IT WORKS!!! ;) <?phpsession_start();$name = $_POST['username'];$password = $_POST['password'];$con = mysql_connect("localhost","portal_xkingdom","Yahoo!rocks"); if(!$con) { die('Sorry, the XKingdom Center database has encountered an error right now. Please try again later or contact the website administrator. The MySQL error is: ' . mysql_error()); }mysql_select_db("portal_xkingdom", $con);$result = mysql_query("SELECT * FROM users WHERE name='$name' and password = '$password'");$auth = mysql_query("SELECT auth FROM users");$rowcheck = mysql_num_rows($result);if($rowcheck==1) { /* while($auth_check = mysql_fetch_array($auth)) { if($auth_check==YES) { */ $_SESSION['db_is_logged_in'] = true; setcookie("user", "$name", time()+86400); header('Location: moderate.php'); header('(anti-spam-content-type:) text/html;charset=iso-8859-1'); /* } elseif($auth_check==NO) { $error="You are not authorized as an XKingdom Member yet. Please try again later. If this problem persists for more than 24 hours, please contact the website administrator."; } }*/ }elseif($rowcheck>1){$error="You have entered an incorrect username/password combination. Please try again. If you forgot your password, contact the website administrator."; header('(anti-spam-content-type:) text/html;charset=iso-8859-1');}header('(anti-spam-content-type:) text/html;charset=iso-8859-1');mysql_close();?> I have built the code from scratch using the W3Schools help and my previous knowledge from browsing a variety of downloaded PHP scripts which DIDN'T work. I have commented out the authorization part because it isn't working. This means that I have re-met the green requirements Now i just need to meet the other requirements, which number isn't that important. I need some more help with that. -
Could you please explain that in more simpler terms? I finally whipped up a login script and I am encountering that problem too. I have tried adding <div> to many places, but the <input type="hidden"> thing comes up RIGHT AFTER the <form> thing, therefore <div>s are kind of useless there.I need to have pages validate as XHTML 1.0 Strict. XHTML 1.1 requires the application/xhtml+xml MIME type which is difficult to configure for Internet Explorer .
-
Help To Transfer Files Within Hosting Space Using Php
FirefoxRocks replied to delivi's topic in Programming
You do not need PHP to transfer files. If you want to though, you can read something from the W3Schools about the PHP filesystem thing.Using FireFTP or another FTP program of your choice, you can drag and drop folders (even cut and paste for some) wherever you want them in your hosting account's file system. If you don't have FTP software, you can do so in cPanel (it takes longer). Practise with 1 file first and see if it is what you want done. -
Login Script PHP Help #3 - Need help creating one
FirefoxRocks replied to FirefoxRocks's topic in Programming
1. It can be based off the one given in the previous topic (Authentication Script), but I am going to whip something up anyways (maybe similar, maybe not ) 2. No, just something that works. 3. I have this information provided by cPanel in Xisto. So I guess compatibility for PHP 5+ is okay. I already have the registration thing setup okay. I used to have a version that works, but somehow it has malfunctioned (OMG BACKUP!!!) and now I have nothing else to modify upon. -
It turns out that the authentication script that I copied from http://forums.xisto.com/no_longer_exists/ doesn't work even when it is left unchanged. What a crappy piece of code. Now I am trying to build by own login script from scratch. I already have a little knowledge on how to do this (connecting, echoing, retrieving) but I need some more examples and/or tips. I know what I need and maybe this could help you out: Note: Green items are fixed. No duplicate username in MySQL Database Authorized users only. I have to authorize each user or else a message comes up that says that they have not been authorized yet. IP address logging. This means logging the IP address when registered and logging the IP address at last logon. After logon, it all redirects to one page (if certain group). If the username is in moderator status, it redirects to the Moderator Page. Otherwise, it redirects to the Member page. A lost password function. That's all I need right now. For everyone who helps, I will mention your Xisto/Xisto username into the the credits page of the site when it is completed! ;)
-
Okay, my first issue about the MySQL echo problem has been solved, thank you to those who helped. Now I am focusing on the login portion of my site, and I have this so far: <?php// we must never forget to start the sessionsession_start();$errorMessage = '';if (isset($_POST['username']) && isset($_POST['password']))[tab][/tab]{ $username = $_POST['username']; $password = $_POST['password'];//Connect to database$con = mysql_connect("localhost","myDatabaseUsername","myDatabasePassword");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("myTable2", $con); // check if the user id and password combination exist in database $sql = "SELECT name FROM users WHERE name = '$username' AND password = PASSWORD('$password')"; $result = mysql_query($sql) or die('Query failed. ' . mysql_error()); if (mysql_num_rows($result) == 1)[tab][/tab] {[tab][/tab] // the user id and password match, check for authorization[tab][/tab][tab][/tab][tab][/tab]$sql_a = "SELECT auth FROM users WHERE auth = '$auth'";[tab][/tab][tab][/tab][tab][/tab]$result = mysql_query($sql_a)[tab][/tab][tab][/tab][tab][/tab] or die('Query failed. ' . mysql_error());[tab][/tab][tab][/tab][tab][/tab]if ($result == YES)[tab][/tab] // set the session[tab][/tab] $_SESSION['db_is_logged_in'] = true;[tab][/tab] // after login we move to the main page[tab][/tab][tab][/tab][tab][/tab]header("(anti-spam-content-type:) $mime;charset=$charset");[tab][/tab] header('Location: moderate.php');[tab][/tab] exit; }[tab][/tab] else[tab][/tab] {[tab][/tab] $errorMessage = 'Sorry, wrong user id / password';[tab][/tab] header("(anti-spam-content-type:) $mime;charset=$charset");[tab][/tab] }[tab][/tab]}?> I cannot figure out what is wrong with this! I tried moving parts around, removing parts, didn't work.
-
Before I use the code into my page, could you please explain the \n part of the code that you put in after the table tags? The code looks really good And I hope it works. I will try it soon. The only thing I don't understand is the \n parts. ***about 1 hour later*** Great! It works! Now I need even more advanced coding. Read the stuff below: If the $row['type'] is offensive, I want the table cell background to be #f00. If the $row['type'] is defensive, I want the table cell background to be #48d1cc. I tried this: if($row = mysql_fetch_array($result)){if($row['type'] = off) { $cbkgd="background-color:#f00"; }elseif($row['type'] = def) { $cbkgd="background-color:#48d1cc"; }else { $cbkgd="background-color:#fff"; }} It didn't work, the whole row went to 1 colour and only 1 record/row was displayed. Could someone please help me do this?
-
I like the Xisto's new layout! It is quite clean and modern, or shall I say refreshing? ;)The smooth interface is well-designed and looks neat.One thing I really like, I can finally hide the shoutbox once and for all! It gets annoying clicking on that button everything you load a forum page, now I don't have to!I never use the shoutbox. If you are experiencing problems, press CTRL+SHIFT+DEL in Firefox and make sure Cache is checked. Click OK and restart the browser if necessary. It should work fine now.
-
I have successfully setup a MySQL Database with a few tables in it to store user input! ;) Woohoo! Now the problem is displaying the data. I want 4 boxes echoing across with 3 rows down so that makes 12 boxes (12 of the most recent records). I have no clue how to do this because I cannot use the W3Schools example of echoing into a table. Here is the code I used but it echoes the same information across the entire row of 4 boxes. <?php$con = mysql_connect("localhost","myDatabase name","myDatabase password");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("myTable", $con);$result = mysql_query("SELECT * FROM myField1 ORDER BY myField2 DESC");echo "<table summary='myTable summary'>";while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td style='width:25%'>XKingdom Member:" . $row['user'] . "<br />Name of victim:" . $row['victim'] . "<br />Attack turns:" . $row['turns'] . "<br />Side of attack:" . $row['side'] . "<br />Gold stolen:" . $row['gold'] . "<br />Units lost:" . $row['lost'] . "<br />Units killed:" . $row['killed'] . "<br />MXP Gained:" . $row['mxp'] . "<br />Victim's points:" . $row['points_b'] . "<br />Your points:" . $row['points_a'] . "<br />Type of battle:" . $row['type'] . "<br />Battle power:" . $row['power'] . "</td>"; echo "<td style='width:25%'>XKingdom Member:" . $row['user'] . "<br />Name of victim:" . $row['victim'] . "<br />Attack turns:" . $row['turns'] . "<br />Side of attack:" . $row['side'] . "<br />Gold stolen:" . $row['gold'] . "<br />Units lost:" . $row['lost'] . "<br />Units killed:" . $row['killed'] . "<br />MXP Gained:" . $row['mxp'] . "<br />Victim's points:" . $row['points_b'] . "<br />Your points:" . $row['points_a'] . "<br />Type of battle:" . $row['type'] . "<br />Battle power:" . $row['power'] . "</td>"; echo "<td style='width:25%'>XKingdom Member:" . $row['user'] . "<br />Name of victim:" . $row['victim'] . "<br />Attack turns:" . $row['turns'] . "<br />Side of attack:" . $row['side'] . "<br />Gold stolen:" . $row['gold'] . "<br />Units lost:" . $row['lost'] . "<br />Units killed:" . $row['killed'] . "<br />MXP Gained:" . $row['mxp'] . "<br />Victim's points:" . $row['points_b'] . "<br />Your points:" . $row['points_a'] . "<br />Type of battle:" . $row['type'] . "<br />Battle power:" . $row['power'] . "</td>"; echo "<td style='width:25%'>XKingdom Member:" . $row['user'] . "<br />Name of victim:" . $row['victim'] . "<br />Attack turns:" . $row['turns'] . "<br />Side of attack:" . $row['side'] . "<br />Gold stolen:" . $row['gold'] . "<br />Units lost:" . $row['lost'] . "<br />Units killed:" . $row['killed'] . "<br />MXP Gained:" . $row['mxp'] . "<br />Victim's points:" . $row['points_b'] . "<br />Your points:" . $row['points_a'] . "<br />Type of battle:" . $row['type'] . "<br />Battle power:" . $row['power'] . "</td>"; echo "</tr>"; }echo "</table>";mysql_close($con);?>*Field/database information was edited out to protect privacy. As you can see, it tells the database to echo one full row of the same info, then loop through the whole thing as many times as there are records. First of all, I only want a total of 12 records being echoed. Second of all, I want the 4x3 boxes layout. Could someone please give me some modifications to the code I am using right now? I tried using <div>s also, didn't work. I'm designing this site for a major section for a game site.
-
I recommend searching for Yahoo! Site Explorer for a sitesearch system or use the Windows Live In-site Search thing. I personally recommend the Windows Live one because it is more easier to edit stuff if you need to, and it doesn't go off site.
-
I don't think that would be a "warm" welcome. I doubt that anyone would like that actually. If you are using that anyways, try this instead: <script type="text/javascript"><!--alert("A popup warning with this text.")--></script> It generates a popup box that you can click OK in, may scare your visitors away.
-
Can you give a few more lines of code? Or perhaps direct us to your page? That would be helpful. Also, try this: <img src="nationalparks/images/email.gif" style="width:99px;height:100px;border:0px" alt="Email" /> That may help, I don't know if it is the image problem causing the scripting error. Try emptying your cache.
-
Also, I should add that VBScript only executes in Internet Explorer. So if you want something to execute in Internet Explorer only, I suggest you use VBScript.