lostyazilim
tr.link

Parse error: syntax error, unexpected '} hatası

7 Mesajlar 1.214 Okunma
lstbozum
tr.link

mhtsnck mhtsnck Üyeliği Durdurulmuş Banlı Kullanıcı
  • Üyelik 10.01.2012
  • Yaş/Cinsiyet 31 / E
  • Meslek Öğretmenlik
  • Konum Samsun
  • Ad Soyad ** **
  • Mesajlar 40
  • Beğeniler 49 / 30
  • Ticaret 0, (%0)



Merhaba acaba hata nerede tam olarak yardımcı olurmusunuz

if($getitemid >= 0) { } else {
$query1 = sprintf("SELECT a_texture_id, a_texture_row, a_texture_col, a_index, a_name, a_descr FROM %s.t_item WHERE a_index = :item1", $dbs["data"]);
$dbh1 = $db->prepare( $query1 );
$dbh1->execute( array( ':item1' => $getitemid ));
$fetch1 = $dbh1->fetch();
$icon_index1 = $fetch1['a_texture_id'];
$icon_row1 = $fetch1['a_texture_row'];
$icon_col1 = $fetch1['a_texture_col'];
$item_name1 = $fetch1['a_name'];
$item_descr1 = $fetch1['a_descr'];
$item_amount1 = $shop1['a_item1_amount'];
$tpl->Assign('item1' , "$item_name1

Amount: $item_amount1

Item Description:
$item_descr1" );
}}


} else { $tpl->newBlock('market_none'); }}


}
else
{
$tpl->newBlock('error');
$tpl->Assign('msg' , 'Please Login');
}

$tpl->printToScreen();
credit();

} else {
echo"";
}
?>
 

 

wmaraci
reklam

Konyali Konyali furkan.konyali@gmail.com Kullanıcı
  • Üyelik 09.04.2011
  • Yaş/Cinsiyet 30 / E
  • Meslek Front-end Developer
  • Konum İstanbul Anadolu
  • Ad Soyad F** K**
  • Mesajlar 1043
  • Beğeniler 130 / 62
  • Ticaret 5, (%100)
Bir kırlangıç parantezi fazla ya da eksik olduğundan hata veriyor. Kodların tamammını atarsanız daha iyi inceleyebilirim.
 

 

soulmy soulmy WM Aracı Kullanıcı
  • Üyelik 12.06.2012
  • Yaş/Cinsiyet 38 / E
  • Meslek Öğretmen
  • Konum Samsun
  • Ad Soyad O** Y**
  • Mesajlar 1722
  • Beğeniler 398 / 400
  • Ticaret 20, (%100)
308. satırın sonunda }} olan kısmı } bu şekilde yapmalısın. Fazladan bir tane koymuşsun.
 

 

.

mhtsnck mhtsnck Üyeliği Durdurulmuş Banlı Kullanıcı
  • Üyelik 10.01.2012
  • Yaş/Cinsiyet 31 / E
  • Meslek Öğretmenlik
  • Konum Samsun
  • Ad Soyad ** **
  • Mesajlar 40
  • Beğeniler 49 / 30
  • Ticaret 0, (%0)

Konyalı adlı üyeden alıntı

Bir kırlangıç parantezi fazla ya da eksik olduğundan hata veriyor. Kodların tamammını atarsanız daha iyi inceleyebilirim.




// Setting to show any errors
error_reporting(E_ALL);
ini_set('display_errors', '0');


// Session
session_start();

// Template Power
include_once( "Core/TemplatePower.php" );

// TPL To Load For This Page
$tpl = new TemplatePower( "Other/Tpl/market.tpl" );

// Extra TPL Calls
$tpl->assignInclude( "header", "Other/Tpl/header.tpl" );
$tpl->assignInclude( "menu", "Other/Tpl/menu.tpl" );
$tpl->assignInclude( "blocks", "Other/Tpl/blocks.tpl" );
$tpl->assignInclude( "slider", "Other/Tpl/slider.tpl" );
$tpl->prepare();


// Settings
include 'Config/ConSet.php';

// Scripts
include 'Core/Classes.php';
include 'Core/Functions.php';
include 'Core/Posts.php';
include 'Core/Extra.php';


