require('js/xajax_core/xajax.inc.php'); $xajax = new xajax(); //$xajax->configure('debug',true); class myXajaxResponse extends xajaxResponse { function addCreateOptions($sSelectId, $options) { $this->script("document.getElementById('".$sSelectId."').length=0"); if (sizeof($options) >0) { foreach ($options as $option) { $this->script("addOption('".$sSelectId."','".$option['txt']."','".$option['val']."');"); } } } } $db=mysql_connect("localhost", "image_user", "image007") or die(mysql_error()); mysql_select_db("image_db") or die(mysql_error()); $phonesRs = mysql_query("SELECT DISTINCT(phone) FROM phones ORDER BY phone") or die(mysql_error()); while ($rs=mysql_fetch_assoc($phonesRs)) { $phones[]=$rs["phone"]; } // adds an option to the select function addModel($selectId, $phone) { global $model; $objResponse = new myXajaxResponse(); $modelRs = mysql_query(sprintf("SELECT DISTINCT(model) FROM phones WHERE phone = '%s' ORDER BY model", $phone)); while ($rs=mysql_fetch_assoc($modelRs)) { $model[]=array("txt"=>$rs["model"], "val"=>$rs["model"]); } $objResponse->addCreateOptions($selectId, $model); // return $objResponse->getXML(); return $objResponse; } $xajax->registerFunction("addModel"); $xajax->processRequest(); ?> $xajax->printJavascript("js/"); ?>
This is a free online application that generates wallpapers for cell phones. A wide range of predefined values are available for multiple mobile phone types resolutions (Nokia, Motorola, Alcatel, Samsung, Sony Ericsson etc). Select your mobile phone brand and series, upload your desired image and click "Generate!" to obtain the perfect wallpaper.