0) $percent=round(($start/$total)*100); else $percent=0; switch ($section) { case "users": $section = "Users"; $uservalue=$percent; $catvalue=0; $linksvalue=0; $customvalue=0; $relcatvalue=0; break; case "cats": $section = "Categories"; $uservalue=100; $catvalue=$percent; $linksvalue=0; $customvalue=0; $relcatvalue=0; break; case "links": $section = "Links"; $uservalue=100; $catvalue=100; $linksvalue=$percent; $customvalue=0; $relcatvalue=0; break; case "custom": $section = "Custom Fields"; $uservalue=100; $catvalue=100; $linksvalue=100; $customvalue=$percent; $relcatvalue=0; break; case "relcat": $section = "Relative Categories"; $uservalue=100; $catvalue=100; $linksvalue=100; $customvalue=100; $relcatvalue=$percent; break; case "terminate": $section = "Complete"; $uservalue=100; $catvalue=100; $linksvalue=100; $customvalue=100; $relcatvalue=100; #callexit(); break; default: $section = "Initializing"; $uservalue=0; $catvalue=0; $linksvalue=0; $customvalue=0; $relcatvalue=0; break; } displayheader(); displaytablestart(); displayrow1("Importing In-Link to In-Portal:"," "); displayrow2("Users:",$uservalue."%"); displayrow1("Categories:",$catvalue."%"); displayrow2("Links (Including Reviews and Images):",$linksvalue."%"); displayrow1("Custom Fields:",$customvalue."%"); displayrow2("Category Relations:",$relcatvalue."%"); displayrow1("Importing:",$section); displaytableover(); displaytablestart(); displaybar($percent); displaytableover(); displayfooter(); if ($section == "Complete") { $ado = &GetADODBConnection(); $TablePrefix = "ses_".$objSession->GetSessionKey()."_".GetTablePrefix(); $query="DROP TABLE IF EXISTS ".$TablePrefix."import, ".$TablePrefix."importcat"; $ado->Execute($query); } } function callexit() #In case importing is over { /* global $pathtoroot; require_once ($pathtoroot."admin/import/exit.php"); displaytablestart(); displayrow1("Importing In-Link to In-Portal:"," "); displayrow2("Users:",$uservalue."%"); displayrow1("Categories:",$catvalue."%"); displayrow2("Links (Including Reviews and Images):",$linksvalue."%"); displayrow1("Custom Fields:",$customvalue."%"); displayrow2("Category Relations:",$relcatvalue."%"); displayrow1("Importing:",$section); displaytableover(); displaytablestart(); displaybar($percent); displaytableover(); displayfooter(); */ } function displayheader() { global $title; int_header(null,NULL,$title); //echo ''; //echo '
'; //echo '"; $o .= "
"; echo $o."\n"; echo " |