1. PHP / Говнокод #3702

    +122

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    <?php
    $login=!empty($_POST['upload_login'])?$_POST['upload_login']:null;
    $date_load=date('YmdHis');
    $info_load=getimagesize($_FILES['upload_wrapper']['tmp_name']);
    if(isset($_FILES['upload_wrapper'])&&$_FILES['upload_wrapper']['error']===0){
    if($_FILES["upload_wrapper"]["type"]=="image/jpeg"or$_FILES["upload_wrapper"]["type"]=="image/jpg"or$_FILES["upload_wrapper"]["type"]=="image/gif"or$_FILES["upload_wrapper"]["type"]=="image/png"){
    if($_FILES['upload_wrapper']['size']<"100000"){
    if($info_load[0]<151&&$info_load[1]<151&&$info_load[0]>149&&$info_load[1]>149){
    if(!file_exists('./loads/'.$login.'')){mkdir("./loads/$login",0700);}
    if(!file_exists('./loads/'.$login.'/wrapper')){mkdir("./loads/$login/wrapper",0700);}
    mkdir("./loads/$login/wrapper/$date_load",0700);
    if(move_uploaded_file($_FILES['upload_wrapper']['tmp_name'],'./loads/'.$login.'/wrapper/'.$date_load.'/'.$_FILES['upload_wrapper']['name']));
    }}}}
    ?>
    <body onload="parent.document.getElementById('upload_wrapper_ok').innerHTML=document.body.innerHTML"><?php if(is_dir('./loads/'.$login.'/wrapper/'.$date_load.'')){echo('Готово. Обложка загружена<style type="text/css">.upload_wrapper_form{display:none} .error_lesson, .error_wrapper{display:none!important}</style>');}else{echo'<style type="text/css">.error_lesson, .error_wrapper{display:block}</style>';}?></body>
    <iframe id="iframe_load_wrapper" class="none" onload="parent.document.getElementById('upload_wrapper_final').innerHTML=document.getElementById('iframe_load_wrapper').innerHTML"><?php $login=!empty($_POST['upload_login'])?$_POST['upload_login']:null; if(file_exists('./loads/'.$login.'/wrapper/'.$date_load.'')){echo('http://youex.ru/modules/lessons/loads/'.$login.'/wrapper/'.$date_load.'/'.$_FILES['upload_wrapper']['name'].''.'');}?></iframe>

    без коментриев

    Запостил: Vasiliy, 14 Июля 2010

    Комментарии (29) RSS

    Добавить комментарий