PDA

View Full Version : مشکل این کد کجاست ؟



amirpoor
دوشنبه 01 شهریور 1389, 18:18 عصر
با سلام

من کد زیر رو که در وب سرور اجرا می کنم خطا می دهد نمی دونم مشکلش کجاس

میشه راهنماییم کنید


}
else
{
echo "Your Licence is Invalid !";
}
?>

binyaft
دوشنبه 01 شهریور 1389, 18:20 عصر
خوب این کد خیلی مشکل داره
اول اینکه تگ <?php رو باز نکردی بعد هم نیومیدی if رو تعریف نکرده else دادی

amirpoor
دوشنبه 01 شهریور 1389, 18:42 عصر
خوب این کد خیلی مشکل داره
اول اینکه تگ <?php رو باز نکردی بعد هم نیومیدی if رو تعریف نکرده else دادی


با تشکر از شما دوست عزیز

کدی که قرار داده ام کدهای آخر فایل است

اما موقع اجرا خطا می گیرد

میشه صحیح این خطوط آخر رو اینجا برام قرار بدید ؟

ممنون

maysam.m
دوشنبه 01 شهریور 1389, 18:59 عصر
با تشکر از شما دوست عزیز

کدی که قرار داده ام کدهای آخر فایل است

اما موقع اجرا خطا می گیرد

میشه صحیح این خطوط آخر رو اینجا برام قرار بدید ؟

ممنون

شما بهتره تمام کد را بگذاری تا ما بتونیم بهتر راهنماییت کنیم

amirpoor
دوشنبه 01 شهریور 1389, 19:19 عصر
<?php