if ($dnsaddy == $_SERVER['HTTP_HOST']) {

if( $User->LoggedIn == true )
{

$userid = $User->ID;

$query = sprintf("SELECT a_paypal_email, a_currency, a_donation_amount1, a_donation_amount2, a_donation_amount3, a_donation_amount4, a_donation_amount5, a_donation_amount6 FROM %s.t_settings", $dbs["site"]);
$dbh = $db->prepare( $query );
$dbh->execute();
while($site_settings1 = $dbh->fetch() )
{
$tpl->Assign('paypalemail' , $site_settings1['a_paypal_email'] );
$tpl->Assign('currency' , $site_settings1['a_currency'] );
$tpl->Assign('donation1' , $site_settings1['a_donation_amount1'] );
$tpl->Assign('donation2' , $site_settings1['a_donation_amount2'] );
$tpl->Assign('donation3' , $site_settings1['a_donation_amount3'] );
$tpl->Assign('donation4' , $site_settings1['a_donation_amount4'] );
$tpl->Assign('donation5' , $site_settings1['a_donation_amount5'] );
$tpl->Assign('donation6' , $site_settings1['a_donation_amount6'] );
}







if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'donate' )
{
$tpl->newBlock('donate');
}

if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'store' )
{
$tpl->newBlock('online_shop');
$tpl->newBlock('store');

}

if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'paypal' )
{
$tpl->newBlock('paypal');
}

if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'paysafecard' )
{
$tpl->newBlock('paysafecard');
}

if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'donate_submitted' )
{
$tpl->newBlock('donate_submitted');
$query = sprintf("SELECT a_donation_amount1, a_donation_amount2, a_donation_amount3, a_donation_amount4, a_donation_amount5, a_donation_amount6 FROM %s.t_settings", $dbs["site"]);
$dbh = $db->prepare( $query );
$dbh->execute();
while($site_settings1 = $dbh->fetch() )
{
$tpl->Assign('donation1' , $site_settings1['a_donation_amount1'] );
$tpl->Assign('donation2' , $site_settings1['a_donation_amount2'] );
$tpl->Assign('donation3' , $site_settings1['a_donation_amount3'] );
$tpl->Assign('donation4' , $site_settings1['a_donation_amount4'] );
$tpl->Assign('donation5' , $site_settings1['a_donation_amount5'] );
$tpl->Assign('donation6' , $site_settings1['a_donation_amount6'] );
$PSCode = $_POST['trans_id1'].'-'.$_POST['trans_id2'].'-'.$_POST['trans_id3'].'-'.$_POST['trans_id4'];

$query = sprintf("INSERT INTO %s.t_donations (a_account, a_cash, a_transaction_id) VALUES (:userid, :amount, :transaction)", $dbs["site"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':userid' => $User->ID, ':amount' => $_POST['amount'], ':transaction' => $PSCode ));
}}


