Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 80 van 286

Jvdw

Lid

Berichten
4.321
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
jep

toevoeging op 18 augustus 2012, 20:05:03:
want op mijn pc doet hij het wel, en heb gewoon de map geupload
0
Berichten
1.684
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wat is uitlijning eigenlijk?
Iedereen spreekt erover, maar ik kan echt niets vinden op Google.
Zou iemand dit voor mij kunnen uitleggen of misschien een tutorial hierover plaatsen op one2xs?
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Uitlijning / Indenting:

[COLOR= #0000BB]<?php[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$var[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
    
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$var2[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #0000BB]10[/COLOR][COLOR= #007700]) {[/COLOR]
    
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]UITLIJNING :D[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$var2[/COLOR][COLOR= #007700]++

    }

}[/COLOR]

?>


Het gebruiken van spaties om je code uit te lijnen
0
Berichten
7.806
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wat is er fout aan deze code:
Spoiler tonen
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/global"]global[/URL] [COLOR= #0000BB]$userinfo[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$count[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]"header.php"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]loggedin[/COLOR][COLOR= #007700]]!=[/COLOR][COLOR= #DD0000]1[/COLOR][COLOR= #007700]) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Please <a href=login.php>Login</a> or <a href=register.php>Register</a> to view this page.<br>
    You will be redirected to <a href=login.php>Login</a> page after 3 seconds."[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<meta http-equiv="refresh" content="3;url=login.php"></center>"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]action[/COLOR][COLOR= #007700]]==[/COLOR][COLOR= #DD0000]complete[/COLOR][COLOR= #007700]) {[/COLOR]
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]]==[/COLOR][COLOR= #DD0000]Open[/COLOR][COLOR= #007700]) {[/COLOR]
            [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM offers WHERE id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]oid[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
            [COLOR= #0000BB]$offer[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
            [COLOR= #0000BB]$url[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"[USERNAME]"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$userinfo[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$offer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]url[/COLOR][COLOR= #007700]]);[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE offers SET visits=visits+1 WHERE id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]oid[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<center>You will be redirected to offer in few seconds.<br>If it doesnt happen please click
            <a href="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]">Here</a>. Thank you.</center>"[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<meta http-equiv=refresh content=2;url="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$url[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]">"[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]"footer.php"[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];
        }
    }[/COLOR]
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]action[/COLOR][COLOR= #007700]]==[/COLOR][COLOR= #DD0000]list[/COLOR][COLOR= #007700]) {[/COLOR]
            [COLOR= #0000BB]$getpend[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM `pending` WHERE user_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$userinfo[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #0000BB]$pend[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$getpend[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
            [COLOR= #0000BB]$getcomp[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM `completed` WHERE user_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$userinfo[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #0000BB]$comp[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$getcomp[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
            [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pend[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]) && ([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$comp[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700])) {[/COLOR]
                [URL="http://www.php.net/print"]print[/URL][COLOR= #DD0000]"<center>You dont have any pending or denied offers, Please go to <a href=offers.php>Offers</a> page to submit any offer by your choice and get reward for it.</center>"[/COLOR][COLOR= #007700];
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                        [URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"<table width="100%">
            <tr>
            <td>Name</td>
            <td>Reward</td>
            <td>Status</td>
            </tr>"[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$comp[/COLOR][COLOR= #007700])>[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                    [URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$completed[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$comp[/COLOR][COLOR= #007700])) {[/COLOR]
                        [COLOR= #0000BB]$getoffer[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM offers WHERE id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$completed[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]offer_id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
                        [COLOR= #0000BB]$offer[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$getoffer[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
                        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                            [URL="http://www.php.net/continue"]continue[/URL][COLOR= #007700];
                        }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                            [COLOR= #0000BB]$offer[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700]);[/COLOR]
                            [URL="http://www.php.net/print"]print[/URL][COLOR= #DD0000]"
                            <tr>
                            <td>"[/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</td>
                            <td>"[/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]reward[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</td>
                            <td><font color=green>Completed</font></td>
                            </tr>"[/COLOR][COLOR= #007700];
                        }
                    }    
                }[/COLOR]
                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pend[/COLOR][COLOR= #007700])>[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                    [URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$pending[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pend[/COLOR][COLOR= #007700])) {[/COLOR]
                        [COLOR= #0000BB]$getoffer[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM offers WHERE id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$pending[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]offer_id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
                        [COLOR= #0000BB]$offer[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$getoffer[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
                        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                            [URL="http://www.php.net/continue"]continue[/URL][COLOR= #007700];
                        }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                            [COLOR= #0000BB]$offer[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700]);[/COLOR]
                            [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$pending[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]status[/COLOR][COLOR= #007700]]==[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR] [COLOR= #0000BB]$status[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]<font color=yellow>Pending</font>[/COLOR][COLOR= #007700]; }[/COLOR]
                            [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$pending[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]status[/COLOR][COLOR= #007700]]==[/COLOR][COLOR= #0000BB]2[/COLOR][COLOR= #007700]) {[/COLOR] [COLOR= #0000BB]$status[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]<font color=red>Denied</font>[/COLOR][COLOR= #007700]; }[/COLOR]
                            [URL="http://www.php.net/print"]print[/URL][COLOR= #DD0000]"
                            <tr>
                            <td>"[/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</td>
                            <td>"[/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]reward[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</td>
                            <td>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$status[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"</td>
                            </tr>"[/COLOR][COLOR= #007700];
                        }
                    }    
                }                
            }[/COLOR]
            [URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"</table>"[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/print"]print[/URL][COLOR= #DD0000]"<br><center>Back to <a href=offers.php>offer</a> page.</center>"[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]"footer.php"[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"<center>View <a href=?action=list>Denied, Pending and Completed</a> offer list.<br><br>"[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"<center>Please select offer type.</center>"[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM `offer_types` WHERE active=1"[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
    [URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"<center>"[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$otypes[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])) {[/COLOR]
        [URL="http://www.php.net/print"]print[/URL][COLOR= #DD0000]" | <a href=offers.php?type="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$otypes[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]">"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$otypes[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]type[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</a> | "[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"</center><br>"[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$page[/COLOR] [COLOR= #007700]= (![/COLOR][URL="http://www.php.net/is_numeric"]is_numeric[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]page[/COLOR][COLOR= #007700]])) ?[/COLOR] [COLOR= #0000BB]1[/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]page[/COLOR][COLOR= #007700]];[/COLOR]
    [COLOR= #0000BB]$toffers[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]));[/COLOR]
    [COLOR= #0000BB]$limit[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]25[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$start[/COLOR] [COLOR= #007700]= ([/COLOR][COLOR= #0000BB]$page[/COLOR][COLOR= #007700]-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]) *[/COLOR] [COLOR= #0000BB]$limit[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$tpages[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/ceil"]ceil[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$toffers[/COLOR] / [COLOR= #0000BB]$limit[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]type[/COLOR][COLOR= #007700]]) {[/COLOR]
                [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM offers WHERE (country LIKE %"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$userinfo[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]country[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"% OR country LIKE %ALL% ) AND type="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]type[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" AND active=1 ORDER BY `reward` DESC LIMIT $start, $limit"[/COLOR][COLOR= #007700];
    }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM offers WHERE (country LIKE %"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$userinfo[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]country[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"% OR country LIKE %ALL% ) AND active=1 ORDER BY `reward` DESC LIMIT $start, $limit"[/COLOR][COLOR= #007700];    
    }[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<center>"[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR] [COLOR= #0000BB]$num[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$num[/COLOR] [COLOR= #007700]<=[/COLOR] [COLOR= #0000BB]$tpages[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$num[/COLOR][COLOR= #007700]++ ) {[/COLOR]
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$num[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$page[/COLOR][COLOR= #007700]) 
        {[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$num[/COLOR][COLOR= #007700];
        }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]" |<a href=offers.php?type=$type&page=$num>$num</a>| "[/COLOR][COLOR= #007700];
        }
    }[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</center><br/>"[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
        [URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"<center>No Offers available at the moment, please check other sections for different offer types.</center>"[/COLOR][COLOR= #007700];
    }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"<table width="100%">
        <tr>
        <th>Name</th>
        <th>Description</th>
        <th>Countries</th>
        <th>Reward</th>
        <th>Action</th>
        </tr>"[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$offer[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])) {[/COLOR]
            [COLOR= #0000BB]$getcompleted[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM `completed` WHERE offer_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" AND user_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$userinfo[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #0000BB]$completed[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$getcompleted[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
            [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$completed[/COLOR][COLOR= #007700])>[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                [URL="http://www.php.net/continue"]continue[/URL][COLOR= #007700];
            }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [COLOR= #0000BB]$getpending[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM `pending` WHERE offer_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" AND user_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$userinfo[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
                [COLOR= #0000BB]$pending[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$getpending[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pending[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                    [COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"<form method=POST><input type=hidden name=action value=complete><input type=hidden name=oid value="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"><input type=submit name=submit value=Open></form>"[/COLOR][COLOR= #007700];
                }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                    [COLOR= #0000BB]$pend[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pending[/COLOR][COLOR= #007700]);[/COLOR]
                    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$pend[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]status[/COLOR][COLOR= #007700]]==[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR] [COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"<font color=yellow>Pending</font>"[/COLOR][COLOR= #007700]; }[/COLOR]
                    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$pend[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]status[/COLOR][COLOR= #007700]]==[/COLOR][COLOR= #0000BB]2[/COLOR][COLOR= #007700]) {[/COLOR] [COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"<font color=red>Denied</font>"[/COLOR][COLOR= #007700]; }
                }[/COLOR]
                [URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"
                <tr>
                <td>"[/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</td>
                <td>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]info[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td>
                <td>"[/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]country[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</td>
                <td>"[/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$offer[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]reward[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</td>
                <td>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$link[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"</td>
                </tr>"[/COLOR][COLOR= #007700];
            }
        }
    }[/COLOR]
    [URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"</table>"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]"footer.php"[/COLOR][COLOR= #007700];[/COLOR]
?>
Hij voert de Visited update niet uit cry
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
^ Laat me eens raden. Een gratis, outdated script... Dat moet je gewoon niet willen gebruiken.
0
Berichten
7.806
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rik schreef:
^ Laat me eens raden. Een gratis, outdated script... Dat moet je gewoon niet willen gebruiken.
Laatste update is van juli 2012... En naja... Gratis niet... Goedkoop.
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Bjarnootjuh schreef:
Eerdere citaten tonen
Rik schreef:
^ Laat me eens raden. Een gratis, outdated script... Dat moet je gewoon niet willen gebruiken.
Laatste update is van juli 2012... En naja... Gratis niet... Goedkoop.
Dan is het echt gewoon slecht gescript. Een $_POST-variabele zonder escaping uitvoeren, global vars (ipv een functie / object om dat te regelen). En nog wel meer dingen.
0
Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rik schreef:
Eerdere citaten tonen
Bjarnootjuh schreef:
Eerdere citaten tonen
Rik schreef:
^ Laat me eens raden. Een gratis, outdated script... Dat moet je gewoon niet willen gebruiken.
Laatste update is van juli 2012... En naja... Gratis niet... Goedkoop.
Dan is het echt gewoon slecht gescript. Een $_POST-variabele zonder escaping uitvoeren, global vars (ipv een functie / object om dat te regelen). En nog wel meer dingen.
Oke.. Wat is het probleem nu?
0
Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dropdown menu:

Mijn dropdown wilt het niet echt goed doen.
Want het maakt niet uit waar ik op sta, de dropdown staat altijd op de zelfde plek.

Website: http://marijnkok.nl/ (gaat om films & series).

Css:
Spoiler tonen
#menu {float:left; padding:10px 0 0 15px; margin:0; list-style:none;}
#menu li {display:inline; padding:0 6px 0 6px; position:relative;}
#menu li a:hover {color:#CCC;}
#menu li ul {display:none;}
#menu li:hover ul {
    display:block; 
    position:fixed; 
    padding:5px 10px 10px 30px;
    list-style:none;
}
#menu li ul li {
    display:list-item; 
    padding:5px;
    background:#083e51;
    border:1px solid #000;

}
#menu li ul li a {color:#ccc;}
#menu li ul li a:hover {color:#fff;}
html:
Spoiler tonen
<ul id="menu">
        <li><a href="#" title="Marijn Kok - Film collectie">Home</a></li>
        <li><a href="#" title="Marijn Kok - Films">Films</a>
            <ul>
                <li><a href="#" title="Eigen film collectie">films 1</a></li>
                <li><a href="#" title="Comlete film collectie">films 2</a></li>
            </ul>
        </li>
        <li><a href="#" title="Marijn Kok - Series">Series</a>
            <ul>
                <li><a href="#" title="Eigen serie collectie">series 1</a></li>
                <li><a href="#" title="Comlete serie collectie">series 2</a></li>
            </ul>
        </li>
        <li><a href="#" title="Marijn Kok - Film/serie toevoegen">Toevoegen</a></li>
        <li><a href="#" title="Marijn Kok - Contact">Contact</a></li>
    </ul>
Weet iemand hoe ik het dropdown gedeelte er goed onder kan zetten??
Alvast bedankt.
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Jordyvc schreef:
Eerdere citaten tonen
Rik schreef:
Eerdere citaten tonen
Bjarnootjuh schreef:
Eerdere citaten tonen
Rik schreef:
^ Laat me eens raden. Een gratis, outdated script... Dat moet je gewoon niet willen gebruiken.
Laatste update is van juli 2012... En naja... Gratis niet... Goedkoop.
Dan is het echt gewoon slecht gescript. Een $_POST-variabele zonder escaping uitvoeren, global vars (ipv een functie / object om dat te regelen). En nog wel meer dingen.
Oke.. Wat is het probleem nu?
Dat het een baggerscript is.

En @bjarn: ik snap niet wat je met visited bedoelt in je script, want dat kan ik nergens terug vinden emo
0
Berichten
7.806
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rik schreef:
Eerdere citaten tonen
Jordyvc schreef:
Eerdere citaten tonen
Rik schreef:
Eerdere citaten tonen
Bjarnootjuh schreef:
Eerdere citaten tonen
Rik schreef:
^ Laat me eens raden. Een gratis, outdated script... Dat moet je gewoon niet willen gebruiken.
Laatste update is van juli 2012... En naja... Gratis niet... Goedkoop.
Dan is het echt gewoon slecht gescript. Een $_POST-variabele zonder escaping uitvoeren, global vars (ipv een functie / object om dat te regelen). En nog wel meer dingen.
Oke.. Wat is het probleem nu?
Dat het een baggerscript is.

En @bjarn: ik snap niet wat je met visited bedoelt in je script, want dat kan ik nergens terug vinden emo
Bagger is het niet, alles werkt maar alleen dit niet. Maar er is een soortgelijke query (net achter gekomen) ik ga daar even naar kijken.

toevoeging op 18 augustus 2012, 22:00:24:
query is niet gelijk... Helaas. Moet een oplossing zijn voor dit script.
0
Berichten
1.684
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rik schreef:
Uitlijning / Indenting:

Het gebruiken van spaties om je code uit te lijnen
Ik weet nu zeker wat uitlijning was. Ik dacht eerder dat het iets te maken had met de positie van tekst e.d. Is de code op mijn website (www.minecraftserver.be) goed uitgelijnd. Buiten dan de seo plugins.
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Maartenf schreef:
Eerdere citaten tonen
Rik schreef:
Uitlijning / Indenting:
Het gebruiken van spaties om je code uit te lijnen

Ik weet nu zeker wat uitlijning was. Ik dacht eerder dat het iets te maken had met de positie van tekst e.d. Is de code op mijn website (www.minecraftserver.be) goed uitgelijnd. Buiten dan de seo plugins.
Redelijk. Maar HTML maakt op zich niet uit. Er zijn ook veel sites die HTML code ook nog comprimeren.

Het gaat vooral om PHP codes. Die wil je zo veel mogelijk indenten. Voor jou is het dan leesbaarder, maar voor de server maakt het niet uit. De server zal namelijk alle code achter elkaar zetten.

Deze (voor ons leesbare) code:

[COLOR= #0000BB]<?php[/COLOR]

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$var[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
    
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$var2[/COLOR] [COLOR= #007700]<[/COLOR] [COLOR= #0000BB]10[/COLOR][COLOR= #007700]) {[/COLOR]
    
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]UITLIJNING :D[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$var2[/COLOR][COLOR= #007700]++;

    }

}[/COLOR]

?>


Ziet een server als:

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$var[/COLOR][COLOR= #007700]==[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]){[/COLOR][URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$var2[/COLOR][COLOR= #007700]<[/COLOR][COLOR= #0000BB]10[/COLOR][COLOR= #007700]){[/COLOR][URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]UITLIJNING :D[/COLOR][COLOR= #007700];[/COLOR][COLOR= #0000BB]$var2[/COLOR][COLOR= #007700]++;}}[/COLOR]?>
0
Janm

Lid

Berichten
6.170
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Heeft iemand toevallig een linkje naar de eeros download? Ik wil er namelijk dat sessie systeem eruit slopen.
0
Berichten
10.409
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maartenf schreef:
Wat is uitlijning eigenlijk?
Iedereen spreekt erover, maar ik kan echt niets vinden op Google.
Zou iemand dit voor mij kunnen uitleggen of misschien een tutorial hierover plaatsen op one2xs?
Hehh, je wilt OOP JS of jQuery gaan doen maar je weet niet eens wat uilijning is? nopompom
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren