//selected values //box 1 $smarty->assign("SQLfields", $advsearch->GetSQLfields()); //name of all possibble columns $smarty->assign("SQLfieldDefault", key($advsearch->GetSQLfields())); //set default selected to the first element //box 2 $smarty->assign("OrderFields", $advsearch->getOrderFields()); //name of all possibble columns $smarty->assign("sort1", $advsearch->GetSort1()); //current sort 1 $smarty->assign("sort2", $advsearch->GetSort2()); //current sort 2 $smarty->assign("dir1", $advsearch->getDir1()); //current sort dir 1 $smarty->assign("dir2", $advsearch->getDir2()); //current sort dir 2 if ($portal_http == "") { $portal_http = NULL; } if (isset($portal_http)) { if (substr($portal_http, 0, 7) != "http://") { $portal_http = "http://" . $portal_http; } $smarty->assign("old_upload", $portal_http); //save given URL (next time no nedd to write it again) $portal_http_new = str_replace("/portal.php/", "/portal_upload.php/", $portal_http); //replace portal.php name with the php file responsible for upload if (strstr($portal_http_new, "/portal_upload.php/")) { $file = @fopen($portal_http_new, "r"); }