if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'buy' )
{
$pack = $_POST['Pack'];
$end = substr("$userid", -1);
$table = "%s.t_stash0".$end;
echo $table;
$query = sprintf("SELECT * FROM :table WHERE a_user_idx = :userid ", $dbs["db"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':table' => $table, ':userid' => $User->ID ));
$num44 = $dbh->rowCount();

if($num44 > 45)
{
$tpl->newBlock('nospace');
$tpl->Assign('nospace' , 'You dont have enough free space in your warehouse!' );
} else {
$tpl->newBlock('buy');
$query = sprintf("SELECT * FROM %s.t_shop WHERE a_index = :pack ", $dbs["site"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':pack' => $pack ));
while($shopper1 = $dbh->fetch() )
{
$price = $shopper1['a_cash'];
$query = sprintf("SELECT cash FROM %s.bg_user WHERE user_code = :userid ", $dbs["auth"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':userid' => $User->ID ));
while($CashCheck1 = $dbh->fetch() )
{
if($CashCheck1['cash'] >= $price)
{
if($shopper1['a_item1_index'] == 0)
{ } else {
$item_time1 = $shopper1['a_item1_time_limit'];
$plus1 = $shopper1['a_item1_plus'];
$item1 = $shopper1['a_item1_index'];
$item_amount1 = $shopper1['a_item1_amount'];
$calcSerial1 = calcSerial($item1);
$query11 = sprintf("INSERT INTO ". $table ." (a_index, a_user_idx, a_item_idx, a_serial, a_count, a_used, a_plus) VALUES ('', :userid, :item1, :calcSerial1, :item_amount1, :item_time1, :plus1)", $dbs["db"]);
$dbh11 = $db->prepare( $query11 );
$dbh11->execute( array( ':userid' => $User->ID, ':item1' => $item1, ':calcSerial1' => $calcSerial1, ':item_amount1' => $item_amount1, ':item_time1' => $item_time1, ':plus1' => $plus1));
}

if($shopper1['a_item2_index'] == 0)
{ } else {
$item_time2 = $shopper1['a_item2_time_limit'];
$plus2 = $shopper1['a_item2_plus'];
$item2 = $shopper1['a_item2_index'];
$item_amount2 = $shopper1['a_item2_amount'];
$calcSerial2 = calcSerial($item2);
$query22 = sprintf("INSERT INTO ". $table ." (a_index, a_user_idx, a_item_idx, a_serial, a_count, a_used, a_plus) VALUES ('', :userid, :item2, :calcSerial2, :item_amount2, :item_time2, :plus2 )", $dbs["db"]);
$dbh22 = $db->prepare( $query22 );
$dbh22->execute( array( ':userid' => $User->ID, ':item2' => $item2, ':calcSerial2' => $calcSerial2, ':item_amount2' => $item_amount2, ':item_time2' => $item_time2, ':plus2' => $plus2));
}

if($shopper1['a_item3_index'] == 0)
{ } else {
$item_time3 = $shopper1['a_item3_time_limit'];
$plus3 = $shopper1['a_item3_plus'];
$item3 = $shopper1['a_item3_index'];
$item_amount3 = $shopper1['a_item3_amount'];
$calcSerial3 = calcSerial($item3);
$query33 = sprintf("INSERT INTO ". $table ." (a_index, a_user_idx, a_item_idx, a_serial, a_count, a_used, a_plus) VALUES ('', :userid, :item3, :calcSerial3, :item_amount3, :item_time3, :plus3 )", $dbs["db"]);
$dbh33 = $db->prepare( $query33 );
$dbh33->execute( array( ':userid' => $User->ID, ':item3' => $item3, ':calcSerial3' => $calcSerial3, ':item_amount3' => $item_amount3, ':item_time3' => $item_time3, ':plus3' => $plus3));
}

if($shopper1['a_item4_index'] == 0)
{ } else {
$item_time4 = $shopper1['a_item4_time_limit'];
$plus4 = $shopper1['a_item4_plus'];
$item4 = $shopper1['a_item4_index'];
$item_amount4 = $shopper1['a_item4_amount'];
$calcSerial4 = calcSerial($item4);
$query44 = sprintf("INSERT INTO ". $table ." (a_index, a_user_idx, a_item_idx, a_serial, a_count, a_used, a_plus) VALUES ('', :userid, :item4, :calcSerial4, :item_amount4, :item_time4, :plus4 )", $dbs["db"]);
$dbh44 = $db->prepare( $query44 );
$dbh44->execute( array( ':userid' => $User->ID, ':item4' => $item4, ':calcSerial4' => $calcSerial4, ':item_amount4' => $item_amount4, ':item_time4' => $item_time4, ':plus4' => $plus4));
}

if($shopper1['a_item5_index'] == 0)
{ } else {
$item_time5 = $shopper1['a_item5_time_limit'];
$plus5 = $shopper1['a_item5_plus'];
$item5 = $shopper1['a_item5_index'];
$item_amount5 = $shopper1['a_item5_amount'];
$calcSerial5 = calcSerial($item5);
$query55 = sprintf("INSERT INTO ". $table ." (a_index, a_user_idx, a_item_idx, a_serial, a_count, a_used, a_plus) VALUES ('', :userid, :item5, :calcSerial5, :item_amount5, :item_time5, :plus5 )", $dbs["db"]);
$dbh55 = $db->prepare( $query55 );
$dbh55->execute( array( ':userid' => $User->ID, ':item5' => $item5, ':calcSerial5' => $calcSerial5, ':item_amount5' => $item_amount5, ':item_time5' => $item_time5, ':plus5' => $plus5));
}


if($shopper1['a_item6_index'] == 0)
{ } else {
$item_time6 = $shopper1['a_item6_time_limit'];
$plus6 = $shopper1['a_item6_plus'];
$item6 = $shopper1['a_item6_index'];
$item_amount6 = $shopper1['a_item6_amount'];
$calcSerial6 = calcSerial($item6);
$query66 = sprintf("INSERT INTO ". $table ." (a_index, a_user_idx, a_item_idx, a_serial, a_count, a_used, a_plus) VALUES ('', :userid, :item6, :calcSerial6, :item_amount6, :item_time6, :plus6 )", $dbs["db"]);
$dbh66 = $db->prepare( $query66 );
$dbh66->execute( array( ':userid' => $User->ID, ':item6' => $item6, ':calcSerial6' => $calcSerial6, ':item_amount6' => $item_amount6, ':item_time6' => $item_time6, ':plus6' => $plus6));
}

$query = sprintf("UPDATE %s.bg_user SET cash = cash - :price WHERE user_code = :userid ", $dbs["auth"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':price' => $price, ':userid' => $User->ID ));
$tpl->Assign('buy_finish' , 'Your items have been placed in your warehouse. Enjoy' );
} else {
$tpl->Assign('buy_finish' , 'You dont have the right amount of cash, sorry.' );
}}}}}








