sms sistemos erroras

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
PSH
Jau po truputį tampa savu
Posts: 153
Joined: 2012 Aug 27 17:05
Skype: pashokas13

sms sistemos erroras

Post by PSH »

Kame beda? Ismeta stai toki errora? uzeinu www.godgame.lt/paslaugos Virsuje
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/godgame/domains/godgame.lt/public_html/paslaugos/index.php:1) in /home/godgame/domains/godgame.lt/public_html/paslaugos/functions.php on line 11

User avatar
V1LKAS
Flooderis arba specialistas
Posts: 612
Joined: 2012 Nov 08 12:55
Skype: darius489

Re: sms sistemos erroras

Post by V1LKAS »

<?php
ob_start();
session_start();

PSH
Jau po truputį tampa savu
Posts: 153
Joined: 2012 Aug 27 17:05
Skype: pashokas13

Re: sms sistemos erroras

Post by PSH »

Nezinau errora meto stai kodas defaultinio functions failo.

Sutvarkykit dekingas labai buciau :)

Code: Select all

<?/*** @version 1.0* @copyright (c) 2011 VPSnet.lt* @source http://www.how-to.lt/viewtopic.php?f=4&t=48**/ error_reporting( E_ALL );session_start (); include_once ( "rcon.php" ); function sql_connect ()    {    global $config;        $c = mysql_connect ( $config->db_host, $config->db_user, $config->db_pass ) or exit ( mysql_error () );    mysql_select_db( $config->db_name ) or exit ( mysql_error () );        return $c;    }    function url ()     {               $e = explode ( "?", $_SERVER['REQUEST_URI'] );        for ( $i = 1; $i < count ( $e ); $i++ )        {        if ( isset ( $e[$i] ) and strlen ( $e[$i] ) > 0 )            $url[$i] = $e[$i];        }    if ( isset ( $url ) )        return (array) $url;     return (bool) false;    }    function escape ( $string )     {    if ( ini_get ( 'magic_quotes_gpc' ) )         $string = stripslashes ( $string );            return mysql_real_escape_string ( $string );    }    function create ()    {    $sql = array ();    $sql[] = "create table if not exists vpsnet_sms (        id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,        nr VARCHAR(25) NOT NULL,        time INT(25) NOT NULL,        price INT(25) NOT NULL,        PRIMARY KEY (id)        );";            $sql[] = "create table if not exists vpsnet_log (        id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,        time INT(25) NOT NULL,        log TEXT,        PRIMARY KEY (id)        );";            $sql[] = "create table if not exists vpsnet_sell (        id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,        access VARCHAR(25) NOT NULL,        name TEXT,        price INT(25) NOT NULL,        PRIMARY KEY (id)        );";            $sql[] = "create table if not exists vpsnet_users (        id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,        time VARCHAR(25) NOT NULL,        nr VARCHAR(25) NOT NULL,        ip VARCHAR(255) NOT NULL,        priv VARCHAR(255) NOT NULL,        PRIMARY KEY (id)        );";        for ( $i = 0; $i < count ( $sql ); $i++ )        mysql_query ( $sql[$i] ) or exit ( mysql_error () );            $vpsnet_id = @mysql_query ( "select `vpsnet_id` from `amx_amxadmins` where 1" );    if ( !$vpsnet_id )         mysql_query ( "alter table `amx_amxadmins` add `vpsnet_id` INT(11) NOT NULL" ) or exit ( "Pirma įrašykite AMXBans 5.1b" );    }    function add2log ( $text )    {    $time = time ();    $text = escape ( $text );        mysql_query ( "insert into `vpsnet_log` set `time` = '$time', `log` = '$text'" ) or exit ( mysql_error () );    }    function checkTransaction ( $transaction, $orderid, $status, $sum )    {    global $config;        $passwords = array ( $config->key, $config->key_pass );        foreach( $passwords as $key => $password )        {        $t = md5 ( "{$password}|{".$_SERVER['REMOTE_ADDR']."}|{$orderid}|{$status}|{$sum}" );                if( $transaction==$t )            return true;        }            return false;    }    function post_check ( )    {           $keys = array_keys ( $_POST );     for ( $i = 0; $i < count ( $keys ); $i++ )        {        if ( !isset ( $_POST[$keys[$i]] ) or strlen ( $_POST[$keys[$i]] ) < 1 )            return false;        }        return true;    }    function shop ( )    {    print ( '<div id="shop" class="p10">' );        print ( '<div class="pad-line center">' );            print ( 'Paslauga bus uždėta ant <b>'.$_SERVER['REMOTE_ADDR'].'</b> IP' );        print ( '</div>' );        print ( '<div class="pad-line center">' );            $form = escape ( $_POST['form'] );            $balansas = mysql_fetch_assoc ( mysql_query ( "select `price` from `vpsnet_sms` where `nr` = '370$form'" ) );            $q = mysql_query ( "select * from `vpsnet_sell` where `access` not like 'unban'" );            if ( mysql_num_rows ( $q ) > 0 )                {                print ( '<select id="select">' );                    while ( $f = mysql_fetch_assoc ( $q ) )                        {                        if ( $balansas['price'] < ( $f['price'] * 100 ) )                            continue;                                                    print ( '<option value="'.$f['id'].'">'.$f['name'].' - '. $f['price'] .' Lt</option>' );                        }                print ( '</select>' );                print ( '<div class="pad-line center spacer">' );                    print ( '<input type="submit" value="Pirkti!" class="unban bold" onclick="buy(\'output\')" />' );                print ( '</div>' );                }            else                {                print ( '<span class="bold red">Nėra parduodamų paslaugų</span>' );                }        print ( '</div>' );    print ( '</div>' );    }    function reloadadmins ()    {    $q = mysql_query ( "select * from `amx_serverinfo`" );    while ( $f = mysql_fetch_assoc ( $q ) )        {        if ( !isset ( $f['rcon'] ) )            continue;                    $explode = explode ( ":", $f['address'] );                                        $rcon = new CSRcon( $explode[0], $explode[1], $f['rcon'] );         $rcon->connect();        if ( $rcon->IsConnected() )            $rcon->RconCommand("amx_reloadadmins");                             }    }    function remove_rights ()    {    $time = time () - 60*60*24*31;        $q = mysql_query ( "select * from `vpsnet_users` where `time` < '$time'" );    while ( $f = mysql_fetch_assoc ( $q ) )        {        $last_id = mysql_fetch_assoc ( mysql_query ( "select `id` from `amx_amxadmins` where `vpsnet_id` = '{$f['id']}'" ) );        mysql_query ( "delete from `amx_admins_servers` where `admin_id` = '{$last_id['id']}'" ) or exit ( mysql_error () );        mysql_query ( "delete from `amx_amxadmins` where `vpsnet_id` = '{$f['id']}'" ) or exit ( mysql_error () );        mysql_query ( "delete from `vpsnet_users` where `id` = '{$f['id']}'" ) or exit ( mysql_error () );                    reloadadmins ();                add2log ( "Baigėsi IP: {$f['ip']} (nr: {$f['nr']}) paslaugos galiojimo laikas" );        }    }    function version ()    {    $ver = 1.0;        $v = @file_get_contents( "http://www.hns.lt/parduotuve/version.txt" ); // Tikriname ar yra parduotuvės atnaujinimas    if ( $v !== false )        {        $exp = explode ( " ", $v );                if ( $exp[0] > $ver )            {            print '<span class="red">Išleistas parduotuvės atnaujinimas [v '.$exp[0].'], jį galite gauti <a href="'.$exp[1].'" target="_blank" class="update">čia</a>';            }        }    }?>

User avatar
V1LKAS
Flooderis arba specialistas
Posts: 612
Joined: 2012 Nov 08 12:55
Skype: darius489

Re: sms sistemos erroras

Post by V1LKAS »

Code: Select all

<?ob_start();error_reporting( E_ALL );session_start (); include_once ( "rcon.php" ); function sql_connect ()    {    global $config;        $c = mysql_connect ( $config->db_host, $config->db_user, $config->db_pass ) or exit ( mysql_error () );    mysql_select_db( $config->db_name ) or exit ( mysql_error () );        return $c;    }    function url ()     {               $e = explode ( "?", $_SERVER['REQUEST_URI'] );        for ( $i = 1; $i < count ( $e ); $i++ )        {        if ( isset ( $e[$i] ) and strlen ( $e[$i] ) > 0 )            $url[$i] = $e[$i];        }    if ( isset ( $url ) )        return (array) $url;     return (bool) false;    }    function escape ( $string )     {    if ( ini_get ( 'magic_quotes_gpc' ) )         $string = stripslashes ( $string );            return mysql_real_escape_string ( $string );    }    function create ()    {    $sql = array ();    $sql[] = "create table if not exists vpsnet_sms (        id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,        nr VARCHAR(25) NOT NULL,        time INT(25) NOT NULL,        price INT(25) NOT NULL,        PRIMARY KEY (id)        );";            $sql[] = "create table if not exists vpsnet_log (        id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,        time INT(25) NOT NULL,        log TEXT,        PRIMARY KEY (id)        );";            $sql[] = "create table if not exists vpsnet_sell (        id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,        access VARCHAR(25) NOT NULL,        name TEXT,        price INT(25) NOT NULL,        PRIMARY KEY (id)        );";            $sql[] = "create table if not exists vpsnet_users (        id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,        time VARCHAR(25) NOT NULL,        nr VARCHAR(25) NOT NULL,        ip VARCHAR(255) NOT NULL,        priv VARCHAR(255) NOT NULL,        PRIMARY KEY (id)        );";        for ( $i = 0; $i < count ( $sql ); $i++ )        mysql_query ( $sql[$i] ) or exit ( mysql_error () );            $vpsnet_id = @mysql_query ( "select `vpsnet_id` from `amx_amxadmins` where 1" );    if ( !$vpsnet_id )         mysql_query ( "alter table `amx_amxadmins` add `vpsnet_id` INT(11) NOT NULL" ) or exit ( "Pirma įrašykite AMXBans 5.1b" );    }    function add2log ( $text )    {    $time = time ();    $text = escape ( $text );        mysql_query ( "insert into `vpsnet_log` set `time` = '$time', `log` = '$text'" ) or exit ( mysql_error () );    }    function checkTransaction ( $transaction, $orderid, $status, $sum )    {    global $config;        $passwords = array ( $config->key, $config->key_pass );        foreach( $passwords as $key => $password )        {        $t = md5 ( "{$password}|{".$_SERVER['REMOTE_ADDR']."}|{$orderid}|{$status}|{$sum}" );                if( $transaction==$t )            return true;        }            return false;    }    function post_check ( )    {           $keys = array_keys ( $_POST );     for ( $i = 0; $i < count ( $keys ); $i++ )        {        if ( !isset ( $_POST[$keys[$i]] ) or strlen ( $_POST[$keys[$i]] ) < 1 )            return false;        }        return true;    }    function shop ( )    {    print ( '<div id="shop" class="p10">' );        print ( '<div class="pad-line center">' );            print ( 'Paslauga bus uždėta ant <b>'.$_SERVER['REMOTE_ADDR'].'</b> IP' );        print ( '</div>' );        print ( '<div class="pad-line center">' );            $form = escape ( $_POST['form'] );            $balansas = mysql_fetch_assoc ( mysql_query ( "select `price` from `vpsnet_sms` where `nr` = '370$form'" ) );            $q = mysql_query ( "select * from `vpsnet_sell` where `access` not like 'unban'" );            if ( mysql_num_rows ( $q ) > 0 )                {                print ( '<select id="select">' );                    while ( $f = mysql_fetch_assoc ( $q ) )                        {                        if ( $balansas['price'] < ( $f['price'] * 100 ) )                            continue;                                                    print ( '<option value="'.$f['id'].'">'.$f['name'].' - '. $f['price'] .' Lt</option>' );                        }                print ( '</select>' );                print ( '<div class="pad-line center spacer">' );                    print ( '<input type="submit" value="Pirkti!" class="unban bold" onclick="buy(\'output\')" />' );                print ( '</div>' );                }            else                {                print ( '<span class="bold red">Nėra parduodamų paslaugų</span>' );                }        print ( '</div>' );    print ( '</div>' );    }    function reloadadmins ()    {    $q = mysql_query ( "select * from `amx_serverinfo`" );    while ( $f = mysql_fetch_assoc ( $q ) )        {        if ( !isset ( $f['rcon'] ) )            continue;                    $explode = explode ( ":", $f['address'] );                                        $rcon = new CSRcon( $explode[0], $explode[1], $f['rcon'] );         $rcon->connect();        if ( $rcon->IsConnected() )            $rcon->RconCommand("amx_reloadadmins");                             }    }    function remove_rights ()    {    $time = time () - 60*60*24*31;        $q = mysql_query ( "select * from `vpsnet_users` where `time` < '$time'" );    while ( $f = mysql_fetch_assoc ( $q ) )        {        $last_id = mysql_fetch_assoc ( mysql_query ( "select `id` from `amx_amxadmins` where `vpsnet_id` = '{$f['id']}'" ) );        mysql_query ( "delete from `amx_admins_servers` where `admin_id` = '{$last_id['id']}'" ) or exit ( mysql_error () );        mysql_query ( "delete from `amx_amxadmins` where `vpsnet_id` = '{$f['id']}'" ) or exit ( mysql_error () );        mysql_query ( "delete from `vpsnet_users` where `id` = '{$f['id']}'" ) or exit ( mysql_error () );                    reloadadmins ();                add2log ( "Baigėsi IP: {$f['ip']} (nr: {$f['nr']}) paslaugos galiojimo laikas" );        }    }    function version ()    {    $ver = 1.0;        $v = @file_get_contents( "http://www.hns.lt/parduotuve/version.txt" ); // Tikriname ar yra parduotuvės atnaujinimas    if ( $v !== false )        {        $exp = explode ( " ", $v );                if ( $exp[0] > $ver )            {            print '<span class="red">Išleistas parduotuvės atnaujinimas [v '.$exp[0].'], jį galite gauti <a href="'.$exp[1].'" target="_blank" class="update">čia</a>';            }        }    }?>

Zaidejas1
O taip. Jis jau surinko 50 žinučių!
Posts: 52
Joined: 2013 Jun 14 11:41

Re: sms sistemos erroras

Post by Zaidejas1 »

Nieko nereikia daryti, tieiog prieš keisdamas index.php failą, norint keisti numerį į 1398. Būtina jį pakeisti atsidarius index.php tik su Notepad++ programa ir išsaugoji, tada viskas veiks. Beje, redaguok originalų failą.

Prisegu tau index.php, jį įsikelk į sms sistemą nieko nekeisdamas ir nebus tau erroro. ;)
Attachments
index.rar
(3.59 KiB) Downloaded 206 times

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests