Jump to content

Kristian_C

Members
  • Posts

    246
  • Joined

  • Last visited

Everything posted by Kristian_C

  1. Kristian_C

    refresh problem

    Huh.. try this one :<?header( 'refresh: 0; url=http://www.businessfind101.com/edit2.php' );?>that one must work
  2. PHP/script <script language=JavaScript>function sell_all (amount, total){ var del = confirm("Are you sure you wish to sell " + amount + " cars, totaling $ " + total); if (del == true){ var loc="garage.php?sell_all=true&sell_s=go"; window.location=loc; } } </script><?$mysql=mysql_query("SELECT * FROM users WHERE username='$username'");$fetch=mysql_fetch_object($mysql);if (strip_tags($_GET['sell_s'])){$vv=$_POST['vv'];$i=0; $d=0;foreach($_POST['vv'] as $val){$nice=mysql_fetch_object(mysql_query("SELECT * FROM garage WHERE id='$val'"));$i+=$nice->worth;$d++;}if (strip_tags($_GET['sell_all']) != "true" ){ echo "<script> sell_all('$d', '$i') </script>"; } if (strip_tags($_GET['sell_all']) == "true"){$n_money = $fetch->money + $nice->worth;mysql_query("UPDATE users SET money='$n_money' WHERE username='$username'");mysql_query("DELETE FROM garage WHERE id='$nice'"); echo "Cars Sold"; } HTML <form name="form1" method="post" action="?sell_s=go"> <table width="52%" border="1" align="center" cellpadding="2" cellspacing="0" class=thinline bordercolor=black> <tr bordercolor="#000000" background="includes/grad.jpg"> <td height="25" background="includes/grad.jpg" colspan="9"><center class="style2"> <strong>Garage </strong> </center></td> </tr> <tr bgcolor=#666666> <td height="201" colspan="6" class=tip><div align="center"></div> <div align="center"><img src="includes/garagepic.jpg" width="642" height="201"></div></td> </tr> <tr> <td height="24" colspan="6" background="includes/grad.jpg" class=tip><div align="center"></div> <div align="center"> <div align="center"></div> <div align="center"></div> <div align="center"></div> <div align="center"><span class="style1 style2"><strong>Your cars: </strong></span></div> </div> <div align="center"></div> <div align="center"></div> <div align="center"></div></td> </tr> <tr bgcolor=#666666> <td width="36%" height="24" class=tip><div align="center"><span class="style1">Type(id)</span></div></td> <td width="12%" class=tip><div align="center"><span class="style1">Damage</span></div></td> <td width="21%" class=tip><div align="center"><span class="style1">Origion</span></div></td> <td width="21%" class=tip><div align="center"><span class="style1">Location</span></div></td> <td width="10%" class=tip><div align="center"><span class="style1 style2">Sell</span></div></td> </tr> <? $gather = mysql_query("SELECT * FROM garage WHERE owner='$username'"); $count=mysql_num_rows($gather); if ($count=="0"){ echo "<tr><td colspan=6 bgcolor='666666' cellspace=2><center>No Cars In Garage</center></td></tr>"; } $e=0; while($object=mysql_fetch_object($gather)){if ($e == "0"){ $color="#666666"; $e=1; }else{ $color="#434343"; $e=0; } echo " <tr bgcolor=$color> <td><input type=checkbox name='vv[]' value='$object->id'><a href=?type=$object->id&prc=$for>$object->car</a> <font color='black'><b>$object->id</b></font></td> <td width=13%>$object->damage%</td> <td width=16%>$object->origion</td>"; if($object->status==1){ $ships=$object->shiptime-time(); if($ships<1){ mysql_query("UPDATE garage SET status='0' WHERE id='$object->id'"); } echo" <td width=19%>$ships seconds before $object->car will arive in $object->location</td> "; }else{ echo" <td width=19%>$object->location (<a onclick=ship($object->id); href=#>Ship!</a>)</td>"; } echo "<td><a href='?sell=$object->id&prc=$type->car'</a>Sell</td>"; } ?> </table> <table width="52%" border="1" align="center" cellpadding="2" cellspacing="0" class=thinline bordercolor=black> <tr> <td height="20" colspan="2" background="includes/grad.jpg"><center class="style2"> <strong> Options </strong> </center></td> </tr> <tr bgcolor="#666666"> <td width="49%" height="26"><div align="center" class="style2"><strong> <input name="sell_s" type="submit" id="sell_s" value="Sell selected"> </strong></div></td> <td width="51%"><div align="center" class="style2"><strong> <input name="delete_s" type="submit" id="delete_s" value="Delete selected"> </strong></div></td> <tr bgcolor="#666666"> <td height="26" colspan="2"><div align="center" class="style2"><strong>Function in progress. </strong></div></td> </table></form> Anyone knows what i can do? it comes up in the alert box functionally and stuff, but it says : Invalid argument supplied for foreach()so i really dont know whats worng :S
  3. Kristian_C

    refresh problem

    echo "<meta http-equiv=\"refresh\" content=\"1;URL=http://www.businessfind101.com/edit2.php\">";Hmm, try that one...
  4. Hehe, yeah i know its just to ask =) but working on a online game 24/7 and have a few bugs i need to sort out before i can take time to create a good template =)..
  5. Managed to use get as usual to get from contact list but still cant do it with bbcode onload.... <? if($_GET[test]); $code=($_GET[test]); ?><table width="18%" height="27" border="1" align="center" cellspacing="1"> <tr> <th height="23" scope="col"><a href="?test=Admin">Admin</a></th> </tr></table><p> </p><table width="32%" border="1" align="center" cellspacing="1"> <tr> <th height="125" colspan="2" scope="col"><form name="form1" method="post" action=""> <textarea name="textarea" cols="60" rows="5"><? echo"$code"; ?> </textarea> </form></th> </tr></table> Simple way hehe
  6. w3schools is the reason i started to learn html, without w3schools i just knew how to make a link etc all other sites ive been on explain it so hard like all ppl are pro's..so go w3schools
  7. Kristian_C

    refresh problem

    Hmm, try add it like this at the end :<? echo"<meta http-equiv='Refresh' content='1; URL=edit2.php'>";?>should work hehe...
  8. Kristian_C

    refresh problem

    if you just want to get back from edit3 after a submit u chould have this after your last query :echo"<meta http-equiv='Refresh' content='1; URL=edit2.php'>";=)
  9. Hey, i have a small problem i have a page made with variable links and a get function to get the page into a table, but i have a forum there to, and when i click on the link to get into the topic the page aint found since i have to variables... Link is like this : <th width="29%" align="left" valign="middle" scope="col" cellspacing='1'><div align="left"> <a href="?side=adminforumse<? echo"?tittel=$get->id";?> target=''"><?=$get->tittel?></a></div> </th>tried another way with the whole link in echo but still dont work :pHere's the get function : <table width="91%" border="0" cellspacing="1"> <tr> <th scope="col"><?php if($_GET[side]){ $side=($_GET[side]); include "$side.php"; }else{ include "adminforum.php"; } ?></th> </tr> </table> Anyone here that can help me?
  10. had to test something out here is the thing i came up with you make a page with: <table width="100%" border="0" cellspacing="1"> <tr> <td width="92%" scope="col"> <div align="center"> <?phpinclude "http://www.url.com";?> </div></td> </tr></table> Then name the page something... then u add the code and add a link to that page...if you want a complete frame free page you can use : <table width="100%" border="0" cellspacing="1"> <tr> <td width="8%" height="491" scope="col"><a href="?page=page">link</a> </td> <td width="92%" scope="col"> <div align="center"> <?phpif(strip_tags($_GET )){$page=strip_tags($_GET );include "$page.php";}?> </div></td> </tr></table> hope it works for you
  11. Here is what i have now : <script language="javascript" type="text/javascript">function AddEmoticon1(text) { var input = document.form.to; text = ' ' + text + ' '; if (input.createTextRange && input.caretPos) { var caretPos = input.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text; input.focus(); } else { input.value += text; input.focus(); }}</script><style type="text/css"><!--.style1 {color: cc000}--></style><form name="form" method="post" action=""> <tr> <td width="51%" height="41"> </td> <td> </td> </tr> <table width="69%" border="0" align="center" cellpadding="0" cellspacing="2" > <!--DWLayoutTable--> <tr> <td height="19" valign="top"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="black" class=thinline> <!--DWLayoutTable--> <tr> <td height="17" colspan="4" background="includes/grad.jpg"><div align="center"><strong>Send Message </strong></div></td> </tr> <tr bgcolor="#666666"> <td background="includes/grad.jpg" colspan="3"><div align="center"><strong>Send To </strong></div></td> <td background="includes/grad.jpg"><div align="center"><strong>Title</strong></div></td> </tr> <tr bgcolor="#666666"> <td colspan="3"><div align="center"></div> <div align="center"> <input type=text name=to class=submit style=width: font-weight: bold; 60%; value='<?php echo $fromper; ?>'> </div></td> <td width="50%"><div align="center"></div> <div align="center"> <input name=title type=text class=style1 id="title" style=width: value="None" maxlength="20" font-weight: bold; 60%;> </div></td> </tr> <tr bgcolor="#666666"> <td height="5" colspan="4"><strong>Message: </strong> </tr> <tr bgcolor="#666666"> <td width="8%" height="5"> <a href="java script:AddEmoticon('[b]TEXT[/b]')"><b>BOLD</b></a> <br> <a href="java script:AddEmoticon('[i]TEXT[/i]')"><i>ITALIC</i></a><br> <a href="java script:AddEmoticon('[u]TEXT[/u]')"><u>ULINE</u></a><br> <a href="java script:AddEmoticon('[i][b]TEXT[/b][/i]')"><u><b>MIXED</b></u></a><br> <a href="java script:AddEmoticon('[i][b]TEXT[/b][/i]')"><i><b>MIXED2</b></i></a><br> <a href="java script:AddEmoticon('[red]TEXT[/red]')" class="style1">RED</a> <br> <a href="java script:AddEmoticon('[green]TEXT[/green]')" class="style1">GREEN</a> <br> <a href="java script:AddEmoticon('[blue]TEXT[/blue]')" class="style1">BLUE</a> <br> <a href="java script:AddEmoticon(':bank:')" class="style1"><img src="emotions/chair.gif" border="0"></a><br> <a href="java script:AddEmoticon(':cheers:')" class="style1"><img src="emotions/cheers.gif" border="0"></a><br> <td colspan="3" > <textarea name='text' id="textarea" cols="100" class=submit style='width: 98%; height: 175px; font-weight: bold;'><?php if ($m > 0){ echo "[b]On:[/b] $dateon. $fromper [b] Wrote:[/b] $ini"; }else{ } ?></textarea></td> </tr> <tr bgcolor="#666666"> <td height="5"> </td> <td colspan="3"><div align="center"> <input type=submit name=Send value=Send class=submit> </div></td> </tr> </table></td> </tr> </table></form> Some one knows how i can get it in seperate tables?
  12. huh, dident go so good think ill just let go of the idea =)
  13. Okay ill make a new full functional site let's see how it goes hehe, ill use some time on it
  14. Just had to try and make one so here is my first template dident have time to add scripts/functional links or something since im really tired now but anyway :http://www.uwm.fluidhost.net/t/templ.html- Kris
  15. not quite shure thats what u meen but :<body bgcolor="666666"><a href="somepage.html" title="Go there!!"><font color="CC0000"> click me </font></a>Something like that..</body>
  16. Thanks that should do it just fine :)Edit : hmm, have a little problem tho, need top/bottom style to... i guess that will be harder know how to do that? =)- Kris
  17. I think i lookd over the whole css style page, but not totally shure.. but anyway i need to find out how i chould make css style with image borders insted of regular :)anyone knows how to do it?- Kris
  18. :)think i found a solution. <? if($_GET ){ $page=($_GET ); include "$page"; } ?> that actually did work , thought it whould be much harder, hehe...but still need to include the page and convert link from ?link over to link.php without showing it inside the status bar.anyone knows? tried include "$page";".php"; dident show any errors thought but faild to open the file... lol alot of edit post here ehh just removed some thing so the code now looks like this : <? if($_GET ){ $page=($_GET ); include "$page.php"; }else{ include"news.php"; } ?> - Kris
  19. Hey, anyone here that knows where i can find a code for onload just like in the forums here, click on a smily and it comes into the textarea. i had a script onetime but it was to wird for me, the smilies and the textarea had to be inside the table. need it for bbcodes, contact lists ++ so if someone knows how to code it or where i chould find a code i whould be verry happy
  20. Well i tried to post the kind of a same topic in javascript, but seems like no1 knows what im talkin about there and i started to think that this code was better to as php coders about since i really dont know if it has anything to do with javascript, just thougt i needed some bodyonload and for me thats javascripts :)but back to the case :i now have :1 menu.1 stats "menu"1 banner1 and one empty table that needs to be a frame. in another way i have 4 tables and need a way to get my "target" into the middle table. as in, a table frame :)i want to do this becouse i hate having 3 scrollbars on a pge, and my refresh functions blinds the screen sometimes bc of the 10 seconds break between each refresh.so just need a way to get my one table to be a frame. im sure you know what im talkin about or i hope so im not a pro programmer so code can be hard/long but pleace tell me how it works so ill be able to learn it to other ppl or edit it if i need - Thanks Kris
×
×
  • Create New...