Jump to content

Iank1968

Members
  • Posts

    65
  • Joined

  • Last visited

    Never

Posts posted by Iank1968

  1. Ian getting a Parse error: syntax error, unexpected T_ELSE in /home/ianapps/public_html/globetrotters/common.php on line 804

     

    function HandleOutstandingSendSuccesses ($user) {
      global $logsend_table;
      global $facebook;
      global $db_to_desc_send;
      //$rx_money = false;
      $result = Query ("SELECT id,uid_from,what,amt FROM $logsend_table WHERE uid_to=$user and notified='0' and trade=0");
    $num_rows = mysql_num_rows ($result);
    for ($i=0; $i<$num_rows; $i++) {
     $uid_from = mysql_result ($result, $i, "uid_from");
     $what = mysql_result ($result, $i, "what");
     $amt = mysql_result ($result, $i, "amt");
     $id = mysql_result ($result, $i, "id");
    try {
     $info = $facebook->api_client->users_getInfo ($uid_from, "name");
      } catch (FacebookRestClientException $e) {
      $info = "";
      }
      //$persons_name = $info[0]['name'];
      $persons_name = isset ($info[0]['name']) && $info[0]['name'] 
                 != "" ? $info[0]['name'] : "Someone";
                if ($what == "money") {
       //$rx_money = true;
       $amt_f = sprintf ("%.2f", $amt/100);
      	 ?>
          <fb:success message="WOW!!!!  <?=$persons_name;?> just sent you $<?=$amt_f;?> airfarebucks!" /> 
      	 <?
      }
      else {
       $prize_f = $db_to_desc_send[$what];
       ?>
          <fb:success message="WOW!!!! <?=$persons_name;?> just sent you <?=$amt;?> of the following prize: <?=$prize_f;?>" /> 
       <?
      }
      Query ("UPDATE $logsend_table SET notified=1 where id=$id");
    }
    }
    (line 804)  else {  <-------------------------***************line 804***********************
       $prize_f = $db_to_desc_send[$what];
       }
       ?>
          //$result_new = Query ("UPDATE $logsend_table SET notified='1' where uid_to=$user");
          }
          function HandleCoupons ($user) {
      global $users_table;
      $result = Query ("SELECT sum(coupon1) FROM $users_table WHERE uid=$user and coupon1_notified='0'");
      if (mysql_result ($result, 0) > 0) { 
     $result_new = Query ("UPDATE $users_table SET coupon1_notified='1' where uid=$user");
    }
    return mysql_result ($result, 0);
    }
    

     

    Can anyone see why I would be getting that error?

     

    Thanks

  2. ok I am gonna post from line 1 to just past the error.

     

    <?php
    require 'settings.php';
    $username = "ianapps";
    $password = "wdLlGQbZlswP";
    $hostname = "localhost"; 
    $conn = mysql_connect ($dbhost, $dbuser, $dbpass);
    $sel = mysql_select_db ($dbname, $conn);
    if (!$sel || !$conn) {  exit; 
    }
    function Query ($q) {
      global $conn;
      $result = mysql_query ($q, $conn);
      if (!$result) {
          }
      return $result;
    }
    function getprizeproperty($fprize)
    {
    }
    function TransferPrize ($from, $to, $prize, $amt) {
      if (GetPrizeProperty ($from, $prize) >= $amt) {
          ChangePrizeProperty ($from, $prize, -$amt, false);
          ChangePrizeProperty ($to, $prize, $amt, false);
          return true;
      }
       return false;
    }
    function TransferMoney ($from, $to, $amt) {
      if (GetMoney ($from) >= $amt*100) {
          AlterMoney ($from, -$amt*100);
          AlterMoney ($to, $amt*100);
          return true;
      }
      return false;
    }
    function IsThereEnough ($uid, $what, $amt) {
      if ($what == 'money') {
        if (GetMoney ($uid) < $amt)
          return false;
      }
      else {
        if (GetPrizeProperty ($uid, $what) < $amt)
          return false;
      }
        return true;
        }
    function LogStealAttempt ($user_from, $user_to, $what, $amt) {
      global $logsendneg_table;
      Query ("INSERT INTO $logsendneg_table SET uid_from=$user_from, uid_to=$user_to, what='$what', amt=$amt");
    }
    function LogSend ($user_from, $user_to, $what, $amt, $trade=0) {
      global $logsend_table;
      Query ("INSERT INTO $logsend_table SET uid_from=$user_from, uid_to=$user_to, what='$what', amt=$amt, trade=$trade");
    }
    function LogTrade ($user_from, $user_to, $tx_what, $tx_amt, $rx_what, $rx_amt) {
      global $logtrade_table;
      Query ("INSERT INTO $logtrade_table SET uid_from=$user_from, uid_to=$user_to, what='$tx_what', amt=$tx_amt, what_req='$rx_what', amt_req=$rx_amt");
    }
    function GetInTrades ($user) {
      global $logtrade_table;
      $result = Query ("SELECT id,unix_timestamp(date) as datets,uid_from,what,amt,what_req,amt_req,auth FROM $logtrade_table WHERE uid_to=$user and hide=0 and auth=0 ORDER by date DESC"); // get trades coming into you
       $i=0;
      while ($row = mysql_fetch_array ($result)) {
        $in[$i]['id'] = $row['id'];
        $in[$i]['date'] = $row['datets'];
        $in[$i]['uid_from'] = $row['uid_from'];
        $in[$i]['what'] = $row['what'];
        $in[$i]['amt'] = $row['amt'];
        $in[$i]['what_req'] = $row['what_req'];
        $in[$i]['amt_req'] = $row['amt_req'];
        $in[$i]['auth'] = $row['auth'];
        $i++;
      }
      return $in;
    }
    function GetInTradesSideBar ($user) {
      global $logtrade_table;
      $result = Query ("SELECT id,unix_timestamp(date) as datets,uid_from,what,amt,what_req,amt_req,auth FROM $logtrade_table WHERE uid_to=$user and hide=0 and auth=0 ORDER by date DESC"); // get trades coming into you
    $i=0;
    if (mysql_num_rows ($result) == 0)
      return "<br/>.";
    $a = '<table>';
      while ($row = mysql_fetch_array ($result)) {
        $u = $row['uid_from'];
        $a .= '<tr><td bgcolor="#eaeaea"><fb:profile-pic uid="'.$u.'"/>  <br/><fb:name uid="'.$u.'"/></td><td bgcolor="#eaeaea">' . date ("F j", $row['datets'] ) . ' - <b><a href="?id=trade">View</a></b></td></tr>';
        $i++;
      }
      $a .= '</table>';
      return $a;
    }
    function GetOutTrades ($user) {
      global $logtrade_table;
      $result = Query ("SELECT id,unix_timestamp(date) as datets,uid_to,what,amt,what_req,amt_req,auth,hide FROM $logtrade_table WHERE uid_from=$user ORDER by date DESC limit 50 "); // get trades coming into you
      $i=0;
      while ($row = mysql_fetch_array ($result)) {
        $out[$i]['id'] = $row['id'];
        $out[$i]['date'] = $row['datets'];
        $out[$i]['uid_to'] = $row['uid_to'];
        $out[$i]['what'] = $row['what'];
        $out[$i]['amt'] = $row['amt'];
        $out[$i]['what_req'] = $row['what_req'];
        $out[$i]['amt_req'] = $row['amt_req'];
        $out[$i]['auth'] = $row['auth'];
        $out[$i]['hide'] = $row['hide'];
        $i++;
      }
      return $out;
    }
    
    // some php
    function ParseInTrades ($data) {
    global $db_to_desc_send;
      if (!count($data))
        return;
      global $facebook;
    }
    
    <table border="0" colspacing="2" colpadding="2">
      <tr> <th width="100"> <h3 class="subtitle">Date</h3> </th> <th width="120"> <h3 class="subtitle">Name</h3> </th> <th width="120"> <h3 class="subtitle">You Get</h3> </th> <th width="120"> <h3 class="subtitle">They want</h3> </th><th width="80"> <h3 class="subtitle">Action</h3> </th>
      </tr>
    

  3. ok I took out <?php ?> and now its saying Parse error: syntax error, unexpected '<' in /home/ianapps/public_html/globetrotters/common.php on line 118

     

    line 118 - 120

    <table border="0" colspacing="2" colpadding="2">
      <tr> <th width="100"> <h3 class="subtitle">Date</h3> </th> <th width="120"> <h3 class="subtitle">Name</h3> </th> <th width="120"> <h3 class="subtitle">You Get</h3> </th> <th width="120"> <h3 class="subtitle">They want</h3> </th><th width="80"> <h3 class="subtitle">Action</h3> </th>
      </tr>
    

  4. this is on my common.php file, its 2000 lines long, dont think you want it all do you? I will give you a few lines before that function. I got rid of that bracket and still got the parse error

     

    function GetInTradesSideBar ($user) {
      global $logtrade_table;
      $result = Query ("SELECT id,unix_timestamp(date) as datets,uid_from,what,amt,what_req,amt_req,auth FROM $logtrade_table WHERE uid_to=$user and hide=0 and auth=0 ORDER by date DESC"); // get trades coming into you
    $i=0;
    if (mysql_num_rows ($result) == 0)
      return "<br/>.";
    $a = '<table>';
      while ($row = mysql_fetch_array ($result)) {
        $u = $row['uid_from'];
        $a .= '<tr><td bgcolor="#eaeaea"><fb:profile-pic uid="'.$u.'"/>  <br/><fb:name uid="'.$u.'"/></td><td bgcolor="#eaeaea">' . date ("F j", $row['datets'] ) . ' - <b><a href="?id=trade">View</a></b></td></tr>';
        $i++;
      }
      $a .= '</table>';
      return $a;
    }
    function GetOutTrades ($user) {
      global $logtrade_table;
      $result = Query ("SELECT id,unix_timestamp(date) as datets,uid_to,what,amt,what_req,amt_req,auth,hide FROM $logtrade_table WHERE uid_from=$user ORDER by date DESC limit 50 "); // get trades coming into you
      $i=0;
      while ($row = mysql_fetch_array ($result)) {
        $out[$i]['id'] = $row['id'];
        $out[$i]['date'] = $row['datets'];
        $out[$i]['uid_to'] = $row['uid_to'];
        $out[$i]['what'] = $row['what'];
        $out[$i]['amt'] = $row['amt'];
        $out[$i]['what_req'] = $row['what_req'];
        $out[$i]['amt_req'] = $row['amt_req'];
        $out[$i]['auth'] = $row['auth'];
        $out[$i]['hide'] = $row['hide'];
        $i++;
      }
      return $out;
    }
    <?php
    // some php
    function ParseInTrades ($data) {
    global $db_to_desc_send;
      if (!count($data))
        return;
      global $facebook;
    }
    ?>
    <table border="0" colspacing="2" colpadding="2">
      <tr> <th width="100"> <h3 class="subtitle">Date</h3> </th> <th width="120"> <h3 class="subtitle">Name</h3> </th> <th width="120"> <h3 class="subtitle">You Get</h3> </th> <th width="120"> <h3 class="subtitle">They want</h3> </th><th width="80"> <h3 class="subtitle">Action</h3> </th>
      </tr>
    

     

    line 109 is <?php

  5. Well I did as you said and I still get the same error. Its like it doesnt like <? or <?php

     

    <?php
    // some php
    }
    function ParseInTrades ($data) {
    global $db_to_desc_send;
      if (!count($data))
        return;
      global $facebook;
    }
    ?>
      <table border="0" colspacing="2" colpadding="2">
      <tr> <th width="100"> <h3 class="subtitle">Date</h3> </th> <th width="120"> <h3 class="subtitle">Name</h3> </th> <th width="120"> <h3 class="subtitle">You Get</h3> </th> <th width="120"> <h3 class="subtitle">They want</h3> </th><th width="80"> <h3 class="subtitle">Action</h3> </th>
      </tr>
    

     

     

  6. Well that didnt work, no I get that error in line 109 which is <?php

     

    heres the code now

    <?php
    //some php
    function ParseInTrades ($data) {
    global $db_to_desc_send;
      if (!count($data))
        return;
      global $facebook;
    }
    <?
      <table border="0" colspacing="2" colpadding="2">
      <tr> <th width="100"> <h3 class="subtitle">Date</h3> </th> <th width="120"> <h3 class="subtitle">Name</h3> </th> <th width="120"> <h3 class="subtitle">You Get</h3> </th> <th width="120"> <h3 class="subtitle">They want</h3> </th><th width="80"> <h3 class="subtitle">Action</h3> </th> 
      </tr>
    <?php
    ?>
    

  7. I get this error everytime I try to access the landmarks page:

     

    Parse error: syntax error, unexpected '<' in /home/ianapps/public_html/globetrotters/common.php on line 114

     

    114 is <?

     

    Here is the code

    <?
      <table border="0" colspacing="2" colpadding="2">
      <tr> <th width="100"> <h3 class="subtitle">Date</h3> </th> <th width="120"> <h3 class="subtitle">Name</h3> </th> <th width="120"> <h3 class="subtitle">You Get</h3> </th> <th width="120"> <h3 class="subtitle">They want</h3> </th><th width="80"> <h3 class="subtitle">Action</h3> </th> 
      </tr>
    ?>
    

     

    I cant figure out whats wrong.

  8. Hey there,

     

    I want to create an autoroller for my game using javascript. I am having a real hard time with the code and would like to ask for some help from anyone who would like to help. What the autoroller does is almost the same as an autoclicker.

     

    I would appreciate any help I can get please.

     

    Thanks

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