if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'Market' )
{
$catagory = $_GET['Cat'];

$tpl->newBlock('online_shop');
$tpl->newBlock('market_packs');
$i = 0;


$query234 = sprintf("SELECT * FROM %s.t_shop WHERE a_catagory=:cata ORDER BY a_index DESC", $dbs["site"]);
$dbh976 = $db->prepare( $query234 );
$dbh976->execute( array( ':ct' => $catagory ));
while($pitems = $dbh976->fetch() )
{

$getitemid[$i] = $pitems['a_item_idx'];
$getitemplus[$i] = $pitems['a_item_plus'];
$getitemnum[$i] = $pitems['a_item_num'];


for( $a=1; $a<=$i; $a++)
{
$tpl->newBlock('market_packs_loop');

$query235 = sprintf("SELECT a_texture_id, a_texture_row, a_texture_col, a_index, a_name, a_descr FROM %s.t_item WHERE a_index = :item1", $dbs["data"]);
$dbh356 = $db->prepare( $query235 );
$dbh356->execute( array( ':item1' => $getitemid[$a] ));
$fetch = $dbh356->fetch();

}
}

}

$query = sprintf("SELECT * FROM %s.t_catalog_1 WHERE a_type = :cata", $dbs["data"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':cata' => $catagory ));

if ($dbh->rowCount() >= '1') {
while($shop1 = $dbh->fetch() )
{
$tpl->newBlock('market_packs_loop');
$tpl->Assign('PackName' , $shop1['a_ctname'] ); // done
$tpl->Assign('PackDescr' , $shop1['a_ctdesc'] ); // done
$tpl->Assign('Catagory' , $shop1['a_type'] ); // done
$tpl->Assign('cash' , $shop1['a_cash'] ); // done
$tpl->Assign('otime' , $shop1['a_cash'] + $shop1['a_cash'] + $shop1['a_cash'] ); // done
$tpl->Assign('pack' , $shop1['a_ctid'] ); // done


$query = sprintf("SELECT a_texture_id, a_texture_row, a_texture_col, a_index, a_name, a_descr FROM %s.t_item WHERE a_index = :item1", $dbs["data"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':item1' => $getitemid[$a] ));
$fetch = $dbh->fetch();

$icon_index = $fetch['a_texture_id'];
$icon_row = $fetch['a_texture_row'];
$icon_col = $fetch['a_texture_col'];
$item_name = $fetch['a_name'];
$item_descr = $fetch['a_descr'];
$item_amount = $shop['a_item1_amount'];
$tpl->Assign('item1' , "$item_name

Amount: $item_amount

Item Description:
$item_descr" );


}
}
}

