Code Search for Developers
 
 
  

about.php from freePBX at Krugle


Show about.php syntax highlighted

<?php

function getpost_ifset($test_vars)
{
	if (!is_array($test_vars)) {
		$test_vars = array($test_vars);
	}
	foreach($test_vars as $test_var) { 
		if (isset($_POST[$test_var])) { 
			global $$test_var;
			$$test_var = addslashes($_POST[$test_var]); 
		} elseif (isset($_GET[$test_var])) {
			global $$test_var; 
			$$test_var = addslashes($_GET[$test_var]);
		}
	}
}


getpost_ifset(array('s', 't'));


$array = array ("INFO", "CONTACT");
$s = $s ? $s : 0;
$section="section$s$t";

$racine=$_SERVER['PHP_SELF'];
$update = "03 March 2005";

$paypal="OK"; //OK || NOK
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>		
		<title>Asterisk CDR</title>
		<meta http-equiv="Content-Type" content="text/html">
		<link rel="stylesheet" type="text/css" media="print" href="/css/print.css">
		<SCRIPT LANGUAGE="JavaScript" SRC="./encrypt.js"></SCRIPT>
		<style type="text/css" media="screen">
			@import url("css/layout.css");
			@import url("css/content.css");
			@import url("css/docbook.css");
		</style>
		<meta name="MSSmartTagsPreventParsing" content="TRUE">
	</head>
	<body>
	
	

	
	
		<!-- header BEGIN -->
		<div id="fedora-header">
			
			<div id="fedora-header-logo">
				 <table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="images/asterisk.gif"  alt="CDR (Call Detail Records)"></td><td>
				 <H1><font color=#990000>&nbsp;&nbsp;&nbsp;CDR (Call Detail Records)</font></H1></td></tr></table>
			</div>

		</div>
		<div id="fedora-nav"></div>
		<!-- header END -->
		
		<!-- leftside BEGIN -->
		<div id="fedora-side-left">
		<div id="fedora-side-nav-label">Site Navigation:</div>	<ul id="fedora-side-nav">
		<?php 
			$nkey=array_keys($array);
    		$i=0;
    		while($i<sizeof($nkey)){
			
				$op_strong = (($i==$s) && (!is_string($t))) ? '<strong>' : '';
				$cl_strong = (($i==$s) && (!is_string($t))) ? '</strong>' : '';
									
        		if(is_array($array[$nkey[$i]])){
					
					
					
					echo "\n\t<li>$op_strong<a href=\"$racine?s=$i\">".$nkey[$i]."</a>$cl_strong";
									
					$j=0;
					while($j<sizeof($array[$nkey[$i]] )){
						$op_strong = (($i==$s) && (isset($t)) && ($j==intval($t))) ? '<strong>' : '';
						$cl_strong = (($i==$s) && (isset($t))&& ($j==intval($t))) ? '</strong>' : '';						
						echo "<ul>";						
						echo "\n\t<li>$op_strong<a href=\"$racine?s=$i&t=$j\">".$array[$nkey[$i]][$j]."</a>$cl_strong";
						echo "</ul>";
						$j++;						
					}
						
        		}else{					
					echo "\n\t<li>$op_strong<a href=\"$racine?s=$i\">".$array[$nkey[$i]]."</a>$cl_strong";
				}
				echo "</li>\n";
        		
        		$i++;
    		}
			
		?>

			</ul>
			
			<?php  if ($paypal=="OK"){?>
		<center>
			<br><br>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="info@areski.net">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="tax" value="0">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
</center>
			<?php  } ?>
		</div>

		<!-- leftside END -->

		<!-- content BEGIN -->
		<div id="fedora-middle-two">
			<div class="fedora-corner-tr">&nbsp;</div>
			<div class="fedora-corner-tl">&nbsp;</div>
			<div id="fedora-content">



<?php if ($section=="section0"){?>

<h1>
 <center>Asterisk-Stat : CDR Analyser</center>
</h1>
<br>
Asterisk-Stat is providing different reports & Graph to allow <br>
the Asterisk-admin to analyse quickly and easily the traffic on their Asterisk server.<br/>
All the graphic & reports are based over the CDR database.
<br/>


<br/>


<br/><br/>

<br/>
<b>LAST RELEASE : V2.0 (03 March 2005)</b><br>

<br/><br/>

<b>FEATURES :</b><br>
<ul>
	<li>- CDR REPORT (MONTHLY or DAILY)<br/></li> 
	<li>- MONTHLY TRAFFIC<br/></li> 
	<li>- DAILY LOAD<br/></li> 
	<li>- COMPARE CALL LOAD WITH PREVIOUS DAYS<br/></li> 
	<li>- MANY CRITERIAS TO DEFINE THE REPORT<br/></li> 	
	<LI>- EXPORT CDR REPORT TO PDF<BR/></LI> 
	<LI>- EXPORT CDR REPORT TO CSV<BR/></LI> 		
	<LI>- SUPPORT MYSQL & POSTGRESQL<BR/></LI> 		
	<LI>- MANY OTHERS :)<BR/></LI>
