Visualizzazione risultati 1 fino 3 di 3

Discussione: configurazione help

  1. #1
    mybox non è connesso Utente giovane
    Data registrazione
    04-07-2006
    Messaggi
    47

    Arrow configurazione help

    Codice PHP:
    <?

    include("config.php");
    include(
    "core.php");


    if(
    $mime== WEB)
    {
    echo
    "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";

    echo
    "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";

    }else{
    echo
    "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";

    echo
    "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    }
    $bcon = connectdb();
    if (!
    $bcon)
    {
    if(
    $mime== WEB)
    {
    echo
    dberror($mime);

    }else{
    echo
    dberror($mime);
    }
    }
    $getuthm = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
    $uth = $getuthm[0];
    if(!
    $uth=="")
    {
    $uthm = "$uth";
    }else{
    $uthm = "default.css";
    }
    $brws = explode(" ",$HTTP_USER_AGENT);
    $ubr = $brws[0];
    $uip = getip();

    $img1 = $_POST["img1"];

    if((
    islogged($ses)==false)||($uid==0))
    {
    if(
    $mime== WEB)
    {
    echo
    notlogged($mime);

    }else{
    echo
    notlogged($mime);
    }

    }



    if(
    isipbanned($uip,$ubr))
    {

    if(!
    isshield(getuid_ses($ses)))
    {
    if(
    $mime== WEB)
    {
    echo
    useripbanned($mime,$uip,$ubr);

    }else{
    echo
    useripbanned($mime,$uip,$ubr);
    }

    }
    }

    //echo isbanned($uid);
    if(isbanned($uid))
    {
    if(
    $mime== WEB)
    {
    echo
    userbanned($mime,$uid);

    }else{
    echo
    userbanned($mime,$uid);
    }

    }

    $abpath = "/home/funmobil/public_html/gallery";
    $sizelim = "yes";
    $size = "10000";

    $cert1 = "image/pjpeg";
    $cert2 = "image/jpeg";
    $cert3 = "image/gif";
    $cert4 = "image/png";
    $uid = getuid_ses($ses);
    $log = "";
    $random1 = rand(1, 9999999999);


    //checks if file exists
    if ($img1_name == "") {
    $log .= "<img src=\"images/notok.gif\" alt=\"x\"/> You must select a file to upload<br>";
    }

    if (
    $img1_name != "") {
    //checks if file exists
    if (file_exists("$abpath/$img1_name")) {
    $log .= "<img src=\"images/notok.gif\" alt=\"x\"/> A file with this name already exists. please try again<br>";
    } else {

    //checks if files to big
    if ($sizelim == "yes") {
    if (
    $img1_size > $size) {
    $log .= "<img src=\"images/notok.gif\" alt=\"x\"/> File is too large. your file must not exceed $size Kbs<br>";
    }
    }

    //Checks if file is an image
    if (($img1_type == $cert1) or ($img1_type == $cert2) or ($img1_type == $cert3) or ($img1_type == $cert4)) {
    if ((
    $img1_type == $cert1) or ($img1_type == $cert2)) {
    $img1_name = $random1 . ".jpeg";
    }
    if (
    $img1_type == $cert3) {
    $img1_name = $random1 . ".gif";
    }
    if (
    $img1_type == $cert4) {
    $img1_name = $random1 . ".png";
    }

    $res = copy($img1, "$abpath/$img1_name");
    if(!
    $res) {
    $log .= "<img src=\"images/notok.gif\" alt=\"x\"/> Could not upload image. please Contact admin<br>";
    }else{
    if (
    file_exists("$abpath/$img1_name")) {
    $usex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'"));
    $sex = $usex[0];
    $res = mysql_query("INSERT INTO ibwf_gallery SET uid='".$uid."', sex='".$sex."', imgurl='".$img1_name."'");
    $log .= "<img src=\"images/ok.gif\" alt=\"o\"/> Your Photo was successfully uploaded to the user gallery<br>";
    }
    }

    } else {
    $log .= "<img src=\"images/notok.gif\" alt=\"x\"/> The file you tried to upload is not an image. are you trying to hack me???<br>";
    }
    }
    }


    addonline(getuid_ses($ses),"Uploading Photo","");
    if(
    $mime== WEB)
    {
    echo
    webhead($uthm,$stitle);
    echo
    "<p align=\"center\">";
    echo
    "$log";
    echo
    "<br/><br/><a href=\"index.php?action=ugal&amp;ses=$ses\"><img src=\"images/gallery.gif\" alt=\"*\"/>Gallery</a><br/>";
    echo
    "<a href=\"index.php?action=main&amp;ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
    echo
    "</p>";
    echo
    webfoot();

    }else{
    echo
    waphead($stitle);

    echo
    "<p align=\"center\">";
    echo
    "$log";
    echo
    "<br/><br/><a href=\"index.php?action=ugal&amp;ses=$ses\"><img src=\"images/gallery.gif\" alt=\"*\"/>Gallery</a><br/>";
    echo
    "<a href=\"index.php?action=main&amp;ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>";
    echo
    "</p>";
    echo
    wapfoot();

    }


    ?>
    come posso configurare questo pezzo???
    $abpath = "/home/funmobil/public_html/gallery";
    $sizelim = "yes";
    $size = "10000";
    con le impostazioni d altervista???
    Ultima modifica di mybox : 18-06-2007 alle ore 08.43.32

  2. #2
    L'avatar di funcool
    funcool non è connesso Utente storico
    Data registrazione
    05-02-2004
    Residenza
    Qui... Non lì, qui!
    Messaggi
    15,433

    Predefinito

    Dovresti modificare solo $abpath:
    Codice PHP:
    $abpath="/membri/mybox/cartelladellagallerypartendodallaroot";
    Mattia vi manda a FunCool - Matriz - Directory Gogol - Sfondo rosso per la Birmania
    «Tu mi dai fastidio perché ti credi tanto un Dio!» «Bè, dovrò pur prendere un modello a cui ispirarmi, no?» Woody Allen

  3. #3
    mybox non è connesso Utente giovane
    Data registrazione
    04-07-2006
    Messaggi
    47

    Predefinito

    a me nn uppa un azz...mi dice contact admin :(

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •