array( "hosting" => "milkxhak.ipowermysql.com", "user" => "milkxhak", "password" => "#Newstart09#", "database" => "milkxhake", ), "www.milkxhake.org"=>array( "hosting" => "milkxhak.ipowermysql.com", "user" => "milkxhak", "password" => "#Newstart09#", "database" => "milkxhake", ), ); $DBInfo=($DBInfoArray[$_SERVER['SERVER_NAME']])?$DBInfoArray[$_SERVER['SERVER_NAME']]:$DBInfoArray['default']; $link=mysql_connect($DBInfo['hosting'],$DBInfo['user'],$DBInfo['password']); mysql_select_db($DBInfo['database'],$link); mysql_query("SET NAME UTF8"); ?>$val){ $returnVars[$key]=ReturnFrmVars($val); } return $returnVars; } } function ReturnTextareaVars($a,$type="TEXT"){ if(get_magic_quotes_gpc()===0){$a=stripslashes($a);} if($type!="HTML"){ $a=htmlspecialchars($a); $a=str_replace("&","&",$a); $a=nl2br($a); } else{ $a=str_replace(""; if(mysql_error()){ echo $DB."
"; echo "mysql_error=".mysql_error()."
"; } $i=0; while($tblInfo=mysql_fetch_field($resDB)): $fieldName[$i]=$tblInfo->name; $i++; endwhile; $i=0; while($tblData=mysql_fetch_array($resDB,MYSQL_ASSOC)): for($a=0;$a"; $returnStr.="window.location.replace(\"index.php?page=".$URL."\");"; $returnStr.=""; echo $returnStr; } function countryPulldownList($selectedId){ $selectedArray[$selectedId]=" selected"; $countryList=listFun("countries"," order by name"); $returnStr=''; for($a=0;$a".returnFrmVars($countryList[$a]['name']).""; } return $returnStr; } function fileLog($rootPath,$data){ $filePath=$rootPath."admincp/upload/logs/log.txt"; $nowTime=date("Y-m-d H:i:s")."\n"; $separateLine="\n==================================================================================================\n"; $data=$nowTime.$data.$separateLine; $fp = fopen($filePath, 'a+'); fwrite($fp, $data); fclose($fp); } function maxOrderingId($tblName){ global $link; $sql=mysql_query("select max(ordering) from ".$tblName); list($returnId)=mysql_fetch_row($sql); return $returnId+1; } function uploadOrderingId($tblName,$itemId,$orderingStart,$orderingEnd,$orgId=''){ global $link; if($orderingStart!=$orderingEnd){ if($orgId!=''){ mysql_query("update ".$tblName." set ordering=ordering-1 where (ordering > '".$orgId."') and id!='".$itemId."'"); } mysql_query("update ".$tblName." set ordering=ordering+1 where (ordering between ".$orderingStart." and ".$orderingEnd.") and id!='".$itemId."'"); } } function uploadOrderingIdByDel($tblName,$orderingId){ global $link; mysql_query("update ".$tblName." set ordering=ordering-1 where ordering>'".$orderingId."'"); } ?> ::::: milkxhake :::::