if($getitemid >= 0) { } else {
$query1 = sprintf("SELECT a_texture_id, a_texture_row, a_texture_col, a_index, a_name, a_descr FROM %s.t_item WHERE a_index = :item1", $dbs["data"]);
$dbh1 = $db->prepare( $query1 );
$dbh1->execute( array( ':item1' => $getitemid ));
$fetch1 = $dbh1->fetch();
$icon_index1 = $fetch1['a_texture_id'];
$icon_row1 = $fetch1['a_texture_row'];
$icon_col1 = $fetch1['a_texture_col'];
$item_name1 = $fetch1['a_name'];
$item_descr1 = $fetch1['a_descr'];
$item_amount1 = $shop1['a_item1_amount'];
$tpl->Assign('item1' , "$item_name1

Amount: $item_amount1

Item Description:
$item_descr1" );
}}


} else { $tpl->newBlock('market_none'); }


}
else
{
$tpl->newBlock('error');
$tpl->Assign('msg' , 'Please Login');
}

$tpl->printToScreen();
credit();

} else {
echo"";
}
?>


tamamı

Ek Olarak:

soulmy adlı üyeden alıntı

308. satırın sonunda }} olan kısmı } bu şekilde yapmalısın. Fazladan bir tane koymuşsun.


denedim hocam malesef olmadı.
 

 

wmaraci
wmaraci

soulmy soulmy WM Aracı Kullanıcı
  • Üyelik 12.06.2012
  • Yaş/Cinsiyet 38 / E
  • Meslek Öğretmen
  • Konum Samsun
  • Ad Soyad O** Y**
  • Mesajlar 1722
  • Beğeniler 398 / 400
  • Ticaret 20, (%100)
O zaman 311. satırdaki } kısmı sil
 

 

.

Konyali Konyali furkan.konyali@gmail.com Kullanıcı
  • Üyelik 09.04.2011
  • Yaş/Cinsiyet 30 / E
  • Meslek Front-end Developer
  • Konum İstanbul Anadolu
  • Ad Soyad F** K**
  • Mesajlar 1043
  • Beğeniler 130 / 62
  • Ticaret 5, (%100)

// Setting to show any errors
error_reporting(E_ALL);
ini_set('display_errors', '0');


// Session
session_start();

// Template Power
include_once( "Core/TemplatePower.php" );

// TPL To Load For This Page
$tpl = new TemplatePower( "Other/Tpl/market.tpl" );

// Extra TPL Calls
$tpl->assignInclude( "header", "Other/Tpl/header.tpl" );
$tpl->assignInclude( "menu", "Other/Tpl/menu.tpl" );
$tpl->assignInclude( "blocks", "Other/Tpl/blocks.tpl" );
$tpl->assignInclude( "slider", "Other/Tpl/slider.tpl" );
$tpl->prepare();


// Settings
include 'Config/ConSet.php';

// Scripts
include 'Core/Classes.php';
include 'Core/Functions.php';
include 'Core/Posts.php';
include 'Core/Extra.php';


if ($dnsaddy == $_SERVER['HTTP_HOST']) {

if( $User->LoggedIn == true )
{

$userid = $User->ID;

$query = sprintf("SELECT a_paypal_email, a_currency, a_donation_amount1, a_donation_amount2, a_donation_amount3, a_donation_amount4, a_donation_amount5, a_donation_amount6 FROM %s.t_settings", $dbs["site"]);
$dbh = $db->prepare( $query );
$dbh->execute();
while($site_settings1 = $dbh->fetch() )
{
$tpl->Assign('paypalemail' , $site_settings1['a_paypal_email'] );
$tpl->Assign('currency' , $site_settings1['a_currency'] );
$tpl->Assign('donation1' , $site_settings1['a_donation_amount1'] );
$tpl->Assign('donation2' , $site_settings1['a_donation_amount2'] );
$tpl->Assign('donation3' , $site_settings1['a_donation_amount3'] );
$tpl->Assign('donation4' , $site_settings1['a_donation_amount4'] );
$tpl->Assign('donation5' , $site_settings1['a_donation_amount5'] );
$tpl->Assign('donation6' , $site_settings1['a_donation_amount6'] );
}







if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'donate' )
{
$tpl->newBlock('donate');
}

if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'store' )
{
$tpl->newBlock('online_shop');
$tpl->newBlock('store');

}

if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'paypal' )
{
$tpl->newBlock('paypal');
}

if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'paysafecard' )
{
$tpl->newBlock('paysafecard');
}