session_start( );
$DebugMode = false;
include( "./cfg/connect.inc.php" );
include( "./includes/database/".DBMS.".php" );
include( "./cfg/template_config.php" );
include( "./core_functions/functions.php" );
include( "./core_functions/category_functions.php" );
include( "./core_functions/cart_functions.php" );
include( "./core_functions/product_functions.php" );
include( "./core_functions/statistic_functions.php" );
include( "./core_functions/reg_fields_functions.php" );
include( "./core_functions/registration_functions.php" );
include( "./core_functions/country_functions.php" );
include( "./core_functions/zone_functions.php" );
include( "./core_functions/datetime_functions.php" );
include( "./core_functions/order_status_functions.php" );
include( "./core_functions/order_functions.php" );
include( "./core_functions/aux_pages_functions.php" );
include( "./core_functions/picture_functions.php" );
include( "./core_functions/configurator_functions.php" );
include( "./core_functions/option_functions.php" );
include( "./core_functions/search_function.php" );
include( "./core_functions/discount_functions.php" );
include( "./core_functions/custgroup_functions.php" );
include( "./core_functions/shipping_functions.php" );
include( "./core_functions/payment_functions.php" );
include( "./core_functions/tax_function.php" );
include( "./core_functions/currency_functions.php" );
include( "./core_functions/module_function.php" );
include( "./core_functions/crypto/crypto_functions.php" );
include( "./core_functions/quick_order_function.php" );
include( "./core_functions/setting_functions.php" );
include( "./core_functions/subscribers_functions.php" );
include( "./core_functions/version_function.php" );
include( "./core_functions/discussion_functions.php" );
include( "./core_functions/order_amount_functions.php" );
include( "./core_functions/linkexchange_functions.php" );
include( "./core_functions/account_functions.php" );
include( "./core_functions/jalalicalendar_functions.php" );
include( "./core_functions/affiliate_functions.php" );
include( "./core_functions/bankbill_functions.php" );
if ( !extension_loaded( "soap" ) )
{
include( "./core_functions/nusoap.php" );
}
include( "./classes/xml2array.php" );
include( "./classes/class.virtual.shippingratecalculator.php" );
include( "./classes/class.virtual.paymentmodule.php" );
include( "./classes/class.virtual.smsmail.php" );
include( "./modules/smsmail/class.smsnotify.php" );
$domain = $_SERVER['SERVER_NAME'];
$domain = ltrim( $domain, ".www" );
$hash = hashish( $domain );
if ( $hash == LICENCE )
{
magicquotesruntimesetting( );
require( "smarty/smarty.class.php" );
$smarty = new smarty( );
$smarty_mail = new smarty( );
if ( isset( $_POST['lang'] ) )
{
$GLOBALS['_SESSION']['current_language'] = $_POST['lang'];
}
if ( !isset( $_SESSION['current_language'] ) && $_SESSION['current_language'] < 0 || count( $lang_list ) < $_SESSION['current_language'] )
{
$GLOBALS['_SESSION']['current_language'] = 0;
}
if ( isset( $lang_list[$_SESSION['current_language']] ) && file_exists( "languages/".$lang_list[$_SESSION['current_language']]->filename ) )
{
include( "languages/".$lang_list[$_SESSION['current_language']]->filename );
}
else
{
exit( "<font color=red><b>ERROR: Couldn't find language file!</b></font>" );
}
if ( !db_connect( DB_HOST, DB_USER, DB_PASS ) )
{
exit( db_error( ) );
}
if ( !db_select_db( DB_NAME ) )
{
exit( db_error( ) );
}
settingdefineconstants( );
if ( ( integer )CONF_SMARTY_FORCE_COMPILE )
{
$smarty->force_compile = true;
$smarty_mail->force_compile = true;
}
$f = file( "./cfg/homepage" );
$out = implode( "", $f );
$smarty->assign( "home_text", $out );
if ( CONF_SHOW_LATEST_LEFT == 1 || CONF_MOSTVIEWED_LEFT == 1 || CONF_SHOW_BESTSELLERS_LEFT == 1 )
{
$smarty->assign( "leftblock", 1 );
}
if ( CONF_SHOW_LATEST_RIGHT == 1 || CONF_MOSTVIEWED_RIGHT == 1 || CONF_SHOW_BESTSELLERS_RIGHT == 1 )
{
$smarty->assign( "rightblock", 1 );
}
if ( !( $stq = db_query( "Select * From ".AUX_PAGES_TABLE ) ) )
{
exit( mysql_error( ) );
}
while ( $stres = db_fetch_row( $stq ) )
{
$auxlist[] = $stres;
}
$smarty->assign( "aux_list", $auxlist );
include( "./checklogin.php" );
$current_currency = isset( $_SESSION['current_currency'] ) ? $_SESSION['current_currency'] : CONF_DEFAULT_CURRENCY;
$smarty->assign( "current_currency", $current_currency );
if ( !( $q = db_query( "select code, currency_value, where2show, currency_iso_3, Name from ".CURRENCY_TYPES_TABLE.( " where CID='".$current_currency."'" ) ) ) )
{
exit( db_error( ) );
}
if ( $row = db_fetch_row( $q ) )
{
$smarty->assign( "currency_name", $row[0] );
$selected_currency_details = $row;
}
else
{
if ( !( $q = db_query( "select code, currency_value, where2show from ".CURRENCY_TYPES_TABLE ) ) )
{
exit( db_error( ) );
}
if ( $row = db_fetch_row( $q ) )
{
$smarty->assign( "currency_name", $row[0] );
$selected_currency_details = $row;
}
}
$cats = array( );
$i = 0;
if ( !( $q = db_query( "SELECT categoryID, name, parent, products_count, description, picture FROM ".CATEGORIES_TABLE." where categoryID<>0 ORDER BY sort_order, name" ) ) )
{
exit( db_error( ) );
}
while ( $row = db_fetch_row( $q ) )
{
$cats[$i++] = $row;
}
if ( isset( $_GET['categoryID'] ) || isset( $_GET['categoryID'] ) )
{
$categoryID = isset( $_POST['categoryID'], $_GET['categoryID'] ) ? ( integer )$_GET['categoryID'] : ( integer )$_POST['categoryID'];
}
if ( !isset( $_GET['productID'] ) )
{
if ( isset( $_POST['productID'] ) )
{
$productID = ( integer )$_POST['productID'];
}
}
else
{
$productID = ( integer )$_GET['productID'];
}
if ( isset( $_GET['register'] ) || isset( $_GET['register'] ) )
{
$register = isset( $_POST['register'], $_GET['register'] ) ? $_GET['register'] : $_POST['register'];
}
if ( isset( $_GET['update_details'] ) || isset( $_GET['update_details'] ) )
{
$update_details = isset( $_POST['update_details'], $_GET['update_details'] ) ? $_GET['update_details'] : $_POST['update_details'];
}
if ( isset( $_GET['order'] ) || isset( $_GET['order'] ) )
{
$order = isset( $_POST['order'], $_GET['order'] ) ? $_GET['order'] : $_POST['order'];
}
if ( isset( $_GET['order_without_billing_address'] ) || isset( $_GET['order_without_billing_address'] ) )
{
$order_without_billing_address = isset( $_POST['order_without_billing_address'], $_GET['order_without_billing_address'] ) ? $_GET['order_without_billing_address'] : $_POST['order_without_billing_address'];
}
if ( isset( $_GET['check_order'] ) || isset( $_GET['check_order'] ) )
{
$check_order = isset( $_POST['check_order'], $_GET['check_order'] ) ? $_GET['check_order'] : $_POST['check_order'];
}
if ( isset( $_GET['proceed_ordering'] ) || isset( $_GET['proceed_ordering'] ) )
{
$proceed_ordering = isset( $_POST['proceed_ordering'], $_GET['proceed_ordering'] ) ? $_GET['proceed_ordering'] : $_POST['proceed_ordering'];
}
if ( isset( $_GET['update_customer_info'] ) || isset( $_GET['update_customer_info'] ) )
{
$update_customer_info = isset( $_POST['update_customer_info'], $_GET['update_customer_info'] ) ? $_GET['update_customer_info'] : $_POST['update_customer_info'];
}
if ( isset( $_GET['view_content'] ) || isset( $_GET['view_content'] ) )
{
$view_content = isset( $_POST['view_content'], $_GET['view_content'] ) ? $_GET['view_content'] : $_POST['view_content'];
}
if ( isset( $_GET['visit_history'] ) || isset( $_POST['visit_history'] ) )
{
$visit_history = 1;
}
if ( isset( $_GET['order_history'] ) || isset( $_POST['order_history'] ) )
{
$order_history = 1;
}
if ( isset( $_GET['address_book'] ) || isset( $_POST['address_book'] ) )
{
$address_book = 1;
}
if ( isset( $_GET['address_editor'] ) || isset( $_GET['address_editor'] ) )
{
$address_editor = isset( $_POST['address_editor'], $_GET['address_editor'] ) ? $_GET['address_editor'] : $_POST['address_editor'];
}
if ( isset( $_GET['add_new_address'] ) || isset( $_GET['add_new_address'] ) )
{
$add_new_address = isset( $_POST['add_new_address'], $_GET['add_new_address'] ) ? $_GET['add_new_address'] : $_POST['add_new_address'];
}
if ( isset( $_GET['contact_info'] ) || isset( $_GET['contact_info'] ) )
{
$contact_info = isset( $_POST['contact_info'], $_GET['contact_info'] ) ? $_GET['contact_info'] : $_POST['contact_info'];
}
if ( isset( $_GET['comparison_products'] ) || isset( $_POST['comparison_products'] ) )
{
$comparison_products = 1;
}
if ( isset( $_GET['register_authorization'] ) || isset( $_POST['register_authorization'] ) )
{
$register_authorization = 1;
}
if ( isset( $_GET['page_not_found'] ) || isset( $_POST['page_not_found'] ) )
{
$page_not_found = 1;
}
if ( isset( $_GET['news'] ) || isset( $_GET['news'] ) )
{
$news = 1;
}
if ( isset( $_GET['quick_register'] ) )
{
$quick_register = 1;
}
if ( isset( $_GET['order2_shipping_quick'] ) )
{
$order2_shipping_quick = 1;
}
if ( isset( $_GET['order3_billing_quick'] ) )
{
$order3_billing_quick = 1;
}
if ( isset( $_GET['order2_shipping'] ) || isset( $_POST['order2_shipping'] ) )
{
$order2_shipping = 1;
}
if ( isset( $_GET['order3_billing'] ) || isset( $_POST['order3_billing'] ) )
{
$order3_billing = 1;
}
if ( isset( $_GET['change_address'] ) || isset( $_POST['change_address'] ) )
{
$change_address = 1;
}
if ( isset( $_GET['order4_confirmation'] ) || isset( $_POST['order4_confirmation'] ) )
{
$order4_confirmation = 1;
}
if ( isset( $_GET['order4_confirmation_quick'] ) || isset( $_POST['order4_confirmation_quick'] ) )
{
$order4_confirmation_quick = 1;
}
if ( isset( $_GET['order_detailed'] ) || isset( $_GET['order_detailed'] ) )
{
$order_detailed = isset( $_POST['order_detailed'], $_GET['order_detailed'] ) ? $_GET['order_detailed'] : $_POST['order_detailed'];
}
if ( !isset( $_SESSION['vote_completed'] ) )
{
$GLOBALS['_SESSION']['vote_completed'] = array( );
}
$offset = isset( $_GET['offset'] ) ? $_GET['offset'] : 0;
if ( $offset < 0 || $offset % CONF_PRODUCTS_PER_PAGE )
{
$offset = 0;
}
if ( isset( $productID ) )
{
if ( !( $q = db_query( "SELECT categoryID FROM ".PRODUCTS_TABLE.( " WHERE productID='".$productID."'" ) ) ) )
{
exit( db_error( ) );
}
$r = db_fetch_row( $q );
if ( $r )
{
$categoryID = $r[0];
}
}
$smarty->template_dir = "./templates/frontend/".$lang_list[$_SESSION['current_language']]->template_path;
$smarty_mail->template_dir = "./templates/email";
if ( !( $q = db_query( "select CID, Name, code, currency_value, where2show from ".CURRENCY_TYPES_TABLE." order by sort_order" ) ) )
{
exit( db_error( ) );
}
$currencies = array( );
while ( $row = db_fetch_row( $q ) )
{
$currencies[] = $row;
}
$smarty->assign( "currencies", $currencies );
$smarty->assign( "currencies_count", count( $currencies ) );
$smarty->assign( "lang_list", $lang_list );
if ( isset( $_SESSION['current_language'] ) )
{
$smarty->assign( "current_language", $_SESSION['current_language'] );
}
if ( isset( $_SESSION['log'] ) )
{
$smarty->assign( "log", $_SESSION['log'] );
}
if ( isset( $categoryID ) )
{
$smarty->assign( "categoryID", $categoryID );
}
if ( isset( $productID ) )
{
$smarty->assign( "productID", $productID );
}
if ( isset( $_GET['currency'] ) )
{
$smarty->assign( "currency", $_GET['currency'] );
}
if ( isset( $_GET['user_details'] ) )
{
$smarty->assign( "user_details", $_GET['user_details'] );
}
if ( isset( $_GET['aux_page'] ) )
{
$smarty->assign( "aux_page", $_GET['aux_page'] );
}
if ( isset( $_GET['show_price'] ) )
{
$smarty->assign( "show_price", $_GET['show_price'] );
}
if ( isset( $_GET['adv_search'] ) )
{
$smarty->assign( "adv_search", $_GET['adv_search'] );
}
if ( isset( $_GET['searchstring'] ) )
{
$smarty->xassign( "searchstring", $_GET['searchstring'] );
}
if ( isset( $register ) )
{
$smarty->assign( "register", $register );
}
if ( isset( $order ) )
{
$smarty->assign( "order", $order );
}
if ( isset( $check_order ) )
{
$smarty->assign( "check_order", $check_order );
}
$smarty->assign( "main_content_template", "home.tpl.html" );
$includes_dir = opendir( "./includes" );
$files = array( );
while ( ( $inc_file = readdir( $includes_dir ) ) != false )
{
if ( strstr( $inc_file, ".php" ) )
{
$files[] = $inc_file;
}
}
sort( $files );
foreach ( $files as $fl )
{
include( "./includes/".$fl );
}
if ( file_exists( "./install.php" ) )
{
echo WARNING_DELETE_INSTALL_PHP;
}
if ( is_writable( "./temp" ) )
{
if ( is_writable( "./products_files" ) )
{
if ( is_writable( "./products_pictures" ) )
{
}
}
}
if ( !is_writable( "./templates_c" ) )
{
echo WARNING_WRONG_CHMOD;
}
if ( isset( $_SESSION['log'] ) && !strcmp( $_SESSION['log'], ADMIN_LOGIN ) )
{
echo "";
}
$yahoo = _getsettingoptionvalue( "CONF_YAHOO_ID" );
if ( $yahoo )
{
$smarty->assign( "yahoo", 1 );
}
$aux_pages = auxpggetallpageattributes( );
if ( count( $aux_pages ) != 0 )
{
$smarty->assign( "aux_page1", $aux_pages[0] );
}
if ( 1 < count( $aux_pages ) )
{
$smarty->assign( "aux_page2", $aux_pages[1] );
}
$smarty->display( "index.tpl.html" );
}
else
{
echo "Your Licence is Invalid !";
}
?>