</ul>
<br>
<b>REQUIREMENTS :</b><br>
<ul>
	<li>- APACHE / HTTP SERVER<BR/></LI> 
	<li>- PHP<br/></li> 
	<li>- POSTGRESQL OR MYSQL<br/></li> 	
	<li>- PHP-PGSQL OR PHP-MYSQL<br/></li> 
	<LI>- NEED GD LIBRARY <BR/></LI>
	<LI>- JPGRAPH_LIB (included)<BR/></LI>
</ul>

<br>
<b>ADVICES :</b><br>
<ul>
	<li>- IMPROVE SPEED RESULT WITH INDEX:<br>
			POSTGRESQL : <i>CREATE INDEX calldate_ind ON cdr USING btree (calldate)</i><BR/>
			MYSQL : <i>ALTER TABLE `cdr` ADD INDEX ( `calldate` )</i> <BR/></LI> 
	<li>-  [OPTIONAL]<br/>
			POSTGRESQL :  <i>CREATE INDEX dst_ind ON cdr USING btree (dst)</i><br/>
			POSTGRESQL :  <i>CREATE INDEX accountcode_ind ON cdr USING btree (accountcode)</i><br/>
			MYSQL :  <i>ALTER TABLE `cdr` ADD INDEX ( `dst` )</i><br/>
			MYSQL :  <i>ALTER TABLE `cdr` ADD INDEX ( `accountcode` ) </i><br/>
	</li> 
</ul>

<br>
<b>TESTED WITH :</b><br>

<ul>
	<li>- PSQL (PostgreSQL) 7.2.4<br></LI> 
	<li>- MYSQL  Ver 11.18 Distrib 3.23.58<br/>	</LI> 
</ul>


<br>
<b>INSTALL :</b>

<br><br>Edit defines.php files
<br/>



<ul>

<li><b>WEBROOT</b>: This is the root URL of the application.<br/>Example: http://youdomain.com/asterisk-stat/</li> 

<li><b>FSROOT</b>: This is the server path which contain the application.<br/>Example: /home/users/asterisk-stat/</li> 

<li><b>HOST</b>: This is the Database host name. <br/>Example: localhost</li> 
<li><b>PORT</b>: Database port.<br/>Example: 5432</li> 
<li><b>USER</b>: Username to access to the database.<br/>Example: username</li> 
<li><b>PASS</b>: Database password of the user.<br/>Example: password</li> 
<li><b>DBNAME</b>: Name of the Database.<br/>Example: asteriskcdr</li> 
<li><b>DB_TYPE</b>: Database type.<br/>support: mysql and postgres</li> 

<li><b>DB_TABLENAME</b>: Table of the database containing the CDR.<br/>Example: cdrtable</li> 

<li><b>appli_list</b>: PHP array used to associate extension to a name. This can be useful if you want to give more signification during the CDR browsing
<br/>$appli_list['4677']=array("Voicemail");<br>$appli_list['6544']=array("Conference-MeetMe");</li> 


</ul>


<br>
<h3>DOWNLOAD :</h3>
TAR-GZ : <a href="./asterisk-stat-v2.tar.gz">asterisk-stat V 2.0</a>
<br><br>

<hr>
If you have comments or ideas to improve the CDR-ANALYSER, please <a href='javascript:bite("3721 945 4728 2762 3565 3554 2008 1380 654 3721 3554 4468 3007 3877 4828 654",5123,2981)'>drop me an email</a> :)<br/>

<br/><br/>

<br>
<h3>Screen-shot</h3>

<a href="screenshot/screenshot01.png"><img src="screenshot/screenshot01.png" width="576"></a>
<br><br>
<a href="screenshot/screenshot02.png"><img src="screenshot/screenshot02.png" width="576"></a>
<br><br>
<a href="screenshot/screenshot03.png"><img src="screenshot/screenshot03.png" width="576"></a>
<br><br>
<a href="screenshot/screenshot04.png"><img src="screenshot/screenshot04.png" width="576"></a>
<br><br>
<a href="screenshot/screenshot05.png"><img src="screenshot/screenshot05.png" width="576"></a>
<br><br>
<a href="screenshot/screenshot06.png"><img src="screenshot/screenshot06.png" width="576"></a>

