Jump to content

p2grace

Members
  • Posts

    1,024
  • Joined

  • Last visited

    Never

Posts posted by p2grace

  1. Which part are you having trouble with?  Basically what you would do is upon paying for the one-month subscription, the system would generate the password using an md5 hash of some sort, and then storing that in the database along with an expiration date.  When that user tries to access the page check to see if the password exists, and if it does if the current date is less than or equal to the expiration date.  If it is let them view the page.

  2. try this:

     

    mysql_query("INSERT INTO `gallery_photos` (`photo_filename`, `photo_caption`, `photo_category` ) VALUES ('0', '" . $photo_captions[$counter] . "', '" . $_POST['category'] . "')");
    

     

    The extra ) was after the first $counter variable

  3.  

    Try this:

     

    <?php
    SELECT * FROM v2followups WHERE store='11' AND ((DATE_FORMAT(FROM_UNIXTIME(`day15`), '%Y/%m/%d') = '2008/05/16' AND day15status != 'c') OR (DATE_FORMAT(FROM_UNIXTIME(`day45`), '%Y/%m/%d') = '2008/05/16' AND day45status != 'c') OR (DATE_FORMAT(FROM_UNIXTIME(`day90`), '%Y/%m/%d') = '2008/05/16' AND day90status != 'c')) AND cbtype='f'
    ?>
    

  4. Need a bit more information.  What do you mean you would like to select between the two?  You'd receive two results back on the search query for the last name, so selecting between the two would just be selecting one of the two results returned.  Can you give us more detail of how exactly you'd like to use the results?

     

    Thanks

  5. Sessions do expire, the lifetime is set in the php.ini file.  Try adding this to your script right before you start the sessions, if it doesn't work you'll need to edit your php.ini file.

     

    <?php
    ini_set('session.cookie_lifetime', 0);
    ini_set('session.cache_expire', 0);
    
    session_start();
    header("Cache-control: private");
    ?>
    

  6. Try it in both queries

     

    <?php
    function recruiters() {		
    
    	global $skin, $members, $db;
    
    	$users = $members->fetch_rows();
    	$data = '';
    
    	foreach($users as $user) {
    
    		$total_recruits = $db->result($db->query('SELECT COUNT(*) FROM `members` WHERE `recruiter` = "' . $user['id'] . '" ORDER BY `recruiter` DESC'));
    		$active_recruits = $db->result($db->query('SELECT COUNT(*) FROM `members` WHERE `recruiter` = "' . $user['id'] . '" AND `status` <> (`status` | 64 ) ORDER BY `recruiter` DESC') );
    
    		$ratio = $active_recruits / $total_recruits;
    
    		if($total_recruits > 0 and $ratio > 0) {
    
    			$total_recruits = number_format($total_recruits, 0, '.', ',') . '%';
    			$active_recruits = number_format($active_recruits, 0, '.', ',');
    			$ratio = number_format($ratio * 100, 2, '.', ',');
    
    			$data .= '<tr><td class="normal">' . $members->link($user['id']) . '</td><td class="normal">' . $total_recruits . '</td><td class="normal">' . $active_recruits . '</td><td class="normal">' . $ratio . '</td></tr>';
    
    		}
      
    	}
    
    	return $skin->form_start('Top Recruiters') .
    	'<table style="width:400px"><tr><td class="normal"><b>Member</b></td><td class="normal"><b>Total Recruits</b></td><td class="normal">Active Recruits</td><td class="normal">Percentage Active</td></tr>'
    	. $data		
    	. '</table>' . $skin->form_end();
    
    }
    
    }
    ?>
    

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