Jump to content
xisto Community

TavoxPeru

Members
  • Content Count

    865
  • Joined

  • Last visited

Posts posted by TavoxPeru


  1. thannks NIran, great help. But please let me know how to make the TOP image Click able. Like I have a map and on that map i want to put one of this PIN http://www.awesomebackgrounds.com/templates/map-pin1.GIF and i want this PIN to be Clickable. Please guide and give some idea how to get it done Dynamically through PHP ?

     

    Well for example if you have a table that store some attributes of any image like its filename, URL, Xposition, Yposition, width and height and by a html form someone selects an image you only need something like this code:

    <?php// the id of the selected image$id=$_POST["id"];  // database settings and connectioninclude("db.php");// data selection$query="select * from ImageTable where id=$id";$rs = mysql_query($query) or die("Erro No: ".mysql_errno() . "<br />Description: " . mysql_error());$row=mysql_fetch_array($rs);?><!-- Image display --><div style="top:10px; left:10px; z-index:1; position:absolute"> <!--Bottom layer --><img src="BottomImagesource.jpg" width="" height="" /> <!-- Image to be displayed bottom --></div><div style="top:<?php echo $row["Xposition"]; ?>; left:<?php echo $row["Yposition"]; ?>; z-index:2; position:absolute"> <!--Top layer --><a href="<?php echo $row["URL"]; ?>"> <!-- Url for the top Image --><img src="<?php echo $row["filename"]; ?>" width="<?php echo $row["width"]; ?>" height="<?php echo $row["height"]; ?>" /> <!-- Image to be displayed on top --></a></div>
    Also note that its not necesary to store the width and height of the image because you can obtain it directly with the get_imagesize() function.

     

    Best regards,


  2. What ftp software do u use? im dying to find out which is best.

    I use CuteFtp, it's very complete but sometimes -especially with big files- looses the connection, right now i'm testing a new one called FreshFtp 3.40, is very quick and also it is free :) take a look at: http://forums.xisto.com/no_longer_exists/

    It supports multithreading for simultaneous transfer, file and directory upload, resume, and more. This software is 100% free, no charge, no spyware.

    Best regards,

  3. I had access to my server yesterday around 7 or so, and while I was connected and creating ftp accounts it went back down. I'm just curious what's up. Last time I had an account here, once I populated the server with some files everything went over better, but how do I do that with the server being down?
    http://forums.xisto.com/no_longer_exists/

    Your site is up right now, i just access it and view all your folders and files :)

    Best regards,

  4. how do i count the number of records of a table group by a foreign key??? Here are my tables:a. table situation:CREATE TABLE `situation` ( `id_situation` tinyint(3) NOT NULL auto_increment, `situation` varchar(20) NOT NULL default '', PRIMARY KEY (`id_situation`)) TYPE=MyISAM ;b. table documents:CREATE TABLE `document` ( `id_document` int(8) unsigned NOT NULL auto_increment, `id_situation` tinyint(3) unsigned NOT NULL default '1', `regdate` date NOT NULL default '0000-00-00', `notes` text NOT NULL, PRIMARY KEY (`id_document`)) TYPE=MyISAM ;What i need is to show for each record of the table situation how many records exists in the table documents, i try this SELECT:select situation.id_situation, situation.situation, count(document.id_situation) as totdocs from situation, documents where situation.id_situation=document.id_situation group by situation.id_situation order by situation.situation;but it does not show the correct values.Best regards,


  5. Anybody needs Animated FavIcon with your site address scrolling on that along with your logo?

     

    Check this site!

     

    Thats the site without any customization Options!

     

    But if you need to customize the Animated Icon, please reply here

    (In the sense, Fonts & Color Customization)

     

    Im doing it for Free!

     

    Example is here: Posted Image

     

    checkOut the fav icon for:

     

    http://niran.in/

    and http://www.funlokam.com/

     

    You can see one Icon along with one Scrooling Text: NiranVv.Com in the icon!

     

    So, if you need that one, ask here!

    I'll give you the animated favIcon(Gif Format)

    along with Shortcut Icon(Ico Format)

     

    ITS TOTALLY FREE!!

    All You need to Give:

    The small Image to be displayed as Icon( Or some Small Text To be displayed)

    The Text to be displayed as Scrolling One!

    ( Edited:

    Note: Animated ICONS (GIF Files) presently works only with FIREFOX & Netscape!

    IE will show only static ICO Files )

     

    How To Insert The FavIcon To your page:

    Insert the code in between your <head> and </head> tags

    :)

     

    Niran

     

    I agree with ginginca its a nice idea and also very cool :) , but it only works in FF & NS????? do you know why??? Also, thanks for the share, i will visit it later.

     

    Best regards,


  6. I know this is a little off topic, but since it is sorta in this topic, what's the difference in addslashes() and mysql_real_escape_string()

    the addslashes() function simply escapes with a backslash the single quote ('), double quote ("), backslash (\) and NUL (the NULL byte) and runs automatically on all GET, POST, and COOKIE data when the PHP directive magic_quotes_gpc is on -by default is on- not only with queries.

    By the other hand, mysql_real_escape_strings escapes the following characters: \x00, \n, \r, \, ', " and \x1a, another difference is that this function takes into account the current character set of the connection if it is supported by the database. As i read a time ago this function must be use if binary data is to be inserted to the database.

    Best regards,

  7. I don't know anything about your problem, but I just visited your site and you haven't put anything up. Or maybe you have, but the old index.html is still up.
    You really don't have to worry about little bugs in service until you've got something up :D

    Thanks for visiting my site and sorry for not posting that my problem was corrected :)

    BTW, i forgot to change the old index.html :) basically because i use my site for testing my work, i wanna do this soon and yes, you are right i have some content, check this:
    Trivia Online
    Inti Voyage

    Best regards,

  8. Simply add AND to your qUery string like this:

    $result = mysql_query("SELECT * FROM table_products WHERE (cat='" . mysql_real_escape_string($specific_value) . "' AND sub_cat='fittings' ");
    Now, if you want a more general functionality, for example, when the values you want to qUery comes from a submited form you can do this:

    <?php$specific_value1=mysql_real_escape_string($_POST['cat']);$specific_value2=mysql_real_escape_string($_POST['sub_cat']);$result = mysql_query("SELECT * FROM table_products WHERE (cat='$specific_value1' AND sub_cat='$specific_value2')")  or die(mysql_error());while($row = mysql_fetch_assoc($result)) {	echo $row['desc'] . ' ' . $row[other] . '<br />';}?>

    You must use the mysql_real_escape_string function to avoid sql injection attacks, to escape the following characters: \x00, \n, \r, \, ', " and \x1a and to guarantee that the data is safe before you send your query.

    Best regards,

  9. I hope that the following code help you, is a registration and activation page, its very simple and self explanatory, if you dont understand something please send me a PM.

    <?php /*** Generate an activation code* @param int $length is the length of the activation code to generate* @return string*/function generateCode($length = 10){   $password="";   $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";   srand((double)microtime()*1000000);    for ($i=0; $i<$length; $i++)   {	  $password .= substr ($chars, rand() % strlen($chars), 1);    }    return $password; } // config file with database info (db, host, user, password) and connection functions.require("config.php");?><HTML><HEAD><TITLE>Registration http://forums.xisto.com/no_longer_exists/ HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><style type="text/css">body {	background-color:#131313; 	font-family:Verdana, Arial; 	font-weight:bold; 	font-size:9px; 	color:#FFFFFF;}.register_box { 	border: 1px solid #323232; 	background-color: #202020; 	font-family: Verdana, Arial; 	font-weight: bold; 	font-size: 9px; 	color: #FFFFFF; } </style></head><body><?php$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : "new";switch($action) { 	//-------------------------------------- 	//	   [New Registration] 	//-------------------------------------- 	case "new": 		if(!isset($_POST['register'])) { 			echo "			<form action='registration.php' method='POST'> 			Name: <br /> 			<input type='text' name='name' class='register_box'> 			<br /> 			Email: <br /> 			<input type='text' name='email' class='register_box'> 			<br />			Nickname: <br />			<input type='text' name='nickname' class='register_box'>			<br />			Password: <br /> 			<input type='password' name='password' class='register_box'>			<br /> 			<input type='submit' name='register' value='New Registration!' class='register_box'> 			<input type='hidden' name='action' value='new'>			</form>"; 		}		elseif(isset($_POST['register'])) {			$name = mysql_real_escape_string($_POST['name']); 			$email = mysql_real_escape_string($_POST['email']);			$nickname = mysql_real_escape_string ($_POST['nickname']);			$password = mysql_real_escape_string($_POST['password']); 			$activation_code = generateCode(25); 			$nameq = "SELECT name FROM registration WHERE name = '$name'";			$emailq = "SELECT email FROM registration WHERE email = '$email'"; 			$nickq = "SELECT nickname FROM registration WHERE nickname = '$nickname'"; 			//put errors into an array I need to change these if I change the db			$errors = array(); 			if(empty($name)) { 				$errors[] = "The name field was blank! <br />"; 			}			$reg=mysql_query($nameq) or die(mysql_error());			if(mysql_num_rows($reg) > 0) { 				$errors[] = "The name given is already in use! Please try another one! <br />";			}			if(empty($email)) { 				$errors[] = "The email field was blank! <br />"; 			}			$reg=mysql_query($emailq) or die(mysql_error());			if(mysql_num_rows($reg) > 0) { 				$errors[] = "The email given is already in use! Please try another one! <br />";			}			if(empty($nickname)) { 				$errors[] = "The nickname field was blank! <br />"; 			}			$reg=mysql_query($nickq) or die(mysql_error());			if(mysql_num_rows($reg)>0) {				$error[] = "That nickname is already taken.  Please try another one.<br />";			}			if(empty($password)) { 				$errors[] = "The password field was blank! <br />"; 			}			if(count($errors) > 0) {				foreach($errors as $err) { 					echo $err; 				}			}			else { 				$sqlq = "INSERT INTO registration (name, email, nickname, password, is_activated, activation_code)";				$sqlq .= " VALUES ('$name', '$email', '$nickname', '".md5($password)."', '0', '$activation_code')";				mysql_query($sqlq) or die(mysql_error());				echo "Thanks for registering! You will recieve an email shortly containing your validation code, and a link to activate your account!";				mail($email, "New Registration, gigasoft.astahost.com;, "Thanks for registering on TRIVIA at GIGASOFT.\n\nHere are your login details:\n\nNickname: ".$nickname."\n\nPassword: ".$password."\n\nIn order to login and gain full access, you must validate your account.\n\nClick here to validate:\n\nhttp://forums.xisto.com/no_longer_exists/trivia/registration.php?action=activate&nickname;;			}		} 		break;	case "activate": 		//-------------------------------------- 		//	   [Activate Account] 		//-------------------------------------- 		if(isset($_GET['nickname']) && isset($_GET['code'])) { 			$nickname = mysql_real_escape_string($_GET['nickname']); 			if(mysql_num_rows(mysql_query("SELECT email FROM registration WHERE nickname = '$nickname'")) == 0) { 				echo "That username is not in the database!"; 			} 			else { 				$activate_query = "SELECT is_activated FROM registration WHERE nickname = '$nickname'"; 				$is_already_activated = mysql_fetch_object(mysql_query($activate_query)) or die(mysql_error()); 				if($is_already_activated->is_activated == '1') { 					echo "This user is already activated!"; 				} 				else { 					$code = mysql_real_escape_string($_GET['code']); 					$code_query = "SELECT activation_code FROM registration WHERE nickname = '$nickname' LIMIT 1"; 					$check_code = mysql_fetch_object(mysql_query($code_query)) or die(mysql_error()); 					if($code == $check_code->activation_code) { 						$update = "UPDATE registration SET is_activated='1', regdate=NOW(), last_login=NOW() WHERE nickname = '$nickname'"; 						mysql_query($update) or die(mysql_error()); 						echo "User $nickname has been activated! Thanks!"; 						echo "<br />Please <a href=\"login.php\">Click here to Login</a> and enter the site."; 					} 					else { 						echo "The activation code was wrong! Please try again!"; 					}				}			} 		} 		else { 			echo "No ID or user given to activate!"; 		}		break;	}?> </body></html>

    Best regards,

  10. WeaponX: I can't borrow a video card :) because i'm not a hardware techy and also this pc isn't mine too, it is of a friend, but thanks for your suggestions.

     

    Xisle: While a pc turns on 1 beep means that everything is correct and pass all of the POST's tests.

     

    Best regards, and again thanks to every body.


  11. And what is the syntax for putting a background image property in a css sheet ?

     

    The syntax to putting a background image property in a css sheet is:

    background-image: url('full_or_relative_url_of_the_image');
    Take in mind that this is the most simple syntax to put an image as a background, the full syntax covers:

    background-attachment

    background-color

    background-image

    background-position

    background-repeat

    BTW, the 'background' property is a shorthand property for setting the individual background properties at the same time ('background-color', 'background-image', 'background-repeat', 'background-attachment' and 'background-position').

     

    Take a look to the official CCS2 specification at: Offical W3C CCS2 Specification

     

    Best regards,


  12. Yeah, I'm with Grafitti on this one. Does the computer power on at all though? If you hear the fan spinning at least, then there's power coming from the power supply. The motherboard might need to be replaced.
    Can you hear the hard drive spinning also? Open up the side case to be sure. If it is spinning, I recommend trying another video card on this computer and see if that could be the problem instead of the motherboard.

    Yes, the power is ok, and i hear the fan spinning and also the hard drive, so the last option is to verify the video card but i'm almost sure that the problem is with the motherboard as you and Grafitti says.

    Thanks a lot,

  13. Do you by any chance know the BIOS manufacturer name? Or maybe the exact model of your motherboard? It might help us narrow down on what BIOS manufacturer you have there.

     

    Otherwise, take a look at http://www.pchell.com/hardware/beepcodes.shtml and see if you can figure out which one is the cause of the problem.

     

    It seems likely to be a power supply or system board issue according to the site (look at the first table there in the site).

     

    Thanks for the site link very useful, now, I'm not 100% sure but i think that the bios manufacter is AMI and the exact model of the motherboard is K7S41GX. I just visit the ASRock website and found some info about this, according to this info the problem is with the Base 64K memory, tell me something this Base memory refers to the RAM memory or refers to other memory???

     

    Best regards,


  14. I have a problem with a pc that dont boot it only produces a series of 3 short beeps, does anybody knows what means these beeps???? i'm sure that this sounds means something but i dont find any good advise or technical article about.

     

    If helps, the only specs i know of this PC are:

    ASRock Motherboard

    AMD Processor

    40GB Hard Disk

    256 MB RAM DDR

    Best regards,

  15. Well as everybody know in these forums people posts a lot of code snippets that could be organized in a simple page or whatever, my question is if someone is interested to do it or if exists something like that here at Xisto.I think it would be very helpful for everybody as well to keep things more organized.Best regards,


  16. Very simple layouts, if you want to do quick and dirty things.I would like to know if it's easy to slightly change them, for instance adding a picture in the header. Because, unfortunately, I'm not like these guys "who can type CSS pretty fast along with HTML".

    As i say, its very simple and yes, you can change the layouts very easy, if you want to add a image or picture in the header simply add an img tag in the html div header tag like this:

    <div id="header"><img src="logo.jpg"></div>
    Best regards,

  17. Took me a couple of minutes and a little search over here to understand your problem. Javascript is a case conscious language, and so you have to write "readOnly" instead of "readonly". A very simple find and replace should solve your problem! :)

    Thanks a lot, i just search and replace and run it, and everything works fine.

    best regards,

  18. I have a problem setting the readonly property of a textbox which depends on a yes and no radio buttons selection, I'm sure that my code is correct but i dont know why nothing happens.
    This is code:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE> New Document </TITLE><script LANGUAGE="JavaScript"><!-- Beginfunction changeRadio(sVal) {	if (sVal=='n')	{		a.textval.readonly=true;		a.texval.value="";	}	else {		a.textval.readonly=false;	}}//  End --></script></HEAD><BODY><form name="a" method="post"><table class="tabla" width="100%" border="0" cellpadding="2" cellspacing="10">   <tr>   <td width="32%">READONLY TEXTBOX</td>   <td>   <input type="radio" value="n" name="radiobtn" onclick="changeRadio('n')" CHECKED>No<BR /><input type="radio" value="s" name="radiobtn" onclick="changeRadio('s')">Yes</td>   </tr>   <tr>   <td class='textoedicion' width="32%">TEXTBOX</td>   <td><input type="text" name="textval" value='' size="21" maxlength="20"></TD>	</tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td width="100%" align="center" valign="middle"><input type="submit" name="submit" value="Save"> <input type="button" name="cancel" value="Cancel" onClick="window.close()"></td></tr></table></form><script language="JavaScript" type="text/javascript"><!--if (document.a.radiobtn[0].checked) {	document.a.textval.readonly=true;}else {	document.a.textval.readonly=false;}//--></script></BODY></HTML>
    Best regards,
×
×
  • 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.