4images Modifications / Modifikationen > Mods & Plugins (Releases & Support)

[MOD] WAP page to download files.

<< < (2/8) > >>

universal:
try this...  :wink:

--- Code: ---<?
//Some settings
$url = 'http://wartenaufden15.de'; //where installed 4images, without traling slash
$title = 'wap.wartenaufden15.de'; //title for wap card
$no_id = 'ID nicht gefunden'; //msg when no id found
$enter_id = 'Gib die ID ein'; //msg when user comes
$button = 'Anzeigen'; //text for button
$footer = '(c) 2005 by wartenaufden15.de'; //footer text
$dbhost = "localhost"; //host of database
$dbuser = "DB16XXXX"; //database user
$dbpass = "XXXXXXXX"; //database pass
$dbname = "DB16XXXX"; //and database ;]

//dont need to change after this
header("Content-type: text/wml");
echo("<?xml version=\"1.0\" encoding=\"windows-1257\"?>\n");
echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
." \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n");
?>
<wml>
<card title="<? echo $title ?>">
<center>
<form method="post">
<?php
$id = $_REQUEST['id'];
if($id!=""){
$db = mysql_connect("$dbhost", "$dbuser", "$dbpass") or die ("Error");
@mysql_select_db("$dbname", $db) or die ("DB not found");
$result = mysql_query("SELECT image_id, image_media_file, cat_id, image_name FROM 4images_images where image_id=$id");
$row = mysql_fetch_array($result);
$image_id = $row["image_id"];
$cat_id = $row["cat_id"];
$image_name = $row["image_name"];
if ($image_id!=""){
$image_media_file = $row["image_media_file"];
?>
<a href="<?php echo $url;?>/data/thumbnails/<?php echo $cat_id;echo "/";echo $image_media_file; ?>"><?php echo $image_name;?></a><br />
<?php }
else { echo $no_id; } }
else { echo $enter_id; }
?>
<br />
<input name="id" type="text" id="id" size="6" /><br />
<input name="submit" type="submit" value="<?php echo $button ?>" />
</form>
<br />
<small>&reg; <? echo $footer ?></small>
</center>
</card>
</wml>
--- End code ---

b.o.fan:
oki.
than look @ the wap page.

universal:
working  :wink:

ryann:
mine says unknown file format when i goto it on my fone. Does anyone else have this error, or can you help me ?

universal:
what phone you browse with?
wml format is supported by many mobile phones.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version