if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'donate_submitted' )
{
$tpl->newBlock('donate_submitted');
$query = sprintf("SELECT a_donation_amount1, a_donation_amount2, a_donation_amount3, a_donation_amount4, a_donation_amount5, a_donation_amount6 FROM %s.t_settings", $dbs["site"]);
$dbh = $db->prepare( $query );
$dbh->execute();
while($site_settings1 = $dbh->fetch() )
{
$tpl->Assign('donation1' , $site_settings1['a_donation_amount1'] );
$tpl->Assign('donation2' , $site_settings1['a_donation_amount2'] );
$tpl->Assign('donation3' , $site_settings1['a_donation_amount3'] );
$tpl->Assign('donation4' , $site_settings1['a_donation_amount4'] );
$tpl->Assign('donation5' , $site_settings1['a_donation_amount5'] );
$tpl->Assign('donation6' , $site_settings1['a_donation_amount6'] );
$PSCode = $_POST['trans_id1'].'-'.$_POST['trans_id2'].'-'.$_POST['trans_id3'].'-'.$_POST['trans_id4'];

$query = sprintf("INSERT INTO %s.t_donations (a_account, a_cash, a_transaction_id) VALUES (:userid, :amount, :transaction)", $dbs["site"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':userid' => $User->ID, ':amount' => $_POST['amount'], ':transaction' => $PSCode ));
}}