<br><br>


<?php }elseif ($section=="section1") {?>
		<h1>Contact</h1>        		
        <table width="90%">
          
		  <tr> 
            <td>
				<h3>Arezqui Bela&iuml;d <br> <i>Barcelona - Belgium</i></h3>				
				<br>
				<a href='javascript:bite("3721 945 4728 2762 3565 3554 2008 1380 654 3721 3554 4468 3007 3877 4828 654",5123,2981)'>Click to email me</a>
				<br><br><i>Feel free to send me your suggestions to improve the application ;)</i>
            </td>
          </tr>          
          
        </table>
		<br><br><em><strong>Last update:</strong></em> <?php echo $update?><br>



<?php }else{?>
	<h1>Coming soon ...</h1>
   
<?php }?>
		</div>

			<div class="fedora-corner-br">&nbsp;</div>
			<div class="fedora-corner-bl">&nbsp;</div>
		</div>
		<!-- content END -->
		
		<!-- footer BEGIN -->
		<div id="fedora-footer">

			<br>
			<?php 
				$fp = fopen("counter.txt","r");
				$count = fread ($fp, filesize ("counter.txt"));
				fclose($fp);
				$count = intval($count);
				$count++;
				$fp = fopen("counter.txt","w+");
				fputs($fp, $count);
				fclose($fp);
				echo "Hits: $count";
			?>


		</div>
		<!-- footer END -->
	</body>
</html>




See more files for this project here

freePBX

FreePBX is the most powerful GUI (Web Based) configuration tool for Asterisk. It provides everything that a standard legacy phone system can, plus a huge amount of new features. All documentation and information is avalable from http://www.freepbx.org

Project homepage: http://sourceforge.net/projects/amportal
Programming language(s): PHP,Shell Script,SQL
License: other

  css/
    images/
      corner-bl.png
      corner-br.png
      corner-tl.png
      corner-tr.png
    content.css
    docbook.css
    layout.css
  images/
    asterisk.gif
    btn_top_12x12.gif
    button-search.gif
    call-compare.png
    call-logs.png
    excel.png
    fleche-d.gif
    fleche-g.gif
    header-download.png
    header-faq.png
    header-projects.png
    header-search.png
    icon_down_12x12.GIF
    icon_up_12x12.GIF
    jukebox_ti60.gif
    pdf.png
    print.css
    printable.png
    sidenav-selected.gif
    spacer.gif
    th_call-compare.png
    th_call-logs.png
  jpgraph_lib/
    imgdata_balls.inc
    imgdata_bevels.inc
    imgdata_diamonds.inc
    imgdata_pushpins.inc
    imgdata_squares.inc
    imgdata_stars.inc
    jpg-config.inc
    jpgraph.php
    jpgraph_antispam-digits.php
    jpgraph_antispam.php
    jpgraph_bar.php
    jpgraph_canvas.php
    jpgraph_canvtools.php
    jpgraph_error.php
    jpgraph_flags.php
    jpgraph_gantt.php
    jpgraph_gb2312.php
    jpgraph_gradient.php
    jpgraph_iconplot.php
    jpgraph_imgtrans.php
    jpgraph_line.php
    jpgraph_log.php
    jpgraph_pie.php
    jpgraph_pie3d.php
    jpgraph_plotband.php
    jpgraph_plotmark.inc
    jpgraph_polar.php
    jpgraph_radar.php
    jpgraph_regstat.php
    jpgraph_scatter.php
    jpgraph_stock.php
  lib/
    DB-modules/
      ciaosql.php
      phplib_mssql.php
      phplib_mysql.php
      phplib_oci8.php
      phplib_odbc.php
      phplib_oracle.php
      phplib_postgres.php
      phplib_sybase.php
    font/
      makefont/
      courier.php
      helvetica.php
      helveticab.php
      helveticabi.php
      helveticai.php
      symbol.php
      times.php
      timesb.php
      timesbi.php
      timesi.php
      zapfdingbats.php
    Class.Table.php
    defines.php
    fpdf.php
    iam_csvdump.php
  CHANGELOG.txt
  about.php
  call-comp.php
  call-daily-load.php
  call-last-month.php
  call-log.php
  cdr.php
  counter.txt
  encrypt.js
  export_csv.php
  export_pdf.php
  graph_hourdetail.php
  graph_pie.php
  graph_stat.php
  graph_statbar.php
  info.txt