Website by Leandro-Iron

Page 2 of 9 FirstFirst 123456789 LastLast
Results 16 to 30 of 122
  1. #16
    <NULL> Acnathon is offline
    MemberRank
    Apr 2007 Join Date
    RaGEZONELocation
    463Posts

    Re: Website by Leandro-Iron

    Quote Originally Posted by hisync View Post
    hi everyone i have a problem when registrering an account, im using SQL2005, restored all queries successfully, configured the confCabal.

    Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'cabal_auth_table'. (severity 16) in C:\xampp\htdocs\functions\funcQuery.php on line 112

    Warning: mssql_query() [function.mssql-query]: message: Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 0, current count = 1. (severity 16) in C:\xampp\htdocs\functions\funcQuery.php on line 112

    Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\functions\funcQuery.php on line 112
    He has the extension but the problem reffers to something else.
    hisync make sure you run all the querys and also check ur configuracao/confCabal.php if its configured correctly.

    Code:
    Invalid object name 'cabal_auth_table'.
    It cant be invalid only if something is missconfigured.

  2. #17
    Apprentice FendiTze is offline
    MemberRank
    Mar 2008 Join Date
    PekanbaruLocation
    12Posts

    Re: Website by Leandro-Iron

    Quote Originally Posted by Popa Andrei View Post
    Fenditze are you talking about an shop?
    If yes use chumpy`s shop.Search here in the release zone ;)

    EDIT: Iron can you realease some plugins or you only sell them?
    thanks
    but i lose my id admin.. can u learn me, how can i make my id to admin
    i use GM tool --> make to char not id
    i want to Admin
    please help me

  3. #18
    Account Upgraded | Title Enabled! xXxAxXx is offline
    MemberRank
    Apr 2011 Join Date
    UndergroudLocation
    420Posts

    Re: Website by Leandro-Iron

    in the config of the site you must define the admins name.
    Look for
    $confGeral['ID_ADM'] = array('Admin1','Admin2'); //Login adms

  4. #19
    Logged in to "The World" TriEdge is offline
    MemberRank
    Sep 2010 Join Date
    465Posts

    Re: Website by Leandro-Iron

    does someone got a good vote panel? Oo this site doesnt got one :/

  5. #20
    Fuck. SheenBR is offline
    ModeratorRank
    Feb 2008 Join Date
    Jaú, BrazilLocation
    2,433Posts

    Re: Website by Leandro-Iron

    Well, I have some things to say about this script. Its a critic to make it better.

    1 - dont use mssql functions. MSSQL are just to SQL while with ODBC you can connect to a lot more database servers than just mssql. and, a lot of php compiled versions do not come with this feature enabled. you'll need to activate it in your php.ini and download some separate files aswell.( I've suffered alot with this mssql thing :( )
    2 - I'm not sure why you do all you html codes inside of a echo. that doesnt make any sense to me.
    3 - I noticed that you dont do any padding in your codes, like:
    Code:
    if ()
    {
    <tab>code
    }
    this doesnt influences in nothing, but it is better to see in which if block you are into.

    4 - its kinda "dangerous" to make "require()". make sure to require that page only once, using "require_once()".

    5 - do not make includes inside of a function. create a base class with all your database information and then you just inherit it.
    Code:
    class validate_login extends sql_class
    6 - just for pattern, session_start() comes in the very first line of the php script - if you are using session which I belive is the case. (use ob_start() too.)

    7 - confCabal.php is connecting to the database, and you are requiring it in every php page. dont you think this might compromise your database?

  6. #21
    Apprentice cortonj is offline
    MemberRank
    Sep 2008 Join Date
    15Posts

    Re: Website by Leandro-Iron

    Awesome release. Thanks!

  7. #22
    Enthusiast Windows7 is offline
    MemberRank
    Oct 2011 Join Date
    39Posts

    Re: Website by Leandro-Iron

    -CAN YOU HELP ME ? I SOLVED A LOT OF PROBLEMS IN THIS WEBSITE AND CHANGE SOME DESIGNES,BUT STILL SOME ERROR AND I CAN'T SOLVE THEM,I WILL BE GLAD IF YOU CAN HELP ME,THANKS (THERE ARE THE ERRORS)

    Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'ACCOUNT.dbo.DBANNER'. (severity 16) in C:\xampp\htdocs\XXX\index.php on line 297

    Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\XXX\index.php on line 297

    Warning: mssql_num_rows(): supplied argument is not a valid MS SQL-result resource in C:\xampp\htdocs\XXX\index.php on line 300

    -BIG LIKE AND THANKS
    Last edited by Yamachi; 19-11-11 at 02:16 PM. Reason: DON'T MINI-MOD!!

  8. #23
    <NULL> Acnathon is offline
    MemberRank
    Apr 2007 Join Date
    RaGEZONELocation
    463Posts

    Re: Website by Leandro-Iron

    It seems like the name for the table was changed. :) Check that line and instead of DBANNER put CADBANNER and it will work :)

  9. #24
    Account Upgraded | Title Enabled! xXxAxXx is offline
    MemberRank
    Apr 2011 Join Date
    UndergroudLocation
    420Posts

    Re: Website by Leandro-Iron

    Quote Originally Posted by SheenBR View Post
    7 - confCabal.php is connecting to the database, and you are requiring it in every php page. dont you think this might compromise your database?
    But the files requiers the conf to display the info.How to you sugest that solve this?

  10. #25
    Fuck. SheenBR is offline
    ModeratorRank
    Feb 2008 Join Date
    Jaú, BrazilLocation
    2,433Posts

    Re: Website by Leandro-Iron

    Create a simple class to handle SQL. Calls the constructor method just once to handle the database. Then you can add a if case, to test if the connection is already opened. If not then connect to the database, if its already connected do nothing.
    Define the methods that access the database as static.
    therefore,as the function is static, you wont need to create a new instance of the class to access its functions.

  11. #26
    Account Upgraded | Title Enabled! xXxAxXx is offline
    MemberRank
    Apr 2011 Join Date
    UndergroudLocation
    420Posts

    Re: Website by Leandro-Iron

    Quote Originally Posted by SheenBR View Post
    Create a simple class to handle SQL. Calls the constructor method just once to handle the database. Then you can add a if case, to test if the connection is already opened. If not then connect to the database, if its already connected do nothing.
    Define the methods that access the database as static.
    therefore,as the function is static, you wont need to create a new instance of the class to access its functions.
    i would like to say that i understood what you seed but i am not so good at php(at least not yet)
    Can you help with this?

  12. #27
    <NULL> Acnathon is offline
    MemberRank
    Apr 2007 Join Date
    RaGEZONELocation
    463Posts

    Re: Website by Leandro-Iron

    PHP Code:
    <?
    class checkDB {
        function 
    connectdb() {
            
    $link mssql_connect(DB_ADDRDB_USERDB_PASS); 
            if (!
    $link) die('Failed to connect to the database.');
        }
    }
    ?>
    Something like this?

    Edit: & using like this ?
    PHP Code:
    <?
           $class 
    = new checkDB;
           
    $class -> connectdb();
    ?>
    Last edited by Acnathon; 20-11-11 at 01:34 AM.

  13. #28
    Account Upgraded | Title Enabled! xXxAxXx is offline
    MemberRank
    Apr 2011 Join Date
    UndergroudLocation
    420Posts

    Re: Website by Leandro-Iron

    you guys are really forcing me to start learning php :D
    This must be set in the config.php

  14. #29
    Fuck. SheenBR is offline
    ModeratorRank
    Feb 2008 Join Date
    Jaú, BrazilLocation
    2,433Posts

    Re: Website by Leandro-Iron

    no. the mssql_connection will be executed always.

    I remembered here, you can always use the persitent database connection methods =p

    mysql_pconnect()
    mssql_pconnect()
    odbc_pconnect()

    MORE INFO HERE

    Code:
    <?
    
    class database
    {
    	public static $connected = false;
    	
    	static function connect_db()
    	{
    		if(!self::$connected)
    		{
    			$link = odbc_pconnect("DRIVER={SQL Server}; SERVER=.\SQLEXPRESS; DATABASE=PTEmu;", "sa","123456");
    			if($link)
    				self::$connected = true;
    		}
    		echo self::$connected;
    	}
    }
    class use_db extends database
    {
    	function __construct()
    	{
    		if(!parent::$connected)
    		{
    			echo "database not connected, connecting...";
    			parent::connect_db();
    			echo "database methods";
    		}
    		else
    		{
    			echo "database connected, methods here";
    		}
    	}
    }
    
    $v = new use_db;
    
    ?>
    This class isnot very fancy, I made it now, but its good for you to learn inheritance in php, which is very important.

    its been a while that I stopped with PHP, $connected will always be false everytime you refresh the page, so it'll always show the "database not connected" message.

    My goal is force you to learn PHP or whichever language. I will not provide a "ready to go code".

    With non-static methods I have to create a class instance like:
    $instance = new myClass;
    $instance->myNonStaticFunc();

    With static methods the need to create a class instance is gone.
    myClass::myStaticMethod();

  15. #30
    Slothstronaut Justice For All is offline
    MemberRank
    Aug 2011 Join Date
    Almost thereLocation
    3,254Posts

    Re: Website by Leandro-Iron

    Looks nice but on the other hand a little too plain. Nonetheless yeah nice job :)



Advertisement