Jump to content

caryhartline

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

caryhartline's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I want to combine one page where someone places a bid and the confirmation of the page so you only have to click "bid" once. I combined two pages into one with the only changes being a replacement of the inputs and button on the template page and a replacement of all includes that say template_bid_php.html to template_item_php.html. Please help figure out if I have any errors. The PHP and the template are attached. Thank you for your help! 18662_.txt 18663_.php
  2. I am cleaning up my website (replace tables with divs and turning all design code in to CSS). I would like to know a couple things. First, I see that register_globals is deprecated, but I still see new blog posts and such saying to keep it. I want to know if I should remove it, how it works, and if I do remove it what should I replace it with. Also, I have code like: '".$SETTINGS['siteurl']."uploaded/".$val["pict_url"]."' and I was wondering whether it can be replaced with Javascript. Please don't call me a noob or tell me to Google it because when it comes to me, Google, and PHP; I'm like a kid in a candy shop and all the candy is filled with dirt.
  3. OK, I found another file that may be involved. There is this code called user_menu.php which takes part in the process of http://www.luvbid.com/user_menu.php and creates an error whether someone is logged in or not. Is there a problem in this code that may be causing this? [attachment deleted by admin]
  4. I think you are talking about this code. <? if(!defined('INCLUDED')) exit("Access denied"); if(!function_exists(MySQLError)) { Function MySQLError($Q) { global $SESSION_NAME, $SESSION_ERROR, $ERR_0001; $SESSION_ERROR = $ERR_001."<br>".$Q."<br>".mysql_error(); $_SESSION["SESSION_ERROR"]=$SESSION_ERROR; print "<SCRIPT LANGUAGE=Javascript>document.location.href='error.php'</SCRIPT>"; return; } } ?> This is from a file called error.inc.php. I think it is included because the file error.php includes this code and requires header.php which includes the file header.php.html that I originally posted.
  5. I have looked all over the Internet for the answer so please critizise on something that is probably dumb. I have this code for the header on my website and it recently started saying: Fatal error: Call to undefined function MySQLError() in /hermes/bosweb/web272/b2720/ipg.caryhartline/themes/default/header.php.html on line 11 This doesn't happen on every page. It only happens when someone logs into their account. Please help! This is the code: <? header( 'Content-type: text/html; charset=\"charset=utf-8\"' ); //iso-8859-1 ?> <? // get balance information $query = "select * from BPLA_users where nick='".$_SESSION['BPLowbidAuction_LOGGED_IN_USERNAME']."'"; $result = @mysql_query($query); $TPL_balance = "00.00"; if(!$result) { MySQLError($query); exit; } else { $USER = mysql_fetch_array($result); $TPL_balance = number_format($USER['balance'], 2, '.', ''); } $is_pre_registration = (isset($_REQUEST['pre_registration']) && ($_REQUEST['pre_registration'] == "1")) ? "1" : ""; #// Build the page width string //$PAGEWIDTH = $SETTINGS['pagewidth']; //if($SETTINGS['pagewidthtype'] == 'perc') $PAGEWIDTH .= "%"; $PAGEWIDTH = "100%"; if ($HTTPS == '1' || $HTTPS == 'on') { $SITEURL = $Https['httpsurl']; $SETTINGS['siteurl'] = $Https['httpsurl']; } else { $SITEURL = $SETTINGS['siteurl']; $SETTINGS['siteurl'] = $SETTINGS['siteurl']; } ?>
  6. there is no error that is actually stated when you use this code, but the page that this code appears on goes blank for some reason. I would like to know why the page is blank when this code is uploaded to the server. <? $NOW = date("YmdHis",mktime(date("H")+$SETTINGS['timecorrection'],date("i"),date("s"),date("m"), date("d"),date("Y"))); ?> <script language="Javascript" type="text/javascript"> function window_open(pagina,titulo,ancho,largo,x,y){ var Ventana= 'toolbar=0,location=0,directories=0,scrollbars=1,screenX='+x+',screenY='+y+',status=0,menubar=0,resizable=0,width='+ancho+',height='+largo; open(pagina,titulo,Ventana); } function makevisible(cur,which){ strength=(which==0)? 8.5 : 0.85; if (cur.style.MozOpacity) { cur.style.MozOpacity=strength; } else if (cur.filters) { cur.filters.alpha.opacity=strength*100; } } </script> <script language="JavaScript" type="text/javascript"> TargetFromte = "05/25/2008 9:00 AM"; BackColor = ""; ForeColor = "#0000CC; font-family: Arial Bold; font-size:38px"; CountActive = true; CountStepper = -1; LeadingZero = true; DisplayFormat = "%%D%%d %%H%%h %%M%%m %%S%%s"; FinishMessage1 = "<?=$MSG_31_0023;?>"; FinishMessage2 = "<?=$MSG_31_0024;?>"; </script> <div> <div> <div> <table width="99%"> <tr> <td><? echo $TPL_title_value ?></td> <td align=center> <font style="font-size:14px; font-weight:bold;"> <? if($auction_type == "1" && $my_closed=="0"){ echo $MSG_WINNER; }elseif(intval($auction_type)>1 && $is_auction_finished === false){ echo $MSG_WINNER; } ?> </font> </td> <td align="right"><? echo $MSG_113 ?>: <? echo $TPL_id_value ?></td> </tr> </table> </div> <div style="margin-left:15px;margin-right:15px;"> <table width=99%> <tr valign=middle style="height:15px;" > <td align=left nowrap> <?=$HOW_MANY_MSG?> </td> <td width="100%"></td> <td nowrap> <? #// If user is not logged don-t show view history if(isset($_SESSION["BPLowbidAuction_LOGGED_IN"])) { if($auction_type == "1"){ if($TPL_BIDS_value) echo $TPL_BIDS_value." | "; }else if($auction_type == "2"){ if($TPL_BIDS_value) echo $TPL_BIDS_value." | "; } } ?> </td> <td nowrap> <a href="<?=$SETTINGS['siteurl']?>friend.php?id=<?=$_GET['id'];?>"> <?=$MSG_106 ?> </a> </td> <? if($_SESSION["BPLowbidAuction_LOGGED_IN"]) { ?> <td nowrap> | <a href="<?=$SETTINGS['siteurl']?>item_watch.php?add=<?=$TPL_id_value?>"> <?=$MSG_5202?> </a> </td> <? } else { ?> <td nowrap> | <a href="<?=$SETTINGS['siteurl']?>user_login.php?"> Login </a></td> <? } if($auction_type == "1" && $my_closed=="1") { ?> <td nowrap style="height:15px;" valign=middle> <a style="height:15px;" href="<?=$SETTINGS['siteurl']?>view_bid_history.php?id=<?=$TPL_id_value?>"> <img alt="Bid History" src="themes/default/img/storico.png" width=110 height=15 border=0> </a></td> <? }elseif(intval($auction_type)>1 && $is_auction_finished) { ?> <td nowrap style="height:15px;" valign=middle> <a style="height:15px;" href="<?=$SETTINGS['siteurl']?>view_bid_history.php?id=<?=$TPL_id_value?>"> <img alt="Bid History" src="themes/default/img/storico.png" width=110 height=15> </a></td> <? } ?> </tr> </table> </div> <br> <div> <table width="100%"> <tr> <td valign="top"> <div style="margin-left:10px;"> <table id="itempagetable" class='table1'> <tr> <td height="100%" colspan="2" valign="top" style="padding-left:10px; padding-right:10px;"> <table width="100%" cellpadding="5"> <tr> <td width="10%" valign="top"> <table> <tr> <td align='center' nowrap> <img src='<?=$SETTINGS['siteurl'].$pict_url;?>' height='100px'> </td> </tr> </table> </td> <td width="60%" valign="top"> <table width="100%" align="center" valign="top"> <tr> <td align="left" valign="top"> <? echo $MSG_611 ?> <font color="#ff3300"><b> <? echo $TPL_nr ?> </b> </font> <? echo $MSG_612 ?> <br /> <? // High bidder ?> <table width="100%" height='70px' cellpadding="1" > <!-- auction type --> <!-- higher bidder --> <? if ( $high_bidder_id ) { ?> <tr> <td width='50%' style="leftpan" valign="top"> <?=$MSG_117?>: </td> <td> <?=$TPL_hight_bidder_id?> <?=$TPL_bidder_rate?> <?=$TPL_bidder_rate_radio?> <br><?=$MSG_25_0200.$TPL_bidder_feedbacks?> <br><a href="<?=$SETTINGS['siteurl']?>active_auctions.php?user_id=<? echo $userid?>"><? echo $MSG_213 ?></a> <? if($BIDDERHASABOUTME) { echo "<a href=".$SETTINGS['siteurl']."useraboutme.php?id=$BIDDERHASABOUTME><IMG ALIGN=MIDDLE SRC=".$SETTINGS['siteurl']."images/aboutme.gif BORDER=0></a>"; } ?> <?=$TPL_bidder_trusted?> </td> </tr> <? } ?> <!-- ** Number of bids --> <? if($ITEM['bn_only']=='n'){ ?> <tr> <td width="50%" align="left"><?=$MSG_119 ?>: </td> <td align="left"><?=$TPL_num_bids_value ?> <? if($TPL_BIDS_value) echo "( ".$TPL_BIDS_value." )"; ?> </td> </tr> <!-- ** Starting bid --> <? } ?> <!-- ** Buy now price --> <!-- ** If auction is closed --> <tr> <td width="50%" align="left"><? echo (($item_value != "") ? $MSG_708.": " : ""); ?></td> <td align="left"><?= print_money($item_value) ?></td> </tr> <tr> <td width="50%" align="left"><? echo (($bid_value != "") ? $MSG_33_0011.": " : ""); ?></td> <td align="left"><?=print_money($bid_value) ?></td> </tr> <?php if($auction_type == '1'){ ?> <?php }else if($auction_type == '2'){ ?> <tr> <td width="50%" colspan="2" align="left"> <input type='hidden' id='el_time_0' value='<?=$date_created;?>' /> <input type='hidden' id='el_type_0' value='1' /> <input type='hidden' id='el_sec_0' value='<?=$remained_seconds;?>' /> <span id='el_0' style='font-family:arial;font-size:16px; font-weight:bold; color:#ef0000;'>--|--|--</span> </td> </tr> <?php } ?> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </div> <br /> <table align=center width="97%" height="219" class="gray_img"> <tr> <td height="100%" colspan="2" valign="top" style="padding:0px 13px 0px 13px;"> <h3><? echo $MSG_109 ?></h3> <? echo $description ?> </td> </tr> </table> <a name="image"></a> <div class="table2" style="text-align:center;padding-left:20px;"> <? echo $TPL_pict_url ?> </div> <? if($TPL_show_gallery != "") { ?> <!-- Pictures Gallery --> <div class="tableContent2"> <div > <a name="gallery"></a><? echo $MSG_663 ?> </div> <div class="table2" style="text-align:center"> <? echo $TPL_show_gallery ?> </div> </div> <? } ?> <!-- ==================================================== Questions & Answers ======================================================--> <? if(file_exists('./includes/viewpublicboard.inc.php')){ ?> <a name="qa"></a> <div class="tableContent2"> <div > <a name="gallery"></a><? echo $MSG_926 ?> </div> <div class="tableContent2"> <? include('./includes/viewpublicboard.inc.php'); ?> </div> </div> <? } ?> <br> </td> <td width="2%"> </td> <td width=37% valign="top" align="left"> <table width="340px;" class='table1'> <tr> <td height="100%" colspan="2" valign="top" style="padding-left:10px; padding-right:10px;"> <table width="100%" > <? //if($_SESSION["BPLowbidAuction_LOGGED_IN"]) { echo "<tr><td align='left'>"; if(($auction_type == "1") || ($auction_type == "2")){ if($AuctionIsClosed == false){ drawFormRevolution("play", $BIDFILE); }else{ echo " ".$MSG_31_0023; // was already closed } } //} echo "</td></tr>"; ?> </table> <? //if($TPL_auctions_list_value != ""){ ?> <br><br><br><br> <? //} ?> </td> </tr> </table> <br /> <table width="340px;" class='table1'> <tr> <td height="100%" colspan="2" valign="top" style="padding-left:10px; padding-right:10px;"> <table width=100%> <tr> <td width=100% valign=top> <!--Bid History--> <? if($TPL_auctions_list_value != ""){ ?> <TABLE WIDTH=100% HEIGHT=30> <TR valign=top> <TD WIDTH=30 BGCOLOR="#0000FF"> </TD> <TD WIDTH=80 style="padding-left:3px;" ><? echo $MSG_33_0012;?></TD> <TD WIDTH=30 BGCOLOR="#ffff00"> </TD> <TD WIDTH=80 style="padding-left:3px;"><? echo $MSG_33_0013;?></TD> <TD WIDTH=30 BGCOLOR="#cd0000"> </TD> <TD WIDTH=80 style="padding-left:3px;"><? echo $MSG_33_0014;?></TD> </TR> </TABLE> <? } ?> <table width="200px" cellpadding=4 cellspacing=1 align=center> <tr class=''> <td align=CENTER><?=$MSG_639?></td> </tr> <? if($TPL_auctions_list_value != ""){ ?> <? print $TPL_auctions_list_value; ?> <? } ?> </table> <!-- ================================================--> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <br> </div> </div> </div> <? $total_elements = 1; ?> <script language="JavaScript"> function calcage(secs, num1, num2) { s = ((Math.floor(secs/num1))%num2).toString(); if (LeadingZero && s.length < 2) s = "0" + s; return "<b>" + s + "</b>"; } function CountBack() { <? for($i=0; $i<$total_elements; $i++){ echo "myTimeArray[".$i."] = myTimeArray[".$i."] + CountStepper;"; } for($i=0; $i<$total_elements; $i++){ echo "secs = myTimeArray[".$i."];"; echo "DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,1000000));"; echo "DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs,3600,24));"; echo "DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs,60,60));"; echo "DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60));"; echo "if(secs < 0){ if(document.getElementById('el_type_".$i."').value == '1'){ document.getElementById('el_".$i."').innerHTML = FinishMessage1; }else{ document.getElementById('el_".$i."').innerHTML = FinishMessage2;"; //if(!$TPL_is_auction_started[$i]){ echo "setTimeout(\"document.location.href = 'index.php';\",5000);"; } echo " }"; echo "}else{"; echo " document.getElementById('el_".$i."').innerHTML = DisplayStr;"; echo "}"; } ?> if (CountActive) setTimeout("CountBack()", SetTimeOutPeriod); } function putspan(backcolor, forecolor, id) { document.write("<span id='"+ id +"' style='background-color:" + backcolor + "; color:" + forecolor + "'></span>"); } if (typeof(BackColor)=="undefined") BackColor = "white"; if (typeof(ForeColor)=="undefined") ForeColor= "black"; if (typeof(TargetDate)=="undefined") TargetDate = "12/31/2020 5:00 AM"; if (typeof(DisplayFormat)=="undefined") DisplayFormat = "%%D%%d, %%H%%h, %%M%%m, %%S%%s."; if (typeof(CountActive)=="undefined") CountActive = true; if (typeof(FinishMessage)=="undefined") FinishMessage = ""; if (typeof(CountStepper)!="number") CountStepper = -1; if (typeof(LeadingZero)=="undefined") LeadingZero = true; CountStepper = Math.ceil(CountStepper); if (CountStepper == 0) CountActive = false; var SetTimeOutPeriod = (Math.abs(CountStepper)-1)*1000 + 990; var myTimeArray = new Array(); <?php if($auction_type == '2'){ ?> <? for($i=0; $i<$total_elements; $i++){ ?> ddiff=document.getElementById('el_sec_'+<?=$i;?>).value; //myTimeArray[<?=$i;?>] = Math.floor(ddiff.valueOf()/1000); myTimeArray[<?=$i;?>]=Number(ddiff); <? } ?> CountBack(); <? } ?> </script> <? function drawFormRevolution($type, $action) { global $MSG_31_0027,$MSG_33_0020,$MSG_31_0035, $TPL_id_value, $auction_type, $MSG_31_0021,$MSG_33_0015,$MSG_31_0034,$MSG_240,$MSG_241; global $MSG_121, $MSG_30_0208, $TPL_next_bid_value, $TPL_title_value, $TPL_remained_bids, $TPL_id_value, $TPL_category_value; global $MSG_31_0031, $MSG_31_0030, $f5_num; if($type == "signup") { echo "<form name='bid' action='".$action."' method='post'> <table width=100% cellpadding=2> <tr> <td width=65%> <table width=100% cellpadding=2> <tr><td align=left>".$MSG_31_0027."</td></tr> </table> </td> <td valign='center' align='center' class='tema' width='50%'> <input type='hidden' name='id' value='".$TPL_id_value."'> <input type='hidden' name='auction_type' value='".$auction_type."'> <input type='hidden' name='form_type' value='".$type."'> <input type='hidden' name='f5_num' value='".$f5_num."'> <input type='submit' wsrc='themes/default/img/iscriviti.png' id='subbutton' name='subbutton' value='".$MSG_31_0021."' class='button'> </td> </tr> </table> </form>"; }else if($type == "play") { // echo "gggggg".$MSG_31_0027; // Form action URL $action = $SETTINGS['siteurl']; if($auction_type == 1)$action .= "bid_classic.php"; elseif($auction_type == 2)$action .= "bid_classic.php"; //------------------------------------------------------ //play echo " <table width=100%> <tr> <td> <table width=100%> <tr> <td> ".$MSG_31_0034." </td> <td colspan='2'> Bid In Range </td> <tr> <td width='50%'></td> <th align='left' width='25%'> ".$MSG_240." </th> <th align='left' width='25%'> ".$MSG_241." </th> </tr> <tr> <td valign='center' align='left' class='tema'> <form name='bid' action='".$action."' method='post'> <script> $(function() { $( '#slider2' ).slider2({ value:, min: 0.01, max: 100.00, step: 0.01, slide: function( event, ui ) { $( '#amount' ).val( '$' + ui.value ); } }); $( '#amount' ).val( '$' + $( '#slider2' ).slider2( 'value' ) ); }); </script> <div class="slider2"> <p> <input type=text name=bid size=6 id=amount style=border:0; color:#f6931f; font-weight:bold; /> </p> <div id=slider2></div> </div> <script> $(function() { $( '#slider1' ).slider1({ value:, min: 0.01, max: 100.00, step: 0.01, slide: function( event, ui ) { $( '#amount' ).val( '$' + ui.value ); } }); $( '#amount' ).val( '$' + $( '#slider1' ).slider1( 'value' ) ); }); </script> <div class=slider1> <p> <input type=text name=bid size=6 id=amount style=border:0; color:#f6931f; font-weight:bold; /> </p> <div id=slider1></div> </div> <input type='hidden' name='bid_next' value='".$TPL_next_bid_value."'> <input type='hidden' name='seller_id' value='0'> <input type='hidden' name='bid_type' value='simple'> <input type='hidden' name='title' value='".$TPL_title_value."' > <input type='hidden' name='category' value='".$TPL_category_value."' > <input type='hidden' name='id' value='".$TPL_id_value."'> <input type='hidden' name='auction_type' value='".$auction_type."'> <input type='hidden' name='form_type' value='".$type."'> <input type='hidden' name='f5_num' value='".$f5_num."'> <input type=submit id='subbutton' name='subbutton' value='BID' class='button' style='width:70px;'> </td></tr></table> </form> </td> <td valign='center' align='left' class='tema' colspan='2'> <form name='bid_range' action='".$action."' method='post'> <table><tr><td> <input type=text name=bid_from size=6 value='' /></td><td><input type=text name=bid_to size='6' value='' /> </td></tr><tr><td colspan='2'> <input type='hidden' name='bid_next' value='".$TPL_next_bid_value."'> <input type='hidden' name='seller_id' value='0'> <input type='hidden' name='bid_type' value='range'> <input type='hidden' name='title' value='".$TPL_title_value."' > <input type='hidden' name='category' value='".$TPL_category_value."' > <input type='hidden' name='id' value='".$TPL_id_value."'> <input type='hidden' name='t_remained_bids' value='".$remained_bids."'> <input type='hidden' name='auction_type' value='".$auction_type."'> <input type='hidden' name='form_type' value='".$type."'> <input type='hidden' name='f5_num' value='".$f5_num."'> <input type=submit id='subbutton' align='right' name='subbutton' value='BID' class='button' style='width:70px;'> </td></tr></table> </form> </td> </tr> </table> </td> </tr> <tr> <th colspan='2' align='left'> <br/> ".$MSG_33_0020." <ul> <li>1.00 USD -> 100 </li> <br> <li>1,56 Euro -> 156</li> <br> <li>1 Cent USD-> 1</li> </ul> </th> </tr> </table>"; }else if($type == "play_rebuy") { // play rebuy form echo " <table width=100% cellpadding=2 border=1> <tr> <td align='center' width=50%> <form name='bid' action='bid_revolution_rebuy.php' method='post'> <table width=100% cellpadding=2> <tr> <td align='left'>".$MSG_31_0034."<br><input type=text name=bid size=15 value='' /></td> </tr> <tr> <td valign='center' align='left' class='tema'> <input type='hidden' name='bid_next' value='".$TPL_next_bid_value."'> <input type='hidden' name='seller_id' value='0'> <input type='hidden' name='bid_type' value='simple'> <input type='hidden' name='title' value='".$TPL_title_value."' > <input type='hidden' name='category' value='".$TPL_category_value."' > <input type='hidden' name='id' value='".$TPL_id_value."'> <input type='hidden' name='auction_type' value='".$auction_type."'> <input type='hidden' name='form_type' value='".$type."'> <input type='hidden' name='f5_num' value='".$f5_num."'> <input type=submit id='subbutton' name='subbutton' value='".$MSG_31_0035."' class='button'> </td> </tr> </table> </form> </td> <td align='center' width=50%> <form name='bid_range' action='bid_revolution_rebuy.php' method='post'> <table width=100% cellpadding=2> <tr> <td align='left'>Bid In Range <br> ".$MSG_240." <input type=text name=bid_from size=10 value='' /><br/> ".$MSG_241." <input type=text name=bid_to size=10 value='' /> </tr> <tr> <td valign='center' align='left' class='tema'> <input type='hidden' name='bid_next' value='".$TPL_next_bid_value."'> <input type='hidden' name='seller_id' value='0'> <input type='hidden' name='bid_type' value='range'> <input type='hidden' name='title' value='".$TPL_title_value."' > <input type='hidden' name='category' value='".$TPL_category_value."' > <input type='hidden' name='id' value='".$TPL_id_value."'> <input type='hidden' name='auction_type' value='".$auction_type."'> <input type='hidden' name='form_type' value='".$type."'> <input type='hidden' name='f5_num' value='".$f5_num."'> <input type=submit id='subbutton' name='subbutton' value='".$MSG_31_0035."' class='button'> </td> </tr> </table> </form> </td> </tr> <tr> <td colspan='2' align='left'> ".$MSG_33_0020." <ul> <li>1.00 USD -> 100</li> <br> <li>1,56 Euro -> 156</li> <br> <li>1 Cent USD -> 1</li> </ul> </td> </tr> </table>"; } } ?> <table> <tr> <td> You must pay for shipping/handling of the item if you win the item. You may opt to receive a cash amount instead of the prize that will be transferred via Paypal. In order to opt for the cash amount; write an e-mail to support@luvbid.com with your username and the Auction ID of the auction you won. </td> <td> Currently only continental U.S resident may receive items won in auctions. If you are a not a resident of the continental U.S; you will receive a cash prize in the amount of the item that will be transferred electronically via Paypal. </td> </tr> </table> <? include phpa_include("template_user_menu_footer.html"); ?>
  7. I fixed the problem... I have a new problem though. Now I get an error saying: Unknown column 'birthdate' in 'field list' It is the same code, but checkage.inc.php is now defined in a seperate file. What is the problem! D:
  8. I am writing a new registration form. I am getting the error: Fatal error: Call to undefined function CheckAge() in /****/*****/*****/*****/****/register.php on line 129 Thia ia my php file: <? include "./includes/config.inc.php"; include $include_path."countries.inc.php"; include $include_path."checkage.inc.php"; include $include_path."cc.inc.php"; include $include_path."banemails.inc.php"; $is_pre_registration = (isset($_REQUEST['pre_registration']) && $_REQUEST['pre_registration'] == "1") ? "1" : ""; $TIME = mktime(date("H")+$SETTINGS['timecorrection'],date("i"),date("s"),date("m"), date("d"),date("Y")); $NOW = date("YmdHis",$TIME); $NOWB = date("YmdHis",$TIME); // -- if (!isset($_POST['auction_id']) && !isset($_GET['auction_id'])) { $auction_id = $_SESSION["CURRENT_ITEM"]; } else { $_SESSION["CURRENT_ITEM"]=intval($auction_id); } if (empty($_POST['action'])) { $action = "first"; } #// Retrieve users signup settings $query = "SELECT * FROM BPLA_usersettings"; $res_s = @mysql_query($query); if(!$res_s){ MySQLError($query); exit; }else{ $REQUESTED_FIELDS = unserialize(mysql_result($res_s,0,"requested_fields")); $MANDATORY_FIELDS = unserialize(mysql_result($res_s,0,"mandatory_fields")); } if ($_POST['action'] == "first") { if (empty($_POST['accounttype']) && $SETTINGS['accounttype'] == 'sellerbuyer') { $TPL_err = 1; $TPL_errmsg = $MSG_25_0137; } elseif (empty($_POST['TPL_name'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5029; } elseif (empty($_POST['TPL_nick'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5030; } elseif (empty($_POST['TPL_password'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5031; } elseif (empty($_POST['TPL_repeat_password'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5032; } elseif (empty($_POST['TPL_email'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5033; } elseif (empty($_POST['TPL_address'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5034; } elseif (empty($_POST['TPL_city'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5035; } elseif (empty($_POST['TPL_prov'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5036; } elseif (empty($_POST['TPL_country'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5037; } elseif (empty($_POST['TPL_zip'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5038; } elseif (empty($_POST['TPL_phone'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5039; } elseif (empty($_POST['TPL_birthdate'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5040; } else { // -- Explode birthdate into DAY MONTH YEAR if(!empty($_POST[TPL_birthdate])){ $DATE = explode("/", $_POST['TPL_birthdate']); if($SETTINGS[datesformat] == "USA") { $birth_day = $DATE[1]; $birth_month = $DATE[0]; $birth_year = $DATE[2]; } else { $birth_day = $DATE[0]; $birth_month = $DATE[1]; $birth_year = $DATE[2]; } $DATE = "$birth_year$birth_month$birth_day"; }else{ $DATE = 0; } $VALIDCARD = ValidateCC($_POST[TPL_cc]); if ($VALIDCARD != "" && $SETTINGS['userscreditcard'] == 'y' && $Https['https'] == 'yes') { $TPL_err = 1; $TPL_errmsg = $$VALIDCARD; } elseif ((!ereg("^[0-9]{2}$", $_POST['TPL_exp_month']) || !ereg("^[0-9]{2}$", $_POST['TPL_exp_year'])) && $SETTINGS['userscreditcard'] == 'y' && $Https['https'] == 'yes') { $TPL_err = 1; $TPL_errmsg = $ERR_5012; } elseif (empty($_POST['TPL_card_owner']) && $SETTINGS['userscreditcard'] == 'y' && $Https['https'] == 'yes') { $TPL_err = 1; $TPL_errmsg = $ERR_5013; } elseif (empty($_POST['TPL_card_zip']) && $SETTINGS['userscreditcard'] == 'y' && $Https['https'] == 'yes') { $TPL_err = 1; $TPL_errmsg = $ERR_5015; } elseif (strlen($_POST['TPL_nick']) < 6) { $TPL_err = 1; $TPL_errmsg = $ERR_107; } else if (strlen ($_POST['TPL_password']) < 6) { $TPL_err = 1; $TPL_errmsg = $ERR_108; } else if ($_POST['TPL_password'] != $_POST['TPL_repeat_password']) { $TPL_err = 1; $TPL_errmsg = $ERR_109; } else if (strlen($_POST['TPL_email']) < 5) { // Primitive mail check $TPL_err = 1; $TPL_errmsg = $ERR_110; } else if (!ereg("^[0-9]{2}/[0-9]{2}/[0-9]{4}$", $_POST['TPL_birthdate']) && $MANDATORY_FIELDS['birthdate']=='y') { // Birthdate check $TPL_err = 1; $TPL_errmsg = $ERR_043; } elseif (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$", $_POST['TPL_email'])) { $TPL_err = 1; $TPL_errmsg = $ERR_008; } else if (!CheckAge($birth_day, $birth_month, $birth_year) && $MANDATORY_FIELDS['birthdate']=='y') { $TPL_err = 1; $TPL_errmsg = $ERR_113; }elseif(BannedEmail($_POST['TPL_email'],$BANNEDDOMAINS)){ $TPL_err = 1; $TPL_errmsg = $MSG_30_0054; } else { $sql = "SELECT nick FROM BPLA_users WHERE nick=\"" . AddSlashes ($_POST['TPL_nick']) . "\""; $res = mysql_query ($sql); if (mysql_num_rows($res) == 0) { $id = md5(uniqid(rand())); $id = eregi_replace("[a-f]", "", $id); $TPL_id_hidden = $id; $TPL_nick_hidden = $_POST['TPL_nick']; $TPL_password_hidden = $_POST['TPL_password']; $TPL_name_hidden = $_POST['TPL_name']; $TPL_email_hidden = $_POST['TPL_email']; } else { $TPL_err = 1; $TPL_errmsg = $ERR_111; // Selected user already exists } $sql = "SELECT email FROM BPLA_users WHERE email=\"" . AddSlashes ($_POST['TPL_email']) . "\""; $res = mysql_query ($sql); if (mysql_num_rows($res) == 0) { $id = md5(uniqid(rand())); // $id = eregi_replace("[a-f]","",$id); $TPL_id_hidden = $id; $TPL_nick_hidden = $_POST['TPL_nick']; $TPL_password_hidden = $_POST['TPL_password']; $TPL_name_hidden = $_POST['TPL_name']; $TPL_email_hidden = $_POST['TPL_email']; } else { $TPL_err = 1; $TPL_errmsg = $ERR_115; // E-mail already used } if ($TPL_err == 0) { $TODAY = $NOWB; # // ################################################################# # // Users suspended field # // VALUES: # // 9 - sign up fee due # // 8 - no fee due, waiting for user's confirmation # // 1 - suspended by the administrator via admin utility # // $SUSPENDED = 8; if (!empty($_POST[TPL_cc])) { $CC = $_POST[TPL_cc]; } else { $CC = ''; } if($SETTINGS['accounttype'] == 'sellerbuyer') { $selected_accounttype = $_POST['accounttype']; } else { $selected_accounttype = 'unique'; } if($is_pre_registration != ""){ $user_pre_registration = "1"; }else{ $user_pre_registration = "0"; //, is_pre_registration //, ".intval($user_pre_registration)." } if($BPLowbidAuction_TESTMODE == 'yes') { include "header.php"; echo "<strong style='color: red;'>".$ERR_9999."</strong>"; include phpa_include("template_register_php.html"); exit(); } else { $sql = "INSERT INTO BPLA_users (id, nick, password, name, address, city, prov, country, zip, phone, nletter,email, reg_date, rate_sum, rate_num, birthdate,suspended, creditcard,exp_month,exp_year,card_owner,card_zip,accounttype) VALUES (NULL, \"" . Addslashes ($TPL_nick_hidden) . "\", \"" . md5($MD5_PREFIX . Addslashes ($TPL_password_hidden)) . "\", \"" . Addslashes ($TPL_name_hidden) . "\", \"" . AddSlashes ($_POST['TPL_address']) . "\", \"" . AddSlashes ($_POST['TPL_city']) . "\", \"" . AddSlashes ($_POST['TPL_prov']) . "\", \"" . AddSlashes ($_POST['TPL_country']) . "\", \"" . AddSlashes ($_POST['TPL_zip']) . "\", \"" . AddSlashes ($_POST['TPL_phone']) . "\", \"" . (int)($_POST['TPL_nletter']) . "\", \"" . AddSlashes ($_POST['TPL_email']) . "\", '$TODAY', 0, 0, '$DATE', '$SUSPENDED', ENCODE(\"$CC\",\"$MD5_PREFIX\"), '$_POST[TPL_exp_month]','$_POST[TPL_exp_year]','$_POST[TPL_card_owner]','$_POST[TPL_card_zip]',1)"; $res = mysql_query ($sql); if ($res == 0) { $TPL_err = 1; $TPL_errmsg = mysql_error (); //"Error updating users data"; } else { $TPL_id_hidden=mysql_insert_id(); # // =========================================================== # // Added by Gian for IP banning # // Store user IP address in the database # // =========================================================== $query = "INSERT INTO BPLA_usersips VALUES( NULL, ".intval($TPL_id_hidden).", '".$_SERVER["REMOTE_ADDR"]."', 'first','accept')"; $res___ = @mysql_query($query); if (!$res___) { MySQLError($query); exit; } # // =========================================================== /** * Update column users in table BPLA_counters */ $query = "UPDATE BPLA_counters SET inactiveusers=inactiveusers+1"; $counteruser = mysql_query($query); if (!$counteruser) { MySQLError($query); exit; } # // =========================================================== /** * Set up the language of this user in table BPLA_userslanguage */ $language = $SETTINGS['defaultlanguage']; $_SESSION['language'] = $language; $userlanguage = mysql_query("INSERT INTO BPLA_userslanguage VALUES( '".$TPL_id_hidden."', '$language')"); if (!$userlanguage) { MySQLError($query); exit; } # // Send confirmation e-mail message depending on the peyment settings #// and the signup confirmation settings //if ($SETTINGS['signupfee'] != 1) { // if(($SETTINGS['usignupconfirmation'] == 'y' && $SETTINGS['accounttype'] == 'unique') || // (($SETTINGS['sbsignupconfirmation'] == 's' || $SETTINGS['sbsignupconfirmation'] == 'sb') && $_POST['accounttype'] == 'seller') || // (($SETTINGS['sbsignupconfirmation'] == 'b' || $SETTINGS['sbsignupconfirmation'] == 'sb') && $_POST['accounttype'] == 'buyer')) { #Suspend user $query = "UPDATE BPLA_users SET suspended=0,reg_date=reg_date WHERE id=$TPL_id_hidden"; $RES__ = @mysql_query($query); if (!$RES__) { echo "KLSDHD"; //MySQLError($query); exit; } else { # Send e-mail to the user and the admin include $include_path."user_confirmation_needapproval.inc.php"; } // }else{ // include $include_path."user_confirmation.inc.php"; // } //} } } } // if($TPL_err == 0) } } } include "header.php"; if (($action == "first" && count($_POST) == 0) || ($_POST['action'] == "first" && $TPL_err)) { $country = ""; foreach ($countries as $key=>$name) { $country .= "<option value=\"$name\""; if ($name == $_POST['TPL_country']) { $country .= " selected"; } elseif ($SETTINGS['defaultcountry'] == $name && !isset($TPL_err)) { $country .= " selected"; } $country .= ">$name</option>\n"; } include phpa_include("template_register_php.html"); } if ($_POST['action'] == "first" && !$TPL_err) { # // include phpa_include("template_registered_php.html"); } include "footer.php"; $TPL_err = 0; $TPL_errmsg = ""; ?> What's wrong! D:
  9. I can't figure out the problem with my code. This is the error I am receiving... Parse error: syntax error, unexpected T_ELSEIF in /****/****/****/****/****/**** on line 68 This is my code: ----------------------------------------------------------------------------------------------------- <? include "./includes/config.inc.php"; include $include_path."countries.inc.php"; #// If user is not logged in redirect to login page if(!isset($_SESSION["BPLowbidAuction_LOGGED_IN"])) { Header("Location: user_login.php"); exit; } if($_POST['action'] == "update") { #// Check data if ($_POST['TPL_email']) { if (strlen($_POST['TPL_password'])<6 && strlen($_POST['TPL_password']) > 0) { $TPL_err=1; $TPL_errmsg=$ERR_011; } else if (strlen($_POST['TPL_email'])<5) { $TPL_err=1; $TPL_errmsg=$ERR_110; } elseif(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$",$_POST['TPL_email'])) { $TPL_err = 1; $TPL_errmsg = $ERR_008; } $nletter=isset($_POST['TPL_nletter']) ? $_POST['TPL_nletter'] :0; $sql="UPDATE BPLA_users SET email=\"". AddSlashes($_POST['TPL_email']) ."\", reg_date=reg_date" ." , nletter=\"". AddSlashes($_POST['TPL_nletter']); if(strlen($_POST['TPL_password']) > 0) { $sql .= "\", password=\"". md5($MD5_PREFIX.AddSlashes($_POST['TPL_password'])); } $sql .= "\" WHERE nick='".$_SESSION['BPLowbidAuction_LOGGED_IN_USERNAME']."'"; $res=mysql_query ($sql); //$query = "select * from BPLA_users where nick='".$_SESSION['BPLowbidAuction_LOGGED_IN_USERNAME']."'"; //$result = @mysql_query($query); //if(!$result) { // MySQLError($query); // exit; //} else { // $USER = mysql_fetch_array($result); // $TPL_nick = $USER['nick']; // $TPL_email = $USER['email'];; // $TPL_nletter = $USER['nletter']; // } //} // #// Redirect user to his/her admin page $TMP_MSG = $MSG_183; $_SESSION["TMP_MSG"]=$TMP_MSG; /*Header("Location: user_menu.php"); exit; include "header.php"; include "templates/template_updated.html"; */ //include "header.php"; //include phpa_include("template_change_details_php.html"); } else { $TPL_err=1; $TPL_errmsg=$ERR_112; elseif(($_POST['action'] != "update" || $TPL_errmsg !=1)) { //#// Retrieve user's data //$query = "select * from BPLA_users where nick='".$_SESSION['BPLowbidAuction_LOGGED_IN_USERNAME']."'"; //$result = @mysql_query($query); //if(!$result) { // MySQLError($query); // exit; //} else { // $USER = mysql_fetch_array($result); // $TPL_nick = $USER['nick']; // $TPL_email = $USER['email']; // $TPL_nletter = $USER['nletter']; //} //echo "111 "; //include "header.php"; //include phpa_include("template_change_details_php.html"); } if($TPL_err==1) { //include "header.php"; //include phpa_include("template_change_details_php.html"); } #// Retrieve user's data $query = "select * from BPLA_users where nick='".$_SESSION['BPLowbidAuction_LOGGED_IN_USERNAME']."'"; $result = @mysql_query($query); if(!$result) { MySQLError($query); exit; } else { $USER = mysql_fetch_array($result); $TPL_nick = $USER['nick']; $TPL_email = $USER['email']; $TPL_nletter = $USER['nletter']; } include "header.php"; include phpa_include("template_change_details_php.html"); include "footer.php"; $TPL_err=0; $TPL_errmsg=""; ?>
×
×
  • 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.