Jump to content

[dx]

Members
  • Posts

    719
  • Joined

  • Last visited

Everything posted by [dx]

  1. [dx]

    Info about sockets

    Something like chat.
  2. [dx]

    Info about sockets

    Hi, I want to try something using PHP sockets, and it will use a large amount of sockets. So I need quick and stable connection to other side where socket is connected. So I'm asking, is it socket good for this, or is there some alternative way.
  3. [dx]

    Bug or ...?

    Faal Vokundovah check post #9 in this topic.
  4. [dx]

    Bug or ...?

    Hi, Let me back to this topic again. I understood now what means siblings, but what I'm interested in is if there's posibility to get only siblings as children of some element. Like in example: <div id="num1"> <div id="num11"> <div id="num12"> <div id="num13"></div><div id="num2"> <div id="num21"> <div id="num22"> <div id="num23"></div> So, siblings are numX in one group, and numXX in other group. So I need get ony siblings from one element, so like: $('#num11').siblings_somehow to get only num12, and num13. Regards
  5. Hello, I'm trying to make my own vertical slider instead of using browsers default one. So, I have .header which is fixed at top, and .footer which is fixed at bottom. Between those, it's my div.main which has overflow and possible scrolling. My question is, can I get only visible area of .main with height() or innerHeight, or whatever, or, it's only solution to use: $(window).innerHeight() - $('.header').innerHeight() - $('.footer').innerHeight I'm trying avoid these calculations and only get visible currently visible area of my .main Best regards
  6. Argh.. Thanks :/ What a mess..
  7. In my case it's not, I've tried it. So like func_require(file_path);echo $something; I don't know why, it's basic php knowledge
  8. But what is point of this. // file1.php $something = 'value'; // file2.php include 'file1.php'; echo $something; // not defined Is that issue with my code, or what? What to do in this case..
  9. Well, it's just including file with $_SERVER['DOCUMENT_ROOT'] Maybe it's unnecessary but whatever.. I have avoided functions func_controller and func_template so I only use func_require..and there's no need to do global $something; but still returns null
  10. Yeah, but it's bunch of variables, I can't do global for every var..
  11. But what if I use only outside functions, it's same.. not defined variable func_require('/controller/'.$page.'/'.$option.'.php');func_require('/view/default/'.$page.'/'.$option.'.tpl');
  12. Also I've tried without function. Just func_require..
  13. Hi, I have issue with this code. In my included php file there's var $something = 'x'; and in tpl file there's <?php echo $something; ?> But variable seems not to be defined. $page = (isset($_GET['page']) ? $_GET['page'] : 'site'); $option = (isset($_GET['option']) ? $_GET['option'] : 'main'); $allowed_pages = array('admin', 'site'); function func_controller($allowed_pages, $page = NULL, $option = NULL) { if (in_array($page, $allowed_pages)) { func_require('/controller/'.$page.'/'.$option.'.php'); }}function func_template($allowed_pages, $page = NULL, $option = NULL) { if (in_array($page, $allowed_pages)) { func_require('/view/default/'.$page.'/'.$option.'.tpl'); }} func_controller($allowed_pages, $page, $option);func_template($allowed_pages, $page, $option); var_dump(get_included_files());var_dump(get_defined_vars()); Best regards.
  14. ?? Explain please.. I have session_start() in main config file, and also tried in that file. So becouse of it says headers already sent.
  15. Also tried with cookie, it's same..
  16. Yeah, it's strange to me also why in firefox won't work but in chrome works. If I do session_start() before output, it says headers already sent... So, same file tested with both browsers..
  17. Hi, This script: <?php var_dump($_SESSION); ?> works with chrome and shows what I expect, but in firefox shows empty string. What can be reason for it?
  18. [dx]

    Decode script

    Hi, I have some script, and part of it is encoded (I guess it's hex) So I need extract script to user readable. When I search some function with windows grep, it finds in one file, but when I open it, I just see variable which is encoded. So how properly decode it. Format is: $var='94CD76CD371C5A7BC70C186E779C293B9B49BACA5A781A6';
  19. [dx]

    Bug or ...?

    Ah, understand now.. I thought that only elements with same selector are siblings..
  20. [dx]

    Bug or ...?

    So siblings are elements on same parent/child level in elements hierarchy?
  21. [dx]

    Bug or ...?

    I guess I have miss understand of siblings meaning.. :S
  22. [dx]

    Bug or ...?

    This is my HTML script: <div class="member_content" style="display: block; "><h2>Edit user</h2><span class="darkred">* Click on user you want edit</span> <table cellpadding="0px" cellspacing="0px" class="edit_user_list" style="border: 1px solid #CCC; display: block">...</table><table cellpadding="0px" cellspacing="0px" class="edit_user_list" style="border: 1px solid #CCC; display: none">...</table><table cellpadding="0px" cellspacing="0px" class="edit_user_list" style="border: 1px solid #CCC; display: none">...</table> <span class="edit_user_pages" style="border: 1px solid #CCC; padding: 3px; margin: 2px">1</span><span class="edit_user_pages" style="border: 1px solid #CCC; padding: 3px; margin: 2px">2</span><span class="edit_user_pages" style="border: 1px solid #CCC; padding: 3px; margin: 2px">3</span></div> I've just removed content of tables(s) So when I click on pagination below, those spans, and h2, and span above hides.
  23. [dx]

    Bug or ...?

    Yes, but only siblings for .edit_user_list
  24. [dx]

    Bug or ...?

    Hi, I stuck with this script: $('.edit_user_pages').click(function() { var n = $('.edit_user_pages').index($(this)); $(this).css('background', '#fafafa').siblings().css('background', '#fdfdfd'); $('.edit_user_list').animate({opacity:0}, 300, 'linear', function() { $('.edit_user_list').eq(n).css({display: 'block'}).siblings().css({display: 'none'}); }).animate({opacity:1}, 500);}); So let me explain. I have pagination numbers with class edit_user_pages, also I have tables with class edit_user_list, so when I click on first pagination number it checks index and shows first user_list. So it works fine.. Also, above those table(s) I have some text, something like select user.. etc.And below table(s) are pagination number. So this script works as I want, table is changed etc., except text (above) and pagination (below) disapears. Those elements doesn't have same class name. If I try this: $('.edit_user_list').eq(n).css({display: 'block'}); elements doesn't hide, so error is there.. Regards
×
×
  • Create New...