Friends,
I know many of u have already this type of scripts but I have developed it again and want to share with you. Please don't take it otherwise.
Copyright???(multiple copy and editing is highly appricitiated )
change the database connection part for your database connection.
Open index.php in a code viewer and just place the code and save.
NB: Please visit my sites to view the result (Urlcabin Web Directory - DirectoryMX - ActiveCabin.com - directory.activewebtool.com)
<?
// This script has been written by Alam (alam19bd@yahoo.com) and any can use it, change it and delete it without my permission
// Database connection
$db="databasename"; // Please write your database name here
$db_server="dbservername"; // Please write your server name here (nornamlly localhost)
$db_id="databaseID"; // Please write your database ID here
$db_password="databasePWD"; // Please write your database Password here
$link=mysql_connect("$db_server","$db_id","$db_password");
if(!mysql_select_db("$db"))
{
echo "Connection failed!";
}
?>
<div align=center>
Category:
<?
// Total Category
$category_table="PLD_CATEGORY";
$q = "select count(*) from $category_table";
$r = mysql_query($q,$link);
while($a=mysql_fetch_array($r)){
echo $a[0];
}
?>
- Active Links:
<?
// Total Active Links
$link_table="PLD_LINK";
$q = "select count(*) from $link_table where STATUS=2";
$r = mysql_query($q,$link);
while($a=mysql_fetch_array($r)){
echo $a[0];
}
?>
- Pending Links:
<?
// Total Pending Links
$link_table="PLD_LINK";
$q = "select count(*) from $link_table where STATUS=1";
$r = mysql_query($q,$link);
while($a=mysql_fetch_array($r)){
echo $a[0];
}
?>
</div>
I know many of u have already this type of scripts but I have developed it again and want to share with you. Please don't take it otherwise.
Copyright???(multiple copy and editing is highly appricitiated )
change the database connection part for your database connection.
Open index.php in a code viewer and just place the code and save.
NB: Please visit my sites to view the result (Urlcabin Web Directory - DirectoryMX - ActiveCabin.com - directory.activewebtool.com)
<?
// This script has been written by Alam (alam19bd@yahoo.com) and any can use it, change it and delete it without my permission
// Database connection
$db="databasename"; // Please write your database name here
$db_server="dbservername"; // Please write your server name here (nornamlly localhost)
$db_id="databaseID"; // Please write your database ID here
$db_password="databasePWD"; // Please write your database Password here
$link=mysql_connect("$db_server","$db_id","$db_password");
if(!mysql_select_db("$db"))
{
echo "Connection failed!";
}
?>
<div align=center>
Category:
<?
// Total Category
$category_table="PLD_CATEGORY";
$q = "select count(*) from $category_table";
$r = mysql_query($q,$link);
while($a=mysql_fetch_array($r)){
echo $a[0];
}
?>
- Active Links:
<?
// Total Active Links
$link_table="PLD_LINK";
$q = "select count(*) from $link_table where STATUS=2";
$r = mysql_query($q,$link);
while($a=mysql_fetch_array($r)){
echo $a[0];
}
?>
- Pending Links:
<?
// Total Pending Links
$link_table="PLD_LINK";
$q = "select count(*) from $link_table where STATUS=1";
$r = mysql_query($q,$link);
while($a=mysql_fetch_array($r)){
echo $a[0];
}
?>
</div>