Jump to content

R4nk3d

Members
  • Posts

    157
  • Joined

  • Last visited

    Never

Everything posted by R4nk3d

  1. So i have a decent javascript uhh... script that im using to create a popout menu bar at http://152.160.5.14 but when u hover over the menu button, the menu pops out, but when u rollover that, it closes because of the timer. I dont know why it wont stay open... Can i get some help? Heres the javascript: var nav_timer = 0; function loadGroup(id) { document.getElementById(id).style.visibility = "visible"; cancel_timer('nav_timer'); } function unloadGroup(id) { document.getElementById(id).style.visibility = "hidden"; } function cancel_timer(timer) { if(timer) { window.clearTimeout(timer); timer = null; } } function setClosingTime(id) { nav_timer = window.setTimeout('unloadGroup(\''+id+'\')', 500); } and heres the html for one of the buttons: <style type="text/css"> #nav_menu_1 { visibility: hidden; } #nav_menu_1 a { position:relative; width:auto; display:block; margin: 0; padding:0; }</style><li> <a href="javascript:void(0);" onmouseover="loadGroup('nav_menu_1');" onmouseout="setClosingTime('nav_menu_1');" > <img src="/images/group_bar.php?text=Wireless Washtenaw" alt="Wireless Washtenaw" /></a> <div id="nav_menu_1" onmouseover="cancel_timer('nav_timer');" onmouseout="setClosingTime('nav_menu_1');" > <a href="/index.php?id=7&title=Prices" ><img src="/images/group_link_bar.php?text=Prices" alt="test" /></a> <a href="/index.php?id=6&title=Where's It Available?" ><img src="/images/group_link_bar.php?text=Where's It Available?" alt="test" /></a> <a href="/index.php?id=1&title=Wireless Washtenaw" ><img src="/images/group_link_bar.php?text=Wireless Washtenaw" alt="test" /></a> </div></li>
  2. R4nk3d

    I HATE IE

    body { color: black; background-color: #E6E6E6; font-size:12px; font-family: Verdana, Arial, Helvetica, sans-serif; margin-top: 30px; margin-bottom: 0px; /* You need to change the bottom MARGIN to 0. margin-left: 0%; /*Here is where you change the width.*/ margin-right: 0%; padding:0px; }
  3. Ok, i kinda get what ur trying to do.... You need to make a link such as.. <a href="javascript:void(0);" onclick="showDiv('div_1');">Click!</a> And then make your div <div id="div_1"> Hey hey hey </div> then make the showDiv(id) function.... function showDiv(id) { var div_vis = document.getElementById(id).style.display; if(div_vis == "none") document.getElementById(id).style.display = "block"; if(div_vis == "block") document.getElementById(id).style.display = "none"; return 1; } I think thatll work
  4. possibly try the visibilty ="hidden"; ?
  5. Because im using dynamic web pages that are taken from a mysql table.... not files.
  6. Ok, well i store pages in the mysql fields for the dynamic site and its kind of like this: Welcome to <?php echo($title); ?> so its a mix of php and html. Should i run a loop through the string and find the <?php parts of it and eval the string in between the <?php and ?> tags?
  7. Ok, thanks. Ill look into it because I just changed it and it screwed up the script so Ill have to read up on that to know how to use it. Thanks, R4nk3d
  8. So I am making a site nav using php and javascript. PHP grabs the links from the mysql database and writes them while javascript makes it so when u hover over the group links, the pages of that group pop out to the right of them. The only problem i am having is the div stretches down I think and so when u hover over one group, then move the mouse down to hover over the next link, it wont let u because ur still on the div. Can you please take a look at it? http://152.160.5.14/2020comm.com/ Heres the javascript code: function loadGroup(id) { document.getElementById(id).style.display = "block"; document.getElementById(id).style.visibility = "visible"; return 1; } function unloadGroup(id) { document.getElementById(id).style.display = "none"; document.getElementById(id).style.visibility = "hidden"; return 1; } and here is the dynamic style (written by php) for each group, everything stays the same except for the number in the name: #nav_menu_1 { display:none; width:auto; height:auto; margin:0; padding:0; } #nav_menu_1 a { display:block; width:auto; height:auto; position: relative; top:-30px; left:226px; z-index:2; margin: 0; padding:0; } and then here is the style in the css file for the nav bar: #left_nav { width:225px; text-align: left; margin: 0px; padding: 0px; padding-bottom:20px; border-right:solid 1px #000; vertical-align: top; padding-top:10px; } #navigation { margin:0; padding:0; z-index:20; } #navigation div { margin: 0; padding: 0; position: absolute; visibility: hidden; } #navigation div a { position: relative; margin: 0; padding: 0; width: auto; text-align: left; } #navigation li { margin: 0; padding: 0; list-style: none; } #navigation li a { margin:0; padding:0; display:block; } And in IE, it has the spaces between them, how can i fix that?
  9. I'm making a very dynamic site and i can't seem to figure out how to take lines of php, write them onto a page, and have them output something. here's an example: $mysqlfield = "<?php include('test.php'); ?>"; echo($mysqlfield); But it doesnt write anything, am i able to do this?
  10. Hi Everyone, I'm making a website and I am trying to create a dynamic nav bar that will include groups(drop-down menu with links) and then regular links that will be displayed as images. I have a column in the mysql table that will determine the priority of the group/link and list them accordingly. I am having trouble reading the groups though. See what you can pull together for me: function ini_NavBar() { $groups = array(); $sql = mysql_query("SELECT * FROM `navigation_groups` WHERE display=1 ORDER BY `priority` ASC"); while($row = mysql_fetch_array($sql)) { $groups[] = array("id" => $row['id'], 'title' => $row['title'], 'priority' => $row['priority'], 'type' => 'group'); } print_r($groups); for($i = 0; $i < sizeof($groups); $i++) { $sql = mysql_query("SELECT * FROM `pages` WHERE group_id='".$groups[$i['id']]."' ORDER BY `priority` ASC"); while($r = mysql_fetch_array($sql)) { $groups[$i['links']] .= $r['id']." "; } } $pages = array(); $sql = mysql_query("SELECT * FROM `pages` WHERE display_link=1 AND group_id IS NULL ORDER BY `priority` ASC"); while($row = mysql_fetch_array($sql)) { $pages[] = array('id' => $row['id'], 'title' => $row['title'], 'priority' => $row['priority'], 'type' => 'page'); } print_r($pages); $priority = array(); $id = array(); $group = array(); foreach($groups as $key => $value) { $priority[$key] = $value['priority']; $id[$key] = $value['id']; $type[$key] = $value["type"]; } foreach($pages as $key => $value) { $priority[$key] = $value['priority']; $id[$key] = $value['id']; $type[$key] = $value["type"]; } array_multisort($priority,SORT_DESC,$id,SORT_ASC,$group,SORT_ASC); return 1; } Thanks! And heres the output: Array ( [0] => Array ( [id] => 1 [title] => Wireless Washtenaw [priority] => 0 [type] => group ) [1] => Array ( [id] => 2 [title] => Support [priority] => 0 [type] => group ) ) Notice: Undefined index: in C:\Inetpub\wwwroot\default\2020comm.com\sources\functions.php on line 13 Notice: Undefined index: in C:\Inetpub\wwwroot\default\2020comm.com\sources\functions.php on line 13 Notice: Undefined index: id in C:\Inetpub\wwwroot\default\2020comm.com\sources\functions.php on line 23 Notice: Undefined index: id in C:\Inetpub\wwwroot\default\2020comm.com\sources\functions.php on line 23 Notice: Undefined index: id in C:\Inetpub\wwwroot\default\2020comm.com\sources\functions.php on line 23 Array ( [0] => Array ( [id] => [title] => Home [priority] => 0 [type] => page ) [1] => Array ( [id] => [title] => Locations [priority] => 4 [type] => page ) [2] => Array ( [id] => [title] => Support & FAQs [priority] => 7 [type] => page ) ) Warning: array_multisort() [function.array-multisort]: Array sizes are inconsistent in C:\Inetpub\wwwroot\default\2020comm.com\sources\functions.php on line 41
  11. Ok, ill check it out. Thanks.
  12. Hey Guys, Haven't logged on in awhile, but I got a big 4 week website project and I need some help :'( So I'm incorporating a CMS into the site. Any staff member at work can login to the admin panel and add/edit/remove pages and announcements. So I am trying to incorporate our old website's pages into our new website's by just a simple copy + paste into the sql tables. I know this won't work 100% but that's not the big problem. I do not want to put bbc on the code so we can use any html, php, css we want to add to individual pages. The problem is, sometimes (a lot of times actually) the page that I'm writing from the sql server has open tags like <table> or maybe it closed too many tags at the end that aren't really opened. I was wondering if there's a way for me to parse the code that I'm receiving to get it just written into a <div> where it won't mess up anything on the page. If I need to be more specific, please post asap. I definitely need this answered. Thank you so much, R4nk3d
  13. you cant do this $check_sql = "SELECT `username` FROM `members`" or die (mysql_error()); $check_query = mysql_query($check_sql); do this $check_sql = "SELECT `username` FROM `members`"; $check_query = mysql_query($check_sql) or die(mysql_error()); i think
  14. lawl, i loved the swerve one
  15. like a virtual directory? or a cname?
  16. i dont see anything being injected, u cant execute any commands at all
  17. all those users are deleted. nothing is being injected. the user table is "users" admin = adminlevel (1 for admin) try whatever u can, i dont see it
  18. no, if i put root as the username, it inputs it into the db as rootroot because im adding it again. so it needs to be $user = strip... but yeah, its working
  19. haha, ok. changing now actually, now that i think about it. wouldnt making it $user .=... add it to the end? shouldnt it be $user = $_Post $user = strip....?
  20. i see that ur tryin it, heres what it actually is putting in the database.... (screenshot) [attachment deleted by admin]
  21. ok, i dont have it exactly like that, but i do have it working, try it out
  22. k, heres what i got now: require("./sources/string_array_maps.php"); $user = $_POST["Username"]; $pass = $_POST["Password"]; //.... continues on <?php function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } $_POST = array_map('stripslashes_deep', $_POST); $_GET = array_map('stripslashes_deep', $_GET); $_COOKIE = array_map('stripslashes_deep', $_COOKIE); $_REQUEST = array_map('stripslashes_deep', $_REQUEST); function clean_post_var($var){ $var=mysql_real_escape_string(trim(strip_tags($var))); $var=htmlspecialchars($var,ENT_QUOTES); return filter_var($var,FILTER_SANITIZE_STRING); } $_POST = array_map('clean_post_var', $_POST); $_GET = array_map('clean_post_var', $_GET); $_COOKIE = array_map('clean_post_var', $_COOKIE); $_REQUEST = array_map('clean_post_var', $_REQUEST); ?> This look right?
×
×
  • Create New...

Important Information

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.