Jump to content

laflair13

Members
  • Posts

    86
  • Joined

  • Last visited

Everything posted by laflair13

  1. I believe I got it working. I appreciate all the help.
  2. And thats the login.php page correct? Maybe this will help. I have this page http://wolphewebdesign.com/Clients/Research/index.html I want members to be able to login using the form on the right, and be taken to the members area.
  3. So I would have to put that code on all the pages inside the /members/ directory?
  4. Hey all, I am trying to put a login form on the front pages (index, contact us, about us) of my site. I want the members to put in username and pass, and when they click submit, it takes them to the /members/ area of the site. Right now this is how I have the form. <form method="POST" action="login.php"> <input type="text" name="username"> <input type="password" name="password"> <input type="submit" value="Login"> </form> I have this, but the members area consist of several pages and not just on location. if ($_SESSION['authorized'] != true) { header("Location: login_form.php"); exit; } Finally, I am going to create a login.php page that has this in it. $select_user = mysql_query('select * from users where username = "' . $_POST['username'] . '" and password = "' . md5($_POST['password'] . '"')); if (mysql_num_rows($select_user) != 0) { session_start(); session_register('authorized'); $_SESSION['authorized'] = true; header("Location: protected_content.php"); exit; } else { header("Location: login_form.php"); exit; } So My questions are, How can I make it so they can access the entire /members/ area (directory) and what would I put in the database 'members' when I create it. All members are going to use the same username and pass. So there is only need for 1 query for username and 1 for password. I appreciate anyone help in advance.
  5. I just installed a new theme on my wordpress blog seen below http://latestphonecases.com/ As you can see I am getting an error and have no clue why. The error I am getting is Warning: implode() [function.implode]: Invalid arguments passed in /home/ladeda16/public_html/latestphonecases.com/wp-content/themes/Organic Portfolio White v1.2.2/header.php on line 74 Here is Line 74 <?php wp_list_categories('depth=4&title_li=&sort_column=menu_order&include='.implode(',', $include_categories)); ?></ul> And here is the entire header.php <!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" <?php language_attributes(); ?>> <head profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <meta name="distribution" content="global" /> <meta name="robots" content="follow, all" /> <meta name="language" content="en" /> <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' :'; } ?> <?php bloginfo('name'); ?></title> <link rel="Shortcut Icon" href="<?php echo bloginfo('template_url'); ?>/images/favicon.ico" type="image/x-icon" /> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?> <?php wp_enqueue_script("jquery"); ?> <?php wp_head(); ?> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/superfish/superfish.js"></script> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/superfish/hoverIntent.js"></script> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.flow.1.1.js"></script> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/iepngfix_tilebg.js"></script> <!--IE6 Fix--> <style type="text/css"> img, div, a, input, body, span { behavior: url(<?php bloginfo('template_url'); ?>/images/iepngfix.htc); } </style> <script type="text/javascript"> var $j = jQuery.noConflict(); $j(function() { $j("div#controller").jFlow({ slides: "#slides", width: "960px", height: "480px", timer: <?php echo ot_option('slider_interval'); ?>, duration: 400 }); }); </script> <script type="text/javascript"> $j(document).ready(function() { $j('ul.ot-menu').superfish(); }); </script> </head> <body> <div id="wrap"> <div id="header"> <div class="headercenter"> <p id="title"><a href="<?php echo get_option('home'); ?>/" title="Home"><?php bloginfo('name'); ?></a></p> </div> </div> <div id="navbar"> <div id="nav"> <div id="navbarleft"> <ul class="ot-menu"><li<?php if (is_home()) { echo " class=\"current_page_item\""; }?>><a href="<?php echo get_settings('home'); ?>"><?php _e("Home", 'organicthemes'); ?></a></li> <?php $include_categories = ot_option('include_categories'); ?> <?php wp_list_categories('depth=4&title_li=&sort_column=menu_order&include='.implode(',', $include_categories)); ?></ul> </div> <div id="navbarright"> <ul class="ot-menu"> <?php $include_pages = ot_option('include_pages'); ?> <?php wp_list_pages('title_li=&sort_column=menu_order&include='.implode(',', $include_pages)); ?> </ul> </div> </div> </div> <div style="clear:both;"></div> I have been searching and playing around for hrs and cannot seem to get it fixed. Any help would be greatly appreciated.
  6. Ok, Here is what I am trying to do I have a scrip that fakes the referrer and here is how it works Basically I want the script to refresh to Site C when it sees a referrer (Site B), But in IE it blanks the ref so it dont refresh to Site C. It stays at Site B Heres what I have so far. <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Site 2</title> </head> <body> <? /*$yoursite = "yoursite.com"; //Your site url without http:// $yoursite2 = "www.yoursite.com"; //Type your domain with www. this time $referer = $_SERVER['HTTP_REFERER']; //Check if browser sends referrer url or not if ($referer == "") { //If not, set referrer as your domain $domain = $yoursite; } else { $domain = parse_url($referer); //If yes, parse referrer } if($domain['host'] == $yoursite || $domain['host'] == $yoursite2) { //Run your dowloading code here normally } else { //The referrer is not your site, we redirect to your home page //exit(); //Stop running the script }*/ $site1 = 'http://souvik.com/test/site1.php';// Enter ur sit1 url here .... $referer = $_SERVER['HTTP_REFERER']; $a=array( 'http://www.google.com/', 'http://www.yahoo.com/', 'http://www.whatismyreferrer.com/'); $site_rand = array_rand($a); // 'one' or 'two' or 'three' //echo $referer; if($referer == $site1) { //echo '<center><h2>Redirecting to Site 3 ..... Please Wait</h2></center>'; ?> <script type="text/javascript"> <!-- window.location = "<?echo $a[$site_rand];?>" //--> </script> <!-- <meta http-equiv="refresh" content="2;url='http://www.whatismyreferrer.com'" /> --> <? } else echo '<center><h2>Site 2 Content Here</h2></center>'; ?> </body> </html> I have been working on this for 2 days, but cannot get IE to recognize the referrer. Please any help would be greatly appreciated.
  7. When I try and send a newsletter to my subscribers,. It is showing up as Unknown Sender. Here is part of the code. if ($emailq = mysql_query("SELECT name,email FROM members")) { if (mysql_num_rows($emailq)) { while(list($name,$email)=mysql_fetch_row($emailq)){ mail("$name <{$email}>",$send['subject'],$send['body'], "From: {$_SESSION['sitename']} <{$config['sitemail']}>\nReply-To: {$name} <{$config['sitemail']}>\nContent-type: text/plain\nX-Mailer: PHP/" . phpversion()); $sent.="Sending To $name..........Sent<br />"; I have been at this for hrs now and just cannot seem to get it. Any help would be greatly appreciated. Thanks in advance
  8. Hey all, I have a script that as of now it only allows paypal as the means of payment. I am trying to ad another one (ECSuite.com) as an option of payment. I cannot find anywhere that I can intergrade it into the script. Can anyone help me do this or point me in the direction on how to do it? I looked everywhere on ECsuite for something but couldnt find anything. Here are 2 pages that I think the coding might go. functions.php <? function updateSortOrder($tablename,$sortcolumn,$idcolumn,$idvalue,$newsortno) { $strSQL="select $sortcolumn from $tablename where $idcolumn=".$idvalue; $result=mysql_query($strSQL); $oldsortno=mysql_result($result,0,$sortcolumn); if($newsortno>$oldsortno) $strSQL="update $tablename set $sortcolumn=$sortcolumn-1 where $sortcolumn>$oldsortno AND $sortcolumn<=$newsortno"; else $strSQL="update $tablename set $sortcolumn=$sortcolumn+1 where $sortcolumn<$oldsortno AND $sortcolumn>=$newsortno"; $result=mysql_query($strSQL) or die(mysql_error()); $strSQL="update $tablename set $sortcolumn=$newsortno where $idcolumn=$idvalue"; $result=mysql_query($strSQL) or die(mysql_error()); } function fixSorting($tablename,$sortcolumn,$idcolumn) { $strSQL="select count(*) CNT from $tablename"; $resultM=mysql_query($strSQL) or die(mysql_error().$strSQL); if(mysql_num_rows($resultM)==0) return false; $totalrecords=mysql_result($resultM,0,"CNT"); if($totalrecords==0) return true; $strSQL="select $idcolumn from $tablename order by $sortcolumn"; $resultSort=mysql_query($strSQL) or die(mysql_error().$strSQL); $arrUpdates=array(); $counter=0; while($row=mysql_fetch_assoc($resultSort)) { $counter++; $arrUpdates[]="update $tablename set $sortcolumn=$counter where $idcolumn=".$row[$idcolumn]; } for($i=0;$i<count($arrUpdates);$i++) mysql_query($arrUpdates[$i]) or die(mysql_error()); return true; } function getNewSortNo($tablename,$sortcolumn) { $strSQL="select max($sortcolumn) msortno from $tablename"; $resultM=mysql_query($strSQL) or die(mysql_error().$strSQL); if(mysql_num_rows($resultM)==0) $msortno=1; else $msortno=mysql_result($resultM,0,"msortno")*1+1; return $msortno; } function uploadImage($fieldname,$path,$filename) { if (isset($_FILES[$fieldname]) && $_FILES[$fieldname]['name']!="" ) { $filename = "pickserviceimg" . $pickserviceid . substr( $_FILES[$fieldname]['name'], strrpos ( $_FILES[$fieldname]['name'], ".")); if (!move_uploaded_file($_FILES[$fieldname]['tmp_name'], $path . $filename)) { return ""; } else { // echo ' good upload '; chmod ($path . $filename, 0755); return $filename; } } return ""; } function getCommaSeperatedColumn($strSQL,$column) { $resultCSC=mysql_query($strSQL) or die(mysql_error().$strSQL); $strReturn=""; $strComma=""; while($row=mysql_fetch_assoc($resultCSC)) { $strReturn.=$strComma.$row[$column]; $strComma=","; } if($strReturn=="") return "0"; return $strReturn; } function drawListBoxDB($query,$name,$valcolumn,$displaycolumn,$selected,$additional='',$option='') { $ret="<select name=$name class=textbox $additional>$option"; $rsTemp=mysql_query($query) or die(mysql_error()); while($rowTemp=mysql_fetch_assoc($rsTemp) ) { $strSelected=$rowTemp[$valcolumn]==$selected?"selected":""; $ret.="<option value='$rowTemp[$valcolumn]' $strSelected>$rowTemp[$displaycolumn]</option>"; } $ret.="</select>"; return $ret; } function drawListBoxDB_Function($query,$name,$valcolumn,$function,$selected,$additional='',$option='') { $ret="<select name=$name class=textbox $additional>$option"; $rsTemp=mysql_query($query) or die(mysql_error()); while($rowTemp=mysql_fetch_assoc($rsTemp) ) { $strSelected=$rowTemp[$valcolumn]==$selected?"selected":""; $ret.="<option value='$rowTemp[$valcolumn]' $strSelected>".$function($rowTemp[$valcolumn])."</option>"; } $ret.="</select>"; return $ret; } function getPick($pickid) { $strSQL="select * from tblpicks where pickid=$pickid"; $resultPick=mysql_query($strSQL); if(mysql_num_rows($resultPick)==0) return ""; else return format_date(mysql_result($resultPick,0,"dateadded"))." - ".mysql_result($resultPick,0,"team1").":".mysql_result($resultPick,0,"team2"); } function getMember($memberid) { $strSQL="select * from tblmembers where memberid=$memberid"; $resultPick=mysql_query($strSQL); if(mysql_num_rows($resultPick)==0) return ""; else return mysql_result($resultPick,0,"fname")." ".mysql_result($resultPick,0,"lname")." (".mysql_result($resultPick,0,"login").")"; } function drawListBoxDB2($query,$name,$valcolumn,$displaycolumn1,$displaycolumn2,$selected,$additional='',$option='') { $ret="<select name=$name class=textbox $additional>$option"; $rsTemp=mysql_query($query) or die(mysql_error()); while($rowTemp=mysql_fetch_assoc($rsTemp) ) { $strSelected=$rowTemp[$valcolumn]==$selected?"selected":""; $ret.="<option value='$rowTemp[$valcolumn]' $strSelected>$rowTemp[$displaycolumn1] $rowTemp[$displaycolumn2]</option>"; } $ret.="</select>"; return $ret; } function format_date($strdate) { if($strdate=="0000-00-00" || !$strdate) return NULL; $time=strtotime($strdate,date("Y-m-d")); return date("m/d/Y",$time); } function format_timestamp($timestamp) { $year=substr($timestamp,0,4); $month=substr($timestamp,4,2); $date=substr($timestamp,6,2); $timepart=substr($timestamp,8,2).":".substr($timestamp,10,2).":".substr($timestamp,12,2); //return "$year-$month-$date $timepart"; $datepart=strtotime("$year-$month-$date",date("Y-m-d")); //$timepart=strtotime($timepart,"His"); return date("M d, Y",$datepart)." ".$timepart; } function jsGoURL($destnationurl) { return " <SCRIPT LANGUAGE=javascript> <!-- window.location=\"$destnationurl\"; //--> </SCRIPT> "; } function getresult($status) { $arr=array(0=>"Pending",1=>"Won",2=>"Loss",3=>"Tie"); return $arr[$status]; } function getViewableall($status) { $arr=array(0=>"No",1=>"Yes"); return $arr[$status]; } function getServiceGroups($serviceid) { $strSQL="select * from tblservicegroups,tblgroups where tblservicegroups.groupid=tblgroups.groupid AND serviceid=".$serviceid; $servicegroups=mysql_query($strSQL); $strComma=""; $strGps=""; while($rowgrps=mysql_fetch_array($servicegroups)) { $strGps.= $strComma . $rowgrps[shorttitle]; $strComma=", "; } return $strGps; } function getSortLink($title,$sort,$id) { if($sort==$id) return "<a class='tHead' href='?sort=".($id+1)."'>$title</a>↑"; if($sort==($id+1)) return "<a class='tHead' href='?sort=".$id."'>$title</a>↓"; return "<a class='tHead' href='?sort=".$id."'>$title</a>"; } function smoothdate ($year, $month, $day) { return sprintf ('%04d', $year) . sprintf ('%02d', $month) . sprintf ('%02d', $day); } function date_difference ($first, $second) { $month_lengths = array (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); $retval = FALSE; if ( checkdate($first['month'], $first['day'], $first['year']) && checkdate($second['month'], $second['day'], $second['year']) ) { $start = smoothdate ($first['year'], $first['month'], $first['day']); $target = smoothdate ($second['year'], $second['month'], $second['day']); if ($start <= $target) { $add_year = 0; while (smoothdate ($first['year']+ 1, $first['month'], $first['day']) <= $target) { $add_year++; $first['year']++; } $add_month = 0; while (smoothdate ($first['year'], $first['month'] + 1, $first['day']) <= $target) { $add_month++; $first['month']++; if ($first['month'] > 12) { $first['year']++; $first['month'] = 1; } } $add_day = 0; while (smoothdate ($first['year'], $first['month'], $first['day'] + 1) <= $target) { if (($first['year'] % 100 == 0) && ($first['year'] % 400 == 0)) { $month_lengths[1] = 29; } else { if ($first['year'] % 4 == 0) { $month_lengths[1] = 29; } } $add_day++; $first['day']++; if ($first['day'] > $month_lengths[$first['month'] - 1]) { $first['month']++; $first['day'] = 1; if ($first['month'] > 12) { $first['month'] = 1; } } } $retval = array ('years' => $add_year, 'months' => $add_month, 'days' => $add_day); } } return $retval; } ?> and payconfig.php <? session_start(); require('stts/hit.inc'); include("conn.php"); $item_name = $_REQUEST['item_name']; $item_number = $_REQUEST['item_number']; $payment_amount = $_REQUEST["mc_gross"]; $txn_id = $_REQUEST["txn_id"]; if(substr($item_number, 0, 2) == "op"){ $op_number = substr($item_number, 2); $result = mysql_query("SELECT P.onepick FROM tblmemberservices M, tblpicks P WHERE (M.serviceid * -1)=P.pickid AND M.memberserviceid = $op_number"); } else $result = mysql_query("SELECT S.cost FROM tblmemberservices M, tblservice S WHERE M.serviceid=S.serviceid AND M.memberserviceid = $item_number"); if($row = mysql_fetch_array($result)){ $cost = $row[0]; if($item_name != ""){ $result=mysql_query("SELECT cAmount FROM tbldiscounts WHERE cDiscountName = '$item_name'"); if($row = mysql_fetch_array($result)){ $cDiscount = str_replace("$", "", $row[0]); if(substr($cDiscount, strlen($cDiscount) - 1) == "%"){ $fDiscount = substr($cDiscount, 0, strlen($cDiscount) - 1); $cost = $cost * (1 - ($fDiscount / 100)); } else { $fDiscount = $cDiscount; $cost = $cost - $fDiscount; } } } if($cost < 0) $cost = 0; if($payment_amount >= ($cost - .01)){ if(substr($item_number, 0, 2) == "op") mysql_query("UPDATE tblmemberservices SET subscription = 2, status = 1, txn_id = '$txn_id', paymentmethod = 'PayPal', startdate = NOW() WHERE memberserviceid = $op_number"); else mysql_query("UPDATE tblmemberservices SET subscription = 2, status = 1, txn_id = '$txn_id', paymentmethod = 'PayPal', startdate = NOW() WHERE memberserviceid = $item_number"); print("payment ok"); } else print("no payment1"); } else print("no payment2"); print("SELECT P.onepick FROM tblmemberservices M, tblpicks P WHERE (M.serviceid * -1)=P.pickid AND M.serviceid = ($op_number * -1)"); ?> If anyone has any idea on how to do this, I would very much appreciate the help. I am lost when it comes to adding a payment gateway. If anyone is willing, I have messengers if you can help. MSN - dleflair@bellsouth.net (this is not my email) ICQ - 343207210 AIM - xplicit1324 Yahoo - laflair13 __________________ Thanks in advance David
  9. Hey all, I have this gaming ladder [a href=\"http://www.playbattles.com/\" target=\"_blank\"]PlayBattles[/a] but it is missing some features I would like to have. For example, I would like it to have a match finder for clans to post if they are looking for a war. Also in the staff section I would like for the players to be able to contact the staff instantly using AIM. Is there an easy way to do this? I do not have alot of php knowledge, very basic. An example site of what features I would like to have with mine is [a href=\"http://www.socomarena.com\" target=\"_blank\"]Socom Arena [/a] I appreciate any help you can give me. Maybe some advice or where I can find help and try to do it myself
  10. I am putting together a website for the mother and her business. She wants a contact form so customers can contect her, instead of using an email. I got some coding together but when I submit it the email comes in blank. Can any of ya help me out on this one. Heres a look at the codes. [code]<html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <br><br> <form method="post" action="sendmail.php">   Email: <input name="email" type="text" /><br />   Name:<input type="text" name="name" size="20"><br />   <br />   <input type="submit" /> </form> </body> </html>[/code] & [code]<?   $email = $_REQUEST['email'];   $name = $_REQUEST['name'];   mail( "dleflair@bellsouth.net", "Link Request",     $message, "From: $email" );   header( "Location: <a href="http://www.example.com/thankyou.html" target="_blank">http://www.example.com/thankyou.html</a>" ); ?> [/code] There is only 2 feilds because I wanted to test it first before adding any more options. Like url, how they found her site (refered, search engine, blah, blah) which will be a drop down box. Any help would be greatly appreciated.
×
×
  • 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.