Jump to content

deadlyp99

Members
  • Posts

    124
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

deadlyp99's Achievements

Member

Member (2/5)

1

Reputation

  1. Try removing the float:left from ".panel div", since you are using absolute positioning anyway.
  2. To me this screams packet sniffer. http://www.wireshark.org/ Pretty good one, though I have not personally used it in a few years. It's worth noting though, that since your application sends and receives data, you could just have it log all data it sends and receives...
  3. It sounds to me, like you do not have a web server installed yet are trying to run php scripts.
  4. Your using the same images repeatedly. Your while loop repeats, and keeps using the static image url. You can restructure your database to also contain the image url for a specific team. echo "<td><image src ='".$record['teamOneImageUrl']."'/></td>"; //problem here echo "<td><image src ='".$record['teamTwoImageUrl']."'/></td>"; //problem here
  5. Hello, wasn't quite sure where I should have posted this, or if appropriate for this forum. I know my web design mechanics fairly well, but i'm not really the best art designer. I've created a calender for a site i'm working on. Click on a day, and you can share what your doing on said day. Simple project, but I feel its ugly. I use a "checkmark" image to show a day has an entry. When the owner clicks a day, they are presented with a pop-in (in-page popup?) that allows them to create or edit. Still need to make a delete control, not hard. When a viewer clicks a day, they get an even more lack-luster view without the text-area. Anyway, this feels really awkward when using it. Any tips for bringing it up to 2012? Attached images for it, thanks in advanced for any advice.
  6. The dbTitle class holds the value of the div's title in the database. That title is used to manage the div's content in the CMS. I could have bypassed all of this by not naming it. But then in the future I could have many divs with no names, which makes determining what's what messy. But any divs created through the cms get that class to conform to the site's template. Adding an id to it would require me to recode the cms to allow me to add a unique id. Ideally that is what I would want right, but I'm not familiar enough with the very large script to properly do it in a timely manner... It requires restructuring the database, updating all the divs that don't have id's, updating all the backend php for add, editing, and removing said content, as well as possibly needing to modify code that needs to interact with the structure or content of the div's. So I can do that, or throw a simple edit and put the long and hard on my to-do list. I had been throwing various functions at jQuery because I don't know it 100% yet. Thanks for helping out, I have gotten this working, and I got the parent function working ... more cleanly. It appears this will do what I want it to and I don't foresee problems with it so far. $('#motivationals').parents('.disignBoxFirst').find('.dbTitle:first').html(''); Thanks a ton.
  7. The script I'm working with allows easy content to be added. Throw it a title and a body of content and it throws a div on the page. I'd really rather avoid editing the base script for this, because I don't know how it may effect the rest of the site.
  8. Hello, i've been working on a site, and there is a specific element I wish to edit. The trouble I have is there are many instances of the class, so I've been using .parent() in jquery, and I feel I am just doing it wrong. The markup looks like this <div class="disignBoxFirst bx-def-margin-top bx-def-border"> <div class="boxFirstHeader bx-def-bh-margin"> <div class="dbTitle">Ad_Rotator</div> <div class="clear_both"></div> </div> <div class="boxContent"> <div class="dbContentHtml"> <p id="motivationals"></p> <script type="text/javascript">// <![CDATA[ /**buildAdRotator();**/ // ]]></script> </div> </div> </div> I am trying to edit the innerHTML of dbTitle. The div is the first instance of the class on the site, but I don't want code to break if I place new ones before it in the future. So I wish to use the motivationals id as a handle or reference point since there will only be one instance of that. I've tried $('#motivationals').parent().parent().parent().first('.dbTitle').html('aasdf'); This doesn't behave as I want it to, and I really feel i'm using bad code just looking at that. Due to the nature of the script I am working on, editing the markup isn't really an option outside of the dbContentHtml div. Any insight on how to properly hop up to the parent, and then down to dbTitle would be much appreciated.
  9. Hey everyone at php freaks I have not touched programming a while and recently did, with intent on tackling perl, as well as playing around with AI type applications... perhaps more threads to come on that note! Picking up perl, I'd always associated it with python (which I decided the syntax is rubbish) but after actually trying it I am really liking how things are done for the most part. Anyway, I'm at a point where I want my application to have certain functions only accessible by me, its one and only master . Typically I like to create a DES cipher of my username and password, then use the key as a salt for an md5 hash to be stored in a database. Md5 looks a lot more pleasant when you look at your database, and at less risk of escaping code and whatnot, just my oppinion. The problem I am having is that, well for some reason Crypt:DES requires input, and keys to be exactly 8 bits. This is fine for now as I am not using any username:passwords longer than this. They are actually shorter, though I do imagine switching over to (using) CBC. So I need to be able to tag on a "\0" null to the variable, and I planned to have the program add or substring a string depending. When it hits the CheckLength function for checking that the variable is 8 bits, it runs for a bit then dies with a "Out of Memory!" error. I've got 3 gigs, and by reading I found that hashing is a bit wonky in perl. However I'm pretty convinced this is an error in method on my behalf and choose to not blame perl. Any help, hints, and tips would be appreciated, have a great day everyone AuthenticateUser.pm package Functions::AuthenticateUser; use Functions::Database; use Functions::HandleException; use Crypt::DES; use Digest::MD5 qw(md5_hex); $fHExc = Functions::HandleException; $fDbCon = Functions::Database; sub UserLogin; sub CheckLength; sub UserLogin { print "\n\nIn order to continue you need authenticate yourself!\nUsername: "; my $user = <>; Functions::AuthenticateUser -> CheckLength($user); print "\nPassword: "; my $pass = <>; $pass = CheckLength($pass); my $key = pack("H16", "2568647ff7468652"); my $cipher = new Crypt::DES $key; my $user = $cipher->encrypt($user); my $pass = $cipher->encrypt($pass); my $today = time(); $user = md5_hex($user.$key); $pass = md5_hex($pass.$key); print 'Login:'.$user.':'.$pass;exit; $fDbCon -> DbConnect('Login:'.$user.':'.$pass); } sub CheckLength() { my($class, $var) = @_; my $varlength = length($var); if ($varlength < 9) { $var += "\0"; CheckLength($var); } elsif ($varlength > 9) { $var = substr($var, 0, ; } return $var; } 1;
  10. Well my question just turned my goal into a monster I wasn't trying to communicate To be more clear: One or the other join needs to be run per query, based on the MapType and Oasis Type. Which if you re-look at my code with that in mind: SELECT * FROM MapSquares IF MapType > 0 THEN JOIN Cities ON MapSquares.SquareID = Cities.SquareID ELSEIF OasisType > 0 THEN JOIN Oasises ON MapSquares.SquareID = Oasises.SquareID ENDIF WHERE X = '39' AND Y = '-4' That's my ultimate goal in this. I'm hoping to be able to shorten my code. If it is not possible, then thanks for your time, i'll just use php
  11. Is there a way I would be able to have it select fields from other tables? SELECT IF (MapType > 0, SelectFields , IF (OasisType > 0!='',Oasises.OasisID,Cities.CityID) ) FROM MapSquares WHERE X = '39' AND Y = '-4'
  12. So I have to use nested sql statements in my php to achieve what I am trying to, or is there a different route I can go?
  13. So, I've never had to use an IF statement in mysql before, but a recent project forced me to learn the JOIN function, which causes me an error trying to pull a few types of information from the same table As far as I know I have the syntax wrong... but I can't figure out what it needs to be, because an IF statement in mysql is just a really foreign thing for me. SELECT * FROM MapSquares IF MapType > 0 THEN JOIN Cities ON MapSquares.SquareID = Cities.SquareID ELSEIF OasisType > 0 THEN JOIN Oasises ON MapSquares.SquareID = Oasises.SquareID ENDIF WHERE X = '39' AND Y = '-4' Any help would be appreciated... IF statements in sql are a rather new concept to me, and I'm very unsure of the context it needs to be in. I'm trying to have the sql join 2 tables based on whether it has a 'MapType' or an 'OasisType'. The use of 0 basically is going to mean "no it doesn't have this type", and not 1 row has both types, but it will have 1 of the two. Thanks in advance for any advice
  14. It's possible you have a data type mismatch. Try instead of $i<"20", using $i<20. It just depends on how it's stored in the database though.
  15. What I told him to do worked just fine, and I know because I actually tested it. Please don't make snide remarks when you've not tested the changes yourself, thank you. The first change, would not effect the output but its good structure. Second change was his first problem, the submitted data wasn't in the form and was therefore not being sent to the second page. The third change was the font tag was not closed
×
×
  • 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.