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 'Importing In-Link to In-Portal '; //echo ''; //echo ''; //echo ''; } function displaytablestart() { echo ''; } function displaytableover() { echo "
"; } function displayfooter() { echo ""; echo ""; } function displayrow1($name,$value) { echo ''; echo $name; echo ''; echo $value; echo ''; } function displayrow2($name,$value) { echo ''; echo $name; echo ''; echo $value; echo ''; } function displaybar($percent) { global $rootURL, $title; $o = ""; echo "\n"; $o .= int_subsection_title_ret(admin_language("la_performing_import")." - ".$percent."%"); $o .= "

"; $o .= " "; $o .=" "; $comp_pct = 100-$percent; $o .= " "; $o .= "
 
"; //$o .= "
"; echo $o."\n"; echo "
"; /* if ($percent == 0) { echo ""; echo "$percent"; echo "%"; } else if ($percent < 60) { echo ""; $row2 = 100-$percent; echo " $percent"; echo "%"; } else if ($percent == 100) { echo "$percent%"; } else { echo "$percent%"; $row2 = 100-$percent; echo " "; }*/ } ?>