Jump to content

M.O.S. Studios

Members
  • Posts

    286
  • Joined

  • Last visited

Posts posted by M.O.S. Studios

  1. Sorry about the repost, this post wasn't suppose to turn into the same issue as the other one, just worked out that way. I did figure out where the issue was, I'm still having the other problem so I'm going to continue over there.

     

     

    thanks for the help

  2. Never bumped a topic before.

    i did print_r($_SESSION);

     

    at the last line of the project, and all my values are there. but for some reason i am unable to pull the data up on anther page using session_id. the only thing i can figure is the values are being deleted

     

  3. maybe the code will help out

     

    <?php
    
    if($_POST['submit']==BUTTMAKEACCOUNT){
    if($_GET['section']=='newaccount'){
    	SESSION_START();
    	$_SESSION['newmember']['email']=$_POST['newmember_email'];
    	$_SESSION['newmember']['password']=$_POST['newmember_password'];
    	$_SESSION['newmember']['username']=$_POST['newmember_username'];
    	$_SESSION['newmember']['fname']=$_POST['newmember_firstname'];
    	$_SESSION['newmember']['lname']=$_POST['newmember_lastname'];
    	$_SESSION['newmember']['tmp_pass']=randstr('15', TRUE, FALSE);
    		cart_mail('New member', $_SESSION['newmember']['fname'], $_SESSION['newmember']['lname'], $_SESSION['newmember']['email'], NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $_SESSION['newmember']['username'], $_SESSION['newmember']['tmp_pass'], $sessionid);
    }
    }
    
    ?>
    <?php echo $error; ?>
    <form method='POST' action='index.php?page=members&section=newaccount'>
    <div class='newmember'>
    <div class='section'><?php echo MEMBERS_LOGININFO; ?></div>
    <div class='email'><?php echo EMAIL; ?></div>
    <div class='email_input'><input name='newmember_email' value='<?php echo $_POST['newmember_email']; ?>' type='text' size='15' maxlength='25'></div>
    
    <div class='password'><?php echo PASSWORD; ?></div>
    <div class='password_input'><input name='newmember_password' value='<?php echo $_POST['newmember_password']; ?>'type='password' size='8' maxlength='8'></div>
    <div class='passwordcon'><?php echo CONPASSWORD; ?></div>
    <div class='passwordcon_input'><input name='newmember_conpassword' value='<?php echo $_POST['newmember_conpassword']; ?>' type='password' size='8' maxlength='8'></div>
    
    <div class='section'><?php echo MEMBERS_PROFILEINFO; ?></div>
    
    <div class='username'><?php echo MEMBERS_USER; ?></div>
    <div class='username_input'><input name='newmember_username' type='text' size='15' maxlength='25' value='<?php echo $_POST['newmember_username']; ?>'></div>
    <div class='firstname'><?php echo MEMBERS_FIRSTNAME; ?></div>
    <div class='firstname_input'><input name='newmember_firstname' type='text' size='15' maxlength='25' value='<?php echo $_POST['newmember_firstname']; ?>'></div>
    <div class='lastname'><?php echo MEMBERS_LASTNAME; ?></div>
    <div class='lastname_input'><input name='newmember_lastname' type='text' size='15' maxlength='25' value='<?php echo $_POST['newmember_lastname']; ?>'></div>
    <div class='submit'><input type='submit' name='submit' value='<?php echo BUTTMAKEACCOUNT; ?>'></div>
    </div>
    </form>
    
    

     

    i took out the form validation parts of the script because they where not needed for this example.

     

    there is a custom function called cart_mail. It sends a validation email that requires the user to click on a link to prove their email is real. if you notice the last value in the function is session_id(). that number is inserted into the url.

     

    The e-mail sell fine and it creates the url as expected.

     

    here is my next script (used just for testing use at the moment)

    <?php
    SESSION_ID($_GET['sid']);
    SESSION_START();
    
    print_r($_SESSION);
    ?>
    

     

     

    the two scripts work perfectly one their own. how ever when inserted to my cms the 2nd script doesn't call the session data any more. Any ideas?

  4. ok weird situation,

        I'm working on a members registration page. At the moment I'm working on the e-mail validation process. I'm doing this by storing the information in session data; I then send the user an email containing a url they have to goto. The url contains the session_id() so i can recall the session data. Here is where the problem starts.

     

    When I run the script it works fine until i put it in the cms.

    i get the email with the session_id() url, but for some reason the session always shows up as blank.

     

    any ideas?

     

     

    Thanks in advance

  5. here is my function

     

    function runAccordion(){
    var e=document.getElementsByName('overflow_remove');
    	for(var i=0; i<e.length; i++){
    	e[i].style.overflow="hidden";
    	}
    
      var nID = "Accordion_" + document.getElementById('season_select').options[document.getElementById('season_select').selectedIndex].value;
      if(openAccordion == nID)
        nID = '';
        
      setTimeout("animate(" + new Date().getTime() + "," + TimeToSlide + ",'" 
          + openAccordion + "','" + nID + "')", 33);
      
      openAccordion = nID;
    
    for(var i=0; i<e.length; i++){
    e[i].style.overflow="auto";
    }
    
    
    
    }
    </script>
    

     

    Basically  i want a time delay added before that last 'for()' loop how would i do that?

  6. Here is the issue

     

    <div class='content'></div>

     

    is going beyound the bottom border of <div class="comic_border"> ... </div>

     

    I want 'comic_border' to expand with 'content' rather then let it grow out side of its border.

     

    any ideas?

     

    css

     

    html, body{
    border-width: 0px;
    padding: 0px;
    margin: 0px;
    font-size: 90%;
    width: 100%;
    height: 100%;
    background: #000000;
    }
    
    .comic_border{
    width: 1000px;
    height: 100%;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    padding: 25px;
    background: #da1b1b;
    border: solid 5px #ffffff;
    }
    
    .header{
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 25px;
    width: 100%;
    height: 186px;
    background: url(../../images/background/citywhite.png) repeat-x;
    }
    
    .content{
    width: 100%;
    height: 100%;
    background: #ffffff;
    margin-bottom: 10px;
    }
    

     

    html

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link href="common/css/main.css" rel="stylesheet" type="text/css" />
    
    <title></title>
    </head>
    <body>
    <div class="comic_border">
    	<div class="header"></div>
    	<div class="content"></div>
    </div>
    </body>
    </html>
    

     

    thanks im advance

  7. I have a counter that counts hits on my: home page, each product &  my check out.

     

    after reviewing I realize that I have a of hits just on my homepage. it might just be because no want goes past that section OR because of web crawlers and bots. anyone know how to check for that???

     

    here is my code if it helps.

     

    <?php
    SESSION_START();
    if(!$_GET){$pages = 'index';}
        elseif($_GET['page']=='store' && isset($_GET['prod'])){$pages = $_GET['prod'];}
        elseif($_GET['page']=='checkout'){$pages = 'checkout';}
    
    if(is_null($_SESSION['count'][$pages]) && is_null($_SESSION['testing']) && isset($pages)){	
    include("admin/common/link.php");
    	$query = "INSERT INTO `count` (`ip`, `page`, `date`) VALUES ('".$_SERVER['REMOTE_ADDR']."', '".$pages."', '".mktime()."')";
    	mysql_query($query);
    	$_SESSION['count'][$pages]=1;
    mysql_close($link);
    }
    ?>
    

  8. well I'm going to re-phrase my question, just in case there is a misunderstanding.

     

    basically the .right and .left div have to run parallel to content and at the same length.

     

    the problem I'm having is that when  .content is expanded to more then 800 px all the other divs stay the same length

  9. here is my layout

     

    <div class='wrapper'>

    <div class='right'></div>

        <div class='content'></div>

    <div class='left'></div>

    </div

     

    I've tried a few different css codes, I cant figure out what combo i need exactly.

     

    i want .content to determine the height of: .wrapper, .right and .left

     

    and i want the height of .content to be determined by the content inside with a minimum of 800px.

     

    any ideas?

     

    thanks in advance

  10. here is a js function I found on-line that I'm altering for a auto suggest feature on my site.

     

    // Shows a box if it wasn't shown yet or is hidden
    // or hides it if it is currently shown
    function show_hide_box(an, width, height, borderStyle)
    {
        setTimeout('closebox()', 50000);
        var href = 'autosuggest.php?input='+an.value;
        var boxdiv = document.getElementById(href);
    
        if (boxdiv != null)
        {
            if (boxdiv.style.display=='none')
            {
                hide_other_alone(boxdiv);
                // Show existing box, move it
                // if document changed layout
                move_box(an, boxdiv);
                boxdiv.style.display='block';
    
                // Workaround for Konqueror/Safari
                if (!boxdiv.contents.contentWindow)
                    boxdiv.contents.src = href;
            }
            else
                // Hide currently shown box.
                boxdiv.style.display='none';
            return false;
        }
    
        hide_other_alone(null);
    
        // Create box object through DOM
        boxdiv = document.createElement('div');
    
        // Assign id equalling to the document it will show
        boxdiv.setAttribute('id', href);
    
        // Add object identification variable
        boxdiv.alonePopupBox = 1;
    
        boxdiv.style.display = 'block';
        boxdiv.style.position = 'absolute';
        boxdiv.style.height = '100px';
        document.body.appendChild(boxdiv);
    
        var offset = 0;
    
        var contents = document.createElement('iframe');
        contents.scrolling = 'auto';
        contents.overflowX = 'hidden';
        contents.overflowY = 'auto';
        contents.frameBorder = '0';
        contents.style.width = width + 'px';
        contents.style.height = (height - offset) + 'px';
    
        boxdiv.contents = contents;
        boxdiv.appendChild(contents);
    
        move_box(an, boxdiv);
    
        if (contents.contentWindow)
            contents.contentWindow.document.location.replace(
                href);
        else
            contents.src = href;
    
        // The script has successfully shown the box,
        // prevent hyperlink navigation.
        return false;
    }
    

     

    I want to change    boxdiv.style.height = '100%';  so that it is the same size as the contents within it.

     

    at the moment its the size as the actual page which is not what I want.

     

     

    any ideas?

  11. Here is the store,

            a php script accesses an external script on my server using  file_get_contents().

    the session number is passed threw $_GET data, so an example would be:

     

    file_get_contents('http://domain.com/test.php?sid=123123123123123123');

     

    When I type url into my browser and enter the session number manually every thing runs peachy.

     

    However when i have the script do it all the session vars do not load.

     

     

    is there a limit on how many scripts can access one session at a time?? and is there a way around this?

     

     

    thanks in advance.

  12. After Doing some research,

     

    I found that i can use text-justify: distribute; in the css to get what i needed.

     

    even though a lot of sites recommend this, firefox keeps seeing it as an error.

     

    has any one heard of this??

  13. wont really work with the design

     

    basically i want the M in members and the P in products to start at the left corner of the black box under them

     

    and the S in members and PRODUCTS to end at the right corner of the box under them.

     

     

    here is the code

     

    basicly i want the

     

    html

    	<div class="side_bar">
    		<div class='bgside'>
    			<span class='title'>
    				MEMBERS
    			</span>
    			<div class='right_content'>
    				E-MAIL:<br><input type='text' size='15' maxlength='25'><br>
    				PASSWORD:<br><input type='password' size='15' maxlength='25'>
    			</div>
    		</div>
    
    		<div class='bgside'>
    			<span class='title'>
    				PRODUCTS
    			</span>
    			<div class='right_content'>
    				Games
    				Tools
    			</div>
    		</div>
    
    	</div>
    

     

    css

    .side_bar{
       position: relative;
       float: right;
       width: 150px;
       min-height: 800px;
       background: fixed url(../images/bg/side_bg.png);
    }
    
    .side_bar .bgside{
       background: #f3a048;
       width: auto;
       margin: 5px 5px 5px 5px;
    }
    
    .side_bar .bgside span.title{
       min-height: 20px;
       background: transparent;
       text-align: justify;
       letter-spacing: 
       margin: 0px 5px 0px 5px;
    }
    
    .side_bar .bgside .right_content{
       background: #000000;
       width: auto;
       height: auto;
       margin: 0px 10px 10px 10px;
       border-bottom:10px solid #f3a048;
       color: #ffffff;
       font-size: 10px;
       text-align: left;
    }
    

     

    im trying to find a js script that can ajust the character spacing.

  14. the div is set to 150px,

    so when the screen resizes the div stays the same.

     

    its a menu bar, so I'm going to use this class for each item.

    I just want the first and last letter of each item to line up horizontally

     

  15. I want to make a title that justifies its self to the width of a div,

     

    I tried using 'text-align: justify;'

    the only problem is that when the title is only one word long it dons't spread its self out.

     

    is there a setting i can use to change that??

  16. this is what I did,

    I'm sure there is a way easier way of doing this,

    if any one knows let me know

     

    css

    .header{
       position: relative;
       z-index: 0;
       border-bottom: 10px solid #f3a048;
       float: none;
       width: 100%;
       height: 135px;
       background-color: #000000;
       overflow: visible;
    }
    
    .header .col{
       background-color: transparent;
       position: relative;
       float: left;
       text-align: inherit;
       height: 100%;
       width: 50%;
       border: 0px;
       z-index: 1;
    }
    
    .header .col .filler_left{
       position:relative;
       background-color: transparent;
       float: right;
       height: 100%;
       width: 308px;
       border: 0px;
       z-index: 0;
    }
    
    .header .col .content_left{
          float: right;
          text-align: right;
          color: #f3a048;
    }
    
    .header  .col .content_left a{
          color: #f3a048;
    }
    
    .header .col .filler_right{
       position:relative;
       background-color: transparent;
       float: left;
       height: 100%;
       width: 308px;
       border: 0px;
       z-index: 0;
    }
    
    .header .col .content_right{
          float: left;
          text-align: left;
          color:#f3a048;
          z-index: 0;
    }
    
    .header  .col .content_right a{
          color:#f3a048;
    }
    
    .header .col-dock{
       background-color: transparent;
       position: relative;
       border: 0px;
       width: 616px;
       height: 100%;
       margin-left: auto;
       margin-right: auto;
       z-index: 2;
       text-align: center;
    }
    

     

    html

    <div class="header">
    	<div class='col'>
    		<div class='filler_left'></div>
    		<div class='content_left'>
    			<img src='images/logo.png'>
    		</div>
    	</div>
    	<div class='col'>
    		<div class='filler_right'></div>
    		<div class='content_right'>
    			Search: <input type='text' size='15'></input><br>
    			<a href='login.php'>Login</a> / <a href='reg.php'>register</a>
    		</div>
    	</div>
    
    	<div class='col-dock'>	
    	</div>
    </div>
    
    

  17. this is what i want

     

    fixed div

    ____\/_______________________________________

    |__________________________________________  |

    ||  liquid div    |  fixed div (165px )      |liquid div        |  |

    ||                      |                  wide          |                      |  |

    ||                      |                                  |                      |  |

    ||                      |                                  |                      |  |

    |__________________________________________  |

    |___________________________________________|

     

    this is my css

     

    css

    .header{
       position: relative;
       border-bottom: 10px solid #f3a048;
       float: none;
       width: 100%;
       height: 135px;
       background-color: transparent;
       overflow: visible;
    }
    
    .col-logo{
       background: #fff0f0;
       position: relative;
       float: left;
       text-align:center;
       height: 100%;
       border: 0px;
    }
    
    
    .header .col-dock{
       background: #ffffff;
       position: relative;
       float: left;
       text-align: center;
       width: 615px;
       height: 100%;
       border: 0px;
    }
    
    .header .col-right{
       background: orange;
       position: relative;
       float: right;
       text-align: center;
       height: 100%;
       border: 0px;   
    }
    

     

    html

    <div class="header">
    
    	<div class='col-right' id='links'>
    		Search: <input type='text' size='15'></input><br>
    		<a href='login.php'>Login</a> / <a href='reg.php'>register</a>
    	</div>
    
    	<div class='col-logo'><img src='images/logo.png'></div>
    
    
    	<div class='col-dock'>	
    <br>
    	 </div>
    
    
    </div>
    

     

     

     

    thanks in advance

  18. function subdir($parent=NULL, $child=NULL){
      $return = TRUE;
    
      if(is_null($parent) && is_null($child)){
        $return = FALSE;
      }
    
      $child = str_replace('\\', '/', $child);
      $parent = str_replace('\\', '/', $parent);
    
      if(strpos($child, '/..') !== FALSE) {
         $return = FALSE;
      }
    
      RETURN $return;
    
    }
    

     

    I found this code at http://stackoverflow.com/questions/1628699/test-if-a-directory-is-a-sub-directory-of-another-folder

  19. I'm working on a php script to upload files in to a set directory.

    the user can select to upload into the "upload" directory or any of its subdirectories.

    at the moment the user is able to `trick` the script into uploading a file into a lower directory by typing in "upload/../../" as the upload directory

     

    I want to know if there is any way to verify  the destination directory to make sure it is higher then the set directory.

    Or use php.ini to restrict the directory allowed to upload

     

    thanks in advance

×
×
  • 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.