Converting Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Converting Problem

    Need Help converting this script to WML...

    Code:
    <?php
    include("../wap/core.php");
    include("../wap/config.php");
    connectdb();
    $uip = getip();
    $action = $_GET["action"];
    $sid = $_GET["sid"];
    $page = $_GET["page"];
    $who = $_GET["who"];
    $uid = getuid_sid($sid);
    $sid = $_GET["sid"];
    $site = $_GET["site"];
    $sitename = "Mobile69";
    
    echo &#39;<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html"/>
    <meta http-equiv="Cache-Control" content="no-cache" forua="true"/>&#39;;
    echo "<title>$sitename Upload Files</title>";
          echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"http://mobile69.freehostia.com/web/style/style.css\"/>";
    echo "</head>";
    echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#0000FF\" vlink=\"#800080\">";
    
    if ($upload="upload"&&$superdat_name){
    
    if (!eregi("\.(mid|gif|bmp|mid|midi|3gp|mp3|wav|jar|jad|jpeg|jpg|sis|mmf|amr|png|wbmp)$",$superdat_name)){
    print "[b]Unsupported File Extention![/b]";
    }else{
    $superdat_name = preg_replace(
                 &#39;/[^a-zA-Z0-9\.\$\%\&#39;\`\-\@\{\}\~\!\#\(\)\&\_\^]/&#39;
                 ,&#39;&#39;,str_replace(array(&#39; &#39;,&#39;%20&#39;,"&#39;"),array(&#39;_&#39;,&#39;_&#39;, ""),$superdat_name));
    if(strlen($superdat_name)>53){ print "[b]File Name Is Too Long![/b]";
    }else{
    if (empty($superdat)) {
    print "[b]No input file specified!!![/b]";
    }else{
    copy("$superdat", "files/$superdat_name") or
    die("Couldn&#39;t copy file.");
    
    
    echo "[b]$superdat_name[/b] has successfully been uploaded to our uploader";
    echo "you can Now put this link in the Gallery
    
    ";
    echo "[b]http://mobile69.freehostia.com/uploaded/files/$superdat_name[/b]";
    
    }
    }
    }
    }
    ?>
    <?php
    echo "<FORM align=\"center\" ACTION=\"upload.php?sid=$sid\" METHOD=\"POST\" ENCTYPE=\"multipart/form-data\">";
    ?>
    [b]Select File To Be Uploaded :[/b]
    
    <input align="center" type="file" name="superdat">
    
    <input align="center" type="hidden" name="upload" value="upload"/>
    <INPUT align="center" TYPE=SUBMIT NAME="submit" VALUE="Upload File!">
    
    </small>
     [b][u]You can only upload files with folowing extentions:[/u][/b]
    
    .jpg, .jpeg, .gif, .png, .bmp, wbmp
    
    ----------
    </FORM>
    <?php
    
    if($site=="wap"){
        echo "
    
    <a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    }else{
        echo "
    
    <a href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    }
    ?>
    </body>
    </html>

    #2
    U cannot! At least i thnk tht upload form cant b converted 2 wml...
    sigpiceeeeerrr....

    Comment


      #3
      as far as im aware yu cant upload pics using wml
      Want something coded email me at sales@webnwaphost.com for a prices.




      Comment


        #4
        pmpl we posted that at the same time lol, yeh yu cant convert the form into wml
        Want something coded email me at sales@webnwaphost.com for a prices.




        Comment


          #5
          pmpl we posted that at the same time lol, yeh yu cant convert the form into wml[/b]

          i just want to try this to WML...

          Comment


            #6
            wel im sure yu cant have a wml uploader it can oly be for html etc
            Want something coded email me at sales@webnwaphost.com for a prices.




            Comment


              #7
              pmpl we posted that at the same time lol, yeh yu cant convert the form into wml[/b]
              yeah but i was faster than u lol

              btw

              busterkeaton10 Posted Today, 12:30 PM
              i just want to try this to WML...

              read it again:

              YOU can NOT
              sigpiceeeeerrr....

              Comment


                #8
                pmsl w8 till next time il beat ya bitch lol
                Want something coded email me at sales@webnwaphost.com for a prices.




                Comment


                  #9
                  pmsl w8 till next time il beat ya bitch lol [/b]
                  LOL yeah i know! but how about the upload thru SMS? got any script?

                  Comment


                    #10
                    here its converted good luck getting ti to work but
                    Code:
                    <?php
                    include("../wap/core.php");
                    include("../wap/config.php");
                    connectdb();
                    $uip = getip();
                    $action = $_GET["action"];
                    $sid = $_GET["sid"];
                    $page = $_GET["page"];
                    $who = $_GET["who"];
                    $uid = getuid_sid($sid);
                    $sid = $_GET["sid"];
                    $site = $_GET["site"];
                    $sitename = "Mobile69";
                    
                    header("Content-type: text/vnd.wap.wml");
                    header("Cache-Control: no-store, no-cache, must-revalidate");
                    echo "<?xml version=\"1.0\"?>";
                    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
                    ?>
                    <wml>
                    <?php
                    
                    if ($upload="upload"&&$superdat_name){
                    
                    if (!eregi("\.(mid|gif|bmp|mid|midi|3gp|mp3|wav|jar|jad|jpeg|jpg|sis|mmf|amr|png|wbmp)$",$superdat_name)){
                    print "[b]Unsupported File Extention![/b]";
                    }else{
                    $superdat_name = preg_replace(
                                 &#39;/[^a-zA-Z0-9\.\$\%\&#39;\`\-\@\{\}\~\!\#\(\)\&\_\^]/&#39;
                                 ,&#39;&#39;,str_replace(array(&#39; &#39;,&#39;%20&#39;,"&#39;"),array(&#39;_&#39;,&#39;_&#39;, ""),$superdat_name));
                    if(strlen($superdat_name)>53){ print "[b]File Name Is Too Long![/b]";
                    }else{
                    if (empty($superdat)) {
                    print "[b]No input file specified!!![/b]";
                    }else{
                    copy("$superdat", "files/$superdat_name") or
                    die("Couldn&#39;t copy file.");
                    
                    
                    echo "[b]$superdat_name[/b] has successfully been uploaded to our uploader";
                    echo "you can Now put this link in the Gallery
                    
                    ";
                    echo "[b]http://mobile69.freehostia.com/uploaded/files/$superdat_name[/b]";
                    
                    }
                    }
                    }
                    }
                    ?>
                    <?php
                    echo "<go href=\"upload.php?sid=$sid\" method=\"post\" ENCTYPE=\"multipart/form-data\">
                    [b]Select File To Be Uploaded :[/b]
                    
                    <input align=\"center\" type=\"file\" name=\"superdat\">
                    
                    <input align=\"center\" type=\"hidden\" name=\"upload\" value=\"upload\"/>
                    <INPUT align=\"center\" TYPE=SUBMIT NAME=\"submit\" VALUE=\"Upload File!\">
                    
                    </small>
                     [b][u]You can only upload files with folowing extentions:[/u][/b]
                    
                    .jpg, .jpeg, .gif, .png, .bmp, wbmp
                    
                    ----------
                    </go></anchor>
                    ";
                    <?php
                    
                    if($site=="wap"){
                        echo "
                    
                    <a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                    }else{
                        echo "
                    
                    <a href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                    }
                    echo "
                      </p>
                    </card>";
                    
                    ?>
                    
                    </wml>

                    Comment


                      #11
                      Wtf is tht? A mix of wml nd xhtml 2gether? Lol
                      sigpiceeeeerrr....

                      Comment


                        #12
                        you can not upload file using wml only using xhtml you can upload file how ever you can copy files from other sites using the copy file script

                        Comment


                          #13
                          you can not upload file using wml only using xhtml you can upload file how ever you can copy files from other sites using the copy file script[/b]
                          you mean via copying the link? i hate that cause my max.php wont open a picture outside my site!

                          Code:
                          <?php
                          $height= 100;
                          $width= 100;
                          // Content type
                          header(&#39;Content-type: image/jpeg&#39;);
                          if(!$filename)
                          $filename="./images/nopic.jpg";
                          // Get new dimensions
                          list($width_orig, $height_orig) = getimagesize($filename);
                          
                          if ($width && ($width_orig < $height_orig)) {
                          $width = ($height / $height_orig) * $width_orig;
                          } else {
                          $height = ($width / $width_orig) * $height_orig;
                          }
                          
                          // Resample
                          $image_p = imagecreatetruecolor($width, $height);
                          $image = imagecreatefromjpeg($filename);
                          imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
                          
                          // Output
                          imagejpeg($image_p, null, 100);
                          ImageDestroy ($image_p);
                          ?>

                          Comment


                            #14
                            here its converted good luck getting ti to work but
                            Code:
                            <?php
                            include("../wap/core.php");
                            include("../wap/config.php");
                            connectdb();
                            $uip = getip();
                            $action = $_GET["action"];
                            $sid = $_GET["sid"];
                            $page = $_GET["page"];
                            $who = $_GET["who"];
                            $uid = getuid_sid($sid);
                            $sid = $_GET["sid"];
                            $site = $_GET["site"];
                            $sitename = "Mobile69";
                            
                            header("Content-type: text/vnd.wap.wml");
                            header("Cache-Control: no-store, no-cache, must-revalidate");
                            echo "<?xml version=\"1.0\"?>";
                            echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
                            ?>
                            <wml>
                            <?php
                            
                            if ($upload="upload"&&$superdat_name){
                            
                            if (!eregi("\.(mid|gif|bmp|mid|midi|3gp|mp3|wav|jar|jad|jpeg|jpg|sis|mmf|amr|png|wbmp)$",$superdat_name)){
                            print "[b]Unsupported File Extention![/b]";
                            }else{
                            $superdat_name = preg_replace(
                                         &#39;/[^a-zA-Z0-9\.\$\%\&#39;\`\-\@\{\}\~\!\#\(\)\&\_\^]/&#39;
                                         ,&#39;&#39;,str_replace(array(&#39; &#39;,&#39;%20&#39;,"&#39;"),array(&#39;_&#39;,&#39;_&#39;, ""),$superdat_name));
                            if(strlen($superdat_name)>53){ print "[b]File Name Is Too Long![/b]";
                            }else{
                            if (empty($superdat)) {
                            print "[b]No input file specified!!![/b]";
                            }else{
                            copy("$superdat", "files/$superdat_name") or
                            die("Couldn&#39;t copy file.");
                            echo "[b]$superdat_name[/b] has successfully been uploaded to our uploader";
                            echo "you can Now put this link in the Gallery
                            
                            ";
                            echo "[b]http://mobile69.freehostia.com/uploaded/files/$superdat_name[/b]";
                            
                            }
                            }
                            }
                            }
                            ?>
                            <?php
                            echo "<go href=\"upload.php?sid=$sid\" method=\"post\" ENCTYPE=\"multipart/form-data\">
                            [b]Select File To Be Uploaded :[/b]
                            
                            <input align=\"center\" type=\"file\" name=\"superdat\">
                            
                            <input align=\"center\" type=\"hidden\" name=\"upload\" value=\"upload\"/>
                            <INPUT align=\"center\" TYPE=SUBMIT NAME=\"submit\" VALUE=\"Upload File!\">
                            
                            </small>
                             [b][u]You can only upload files with folowing extentions:[/u][/b]
                            
                            .jpg, .jpeg, .gif, .png, .bmp, wbmp
                            
                            ----------
                            </go></anchor>
                            ";
                            <?php
                            
                            if($site=="wap"){
                                echo "
                            
                            <a href=\"../wap/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                            }else{
                                echo "
                            
                            <a href=\"../web/index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                            }
                            echo "
                              </p>
                            </card>";
                            
                            ?>
                            
                            </wml>
                            [/b]
                            Thanks Buddy!

                            Comment


                              #15
                              Thanks Buddy! [/b]
                              there realy not joking it doesnt work wml dosent support uploading

                              Comment

                              Working...
                              X