Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/indem/cms/
Upload File :
Current File : /var/www/html/mmishra/indem/cms/functions.inc

<?php

function counter() {
        $file = "counter.inc";

        if (!file_exists($file)) {
                touch ($file);
                $count=0;
        } else {
                include "counter.inc";
                $count++;
        }
        echo $count;
        $str = '<? $count='.$count.'; ?>';
        $handle = fopen ($file, 'r+');
        fwrite ($handle, $str);
        fclose($handle);
}


function ajax() {
?>
	<script language="javascript">
	function GetXmlHttpObject() {
  		var xmlHttp=null;
  		try {
    			// Firefox, Opera 8.0+, Safari
    			xmlHttp=new XMLHttpRequest();
    		} catch (e) {
    			// Internet Explorer
    			try {
      				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      			} catch (e) {
      				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      			}
    		}
  		return xmlHttp;
	}

	function showPage(q) {
		if (q.length<3) { 
  			document.getElementById("search_result").innerHTML="";
  			return;
		}
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null) {
  			alert ("Your browser does not support AJAX!");
  			return;
  		} 
		var url="search.php?q="+q;
		//alert(url);
		xmlHttp.onreadystatechange=stateChanged;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}

	function stateChanged() { 
		if (xmlHttp.readyState==4) { 
			document.getElementById("search_result").innerHTML=xmlHttp.responseText;
		}
	}
	</script>
<?php
}

function flash() {
?>
	<!-- START AD -->
	<div class="WRBannerCenter" align="center">
	<script language="JavaScript"><!--
	function show(object) {
  		if (document.getElementById) {
    			document.getElementById(object).style.visibility = 'visible';
    			document.getElementById(object).style.top = document.getElementById('banner').style.top;
    			document.getElementById(object).style.left = document.getElementById('banner').style.left;
  		} else if (document.layers && document.layers[object]) {
    			document.layers[object].visibility = 'visible';
    			document.layers[object].top = document.getElementById('banner').style.top;
    			document.layers[object].left = document.getElementById('banner').style.left;
  		} else if (document.all) {
    			document.all[object].style.visibility = 'visible';
    			document.all[object].style.top = document.getElementById('banner').style.top;
    			document.all[object].style.left = document.getElementById('banner').style.left;
  		}		
	}
 
	function hide(object) {
  		if (document.getElementById) {
    			document.getElementById(object).style.visibility = 'hidden';
  		} else if (document.layers && document.layers[object]) {
    			document.layers[object].visibility = 'hidden';
  		} else if (document.all) {
    			document.all[object].style.visibility = 'hidden';
  		}
	}
	//--></script>

	<div class="flash" id="j_dj" onMouseOver="show('j_dj')" onMouseOut="hide('j_dj')">
	<a href="http://www.iiita.ac.in"><img src="banners/cc1-lt-cc2.jpg" width="700" height="150" hspace="0" vspace="0" border="0"></a>
	</div>
	<!-- END AD -->
<?php
}
?>