Jump to content

Destramic

Members
  • Posts

    960
  • Joined

  • Last visited

Everything posted by Destramic

  1. that works much better thank you max. when i try apply a margin to the top of the page it pushes the body down too...how can this be fixed please? and also i tried to add z-index to the header and left container to stop bg image showing through but its also not work. (trying to get the bg image to only show through content div) thanks again. updated: <!doctype html> <html> <head> <meta charset="utf-8"> <title>Dashboard</title> <link href="https://fonts.googleapis.com/css?family=Titillium+Web" rel="stylesheet"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <style> *{ font-family: 'Titillium Web'; } body { background:url("https://image.ibb.co/h93Ndo/abstract.jpg") top right no-repeat; background-attachment:fixed; margin-top: 10; } .body-container{ display: flex!important; flex-direction: column; justify-content: stretch; align-items: stretch; min-height: 100vh; margin: auto; width: 97%; opacity: 0.7; z-index: -1; } .header{ flex-grow: 0; background: #3A98FD; border-top-left-radius: 15px; border-top-right-radius: 15px; z-index: 1; } .two-cols{ flex-grow: 1; display: flex; flex-direction: row; justify-content: stretch; } .left-container{ display: flex; flex-direction: column; justify-content: flex-start; flex-grow: 1; flex-basis: 15%; z-index: 1; background: #3B4A53; } .content{ display: flex; flex-direction: column; justify-content: flex-end; flex-grow: 1; flex-basis: 85%; background: #ffffff; z-index: 1; } </style> </head> <body> <div class="body-container"> <div class="header">Here's the header</div> <div class="two-cols"> <div class="left-container">menu</div> <div class="content"> hello world </div> </div> </div> </body> </html>
  2. I'm having trouble getting the .body-container and .left-container to follow suit with the .content, the height of both divs don't seem to alter down. Also z-index doesnt work on .left-container as im trying to stop the background to show through that particular div. ive read it may be because of the absolue positioning. Any help on these matters would be great. thank you <!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <style> body { background:url("https://image.ibb.co/h93Ndo/abstract.jpg") top right no-repeat; background-attachment:fixed; margin: 0; } .body-container{ background-color: #ffffff; border-top-left-radius: 15px; border-top-right-radius: 15px; margin: auto; width: 98%; height: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0; opacity: 0.7; margin-top: 10px; } .header{ position:relative; display: block; width: 100%; background-color: #3A98FD; height: 70px; border-top-right-radius: 15px; border-top-left-radius: 15px; } .left-container{ display: block; color: #ffffff; float: left; background-color: #3B4A53; width: 12%; height: auto%; min-height: 100%; } .content{ position: absolute; display: inline-block; float: right; width: 100%; height: auto; min-height: 100%; } </style> </head> <body> <div class="body-container"> <div class="header"></div> <div class="left-container">menu</div> <div class="content"> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>hello world </div> </div> </body> </html>
  3. well i have no real exprience what so ever when it comes to api's...but if someone is paying for a key then it makes sense to register the key to a site...ie: phpfreaks.com = phpfreakskey this way you can ensure the key is correct and also that the request for your api is phpfreaks.com, ensuring another site isn't using the key. you'd simply have to create a page www.yoursite.com/api.php?key=phpfreakskey and then validate the key and where the request is sent from....if all checks out then the data can be sent process seems simple to me but i may be overlooking things.. what does your api do exactly?
  4. ok firstly you would need to set a cookie for the page your talking about....here is a example setcookie ('time_visited', time(), 3600, '/' , 'domain.com', true, false); when revisiting this page again you can do something like this: if (isset($_COOKIE['time_visited'])) { $time_visited = $_COOKIE['time_visited']; $last_visited = date('m/d/Y H:i:s', $time_visited); echo "Hi User, you last visited: " . $last_visted; } you may want to look at the manuel here regarding cookies: http://php.net/manual/en/function.setcookie.php i hope this is what you are looking for
  5. hey guys i'm using command prompt to execute the following: httpd.exe -k uninstall but it comes back with i've even removed maria-db as i thought that may have been the problem...no uninstall in c:\apache24 directories also no sign of apache in my add/remove programs listings. does anyone please have any idea on how i can uninstall apache please? thank you
  6. fenway you are the main man...thanks alot
  7. sorry you are gonna have to bear with me and explain a bit more cause im no pro with mysql wrap max()? aslso i tried IFNULL(@win_streak, 0) but it didnt work. and you want me to get rid of the case? MAX(@win_streak := CASE lmr.result WHEN 'Win' THEN @win_streak +1 ELSE 0 END) AS `win_streak`
  8. yeah i suppose i could put if (empty($row['win_steak'])) { echo "0"; } else { echo $row['win_streak']; } but i'd much prefer to be able to do it in the query...and what do you mean by crazy query? haha...i mean how else should i do what i want to do in a query?
  9. why what other way do you think i should do it?...but like i said some of the teams have no records of matches and they havent had any so the win_streak reutrns null....can i set that to 0 somehow please?
  10. ok ive got it working now finnaly...the only problem i do have if you can help is that the win_streak column returns null on some cases...not ive tried to put WHEN NULL THEN 0 in the case but that doesnt do nothing...still returns null...thanks for your help fenway SET @rank := 0; SET @points := 0; SET @tie := 0; SET @win_streak := 0; SELECT *, @rank := IF(@points = points, IF(@points = '0', @rank + 1, @rank), @rank + 1), @points := points, @tie := IF(@points = points, IF(@points = '0', @tie = '0', @tie = '1'), @tie = '0'), IF(@tie = '1', @rank + 1, @rank) as rank, @tie := '0' FROM( SELECT t.team_id, t.team_name, (SELECT MAX(@win_streak := CASE lmr.result WHEN 'Win' THEN @win_streak +1 ELSE 0 END) FROM league_match_results lmr LEFT JOIN league_matches lm ON lm.league_match_id = lmr.league_match_id WHERE lmr.team_id = t.team_id ORDER BY lm.date DESC) AS `win_streak`, COUNT(r.league_match_result_id) AS 'matches_played', SUM(IF(r.result='Win', 1, 0)) AS `wins`, SUM(IF(r.result='Loss', 1, 0)) AS `losses`, SUM(IF(r.result='Draw', 1, 0)) AS `draws`, SUM(IF(r.result='Win', 3, IF(r.result='Draw', 1, IF(r.result='Loss', 0, 0)))) AS `points` FROM teams t LEFT JOIN league_match_results r ON r.team_id = t.team_id LEFT JOIN team_leagues tl ON tl.team_id = t.team_id LEFT JOIN leagues l ON l.league_name = 'Counter-Strike Europeon Team Death Match' LEFT JOIN games g ON g.game_abbreviation = 'CSS' GROUP BY t.team_id ORDER BY points DESC, t.team_name) AS x
  11. ok i sort of go in work...but...it returns the team as having 1 streak...but it has no win result if you can help please SELECT MAX( IF( lmr.result = 'Win', @win_streak +1, IF( lmr.result = 'Draw', @win_streak = '0', IF( lmr.result = 'Loss', @win_streak = '0', @win_streak = '0' ) ) ) ) AS `win_streak` FROM league_match_results lmr LEFT JOIN league_matches lm ON lm.league_match_id = lmr.league_match_id WHERE lmr.team_id =1 ORDER BY lm.date DESC
  12. thanks fenway...a very useful site...now ive tried to do what i think is right but the query isnt working at all the error im getting is SET @rank := 0; SET @points := 0; SET @tie := 0; SET @win_streak := 0; SELECT *, @rank := IF(@points = points, IF(@points = '0', @rank + 1, @rank), @rank + 1), @points := points, @tie := IF(@points = points, IF(@points = '0', @tie = '0', @tie = '1'), @tie = '0'), IF(@tie = '1', @rank + 1, @rank) as rank, @tie := '0', @win_streak := '0' FROM( SELECT t.team_id, t.team_name, (SELECT IF(lmr.result='Win', @win_streak + 1, IF(lmr.result='Draw', @win_streak = '0', IF(lmr.result='Loss', @win_streak = '0', 0))) AS `win_streak` FROM league_match_results lmr LEFT JOIN league_matches lm ON lm.league_match_id = lmr.league_match_id WHERE lmr.team_id = t.team_id ORDER BY lm.date DESC), COUNT(r.league_match_result_id) AS 'matches_played', SUM(IF(r.result='Win', 1, 0)) AS `wins`, SUM(IF(r.result='Loss', 1, 0)) AS `losses`, SUM(IF(r.result='Draw', 1, 0)) AS `draws`, SUM(IF(r.result='Win', 3, IF(r.result='Draw', 1, IF(r.result='Loss', 0, 0)))) AS `points` FROM teams t LEFT JOIN league_match_results r ON r.team_id = t.team_id LEFT JOIN team_leagues tl ON tl.team_id = t.team_id LEFT JOIN leagues l ON l.league_name = 'test' LEFT JOIN games g ON g.game_abbreviation = 'CSS' GROUP BY t.team_id ORDER BY points DESC, t.team_name) AS x the query works without (SELECT IF(lmr.result='Win', @win_streak + 1, IF(lmr.result='Draw', @win_streak = '0', IF(lmr.result='Loss', @win_streak = '0', 0))) AS `win_streak` FROM league_match_results lmr LEFT JOIN league_matches lm ON lm.league_match_id = lmr.league_match_id WHERE lmr.team_id = t.team_id ORDER BY lm.date DESC), can you please help me
  13. well this is the query i have been working on and yeah the query from the same topic....and sorry yes that table now has a date included now
  14. sorry about the delay... here is the query i have and i want to add a streak column to it so if you can help or advise me what to do...i would like to add it to this query really if possible SET @rank := 0; SET @points := 0; SET @drawing := 0; SELECT *, @rank := IF(@points = points, IF(@points = '0', @rank + 1, @rank), @rank + 1), @points := points, @drawing := IF(@points = points, IF(@points = '0', @drawing = '0', @drawing = '1'), @drawing = '0'), IF(@drawing = '1', @rank + 1, @rank) as rank, @drawing := '0' FROM( SELECT t.team_id, t.team_name, COUNT(r.league_match_result_id) AS 'matches_played', SUM(IF(r.result='Win', 1, 0)) AS `wins`, SUM(IF(r.result='Loss', 1, 0)) AS `losses`, SUM(IF(r.result='Draw', 1, 0)) AS `draws`, SUM(IF(r.result='Win', 3, IF(r.result='Draw', 1, IF(r.result='Loss', 0, 0)))) AS `points` FROM teams t LEFT JOIN league_match_results r ON r.team_id = t.team_id LEFT JOIN team_leagues tl ON tl.team_id = t.team_id LEFT JOIN leagues l ON l.league_name = 'test' LEFT JOIN games g ON g.game_abbreviation = 'CSS' GROUP BY t.team_id ORDER BY points DESC, t.team_name) AS x
  15. oh sorry that is where i should have a date column?...im still trying to design this table
  16. what im basical after is the current continuous streak...so if a team has won thier last 3 games then streak is 3...but if they loss or draw then the streak ends and equals 0
  17. sorry i dont see what you mean by sortorder column?...you mean the column i want to sort and order?
  18. hey guys i have a table called match_results and looks like this match_results -------------------------- league_result_id league_match_id team_id result ------------------------- now what i want to be able to do is when selecting the results is get the steak where result = win if anyone could help or have a site on how this can be done please...thank you
  19. k thank you..but this is the mysql error im getting [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] ALTER TABLE `games` CHANGE `status` `status` ENUM( 1 ) NOT NULL DEFAULT '0' #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1) NOT NULL DEFAULT '0'' at line 1 [/quote]
  20. k i have a field in my table but i want to know what type to set my news status as: have a field called "status" for my news either it should be a field that contains the value true or false ie. 0 or 1 or on the other hand i could have the value "Active" or "Inactive" what field type would be the best for this and what would be the best way? thanks..how comeone can help me on my query
  21. i have apache on my computer and i want to find the ip to my server, so i can have my domain at ukreg located to my apache server.... is this possible? help please? thanks destramic
  22. erm got it working...i did a typo =/ gulp! thanks!
  23. i did this: extension_dir = "C:\Program Files\Apache Group\Apache2\php5\ext" in my php.ini the when i restart i says unable to load C:\Program Files\Apache Group\Apache2\php5\ext\php_mysql.dll
  24. the only thing i can see in my php.ini is: ;extension=php_mysql.dll so i removed the semi - colon and not worked then when i restarted my apache it says it cans load the moduel destramic
  25. i have: apache 2.1 php 5 mysql 5.1 phpmyadmin i have a probelm now with my phpmyadmin: cannot load mysql extension; please check PHP configuration can anyone help me please?
×
×
  • 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.