if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'buy' )
{
$pack = $_POST['Pack'];
$end = substr("$userid", -1);
$table = "%s.t_stash0".$end;
echo $table;
$query = sprintf("SELECT * FROM :table WHERE a_user_idx = :userid ", $dbs["db"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':table' => $table, ':userid' => $User->ID ));
$num44 = $dbh->rowCount();

if($num44 > 45)
{
$tpl->newBlock('nospace');
$tpl->Assign('nospace' , 'You dont have enough free space in your warehouse!' );
} else {
$tpl->newBlock('buy');
$query = sprintf("SELECT * FROM %s.t_shop WHERE a_index = :pack ", $dbs["site"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':pack' => $pack ));
while($shopper1 = $dbh->fetch() )
{
$price = $shopper1['a_cash'];
$query = sprintf("SELECT cash FROM %s.bg_user WHERE user_code = :userid ", $dbs["auth"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':userid' => $User->ID ));
while($CashCheck1 = $dbh->fetch() )
{
if($CashCheck1['cash'] >= $price)
{
if($shopper1['a_item1_index'] == 0)
{ } else {
$item_time1 = $shopper1['a_item1_time_limit'];
$plus1 = $shopper1['a_item1_plus'];
$item1 = $shopper1['a_item1_index'];
$item_amount1 = $shopper1['a_item1_amount'];
$calcSerial1 = calcSerial($item1);
$query11 = sprintf("INSERT INTO ". $table ." (a_index, a_user_idx, a_item_idx, a_serial, a_count, a_used, a_plus) VALUES ('', :userid, :item1, :calcSerial1, :item_amount1, :item_time1, :plus1)", $dbs["db"]);
$dbh11 = $db->prepare( $query11 );
$dbh11->execute( array( ':userid' => $User->ID, ':item1' => $item1, ':calcSerial1' => $calcSerial1, ':item_amount1' => $item_amount1, ':item_time1' => $item_time1, ':plus1' => $plus1));
}

if($shopper1['a_item2_index'] == 0)
{ } else {
$item_time2 = $shopper1['a_item2_time_limit'];
$plus2 = $shopper1['a_item2_plus'];
$item2 = $shopper1['a_item2_index'];
$item_amount2 = $shopper1['a_item2_amount'];
$calcSerial2 = calcSerial($item2);
$query22 = sprintf("INSERT INTO ". $table ." (a_index, a_user_idx, a_item_idx, a_serial, a_count, a_used, a_plus) VALUES ('', :userid, :item2, :calcSerial2, :item_amount2, :item_time2, :plus2 )", $dbs["db"]);
$dbh22 = $db->prepare( $query22 );
$dbh22->execute( array( ':userid' => $User->ID, ':item2' => $item2, ':calcSerial2' => $calcSerial2, ':item_amount2' => $item_amount2, ':item_time2' => $item_time2, ':plus2' => $plus2));
}

if($shopper1['a_item3_index'] == 0)
{ } else {
$item_time3 = $shopper1['a_item3_time_limit'];
$plus3 = $shopper1['a_item3_plus'];
$item3 = $shopper1['a_item3_index'];
$item_amount3 = $shopper1['a_item3_amount'];
$calcSerial3 = calcSerial($item3);
$query33 = sprintf("INSERT INTO ". $table ." (a_index, a_user_idx, a_item_idx, a_serial, a_count, a_used, a_plus) VALUES ('', :userid, :item3, :calcSerial3, :item_amount3, :item_time3, :plus3 )", $dbs["db"]);
$dbh33 = $db->prepare( $query33 );
$dbh33->execute( array( ':userid' => $User->ID, ':item3' => $item3, ':calcSerial3' => $calcSerial3, ':item_amount3' => $item_amount3, ':item_time3' => $item_time3, ':plus3' => $plus3));
}

if($shopper1['a_item4_index'] == 0)
{ } else {
$item_time4 = $shopper1['a_item4_time_limit'];
$plus4 = $shopper1['a_item4_plus'];
$item4 = $shopper1['a_item4_index'];
$item_amount4 = $shopper1['a_item4_amount'];
$calcSerial4 = calcSerial($item4);
$query44 = sprintf("INSERT INTO ". $table ." (a_index, a_user_idx, a_item_idx, a_serial, a_count, a_used, a_plus) VALUES ('', :userid, :item4, :calcSerial4, :item_amount4, :item_time4, :plus4 )", $dbs["db"]);
$dbh44 = $db->prepare( $query44 );
$dbh44->execute( array( ':userid' => $User->ID, ':item4' => $item4, ':calcSerial4' => $calcSerial4, ':item_amount4' => $item_amount4, ':item_time4' => $item_time4, ':plus4' => $plus4));
}

if($shopper1['a_item5_index'] == 0)
{ } else {
$item_time5 = $shopper1['a_item5_time_limit'];
$plus5 = $shopper1['a_item5_plus'];
$item5 = $shopper1['a_item5_index'];
$item_amount5 = $shopper1['a_item5_amount'];
$calcSerial5 = calcSerial($item5);
$query55 = sprintf("INSERT INTO ". $table ." (a_index, a_user_idx, a_item_idx, a_serial, a_count, a_used, a_plus) VALUES ('', :userid, :item5, :calcSerial5, :item_amount5, :item_time5, :plus5 )", $dbs["db"]);
$dbh55 = $db->prepare( $query55 );
$dbh55->execute( array( ':userid' => $User->ID, ':item5' => $item5, ':calcSerial5' => $calcSerial5, ':item_amount5' => $item_amount5, ':item_time5' => $item_time5, ':plus5' => $plus5));
}


if($shopper1['a_item6_index'] == 0)
{ } else {
$item_time6 = $shopper1['a_item6_time_limit'];
$plus6 = $shopper1['a_item6_plus'];
$item6 = $shopper1['a_item6_index'];
$item_amount6 = $shopper1['a_item6_amount'];
$calcSerial6 = calcSerial($item6);
$query66 = sprintf("INSERT INTO ". $table ." (a_index, a_user_idx, a_item_idx, a_serial, a_count, a_used, a_plus) VALUES ('', :userid, :item6, :calcSerial6, :item_amount6, :item_time6, :plus6 )", $dbs["db"]);
$dbh66 = $db->prepare( $query66 );
$dbh66->execute( array( ':userid' => $User->ID, ':item6' => $item6, ':calcSerial6' => $calcSerial6, ':item_amount6' => $item_amount6, ':item_time6' => $item_time6, ':plus6' => $plus6));
}

$query = sprintf("UPDATE %s.bg_user SET cash = cash - :price WHERE user_code = :userid ", $dbs["auth"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':price' => $price, ':userid' => $User->ID ));
$tpl->Assign('buy_finish' , 'Your items have been placed in your warehouse. Enjoy' );
} else {
$tpl->Assign('buy_finish' , 'You dont have the right amount of cash, sorry.' );
}}}}}








