Jump to content
php.lv forumi

Vecteevs

Reģistrētie lietotāji
  • Posts

    227
  • Joined

  • Last visited

Posts posted by Vecteevs

  1. It kā tiek atskaitīta no kredītkartes. Bankā parādās pie rezervētajām summām. Vismaz tā tam būtu jābūt. Jo uzreiz naudu neatskaita, tas tik ātri nenotiek. Gan jau pēc 1 dienas maksājums tika atcelts jo reāli pārdevējs nesaņem to naudu. Tas ir pēc manas pieredzes

  2. if($power == 'USER'){
       echo 'useris';
    }elseif($power == 'MODERATOR'){
       echo 'moderators';
    }elseif($power == 'ADMIN'){
       echo 'admins';
    }elseif($power == 'OWNER'){
       echo 'owneris';
    }

     

    ..ja klase ir ADMIN

    tad man parāda vienkārši "admins" nevis useris, moderators, admins..

    Varbūt jādara kā savādāk?

  3. Sveicināti, kā jau parasti nomoka problēma un vēršos pēc palīdzības.

    Tātad ir lietotāju tabula ar 4 lietotāju grupām

    1. user

    2. moderator

    3. admin

    4.owner

     

    šie lauki datubāzē ir kā enum.

     

    man vajag izdarīt tā lai admins var aplūkot to ko redz moderators un useris, savukārt moderators var darīt tikai to ko useris

    mēģināju ar if/else kaut kā nesanāk. varēju tikai konkrētās klases darbības veikt

    cerams ka sapratāt manu problēmu

  4. pārinstalēju un error logs ir šāds. Un es lietoju appserv

     

    [Tue Jul 12 14:38:22 2011] [notice] Parent: child process exited with status 3221225477 -- Restarting.

    PHP Warning: Directive 'register_globals' is no longer supported in PHP 6 and greater in Unknown on line 0

    PHP Warning: Directive 'register_long_arrays' is no longer supported in PHP 6 and greater in Unknown on line 0

    PHP Warning: Directive 'magic_quotes_gpc' is no longer supported in PHP 6 and greater in Unknown on line 0

    [Tue Jul 12 14:38:23 2011] [notice] Apache/2.2.8 (Win32) PHP/6.0.0-dev configured -- resuming normal operations

    [Tue Jul 12 14:38:23 2011] [notice] Server built: Jan 18 2008 00:37:19

    [Tue Jul 12 14:38:24 2011] [notice] Parent: Created child process 3192

    Apache server shutdown initiated...

    PHP Warning: Directive 'register_globals' is no longer supported in PHP 6 and greater in Unknown on line 0

    PHP Warning: Directive 'register_long_arrays' is no longer supported in PHP 6 and greater in Unknown on line 0

    PHP Warning: Directive 'magic_quotes_gpc' is no longer supported in PHP 6 and greater in Unknown on line 0

    [Tue Jul 12 14:38:25 2011] [notice] Child 3192: Child process is running

    [Tue Jul 12 14:38:25 2011] [notice] Child 3192: Acquired the start mutex.

    [Tue Jul 12 14:38:25 2011] [notice] Child 3192: Starting 64 worker threads.

    [Tue Jul 12 14:38:25 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.

    [Tue Jul 12 14:38:25 2011] [notice] Child 3192: Exit event signaled. Child process is ending.

    [Tue Jul 12 14:38:25 2011] [notice] Child 3192: Starting thread to listen on port 80.

    [Tue Jul 12 14:38:26 2011] [notice] Child 3192: Released the start mutex

    [Tue Jul 12 14:38:27 2011] [notice] Child 3192: All worker threads have exited.

    [Tue Jul 12 14:38:27 2011] [notice] Child 3192: Child process is exiting

    [Tue Jul 12 14:38:27 2011] [notice] Parent: Child process exited successfully.

     

    daGrevis, ar eskaipošanu man pārstāj viss darboties.

  5. Sveiki, problēma ir tāda. Kad veicu datubāzes update postojot datus man neļauj izmantot mysql_real_escape_string

    kods man ir šāds

    include("dbc.php");
    $faq=(int)$_POST['faq'];
    $epasts=mysql_real_escape_string($_POST['epasts']);
    $querys=mysql_query("UPDATE lietotaji SET epasts='$epasts' WHERE did='$faq'");
    if($querys){
    echo 'viss notiek!';
    }else{
    	echo 'kautkas nav';
    }
    

    un izmet šādu erroru: 6vj4i76v9drzwcjmoz57.jpg

     

    Bez eskaipošanas viss strādā ;/

  6. tā pat kā ar IP adresēm

    nobalsojot pieliec raksta ID par kuru tiek balsots un balsojumu tabulā ieliec arī balsotāja niku

    piemēram

    INSERT INTO balsojumi (raksta_id, veretjums, niks)VALUES('$id','$vertejums','$niks')

    un tad nočeko kas tas par rakstu lapā un pārbaudi vai rakstam ar tādu ID ir jau lietotājs ar kādu 'niku' balsojis.

  7. Sveiki, te atkal es. Tā kā hosts neļauj augšupielādēt lielus failus, nākas izmantot torrenta failu augšupielādēšanu.

    kas īsti ir tas announce un passkey?

    Un kas jāraksta tajos failos lai varētu lejupielādēt torrentu? Varbūt ir kāda pamācība kā izveidot to announce.php un kāda ir pati ideja kā tas viss strādā?

  8. tagad man izskatās šādi, ja kas jānomaina lūdzu sakiet, no šī īsti nesaprotu.

    ;;;;;;;;;;;;;;;;

    ; File Uploads ;

    ;;;;;;;;;;;;;;;;

     

    ; Whether to allow HTTP file uploads.

    file_uploads = On

     

    ; Temporary directory for HTTP uploaded files (will use system default if not

    ; specified).

    ;upload_tmp_dir =

     

    ; Maximum allowed size for uploaded files.

    upload_max_filesize = 200M

     

     

     

    ; Maximum size of POST data that PHP will accept.

    post_max_size = 200M

     

     

    ;;;;;;;;;;;;;;;;;;;

    ; Resource Limits ;

    ;;;;;;;;;;;;;;;;;;;

     

    max_execution_time = 30 ; Maximum execution time of each script, in seconds

    max_input_time = 60 ; Maximum amount of time each script may spend parsing request data

    memory_limit = 200M ; Maximum amount of memory a script may consume (8MB)

     

    un pats dīvainākais ir tas ka tas phpinfo rāda vecos datus bet php.ini ir mani jaunie dati. restartēju datoru bet tas pats..

     

    EDIT:

     

    Liels paldies, beidzot sanāca.. laikam bija jāpagaida līdz dati atjaunojas. tagad viss iet. Paldies! :)

×
×
  • Create New...