binyaft
دوشنبه 01 شهریور 1389, 20:13 عصر
خطا رو میدادی بهتر بود

amirpoor
دوشنبه 01 شهریور 1389, 20:55 عصر
خطا رو میدادی بهتر بود

سلام این خطا را می ده :

Parse error: syntax error, unexpected T_ELSE in /home/user/public_html/index.php on line 408

که خط 408 مربوط به 4 خط به آخر هستش قسمت else

ممنون میشم راهنمایی فرمایید

Hell Lord
دوشنبه 01 شهریور 1389, 21:52 عصر
از اول کد باید چک کنید ، در باز و بسته کردن پرانتز ها یک جا اشتباه کرده اید.
چقدر هم if دارید!! به جای این همه if میتوانستید از ? : استفاده کنید.

amirpoor
دوشنبه 01 شهریور 1389, 22:03 عصر
آخه مشکل اینجاست که وقتی من کد زیر رو برمی دارم مشکل حله

}
else
{
echo "Your Licence is Invalid !";
}
?>

اما وقتی باشه اون اررور رو می ده نمیشه فهمید از کجاست که این اررور را می ده ؟

با تشکر

rapidpich
سه شنبه 02 شهریور 1389, 09:04 صبح
برش دار
برای اینیکی If نداری

amirpoor
سه شنبه 02 شهریور 1389, 09:26 صبح
خب اگه برش دارم که خطای صحیح نبودن لایسنس رو به کاربر نشون نمی ده

من می خوام اون صفحه صحیح نبودن لایسنس رو به کاربر نشون بده

چه اشتباهی در خط else هستش که خطای زیر روی می ده :

Parse error: syntax error, unexpected T_ELSE in /home/user/public_html/index.php on line 408

amirpoor
سه شنبه 02 شهریور 1389, 17:50 عصر
از اساتید عزیز کسی میتونه راهنماییم کنه ؟

amirpoor
چهارشنبه 03 شهریور 1389, 17:03 عصر
Please Help Me

Hell Lord
چهارشنبه 03 شهریور 1389, 20:31 عصر
Try this

<?php

session_start( );
$DebugMode = false;
include( "./cfg/connect.inc.php" );
include( "./includes/database/".DBMS.".php" );
include( "./cfg/template_config.php" );
include( "./core_functions/functions.php" );
include( "./core_functions/category_functions.php" );
include( "./core_functions/cart_functions.php" );
include( "./core_functions/product_functions.php" );
include( "./core_functions/statistic_functions.php" );
include( "./core_functions/reg_fields_functions.php" );
include( "./core_functions/registration_functions.php" );
include( "./core_functions/country_functions.php" );
include( "./core_functions/zone_functions.php" );
include( "./core_functions/datetime_functions.php" );
include( "./core_functions/order_status_functions.php" );
include( "./core_functions/order_functions.php" );
include( "./core_functions/aux_pages_functions.php" );
include( "./core_functions/picture_functions.php" );
include( "./core_functions/configurator_functions.php" );
include( "./core_functions/option_functions.php" );
include( "./core_functions/search_function.php" );
include( "./core_functions/discount_functions.php" );
include( "./core_functions/custgroup_functions.php" );
include( "./core_functions/shipping_functions.php" );
include( "./core_functions/payment_functions.php" );
include( "./core_functions/tax_function.php" );
include( "./core_functions/currency_functions.php" );
include( "./core_functions/module_function.php" );
include( "./core_functions/crypto/crypto_functions.php" );
include( "./core_functions/quick_order_function.php" );
include( "./core_functions/setting_functions.php" );
include( "./core_functions/subscribers_functions.php" );
include( "./core_functions/version_function.php" );
include( "./core_functions/discussion_functions.php" );
include( "./core_functions/order_amount_functions.php" );
include( "./core_functions/linkexchange_functions.php" );
include( "./core_functions/account_functions.php" );
include( "./core_functions/jalalicalendar_functions.php" );
include( "./core_functions/affiliate_functions.php" );
include( "./core_functions/bankbill_functions.php" );
if ( !extension_loaded( "soap" ) )
{
include( "./core_functions/nusoap.php" );
}
include( "./classes/xml2array.php" );
include( "./classes/class.virtual.shippingratecalculator.php" );
include( "./classes/class.virtual.paymentmodule.php" );
include( "./classes/class.virtual.smsmail.php" );
include( "./modules/smsmail/class.smsnotify.php" );
$domain = $_SERVER['SERVER_NAME'];
$domain = ltrim( $domain, ".www" );
$hash = hashish( $domain );
if ( $hash != LICENCE )
{
echo "Your Licence is Invalid !";
exit;
}