if( isset( $_GET['Shop'] ) && $_GET['Shop'] == 'Market' )
{
$catagory = $_GET['Cat'];

$tpl->newBlock('online_shop');
$tpl->newBlock('market_packs');
$i = 0;


$query234 = sprintf("SELECT * FROM %s.t_shop WHERE a_catagory=:cata ORDER BY a_index DESC", $dbs["site"]);
$dbh976 = $db->prepare( $query234 );
$dbh976->execute( array( ':ct' => $catagory ));
while($pitems = $dbh976->fetch() )
{

$getitemid[$i] = $pitems['a_item_idx'];
$getitemplus[$i] = $pitems['a_item_plus'];
$getitemnum[$i] = $pitems['a_item_num'];


for( $a=1; $a<=$i; $a++)
{
$tpl->newBlock('market_packs_loop');

$query235 = sprintf("SELECT a_texture_id, a_texture_row, a_texture_col, a_index, a_name, a_descr FROM %s.t_item WHERE a_index = :item1", $dbs["data"]);
$dbh356 = $db->prepare( $query235 );
$dbh356->execute( array( ':item1' => $getitemid[$a] ));
$fetch = $dbh356->fetch();

}
}

}

$query = sprintf("SELECT * FROM %s.t_catalog_1 WHERE a_type = :cata", $dbs["data"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':cata' => $catagory ));

if ($dbh->rowCount() >= '1') {
while($shop1 = $dbh->fetch() )
{
$tpl->newBlock('market_packs_loop');
$tpl->Assign('PackName' , $shop1['a_ctname'] ); // done
$tpl->Assign('PackDescr' , $shop1['a_ctdesc'] ); // done
$tpl->Assign('Catagory' , $shop1['a_type'] ); // done
$tpl->Assign('cash' , $shop1['a_cash'] ); // done
$tpl->Assign('otime' , $shop1['a_cash'] + $shop1['a_cash'] + $shop1['a_cash'] ); // done
$tpl->Assign('pack' , $shop1['a_ctid'] ); // done


$query = sprintf("SELECT a_texture_id, a_texture_row, a_texture_col, a_index, a_name, a_descr FROM %s.t_item WHERE a_index = :item1", $dbs["data"]);
$dbh = $db->prepare( $query );
$dbh->execute( array( ':item1' => $getitemid[$a] ));
$fetch = $dbh->fetch();

$icon_index = $fetch['a_texture_id'];
$icon_row = $fetch['a_texture_row'];
$icon_col = $fetch['a_texture_col'];
$item_name = $fetch['a_name'];
$item_descr = $fetch['a_descr'];
$item_amount = $shop['a_item1_amount'];
$tpl->Assign('item1' , "$item_name

Amount: $item_amount

Item Description:
$item_descr" );


}
}
}

if($getitemid >= 0) { } else {
$query1 = sprintf("SELECT a_texture_id, a_texture_row, a_texture_col, a_index, a_name, a_descr FROM %s.t_item WHERE a_index = :item1", $dbs["data"]);
$dbh1 = $db->prepare( $query1 );
$dbh1->execute( array( ':item1' => $getitemid ));
$fetch1 = $dbh1->fetch();
$icon_index1 = $fetch1['a_texture_id'];
$icon_row1 = $fetch1['a_texture_row'];
$icon_col1 = $fetch1['a_texture_col'];
$item_name1 = $fetch1['a_name'];
$item_descr1 = $fetch1['a_descr'];
$item_amount1 = $shop1['a_item1_amount'];
$tpl->Assign('item1' , "$item_name1

Amount: $item_amount1

Item Description:
$item_descr1" );
}}


else { $tpl->newBlock('market_none'); }


}
else
{
$tpl->newBlock('error');
$tpl->Assign('msg' , 'Please Login');
}

$tpl->printToScreen();
credit();

} else {
echo"";
}
?>


bu şekilde kullanın bir kırlangıç parantezi fazla kullanmışsın.
 

 

mhtsnck mhtsnck Üyeliği Durdurulmuş Banlı Kullanıcı
  • Üyelik 10.01.2012
  • Yaş/Cinsiyet 31 / E
  • Meslek Öğretmenlik
  • Konum Samsun
  • Ad Soyad ** **
  • Mesajlar 40
  • Beğeniler 49 / 30
  • Ticaret 0, (%0)
Bu seferde 311 hata verdi Parse error: syntax error, unexpected '}' in C:\xampp\htdocs\market.php on line 311
 

 

wmaraci
wmaraci
Konuyu toplam 2 kişi okuyor. (0 kullanıcı ve 2 misafir)