$dbconfig['host'] = "localhost";
$dbconfig['user'] = "acmanager";
$dbconfig['pass'] = "db11847";
$dbconfig['dbname'] = "accounts";
?>
include("classdb.php");
global $dbcon;
$dbcon = new DatabaseConnection( $dbconfig['host'], $dbconfig['user'], $dbconfig['pass'], $dbconfig['dbname'] );
if ( ! $dbcon->connectDB() )
{
echo $dbcon->show_error();
exit;
}
function showJavaScriptMessage($mesg)
{
echo "";
};
function showJavaScriptURLMessage($url,$mesg)
{
echo "";
};
function showJavaScriptNavigateMessage($pg,$mesg)
{
echo "";
};
function executeSingleRecordQuery($query)
{
global $dbcon;
$retval = false;
if(!empty($query)){
if($dbcon->execute_query($query))
$retval = $dbcon->fetch_one_record();
else
$dbcon->show_error();
}
return $retval;
};
function executeMultipleRecordQuery($query)
{
global $dbcon;
$retval = false;
if(!empty($query)){
if($dbcon->execute_query($query))
$retval = $dbcon->fetch_records();
else
$dbcon->show_error();
}
return $retval;
};
function executeInsertUpdateDeleteQuery($query)
{
global $dbcon;
$retval = false;
if(!empty($query)){
if($dbcon->execute_query($query))
$retval = $dbcon->affected_rows();
else
$dbcon->show_error();
}
return $retval;
};
function executeInsertQuery($query)
{
global $dbcon;
$retval = false;
if(!empty($query)){
if($dbcon->execute_query($query))
$retval = $dbcon->inserted_id();
else
$dbcon->show_error();
}
return $retval;
};
function convertToHyperLink( $str1 )
{
$start = 0;
while( $pos1 = strpos($str1, "http://",$start )){
$pos2 = strpos($str1, " ",$pos1);
$url = substr($str1,$pos1,$pos2 - $pos1);
$hpl = "".$url."";
$str2 = substr_replace($str1, $hpl,$pos1,$pos2-$pos1);
$str1 = $str2;
$start = $pos1 + strlen($hpl);
}
return $str1;
};
function convertToEmailLink( $str1 ){
$start = 0;
while( $pos1 = strpos($str1, "@",$start )){
$pos2 = strpos($str1, " ",$pos1);
$ok=true;
while($ok){
if(substr($str1,--$pos1,1)=== " " )
$ok=false;
}
$url = substr($str1,$pos1,$pos2 - $pos1);
$hpl = "".$url."";
$str2 = substr_replace($str1, $hpl,++$pos1,$pos2-$pos1);
$str1 = $str2;
$start = $pos1 + strlen($hpl);
}
return $str1;
};
function isValidEmail($email) {
if(trim($email)=="") return false;
if(ereg("([[:alnum:]\.\-]+)(\@[[:alnum:]\.\-]+\.+)", $email)) {
return checkValidEmail($email);
} else {
return 0;
}
};
function checkValidEmail($email)
{
if(trim($email)=="") return false;
$arr1 = explode("@",$email);
if(count($arr1)>2 || count($arr1)<=1) return false;
$arr2 = explode(".",$arr1[1]);
if(count($arr2)<=1) return false;
$l = $arr2[count($arr2)-1];
if($l=="") return false;
if($l=="co") return false;
return true;
};
function cdateDMYtoMDY($date)
{
$retval=false;
if(stristr($date,"/")){ $dar = explode("/",$date); $retval = $dar[1]."/".$dar[0]."/".$dar[2]; }
else { explode("-",$date); $retval = $dar[1]."/".$dar[0]."/".$dar[2];}
return $retval;
};
Function searchInternationalDomain( $a_query="" ) {
$a_server = "rs.internic.net"; $a_port=43 ; $sock = fsockopen($a_server, $a_port, &$errno, &$errstr, 10);
if (!$sock){ echo "Error :$errstr ($errno)
\n"; }
else { fputs($sock,"$a_query\r\n");
while(!feof($sock)) { $buf = fgets($sock,128);
if (ereg( "Whois Server:", $buf)) { $a_server = str_replace( "Whois Server: ", "", $buf); $a_server = trim($a_server); $found = true; }
} fclose($sock);
if ($a_server) { $sock = fsockopen($a_server, 43, &$errno, &$errstr, 10);
if(!$sock) { echo "Could not open connection to server.\n"; echo "$errstr ($errno)
\n"; }
else { if ( fputs($sock, "$a_query\r\n") ) $found = true;
else echo "Unable to open Socket Connection
";
while(!feof($sock)) { $line = fgets($sock,128);
if ( stristr( $line, "No match for") ) { $found = false; break; }
}
fclose($sock);
}
} else $found = false;
}
return $found;
};
function figuresInWords($num)
{
$num = (int)$num;
$d1[0]="";$d1[1]="One ";$d1[2]="Two ";$d1[3]="Three ";$d1[4]="Four ";$d1[5]="Five ";
$d1[6]="Six ";$d1[7]="Seven ";$d1[8]="Eight ";$d1[9]="Nine ";$d1[10]="Ten ";$d1[11]="Eleven ";
$d1[12]="Twelve ";$d1[13]="Thirteen ";$d1[14]="Fourteen ";$d1[15]="Fifteen ";$d1[16]="Sixteen ";
$d1[17]="Seventeen ";$d1[18]="Eighteen ";$d1[19]="Nineteen ";
$d2[2]="Twenty ";$d2[3]="Thirty ";$d2[4]="Fourty ";$d2[5]="Fifty ";$d2[6]="Sixty ";
$d2[7]="Seventy ";$d2[8]="Eighty ";$d2[9]="Ninety ";
$d3="Hundred ";
$d4="Thousand ";
$d5="Lakh ";
$d6="Crore ";
$retval = "";
$numlen = strlen($num);
if($num<=19) return $d1[$num];
for($x=0;$x<$numlen;$x++) $numarr[$x]=substr($num,$x,1);
if($numlen<3){
$retval .= $d2[$numarr[0]];
$retval .= $d1[$numarr[1]];
return $retval;
}
if($numlen<4){
$retval .= $d1[$numarr[0]];
$retval .= $d3;
$retval .= figuresInWords($numarr[1].$numarr[2]);
return $retval;
}
if($numlen<6){
$n2 = $numarr[count($numarr)-3].$numarr[count($numarr)-2].$numarr[count($numarr)-1];
$n1 = $numarr[count($numarr)-5].$numarr[count($numarr)-4];
$retval .= figuresInWords($n1);
$retval .= $d4;
$retval .= figuresInWords($n2);
return $retval;
}
if($numlen<8){
$n3 = $numarr[count($numarr)-3].$numarr[count($numarr)-2].$numarr[count($numarr)-1];
$n2 = $numarr[count($numarr)-5].$numarr[count($numarr)-4];
$n1 = $numarr[count($numarr)-7].$numarr[count($numarr)-6];
$retval .= figuresInWords($n1);
$retval .= $d5;
$retval .= figuresInWords($n2.$n3);
return $retval;
}
if($numlen<10){
$n4 = $numarr[count($numarr)-3].$numarr[count($numarr)-2].$numarr[count($numarr)-1];
$n3 = $numarr[count($numarr)-5].$numarr[count($numarr)-4];
$n2 = $numarr[count($numarr)-7].$numarr[count($numarr)-6];
$n1 = $numarr[count($numarr)-9].$numarr[count($numarr)-8];
$retval .= figuresInWords($n1);
$retval .= $d6;
$retval .= figuresInWords($n2.$n3.$n4);
return $retval;
}
};
function includeAnimateDotJS($path=""){
echo "
";
};
function dynamicAnimationMouseOverBGeffect($bgcolor){
echo " dynamicanimation=\"fpAnimformatRolloverFP1\" fprolloverstyle=\"background-color: $bgcolor\" onmouseover=\"rollIn(this)\" onmouseout=\"rollOut(this)\" language=\"Javascript1.2\" ";
};
function includeOverlibDotJS(){
echo "";
echo "