magicquotesruntimesetting( );
require( "smarty/smarty.class.php" );
$smarty = new smarty( );
$smarty_mail = new smarty( );
if ( isset( $_POST['lang'] ) )
{
$GLOBALS['_SESSION']['current_language'] = $_POST['lang'];
}
if ( !isset( $_SESSION['current_language'] ) && $_SESSION['current_language'] < 0 || count( $lang_list ) < $_SESSION['current_language'] )
{
$GLOBALS['_SESSION']['current_language'] = 0;
}
if ( isset( $lang_list[$_SESSION['current_language']] ) && file_exists( "languages/".$lang_list[$_SESSION['current_language']]->filename ) )
{
include( "languages/".$lang_list[$_SESSION['current_language']]->filename );
}
else
{
exit( "<font color=red><b>ERROR: Couldn't find language file!</b></font>" );
}
if ( !db_connect( DB_HOST, DB_USER, DB_PASS ) )
{
exit( db_error( ) );
}
if ( !db_select_db( DB_NAME ) )
{
exit( db_error( ) );
}
settingdefineconstants( );
if ( ( integer )CONF_SMARTY_FORCE_COMPILE )
{
$smarty->force_compile = true;
$smarty_mail->force_compile = true;
}
$f = file( "./cfg/homepage" );
$out = implode( "", $f );
$smarty->assign( "home_text", $out );
if ( CONF_SHOW_LATEST_LEFT == 1 || CONF_MOSTVIEWED_LEFT == 1 || CONF_SHOW_BESTSELLERS_LEFT == 1 )
{
$smarty->assign( "leftblock", 1 );
}
if ( CONF_SHOW_LATEST_RIGHT == 1 || CONF_MOSTVIEWED_RIGHT == 1 || CONF_SHOW_BESTSELLERS_RIGHT == 1 )
{
$smarty->assign( "rightblock", 1 );
}
if ( !( $stq = db_query( "Select * From ".AUX_PAGES_TABLE ) ) )
{
exit( mysql_error( ) );
}
while ( $stres = db_fetch_row( $stq ) )
{
$auxlist[] = $stres;
}
$smarty->assign( "aux_list", $auxlist );
include( "./checklogin.php" );
$current_currency = isset( $_SESSION['current_currency'] ) ? $_SESSION['current_currency'] : CONF_DEFAULT_CURRENCY;
$smarty->assign( "current_currency", $current_currency );
if ( !( $q = db_query( "select code, currency_value, where2show, currency_iso_3, Name from ".CURRENCY_TYPES_TABLE.( " where CID='".$current_currency."'" ) ) ) )
{
exit( db_error( ) );
}
if ( $row = db_fetch_row( $q ) )
{
$smarty->assign( "currency_name", $row[0] );
$selected_currency_details = $row;
}
else
{
if ( !( $q = db_query( "select code, currency_value, where2show from ".CURRENCY_TYPES_TABLE ) ) )
{
exit( db_error( ) );
}
if ( $row = db_fetch_row( $q ) )
{
$smarty->assign( "currency_name", $row[0] );
$selected_currency_details = $row;
}
}
$cats = array( );
$i = 0;
if ( !( $q = db_query( "SELECT categoryID, name, parent, products_count, description, picture FROM ".CATEGORIES_TABLE." where categoryID<>0 ORDER BY sort_order, name" ) ) )
{
exit( db_error( ) );
}
while ( $row = db_fetch_row( $q ) )
{
$cats[$i++] = $row;
}
if ( isset( $_GET['categoryID'] ) || isset( $_GET['categoryID'] ) )
{
$categoryID = isset( $_POST['categoryID'], $_GET['categoryID'] ) ? ( integer )$_GET['categoryID'] : ( integer )$_POST['categoryID'];
}
if ( !isset( $_GET['productID'] ) )
{
if ( isset( $_POST['productID'] ) )
{
$productID = ( integer )$_POST['productID'];
}
}
else
{
$productID = ( integer )$_GET['productID'];
}
if ( isset( $_GET['register'] ) || isset( $_GET['register'] ) )
{
$register = isset( $_POST['register'], $_GET['register'] ) ? $_GET['register'] : $_POST['register'];
}
if ( isset( $_GET['update_details'] ) || isset( $_GET['update_details'] ) )
{
$update_details = isset( $_POST['update_details'], $_GET['update_details'] ) ? $_GET['update_details'] : $_POST['update_details'];
}
if ( isset( $_GET['order'] ) || isset( $_GET['order'] ) )
{
$order = isset( $_POST['order'], $_GET['order'] ) ? $_GET['order'] : $_POST['order'];
}
if ( isset( $_GET['order_without_billing_address'] ) || isset( $_GET['order_without_billing_address'] ) )
{
$order_without_billing_address = isset( $_POST['order_without_billing_address'], $_GET['order_without_billing_address'] ) ? $_GET['order_without_billing_address'] : $_POST['order_without_billing_address'];
}
if ( isset( $_GET['check_order'] ) || isset( $_GET['check_order'] ) )
{
$check_order = isset( $_POST['check_order'], $_GET['check_order'] ) ? $_GET['check_order'] : $_POST['check_order'];
}
if ( isset( $_GET['proceed_ordering'] ) || isset( $_GET['proceed_ordering'] ) )
{
$proceed_ordering = isset( $_POST['proceed_ordering'], $_GET['proceed_ordering'] ) ? $_GET['proceed_ordering'] : $_POST['proceed_ordering'];
}
if ( isset( $_GET['update_customer_info'] ) || isset( $_GET['update_customer_info'] ) )
{
$update_customer_info = isset( $_POST['update_customer_info'], $_GET['update_customer_info'] ) ? $_GET['update_customer_info'] : $_POST['update_customer_info'];
}
if ( isset( $_GET['view_content'] ) || isset( $_GET['view_content'] ) )
{
$view_content = isset( $_POST['view_content'], $_GET['view_content'] ) ? $_GET['view_content'] : $_POST['view_content'];
}
if ( isset( $_GET['visit_history'] ) || isset( $_POST['visit_history'] ) )
{
$visit_history = 1;
}
if ( isset( $_GET['order_history'] ) || isset( $_POST['order_history'] ) )
{
$order_history = 1;
}
if ( isset( $_GET['address_book'] ) || isset( $_POST['address_book'] ) )
{
$address_book = 1;
}
if ( isset( $_GET['address_editor'] ) || isset( $_GET['address_editor'] ) )
{
$address_editor = isset( $_POST['address_editor'], $_GET['address_editor'] ) ? $_GET['address_editor'] : $_POST['address_editor'];
}
if ( isset( $_GET['add_new_address'] ) || isset( $_GET['add_new_address'] ) )
{
$add_new_address = isset( $_POST['add_new_address'], $_GET['add_new_address'] ) ? $_GET['add_new_address'] : $_POST['add_new_address'];
}
if ( isset( $_GET['contact_info'] ) || isset( $_GET['contact_info'] ) )
{
$contact_info = isset( $_POST['contact_info'], $_GET['contact_info'] ) ? $_GET['contact_info'] : $_POST['contact_info'];
}
if ( isset( $_GET['comparison_products'] ) || isset( $_POST['comparison_products'] ) )
{
$comparison_products = 1;
}
if ( isset( $_GET['register_authorization'] ) || isset( $_POST['register_authorization'] ) )
{
$register_authorization = 1;
}
if ( isset( $_GET['page_not_found'] ) || isset( $_POST['page_not_found'] ) )
{
$page_not_found = 1;
}
if ( isset( $_GET['news'] ) || isset( $_GET['news'] ) )
{
$news = 1;
}
if ( isset( $_GET['quick_register'] ) )
{
$quick_register = 1;
}
if ( isset( $_GET['order2_shipping_quick'] ) )
{
$order2_shipping_quick = 1;
}
if ( isset( $_GET['order3_billing_quick'] ) )
{
$order3_billing_quick = 1;
}
if ( isset( $_GET['order2_shipping'] ) || isset( $_POST['order2_shipping'] ) )
{
$order2_shipping = 1;
}
if ( isset( $_GET['order3_billing'] ) || isset( $_POST['order3_billing'] ) )
{
$order3_billing = 1;
}
if ( isset( $_GET['change_address'] ) || isset( $_POST['change_address'] ) )
{
$change_address = 1;
}
if ( isset( $_GET['order4_confirmation'] ) || isset( $_POST['order4_confirmation'] ) )
{
$order4_confirmation = 1;
}
if ( isset( $_GET['order4_confirmation_quick'] ) || isset( $_POST['order4_confirmation_quick'] ) )
{
$order4_confirmation_quick = 1;
}
if ( isset( $_GET['order_detailed'] ) || isset( $_GET['order_detailed'] ) )
{
$order_detailed = isset( $_POST['order_detailed'], $_GET['order_detailed'] ) ? $_GET['order_detailed'] : $_POST['order_detailed'];
}
if ( !isset( $_SESSION['vote_completed'] ) )
{
$GLOBALS['_SESSION']['vote_completed'] = array( );
}
$offset = isset( $_GET['offset'] ) ? $_GET['offset'] : 0;
if ( $offset < 0 || $offset % CONF_PRODUCTS_PER_PAGE )
{
$offset = 0;
}
if ( isset( $productID ) )
{
if ( !( $q = db_query( "SELECT categoryID FROM ".PRODUCTS_TABLE.( " WHERE productID='".$productID."'" ) ) ) )
{
exit( db_error( ) );
}
$r = db_fetch_row( $q );
if ( $r )
{
$categoryID = $r[0];
}
}
$smarty->template_dir = "./templates/frontend/".$lang_list[$_SESSION['current_language']]->template_path;
$smarty_mail->template_dir = "./templates/email";
if ( !( $q = db_query( "select CID, Name, code, currency_value, where2show from ".CURRENCY_TYPES_TABLE." order by sort_order" ) ) )
{
exit( db_error( ) );
}
$currencies = array( );
while ( $row = db_fetch_row( $q ) )
{
$currencies[] = $row;
}
$smarty->assign( "currencies", $currencies );
$smarty->assign( "currencies_count", count( $currencies ) );
$smarty->assign( "lang_list", $lang_list );
if ( isset( $_SESSION['current_language'] ) )
{
$smarty->assign( "current_language", $_SESSION['current_language'] );
}
if ( isset( $_SESSION['log'] ) )
{
$smarty->assign( "log", $_SESSION['log'] );
}
if ( isset( $categoryID ) )
{
$smarty->assign( "categoryID", $categoryID );
}
if ( isset( $productID ) )
{
$smarty->assign( "productID", $productID );
}
if ( isset( $_GET['currency'] ) )
{
$smarty->assign( "currency", $_GET['currency'] );
}
if ( isset( $_GET['user_details'] ) )
{
$smarty->assign( "user_details", $_GET['user_details'] );
}
if ( isset( $_GET['aux_page'] ) )
{
$smarty->assign( "aux_page", $_GET['aux_page'] );
}
if ( isset( $_GET['show_price'] ) )
{
$smarty->assign( "show_price", $_GET['show_price'] );
}
if ( isset( $_GET['adv_search'] ) )
{
$smarty->assign( "adv_search", $_GET['adv_search'] );
}
if ( isset( $_GET['searchstring'] ) )
{
$smarty->xassign( "searchstring", $_GET['searchstring'] );
}
if ( isset( $register ) )
{
$smarty->assign( "register", $register );
}
if ( isset( $order ) )
{
$smarty->assign( "order", $order );
}
if ( isset( $check_order ) )
{
$smarty->assign( "check_order", $check_order );
}
$smarty->assign( "main_content_template", "home.tpl.html" );
$includes_dir = opendir( "./includes" );
$files = array( );
while ( ( $inc_file = readdir( $includes_dir ) ) != false )
{
if ( strstr( $inc_file, ".php" ) )
{
$files[] = $inc_file;
}
}
sort( $files );
foreach ( $files as $fl )
{
include( "./includes/".$fl );
}
if ( file_exists( "./install.php" ) )
{
echo WARNING_DELETE_INSTALL_PHP;
}
if ( is_writable( "./temp" ) )
{
if ( is_writable( "./products_files" ) )
{
if ( is_writable( "./products_pictures" ) )
{
}
}
}
if ( !is_writable( "./templates_c" ) )
{
echo WARNING_WRONG_CHMOD;
}
if ( isset( $_SESSION['log'] ) && !strcmp( $_SESSION['log'], ADMIN_LOGIN ) )
{
echo "";
}
$yahoo = _getsettingoptionvalue( "CONF_YAHOO_ID" );
if ( $yahoo )
{
$smarty->assign( "yahoo", 1 );
}
$aux_pages = auxpggetallpageattributes( );
if ( count( $aux_pages ) != 0 )
{
$smarty->assign( "aux_page1", $aux_pages[0] );
}
if ( 1 < count( $aux_pages ) )
{
$smarty->assign( "aux_page2", $aux_pages[1] );
}
$smarty->display( "index.tpl.html" );


?>

binyaft
چهارشنبه 03 شهریور 1389, 23:11 عصر
شما اومدید این خطا هارو برداشتید

}
else
{
echo "Your Licence is Invalid !";
}

خوب چرا باید برنامه رو ناقص کنیم
شاید اشکال از جای دیگه ایه

UnnamE
پنج شنبه 04 شهریور 1389, 01:00 صبح
خدای من ....
شما چقدر این کد رو بی مورد طولانی کردین
راحت تر میتونستین این رو کد رو بنوسین...

Hell Lord
پنج شنبه 04 شهریور 1389, 01:33 صبح
شما اومدید این خطا هارو برداشتید

}
else
{
echo "Your Licence is Invalid !";
}خوب چرا باید برنامه رو ناقص کنیم
شاید اشکال از جای دیگه ایه
جانم؟

if ( $hash != LICENCE )
{
echo "Your Licence is Invalid !";
exit;
}
اینجا را ندیدید!

amirpoor
پنج شنبه 04 شهریور 1389, 08:08 صبح
راه حل چیه ؟

mojtaba_apadana
پنج شنبه 04 شهریور 1389, 16:17 عصر
ehtemalan ye if kam gozashti, yani Elseet ziadi

amirpoor
پنج شنبه 04 شهریور 1389, 17:08 عصر
آخه اگه else رو بردارم باز هم خطا می گیره

amirpoor
جمعه 05 شهریور 1389, 11:20 صبح
کسی نمی تونه راهنمایی کنه ؟

Hell Lord
شنبه 06 شهریور 1389, 02:19 صبح
کی که برایتان گذاشتم را تست کردید؟
:متفکر:

mermaid
شنبه 06 شهریور 1389, 04:06 صبح
اول کدی که Hell Lord براتون گذاشته رو تست کنید...

اما کلا بهتره از یک ویرایشگر استفاده کنید که بتونه جفتهایی مثل if-else یا پرانتزها رو با هم تطبیق بده و بهتون نشون بده... من خودم از NetBeans استفاده می کنم... رایگان هم هست و خیلی قابلیت داره...

amirpoor
شنبه 06 شهریور 1389, 07:51 صبح
کدی که آقای Hell Lordگذاشتن رو تست کردم اما چه فایده خطی که خطای لایسنس رو می گیره حذف کردند

این خط حتما باید باشه تا اگه کسی سریال اشتباه زد پیغام صحیح نبودن لایسنس رو نشون بده

binyaft
شنبه 06 شهریور 1389, 10:18 صبح
خوب اون اقا اومده کد هایی رو که برای اشتباه بودن لایسنس هست رو برداشته شما جدا گانه بنویسید
مثلا در اخر کد


if($code=='123456') { echo 'licence is true'; } else { echo 'licence is False'; }

Hell Lord
یک شنبه 07 شهریور 1389, 00:49 صبح
بنده کد ها را بر نداشتم که جناب !
یک نگاهی مینداختید! خط 56 :

if ( $hash != LICENCE )
{
echo "Your Licence is Invalid !";
exit;
}

binyaft
یک شنبه 07 شهریور 1389, 09:30 صبح
کدی که آقای Hell Lordگذاشتن رو تست کردم اما چه فایده خطی که خطای لایسنس رو می گیره حذف کردند

این خط حتما باید باشه تا اگه کسی سریال اشتباه زد پیغام صحیح نبودن لایسنس رو نشون بده
من معذرت میخوام
فکر کردم برداشتید

elham.net
یک شنبه 07 شهریور 1389, 14:39 عصر
چرا همه کروشه ها باز} هستند کروشه بسته نداری ؟{